de.javagl.swogl.geometry
Interface Geometry

All Known Subinterfaces:
SimpleGeometry
All Known Implementing Classes:
AbstractGeometry

public interface Geometry

Interface for the geometry of a SwoglComponent.


Method Summary
 boolean areTexCoordsModified()
          Returns whether the texture coordinates have been modified
 boolean areVerticesModified()
          Returns whether the vertices have been modified
 void getNormal(int index, javax.vecmath.Tuple3f normal)
          Stores the normal with the given index in the given argument
 int getNumTriangles()
          Returns the number of triangles in this Geometry
 int getNumVertices()
          Returns the number of vertices in this Geometry
 void getTexCoord(int index, javax.vecmath.Tuple2f texCoord)
          Stores the texture coordinates of the vertex with the given index in the given argument
 void getVertex(int index, javax.vecmath.Tuple3f vertex)
          Stores the vertex with the given index in the given argument
 int getVertexIndex(int index)
          Returns the specified vertex index.
 void setNormal(int index, javax.vecmath.Tuple3f normal)
          Sets the normal of the vertex with the given index After modifying vertices, setVerticesModified(true) should be called, so that the rendering may take the modified data into account.
 void setTexCoord(int index, javax.vecmath.Tuple2f texCoord)
          Set the texture coordinates of the vertex with the given index After modifying coordinates, setTexCoordsModified(true) should be called, so that the rendering may take the modified data into account.
 void setTexCoordsModified(boolean modified)
          Set the flag which indicates that the texture coordinates of this geometry have been modified, and should be updated by the renderer before the next rendering pass.
 void setVertex(int index, javax.vecmath.Tuple3f vertex)
          Set the coordinates of the vertex with the specified index.
 void setVerticesModified(boolean modified)
          Set the flag which indicates that the vertex positions of this geometry have been modified, and should be updated by the renderer before the next rendering pass.
 

Method Detail

getNumTriangles

int getNumTriangles()
Returns the number of triangles in this Geometry

Returns:
The number of triangles in this Geometry

getVertexIndex

int getVertexIndex(int index)
Returns the specified vertex index. Three consecutive indices are the indices of the vertices of a single triangle

Parameters:
index - The number of the index to return
Returns:
The index

getNumVertices

int getNumVertices()
Returns the number of vertices in this Geometry

Returns:
The number of vertices in this Geometry

getVertex

void getVertex(int index,
               javax.vecmath.Tuple3f vertex)
Stores the vertex with the given index in the given argument

Parameters:
index - The index of the vertex
vertex - Will store the vertex

setVertex

void setVertex(int index,
               javax.vecmath.Tuple3f vertex)
Set the coordinates of the vertex with the specified index. After modifying vertices, setVerticesModified(true) should be called, so that the rendering may take the modified data into account.

Parameters:
index - The index of the vertex
vertex - The coordinates the vertex should have

getNormal

void getNormal(int index,
               javax.vecmath.Tuple3f normal)
Stores the normal with the given index in the given argument

Parameters:
index - The index of the vertex whose normal should be obtained
normal - Will store the normal

setNormal

void setNormal(int index,
               javax.vecmath.Tuple3f normal)
Sets the normal of the vertex with the given index After modifying vertices, setVerticesModified(true) should be called, so that the rendering may take the modified data into account.

Parameters:
index - The index of the vertex whose normal should be set
normal - The normal to set for the vertex

getTexCoord

void getTexCoord(int index,
                 javax.vecmath.Tuple2f texCoord)
Stores the texture coordinates of the vertex with the given index in the given argument

Parameters:
index - The index of the vertex whose texture coordinates should be obtained
texCoord - Will store the texture coordinates

setTexCoord

void setTexCoord(int index,
                 javax.vecmath.Tuple2f texCoord)
Set the texture coordinates of the vertex with the given index After modifying coordinates, setTexCoordsModified(true) should be called, so that the rendering may take the modified data into account.

Parameters:
index - The index of the vertex whose texture coordinates should be set
texCoord - The texture coordinates to set

setVerticesModified

void setVerticesModified(boolean modified)
Set the flag which indicates that the vertex positions of this geometry have been modified, and should be updated by the renderer before the next rendering pass.

Parameters:
modified - Whether the vertices have been modified

areVerticesModified

boolean areVerticesModified()
Returns whether the vertices have been modified

Returns:
Whether the vertices have been modified

setTexCoordsModified

void setTexCoordsModified(boolean modified)
Set the flag which indicates that the texture coordinates of this geometry have been modified, and should be updated by the renderer before the next rendering pass.

Parameters:
modified - Whether the texture coordinates have been modified

areTexCoordsModified

boolean areTexCoordsModified()
Returns whether the texture coordinates have been modified

Returns:
Whether the texture coordinates have been modified