org.deegree.rendering.r3d.opengl.rendering.model.geometry
Class RenderableTexturedGeometry
java.lang.Object
org.deegree.rendering.r3d.opengl.rendering.model.geometry.RenderableGeometry
org.deegree.rendering.r3d.opengl.rendering.model.geometry.RenderableTexturedGeometry
- All Implemented Interfaces:
- Serializable, MemoryAware, QualityModelPart, JOGLRenderable, RenderableQualityModelPart
public class RenderableTexturedGeometry
- extends RenderableGeometry
The RenderableTexturedGeometry
is a RenderableGeometry
which has texture coordinates assigned to
each vertex as well. Currently only one texture is supported.
- Version:
- $Revision: 30126 $, $Date: 2011-03-22 11:11:00 +0100 (Tue, 22 Mar 2011) $
- Author:
- Rutger Bezema, last edited by: $Author: aschmitz $
- See Also:
- Serialized Form
Constructor Summary |
RenderableTexturedGeometry(float[] vertices,
int openGLType,
float[] vertexNormals,
SimpleGeometryStyle style,
String texture,
float[] textureCoordinates,
boolean useDirectBuffers)
|
RenderableTexturedGeometry(float[] vertices,
int openGLType,
float[] vertexNormals,
String texture,
float[] textureCoordinates,
boolean useDirectBuffers)
|
RenderableTexturedGeometry(FloatBuffer vertices,
int openGLType,
FloatBuffer vertexNormals,
SimpleGeometryStyle style,
String texture,
FloatBuffer textureCoordinates)
|
RenderableTexturedGeometry(int coordPosition,
int vertexCount,
int openGLType,
int normalPosition,
SimpleGeometryStyle style,
String textureID,
int texturePosition)
|
Methods inherited from class org.deegree.rendering.r3d.opengl.rendering.model.geometry.RenderableGeometry |
getCoordBuffer, getCoordPosition, getNormalBuffer, getNormalPosition, getOpenGLType, getOrdinateCount, getReadOnlyCoordBuffer, getStyle, getVertexCount, getVertexNormals, render, renderPrepared, setCoordPosition, setNormPosition, setVertexNormals, setVertices, useDirectBuffers |
RenderableTexturedGeometry
public RenderableTexturedGeometry(float[] vertices,
int openGLType,
float[] vertexNormals,
SimpleGeometryStyle style,
String texture,
float[] textureCoordinates,
boolean useDirectBuffers)
- Parameters:
vertices
- openGLType
- vertexNormals
- style
- texture
- to usetextureCoordinates
- of this datauseDirectBuffers
- to use direct buffers instead of heap buffers.
RenderableTexturedGeometry
public RenderableTexturedGeometry(FloatBuffer vertices,
int openGLType,
FloatBuffer vertexNormals,
SimpleGeometryStyle style,
String texture,
FloatBuffer textureCoordinates)
- Parameters:
vertices
- openGLType
- vertexNormals
- style
- texture
- to usetextureCoordinates
- of this data
RenderableTexturedGeometry
public RenderableTexturedGeometry(float[] vertices,
int openGLType,
float[] vertexNormals,
String texture,
float[] textureCoordinates,
boolean useDirectBuffers)
- Parameters:
vertices
- openGLType
- vertexNormals
- texture
- textureCoordinates
- useDirectBuffers
- to use direct buffers instead of heap buffers.
RenderableTexturedGeometry
public RenderableTexturedGeometry(int coordPosition,
int vertexCount,
int openGLType,
int normalPosition,
SimpleGeometryStyle style,
String textureID,
int texturePosition)
- Parameters:
coordPosition
- in the direct vertex buffervertexCount
- the number of verticesopenGLType
- the opengl typenormalPosition
- position in the direct normal bufferstyle
- to be appliedtextureID
- of the texture to use.texturePosition
- in the direct texture buffer.
enableArrays
protected void enableArrays(RenderContext glRenderContext,
DirectGeometryBuffer geomBuffer)
- Description copied from class:
RenderableGeometry
- Load the float buffers and enable the client state.
- Overrides:
enableArrays
in class RenderableGeometry
geomBuffer
- for which the coord/normal Positions are valid for.
disableArrays
public void disableArrays(RenderContext glRenderContext)
- Overrides:
disableArrays
in class RenderableGeometry
getTexture
public final String getTexture()
- Returns:
- the texture
setTexture
public final void setTexture(String texture)
- Parameters:
texture
- the texture to set
getTextureCoordinates
public final FloatBuffer getTextureCoordinates()
- Returns:
- the textureCoordinates
setTextureCoordinates
public final void setTextureCoordinates(float[] textureCoordinates)
- Parameters:
textureCoordinates
- the textureCoordinates to set
toString
public String toString()
- Overrides:
toString
in class RenderableGeometry
sizeOf
public long sizeOf()
- Specified by:
sizeOf
in interface MemoryAware
- Overrides:
sizeOf
in class RenderableGeometry
- Returns:
- the bytes this geometry occupies
getTextureOrdinateCount
public int getTextureOrdinateCount()
- Specified by:
getTextureOrdinateCount
in interface RenderableQualityModelPart
- Overrides:
getTextureOrdinateCount
in class RenderableGeometry
- Returns:
- the number of texture ordinates in this quality model part
getTexturePosition
public final int getTexturePosition()
- Returns:
- the texturePosition
Copyright © 2011. All Rights Reserved.