org.xith3d.scenegraph
Class TriangleArray

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
                      extended by org.xith3d.scenegraph.TriangleArray
All Implemented Interfaces:
org.jagatoo.datatypes.NamableObject, org.jagatoo.datatypes.NamedObject, org.openmali.spatial.TriangleContainer, org.openmali.spatial.VertexContainer, org.openmali.spatial.WriteableTriangleContainer

public class TriangleArray
extends GeometryArray
implements org.openmali.spatial.WriteableTriangleContainer

TriangleArray 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
TriangleArray(int vertexCount)
          Constructs an empty TriangleArray object with the specified number of vertices, and vertex format.
TriangleArray(int coordsSize, int vertexCount)
          Constructs an empty TriangleArray object with the specified number of vertices, and vertex format.
 
Method Summary
 TriangleArray cloneNodeComponent(boolean forceDuplicate)
          
protected  void duplicateNodeComponent(NodeComponent original, boolean forceDuplicate)
          
 boolean getTriangle(int i, org.openmali.spatial.polygons.Triangle triangle)
          
 int getTriangleCount()
          
 boolean isTriangulatable()
          
 boolean isTriangulated()
          
 boolean setTriangle(int i, org.openmali.spatial.polygons.Triangle triangle)
          
 
Methods inherited from class org.xith3d.scenegraph.GeometryArray
getTriangle, setTriangle, setTriangle
 
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, 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

TriangleArray

public TriangleArray(int coordsSize,
                     int vertexCount)
Constructs an empty TriangleArray object with the specified number of vertices, and vertex format.

Parameters:
vertexCount -

TriangleArray

public TriangleArray(int vertexCount)
Constructs an empty TriangleArray object with the specified number of vertices, and vertex format.

Parameters:
vertexCount -
Method Detail

isTriangulatable

public final boolean isTriangulatable()

Specified by:
isTriangulatable in class Geometry
Returns:
true, if this Geometry is built of triangles or can at least be interpreted as triangles.

isTriangulated

public final boolean isTriangulated()

Specified by:
isTriangulated in class Geometry
Returns:
true, if this Geometry is built of triangles.

getTriangleCount

public int getTriangleCount()

Specified by:
getTriangleCount in interface org.openmali.spatial.TriangleContainer

setTriangle

public boolean setTriangle(int i,
                           org.openmali.spatial.polygons.Triangle triangle)

Specified by:
setTriangle in interface org.openmali.spatial.WriteableTriangleContainer

getTriangle

public boolean getTriangle(int i,
                           org.openmali.spatial.polygons.Triangle triangle)

Specified by:
getTriangle in interface org.openmali.spatial.TriangleContainer

duplicateNodeComponent

protected void duplicateNodeComponent(NodeComponent original,
                                      boolean forceDuplicate)

Overrides:
duplicateNodeComponent in class GeometryArray

cloneNodeComponent

public TriangleArray cloneNodeComponent(boolean forceDuplicate)

Specified by:
cloneNodeComponent in class GeometryArray