org.xith3d.scenegraph
Class Transform3D

java.lang.Object
  extended by org.xith3d.scenegraph.Transform3D
All Implemented Interfaces:
java.lang.Comparable<Transform3D>

public class Transform3D
extends java.lang.Object
implements java.lang.Comparable<Transform3D>

Is represented internally as a 4x4 floating point matrix. The mathematical representation is row major, as in traditional matrix mathematics. A Transform3D is used for rotating, translating and scaling scenegraph objects such as TransformGroups.


Field Summary
static Transform3D IDENTITY
           
protected  TransformGroup transformGroup
           
static Transform3D ZERO
           
 
Constructor Summary
Transform3D()
          Constructs a new Transform3D object and sets it to the identity transformation.
Transform3D(float transX, float transY, float transZ)
           
Transform3D(org.openmali.vecmath2.Matrix3f m)
           
Transform3D(org.openmali.vecmath2.Matrix4f m)
           
Transform3D(Transform3D t)
          Constructs a new Transform3D object and initializes it from the specified transform.
Transform3D(org.openmali.vecmath2.Tuple3f v)
           
 
Method Summary
 void add(Transform3D t2)
          Add this transform to the transform in t and then places the result back into this.
 void add(Transform3D t1, Transform3D t2)
          Adds the transforms t1 and t2 and places the result into this.
 int compareTo(Transform3D t2)
          
 boolean equals(java.lang.Object o)
          
 void frustum(float left, float right, float bottom, float top, float near, float far)
          Creates a perspective projection transform, that mimics a standard, camera-based, view-model.
 void frustumMesa(float left, float right, float bottom, float top, float zNear, float zFar)
          Creates a masa-style perspective projection transform, that mimics a standard, camera-based, view-model.
 void get(org.openmali.vecmath2.Matrix4f m)
           
 void get(org.openmali.vecmath2.Quaternion4f quat)
           
 void get(Transform3D transform)
          Gets the full transform.
 void get(org.openmali.vecmath2.Tuple3f loc)
           
 void getColumnMajor(float[] trans)
          Moved the matrix into the float array
 Transform3D getCopy()
           
 float getDeterminant()
          Calculates and returns the determinant of this transform.
 boolean getDeterminantSign()
           
 void getEuler(org.openmali.vecmath2.Tuple3f euler)
          Calculates Euler angles from the current rotation matrix.
 org.openmali.vecmath2.Matrix4f getMatrix4f()
          Get the Matrix4f for this transform.
 org.openmali.vecmath2.Matrix4f getMatrix4f(org.openmali.vecmath2.Matrix4f matrix)
          Copies the Matrix4f for this transform into Matrix4f matrix.
 org.openmali.vecmath2.Matrix3f getRotation(org.openmali.vecmath2.Matrix3f rotMat)
          Copy the rotation, the upper 3x3 matrix values of this transform into the Matrix3f m.
 void getRowMajor(float[] trans)
          Moved the matrix into the float array
 float getScale()
           
 StateNode getStateNode()
           
 void getTransform(Transform3D t)
          Deprecated. it has been replaced by get(Transform3D).
 org.openmali.vecmath2.Vector3f getTranslation()
          Gets the translational values of this matrix and places them in the Vector3f v.
 void getTranslation(org.openmali.vecmath2.Tuple3f translation)
          Gets the translational values of this matrix and places them in the Tuple3f.
 int hashCode()
          
 void invert()
          Inverts this transform in place.
 void invert(Transform3D t)
          Inverts the transform t and place the result in this transform.
 boolean isChanged()
           
 void lookAlong(float eyePositionX, float eyePositionY, float eyePositionZ, float viewDirectionX, float viewDirectionY, float viewDirectionZ)
          Helping function that specifies the position and orientation of a view matrix.
 void lookAlong(float eyePositionX, float eyePositionY, float eyePositionZ, float viewDirectionX, float viewDirectionY, float viewDirectionZ, float vecUpX, float vecUpY, float vecUpZ)
          Helping function that specifies the position and orientation of a view matrix.
 void lookAlong(org.openmali.vecmath2.Tuple3f eyePosition, org.openmali.vecmath2.Tuple3f viewDirection)
          Helping function that specifies the position and orientation of a view matrix.
 void lookAlong(org.openmali.vecmath2.Tuple3f eyePosition, org.openmali.vecmath2.Tuple3f viewDirection, org.openmali.vecmath2.Tuple3f vecUp)
          Helping function that specifies the position and orientation of a view matrix.
 void lookAt(float eyePositionX, float eyePositionY, float eyePositionZ, float viewFocusX, float viewFocusY, float viewFocusZ, float vecUpX, float vecUpY, float vecUpZ)
          Helping function that specifies the position and orientation of a view matrix.
 void lookAt(org.openmali.vecmath2.Tuple3f eyePosition, org.openmali.vecmath2.Tuple3f viewFocus, org.openmali.vecmath2.Tuple3f vecUp)
          Helping function that specifies the position and orientation of a view matrix.
 void mul(Transform3D t)
           
 void ortho(float left, float right, float bottom, float top, float near, float far)
          Creates an orthographic projection transform, that mimics a standard, camera-based, view-model.
 void perspective(float fovy, float aspect, float zNear, float zFar)
          Creates a perspective projection transform, that mimics a standard, camera-based, view-model.
 void perspectiveMesa(float fovy, float aspect, float zNear, float zFar)
          Creates a mesa-style perspective projection transform, that mimics a standard, camera-based, view-model.
 void rotAxis(float axisX, float axisY, float axisZ, float angle)
          Set the value of this matrix to a rotation matrix about an arbitray axis.
 void rotAxis(org.openmali.vecmath2.Vector3f axis, float angle)
          Set the value of this matrix to a rotation matrix about an arbitray axis.
 void rotX(float angle)
          Rotates relative to the current rotation about the X axis.
 void rotXYZ(float angleX, float angleY, float angleZ)
          Set the value of this matrix to a rotation matrix about a combination of the X, Y and Z axis.
 void rotY(float angle)
          Rotates relative to the current rotation about the Y axis.
 void rotZ(float angle)
          Rotates relative to the current rotation about the Z axis.
 void scaleTranslation(float scale)
          Scales the translational values of this matrix by the scalar value scale.
 void set(float transX, float transY, float transZ)
          Set the translational value of this matrix to the specified vector parameter values and set the other components of the matrix as if this transform were an identity matrix.
 void set(org.openmali.vecmath2.Matrix3f m)
          Set the rotational components (upper 3x3) of this transform to the matrix values in the specified matrix.
 void set(org.openmali.vecmath2.Matrix4f m)
           
 void set(org.openmali.vecmath2.Quaternion4f quat)
           
 void set(org.openmali.vecmath2.Quaternion4f rotation, org.openmali.vecmath2.Tuple3f translation, float scale)
          Sets the transform matrix using the rotation quaternion, translation vector and scale.
 void set(Transform3D t)
          Set the matrix and state of this transform to the matrix state of the Transform3D t.
 void set(org.openmali.vecmath2.Tuple3f trans)
          Set the translational value of this matrix to the specified vector parameter values and set the other components of the matrix as if this transform were an identity matrix.
 void set(org.openmali.vecmath2.Tuple3f translation, float scale)
          Set the value of this transform to a scaled translation matrix.
 void setEuler(float angleX, float angleY, float angleZ)
          Set the value of this matrix to a rotation matrix about a combination of the X, Y and Z axis.
 void setEuler(org.openmali.vecmath2.Tuple3f euler)
           
 void setIdentity()
          Sets the transform to the identity matrix.
 void setRotation(org.openmali.vecmath2.AxisAngle3f aa)
          Rotates the matrix around the passed axis by the passed angle.
 void setRotation(org.openmali.vecmath2.Matrix3f rotMat)
          Sets the rotation by replacing the upper 3x3 matrix values of this transform with the values in the Matrix3f m.
 void setRotation(org.openmali.vecmath2.Quaternion4f quat)
          Sets the matrix rotation by the given quaternion.
 void setRotationScale(org.openmali.vecmath2.Matrix3f m1)
          Replaces the upper 3x3 matrix values of this transform with the values in the matrix m1.
 void setScale(float scale)
          Sets the scale.
 void setScale(float scaleX, float scaleY, float scaleZ)
          Set this transform to a scaling matrix after setting it to the identity matrix.
 void setScale(org.openmali.vecmath2.Tuple3f scale)
          Set this transform to a scaling matrix after setting it to the identity matrix.
 void setStateNode(StateNode node)
           
 void setTranslation(float x, float y, float z)
          Modifies the translational components of this transform to the value of the argument.
 void setTranslation(org.openmali.vecmath2.Tuple3f translation)
          Modifies the translational components of this transform to the value of the argument.
 void setZero()
          Sets the transform to all zeros.
 void sub(Transform3D t2)
          Subtracts transform t from this transform and then places the result back into this.
 void sub(Transform3D t1, Transform3D t2)
          Subtracts the transform t2 from t1 and places the result into this.
 java.lang.String toString()
          
 void transform(org.openmali.vecmath2.Point3f point)
           
 void transform(org.openmali.vecmath2.Point3f point, org.openmali.vecmath2.Point3f pointOut)
          Transforms the point parameter with this transform and places the result into pointOut.
 void transform(Transform3D t)
           
 void transform(Transform3D t, Transform3D out)
           
 void transform(org.openmali.vecmath2.Vector3f vector)
           
 void transform(org.openmali.vecmath2.Vector3f vector, org.openmali.vecmath2.Vector3f vecOut)
          Transforms the vector parameter with this transform and places the result into vecOut.
 void transform(org.openmali.vecmath2.Vector4f vector)
           
 void transpose()
          Transposes this matrix in place.
 void transpose(Transform3D trans)
          Transposes transform t and places the value into this transform, trans is not modified.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

IDENTITY

public static final Transform3D IDENTITY

ZERO

public static final Transform3D ZERO

transformGroup

protected TransformGroup transformGroup
Constructor Detail

Transform3D

public Transform3D()
Constructs a new Transform3D object and sets it to the identity transformation.


Transform3D

public Transform3D(Transform3D t)
Constructs a new Transform3D object and initializes it from the specified transform.


Transform3D

public Transform3D(org.openmali.vecmath2.Matrix4f m)

Transform3D

public Transform3D(org.openmali.vecmath2.Matrix3f m)

Transform3D

public Transform3D(org.openmali.vecmath2.Tuple3f v)

Transform3D

public Transform3D(float transX,
                   float transY,
                   float transZ)
Method Detail

isChanged

public final boolean isChanged()

set

public final void set(org.openmali.vecmath2.Tuple3f trans)
Set the translational value of this matrix to the specified vector parameter values and set the other components of the matrix as if this transform were an identity matrix.

Parameters:
trans -

set

public final void set(float transX,
                      float transY,
                      float transZ)
Set the translational value of this matrix to the specified vector parameter values and set the other components of the matrix as if this transform were an identity matrix.

Parameters:
transX -
transY -
transZ -

set

public final void set(org.openmali.vecmath2.Tuple3f translation,
                      float scale)
Set the value of this transform to a scaled translation matrix. The matrix is first set to the identity matrix. The translation is scaled by the scale factor and all of the matrix values are modified.

Parameters:
translation -
scale -

set

public final void set(Transform3D t)
Set the matrix and state of this transform to the matrix state of the Transform3D t.


set

public final void set(org.openmali.vecmath2.Matrix3f m)
Set the rotational components (upper 3x3) of this transform to the matrix values in the specified matrix. The remaining values are set to the identity matrix. All values of the matrix are modified.


set

public final void set(org.openmali.vecmath2.Matrix4f m)

set

public final void set(org.openmali.vecmath2.Quaternion4f rotation,
                      org.openmali.vecmath2.Tuple3f translation,
                      float scale)
Sets the transform matrix using the rotation quaternion, translation vector and scale.

Parameters:
rotation - quaternion
translation - translation
scale - scale

get

public final void get(org.openmali.vecmath2.Tuple3f loc)

get

public final void get(org.openmali.vecmath2.Quaternion4f quat)

set

public final void set(org.openmali.vecmath2.Quaternion4f quat)

get

public final void get(org.openmali.vecmath2.Matrix4f m)

getRowMajor

public final void getRowMajor(float[] trans)
Moved the matrix into the float array


getColumnMajor

public final void getColumnMajor(float[] trans)
Moved the matrix into the float array


getMatrix4f

public final org.openmali.vecmath2.Matrix4f getMatrix4f()
Get the Matrix4f for this transform.


getMatrix4f

public final org.openmali.vecmath2.Matrix4f getMatrix4f(org.openmali.vecmath2.Matrix4f matrix)
Copies the Matrix4f for this transform into Matrix4f matrix.

Parameters:
matrix -

get

public final void get(Transform3D transform)
Gets the full transform.

Parameters:
transform -

getTransform

@Deprecated
public final void getTransform(Transform3D t)
Deprecated. it has been replaced by get(Transform3D).


getDeterminantSign

public final boolean getDeterminantSign()
Returns:
the sign of the determinant sign of this matrix. A return value of true indicates a positive determinant. In general, an orthogonal matrix with a positive determinant is a pure rotation matrix; an orthogonal matrix with a negative determinant is both rotation and a reflection matrix.

getDeterminant

public final float getDeterminant()
Calculates and returns the determinant of this transform.


setIdentity

public final void setIdentity()
Sets the transform to the identity matrix.


setZero

public final void setZero()
Sets the transform to all zeros.


setRotationScale

public final void setRotationScale(org.openmali.vecmath2.Matrix3f m1)
Replaces the upper 3x3 matrix values of this transform with the values in the matrix m1.

Parameters:
m1 - The matrix that will be the new upper 3x3
See Also:
Matrix4f.setRotationScale(org.openmali.vecmath2.Matrix3f)

setRotation

public final void setRotation(org.openmali.vecmath2.Matrix3f rotMat)
Sets the rotation by replacing the upper 3x3 matrix values of this transform with the values in the Matrix3f m. The other elements of this transform are unchanged. WARNING : This method is a bit slower than setRotationScale() because it preserves existing rotation. If you just want to replace rotation, please use setRotationScale()

Parameters:
rotMat -

setRotation

public final void setRotation(org.openmali.vecmath2.AxisAngle3f aa)
Rotates the matrix around the passed axis by the passed angle. Non rotational elements are unchanged.

Parameters:
aa - Rotation amount and axis of rotation

setRotation

public final void setRotation(org.openmali.vecmath2.Quaternion4f quat)
Sets the matrix rotation by the given quaternion.

Parameters:
quat - the quaternion to get the rotation from

getRotation

public final org.openmali.vecmath2.Matrix3f getRotation(org.openmali.vecmath2.Matrix3f rotMat)
Copy the rotation, the upper 3x3 matrix values of this transform into the Matrix3f m.

Parameters:
rotMat -

add

public final void add(Transform3D t2)
Add this transform to the transform in t and then places the result back into this.

Parameters:
t2 -

add

public final void add(Transform3D t1,
                      Transform3D t2)
Adds the transforms t1 and t2 and places the result into this.

Parameters:
t1 -
t2 -

sub

public final void sub(Transform3D t2)
Subtracts transform t from this transform and then places the result back into this.

Parameters:
t2 -

sub

public final void sub(Transform3D t1,
                      Transform3D t2)
Subtracts the transform t2 from t1 and places the result into this.

Parameters:
t1 -
t2 -

mul

public final void mul(Transform3D t)

rotAxis

public final void rotAxis(float axisX,
                          float axisY,
                          float axisZ,
                          float angle)
Set the value of this matrix to a rotation matrix about an arbitray axis. The non-rotational components are set as if this were an identity matrix.

Parameters:
axisX -
axisY -
axisZ -
angle -

rotAxis

public final void rotAxis(org.openmali.vecmath2.Vector3f axis,
                          float angle)
Set the value of this matrix to a rotation matrix about an arbitray axis. The non-rotational components are set as if this were an identity matrix.

Parameters:
axis -
angle -

rotX

public final void rotX(float angle)
Rotates relative to the current rotation about the X axis. The angle to rotate is specified in radians. The non-rotational components are set as if this were an identity matrix. All values are changed. Note : you can convert degrees to radians with FastMath.toRad()

Parameters:
angle -

rotY

public final void rotY(float angle)
Rotates relative to the current rotation about the Y axis. The angle to rotate is specified in radians. The non-rotational components are set as if this were an identity matrix. All values are changed. Note : you can convert degrees to radians with FastMath.toRad()

Parameters:
angle -

rotZ

public final void rotZ(float angle)
Rotates relative to the current rotation about the Z axis. The angle to rotate is specified in radians. The non-rotational components are set as if this were an identity matrix. All values are changed. Note : you can convert degrees to radians with FastMath.toRad()

Parameters:
angle -

rotXYZ

public final void rotXYZ(float angleX,
                         float angleY,
                         float angleZ)
Set the value of this matrix to a rotation matrix about a combination of the X, Y and Z axis. The angle to rotate for each axis is specified in radians. If the angle is 0 no rotation is performed for that axis. The non-rotational components are set as if this were an identity matrix. Note : you can convert degrees to radians with FastMath.toRad()

Parameters:
angleX -
angleY -
angleZ -

setEuler

public final void setEuler(float angleX,
                           float angleY,
                           float angleZ)
Set the value of this matrix to a rotation matrix about a combination of the X, Y and Z axis. The angle to rotate for each axis is specified in radians. If the angle is 0 no rotation is performed for that axis. The non-rotational components are set as if this were an identity matrix. Note : you can convert degrees to radians with FastMath.toRad()

Parameters:
angleX -
angleY -
angleZ -

setEuler

public final void setEuler(org.openmali.vecmath2.Tuple3f euler)

getEuler

public final void getEuler(org.openmali.vecmath2.Tuple3f euler)
Calculates Euler angles from the current rotation matrix.
Note, that this method is only one-to-one for [-pi/2, pi/2].

Parameters:
euler - the euler to be filled

setScale

public final void setScale(float scaleX,
                           float scaleY,
                           float scaleZ)
Set this transform to a scaling matrix after setting it to the identity matrix.

Parameters:
scaleX -
scaleY -
scaleZ -

setScale

public final void setScale(org.openmali.vecmath2.Tuple3f scale)
Set this transform to a scaling matrix after setting it to the identity matrix.

Parameters:
scale -

setScale

public final void setScale(float scale)
Sets the scale.

Parameters:
scale -

getScale

public final float getScale()

setTranslation

public final void setTranslation(float x,
                                 float y,
                                 float z)
Modifies the translational components of this transform to the value of the argument. The other values of this transform are not modified.

Parameters:
x -
y -
z -

setTranslation

public final void setTranslation(org.openmali.vecmath2.Tuple3f translation)
Modifies the translational components of this transform to the value of the argument. The other values of this transform are not modified.

Parameters:
translation -

getTranslation

public final org.openmali.vecmath2.Vector3f getTranslation()
Gets the translational values of this matrix and places them in the Vector3f v.


getTranslation

public final void getTranslation(org.openmali.vecmath2.Tuple3f translation)
Gets the translational values of this matrix and places them in the Tuple3f.

Parameters:
translation -

scaleTranslation

public final void scaleTranslation(float scale)
Scales the translational values of this matrix by the scalar value scale.

Parameters:
scale -

transpose

public final void transpose()
Transposes this matrix in place.


transpose

public final void transpose(Transform3D trans)
Transposes transform t and places the value into this transform, trans is not modified.

Parameters:
trans -

invert

public final void invert()
Inverts this transform in place.


invert

public final void invert(Transform3D t)
Inverts the transform t and place the result in this transform.


transform

public final void transform(org.openmali.vecmath2.Point3f point)

transform

public final void transform(org.openmali.vecmath2.Point3f point,
                            org.openmali.vecmath2.Point3f pointOut)
Transforms the point parameter with this transform and places the result into pointOut.

Parameters:
point - the input point to be transformed
pointOut - the transformed point

transform

public final void transform(org.openmali.vecmath2.Vector3f vector)

transform

public final void transform(org.openmali.vecmath2.Vector3f vector,
                            org.openmali.vecmath2.Vector3f vecOut)
Transforms the vector parameter with this transform and places the result into vecOut.

Parameters:
vector - the input point to be transformed
vecOut - the transformed point

transform

public final void transform(org.openmali.vecmath2.Vector4f vector)

transform

public final void transform(Transform3D t)

transform

public final void transform(Transform3D t,
                            Transform3D out)

lookAt

public final void lookAt(float eyePositionX,
                         float eyePositionY,
                         float eyePositionZ,
                         float viewFocusX,
                         float viewFocusY,
                         float viewFocusZ,
                         float vecUpX,
                         float vecUpY,
                         float vecUpZ)
Helping function that specifies the position and orientation of a view matrix.

Parameters:
eyePositionX - the center of the eye
eyePositionY - the center of the eye
eyePositionZ - the center of the eye
viewFocusX - the point the view looks at
viewFocusY - the point the view looks at
viewFocusZ - the point the view looks at
vecUpX - the vector pointing up
vecUpY - the vector pointing up
vecUpZ - the vector pointing up

lookAt

public final void lookAt(org.openmali.vecmath2.Tuple3f eyePosition,
                         org.openmali.vecmath2.Tuple3f viewFocus,
                         org.openmali.vecmath2.Tuple3f vecUp)
Helping function that specifies the position and orientation of a view matrix.

Parameters:
eyePosition - the center of the eye
viewFocus - the point the view looks at
vecUp - the vector pointing up

lookAlong

public final void lookAlong(float eyePositionX,
                            float eyePositionY,
                            float eyePositionZ,
                            float viewDirectionX,
                            float viewDirectionY,
                            float viewDirectionZ,
                            float vecUpX,
                            float vecUpY,
                            float vecUpZ)
Helping function that specifies the position and orientation of a view matrix.

Parameters:
eyePositionX - the center of the eye
eyePositionY - the center of the eye
eyePositionZ - the center of the eye
viewDirectionX - the direction the view looks along
viewDirectionY - the direction the view looks along
viewDirectionZ - the direction the view looks along
vecUpX - the vector pointing up
vecUpY - the vector pointing up
vecUpZ - the vector pointing up

lookAlong

public final void lookAlong(org.openmali.vecmath2.Tuple3f eyePosition,
                            org.openmali.vecmath2.Tuple3f viewDirection,
                            org.openmali.vecmath2.Tuple3f vecUp)
Helping function that specifies the position and orientation of a view matrix.

Parameters:
eyePosition - the center of the eye
viewDirection - the direction the view looks along
vecUp - the vector pointing up

lookAlong

public final void lookAlong(float eyePositionX,
                            float eyePositionY,
                            float eyePositionZ,
                            float viewDirectionX,
                            float viewDirectionY,
                            float viewDirectionZ)
Helping function that specifies the position and orientation of a view matrix.

This method assumes Y-up.

Parameters:
eyePositionX - the center of the eye
eyePositionY - the center of the eye
eyePositionZ - the center of the eye
viewDirectionX - the direction the view looks along
viewDirectionY - the direction the view looks along
viewDirectionZ - the direction the view looks along

lookAlong

public final void lookAlong(org.openmali.vecmath2.Tuple3f eyePosition,
                            org.openmali.vecmath2.Tuple3f viewDirection)
Helping function that specifies the position and orientation of a view matrix.

This method assumes Y-up.

Parameters:
eyePosition - the center of the eye
viewDirection - the direction the view looks along

frustum

public final void frustum(float left,
                          float right,
                          float bottom,
                          float top,
                          float near,
                          float far)
Creates a perspective projection transform, that mimics a standard, camera-based, view-model. The frustum function-call establishes a view-model with the eye at the apex of a symmetric view frustum. The arguments define the frustum and its associated perspective projection: (left, bottom, -near) and (right, top, -near) specify the point on the near clipping plane that maps onto the lower-left and upper-right corners of the window respectively, assuming the eye is located at (0, 0, 0).

Parameters:
left - the vertical line on the left edge of the near clipping plane mapped to the left edge of the graphics window
right - the vertical line on the right edge of the near clipping plane mapped to the right edge of the graphics window
bottom - the horizontal line on the bottom edge of the near clipping plane mapped to the bottom edge of the graphics window
top - the horizontal line on the top edge of the near
near - the distance to the frustum's near clipping plane. This value must be positive, (the value -near is the location of the near clip plane).
far - the distance to the frustum's far clipping plane. This value must be positive, and must be greater than near.

frustumMesa

public final void frustumMesa(float left,
                              float right,
                              float bottom,
                              float top,
                              float zNear,
                              float zFar)
Creates a masa-style perspective projection transform, that mimics a standard, camera-based, view-model. The frustum function-call establishes a view-model with the eye at the apex of a symmetric view frustum. The arguments define the frustum and its associated perspective projection: (left, bottom, -near) and (right, top, -near) specify the point on the near clipping plane that maps onto the lower-left and upper-right corners of the window respectively, assuming the eye is located at (0, 0, 0).

Parameters:
left - the vertical line on the left edge of the near clipping plane mapped to the left edge of the graphics window
right - the vertical line on the right edge of the near clipping plane mapped to the right edge of the graphics window
bottom - the horizontal line on the bottom edge of the near clipping plane mapped to the bottom edge of the graphics window
top - the horizontal line on the top edge of the near
zNear - the distance to the frustum's near clipping plane. This value must be positive, (the value -near is the location of the near clip plane).
zFar - the distance to the frustum's far clipping plane. This value must be positive, and must be greater than near.

perspectiveMesa

public final void perspectiveMesa(float fovy,
                                  float aspect,
                                  float zNear,
                                  float zFar)
Creates a mesa-style perspective projection transform, that mimics a standard, camera-based, view-model.

Parameters:
fovy - specifies the field of view in the y direction, in radians
aspect - specifies the aspect ratio and thus the field of view in the x direction. The aspect ratio is the ratio of x to y, or width to height.
zNear - the distance to the frustum's near clipping plane. This value must be positive, (the value -zNear is the location of the near clip plane).
zFar - the distance to the frustum's far clipping plane.

perspective

public final void perspective(float fovy,
                              float aspect,
                              float zNear,
                              float zFar)
Creates a perspective projection transform, that mimics a standard, camera-based, view-model.

Parameters:
fovy - specifies the field of view in the y direction, in radians
aspect - specifies the aspect ratio and thus the field of view in the x direction. The aspect ratio is the ratio of x to y, or width to height.
zNear - the distance to the frustum's near clipping plane. This value must be positive, (the value -zNear is the location of the near clip plane).
zFar - the distance to the frustum's far clipping plane.

ortho

public final void ortho(float left,
                        float right,
                        float bottom,
                        float top,
                        float near,
                        float far)
Creates an orthographic projection transform, that mimics a standard, camera-based, view-model.

Parameters:
left - the vertical line on the left edge of the near clipping plane mapped to the left edge of the graphics window
right - the vertical line on the right edge of the near clipping plane mapped to the right edge of the graphics window
bottom - the horizontal line on the bottom edge of the near clipping plane mapped to the bottom edge of the graphics window
top - the horizontal line on the top edge of the near clipping plane mapped to the top edge of the graphics window
near - the distance to the frustum's near clipping plane (the value -near is the location of the near clip plane)
far - the distance to the frustum's far clipping plane

setStateNode

public final void setStateNode(StateNode node)

getStateNode

public final StateNode getStateNode()

getCopy

public final Transform3D getCopy()

equals

public boolean equals(java.lang.Object o)

Overrides:
equals in class java.lang.Object

compareTo

public int compareTo(Transform3D t2)

Specified by:
compareTo in interface java.lang.Comparable<Transform3D>

hashCode

public int hashCode()

Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()

Overrides:
toString in class java.lang.Object