org.xith3d.utility.geometry
Class XithGeometryInfo

java.lang.Object
  extended by org.xith3d.utility.geometry.GeometryInfo
      extended by org.xith3d.utility.geometry.XithGeometryInfo

public class XithGeometryInfo
extends GeometryInfo

Subclass of GeometryInfo which support creation of xith3d specific geometry types. For methods concerning modification/optimalization of geometry see GeometryInfo

See Also:
Geometry

Field Summary
 
Fields inherited from class org.xith3d.utility.geometry.GeometryInfo
smoothGroups, state, STATE_MERGED, STATE_SPLIT, STATE_UNKNOWN, triangles, vertices
 
Constructor Summary
XithGeometryInfo()
          Creates new empty XithGeometryInfo
 
Method Summary
 IndexedTriangleStripArray createChunkedStripArray(int vertexFormat)
          Create indexed triangle strip array with geometry contained in this object.
 IndexedTriangleStripArray createContinousStripArray(int vertexFormat)
          Create indexed triangle strip array with geometry contained in this object.
 IndexedTriangleArray createIndexedTriangleArray(int vertexFormat)
          Create indexed triangle array with geometry contained in this object.
 TriangleArray createRawTriangleArray(int vertexFormat)
          Create non-indexed, vertex-based triangle array with geometry contained in this object.
 
Methods inherited from class org.xith3d.utility.geometry.GeometryInfo
createContinousStrip, getVertexCacheSize, optimizeTrianglesForCache, recalculateFlatNormals, recalculateSmoothGroupNormals, setVertexCacheSize, unweldVertices, weldVertices
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XithGeometryInfo

public XithGeometryInfo()
Creates new empty XithGeometryInfo

Method Detail

createRawTriangleArray

public TriangleArray createRawTriangleArray(int vertexFormat)
Create non-indexed, vertex-based triangle array with geometry contained in this object.

Parameters:
vertexFormat -
Returns:
the created TriangleArray

createIndexedTriangleArray

public IndexedTriangleArray createIndexedTriangleArray(int vertexFormat)
Create indexed triangle array with geometry contained in this object. It is best to call weldVertices (if needed) and then optimizeTrianglesForCache before calling this method.

Parameters:
vertexFormat -
Returns:
the created IndexedTriangleArray

createContinousStripArray

public IndexedTriangleStripArray createContinousStripArray(int vertexFormat)
Create indexed triangle strip array with geometry contained in this object. It is best to call weldVertices (if needed) before calling this method. Strip array will have one long strip, with substrips connected by degenerate triangles. It uses createContinousStrip method.

Parameters:
vertexFormat -
Returns:
the created IndexedTriangleStripArray
See Also:
GeometryInfo.createContinousStrip()

createChunkedStripArray

public IndexedTriangleStripArray createChunkedStripArray(int vertexFormat)
Create indexed triangle strip array with geometry contained in this object. It is best to call weldVertices (if needed) before calling this method. Strip array will have multiple short strips, possibly even single-triangle, so it is not very fast solution. It is better to create continous strip array or mixed array (when it will be implemented).

Parameters:
vertexFormat -
Returns:
the created IndexedTriangleStripArray
See Also:
GeometryInfo.createContinousStrip()