| Modifier and Type | Class and Description |
|---|---|
static class |
Triangle.Vertex
A
Vertex represents a vertex in a Triangle. |
| Modifier and Type | Field and Description |
|---|---|
Triangle.Vertex |
a
The
Triangle.Vertex A. |
Triangle.Vertex |
b
The
Triangle.Vertex B. |
Triangle.Vertex |
c
The
Triangle.Vertex C. |
static int |
RELATIVE_OFFSET_A_POSITION_OFFSET
The relative offset of the A Position Offset parameter in the
float array. |
static int |
RELATIVE_OFFSET_A_SURFACE_NORMAL_OFFSET
The relative offset of the A Surface Normal Offset parameter in the
float array. |
static int |
RELATIVE_OFFSET_A_TEXTURE_COORDINATES_OFFSET
The relative offset of the A Texture Coordinates Offset parameter in the
float array. |
static int |
RELATIVE_OFFSET_B_POSITION_OFFSET
The relative offset of the B Position Offset parameter in the
float array. |
static int |
RELATIVE_OFFSET_B_SURFACE_NORMAL_OFFSET
The relative offset of the B Surface Normal Offset parameter in the
float array. |
static int |
RELATIVE_OFFSET_B_TEXTURE_COORDINATES_OFFSET
The relative offset of the B Texture Coordinates Offset parameter in the
float array. |
static int |
RELATIVE_OFFSET_C_POSITION_OFFSET
The relative offset of the C Position Offset parameter in the
float array. |
static int |
RELATIVE_OFFSET_C_SURFACE_NORMAL_OFFSET
The relative offset of the C Surface Normal Offset parameter in the
float array. |
static int |
RELATIVE_OFFSET_C_TEXTURE_COORDINATES_OFFSET
The relative offset of the C Texture Coordinates Offset parameter in the
float array. |
static int |
SIZE
The size of a
Triangle in the float array. |
static int |
TYPE
The type number associated with a
Triangle. |
| Constructor and Description |
|---|
Triangle(Triangle.Vertex a,
Triangle.Vertex b,
Triangle.Vertex c)
Constructs a new
Triangle instance. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object object)
Compares
object to this Triangle instance for equality. |
Triangle.Vertex |
getA()
Returns the
Triangle.Vertex denoted by A. |
Triangle.Vertex |
getB()
Returns the
Triangle.Vertex denoted by B. |
Triangle.Vertex |
getC()
Returns the
Triangle.Vertex denoted by C. |
int |
getSize()
Returns the size of this
Triangle instance. |
int |
getType()
Returns the type of this
Triangle instance. |
int |
hashCode()
Returns a hash code for this
Triangle instance. |
static Point3F |
maximum(java.util.List<Triangle> triangles)
|
static Point3F |
minimum(java.util.List<Triangle> triangles)
|
Triangle |
rotate(Vector3F w,
Vector3F v)
Rotates this
Triangle instance. |
Triangle |
scale(float s)
Scales this
Triangle instance. |
java.lang.String |
toString()
Returns a
String representation of this Triangle instance. |
Triangle |
translate(float x,
float y,
float z)
Translates this
Triangle instance. |
Triangle |
translateX(float x)
Translates this
Triangle instance in the X-direction. |
Triangle |
translateY(float y)
Translates this
Triangle instance in the Y-direction. |
Triangle |
translateZ(float z)
Translates this
Triangle instance in the Z-direction. |
public static final int RELATIVE_OFFSET_A_POSITION_OFFSET
float array. The value is 0.public static final int RELATIVE_OFFSET_A_SURFACE_NORMAL_OFFSET
float array. The value is 3.public static final int RELATIVE_OFFSET_A_TEXTURE_COORDINATES_OFFSET
float array. The value is 6.public static final int RELATIVE_OFFSET_B_POSITION_OFFSET
float array. The value is 1.public static final int RELATIVE_OFFSET_B_SURFACE_NORMAL_OFFSET
float array. The value is 4.public static final int RELATIVE_OFFSET_B_TEXTURE_COORDINATES_OFFSET
float array. The value is 7.public static final int RELATIVE_OFFSET_C_POSITION_OFFSET
float array. The value is 2.public static final int RELATIVE_OFFSET_C_SURFACE_NORMAL_OFFSET
float array. The value is 5.public static final int RELATIVE_OFFSET_C_TEXTURE_COORDINATES_OFFSET
float array. The value is 8.public static final int SIZE
Triangle in the float array. The size is 9.public static final int TYPE
Triangle. The number is 2.public final Triangle.Vertex a
Triangle.Vertex A.public final Triangle.Vertex b
Triangle.Vertex B.public final Triangle.Vertex c
Triangle.Vertex C.public Triangle(Triangle.Vertex a, Triangle.Vertex b, Triangle.Vertex c)
Triangle instance.
If either a, b or c are null, a NullPointerException will be thrown.
a - a Triangle.Vertex denoted by Ab - a Vertex denoted by Bc - a Vertex denoted by Cjava.lang.NullPointerException - thrown if, and only if, either a, b or c are nullpublic java.lang.String toString()
String representation of this Triangle instance.toString in class java.lang.ObjectString representation of this Triangle instancepublic Triangle rotate(Vector3F w, Vector3F v)
Triangle instance.
Returns a new rotated version of this Triangle instance.
If either w or v are null, a NullPointerException will be thrown.
w - a Vector3Fv - a Vector3FTriangle instancejava.lang.NullPointerException - thrown if, and only if, either w or v are nullpublic Triangle scale(float s)
Triangle instance.
Returns a new scaled version of this Triangle instance.
s - the scaling factorTriangle instancepublic Triangle translate(float x, float y, float z)
Triangle instance.
Returns a new translated version of this Triangle instance.
x - the amount to translate in the X-directiony - the amount to translate in the Y-directionz - the amount to translate in the Z-directionTriangle instancepublic Triangle translateX(float x)
Triangle instance in the X-direction.
Returns a new translated version of this Triangle instance.
x - the amount to translate in the X-directionTriangle instancepublic Triangle translateY(float y)
Triangle instance in the Y-direction.
Returns a new translated version of this Triangle instance.
y - the amount to translate in the Y-directionTriangle instancepublic Triangle translateZ(float z)
Triangle instance in the Z-direction.
Returns a new translated version of this Triangle instance.
z - the amount to translate in the Z-directionTriangle instancepublic Triangle.Vertex getA()
Triangle.Vertex denoted by A.Vertex denoted by Apublic Triangle.Vertex getB()
Triangle.Vertex denoted by B.Vertex denoted by Bpublic Triangle.Vertex getC()
Triangle.Vertex denoted by C.Vertex denoted by Cpublic boolean equals(java.lang.Object object)
object to this Triangle instance for equality.
Returns true if, and only if, object is an instance of Triangle, and their respective values are equal, false otherwise.
equals in class java.lang.Objectobject - the Object to compare to this Triangle instance for equalitytrue if, and only if, object is an instance of Triangle, and their respective values are equal, false otherwisepublic int getSize()
Triangle instance.public int getType()
Triangle instance.public int hashCode()
Triangle instance.hashCode in class java.lang.ObjectTriangle instancepublic static Point3F maximum(java.util.List<Triangle> triangles)
Point3F from the positions of the Triangles in the List triangles.
If either triangles or any of its elements are null, a NullPointerException will be thrown.
triangles - a List with TrianglesPoint3 from the positions of the Triangles in the List trianglesjava.lang.NullPointerException - thrown if, and only if, either triangles or any of its elements are nullpublic static Point3F minimum(java.util.List<Triangle> triangles)
Point3F from the positions of the Triangles in the List triangles.
If either triangles or any of its elements are null, a NullPointerException will be thrown.
triangles - a List with TrianglesPoint3 from the positions of the Triangles in the List trianglesjava.lang.NullPointerException - thrown if, and only if, either triangles or any of its elements are null