org.xith3d.scenegraph
Class GeomIndexedContainer
java.lang.Object
org.xith3d.scenegraph.SceneGraphObject
org.xith3d.scenegraph.NodeComponent
org.xith3d.scenegraph.Geometry
org.xith3d.scenegraph.GeomContainer
org.xith3d.scenegraph.GeometryArray
org.xith3d.scenegraph.GeomIndexedContainer
- All Implemented Interfaces:
- org.jagatoo.datatypes.NamableObject, org.jagatoo.datatypes.NamedObject, org.openmali.spatial.IndexContainer, org.openmali.spatial.VertexContainer
- Direct Known Subclasses:
- IndexedGeometryArray
public abstract class GeomIndexedContainer
- extends GeometryArray
- implements org.openmali.spatial.IndexContainer
Builds indexed geometry. The vertex inforamtion is still stored the regular way,
but the vertices drawn are those specified by the index. A single index is used for
all color, tex, normal coords. So if you have a vertex with the same coordinate,
but with different tex coords you need to build a new vertex and reference that
via the index. This is so that the speed of using only one coordinate is used.
| Fields inherited from class org.xith3d.scenegraph.GeomContainer |
BY_REFERENCE, colors, COLORS, COORDINATES, coords, faceSize, INTERLEAVED, interleavedData, normals, NORMALS, numVertices, texCoords, TEXTURE_COORDINATES, VERTEX_ATTRIBUTES, vertexAttribs |
| Methods inherited from class org.xith3d.scenegraph.GeomContainer |
addData, addData, addData, calculateFaceNormals, calculateFaceNormals, finalize, flipNormals, freeOpenGLResources, getColor, getColor, getColorData, getColorRefFloat, getColors, getColorsOffset, getColorsSize, getCoordinate, getCoordinate, getCoordinates, getCoordinates, getCoordinatesData, getCoordinatesOffset, getCoordinatesSize, getCoordRefFloat, getFaceSize, getInitialVertexIndex, getInterleavedData, getNormal, getNormal, getNormalRefFloat, getNormals, getNormals, getNormalsData, getNormalsOffset, getNormalsSize, getOpenGLReference_DL_GeomData, getOpenGLReference_DL_TexCoords, getOpenGLReference_DL, getTexCoordRefFloat, getTexCoordsData, getTexCoordSetCount, getTexCoordSetMap, getTexCoordSetMap, getTexCoordSize, getTexCoordsOffset, getTextureCoordinate, getTextureCoordinate, getTextureCoordinate, getTextureCoordinate, getTextureCoordinate, getTextureCoordinates, getType, getValidVertexCount, getVertex, getVertexAttribData, getVertexAttribSize, getVertexAttribsOffset, getVertexAttribute, getVertexAttribute, getVertexAttribute, getVertexAttribute, getVertexAttribute, getVertexAttributes, getVertexAttributesCount, getVertexCount, getVertexFormat, hasColorAlpha, hasColors, hasFeature, hasIndex, hasNormals, hasTextureCoordinates, hasTextureCoordinates, hasVertexAttributes, hasVertexAttributes, invertNormals, isInterleaved, isStrip, makeInterleaved, makeInterleaved, setColor, setColor, setColor, setColor, setColorData, setColors, setColors, setColors, setColors, setCoordinate, setCoordinate, setCoordinate, setCoordinateData, setCoordinates, setCoordinates, setCoordinates, setCoordinates, setDataBuffers, setInitialVertexIndex, setNioBuffers, setNormal, setNormal, setNormal, setNormalData, setNormals, setNormals, setNormals, setNormals, setTexCoordData, setTextureCoordinate, setTextureCoordinate, setTextureCoordinate, setTextureCoordinate, setTextureCoordinate, setTextureCoordinate, setTextureCoordinate, setTextureCoordinate, setTextureCoordinates, setTextureCoordinates, setTextureCoordinates, setTextureCoordinates, setTextureCoordinates, setTextureCoordinates, setTextureCoordinates, setTextureCoordinates, setValidVertexCount, setVertexAttribute, setVertexAttribute, setVertexAttribute, setVertexAttribute, setVertexAttribute, setVertexAttributes, setVertexAttributes, setVertexAttributes, setVertexAttributes, setVertexAttributes, setVertexAttributes, setVertexAttributes, setVertexAttributes, update, updateData |
| 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 |
initialIndexIndex
protected int initialIndexIndex
validIndexCount
protected int validIndexCount
GeomIndexedContainer
public GeomIndexedContainer(GeomContainer.Type type,
int coordsSize,
int vertexCount,
int[] stripVertexCounts,
int indexCount)
setIndex
public void setIndex(int[] indices)
setIndex
public void setIndex(int i,
int idx)
getIndexCount
public final int getIndexCount()
-
- Specified by:
getIndexCount in interface org.openmali.spatial.IndexContainer
getIndex
public final int[] getIndex()
-
- Specified by:
getIndex in interface org.openmali.spatial.IndexContainer
getIndex
public final int getIndex(int i)
-
- Specified by:
getIndex in interface org.openmali.spatial.IndexContainer
getIndexData
public final GeomNioIntData getIndexData()
duplicateNodeComponent
protected void duplicateNodeComponent(NodeComponent original,
boolean forceDuplicate)
-
- Overrides:
duplicateNodeComponent in class GeometryArray