|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectGeomRep.Face
public class Face
Face class.
This class describes face as an array of vertex numbers. Those vertex numbers are indices of vertices stored in an array at some other location. This design avoids having to store the entire vertex info multiple times because vertices are shared between several faces. The order of face vertices must be counter-clockwise or clockwise.
Field Summary | |
---|---|
private boolean |
bBoundaryFace
Is the face on boundary? |
private int[] |
mFaceVertices
Vertex indices forming the face. |
private float[] |
mUnitNormal
Face unit normal. |
Constructor Summary | |
---|---|
Face()
Class constructor. |
|
Face(int vtNum)
Class constructor. |
Method Summary | |
---|---|
void |
ComputeFaceNormals(Vertex[] vertexArr)
Compute face normal for the face. |
boolean |
GetBoundaryFlag()
Find out if the face is on boundary. |
float[] |
GetFaceNormal()
Get face normal (unit vector). |
int |
GetNumVertices()
Get the number of vertices in this face. |
int |
GetVertex(int num)
Get the face vertex at a position in the face. |
void |
SetBoundaryFlag(boolean onBdry)
Set the boundary flag for the face. |
void |
SetVertex(int num,
int vtNum)
Set the num vertex of face to vtNum. |
void |
SetVertexNum(int num)
Set the number of face vertices. |
void |
SetVertices(int[] vts)
Set the face vertices. |
void |
SetVertices(int[] vts,
int num)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private int[] mFaceVertices
private float[] mUnitNormal
private boolean bBoundaryFace
Constructor Detail |
---|
public Face()
public Face(int vtNum)
vtNum
- Number of vertices forming the face.Method Detail |
---|
public boolean GetBoundaryFlag()
public void SetBoundaryFlag(boolean onBdry)
onBdry
- true if face on boundary, false otherwise.public int GetNumVertices()
public void ComputeFaceNormals(Vertex[] vertexArr) throws java.lang.ArrayIndexOutOfBoundsException
vertexArr
- Array of vertices into which the face indexes.
java.lang.ArrayIndexOutOfBoundsException
- if an array index exceeds the
number of elements in vertexArr.public float[] GetFaceNormal()
public void SetVertices(int[] vts)
vts
- Array of vertex numbers forming the face.public void SetVertices(int[] vts, int num)
public void SetVertexNum(int num)
num
- Number of face vertices.public int GetVertex(int num) throws java.lang.ArrayIndexOutOfBoundsException
num
- Index in the vertex array (@see mFaceVertices)
java.lang.ArrayIndexOutOfBoundsException
public void SetVertex(int num, int vtNum) throws java.lang.ArrayIndexOutOfBoundsException
num
- Index in the vertex array (@see mFaceVertices)vtNum
- Vertex number.
java.lang.ArrayIndexOutOfBoundsException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |