|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.javagl.swogl.geometry.AbstractGeometry
public class AbstractGeometry
Abstract base implementation of a Geometry
Constructor Summary | |
---|---|
protected |
AbstractGeometry()
Creates a new AbytractGeometry |
Method Summary | |
---|---|
protected void |
addNormal(javax.vecmath.Tuple3f normal)
Adds copy of the given normal to this geometry |
protected void |
addTexCoord(javax.vecmath.TexCoord2f texCoord)
Add copy of the given texture coordinate to this geometry |
protected void |
addTriangle(int i0,
int i1,
int i2)
Add the triangle consisting of the given indices to this geometry. |
protected void |
addVertex(javax.vecmath.Tuple3f vertex)
Add a copy of the given vertex to this geometry. |
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected AbstractGeometry()
Method Detail |
---|
protected void addVertex(javax.vecmath.Tuple3f vertex)
vertex
- The vertexprotected void addTexCoord(javax.vecmath.TexCoord2f texCoord)
texCoord
- The texture coordinateprotected void addNormal(javax.vecmath.Tuple3f normal)
normal
- The normalprotected void addTriangle(int i0, int i1, int i2)
i0
- The first indexi1
- The second indexi2
- The third indexpublic void setVerticesModified(boolean modified)
Geometry
setVerticesModified
in interface Geometry
modified
- Whether the vertices have been modifiedpublic boolean areVerticesModified()
Geometry
areVerticesModified
in interface Geometry
public void setTexCoordsModified(boolean modified)
Geometry
setTexCoordsModified
in interface Geometry
modified
- Whether the texture coordinates have been modifiedpublic boolean areTexCoordsModified()
Geometry
areTexCoordsModified
in interface Geometry
public int getNumTriangles()
Geometry
getNumTriangles
in interface Geometry
public int getVertexIndex(int index)
Geometry
getVertexIndex
in interface Geometry
index
- The number of the index to return
public int getNumVertices()
Geometry
getNumVertices
in interface Geometry
public void getVertex(int index, javax.vecmath.Tuple3f vertex)
Geometry
getVertex
in interface Geometry
index
- The index of the vertexvertex
- Will store the vertexpublic void setVertex(int index, javax.vecmath.Tuple3f vertex)
Geometry
setVerticesModified(true)
should be called, so that the
rendering may take the modified data into account.
setVertex
in interface Geometry
index
- The index of the vertexvertex
- The coordinates the vertex should havepublic void getNormal(int index, javax.vecmath.Tuple3f normal)
Geometry
getNormal
in interface Geometry
index
- The index of the vertex whose normal should be obtainednormal
- Will store the normalpublic void setNormal(int index, javax.vecmath.Tuple3f normal)
Geometry
setVerticesModified(true)
should be called, so that the
rendering may take the modified data into account.
setNormal
in interface Geometry
index
- The index of the vertex whose normal should be setnormal
- The normal to set for the vertexpublic void getTexCoord(int index, javax.vecmath.Tuple2f texCoord)
Geometry
getTexCoord
in interface Geometry
index
- The index of the vertex whose texture coordinates
should be obtainedtexCoord
- Will store the texture coordinatespublic void setTexCoord(int index, javax.vecmath.Tuple2f texCoord)
Geometry
setTexCoordsModified(true)
should be called, so that the
rendering may take the modified data into account.
setTexCoord
in interface Geometry
index
- The index of the vertex whose texture coordinates
should be settexCoord
- The texture coordinates to set
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |