|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xith3d.utility.geometry.GeometryUtils
public class GeometryUtils
This class provides static utility methods for Geometries.
| Constructor Summary | |
|---|---|
GeometryUtils()
|
|
| Method Summary | |
|---|---|
static void |
computeVertexNormals(Geometry geom)
Computes smooth vertex-indices and writes them into the vertex-coord-data. |
static void |
computeVertexNormals(Geometry geom,
boolean flipNormals)
Computes smooth vertex-indices and writes them into the vertex-coord-data. |
static void |
computeVertexNormals(Geometry geom,
int initialIndex,
int indexCount)
Computes smooth vertex-indices and writes them into the vertex-coord-data. |
static void |
computeVertexNormals(Geometry geom,
int initialIndex,
int indexCount,
boolean flipNormals)
Computes smooth vertex-indices and writes them into the vertex-coord-data. |
static void |
generateTexCoordsXY(Geometry geom,
org.openmali.vecmath2.TexCoord2f[] texCoords)
Generates (flat) TextureCoordinates from the x/y coordinates of the Geometry's vertex-coords. |
static void |
generateTexCoordsXZ(Geometry geom,
org.openmali.vecmath2.TexCoord2f[] texCoords)
Generates (flat) TextureCoordinates from the x/z coordinates of the Geometry's vertex-coords. |
static void |
generateTexCoordsZY(Geometry geom,
org.openmali.vecmath2.TexCoord2f[] texCoords)
Generates (flat) TextureCoordinates from the x/y coordinates of the Geometry's vertex-coords. |
static org.openmali.vecmath2.Vector3f[] |
getNormals(Geometry geom)
Retrieves the normals from a Geometry. |
static void |
getNormals(Geometry geom,
org.openmali.vecmath2.Vector3f[] normals)
Retrieves the normals from a Geometry. |
static org.openmali.vecmath2.Vector3f[] |
getNormals(Shape3D shape)
Retrieves the normals from a Shape3D. |
static org.openmali.vecmath2.Point3f[] |
getVertexCoords(Shape3D shape)
Retrieves the vertices from a Shape3D. |
static org.openmali.vecmath2.Point3f[] |
getVertexCoords(org.openmali.spatial.VertexContainer vc)
Retrieves the vertex coordinates from a VertexContainer. |
static void |
getVertexCoords(org.openmali.spatial.VertexContainer vc,
org.openmali.vecmath2.Tuple3f[] coords)
Retrieves the vertex coordinates from a VertexContainer. |
static IndexedTriangleArray |
mergeGeometriesITA(Geometry... geoms)
Merges multiple Geometries into one big IndexedTriangleArray. |
static TriangleArray |
mergeGeometriesTA(Geometry... geoms)
Merges multiple Geometries into one big TriangleArray. |
static java.util.List<Shape3D> |
split(Shape3D shape,
int maxFacesPerPart)
Splits a shape into several parts. |
static void |
subdivide(Shape3D shape,
int n)
Subdivides a Shape's Geometry into n pieces. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GeometryUtils()
| Method Detail |
|---|
public static final void getVertexCoords(org.openmali.spatial.VertexContainer vc,
org.openmali.vecmath2.Tuple3f[] coords)
vc - the source Geometrycoords - the coords array (must be of correct length)public static final org.openmali.vecmath2.Point3f[] getVertexCoords(org.openmali.spatial.VertexContainer vc)
vc - the source Geometry
public static final org.openmali.vecmath2.Point3f[] getVertexCoords(Shape3D shape)
shape - the source Shape3D
public static final void getNormals(Geometry geom,
org.openmali.vecmath2.Vector3f[] normals)
geom - the source Geometrynormals - the Vector3f array to store normals inpublic static final org.openmali.vecmath2.Vector3f[] getNormals(Geometry geom)
geom - the source Geometry
public static final org.openmali.vecmath2.Vector3f[] getNormals(Shape3D shape)
shape - the source Shape3D
public static TriangleArray mergeGeometriesTA(Geometry... geoms)
geoms -
public static IndexedTriangleArray mergeGeometriesITA(Geometry... geoms)
geoms -
public static java.util.List<Shape3D> split(Shape3D shape,
int maxFacesPerPart)
shape - maxFacesPerPart -
public static void subdivide(Shape3D shape,
int n)
shape - the shape to splitn - The number of times to subdivide the shape
public static final void generateTexCoordsXY(Geometry geom,
org.openmali.vecmath2.TexCoord2f[] texCoords)
geom - the Geometry to get the vertex-coords from and to store the tex-coords totexCoords - the reference array for the texcoords. Can be null.
public static final void generateTexCoordsXZ(Geometry geom,
org.openmali.vecmath2.TexCoord2f[] texCoords)
geom - the Geometry to get the vertex-coords from and to store the tex-coords totexCoords - the reference array for the texcoords. Can be null.
public static final void generateTexCoordsZY(Geometry geom,
org.openmali.vecmath2.TexCoord2f[] texCoords)
geom - the Geometry to get the vertex-coords from and to store the tex-coords totexCoords - the reference array for the texcoords. Can be null.
public static void computeVertexNormals(Geometry geom,
int initialIndex,
int indexCount,
boolean flipNormals)
geom - initialIndex - indexCount - flipNormals -
public static void computeVertexNormals(Geometry geom,
int initialIndex,
int indexCount)
geom - initialIndex - indexCount -
public static void computeVertexNormals(Geometry geom,
boolean flipNormals)
geom - flipNormals - public static void computeVertexNormals(Geometry geom)
geom -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||