|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.jme.util.geom.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.
| 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 com.jme.util.geom.VertexData[] |
vertices
|
| Constructor Summary | |
GeometryInfo()
Constructs new GeometryInfo |
|
GeometryInfo(TriMesh mesh)
|
|
| Method Summary | |
CompositeMesh |
createChunkedStripArray(java.lang.String name)
Create indexed triangle strip array with geometry contained in this object. |
int[] |
createContinousStrip()
Create continous triangle strip with separate substrips connected by degenerate triangles. |
CompositeMesh |
createContinousStripMesh(java.lang.String name)
Create indexed triangle strip array with geometry contained in this object. |
CompositeMesh |
createMixedArray(java.lang.String name,
int minStripLen,
boolean stitchStrips)
|
TriMesh |
createTrimesh(java.lang.String name)
Create indexed triangle array with geometry contained in this object. |
int |
getVertexCacheSize()
|
GeometryInfo |
optimizeTrianglesForCache()
This method reorders face indices to fit well into vertex cache of GPU. |
GeometryInfo |
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. |
GeometryInfo |
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. |
GeometryInfo |
unweldVertices()
Duplicate vertex data for each face, so it is not shared between them. |
GeometryInfo |
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 com.jme.util.geom.VertexData[] vertices
protected int[] triangles
protected int[] smoothGroups
protected int state
protected static final int STATE_UNKNOWN
protected static final int STATE_SPLIT
protected static final int STATE_MERGED
| Constructor Detail |
public GeometryInfo()
public GeometryInfo(TriMesh mesh)
| Method Detail |
public GeometryInfo recalculateFlatNormals()
public GeometryInfo recalculateSmoothGroupNormals()
public GeometryInfo weldVertices()
unweldVertices()public GeometryInfo unweldVertices()
weldVertices()public GeometryInfo optimizeTrianglesForCache()
setVertexCacheSize(int)public int[] createContinousStrip()
public int getVertexCacheSize()
public void setVertexCacheSize(int vertexCacheSize)
vertexCacheSize - The vertexCacheSize to set.public TriMesh createTrimesh(java.lang.String name)
public CompositeMesh createContinousStripMesh(java.lang.String name)
createContinousStrip()public CompositeMesh createChunkedStripArray(java.lang.String name)
createContinousStrip()
public CompositeMesh createMixedArray(java.lang.String name,
int minStripLen,
boolean stitchStrips)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||