|
||||||||||
| 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 Utility class.
| Constructor Summary | |
|---|---|
GeomFactory()
|
|
| Method Summary | |
|---|---|
protected static int |
calculateFeatures(org.openmali.vecmath2.Tuple3f[] coords,
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)
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 Geometry |
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(Geometry 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(Geometry ga)
ga - the Geometry whose vertices are to be swappedpublic static int getFeaturesFromAppearance(Appearance app)
Appearance, that are at least
necessary to handle this Appearance.
app - the Appearance from which to retrieve the features
public static int getTexCoordsSize(Appearance app)
Appearance, that are at least
necessary to handle this Appearance.
app - the Appearance from which to retrieve the features
public static org.openmali.vecmath2.Vector3f[] generateNaiveNormals(org.openmali.vecmath2.Tuple3f[] vertices)
vertices - the vertices to generate the normals from
public static org.openmali.vecmath2.TexCoord2f[] generateTexCoords2(org.openmali.vecmath2.Tuple3f[] vertices)
vertices - the vertices from which to generate the texture coordinates
public static org.openmali.vecmath2.TexCoord3f[] generateTexCoords3(org.openmali.vecmath2.Tuple3f[] vertices)
vertices - the vertices from which to generate the texture coordinates
public static org.openmali.vecmath2.Colorf[] generateColors(boolean alpha,
org.openmali.vecmath2.Tuple3f[] coords)
alpha - the flag to indicate whether to set the alpha channel to 0coords - the coordinates from which to generate the colors
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)
TriangleArray.
vertices - normals - colors - texCoords2 - features - colorAlpha - texCoordsSize -
TriangleArrayprotected static TriangleArray createFullFeaturedTriangleArray(GeometryConstruct[] geoms)
TriangleArray.
geoms - the array of GeometryConstructs to build it from
TriangleArray just created
protected static int calculateFeatures(org.openmali.vecmath2.Tuple3f[] coords,
org.openmali.vecmath2.Vector3f[] normals,
org.openmali.vecmath2.Colorf[] colors,
org.openmali.vecmath2.TexCoord2f[] texCoords2,
org.openmali.vecmath2.TexCoord3f[] texCoords3)
coords - array of Tuple3f coordinatesnormals - array of normals coordinatescolors - array of colorstexCoords2 - array of TexCoord2f texture coordinatestexCoords3 - array of TexCoord3f texture coordinates
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)
TriangleArray.
vertices - array of Tuple3f verticesnormals - array of normals coordinatescolors - array of colorstexCoords2 - array of TexCoord2f texture coordinatestexCoords3 - array of TexCoord3f texture coordinates
TriangleArraypublic static TriangleArray createTriangleArray(GeometryConstruct geomConstruct)
TriangleArray.
geomConstruct - the geometry construction data to use
TriangleArray
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)
IndexedTriangleArray.
vertices - array of Tuple3f verticesindices - the indices to usenormals - array of normals coordinatescolors - array of colorstexCoords2 - array of TexCoord2f texture coordinatestexCoords3 - array of TexCoord3f texture coordinates
IndexedTriangleArraypublic static IndexedTriangleArray createIndexedTriangleArray(GeometryConstruct geomConstruct)
IndexedTriangleArray.
geomConstruct - the geometry construction data to use
IndexedTriangleArray
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)
TriangleStripArray.
vertices - array of Tuple3f verticesnormals - array of normals coordinatescolors - array of colorstexCoords2 - array of TexCoord2f texture coordinatestexCoords3 - array of TexCoord3f texture coordinatesstripLengths - array of strip lengths
TriangleStripArraypublic static TriangleStripArray createTriangleStripArray(GeometryConstruct geomConstruct)
TriangleStripArray.
geomConstruct - the geometry construction data to use
TriangleStripArray
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)
IndexedTriangleStripArray.
vertices - array of Tuple3f verticesindices - the indices to usenormals - array of normals coordinatescolors - array of colorstexCoords2 - array of TexCoord2f texture coordinatestexCoords3 - array of TexCoord3f texture coordinatesstripLengths - array of strip lengths
IndexedTriangleStripArraypublic static IndexedTriangleStripArray createIndexedTriangleStripArray(GeometryConstruct geomConstruct)
IndexedTriangleStripArray.
geomConstruct - the geometry construction data to use
IndexedTriangleStripArraypublic static Geometry createGeometryArray(GeometryConstruct gc)
public static GeometryConstruct convertGeometryConstructITSA2ITA(GeometryConstruct gcITSA)
GeometryConstruct made for IndexedTriangleStripArray to
one made for IndexedTriangleArrays.GeometryConstructs!
gcITSA - the source GeometryConstruct made for IndexedTriangleStripArrays
GeometryConstruct made for IndexedTriangleArrayspublic static GeometryConstruct convertGeometryConstructITSA2TSA(GeometryConstruct gcITSA)
GeometryConstruct made for IndexedTriangleStripArray to
one made for TriangleStripArrays.GeometryConstructs!
gcITSA - the source GeometryConstruct made for IndexedTriangleStripArrays
GeometryConstruct made for TriangleStripArrayspublic static GeometryConstruct convertGeometryConstructITSA2TA(GeometryConstruct gcITSA)
GeometryConstruct made for IndexedTriangleStripArray to
one made for TriangleArrays.GeometryConstructs!
gcITSA - the source GeometryConstruct made for
IndexedTriangleStripArrays
GeometryConstruct made for TriangleArrayspublic static IndexedTriangleArray createITAfromITSA(GeometryConstruct gcITSA)
IndexedTriangleArray for a Shape3D.
gcITSA - the GeometryConstruct to build it frompublic static TriangleStripArray createTSAfromITSA(GeometryConstruct gcITSA)
TriangleStripArray for a Shape3D.
gcITSA - the GeometryConstruct to build it frompublic static TriangleArray createTAfromITSA(GeometryConstruct gcITSA)
TriangleArray for a Shape3D.
gcITSA - the GeometryConstruct to build it from
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||