|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xith3d.scenegraph.primitives.GeomFactory
public class GeomFactory
Geometry Util class
| Constructor Summary | |
|---|---|
GeomFactory()
|
|
| Method Summary | |
|---|---|
protected static int |
calculateFeatures(org.openmali.vecmath2.Tuple3f[] vertices,
org.openmali.vecmath2.Vector3f[] normals,
org.openmali.vecmath2.Colorf[] colors,
org.openmali.vecmath2.TexCoord2f[] texCoords2,
org.openmali.vecmath2.TexCoord3f[] texCoords3)
Calculates the GeometryArray features. |
static GeometryConstruct |
convertGeometryConstructITSA2ITA(GeometryConstruct gcITSA)
Converts a GeometryConstruct made for IndexedTriangleStripArray to one made for IndexedTriangleArrays. |
static GeometryConstruct |
convertGeometryConstructITSA2TA(GeometryConstruct gcITSA)
Converts a GeometryConstruct made for IndexedTriangleStripArray to one made for TriangleArrays. |
static GeometryConstruct |
convertGeometryConstructITSA2TSA(GeometryConstruct gcITSA)
Converts a GeometryConstruct made for IndexedTriangleStripArray to one made for TriangleStripArrays. |
protected static TriangleArray |
createFullFeaturedTriangleArray(GeometryConstruct[] geoms,
int features)
Creates the full-featured TriangleArray. |
static TriangleArray |
createFullFeaturedTriangleArray(org.openmali.vecmath2.Tuple3f[] vertices,
org.openmali.vecmath2.Vector3f[] normals,
org.openmali.vecmath2.Colorf[] colors,
org.openmali.vecmath2.TexCoord2f[] texCoords2,
int features,
boolean colorAlpha,
int texCoordsSize)
Creates the full-featured TriangleArray. |
static GeometryArray |
createGeometryArray(GeometryConstruct gc)
|
static IndexedTriangleArray |
createIndexedTriangleArray(GeometryConstruct geomConstruct)
Creates a IndexedTriangleArray. |
static IndexedTriangleArray |
createIndexedTriangleArray(org.openmali.vecmath2.Tuple3f[] vertices,
int[] indices,
org.openmali.vecmath2.Vector3f[] normals,
org.openmali.vecmath2.Colorf[] colors,
org.openmali.vecmath2.TexCoord2f[] texCoords2,
org.openmali.vecmath2.TexCoord3f[] texCoords3)
Creates an IndexedTriangleArray. |
static IndexedTriangleStripArray |
createIndexedTriangleStripArray(GeometryConstruct geomConstruct)
Creates a IndexedTriangleStripArray. |
static IndexedTriangleStripArray |
createIndexedTriangleStripArray(org.openmali.vecmath2.Tuple3f[] vertices,
int[] indices,
org.openmali.vecmath2.Vector3f[] normals,
org.openmali.vecmath2.Colorf[] colors,
org.openmali.vecmath2.TexCoord2f[] texCoords2,
org.openmali.vecmath2.TexCoord3f[] texCoords3,
int[] stripLengths)
Creates an IndexedTriangleStripArray. |
static IndexedTriangleArray |
createITAfromITSA(GeometryConstruct gcITSA)
Creates an IndexedTriangleArray for a Shape3D. |
static TriangleArray |
createTAfromITSA(GeometryConstruct gcITSA)
Creates a TriangleArray for a Shape3D. |
static TriangleArray |
createTriangleArray(GeometryConstruct geomConstruct)
Creates a TriangleArray. |
static TriangleArray |
createTriangleArray(org.openmali.vecmath2.Tuple3f[] vertices,
org.openmali.vecmath2.Vector3f[] normals,
org.openmali.vecmath2.Colorf[] colors,
org.openmali.vecmath2.TexCoord2f[] texCoords2,
org.openmali.vecmath2.TexCoord3f[] texCoords3)
Creates a TriangleArray. |
static TriangleStripArray |
createTriangleStripArray(GeometryConstruct geomConstruct)
Creates a TriangleStripArray. |
static TriangleStripArray |
createTriangleStripArray(org.openmali.vecmath2.Tuple3f[] vertices,
org.openmali.vecmath2.Vector3f[] normals,
org.openmali.vecmath2.Colorf[] colors,
org.openmali.vecmath2.TexCoord2f[] texCoords2,
org.openmali.vecmath2.TexCoord3f[] texCoords3,
int[] stripLengths)
Creates a TriangleStripArray. |
static TriangleStripArray |
createTSAfromITSA(GeometryConstruct gcITSA)
Creates a TriangleStripArray for a Shape3D. |
static org.openmali.vecmath2.Colorf[] |
generateColors(boolean alpha,
org.openmali.vecmath2.Tuple3f[] coords)
Auto-generates the colors. |
static org.openmali.vecmath2.Vector3f[] |
generateNaiveNormals(org.openmali.vecmath2.Tuple3f[] vertices)
Auto-generates the normals. |
static org.openmali.vecmath2.TexCoord2f[] |
generateTexCoords2(org.openmali.vecmath2.Tuple3f[] vertices)
Auto-generates the texture coordinates. |
static org.openmali.vecmath2.TexCoord3f[] |
generateTexCoords3(org.openmali.vecmath2.Tuple3f[] vertices)
Auto-generates the texture coordinates. |
static int |
getFeaturesFromAppearance(Appearance app)
Retrieves the GeometryArray features from the Appearance, that are at least necessary to handle this Appearance. |
static int |
getTexCoordsSize(Appearance app)
Retrieves the GeometryArray features from the Appearance, that are at least necessary to handle this Appearance. |
static void |
reverseWinding(GeometryArray ga)
Swaps vertex 0 and 2 of each following 3. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GeomFactory()
| Method Detail |
|---|
public static void reverseWinding(GeometryArray ga)
ga - public static int getFeaturesFromAppearance(Appearance app)
app -
public static int getTexCoordsSize(Appearance app)
app -
public static org.openmali.vecmath2.Vector3f[] generateNaiveNormals(org.openmali.vecmath2.Tuple3f[] vertices)
vertices -
public static org.openmali.vecmath2.TexCoord2f[] generateTexCoords2(org.openmali.vecmath2.Tuple3f[] vertices)
vertices -
public static org.openmali.vecmath2.TexCoord3f[] generateTexCoords3(org.openmali.vecmath2.Tuple3f[] vertices)
vertices -
public static org.openmali.vecmath2.Colorf[] generateColors(boolean alpha,
org.openmali.vecmath2.Tuple3f[] coords)
alpha - coords - scale -
public static TriangleArray createFullFeaturedTriangleArray(org.openmali.vecmath2.Tuple3f[] vertices,
org.openmali.vecmath2.Vector3f[] normals,
org.openmali.vecmath2.Colorf[] colors,
org.openmali.vecmath2.TexCoord2f[] texCoords2,
int features,
boolean colorAlpha,
int texCoordsSize)
vertices - normals - colors - texCoords2 - features - colorAlpha - texCoordsSize -
protected static TriangleArray createFullFeaturedTriangleArray(GeometryConstruct[] geoms,
int features)
geoms -
protected static int calculateFeatures(org.openmali.vecmath2.Tuple3f[] vertices,
org.openmali.vecmath2.Vector3f[] normals,
org.openmali.vecmath2.Colorf[] colors,
org.openmali.vecmath2.TexCoord2f[] texCoords2,
org.openmali.vecmath2.TexCoord3f[] texCoords3)
vertices - normals - texCoords2 - texCoords3 - colors -
public static TriangleArray createTriangleArray(org.openmali.vecmath2.Tuple3f[] vertices,
org.openmali.vecmath2.Vector3f[] normals,
org.openmali.vecmath2.Colorf[] colors,
org.openmali.vecmath2.TexCoord2f[] texCoords2,
org.openmali.vecmath2.TexCoord3f[] texCoords3)
vertices - normals - texCoords2 - texCoords3 - colors -
public static TriangleArray createTriangleArray(GeometryConstruct geomConstruct)
geomConstruct -
public static IndexedTriangleArray createIndexedTriangleArray(org.openmali.vecmath2.Tuple3f[] vertices,
int[] indices,
org.openmali.vecmath2.Vector3f[] normals,
org.openmali.vecmath2.Colorf[] colors,
org.openmali.vecmath2.TexCoord2f[] texCoords2,
org.openmali.vecmath2.TexCoord3f[] texCoords3)
vertices - indices - normals - colors - texCoords2 - texCoords3 -
public static IndexedTriangleArray createIndexedTriangleArray(GeometryConstruct geomConstruct)
geomConstruct -
public static TriangleStripArray createTriangleStripArray(org.openmali.vecmath2.Tuple3f[] vertices,
org.openmali.vecmath2.Vector3f[] normals,
org.openmali.vecmath2.Colorf[] colors,
org.openmali.vecmath2.TexCoord2f[] texCoords2,
org.openmali.vecmath2.TexCoord3f[] texCoords3,
int[] stripLengths)
vertices - normals - colors - texCoords2 - texCoords3 - stripLengths -
public static TriangleStripArray createTriangleStripArray(GeometryConstruct geomConstruct)
geomConstruct -
public static IndexedTriangleStripArray createIndexedTriangleStripArray(org.openmali.vecmath2.Tuple3f[] vertices,
int[] indices,
org.openmali.vecmath2.Vector3f[] normals,
org.openmali.vecmath2.Colorf[] colors,
org.openmali.vecmath2.TexCoord2f[] texCoords2,
org.openmali.vecmath2.TexCoord3f[] texCoords3,
int[] stripLengths)
vertices - indices - normals - colors - texCoords2 - texCoords3 - stripLengths -
public static IndexedTriangleStripArray createIndexedTriangleStripArray(GeometryConstruct geomConstruct)
geomConstruct -
public static GeometryArray createGeometryArray(GeometryConstruct gc)
public static GeometryConstruct convertGeometryConstructITSA2ITA(GeometryConstruct gcITSA)
gcITSA - the source GeometryConstruct made for IndexedTriangleStripArrays
public static GeometryConstruct convertGeometryConstructITSA2TSA(GeometryConstruct gcITSA)
gcITSA - the source GeometryConstruct made for IndexedTriangleStripArrays
public static GeometryConstruct convertGeometryConstructITSA2TA(GeometryConstruct gcITSA)
gcITSA - the source GeometryConstruct made for IndexedTriangleStripArrays
public static IndexedTriangleArray createITAfromITSA(GeometryConstruct gcITSA)
gcITSA - the GeometryConstruct to build it frompublic static TriangleStripArray createTSAfromITSA(GeometryConstruct gcITSA)
gcITSA - the GeometryConstruct to build it frompublic static TriangleArray createTAfromITSA(GeometryConstruct gcITSA)
gcITSA - the GeometryConstruct to build it from
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||