|
||||||||||
| 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
public abstract class Geometry
A Geometry contains mesh data. Usually a Appearance is associated to it, both composing a Shape3D
| Nested Class Summary | |
|---|---|
static class |
Geometry.Optimization
|
| Field Summary | |
|---|---|
static int |
BY_REFERENCE
|
static int |
COLORS
|
static int |
COORDINATES
|
protected GeometryDataContainer |
dataContainer
|
static int |
INTERLEAVED
|
static int |
NORMALS
|
static int |
TEXTURE_COORDINATES
|
static int |
VERTEX_ATTRIBUTES
|
| Fields inherited from class org.xith3d.scenegraph.SceneGraphObject |
|---|
XITH3D_USERDATAKEY_OLDUSERDATA |
| Constructor Summary | |
|---|---|
Geometry(org.jagatoo.opengl.enums.GeometryArrayType type,
boolean hasIndex,
int coordsSize,
int vertexCount,
int[] stripVertexCounts,
int indexCount)
|
|
| 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 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 face normals (each orthogonal to its face). |
|
abstract Geometry |
cloneNodeComponent(boolean forceDuplicate)
|
|
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. |
|
org.openmali.vecmath2.Colorf |
getColor(int vertexIndex,
org.openmali.vecmath2.Colorf colorf)
Gets the color of the vertex at the specified index. |
|
void |
getColor(int vertexIndex,
float[] floatArray)
Gets the color of the vertex at the specified index. |
|
GeomNioFloatData |
getColorData()
|
|
float[] |
getColorRefFloat()
|
|
void |
getColors(int vertexIndex,
float[] floatArray)
Gets the color of the vertex at the specified index. |
|
long |
getColorsOffset()
|
|
int |
getColorsSize()
|
|
void |
getCoordinate(int vertexIndex,
float[] floatArray)
|
|
|
getCoordinate(int index,
T 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()
|
|
int |
getMaxVertexCount()
|
|
void |
getNormal(int vertexIndex,
float[] floatArray)
|
|
org.openmali.vecmath2.Vector3f |
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()
|
|
int |
getNumTextureUnits()
|
|
SceneGraphOpenGLReferences |
getOpenGLReference_DL_GeomData()
|
|
SceneGraphOpenGLReferences |
getOpenGLReference_DL_TexCoords()
|
|
SceneGraphOpenGLReferences |
getOpenGLReference_DL()
|
|
Geometry.Optimization |
getOptimization()
|
|
float[] |
getTexCoordRefFloat(int unit)
|
|
GeomNioFloatData |
getTexCoordsData(int unit)
|
|
int |
getTexCoordSetCount()
Deprecated. replaced by getNumTextureUnits() |
|
int[] |
getTexCoordSetMap()
|
|
void |
getTexCoordSetMap(int[] intArray)
Gets the map for texture coordinates to texture units. |
|
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. |
|
|
getTextureCoordinate(int unit,
int vertexIndex,
T texCoord)
Gets the texture coordinate of the vertex at the specified index for the specified coordinates set. |
|
void |
getTextureCoordinates(int unit,
int vertexIndex,
float[] floatArray)
|
|
boolean |
getTriangle(int i0,
int i1,
int i2,
org.openmali.spatial.polygons.Triangle triangle)
Retrieves the the n-th Triangle from the GeometryArray. |
|
org.jagatoo.opengl.enums.GeometryArrayType |
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.TupleNf<?> 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 |
isBoundsDirty()
|
|
boolean |
isInterleaved()
|
|
boolean |
isStrip()
|
|
abstract boolean |
isTriangulatable()
|
|
abstract boolean |
isTriangulated()
|
|
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 |
setBoundsDirty()
Marks this Geometry's bounds dirty. |
|
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)
Directly sets the color data buffer. |
|
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)
Directly sets the coordinates data buffer. |
|
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,
java.util.List<org.openmali.vecmath2.Tuple3f> point3fList)
|
|
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 |
|
void |
setInitialVertexIndex(int initialVertex)
Sets the index of the first vertex which will be rendered from this geometry array. |
|
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)
Directly sets the normals data buffer. |
|
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 |
setOptimization(Geometry.Optimization opt)
Sets this Geometry's Optimization to be used. |
|
void |
setTexCoordData(int unit,
GeomNioFloatData data)
Directly sets the tex-coords data buffer for the guven texture-unit. |
|
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.TexCoordf<?> texCoord)
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.TexCoordf<?>[] texCoordArray)
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.TexCoordf<?>[] texCoordArray,
int startIndex,
int length)
Sets the texture coordinate of the vertex starting at the specified index for the specified coordinates set. |
|
boolean |
setTriangle(int i0,
int i1,
int i2,
org.openmali.spatial.polygons.Triangle triangle)
Applies the the n-th Triangle to the GeometryArray. |
|
boolean |
setTriangle(org.openmali.spatial.polygons.Triangle triangle)
Applies the the n-th Triangle to the GeometryArray. |
|
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.TupleNf<?> 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.TupleNf<?>[] values)
Sets the vertex attributes. |
|
void |
setVertexAttributes(int attribIndex,
int vertexIndex,
org.openmali.vecmath2.TupleNf<?>[] values,
int startIndex,
int length)
Sets the vertex attributes. |
|
java.lang.String |
toString()
|
|
| 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 |
| 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 final GeometryDataContainer dataContainer
| Constructor Detail |
|---|
public Geometry(org.jagatoo.opengl.enums.GeometryArrayType type,
boolean hasIndex,
int coordsSize,
int vertexCount,
int[] stripVertexCounts,
int indexCount)
| Method Detail |
|---|
public final org.jagatoo.opengl.enums.GeometryArrayType getType()
public final boolean isStrip()
true, if this Geometry is a Strippublic final int getFaceSize()
public abstract boolean isTriangulatable()
true, if this Geometry is built of triangles or can at least be interpreted as triangles.public abstract boolean isTriangulated()
true, if this Geometry is built of triangles.public final int getMaxVertexCount()
public int getVertexCount()
getVertexCount in interface org.openmali.spatial.VertexContainer
public boolean getVertex(int i,
org.openmali.vecmath2.Tuple3f pos)
getVertex in interface org.openmali.spatial.VertexContainerpublic final int getVertexFormat()
public final boolean isInterleaved()
true, if this Geometry is constructed by interleaved data
(one ByteBuffer for all data except index).public final boolean hasIndex()
true, if this Geometry has an Index.public final boolean hasColorAlpha()
true, if this geometry's color component has an alpha channel.public final boolean hasFeature(int flag)
true, if this Geometry has the queried feature(s).public void setOptimization(Geometry.Optimization opt)
opt - public final Geometry.Optimization getOptimization()
public void setBoundsDirty()
public final boolean isBoundsDirty()
true, if a bounds update is requested.
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.calculateFaceNormals()public void calculateFaceNormals()
calculateFaceNormals(boolean, Vector3f[], Vector3f[])public void invertNormals()
public final void addData(float[] coordData,
float[] texCoordData,
float[] normalData,
float[] colorData)
public final 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 final void setCoordinateData(GeomNioFloatData data)
data - public final GeomNioFloatData getCoordinatesData()
public final int getCoordinatesSize()
public final long getCoordinatesOffset()
public void setNormalData(GeomNioFloatData data)
data - public final GeomNioFloatData getNormalsData()
public final int getNormalsSize()
public final long getNormalsOffset()
public void setColorData(GeomNioFloatData data)
data - public final GeomNioFloatData getColorData()
public final int getColorsSize()
public final long getColorsOffset()
public void setTexCoordData(int unit,
GeomNioFloatData data)
unit - data - public final GeomNioFloatData getTexCoordsData(int unit)
unit -
public final int getTexCoordSize(int unit)
public final int getNumTextureUnits()
@Deprecated public final int getTexCoordSetCount()
getNumTextureUnits()
public final int[] getTexCoordSetMap()
public final void getTexCoordSetMap(int[] intArray)
intArray - public final long getTexCoordsOffset(int unit)
public final GeomNioFloatData getVertexAttribData(int index)
index -
public final int getVertexAttribSize(int index)
index -
public final long getVertexAttribsOffset(int index)
public final GeomNioFloatData getInterleavedData()
public final void setInitialVertexIndex(int initialVertex)
initialVertex - public final int getInitialVertexIndex()
public void setValidVertexCount(int count)
count - public final int getValidVertexCount()
public final void setCoordinate(int vertexIndex,
float[] floatArray)
public final 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 final 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 final void setCoordinate(int vertexIndex,
org.openmali.vecmath2.Tuple3f point3f)
vertexIndex - The index of the vertex to modifypoint3f - The new coordinates
public final 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 final void setCoordinates(int vertexIndex,
org.openmali.vecmath2.Tuple3f[] point3fArray)
vertexIndex - The index of the first vertex to modifypoint3fArray - The new coordinates.
public final 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 final void setCoordinates(int vertexIndex,
java.util.List<org.openmali.vecmath2.Tuple3f> point3fList)
public final <T extends org.openmali.vecmath2.Tuple3f> T getCoordinate(int index,
T point)
public final void getCoordinate(int vertexIndex,
float[] floatArray)
public final void getCoordinates(int vertexIndex,
org.openmali.vecmath2.Tuple3f[] point3fArray)
public final void getCoordinates(int vertexIndex,
float[] floatArray)
public final boolean hasNormals()
true, if this geometry contains normal data.
public final 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 final 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 final 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 final void setNormal(int vertexIndex,
org.openmali.vecmath2.Vector3f vector3f)
vertexIndex - THe index of the vertex to modifyvector3f - The new normal
public final 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 final void setNormals(int vertexIndex,
org.openmali.vecmath2.Vector3f[] vector3fArray)
vertexIndex - The index of the first vertex to modifyvector3fArray - The new normals
public final 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 final org.openmali.vecmath2.Vector3f getNormal(int index,
org.openmali.vecmath2.Vector3f normal)
public final void getNormal(int vertexIndex,
float[] floatArray)
public final void getNormals(int vertexIndex,
float[] floatArray)
public final 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()
true, if this Geometry contains color data.
public final 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 final 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 final 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 final void setColor(int vertexIndex,
org.openmali.vecmath2.Colorf colorf)
vertexIndex - The index of the vertex to modifycolorf - The new color.
public final void setColor(int vertexIndex,
float r,
float g,
float b)
vertexIndex - The index of the vertex to modifyr - g - b -
public final void setColor(int vertexIndex,
float r,
float g,
float b,
float a)
vertexIndex - The index of the vertex to modifyr - g - b - a -
public final void setColors(int vertexIndex,
org.openmali.vecmath2.Colorf[] colorfArray)
vertexIndex - The index of the first vertex to modify.colorfArray - The new color values.
public final 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 final org.openmali.vecmath2.Colorf getColor(int vertexIndex,
org.openmali.vecmath2.Colorf colorf)
vertexIndex - The index of the vertex to modifycolorf - The new color.
public final void getColor(int vertexIndex,
float[] floatArray)
vertexIndex - The index of the vertex to modifyfloatArray -
public final void getColors(int vertexIndex,
float[] floatArray)
vertexIndex - The index of the vertex to modifycolorf - The new color.public final boolean hasTextureCoordinates()
true, if this Geometry contains texture-coordinate data (for any texture-unit).public final boolean hasTextureCoordinates(int unit)
true, if this Geometry contains texture-coordinate data (for the given texture-unit).
public final 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 final 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 final 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 final void setTextureCoordinate(int unit,
int vertexIndex,
float s)
unit - The coordinates set.vertexIndex - The index of the vertex to modifys -
public final void setTextureCoordinate(int unit,
int vertexIndex,
float s,
float t)
unit - The coordinates set.vertexIndex - The index of the vertex to modifys - t -
public final void setTextureCoordinate(int unit,
int vertexIndex,
float s,
float t,
float r)
unit - The coordinates set.vertexIndex - The index of the vertex to modifys - t - r -
public final void setTextureCoordinate(int unit,
int vertexIndex,
float s,
float t,
float r,
float q)
unit - The coordinates set.vertexIndex - The index of the vertex to modifys - t - r - q -
public final void setTextureCoordinate(int unit,
int vertexIndex,
org.openmali.vecmath2.TexCoordf<?> texCoord)
unit - The coordinates set.vertexIndex - The index of the vertex to modifytexCoord -
public final void setTextureCoordinates(int unit,
int vertexIndex,
org.openmali.vecmath2.TexCoordf<?>[] texCoordArray)
unit - The coordinates set.vertexIndex - The index of the first vertex to modifytexCoordArray -
public final void setTextureCoordinates(int unit,
int vertexIndex,
org.openmali.vecmath2.TexCoordf<?>[] texCoordArray,
int startIndex,
int length)
unit - The coordinates set.vertexIndex - The index of the first vertex to modifytexCoordArray - startIndex - length -
public final void getTextureCoordinate(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 final void getTextureCoordinates(int unit,
int vertexIndex,
float[] floatArray)
public final <T extends org.openmali.vecmath2.TexCoordf<?>> T getTextureCoordinate(int unit,
int vertexIndex,
T texCoord)
unit - The coordinates set.vertexIndex - The index of the vertex to modifytexCoord - public final boolean hasVertexAttributes()
true, if this Geometry contains vertex-attribute data.public final boolean hasVertexAttributes(int attribIndex)
attribIndex -
true, if this Geometry contains vertex-attribute data at the given index.public final int getVertexAttributesCount()
public final void setVertexAttribute(int attribIndex,
int vertexIndex,
float[] floatArray)
attribIndex - The attributes set.vertexIndex - The index of the vertex to modifyfloatArray - The new attribute data. Its size must be 1, 2, 3 or 4.
public final void setVertexAttributes(int attribIndex,
int vertexIndex,
float[] values,
int attribSize)
attribIndex - The attributes set.vertexIndex - The index of the first vertex to modifyvalues - The new attribute data.attribSize - the size of each attribute element (1, 2, 3, 4)
public final void setVertexAttributes(int attribIndex,
int vertexIndex,
float[] values,
int attribsSize,
int startIndex,
int length)
attribIndex - The attributes set.vertexIndex - The index of the first vertex to modifyvalues - The new attribute data.attribsSize - (1, 2, 3, 4)startIndex - length -
public final void setVertexAttribute(int attribIndex,
int vertexIndex,
float value)
attribIndex - The attributes set.vertexIndex - The index of the vertex to modifyvalue - The new attribute data.
public final void setVertexAttribute(int attribIndex,
int vertexIndex,
org.openmali.vecmath2.TupleNf<?> value)
attribIndex - The attributes set.vertexIndex - The index of the vertex to modifyvalue - The new attribute data.
public final void setVertexAttributes(int attribIndex,
int vertexIndex,
org.openmali.vecmath2.TupleNf<?>[] values)
attribIndex - The attributes set.vertexIndex - The index of the first vertex to modifyvalues - The new attribute data.
public final void setVertexAttributes(int attribIndex,
int vertexIndex,
org.openmali.vecmath2.TupleNf<?>[] values,
int startIndex,
int length)
attribIndex - The attributes set.vertexIndex - The index of the first vertex to modifyvalues - The new attribute data.startIndex - length -
public final void getVertexAttribute(int attribIndex,
int vertexIndex,
float[] floatArray)
public final void getVertexAttributes(int attribIndex,
int vertexIndex,
float[] floatArray)
public final float getVertexAttribute(int attribIndex,
int vertexIndex)
attribIndex - The attributes set.vertexIndex - The index of the vertex to modify
public final void getVertexAttribute(int attribIndex,
int vertexIndex,
org.openmali.vecmath2.TupleNf<?> value)
attribIndex - The attributes set.vertexIndex - The index of the vertex to modifyvalue - The buffer for the attribute data.
public final boolean setTriangle(int i0,
int i1,
int i2,
org.openmali.spatial.polygons.Triangle triangle)
i0 - the first triangle's vertex-indexi1 - the second triangle's vertex-indexi2 - the third triangle's vertex-indextriangle -
public final boolean setTriangle(org.openmali.spatial.polygons.Triangle triangle)
triangle -
public final boolean getTriangle(int i0,
int i1,
int i2,
org.openmali.spatial.polygons.Triangle triangle)
i0 - the first triangle's vertex-indexi1 - the second triangle's vertex-indexi2 - the third triangle's vertex-indextriangle -
public final float[] getCoordRefFloat()
public final float[] getColorRefFloat()
public final float[] getNormalRefFloat()
public final float[] getTexCoordRefFloat(int unit)
public final SceneGraphOpenGLReferences getOpenGLReference_DL_GeomData()
public final SceneGraphOpenGLReferences getOpenGLReference_DL_TexCoords()
public final SceneGraphOpenGLReferences getOpenGLReference_DL()
protected void finalize()
finalize in class java.lang.Objectpublic void freeOpenGLResources(CanvasPeer canvasPeer)
freeOpenGLResources in class NodeComponent
protected void duplicateNodeComponent(NodeComponent original,
boolean forceDuplicate)
duplicateNodeComponent in class NodeComponent
public final void makeInterleaved(int features,
boolean colorAlpha,
int[] tuSizes,
int[] vaSizes)
features - colorAlpha - tuSizes - the sizes of the texture-units (may be null, if not contained in the features mask)vaSizes - the sizes of the vertex-arrays (may be null, if not contained in the features mask)public final void makeInterleaved()
public java.lang.String toString()
toString in class SceneGraphObjectpublic abstract Geometry cloneNodeComponent(boolean forceDuplicate)
cloneNodeComponent in class NodeComponent
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||