|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xith3d.utility.geometry.GeometryInfo
public class GeometryInfo
This class allows for optimalization of indexed geometry. In most cases it will be filled with GeometryCreator.fillGeometryInfo, processed and result geometry will be retrieved. Exact way for creating renderer-specific geometry should be implemented in subclasses of this class.
| Field Summary | |
|---|---|
protected int[] |
smoothGroups
|
protected int |
state
|
protected static int |
STATE_MERGED
|
protected static int |
STATE_SPLIT
|
protected static int |
STATE_UNKNOWN
|
protected int[] |
triangles
|
protected org.xith3d.utility.geometry.VertexData[] |
vertices
|
| Constructor Summary | |
|---|---|
GeometryInfo()
Constructs new GeometryInfo |
|
| Method Summary | |
|---|---|
int[] |
createContinousStrip()
Create continous triangle strip with separate substrips connected by degenerate triangles. |
int |
getVertexCacheSize()
|
void |
optimizeTrianglesForCache()
This method reorders face indices to fit well into vertex cache of GPU. |
void |
recalculateFlatNormals()
This method computes normal for each face in flat mode - every vertex is duplicated for each face and assigned separate normal belonging to this face. |
void |
recalculateSmoothGroupNormals()
This method computes smoothened normals for each vertex. |
void |
setVertexCacheSize(int vertexCacheSize)
This method sets size of vertex cache on gpu for which strips/triangle lists should be optimized. |
void |
unweldVertices()
Duplicate vertex data for each face, so it is not shared between them. |
void |
weldVertices()
Find vertices with same parameters and merge them into one. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final int STATE_UNKNOWN
protected static final int STATE_SPLIT
protected static final int STATE_MERGED
protected org.xith3d.utility.geometry.VertexData[] vertices
protected int[] triangles
protected int[] smoothGroups
protected int state
| Constructor Detail |
|---|
public GeometryInfo()
| Method Detail |
|---|
public void recalculateFlatNormals()
public void recalculateSmoothGroupNormals()
public void weldVertices()
unweldVertices()public void unweldVertices()
weldVertices()public void optimizeTrianglesForCache()
setVertexCacheSize(int)public int[] createContinousStrip()
public int getVertexCacheSize()
public void setVertexCacheSize(int vertexCacheSize)
vertexCacheSize - The vertexCacheSize to set.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||