| Modifier and Type | Field and Description |
|---|---|
Vector3F |
normal
The normal of this
Vertex instance. |
Point3F |
position
The position of this
Vertex instance. |
Point2F |
textureCoordinates
The texture coordinates of this
Vertex instance. |
| Constructor and Description |
|---|
Vertex(Point2F textureCoordinates,
Point3F position,
Vector3F normal)
Constructs a new
Vertex instance. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object object)
Compares
object to this Vertex instance for equality. |
Vector3F |
getNormal()
Returns the normal of this
Vertex instance. |
Point3F |
getPosition()
Returns the position of this
Vertex instance. |
Point2F |
getTextureCoordinates()
Returns the texture coordinates of this
Vertex instance. |
int |
hashCode()
Returns a hash code for this
Vertex instance. |
Triangle.Vertex |
setPosition(Point3F position)
Sets a new position.
|
java.lang.String |
toString()
Returns a
String representation of this Vertex instance. |
Triangle.Vertex |
transform(Matrix44F m)
|
Triangle.Vertex |
translateX(float x)
Translates this
Vertex in the X-direction. |
Triangle.Vertex |
translateY(float y)
Translates this
Vertex in the Y-direction. |
Triangle.Vertex |
translateZ(float z)
Translates this
Vertex in the Z-direction. |
public final Point2F textureCoordinates
Vertex instance.public final Point3F position
Vertex instance.public final Vector3F normal
Vertex instance.public Vertex(Point2F textureCoordinates, Point3F position, Vector3F normal)
Vertex instance.
If either textureCoordinates, position or normal are null, a NullPointerException will be thrown.
textureCoordinates - the texture coordinates of this Vertexposition - the position of this Vertexnormal - the normal of this Vertexjava.lang.NullPointerException - thrown if, and only if, either textureCoordinates, position or normal are nullpublic boolean equals(java.lang.Object object)
object to this Vertex instance for equality.
Returns true if, and only if, object is an instance of Vertex, and their respective values are equal, false otherwise.
equals in class java.lang.Objectobject - the Object to compare to this Vertex instance for equalitytrue if, and only if, object is an instance of Vertex, and their respective values are equal, false otherwisepublic int hashCode()
Vertex instance.hashCode in class java.lang.ObjectVertex instancepublic Point2F getTextureCoordinates()
Vertex instance.Vertex instancepublic Point3F getPosition()
Vertex instance.Vertex instancepublic java.lang.String toString()
String representation of this Vertex instance.toString in class java.lang.ObjectString representation of this Vertex instancepublic Vector3F getNormal()
Vertex instance.Vertex instancepublic Triangle.Vertex setPosition(Point3F position)
Returns a new Vertex with the new position set.
If position is null, a NullPointerException will be thrown.
position - the new positionVertex with the new position setjava.lang.NullPointerException - thrown if, and only if, position is nullpublic Triangle.Vertex transform(Matrix44F m)
Vertex given the Matrix44F m.
Returns a new Vertex with the transformation performed.
If m is null, a NullPointerException will be thrown.
m - a Matrix44Vertex with the transformation performedjava.lang.NullPointerException - thrown if, and only if, m is nullpublic Triangle.Vertex translateX(float x)
Vertex in the X-direction.
Returns a new Vertex with the translation performed.
x - the amount to translate this Vertex in the X-directionVertex with the translation performedpublic Triangle.Vertex translateY(float y)
Vertex in the Y-direction.
Returns a new Vertex with the translation performed.
y - the amount to translate this Vertex in the Y-directionVertex with the translation performedpublic Triangle.Vertex translateZ(float z)
Vertex in the Z-direction.
Returns a new Vertex with the translation performed.
z - the amount to translate this Vertex in the Z-directionVertex with the translation performed