org.xith3d.scenegraph
Class GeometryArray

java.lang.Object
  extended by org.xith3d.scenegraph.SceneGraphObject
      extended by org.xith3d.scenegraph.NodeComponent
          extended by org.xith3d.scenegraph.Geometry
              extended by org.xith3d.scenegraph.GeomContainer
                  extended by org.xith3d.scenegraph.GeometryArray
All Implemented Interfaces:
org.jagatoo.datatypes.NamableObject, org.jagatoo.datatypes.NamedObject, org.openmali.spatial.VertexContainer
Direct Known Subclasses:
GeometryStripArray, GeomIndexedContainer, LineArray, PointArray, QuadArray, TriangleArray

public abstract class GeometryArray
extends GeomContainer

GeometryArray defines attributes that apply to .


Nested Class Summary
 
Nested classes/interfaces inherited from class org.xith3d.scenegraph.GeomContainer
GeomContainer.Type
 
Nested classes/interfaces inherited from class org.xith3d.scenegraph.Geometry
Geometry.Optimization
 
Field Summary
 
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
 
Fields inherited from class org.xith3d.scenegraph.SceneGraphObject
XITH3D_USERDATAKEY_OLDUSERDATA
 
Constructor Summary
GeometryArray(GeomContainer.Type type, int coordsSize, int vertexCount, int[] stripVertexCounts)
           
 
Method Summary
abstract  GeometryArray cloneNodeComponent(boolean forceDuplicate)
          
protected  void duplicateNodeComponent(NodeComponent original, boolean forceDuplicate)
          
 boolean getTriangle(int i0, int i1, int i2, org.openmali.spatial.polygons.Triangle triangle)
          Retrieves the the n-th Triangle from the GeometryArray.
 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.
 
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.Geometry
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
 

Constructor Detail

GeometryArray

public GeometryArray(GeomContainer.Type type,
                     int coordsSize,
                     int vertexCount,
                     int[] stripVertexCounts)
Method Detail

setTriangle

public boolean setTriangle(int i0,
                           int i1,
                           int i2,
                           org.openmali.spatial.polygons.Triangle triangle)
Applies the the n-th Triangle to the GeometryArray. This method must be overridden by concrete classes to fix the vertex-index (e.g. for an IndexedTriangleArray)

Parameters:
i0 - the first triangle's vertex-index
i1 - the second triangle's vertex-index
i2 - the third triangle's vertex-index
triangle -
Returns:
true, if the triangle could be applied

setTriangle

public boolean setTriangle(org.openmali.spatial.polygons.Triangle triangle)
Applies the the n-th Triangle to the GeometryArray. This method must be overridden by concrete classes to fix the vertex-index (e.g. for an IndexedTriangleArray)

Parameters:
triangle -
Returns:
true, if the triangle could be applied

getTriangle

public boolean getTriangle(int i0,
                           int i1,
                           int i2,
                           org.openmali.spatial.polygons.Triangle triangle)
Retrieves the the n-th Triangle from the GeometryArray. This method must be overridden by concrete classes to fix the vertex-index (e.g. for an IndexedTriangleArray)

Parameters:
i0 - the first triangle's vertex-index
i1 - the second triangle's vertex-index
i2 - the third triangle's vertex-index
triangle -
Returns:
true, if the triangle could be retrieved

duplicateNodeComponent

protected void duplicateNodeComponent(NodeComponent original,
                                      boolean forceDuplicate)

Overrides:
duplicateNodeComponent in class GeomContainer

cloneNodeComponent

public abstract GeometryArray cloneNodeComponent(boolean forceDuplicate)

Specified by:
cloneNodeComponent in class Geometry