public final class OrthoNormalBasis33F
extends java.lang.Object
OrthoNormalBasis33F denotes an orthonormal basis.
This class is immutable and therefore thread-safe.
| Modifier and Type | Field and Description |
|---|---|
Vector3F |
u
A
Vector3F pointing in the U-direction. |
Vector3F |
v
A
Vector3F pointing in the V-direction. |
Vector3F |
w
A
Vector3F pointing in the W-direction. |
| Constructor and Description |
|---|
OrthoNormalBasis33F()
Constructs a new
OrthoNormalBasis33F instance. |
OrthoNormalBasis33F(Point3F eye,
Point3F lookAt)
Constructs a new
OrthoNormalBasis33F instance given eye and lookAt. |
OrthoNormalBasis33F(Point3F eye,
Point3F lookAt,
Vector3F v)
Constructs a new
OrthoNormalBasis33F instance given eye, lookAt and v. |
OrthoNormalBasis33F(Vector3F w)
Constructs a new
OrthoNormalBasis33F instance given w. |
OrthoNormalBasis33F(Vector3F w,
Vector3F v)
Constructs a new
OrthoNormalBasis instance given w and v. |
OrthoNormalBasis33F(Vector3F w,
Vector3F v,
Vector3F u)
Constructs a new
OrthoNormalBasis33F instance given w, v and u. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object object)
Compares
object to this OrthoNormalBasis33F instance for equality. |
OrthoNormalBasis33F |
flipU()
Flips the U-direction.
|
OrthoNormalBasis33F |
flipV()
Flips the V-direction.
|
OrthoNormalBasis33F |
flipW()
Flips the W-direction.
|
Vector3F |
getU()
Returns the
Vector3F pointing in the U-direction. |
Vector3F |
getV()
Returns the
Vector3F pointing in the V-direction. |
Vector3F |
getW()
Returns the
Vector3F pointing in the W-direction. |
int |
hashCode()
Returns a hash code for this
OrthoNormalBasis33F instance. |
OrthoNormalBasis33F |
swapUV()
Swaps the U- and V-directions.
|
OrthoNormalBasis33F |
swapUW()
Swaps the U- and W-directions.
|
OrthoNormalBasis33F |
swapVU()
Swaps the V- and U-directions.
|
OrthoNormalBasis33F |
swapWU()
Swaps the W- and U-directions.
|
OrthoNormalBasis33F |
swapVW()
Swaps the V- and W-directions.
|
OrthoNormalBasis33F |
swapWV()
Swaps the W- and V-directions.
|
java.lang.String |
toString()
Returns a
String representation of this OrthoNormalBasis33F instance. |
OrthoNormalBasis33F |
transform(Matrix44F m)
Performs a transformation.
|
public OrthoNormalBasis33F()
OrthoNormalBasis33F instance.
Calling this constructor is equivalent to the following:
new OrthoNormalBasis33F(Vector3F.z(), Vector3F.y(), Vector3F.x())
public OrthoNormalBasis33F(Point3F eye, Point3F lookAt)
OrthoNormalBasis33F instance given eye and lookAt.
Calling this constructor is equivalent to the following:
new OrthoNormalBasis33F(eye, lookAt, Vector3F.y())
If either eye or lookAt are null, a NullPointerException will be thrown.eye - a Point3F denoting the eye from which the W-direction is computedlookAt - a Point3F used in the computation of the W-directionjava.lang.NullPointerException - thrown if, and only if, either eye or lookAt are nullpublic OrthoNormalBasis33F(Point3F eye, Point3F lookAt, Vector3F v)
OrthoNormalBasis33F instance given eye, lookAt and v.
The W-direction is computed by Vector3F.direction(lookAt, eye), which is the opposite direction.
If either eye, lookAt or v are null, a NullPointerException will be thrown.
public OrthoNormalBasis33F(Vector3F w)
OrthoNormalBasis33F instance given w.
If w is null, a NullPointerException will be thrown.
w - a Vector3F pointing in the W-directionjava.lang.NullPointerException - thrown if, and only if, w is nullpublic OrthoNormalBasis33F(Vector3F w, Vector3F v)
OrthoNormalBasis instance given w and v.
If either w or v are null, a NullPointerException will be thrown.
w - a Vector3F pointing in the W-directionv - a Vector3 pointing in the V-directionjava.lang.NullPointerException - thrown if, and only if, either w or v are nullpublic OrthoNormalBasis33F(Vector3F w, Vector3F v, Vector3F u)
OrthoNormalBasis33F instance given w, v and u.
If either w, v or u are null, a NullPointerException will be thrown.
w - a Vector3F pointing in the W-directionv - a Vector3F pointing in the V-directionu - a Vector3F pointing in the U-directionjava.lang.NullPointerException - thrown if, and only if, either w, v or u are nullpublic OrthoNormalBasis33F flipU()
Returns a new OrthoNormalBasis33F with the U-direction flipped.
OrthoNormalBasis33F with the U-direction flippedpublic OrthoNormalBasis33F flipV()
Returns a new OrthoNormalBasis33F with the V-direction flipped.
OrthoNormalBasis33F with the V-direction flippedpublic OrthoNormalBasis33F flipW()
Returns a new OrthoNormalBasis33F with the W-direction flipped.
OrthoNormalBasis33F with the W-direction flippedpublic OrthoNormalBasis33F swapUV()
Returns a new OrthoNormalBasis33F with the U- and V-directions swapped.
This method does the same thing as swapVU().
OrthoNormalBasis33F with the U- and V-directions swappedpublic OrthoNormalBasis33F swapUW()
Returns a new OrthoNormalBasis33F with the U- and W-directions swapped.
This method does the same thing as swapWU().
OrthoNormalBasis33F with the U- and W-directions swappedpublic OrthoNormalBasis33F swapVU()
Returns a new OrthoNormalBasis33F with the V- and U-directions swapped.
This method does the same thing as swapUV().
OrthoNormalBasis33F with the V- and U-directions swappedpublic OrthoNormalBasis33F swapVW()
Returns a new OrthoNormalBasis33F with the V- and W-directions swapped.
This method does the same thing as swapWV().
OrthoNormalBasis33F with the V- and W-directions swappedpublic OrthoNormalBasis33F swapWU()
Returns a new OrthoNormalBasis33F with the W- and U-directions swapped.
This method does the same thing as swapUW().
OrthoNormalBasis33F with the W- and U-directions swappedpublic OrthoNormalBasis33F swapWV()
Returns a new OrthoNormalBasis33F with the W- and V-directions swapped.
This method does the same thing as swapVW().
OrthoNormalBasis33F with the W- and V-directions swappedpublic OrthoNormalBasis33F transform(Matrix44F m)
Returns a new OrthoNormalBasis33F with the result of the transformation.
If m is null, a NullPointerException will be thrown.
m - a Matrix44FOrthoNormalBasis33F with the result of the transformationjava.lang.NullPointerException - thrown if, and only if, m is nullpublic java.lang.String toString()
String representation of this OrthoNormalBasis33F instance.toString in class java.lang.ObjectString representation of this OrthoNormalBasis33F instancepublic Vector3F getU()
Vector3F pointing in the U-direction.Vector3F pointing in the U-directionpublic Vector3F getV()
Vector3F pointing in the V-direction.Vector3F pointing in the V-directionpublic Vector3F getW()
Vector3F pointing in the W-direction.Vector3F pointing in the W-directionpublic boolean equals(java.lang.Object object)
object to this OrthoNormalBasis33F instance for equality.
Returns true if, and only if, object is an instance of OrthoNormalBasis33F, and their respective values are equal, false otherwise.
equals in class java.lang.Objectobject - the Object to compare to this OrthoNormalBasis33F instance for equalitytrue if, and only if, object is an instance of OrthoNormalBasis33F, and their respective values are equal, false otherwisepublic int hashCode()
OrthoNormalBasis33F instance.hashCode in class java.lang.ObjectOrthoNormalBasis33F instance