| Modifier and Type | Field and Description |
|---|---|
static int |
TYPE
The type number associated with a
TriangleMesh. |
| Constructor and Description |
|---|
TriangleMesh(java.util.List<Triangle> triangles)
Constructs a new
TriangleMesh instance. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object object)
Compares
object to this TriangleMesh instance for equality. |
int |
getSize()
Returns the size of this
TriangleMesh instance. |
java.util.List<Triangle> |
getTriangles()
|
int |
getType()
Returns the type of this
TriangleMesh instance. |
int |
hashCode()
Returns a hash code for this
TriangleMesh instance. |
java.lang.String |
toString()
Returns a
String representation of this TriangleMesh instance. |
public static final int TYPE
TriangleMesh. The number is 5.public TriangleMesh(java.util.List<Triangle> triangles)
TriangleMesh instance.
If triangles is null, a NullPointerException will be thrown.
Modifying triangles after this TriangleMesh instance has been created, will not affect it. The List is copied.
triangles - the Triangles to usejava.lang.NullPointerException - thrown if, and only if, triangles is nullpublic java.util.List<Triangle> getTriangles()
List with all Triangles added to this TriangleMesh instancepublic java.lang.String toString()
String representation of this TriangleMesh instance.toString in class java.lang.ObjectString representation of this TriangleMesh instancepublic boolean equals(java.lang.Object object)
object to this TriangleMesh instance for equality.
Returns true if, and only if, object is an instance of TriangleMesh, and their respective values are equal, false otherwise.
equals in class java.lang.Objectobject - the Object to compare to this TriangleMesh instance for equalitytrue if, and only if, object is an instance of TriangleMesh, and their respective values are equal, false otherwisepublic int getSize()
TriangleMesh instance.public int getType()
TriangleMesh instance.public int hashCode()
TriangleMesh instance.hashCode in class java.lang.ObjectTriangleMesh instance