public class Transform3D extends Object
A transform has an associated type, and all type classification is left to the Transform3D object. A transform will typically have multiple types, unless it is a general, unclassifiable matrix, in which case it won't be assigned a type.
The Transform3D type is internally computed when the transform object is constructed and updated any time it is modified. A matrix will typically have multiple types. For example, the type associated with an identity matrix is the result of ORing all of the types, except for ZERO and NEGATIVE_DETERMINANT, together. There are public methods available to get the ORed type of the transformation, the sign of the determinant, and the least general matrix type. The matrix type flags are defined as follows:
[ m00 m01 m02 m03 ] [ x ] [ x' ] [ m10 m11 m12 m13 ] . [ y ] = [ y' ] [ m20 m21 m22 m23 ] [ z ] [ z' ] [ m30 m31 m32 m33 ] [ w ] [ w' ] x' = m00 . x+m01 . y+m02 . z+m03 . w y' = m10 . x+m11 . y+m12 . z+m13 . w z' = m20 . x+m21 . y+m22 . z+m23 . w w' = m30 . x+m31 . y+m32 . z+m33 . w
Note: When transforming a Point3f or a Point3d, the input w is set to 1. When transforming a Vector3f or Vector3d, the input w is set to 0.
Modifier and Type  Field and Description 

static int 
AFFINE
An affine matrix can translate, rotate, reflect, scale anisotropically,
and shear.

static int 
CONGRUENT
This is an angle and length preserving matrix, meaning that it
can translate, rotate, and reflect
about an axis, and scale by an amount that is uniform in all directions.

static int 
IDENTITY
An identity matrix.

static int 
NEGATIVE_DETERMINANT
This matrix has a negative determinant; an orthogonal matrix with
a positive determinant is a rotation matrix; an orthogonal matrix
with a negative determinant is a reflection and rotation matrix.

static int 
ORTHOGONAL
The four row vectors that make up an orthogonal matrix form a basis,
meaning that they are mutually orthogonal; an orthogonal matrix with
positive determinant is a pure rotation matrix; a negative
determinant indicates a rotation and a reflection.

static int 
RIGID
This matrix is a rotation and a translation with unity scale;
The upper 3x3 of the matrix is orthogonal, and there is a
translation component.

static int 
SCALE
A Uniform scale matrix with no translation or other
offdiagonal components.

static int 
TRANSLATION
A translationonly matrix with ones on the diagonal.

static int 
ZERO
A zero matrix.

Constructor and Description 

Transform3D()
Constructs and initializes a transform to the identity matrix.

Transform3D(double[] matrix)
Constructs and initializes a transform from the double precision array
of length 16; the top row of the matrix is initialized to the first
four elements of the array, and so on.

Transform3D(float[] matrix)
Constructs and initializes a transform from the float array of
length 16; the top row of the matrix is initialized to the first
four elements of the array, and so on.

Transform3D(GMatrix m1)
Constructs a transform and initializes it to the upper 4 x 4
of the GMatrix argument.

Transform3D(Matrix3d m1,
Vector3d t1,
double s)
Constructs and initializes a transform from the rotation matrix,
translation, and scale values.

Transform3D(Matrix3f m1,
Vector3d t1,
double s)
Constructs and initializes a transform from the rotation matrix,
translation, and scale values.

Transform3D(Matrix3f m1,
Vector3f t1,
float s)
Constructs and initializes a transform from the rotation matrix,
translation, and scale values.

Transform3D(Matrix4d m1)
Constructs and initializes a transform from the 4 x 4 matrix.

Transform3D(Matrix4f m1)
Constructs and initializes a transform from the 4 x 4 matrix.

Transform3D(Quat4d q1,
Vector3d t1,
double s)
Constructs and initializes a transform from the quaternion,
translation, and scale values.

Transform3D(Quat4f q1,
Vector3d t1,
double s)
Constructs and initializes a transform from the quaternion,
translation, and scale values.

Transform3D(Quat4f q1,
Vector3f t1,
float s)
Constructs and initializes a transform from the quaternion,
translation, and scale values.

Transform3D(Transform3D t1)
Constructs and initializes a transform from the Transform3D object.

Modifier and Type  Method and Description 

void 
add(Transform3D t1)
Adds this transform to transform t1 and places the result into
this: this = this + t1.

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

double 
determinant()
Calculates and returns the determinant of this transform.

boolean 
epsilonEquals(Transform3D t1,
double epsilon)
Returns true if the Linfinite distance between this matrix
and matrix m1 is less than or equal to the epsilon parameter,
otherwise returns false.

boolean 
equals(Object o1)
Returns true if the Object o1 is of type Transform3D and all of the
data members of o1 are equal to the corresponding data members in
this Transform3D.

boolean 
equals(Transform3D t1)
Returns true if all of the data members of transform t1 are
equal to the corresponding data members in this Transform3D.

void 
frustum(double left,
double right,
double bottom,
double top,
double near,
double far)
Creates a perspective projection transform that mimics a standard,
camerabased,
viewmodel.

void 
get(double[] matrix)
Places the values of this transform into the double precision array
of length 16.

void 
get(float[] matrix)
Places the values of this transform into the single precision array
of length 16.

void 
get(Matrix3d m1)
Places the normalized rotational component of this transform
into the 3x3 matrix argument.

double 
get(Matrix3d m1,
Vector3d t1)
Places the normalized rotational component of this transform
into the matrix parameter; place the translational component
into the vector parameter.

void 
get(Matrix3f m1)
Places the normalized rotational component of this transform
into the 3x3 matrix argument.

double 
get(Matrix3f m1,
Vector3d t1)
Places the normalized rotational component of this transform
into the matrix parameter; place the translational component
into the vector parameter.

float 
get(Matrix3f m1,
Vector3f t1)
Places the normalized rotational component of this transform
into the matrix parameter; place the translational component
into the vector parameter.

void 
get(Matrix4d matrix)
Places the values of this transform into the double precision
matrix argument.

void 
get(Matrix4f matrix)
Places the values of this transform into the single precision matrix
argument.

void 
get(Quat4d q1)
Places the quaternion equivalent of the normalized rotational
component of this transform into the quaternion parameter.

double 
get(Quat4d q1,
Vector3d t1)
Places the quaternion equivalent of the normalized rotational
component of this transform into the quaternion parameter;
places the translational component into the Vector parameter.

void 
get(Quat4f q1)
Places the quaternion equivalent of the normalized rotational
component of this transform into the quaternion parameter.

double 
get(Quat4f q1,
Vector3d t1)
Places the quaternion equivalent of the normalized rotational
component of this transform into the quaternion parameter;
places the translational component into the Vector parameter.

float 
get(Quat4f q1,
Vector3f t1)
Places the quaternion equivalent of the normalized rotational
component of this transform into the quaternion parameter;
places the translational component into the Vector parameter.

void 
get(Vector3d trans)
Retrieves the translational components of this transform.

void 
get(Vector3f trans)
Retrieves the translational components of this transform.

boolean 
getAutoNormalize()
Returns the state of autonormalization.

int 
getBestType()
Returns the least general type of this matrix; the order of
generality from least to most is: ZERO, IDENTITY,
SCALE/TRANSLATION, ORTHOGONAL, RIGID, CONGRUENT, AFFINE.

boolean 
getDeterminantSign()
Returns the sign of the determinant of this matrix; a return value
of true indicates a nonnegative determinant; a return value of false
indicates a negative determinant.

void 
getRotationScale(Matrix3d m1)
Gets the upper 3x3 values of this matrix and places them into
the matrix m1.

void 
getRotationScale(Matrix3f m1)
Gets the upper 3x3 values of this matrix and places them into
the matrix m1.

double 
getScale()
Returns the uniform scale factor of this matrix.

void 
getScale(Vector3d scale)
Gets the possibly nonuniform scale components of the current
transform and places them into the scale vector.

int 
getType()
Returns the type of this matrix as an or'ed bitmask of
of all of the type classifications to which it belongs.

int 
hashCode()
Returns a hash code value based on the data values in this
object.

void 
invert()
Inverts this transform in place.

void 
invert(Transform3D t1)
Sets the value of this transform to the inverse of the passed
Transform3D parameter.

void 
lookAt(Point3d eye,
Point3d center,
Vector3d up)
Helping function that specifies the position and orientation of a
view matrix.

void 
mul(double scalar)
Multiplies each element of this transform by a scalar.

void 
mul(double scalar,
Transform3D t1)
Multiplies each element of transform t1 by a scalar and places
the result into this.

void 
mul(Transform3D t1)
Sets the value of this transform to the result of multiplying itself
with transform t1 (this = this * t1).

void 
mul(Transform3D t1,
Transform3D t2)
Sets the value of this transform to the result of multiplying transform
t1 by transform t2 (this = t1*t2).

void 
mulInverse(Transform3D t1)
Multiplies this transform by the inverse of transform t1.

void 
mulInverse(Transform3D t1,
Transform3D t2)
Multiplies transform t1 by the inverse of transform t2.

void 
mulTransposeBoth(Transform3D t1,
Transform3D t2)
Multiplies the transpose of transform t1 by the transpose of
transform t2 and places the result into this transform
(this = transpose(t1) * transpose(t2)).

void 
mulTransposeLeft(Transform3D t1,
Transform3D t2)
Multiplies the transpose of transform t1 by transform t2 and places
the result into this matrix (this = transpose(t1) * t2).

void 
mulTransposeRight(Transform3D t1,
Transform3D t2)
Multiplies transform t1 by the transpose of transform t2 and places
the result into this transform (this = t1 * transpose(t2)).

void 
normalize()
Normalizes the rotational components (upper 3x3) of this matrix
in place using a Singular Value Decomposition (SVD).

void 
normalize(Transform3D t1)
Normalizes the rotational components (upper 3x3) of transform t1
using a Singular Value Decomposition (SVD), and places the result
into this transform.

void 
normalizeCP()
Normalizes the rotational components (upper 3x3) of this transform
in place using a Cross Product (CP) normalization.

void 
normalizeCP(Transform3D t1)
Normalizes the rotational components (upper 3x3) of transform t1
using a Cross Product (CP) normalization, and
places the result into this transform.

void 
ortho(double left,
double right,
double bottom,
double top,
double near,
double far)
Creates an orthographic projection transform that mimics a standard,
camerabased,
viewmodel.

void 
perspective(double fovx,
double aspect,
double zNear,
double zFar)
Creates a perspective projection transform that mimics a standard,
camerabased,
viewmodel.

void 
rotX(double angle)
Sets the value of this transform to a counter clockwise rotation
about the x axis.

void 
rotY(double angle)
Sets the value of this transform to a counter clockwise rotation about
the y axis.

void 
rotZ(double angle)
Sets the value of this transform to a counter clockwise rotation
about the z axis.

void 
scaleAdd(double s,
Transform3D t1)
Scales this transform by a Uniform scale matrix with scale factor
s and then adds transform t1 (this = S*this + t1).

void 
scaleAdd(double s,
Transform3D t1,
Transform3D t2)
Scales transform t1 by a Uniform scale matrix with scale
factor s and then adds transform t2 (this = S*t1 + t2).

void 
set(AxisAngle4d a1)
Sets the value of this transform to the matrix conversion
of the double precision axisangle argument; all of the matrix
values are modified.

void 
set(AxisAngle4f a1)
Sets the value of this transform to the matrix conversion
of the single precision axisangle argument; all of the matrix
values are modified.

void 
set(double scale)
Sets the value of this transform to a uniform scale; all of
the matrix values are modified.

void 
set(double[] matrix)
Sets the matrix values of this transform to the matrix values in the
double precision array parameter.

void 
set(double scale,
Vector3d v1)
Sets the value of this transform to a scale and translation
matrix; the scale is not applied to the translation and all
of the matrix values are modified.

void 
set(float[] matrix)
Sets the matrix values of this transform to the matrix values in the
single precision array parameter.

void 
set(float scale,
Vector3f v1)
Sets the value of this transform to a scale and translation
matrix; the scale is not applied to the translation and all
of the matrix values are modified.

void 
set(GMatrix matrix)
Sets the matrix values of this transform to the matrix values in the
upper 4x4 corner of the GMatrix parameter.

void 
set(Matrix3d m1)
Sets the rotational component (upper 3x3) of this transform to the
matrix values in the double precision Matrix3d argument; the other
elements of this transform are initialized as if this were an identity
matrix (ie, affine matrix with no translational component).

void 
set(Matrix3d m1,
Vector3d t1,
double s)
Sets the value of this matrix from the rotation expressed
by the rotation matrix m1, the translation t1, and the scale s.

void 
set(Matrix3f m1)
Sets the rotational component (upper 3x3) of this transform to the
matrix values in the single precision Matrix3f argument; the other
elements of this transform are initialized as if this were an identity
matrix (i.e., affine matrix with no translational component).

void 
set(Matrix3f m1,
Vector3d t1,
double s)
Sets the value of this matrix from the rotation expressed
by the rotation matrix m1, the translation t1, and the scale s.

void 
set(Matrix3f m1,
Vector3f t1,
float s)
Sets the value of this matrix from the rotation expressed
by the rotation matrix m1, the translation t1, and the scale s.

void 
set(Matrix4d m1)
Sets the matrix values of this transform to the matrix values in the
double precision Matrix4d argument.

void 
set(Matrix4f m1)
Sets the matrix values of this transform to the matrix values in the
single precision Matrix4f argument.

void 
set(Quat4d q1)
Sets the value of this transform to the matrix conversion of the
double precision quaternion argument; the nonrotational
components are set as if this were an identity matrix.

void 
set(Quat4d q1,
Vector3d t1,
double s)
Sets the value of this matrix from the rotation expressed
by the quaternion q1, the translation t1, and the scale s.

void 
set(Quat4f q1)
Sets the value of this transform to the matrix conversion of the
single precision quaternion argument; the nonrotational
components are set as if this were an identity matrix.

void 
set(Quat4f q1,
Vector3d t1,
double s)
Sets the value of this matrix from the rotation expressed
by the quaternion q1, the translation t1, and the scale s.

void 
set(Quat4f q1,
Vector3f t1,
float s)
Sets the value of this matrix from the rotation expressed
by the quaternion q1, the translation t1, and the scale s.

void 
set(Transform3D t1)
Sets the matrix, type, and state of this transform to the matrix,
type, and state of transform t1.

void 
set(Vector3d trans)
Sets the translational value of this matrix to the Vector3d paramter
values, and sets the other components of the matrix as if this
transform were an identity matrix.

void 
set(Vector3d v1,
double scale)
Sets the value of this transform to a scale and translation matrix;
the translation is scaled by the scale factor and all of the
matrix values are modified.

void 
set(Vector3f trans)
Sets the translational value of this matrix to the Vector3f parameter
values, and sets the other components of the matrix as if this
transform were an identity matrix.

void 
set(Vector3f v1,
float scale)
Sets the value of this transform to a scale and translation matrix;
the translation is scaled by the scale factor and all of the
matrix values are modified.

void 
setAutoNormalize(boolean autoNormalize)
Sets a flag that enables or disables automatic SVD
normalization.

void 
setEuler(Vector3d euler)
Sets the rotational component (upper 3x3) of this transform to the
rotation matrix converted from the Euler angles provided; the other
nonrotational elements are set as if this were an identity matrix.

void 
setIdentity()
Sets this transform to the identity matrix.

void 
setNonUniformScale(double xScale,
double yScale,
double zScale)
Deprecated.
Use setScale(Vector3d) instead of setNonUniformScale;
note that the setScale only modifies the scale component

void 
setRotation(AxisAngle4d a1)
Sets the rotational component (upper 3x3) of this transform to the
matrix equivalent values of the axisangle argument; the other
elements of this transform are unchanged; any preexisting scale
in the transform is preserved.

void 
setRotation(AxisAngle4f a1)
Sets the rotational component (upper 3x3) of this transform to the
matrix equivalent values of the axisangle argument; the other
elements of this transform are unchanged; any preexisting scale
in the transform is preserved.

void 
setRotation(Matrix3d m1)
Sets the rotational component (upper 3x3) of this transform to the
matrix values in the double precision Matrix3d argument; the other
elements of this transform are unchanged; any preexisting scale
will be preserved; the argument matrix m1 will be checked for proper
normalization when this transform is internally classified.

void 
setRotation(Matrix3f m1)
Sets the rotational component (upper 3x3) of this transform to the
matrix values in the single precision Matrix3f argument; the other
elements of this transform are unchanged; any preexisting scale
will be preserved; the argument matrix m1 will be checked for proper
normalization when this transform is internally classified.

void 
setRotation(Quat4d q1)
Sets the rotational component (upper 3x3) of this transform to the
matrix equivalent values of the quaternion argument; the other
elements of this transform are unchanged; any preexisting scale
in the transform is preserved.

void 
setRotation(Quat4f q1)
Sets the rotational component (upper 3x3) of this transform to the
matrix equivalent values of the quaternion argument; the other
elements of this transform are unchanged; any preexisting scale
in the transform is preserved.

void 
setRotationScale(Matrix3d m1)
Replaces the upper 3x3 matrix values of this transform with the
values in the matrix m1.

void 
setRotationScale(Matrix3f m1)
Replaces the upper 3x3 matrix values of this transform with the
values in the matrix m1.

void 
setScale(double scale)
Sets the scale component of the current transform; any existing
scale is first factored out of the existing transform before
the new scale is applied.

void 
setScale(Vector3d scale)
Sets the possibly nonuniform scale component of the current
transform; any existing scale is first factored out of the
existing transform before the new scale is applied.

void 
setTranslation(Vector3d trans)
Replaces the translational components of this transform to the values
in the Vector3d argument; the other values of this transform are not
modified.

void 
setTranslation(Vector3f trans)
Replaces the translational components of this transform to the values
in the Vector3f argument; the other values of this transform are not
modified.

void 
setZero()
Sets this transform to all zeros.

void 
sub(Transform3D t1)
Subtracts transform t1 from this transform and places the result
into this: this = this  t1.

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

String 
toString()
Returns the matrix elements of this transform as a string.

void 
transform(Point3d point)
Transforms the point parameter with this transform and
places the result back into point.

void 
transform(Point3d point,
Point3d pointOut)
Transforms the point parameter with this transform and
places the result into pointOut.

void 
transform(Point3f point)
Transforms the point parameter with this transform and
places the result back into point.

void 
transform(Point3f point,
Point3f pointOut)
Transforms the point parameter with this transform and
places the result into pointOut.

void 
transform(Vector3d normal)
Transforms the normal parameter by this transform and places the value
back into normal.

void 
transform(Vector3d normal,
Vector3d normalOut)
Transforms the normal parameter by this transform and places the value
into normalOut.

void 
transform(Vector3f normal)
Transforms the normal parameter by this transform and places the value
back into normal.

void 
transform(Vector3f normal,
Vector3f normalOut)
Transforms the normal parameter by this transform and places the value
into normalOut.

void 
transform(Vector4d vec)
Transform the vector vec using this Transform and place the
result back into vec.

void 
transform(Vector4d vec,
Vector4d vecOut)
Transform the vector vec using this transform and place the
result into vecOut.

void 
transform(Vector4f vec)
Transform the vector vec using this Transform and place the
result back into vec.

void 
transform(Vector4f vec,
Vector4f vecOut)
Transform the vector vec using this Transform and place the
result into vecOut.

void 
transpose()
Transposes this matrix in place.

void 
transpose(Transform3D t1)
Transposes transform t1 and places the value into this transform.

public static final int ZERO
public static final int IDENTITY
public static final int SCALE
public static final int TRANSLATION
public static final int ORTHOGONAL
public static final int RIGID
public static final int CONGRUENT
public static final int AFFINE
public static final int NEGATIVE_DETERMINANT
public Transform3D(Matrix4f m1)
m1
 the 4 x 4 transformation matrixpublic Transform3D(Matrix4d m1)
m1
 the 4 x 4 transformation matrixpublic Transform3D(Transform3D t1)
t1
 the transformation object to be copiedpublic Transform3D()
public Transform3D(float[] matrix)
matrix
 a float array of 16public Transform3D(double[] matrix)
matrix
 a float array of 16public Transform3D(Quat4d q1, Vector3d t1, double s)
q1
 the quaternion value representing the rotational componentt1
 the translational component of the matrixs
 the scale value applied to the rotational componentspublic Transform3D(Quat4f q1, Vector3d t1, double s)
q1
 the quaternion value representing the rotational componentt1
 the translational component of the matrixs
 the scale value applied to the rotational componentspublic Transform3D(Quat4f q1, Vector3f t1, float s)
q1
 the quaternion value representing the rotational componentt1
 the translational component of the matrixs
 the scale value applied to the rotational componentspublic Transform3D(GMatrix m1)
m1
 the GMatrixpublic Transform3D(Matrix3f m1, Vector3d t1, double s)
m1
 the rotation matrix representing the rotational componentt1
 the translational component of the matrixs
 the scale value applied to the rotational componentspublic Transform3D(Matrix3d m1, Vector3d t1, double s)
m1
 the rotation matrix representing the rotational componentt1
 the translational component of the matrixs
 the scale value applied to the rotational componentspublic Transform3D(Matrix3f m1, Vector3f t1, float s)
m1
 the rotation matrix representing the rotational componentt1
 the translational component of the matrixs
 the scale value applied to the rotational componentspublic final int getType()
public final int getBestType()
public final boolean getDeterminantSign()
public final void setAutoNormalize(boolean autoNormalize)
autoNormalize
 the boolean state of auto normalizationpublic final boolean getAutoNormalize()
public String toString()
public final void setIdentity()
public final void setZero()
public final void add(Transform3D t1)
t1
 the transform to be added to this transformpublic final void add(Transform3D t1, Transform3D t2)
t1
 the transform to be addedt2
 the transform to be addedpublic final void sub(Transform3D t1)
t1
 the transform to be subtracted from this transformpublic final void sub(Transform3D t1, Transform3D t2)
t1
 the left transformt2
 the right transformpublic final void transpose()
public final void transpose(Transform3D t1)
t1
 the transform whose transpose is placed into this transformpublic final void set(Quat4f q1)
q1
 the quaternion to be convertedpublic final void set(Quat4d q1)
q1
 the quaternion to be convertedpublic final void setRotation(Matrix3d m1)
m1
 the double precision 3x3 matrixpublic final void setRotation(Matrix3f m1)
m1
 the single precision 3x3 matrixpublic final void setRotation(Quat4f q1)
q1
 the quaternion that specifies the rotationpublic final void setRotation(Quat4d q1)
q1
 the quaternion that specifies the rotationpublic final void set(AxisAngle4f a1)
a1
 the axisangle to be converted (x, y, z, angle)public final void set(AxisAngle4d a1)
a1
 the axisangle to be converted (x, y, z, angle)public final void setRotation(AxisAngle4d a1)
a1
 the axisangle to be converted (x, y, z, angle)public final void setRotation(AxisAngle4f a1)
a1
 the axisangle to be converted (x, y, z, angle)public void rotX(double angle)
angle
 the angle to rotate about the X axis in radianspublic void rotY(double angle)
angle
 the angle to rotate about the Y axis in radianspublic void rotZ(double angle)
angle
 the angle to rotate about the Z axis in radianspublic final void set(Vector3f trans)
trans
 the translational componentpublic final void set(Vector3d trans)
trans
 the translational componentpublic final void setScale(double scale)
scale
 the new scale amountpublic final void setScale(Vector3d scale)
scale
 the new x,y,z scale valuespublic final void setNonUniformScale(double xScale, double yScale, double zScale)
xScale
 the new X scale amountyScale
 the new Y scale amountzScale
 the new Z scale amountpublic final void setTranslation(Vector3f trans)
trans
 the translational componentpublic final void setTranslation(Vector3d trans)
trans
 the translational componentpublic final void set(Quat4d q1, Vector3d t1, double s)
q1
 the rotation expressed as a quaterniont1
 the translations
 the scale valuepublic final void set(Quat4f q1, Vector3d t1, double s)
q1
 the rotation expressed as a quaterniont1
 the translations
 the scale valuepublic final void set(Quat4f q1, Vector3f t1, float s)
q1
 the rotation expressed as a quaterniont1
 the translations
 the scale valuepublic final void set(Matrix3f m1, Vector3f t1, float s)
m1
 the rotation matrixt1
 the translations
 the scale valuepublic final void set(Matrix3f m1, Vector3d t1, double s)
m1
 the rotation matrixt1
 the translations
 the scale valuepublic final void set(Matrix3d m1, Vector3d t1, double s)
m1
 the rotation matrixt1
 the translations
 the scale valuepublic final void set(GMatrix matrix)
matrix
 the general matrix from which the Transform3D matrix is derivedpublic final void set(Transform3D t1)
t1
 the transform to be copiedpublic final void set(double[] matrix)
matrix
 the double precision array of length 16 in row major formatpublic final void set(float[] matrix)
matrix
 the single precision array of length 16 in row major formatpublic final void set(Matrix4d m1)
m1
 the double precision 4x4 matrixpublic final void set(Matrix4f m1)
m1
 the single precision 4x4 matrixpublic final void set(Matrix3f m1)
m1
 the single precision 3x3 matrixpublic final void set(Matrix3d m1)
m1
 the double precision 3x3 matrixpublic final void setEuler(Vector3d euler)
euler
 the Vector3d consisting of three rotation angles about X,Y,Zpublic final void get(double[] matrix)
matrix
 the double precision array of length 16public final void get(float[] matrix)
matrix
 the single precision array of length 16public final void get(Matrix3d m1)
m1
 the matrix into which the rotational component is placedpublic final void get(Matrix3f m1)
m1
 the matrix into which the rotational component is placedpublic final void get(Quat4f q1)
q1
 the quaternion into which the rotation component is placedpublic final void get(Quat4d q1)
q1
 the quaternion into which the rotation component is placedpublic final void get(Matrix4d matrix)
matrix
 the double precision matrixpublic final void get(Matrix4f matrix)
matrix
 the single precision matrixpublic final double get(Quat4d q1, Vector3d t1)
q1
 the quaternion representing the rotationt1
 the translation componentpublic final float get(Quat4f q1, Vector3f t1)
q1
 the quaternion representing the rotationt1
 the translation componentpublic final double get(Quat4f q1, Vector3d t1)
q1
 the quaternion representing the rotationt1
 the translation componentpublic final double get(Matrix3d m1, Vector3d t1)
m1
 the normalized matrix representing the rotationt1
 the translation componentpublic final float get(Matrix3f m1, Vector3f t1)
m1
 the normalized matrix representing the rotationt1
 the translation componentpublic final double get(Matrix3f m1, Vector3d t1)
m1
 the normalized matrix representing the rotationt1
 the translation componentpublic final double getScale()
public final void getScale(Vector3d scale)
scale
 the vector into which the x,y,z scale values will be placedpublic final void get(Vector3f trans)
trans
 the vector that will receive the translational componentpublic final void get(Vector3d trans)
trans
 the vector that will receive the translational componentpublic final void invert(Transform3D t1)
t1
 the transform to be invertedSingularMatrixException
 thrown if transform t1 is
not invertiblepublic final void invert()
SingularMatrixException
 thrown if this transform is
not invertiblepublic final double determinant()
public final void set(double scale)
scale
 the scale factor for the transformpublic final void set(double scale, Vector3d v1)
scale
 the scale factor for the transformv1
 the translation amountpublic final void set(float scale, Vector3f v1)
scale
 the scale factor for the transformv1
 the translation amountpublic final void set(Vector3d v1, double scale)
v1
 the translation amountscale
 the scale factor for the transform AND the translationpublic final void set(Vector3f v1, float scale)
v1
 the translation amountscale
 the scale factor for the transform AND the translationpublic final void mul(double scalar)
scalar
 the scalar multiplierpublic final void mul(double scalar, Transform3D t1)
scalar
 the scalar multipliert1
 the original transformpublic final void mul(Transform3D t1)
t1
 the other transformpublic final void mul(Transform3D t1, Transform3D t2)
t1
 the left transformt2
 the right transformpublic final void mulInverse(Transform3D t1)
t1
 the matrix whose inverse is computed.public final void mulInverse(Transform3D t1, Transform3D t2)
t1
 the left transform in the multiplicationt2
 the transform whose inverse is computed.public final void mulTransposeRight(Transform3D t1, Transform3D t2)
t1
 the transform on the left hand side of the multiplicationt2
 the transform whose transpose is computedpublic final void mulTransposeLeft(Transform3D t1, Transform3D t2)
t1
 the transform whose transpose is computedt2
 the transform on the right hand side of the multiplicationpublic final void mulTransposeBoth(Transform3D t1, Transform3D t2)
t1
 the transform on the left hand side of the multiplicationt2
 the transform on the right hand side of the multiplicationpublic final void normalize()
public final void normalize(Transform3D t1)
t1
 the source transform, which is not modifiedpublic final void normalizeCP()
public final void normalizeCP(Transform3D t1)
t1
 the transform to be normalizedpublic boolean equals(Transform3D t1)
t1
 the transform with which the comparison is madepublic boolean equals(Object o1)
public boolean epsilonEquals(Transform3D t1, double epsilon)
t1
 the transform to be compared to this transformepsilon
 the threshold valuepublic int hashCode()
public final void transform(Vector4d vec, Vector4d vecOut)
vec
 the double precision vector to be transformedvecOut
 the vector into which the transformed values are placedpublic final void transform(Vector4d vec)
vec
 the double precision vector to be transformedpublic final void transform(Vector4f vec, Vector4f vecOut)
vec
 the single precision vector to be transformedvecOut
 the vector into which the transformed values are placedpublic final void transform(Vector4f vec)
vec
 the single precision vector to be transformedpublic final void transform(Point3d point, Point3d pointOut)
point
 the input point to be transformedpointOut
 the transformed pointpublic final void transform(Point3d point)
point
 the input point to be transformedpublic final void transform(Vector3d normal, Vector3d normalOut)
normal
 the input normal to be transformednormalOut
 the transformed normalpublic final void transform(Vector3d normal)
normal
 the input normal to be transformedpublic final void transform(Point3f point, Point3f pointOut)
point
 the input point to be transformedpointOut
 the transformed pointpublic final void transform(Point3f point)
point
 the input point to be transformedpublic final void transform(Vector3f normal, Vector3f normalOut)
normal
 the input normal to be transformednormalOut
 the transformed normalpublic final void transform(Vector3f normal)
normal
 the input normal to be transformedpublic final void setRotationScale(Matrix3f m1)
m1
 the matrix that will be the new upper 3x3public final void setRotationScale(Matrix3d m1)
m1
 the matrix that will be the new upper 3x3public final void scaleAdd(double s, Transform3D t1, Transform3D t2)
s
 the scale factort1
 the transform to be scaledt2
 the transform to be addedpublic final void scaleAdd(double s, Transform3D t1)
s
 the scale factort1
 the transform to be addedpublic final void getRotationScale(Matrix3f m1)
m1
 the matrix that will hold the valuespublic final void getRotationScale(Matrix3d m1)
m1
 the matrix that will hold the valuespublic void lookAt(Point3d eye, Point3d center, Vector3d up)
eye
 the location of the eyecenter
 a point in the virtual world where the eye is lookingup
 an up vector specifying the frustum's up directionpublic void frustum(double left, double right, double bottom, double top, double near, double far)
The frustum functioncall 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 lowerleft and upperright corners of the window respectively, assuming the eye is located at (0, 0, 0).
left
 the vertical line on the left edge of the near
clipping plane mapped to the left edge of the graphics windowright
 the vertical line on the right edge of the near
clipping plane mapped to the right edge of the graphics windowbottom
 the horizontal line on the bottom edge of the near
clipping plane mapped to the bottom edge of the graphics windowtop
 the horizontal line on the top edge of the nearnear
 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.public void perspective(double fovx, double aspect, double zNear, double zFar)
fovx
 specifies the field of view in the x direction, in radiansaspect
 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 planepublic void ortho(double left, double right, double bottom, double top, double near, double far)
left
 the vertical line on the left edge of the near
clipping plane mapped to the left edge of the graphics windowright
 the vertical line on the right edge of the near
clipping plane mapped to the right edge of the graphics windowbottom
 the horizontal line on the bottom edge of the near
clipping plane mapped to the bottom edge of the graphics windowtop
 the horizontal line on the top edge of the near
clipping plane mapped to the top edge of the graphics windownear
 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 planeCopyright © 2016–2017 SciJava. All rights reserved.