Package mgui.geometry
Class Mesh3D.MeshFace3D
java.lang.Object
mgui.geometry.Mesh3D.MeshFace3D
- All Implemented Interfaces:
java.lang.Comparable<Mesh3D.MeshFace3D>
- Enclosing class:
- Mesh3D
public static class Mesh3D.MeshFace3D extends java.lang.Object implements java.lang.Comparable<Mesh3D.MeshFace3D>
Inner class which defines a face in a mesh
- Author:
- Andrew Reid
-
Field Summary
-
Constructor Summary
Constructors Constructor Description MeshFace3D()
MeshFace3D(int a, int b, int c)
MeshFace3D(Mesh3D.MeshFace3D f)
-
Method Summary
Modifier and Type Method Description int
compareTo(Mesh3D.MeshFace3D f2)
int
getNode(int i)
boolean
hasNode(int i)
boolean
isAdjacent(Mesh3D.MeshFace3D face)
Determines whetherface
shares at least one edge (two vertices) with this face.boolean
isValid()
void
reverse()
void
setIndices(int a, int b, int c)
void
setNode(int i, int index)
int
whichNode(int index)
Returns the index in this face of the vertex atindex
(i.e., in the mesh).Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
A
public int A -
B
public int B -
C
public int C
-
-
Constructor Details
-
MeshFace3D
public MeshFace3D() -
MeshFace3D
public MeshFace3D(int a, int b, int c) -
MeshFace3D
-
-
Method Details
-
setIndices
public void setIndices(int a, int b, int c) throws java.lang.Exception- Throws:
java.lang.Exception
-
getNode
public int getNode(int i) -
whichNode
public int whichNode(int index)Returns the index in this face of the vertex atindex
(i.e., in the mesh). Returns-1
if the vertex is not in this face.- Parameters:
index
-- Returns:
-
setNode
public void setNode(int i, int index) -
hasNode
public boolean hasNode(int i) -
isValid
public boolean isValid() -
reverse
public void reverse() -
isAdjacent
Determines whetherface
shares at least one edge (two vertices) with this face.- Parameters:
face
-- Returns:
-
compareTo
- Specified by:
compareTo
in interfacejava.lang.Comparable<Mesh3D.MeshFace3D>
-