|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Mesh
Instances of this interface define a polygonal mesh
which can be used in MeshVolume
to define a volume. The polygons are obtained through
getPolygon(int, int[], int[])
as index arrays into the
list of vertices which is obtained through getVertex(int, javax.vecmath.Tuple3d)
and the list of normals which is obtained through
getNormal(int, javax.vecmath.Tuple3d)
.
Method Summary | |
---|---|
int |
getMaxEdgeCount()
Returns the maximum number of edges of a single polygon of the mesh. |
void |
getNormal(int index,
Tuple3d out)
Gets the normal vector of normal index . |
int |
getNormalCount()
Returns the number of normals of the mesh. |
int |
getPolygon(int index,
int[] indicesOut,
int[] normalsOut)
Writes the vertex indices of polygon index
to indicesOut and the normal indices to
normalsOut and returns the number of
vertices of the polygon. |
int |
getPolygonCount()
Returns the number of polygons of the mesh. |
void |
getUV(int index,
Tuple2d out)
Gets the uv coordinates of vertex index . |
void |
getVertex(int index,
Tuple3d out)
Gets the spatial vertex coordinates of vertex index . |
int |
getVertexCount()
Returns the number of vertices of the mesh. |
boolean |
isClosed()
Indicates whether this mesh is a closed surface or not. |
boolean |
isPolygonPlanar(int index)
Returns true iff the polygon number
index is planar. |
Method Detail |
---|
int getMaxEdgeCount()
void getNormal(int index, Tuple3d out)
index
.
The normal vector is not necessarily normalized.
index
- normal numberout
- normal vector will be placed in hereint getNormalCount()
int getPolygon(int index, int[] indicesOut, int[] normalsOut)
index
to indicesOut
and the normal indices to
normalsOut
and returns the number of
vertices of the polygon. If the mesh is closed
(see isClosed()
), inside and outside are determined by the
ordering of the vertices: when seen from the outside, vertices have
to be oriented in a counter-clockwise manner. Then also the normal
vectors have to point to the outside.
index
- polygon numberindicesOut
- the vertex indices will be placed in herenormalsOut
- the normal indices will be placed in here
int getPolygonCount()
void getUV(int index, Tuple2d out)
index
.
index
- vertex numberout
- uv coordinates will be placed in herevoid getVertex(int index, Tuple3d out)
index
.
index
- vertex numberout
- vertex coordinates will be placed in hereint getVertexCount()
boolean isClosed()
boolean isPolygonPlanar(int index)
true
iff the polygon number
index
is planar.
index
- polygon number
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |