|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xith3d.scenegraph.SceneGraphObject
org.xith3d.scenegraph.NodeComponent
org.xith3d.scenegraph.Geometry
org.xith3d.scenegraph.GeomContainer
public abstract class GeomContainer
Master container for all types of geometry data. This container supports all the non indexed geometries and several methods of data management. In particular NIO, BYREF and INTERLEAVED is supported transparently
| Nested Class Summary | |
|---|---|
static class |
GeomContainer.Type
|
| Nested classes/interfaces inherited from class org.xith3d.scenegraph.Geometry |
|---|
Geometry.Optimization |
| Field Summary | |
|---|---|
static int |
BY_REFERENCE
|
protected GeomNioFloatData |
colors
|
static int |
COLORS
|
static int |
COORDINATES
|
protected GeomNioFloatData |
coords
|
protected int |
faceSize
|
static int |
INTERLEAVED
|
protected GeomNioFloatData |
interleavedData
|
protected GeomNioFloatData |
normals
|
static int |
NORMALS
|
protected int |
numVertices
|
protected GeomNioFloatData[] |
texCoords
|
static int |
TEXTURE_COORDINATES
|
static int |
VERTEX_ATTRIBUTES
|
protected GeomNioFloatData[] |
vertexAttribs
|
| Fields inherited from class org.xith3d.scenegraph.SceneGraphObject |
|---|
XITH3D_USERDATAKEY_OLDUSERDATA |
| Constructor Summary | |
|---|---|
GeomContainer(GeomContainer.Type type,
int coordsSize,
int vertexCount,
int[] stripVertexCounts)
|
|
| Method Summary | |
|---|---|
void |
addData(float[] coordData,
float[] texCoordData,
float[] normalData,
float[] colorData)
Super fast method add a bunch of data right into the data elements. |
void |
addData(org.openmali.vecmath2.Tuple3f translate,
int numVertices,
float[] coordData,
float[] texCoordData,
float[] normalData,
float alpha)
Super fast method for moving a bunch of data into the data elements. |
void |
addData(org.openmali.vecmath2.Tuple3f translate,
int numVertices,
float[] coordData,
float[] texCoordData,
float[] normalData,
float[] colorData)
Super fast method for moving a bunch of data into the data elements. |
void |
calculateFaceNormals()
This method calculates smooth face normals and applies them to the Geometry. |
void |
calculateFaceNormals(boolean apply,
org.openmali.vecmath2.Vector3f[] faceNormals,
org.openmali.vecmath2.Vector3f[] vertexNormals)
This method calculates smooth face normals. |
protected void |
duplicateNodeComponent(NodeComponent original,
boolean forceDuplicate)
|
protected void |
finalize()
|
void |
flipNormals()
Flips (inverts, negates) all the normals of this Geometry. |
void |
freeOpenGLResources(CanvasPeer canvasPeer)
This method frees OpenGL resources (names) for all this NodeComponent and all child-components. |
void |
getColor(int vertexIndex,
org.openmali.vecmath2.Colorf colorf)
Gets the color of the vertex at the specified index. |
void |
getColor(int vertexIndex,
float[] floatArray)
|
GeomNioFloatData |
getColorData()
|
float[] |
getColorRefFloat()
|
void |
getColors(int vertexIndex,
float[] floatArray)
|
long |
getColorsOffset()
|
int |
getColorsSize()
|
void |
getCoordinate(int vertexIndex,
float[] floatArray)
|
void |
getCoordinate(int index,
org.openmali.vecmath2.Tuple3f point)
|
void |
getCoordinates(int vertexIndex,
float[] floatArray)
|
void |
getCoordinates(int vertexIndex,
org.openmali.vecmath2.Tuple3f[] point3fArray)
|
GeomNioFloatData |
getCoordinatesData()
|
long |
getCoordinatesOffset()
|
int |
getCoordinatesSize()
|
float[] |
getCoordRefFloat()
|
int |
getFaceSize()
|
int |
getInitialVertexIndex()
|
GeomNioFloatData |
getInterleavedData()
|
void |
getNormal(int vertexIndex,
float[] floatArray)
|
void |
getNormal(int index,
org.openmali.vecmath2.Vector3f normal)
|
float[] |
getNormalRefFloat()
|
void |
getNormals(int vertexIndex,
float[] floatArray)
|
void |
getNormals(int index0,
org.openmali.vecmath2.Vector3f[] vector3fArray)
|
GeomNioFloatData |
getNormalsData()
|
long |
getNormalsOffset()
|
int |
getNormalsSize()
|
SceneGraphOpenGLReferences |
getOpenGLReference_DL_GeomData()
|
SceneGraphOpenGLReferences |
getOpenGLReference_DL_TexCoords()
|
SceneGraphOpenGLReferences |
getOpenGLReference_DL()
|
float[] |
getTexCoordRefFloat(int unit)
|
GeomNioFloatData |
getTexCoordsData(int unit)
|
int |
getTexCoordSetCount()
|
int[] |
getTexCoordSetMap()
|
void |
getTexCoordSetMap(int[] intArray)
|
int |
getTexCoordSize(int unit)
|
long |
getTexCoordsOffset(int unit)
|
void |
getTextureCoordinate(int unit,
int vertexIndex,
float[] floatArray)
Gets the texture coordinate of the vertex at the specified index for the specified coordinates set. |
void |
getTextureCoordinate(int unit,
int vertexIndex,
org.openmali.vecmath2.TexCoord1f texCoord1f)
Gets the texture coordinate of the vertex at the specified index for the specified coordinates set. |
void |
getTextureCoordinate(int unit,
int vertexIndex,
org.openmali.vecmath2.TexCoord2f texCoord2f)
Gets the texture coordinate of the vertex at the specified index for the specified coordinates set. |
void |
getTextureCoordinate(int unit,
int vertexIndex,
org.openmali.vecmath2.TexCoord3f texCoord3f)
Gets the texture coordinate of the vertex at the specified index for the specified coordinates set. |
void |
getTextureCoordinate(int unit,
int vertexIndex,
org.openmali.vecmath2.TexCoord4f texCoord4f)
Gets the texture coordinate of the vertex at the specified index for the specified coordinates set. |
void |
getTextureCoordinates(int unit,
int vertexIndex,
float[] floatArray)
|
GeomContainer.Type |
getType()
|
int |
getValidVertexCount()
|
boolean |
getVertex(int i,
org.openmali.vecmath2.Tuple3f pos)
|
GeomNioFloatData |
getVertexAttribData(int index)
|
int |
getVertexAttribSize(int index)
|
long |
getVertexAttribsOffset(int index)
|
float |
getVertexAttribute(int attribIndex,
int vertexIndex)
Gets the vertex attribute of the vertex at the specified index for the specified attribute. |
void |
getVertexAttribute(int attribIndex,
int vertexIndex,
float[] floatArray)
|
void |
getVertexAttribute(int attribIndex,
int vertexIndex,
org.openmali.vecmath2.Tuple2f value)
Gets the vertex attribute of the vertex at the specified index for the specified attribute. |
void |
getVertexAttribute(int attribIndex,
int vertexIndex,
org.openmali.vecmath2.Tuple3f value)
Gets the vertex attribute of the vertex at the specified index for the specified attribute. |
void |
getVertexAttribute(int attribIndex,
int vertexIndex,
org.openmali.vecmath2.Vector4f value)
Gets the vertex attribute of the vertex at the specified index for the specified attribute. |
void |
getVertexAttributes(int attribIndex,
int vertexIndex,
float[] floatArray)
|
int |
getVertexAttributesCount()
|
int |
getVertexCount()
|
int |
getVertexFormat()
|
boolean |
hasColorAlpha()
|
boolean |
hasColors()
|
boolean |
hasFeature(int flag)
|
boolean |
hasIndex()
|
boolean |
hasNormals()
|
boolean |
hasTextureCoordinates()
|
boolean |
hasTextureCoordinates(int unit)
|
boolean |
hasVertexAttributes()
|
boolean |
hasVertexAttributes(int attribIndex)
|
void |
invertNormals()
Inverts all the normals in place. |
boolean |
isInterleaved()
|
boolean |
isStrip()
|
void |
makeInterleaved()
Sets up the Geometry to be stored in a single NIO buffer for interleaved geometry. |
void |
makeInterleaved(int features,
boolean colorAlpha,
int[] tuSizes,
int[] vaSizes)
Sets up the Geometry to be stored in a single NIO buffer for interleaved geometry. |
void |
setColor(int vertexIndex,
org.openmali.vecmath2.Colorf colorf)
Sets the color of the vertex at the specified index. |
void |
setColor(int vertexIndex,
float[] floatArray)
Sets the color of the vertex at the specified index. |
void |
setColor(int vertexIndex,
float r,
float g,
float b)
Sets the color of the vertex at the specified index. |
void |
setColor(int vertexIndex,
float r,
float g,
float b,
float a)
Sets the color of the vertex at the specified index. |
void |
setColorData(GeomNioFloatData data)
|
void |
setColors(int vertexIndex,
org.openmali.vecmath2.Colorf[] colorfArray)
Sets the colors of the vertices starting at the specified index. |
void |
setColors(int vertexIndex,
org.openmali.vecmath2.Colorf[] colorfArray,
int startIndex,
int length)
Sets the colors of the vertices starting at the given index. |
void |
setColors(int vertexIndex,
int colorSize,
float[] floatArray)
Sets the colors of the vertices starting at the specified index. |
void |
setColors(int vertexIndex,
int colorSize,
float[] floatArray,
int startIndex,
int length)
Sets the colors of the vertices starting at the specified index. |
void |
setCoordinate(int vertexIndex,
float[] floatArray)
Sets the coordinates of the specified vertex. |
void |
setCoordinate(int vertexIndex,
float x,
float y,
float z)
Sets the coordinates of the vertex at the given index |
void |
setCoordinate(int vertexIndex,
org.openmali.vecmath2.Tuple3f point3f)
Sets the coordinates of the vertex at the given index |
void |
setCoordinateData(GeomNioFloatData data)
|
void |
setCoordinates(int vertexIndex,
float[] floatArray)
Sets the coordinates of the vertices starting at the specified index. |
void |
setCoordinates(int vertexIndex,
float[] floatArray,
int startIndex,
int length)
Sets the coordinates of the vertices starting at the specified index. |
void |
setCoordinates(int vertexIndex,
org.openmali.vecmath2.Tuple3f[] point3fArray)
Sets the coordinates of the vertices starting at the specified index. |
void |
setCoordinates(int vertexIndex,
org.openmali.vecmath2.Tuple3f[] point3fArray,
int startIndex,
int length)
Sets the coordinates of the vertices starting at the specified index |
protected void |
setDataBuffers()
Sets up the data buffers. |
void |
setInitialVertexIndex(int initialVertex)
Sets the index of the first vertex which will be rendered from this geometry array. |
protected void |
setNioBuffers()
Sets up an NIO buffer for each type of data needed for the geometry. |
void |
setNormal(int vertexIndex,
float[] floatArray)
Sets the normal of the vertex at the given index. |
void |
setNormal(int vertexIndex,
float x,
float y,
float z)
Sets the normal of the vertex at the given index. |
void |
setNormal(int vertexIndex,
org.openmali.vecmath2.Vector3f vector3f)
Sets the normal of the vertex at the given index. |
void |
setNormalData(GeomNioFloatData data)
|
void |
setNormals(int vertexIndex,
float[] floatArray)
Sets the normals of the vertices starting at the specified index. |
void |
setNormals(int vertexIndex,
float[] floatArray,
int startIndex,
int length)
Sets the normals of the vertices starting at the specified index. |
void |
setNormals(int vertexIndex,
org.openmali.vecmath2.Vector3f[] vector3fArray)
Sets the normals of the vertices at the specified index. |
void |
setNormals(int vertexIndex,
org.openmali.vecmath2.Vector3f[] vector3fArray,
int startIndex,
int length)
Sets the normals of the vertices starting at the specified index. |
void |
setTexCoordData(int unit,
GeomNioFloatData data)
|
void |
setTextureCoordinate(int unit,
int vertexIndex,
float s)
Sets the texture coordinate of the vertex at the specified index for the specified coordinates set. |
void |
setTextureCoordinate(int unit,
int vertexIndex,
float[] floatArray)
Sets the texture coordinate of the vertex at the specified index for the specified coordinates set. |
void |
setTextureCoordinate(int unit,
int vertexIndex,
float s,
float t)
Sets the texture coordinate of the vertex at the specified index for the specified coordinates set. |
void |
setTextureCoordinate(int unit,
int vertexIndex,
float s,
float t,
float r)
Sets the texture coordinate of the vertex at the specified index for the specified coordinates set. |
void |
setTextureCoordinate(int unit,
int vertexIndex,
float s,
float t,
float r,
float q)
Sets the texture coordinate of the vertex at the specified index for the specified coordinates set. |
void |
setTextureCoordinate(int unit,
int vertexIndex,
org.openmali.vecmath2.TexCoord2f texCoord2f)
Sets the texture coordinate of the vertex at the specified index for the specified coordinates set. |
void |
setTextureCoordinate(int unit,
int vertexIndex,
org.openmali.vecmath2.TexCoord3f texCoord3f)
Sets the texture coordinate of the vertex at the specified index for the specified coordinates set. |
void |
setTextureCoordinate(int unit,
int vertexIndex,
org.openmali.vecmath2.TexCoord4f texCoord4f)
Sets the texture coordinate of the vertex at the specified index for the specified coordinates set. |
void |
setTextureCoordinates(int unit,
int vertexIndex,
int texCoordSize,
float[] floatArray)
Sets the texture coordinate of the vertex starting at the specified index for the specified coordinates set. |
void |
setTextureCoordinates(int unit,
int vertexIndex,
int texCoordSize,
float[] floatArray,
int startIndex,
int length)
Sets the texture coordinate of the vertex starting at the specified index for the specified coordinates set. |
void |
setTextureCoordinates(int unit,
int vertexIndex,
org.openmali.vecmath2.TexCoord2f[] texCoord2fArray)
Sets the texture coordinate of the vertex starting at the specified index for the specified coordinates set. |
void |
setTextureCoordinates(int unit,
int vertexIndex,
org.openmali.vecmath2.TexCoord2f[] texCoord2fArray,
int startIndex,
int length)
Sets the texture coordinate of the vertex starting at the specified index for the specified coordinates set. |
void |
setTextureCoordinates(int unit,
int vertexIndex,
org.openmali.vecmath2.TexCoord3f[] texCoord3fArray)
Sets the texture coordinate of the vertex starting at the specified index for the specified coordinates set. |
void |
setTextureCoordinates(int unit,
int vertexIndex,
org.openmali.vecmath2.TexCoord3f[] texCoord3fArray,
int startIndex,
int length)
Sets the texture coordinate of the vertex starting at the specified index for the specified coordinates set. |
void |
setTextureCoordinates(int unit,
int vertexIndex,
org.openmali.vecmath2.TexCoord4f[] texCoord4fArray)
Sets the texture coordinate of the vertex starting at the specified index for the specified coordinates set. |
void |
setTextureCoordinates(int unit,
int vertexIndex,
org.openmali.vecmath2.TexCoord4f[] texCoord4fArray,
int startIndex,
int length)
Sets the texture coordinate of the vertex starting at the specified index for the specified coordinates set. |
void |
setValidVertexCount(int count)
Sets the number of vertices which will be rendered from this geometry array. |
void |
setVertexAttribute(int attribIndex,
int vertexIndex,
float value)
Sets the vertex attribute of the vertex at the specified index for the specified attribute. |
void |
setVertexAttribute(int attribIndex,
int vertexIndex,
float[] floatArray)
Sets the vertex attribute of the vertex at the specified index for the specified attribute. |
void |
setVertexAttribute(int attribIndex,
int vertexIndex,
org.openmali.vecmath2.Tuple2f value)
Sets the vertex attribute of the vertex at the specified index for the specified attribute. |
void |
setVertexAttribute(int attribIndex,
int vertexIndex,
org.openmali.vecmath2.Tuple3f value)
Sets the vertex attribute of the vertex at the specified index for the specified attribute. |
void |
setVertexAttribute(int attribIndex,
int vertexIndex,
org.openmali.vecmath2.Vector4f value)
Sets the vertex attribute of the vertex at the specified index for the specified attribute. |
void |
setVertexAttributes(int attribIndex,
int vertexIndex,
float[] values,
int attribSize)
Sets the vertex attributes. |
void |
setVertexAttributes(int attribIndex,
int vertexIndex,
float[] values,
int attribsSize,
int startIndex,
int length)
Sets the vertex attributes. |
void |
setVertexAttributes(int attribIndex,
int vertexIndex,
org.openmali.vecmath2.Tuple2f[] values)
Sets the vertex attributes. |
void |
setVertexAttributes(int attribIndex,
int vertexIndex,
org.openmali.vecmath2.Tuple2f[] values,
int startIndex,
int length)
Sets the vertex attributes. |
void |
setVertexAttributes(int attribIndex,
int vertexIndex,
org.openmali.vecmath2.Tuple3f[] values)
Sets the vertex attributes. |
void |
setVertexAttributes(int attribIndex,
int vertexIndex,
org.openmali.vecmath2.Tuple3f[] values,
int startIndex,
int length)
Sets the vertex attributes. |
void |
setVertexAttributes(int attribIndex,
int vertexIndex,
org.openmali.vecmath2.Vector4f[] values)
Sets the vertex attributes. |
void |
setVertexAttributes(int attribIndex,
int vertexIndex,
org.openmali.vecmath2.Vector4f[] values,
int startIndex,
int length)
Sets the vertex attributes. |
void |
update()
Invokes the geometry updater for this geometry buffer. |
void |
updateData(GeometryUpdater geometryUpdater)
|
| Methods inherited from class org.xith3d.scenegraph.Geometry |
|---|
cloneNodeComponent, getCachedBounds, getOptimization, isBoundsDirty, isTriangulatable, isTriangulated, setBoundsDirty, setCachedBounds, setOptimization |
| Methods inherited from class org.xith3d.scenegraph.NodeComponent |
|---|
freeOpenGLResources, getDuplicateOnCloneTree, getModListener, isChanged, isChanged2, setChanged, setDuplicateOnCloneTree, setModListener |
| Methods inherited from class org.xith3d.scenegraph.SceneGraphObject |
|---|
getName, getUserData, getUserData, getUserDataMap, isLive, setLive, setName, setUserData, setUserData, setUserDataRecursive, setUserDataRecursive, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int COORDINATES
public static final int NORMALS
public static final int COLORS
public static final int TEXTURE_COORDINATES
public static final int VERTEX_ATTRIBUTES
public static final int BY_REFERENCE
public static final int INTERLEAVED
protected GeomNioFloatData coords
protected GeomNioFloatData normals
protected GeomNioFloatData colors
protected GeomNioFloatData[] texCoords
protected GeomNioFloatData[] vertexAttribs
protected GeomNioFloatData interleavedData
protected final int faceSize
protected int numVertices
| Constructor Detail |
|---|
public GeomContainer(GeomContainer.Type type,
int coordsSize,
int vertexCount,
int[] stripVertexCounts)
| Method Detail |
|---|
public final GeomContainer.Type getType()
public final boolean isStrip()
isStrip in class Geometrytrue, if this Geometry is a Strippublic final boolean isInterleaved()
public final boolean hasIndex()
hasIndex in class Geometrytrue, if this Geometry has an Indexpublic final int getFaceSize()
public int getVertexCount()
public boolean getVertex(int i,
org.openmali.vecmath2.Tuple3f pos)
public final int getVertexFormat()
getVertexFormat in class Geometrypublic final boolean hasColorAlpha()
hasColorAlpha in class Geometrypublic final boolean hasFeature(int flag)
hasFeature in class Geometry
public void calculateFaceNormals(boolean apply,
org.openmali.vecmath2.Vector3f[] faceNormals,
org.openmali.vecmath2.Vector3f[] vertexNormals)
apply - if true, the normals are applied back to the GeometryfaceNormals - must be of size getTrianglesCount(), or null.
It is filled with the face normals, if not null.vertexNormals - must be of size getVertexCount(), or null.
It is filled with the new vertex normals, if not null.public void calculateFaceNormals()
public void invertNormals()
public void addData(float[] coordData,
float[] texCoordData,
float[] normalData,
float[] colorData)
public void addData(org.openmali.vecmath2.Tuple3f translate,
int numVertices,
float[] coordData,
float[] texCoordData,
float[] normalData,
float[] colorData)
public void addData(org.openmali.vecmath2.Tuple3f translate,
int numVertices,
float[] coordData,
float[] texCoordData,
float[] normalData,
float alpha)
public void setCoordinateData(GeomNioFloatData data)
public final GeomNioFloatData getCoordinatesData()
public final int getCoordinatesSize()
public final long getCoordinatesOffset()
public void setNormalData(GeomNioFloatData data)
public final GeomNioFloatData getNormalsData()
public final int getNormalsSize()
public final long getNormalsOffset()
public void setColorData(GeomNioFloatData data)
public final GeomNioFloatData getColorData()
public final int getColorsSize()
public final long getColorsOffset()
public void setTexCoordData(int unit,
GeomNioFloatData data)
public final GeomNioFloatData getTexCoordsData(int unit)
public final int getTexCoordSize(int unit)
getTexCoordSize in class Geometrypublic final int getTexCoordSetCount()
public final int[] getTexCoordSetMap()
public final void getTexCoordSetMap(int[] intArray)
public final long getTexCoordsOffset(int unit)
public final GeomNioFloatData getVertexAttribData(int index)
public final int getVertexAttribSize(int index)
public final long getVertexAttribsOffset(int index)
public final GeomNioFloatData getInterleavedData()
public void updateData(GeometryUpdater geometryUpdater)
public void setInitialVertexIndex(int initialVertex)
initialVertex - public final int getInitialVertexIndex()
public void setValidVertexCount(int count)
count - public final int getValidVertexCount()
public void setCoordinate(int vertexIndex,
float[] floatArray)
public void setCoordinates(int vertexIndex,
float[] floatArray,
int startIndex,
int length)
vertexIndex - The index of the first vertex to be modified.floatArray - The new coordinates. The size of the array must be a
multiple of 3.startIndex - The index of the first coordinate in the given array.
The first read item of the array will be startIndex*3.length - The number of vertices to copy
public void setCoordinates(int vertexIndex,
float[] floatArray)
vertexIndex - The index of the first vertex to modifyfloatArray - The new coordinates. The size of the array must be a
multiple of 3.
public void setCoordinate(int vertexIndex,
org.openmali.vecmath2.Tuple3f point3f)
vertexIndex - The index of the vertex to modifypoint3f - The new coordinates
public void setCoordinate(int vertexIndex,
float x,
float y,
float z)
vertexIndex - The index of the vertex to modifyx - The new coordinatesy - The new coordinatesz - The new coordinates
public void setCoordinates(int vertexIndex,
org.openmali.vecmath2.Tuple3f[] point3fArray)
vertexIndex - The index of the first vertex to modifypoint3fArray - The new coordinates.
public void setCoordinates(int vertexIndex,
org.openmali.vecmath2.Tuple3f[] point3fArray,
int startIndex,
int length)
vertexIndex - The index of the first vertex to be modified.point3fArray - The new coordinatesstartIndex - The index of the first coordinate in the given arraylength - The number of coordinates to copy
public void getCoordinate(int index,
org.openmali.vecmath2.Tuple3f point)
public void getCoordinate(int vertexIndex,
float[] floatArray)
public void getCoordinates(int vertexIndex,
org.openmali.vecmath2.Tuple3f[] point3fArray)
public void getCoordinates(int vertexIndex,
float[] floatArray)
public final boolean hasNormals()
hasNormals in class Geometry
public void setNormal(int vertexIndex,
float[] floatArray)
vertexIndex - The index of the vertex to modifyfloatArray - The new normal data. Its size must be a multiple of 3.
public void setNormals(int vertexIndex,
float[] floatArray)
vertexIndex - The index of the first vertex to modifyfloatArray - The new normals. Its size must be a multiple of 3.
public void setNormals(int vertexIndex,
float[] floatArray,
int startIndex,
int length)
vertexIndex - The index of the first vertex to modifyfloatArray - The new normal data. Its size must be a multiple of 3.startIndex - The first coordinate to use in the given array. The
first element of the array to be used will be startIndex*3.length - The number of vertices to modify
public void setNormal(int vertexIndex,
org.openmali.vecmath2.Vector3f vector3f)
vertexIndex - THe index of the vertex to modifyvector3f - The new normal
public void setNormal(int vertexIndex,
float x,
float y,
float z)
vertexIndex - THe index of the vertex to modifyx - The new normaly - The new normalz - The new normal
public void setNormals(int vertexIndex,
org.openmali.vecmath2.Vector3f[] vector3fArray)
vertexIndex - The index of the first vertex to modifyvector3fArray - The new normals
public void setNormals(int vertexIndex,
org.openmali.vecmath2.Vector3f[] vector3fArray,
int startIndex,
int length)
vertexIndex - The index of the first vertex to modifyvector3fArray - The new normalsstartIndex - The index of the first coordinate to use in the given
array.length - The number of vertices to modify
public void getNormal(int index,
org.openmali.vecmath2.Vector3f normal)
public void getNormal(int vertexIndex,
float[] floatArray)
public void getNormals(int vertexIndex,
float[] floatArray)
public void getNormals(int index0,
org.openmali.vecmath2.Vector3f[] vector3fArray)
public void flipNormals()
Error, - if this Geometry doesn't currently have normals.public final boolean hasColors()
hasColors in class Geometry
public void setColor(int vertexIndex,
float[] floatArray)
vertexIndex - The index of the vertex to modifyfloatArray - The new color data. The first colorSize
elements will be used.
public void setColors(int vertexIndex,
int colorSize,
float[] floatArray)
vertexIndex - The index of the first vertex to modifycolorSize - floatArray - The new color value. Its size must be a multiple of
colorSize.
public void setColors(int vertexIndex,
int colorSize,
float[] floatArray,
int startIndex,
int length)
vertexIndex - The index of the first vertex to be modified.floatArray - The new color data. The size of the array must be a
multiple of colorSize.colorSize - startIndex - The index of the first color in the given array. The
first read item of the array will be startIndex*colorSize.length - The number of colors to copy
public void setColor(int vertexIndex,
org.openmali.vecmath2.Colorf colorf)
vertexIndex - The index of the vertex to modifycolorf - The new color.
public void setColor(int vertexIndex,
float r,
float g,
float b)
vertexIndex - The index of the vertex to modifyr - g - b -
public void setColor(int vertexIndex,
float r,
float g,
float b,
float a)
vertexIndex - The index of the vertex to modifyr - g - b - a -
public void setColors(int vertexIndex,
org.openmali.vecmath2.Colorf[] colorfArray)
vertexIndex - The index of the first vertex to modify.colorfArray - The new color values.
public void setColors(int vertexIndex,
org.openmali.vecmath2.Colorf[] colorfArray,
int startIndex,
int length)
vertexIndex - The index of the first vertex to modifycolorfArray - The new color data.startIndex - The index of the first color in the given arraylength - The number of vertices to modify.
public void getColor(int vertexIndex,
org.openmali.vecmath2.Colorf colorf)
vertexIndex - The index of the vertex to modifycolorf - The new color.
public void getColor(int vertexIndex,
float[] floatArray)
public void getColors(int vertexIndex,
float[] floatArray)
public final boolean hasTextureCoordinates()
hasTextureCoordinates in class Geometrypublic final boolean hasTextureCoordinates(int unit)
public void setTextureCoordinate(int unit,
int vertexIndex,
float[] floatArray)
unit - The coordinates set.vertexIndex - The index of the vertex to modifyfloatArray - The new texture coordinate data. Its size must be 2, 3 or 4.
public void setTextureCoordinates(int unit,
int vertexIndex,
int texCoordSize,
float[] floatArray)
unit - The coordinates set.vertexIndex - The index of the first vertex to modifytexCoordSize - 1, 2, 3 or 4floatArray - The new coordinate data. Its size must be a multiple of
2, 3 or 4 depending on texCoordSet format.
public void setTextureCoordinates(int unit,
int vertexIndex,
int texCoordSize,
float[] floatArray,
int startIndex,
int length)
unit - The coordinates set.vertexIndex - The index of the first vertex to modifytexCoordSize - floatArray - The new coordinate data. Its size must be a multiple of 2.startIndex - length -
public void setTextureCoordinate(int unit,
int vertexIndex,
float s)