| java.lang.Object javax.media.j3d.Transform3D
Transform3D | public class Transform3D (Code) | | A generalized transform object represented internally as a 4x4
double-precision floating point matrix. The mathematical
representation is
row major, as in traditional matrix mathematics.
A Transform3D is used to perform translations, rotations, and
scaling and shear effects.
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:
- ZERO - zero matrix. All of the elements in the matrix
have the value 0.
- IDENTITY - identity matrix. A matrix with ones on its
main diagonal and zeros every where else.
- SCALE - the matrix is a uniform scale matrix - there are
no rotational or translation components.
- ORTHOGONAL - the four row vectors that make up an orthogonal
matrix form a basis, meaning that they are mutually orthogonal.
The scale is unity and there are no translation components.
- RIGID - the upper 3 X 3 of the matrix is orthogonal, and
there is a translation component-the scale is unity.
- 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. These
operations preserve the distance between any two points, and the
angle between any two intersecting lines.
- AFFINE - an affine matrix can translate, rotate, reflect,
scale anisotropically, and shear. Lines remain straight, and parallel
lines remain parallel, but the angle between intersecting lines can
change.
A matrix is also classified by the sign of its determinant:
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.
The Java 3D model for 4 X 4 transformations is:
[ 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.
|
Field Summary | |
final public static int | AFFINE An affine matrix can translate, rotate, reflect, scale anisotropically,
and shear. | final public 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. | final static double | EPSILON | final static double | EPSILON_ABSOLUTE | final static double | EPSILON_RELATIVE | final public static int | IDENTITY An identity matrix. | final public 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. | final public 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. | final public 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. | final public static int | SCALE A Uniform scale matrix with no translation or other
off-diagonal components. | final public static int | TRANSLATION A translation-only matrix with ones on the diagonal. | final public static int | ZERO A zero matrix. | boolean | autoNormalize | double[] | mat | double[] | rot | double[] | scales |
Constructor Summary | |
public | Transform3D(Matrix4f m1) Constructs and initializes a transform from the 4 x 4 matrix. | public | Transform3D(Matrix4d m1) Constructs and initializes a transform from the 4 x 4 matrix. | public | Transform3D(Transform3D t1) Constructs and initializes a transform from the Transform3D object. | public | Transform3D() Constructs and initializes a transform to the identity matrix. | public | 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. | public | 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. | public | Transform3D(Quat4d q1, Vector3d t1, double s) Constructs and initializes a transform from the quaternion,
translation, and scale values. | public | Transform3D(Quat4f q1, Vector3d t1, double s) Constructs and initializes a transform from the quaternion,
translation, and scale values. | public | Transform3D(Quat4f q1, Vector3f t1, float s) Constructs and initializes a transform from the quaternion,
translation, and scale values. | public | Transform3D(GMatrix m1) Constructs a transform and initializes it to the upper 4 x 4
of the GMatrix argument. | public | Transform3D(Matrix3f m1, Vector3d t1, double s) Constructs and initializes a transform from the rotation matrix,
translation, and scale values. | public | Transform3D(Matrix3d m1, Vector3d t1, double s) Constructs and initializes a transform from the rotation matrix,
translation, and scale values. | public | Transform3D(Matrix3f m1, Vector3f t1, float s) Constructs and initializes a transform from the rotation matrix,
translation, and scale values. |
Method Summary | |
final public void | add(Transform3D t1) Adds this transform to transform t1 and places the result into
this: this = this + t1. | final public void | add(Transform3D t1, Transform3D t2) Adds transforms t1 and t2 and places the result into this transform. | final double | affineDeterminant() | static int | compute_2X2(double f, double g, double h, double[] single_values, double[] snl, double[] csl, double[] snr, double[] csr, int index) | static double | compute_rot(double f, double g, double[] sin, double[] cos, int index, int first) | final static double | compute_shift(double f, double g, double h) | final static double | d_sign(double a, double b) | final public double | determinant() Calculates and returns the determinant of this transform. | public boolean | epsilonEquals(Transform3D t1, double epsilon) Returns true if the L-infinite distance between this matrix
and matrix m1 is less than or equal to the epsilon parameter,
otherwise returns false. | public 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. | public 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.
Parameters: o1 - the object with which the comparison is made. | public void | frustum(double left, double right, double bottom, double top, double near, double far) Creates a perspective projection transform that mimics a standard,
camera-based,
view-model. | final public void | get(double[] matrix) Places the values of this transform into the double precision array
of length 16. | final public void | get(float[] matrix) Places the values of this transform into the single precision array
of length 16. | final public void | get(Matrix3d m1) Places the normalized rotational component of this transform
into the 3x3 matrix argument. | final public void | get(Matrix3f m1) Places the normalized rotational component of this transform
into the 3x3 matrix argument. | final public void | get(Quat4f q1) Places the quaternion equivalent of the normalized rotational
component of this transform into the quaternion parameter. | final public void | get(Quat4d q1) Places the quaternion equivalent of the normalized rotational
component of this transform into the quaternion parameter. | final public void | get(Matrix4d matrix) Places the values of this transform into the double precision
matrix argument. | final public void | get(Matrix4f matrix) Places the values of this transform into the single precision matrix
argument. | final public 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. | final public 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. | final public 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. | final public 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. | final public 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. | final public 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. | final public void | get(Vector3f trans) Retrieves the translational components of this transform. | final public void | get(Vector3d trans) Retrieves the translational components of this transform. | final public boolean | getAutoNormalize() Returns the state of auto-normalization. | final public 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. | final public boolean | getDeterminantSign() Returns the sign of the determinant of this matrix; a return value
of true indicates a non-negative determinant; a return value of false
indicates a negative determinant. | double | getDistanceScale() | final void | getRotation(Transform3D t) | final public void | getRotationScale(Matrix3f m1) Gets the upper 3x3 values of this matrix and places them into
the matrix m1. | final public void | getRotationScale(Matrix3d m1) Gets the upper 3x3 values of this matrix and places them into
the matrix m1. | final public double | getScale() Returns the uniform scale factor of this matrix. | final public void | getScale(Vector3d scale) Gets the possibly non-uniform scale components of the current
transform and places them into the scale vector. | final public int | getType() Returns the type of this matrix as an or'ed bitmask of
of all of the type classifications to which it belongs. | synchronized void | getWithLock(Transform3D t1) | public int | hashCode() Returns a hash code value based on the data values in this
object. | final public void | invert(Transform3D t1) Sets the value of this transform to the inverse of the passed
Transform3D parameter. | final public void | invert() Inverts this transform in place. | final void | invertAffine(Transform3D t1) Affine invert routine. | final void | invertAffine() Affine invert routine. | final void | invertGeneral(Transform3D t1) General invert routine. | final boolean | isAffine() | final boolean | isCongruent() | final boolean | isOrtho() | final boolean | isRigid() | public void | lookAt(Point3d eye, Point3d center, Vector3d up) Helping function that specifies the position and orientation of a
view matrix. | static void | luBacksubstitution(double[] matrix1, int[] row_perm, double[] matrix2) Solves a set of linear equations. | static boolean | luDecomposition(double[] matrix0, int[] row_perm) Given a 4x4 array "matrix0", this function replaces it with the
LU decomposition of a row-wise permutation of itself. | final static double | max(double a, double b) | final static double | min(double a, double b) | final public void | mul(double scalar) Multiplies each element of this transform by a scalar. | final public void | mul(double scalar, Transform3D t1) Multiplies each element of transform t1 by a scalar and places
the result into this. | final public void | mul(Transform3D t1) Sets the value of this transform to the result of multiplying itself
with transform t1 (this = this * t1). | final public 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). | final public void | mulInverse(Transform3D t1) Multiplies this transform by the inverse of transform t1. | final public void | mulInverse(Transform3D t1, Transform3D t2) Multiplies transform t1 by the inverse of transform t2. | final public 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)). | final public 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). | final public 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)). | final public void | normalize() Normalizes the rotational components (upper 3x3) of this matrix
in place using a Singular Value Decomposition (SVD).
This operation ensures that the column vectors of this matrix
are orthogonal to each other. | final public 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.
This operation ensures that the column vectors of this matrix
are orthogonal to each other. | final public void | normalizeCP() Normalizes the rotational components (upper 3x3) of this transform
in place using a Cross Product (CP) normalization.
This operation ensures that the column vectors of this matrix
are orthogonal to each other. | final public 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.
This operation ensures that the column vectors of this matrix
are orthogonal to each other. | public void | ortho(double left, double right, double bottom, double top, double near, double far) Creates an orthographic projection transform that mimics a standard,
camera-based,
view-model. | public void | perspective(double fovx, double aspect, double zNear, double zFar) Creates a perspective projection transform that mimics a standard,
camera-based,
view-model. | public void | rotX(double angle) Sets the value of this transform to a counter clockwise rotation
about the x axis. | public void | rotY(double angle) Sets the value of this transform to a counter clockwise rotation about
the y axis. | public void | rotZ(double angle) Sets the value of this transform to a counter clockwise rotation
about the z axis. | final boolean | rotateZero() | final public 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). | final public 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). | final public void | set(Quat4f q1) Sets the value of this transform to the matrix conversion of the
single precision quaternion argument; the non-rotational
components are set as if this were an identity matrix. | final public void | set(Quat4d q1) Sets the value of this transform to the matrix conversion of the
double precision quaternion argument; the non-rotational
components are set as if this were an identity matrix. | final public void | set(AxisAngle4f a1) Sets the value of this transform to the matrix conversion
of the single precision axis-angle argument; all of the matrix
values are modified. | final public void | set(AxisAngle4d a1) Sets the value of this transform to the matrix conversion
of the double precision axis-angle argument; all of the matrix
values are modified. | final public 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. | final public 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. | final public 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. | final public 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. | final public 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. | final public 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. | final public 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. | final public 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. | final public void | set(GMatrix matrix) Sets the matrix values of this transform to the matrix values in the
upper 4x4 corner of the GMatrix parameter. | final public void | set(Transform3D t1) Sets the matrix, type, and state of this transform to the matrix,
type, and state of transform t1. | final public void | set(double[] matrix) Sets the matrix values of this transform to the matrix values in the
double precision array parameter. | final public void | set(float[] matrix) Sets the matrix values of this transform to the matrix values in the
single precision array parameter. | final public void | set(Matrix4d m1) Sets the matrix values of this transform to the matrix values in the
double precision Matrix4d argument. | final public void | set(Matrix4f m1) Sets the matrix values of this transform to the matrix values in the
single precision Matrix4f argument. | final public 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). | final public 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). | final public void | set(double scale) Sets the value of this transform to a uniform scale; all of
the matrix values are modified. | final public 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. | final public 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. | final public 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. | final public 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. | final public void | setAutoNormalize(boolean autoNormalize) Sets a flag that enables or disables automatic SVD
normalization. | final public 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
non-rotational elements are set as if this were an identity matrix.
The euler parameter is a Vector3d consisting of three rotation angles
applied first about the X, then Y then Z axis.
These rotations are applied using a static frame of reference. | final public void | setIdentity() Sets this transform to the identity matrix. | final public void | setNonUniformScale(double xScale, double yScale, double zScale) Replaces the current transform with a non-uniform scale transform. | final void | setOrthoDirtyBit() | final public 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 pre-existing scale
will be preserved; the argument matrix m1 will be checked for proper
normalization when this transform is internally classified. | final public 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 pre-existing scale
will be preserved; the argument matrix m1 will be checked for proper
normalization when this transform is internally classified. | final public 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 pre-existing scale
in the transform is preserved. | final public 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 pre-existing scale
in the transform is preserved. | final public void | setRotation(AxisAngle4d a1) Sets the rotational component (upper 3x3) of this transform to the
matrix equivalent values of the axis-angle argument; the other
elements of this transform are unchanged; any pre-existing scale
in the transform is preserved. | final public void | setRotation(AxisAngle4f a1) Sets the rotational component (upper 3x3) of this transform to the
matrix equivalent values of the axis-angle argument; the other
elements of this transform are unchanged; any pre-existing scale
in the transform is preserved. | final public void | setRotationScale(Matrix3f m1) Replaces the upper 3x3 matrix values of this transform with the
values in the matrix m1. | final public void | setRotationScale(Matrix3d m1) Replaces the upper 3x3 matrix values of this transform with the
values in the matrix m1. | final public 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. | final public void | setScale(Vector3d scale) Sets the possibly non-uniform scale component of the current
transform; any existing scale is first factored out of the
existing transform before the new scale is applied. | final public 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. | final public 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. | synchronized void | setWithLock(Transform3D t1) | final public void | setZero() Sets this transform to all zeros. | final public void | sub(Transform3D t1) Subtracts transform t1 from this transform and places the result
into this: this = this - t1. | final public void | sub(Transform3D t1, Transform3D t2) Subtracts transform t2 from transform t1 and places the result into
this: this = t1 - t2. | public String | toString() Returns the matrix elements of this transform as a string. | void | transform(Point3d point, Point4d pointOut) Transforms the point parameter with this transform and
places the result into pointOut. | final public void | transform(Vector4d vec, Vector4d vecOut) Transform the vector vec using this transform and place the
result into vecOut. | final public void | transform(Vector4d vec) Transform the vector vec using this Transform and place the
result back into vec. | final public void | transform(Vector4f vec, Vector4f vecOut) Transform the vector vec using this Transform and place the
result into vecOut. | final public void | transform(Vector4f vec) Transform the vector vec using this Transform and place the
result back into vec. | final public void | transform(Point3d point, Point3d pointOut) Transforms the point parameter with this transform and
places the result into pointOut. | final public void | transform(Point3d point) Transforms the point parameter with this transform and
places the result back into point. | final public void | transform(Vector3d normal, Vector3d normalOut) Transforms the normal parameter by this transform and places the value
into normalOut. | final public void | transform(Vector3d normal) Transforms the normal parameter by this transform and places the value
back into normal. | final public void | transform(Point3f point, Point3f pointOut) Transforms the point parameter with this transform and
places the result into pointOut. | final public void | transform(Point3f point) Transforms the point parameter with this transform and
places the result back into point. | final public void | transform(Vector3f normal, Vector3f normalOut) Transforms the normal parameter by this transform and places the value
into normalOut. | final public void | transform(Vector3f normal) Transforms the normal parameter by this transform and places the value
back into normal. | final public void | transpose() Transposes this matrix in place. | final public void | transpose(Transform3D t1) Transposes transform t1 and places the value into this transform. | final boolean | zeroTranslation() |
AFFINE | final public static int AFFINE(Code) | | An affine matrix can translate, rotate, reflect, scale anisotropically,
and shear. Lines remain straight, and parallel lines remain parallel,
but the angle between intersecting lines can change. In order for a
transform to be classified as affine, the 4th row must be: [0, 0, 0, 1].
|
CONGRUENT | final public static int CONGRUENT(Code) | | 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.
These operations preserve the distance between any two points and the
angle between any two intersecting lines.
|
EPSILON | final static double EPSILON(Code) | | |
EPSILON_ABSOLUTE | final static double EPSILON_ABSOLUTE(Code) | | |
EPSILON_RELATIVE | final static double EPSILON_RELATIVE(Code) | | |
IDENTITY | final public static int IDENTITY(Code) | | An identity matrix.
|
NEGATIVE_DETERMINANT | final public static int NEGATIVE_DETERMINANT(Code) | | 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.
|
ORTHOGONAL | final public static int ORTHOGONAL(Code) | | 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.
|
RIGID | final public static int RIGID(Code) | | 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.
|
SCALE | final public static int SCALE(Code) | | A Uniform scale matrix with no translation or other
off-diagonal components.
|
TRANSLATION | final public static int TRANSLATION(Code) | | A translation-only matrix with ones on the diagonal.
|
ZERO | final public static int ZERO(Code) | | A zero matrix.
|
autoNormalize | boolean autoNormalize(Code) | | |
Transform3D | public Transform3D(Matrix4f m1)(Code) | | Constructs and initializes a transform from the 4 x 4 matrix. The
type of the constructed transform will be classified automatically.
Parameters: m1 - the 4 x 4 transformation matrix |
Transform3D | public Transform3D(Matrix4d m1)(Code) | | Constructs and initializes a transform from the 4 x 4 matrix. The
type of the constructed transform will be classified automatically.
Parameters: m1 - the 4 x 4 transformation matrix |
Transform3D | public Transform3D(Transform3D t1)(Code) | | Constructs and initializes a transform from the Transform3D object.
Parameters: t1 - the transformation object to be copied |
Transform3D | public Transform3D()(Code) | | Constructs and initializes a transform to the identity matrix.
|
Transform3D | public Transform3D(float[] matrix)(Code) | | 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. The type of the transform
object is classified internally.
Parameters: matrix - a float array of 16 |
Transform3D | public Transform3D(double[] matrix)(Code) | | 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. The type of the transform is
classified internally.
Parameters: matrix - a float array of 16 |
Transform3D | public Transform3D(Quat4d q1, Vector3d t1, double s)(Code) | | Constructs and initializes a transform from the quaternion,
translation, and scale values. The scale is applied only to the
rotational components of the matrix (upper 3 x 3) and not to the
translational components of the matrix.
Parameters: q1 - the quaternion value representing the rotational component Parameters: t1 - the translational component of the matrix Parameters: s - the scale value applied to the rotational components |
Transform3D | public Transform3D(Quat4f q1, Vector3d t1, double s)(Code) | | Constructs and initializes a transform from the quaternion,
translation, and scale values. The scale is applied only to the
rotational components of the matrix (upper 3 x 3) and not to the
translational components of the matrix.
Parameters: q1 - the quaternion value representing the rotational component Parameters: t1 - the translational component of the matrix Parameters: s - the scale value applied to the rotational components |
Transform3D | public Transform3D(Quat4f q1, Vector3f t1, float s)(Code) | | Constructs and initializes a transform from the quaternion,
translation, and scale values. The scale is applied only to the
rotational components of the matrix (upper 3 x 3) and not to the
translational components of the matrix.
Parameters: q1 - the quaternion value representing the rotational component Parameters: t1 - the translational component of the matrix Parameters: s - the scale value applied to the rotational components |
Transform3D | public Transform3D(GMatrix m1)(Code) | | Constructs a transform and initializes it to the upper 4 x 4
of the GMatrix argument. If the parameter matrix is
smaller than 4 x 4, the remaining elements in the transform matrix are
assigned to zero.
Parameters: m1 - the GMatrix |
Transform3D | public Transform3D(Matrix3f m1, Vector3d t1, double s)(Code) | | Constructs and initializes a transform from the rotation matrix,
translation, and scale values. The scale is applied only to the
rotational component of the matrix (upper 3x3) and not to the
translational component of the matrix.
Parameters: m1 - the rotation matrix representing the rotational component Parameters: t1 - the translational component of the matrix Parameters: s - the scale value applied to the rotational components |
Transform3D | public Transform3D(Matrix3d m1, Vector3d t1, double s)(Code) | | Constructs and initializes a transform from the rotation matrix,
translation, and scale values. The scale is applied only to the
rotational components of the matrix (upper 3x3) and not to the
translational components of the matrix.
Parameters: m1 - the rotation matrix representing the rotational component Parameters: t1 - the translational component of the matrix Parameters: s - the scale value applied to the rotational components |
Transform3D | public Transform3D(Matrix3f m1, Vector3f t1, float s)(Code) | | Constructs and initializes a transform from the rotation matrix,
translation, and scale values. The scale is applied only to the
rotational components of the matrix (upper 3x3) and not to the
translational components of the matrix.
Parameters: m1 - the rotation matrix representing the rotational component Parameters: t1 - the translational component of the matrix Parameters: s - the scale value applied to the rotational components |
add | final public void add(Transform3D t1)(Code) | | Adds this transform to transform t1 and places the result into
this: this = this + t1.
Parameters: t1 - the transform to be added to this transform |
add | final public void add(Transform3D t1, Transform3D t2)(Code) | | Adds transforms t1 and t2 and places the result into this transform.
Parameters: t1 - the transform to be added Parameters: t2 - the transform to be added |
affineDeterminant | final double affineDeterminant()(Code) | | |
compute_2X2 | static int compute_2X2(double f, double g, double h, double[] single_values, double[] snl, double[] csl, double[] snr, double[] csr, int index)(Code) | | |
compute_rot | static double compute_rot(double f, double g, double[] sin, double[] cos, int index, int first)(Code) | | |
compute_shift | final static double compute_shift(double f, double g, double h)(Code) | | |
d_sign | final static double d_sign(double a, double b)(Code) | | |
determinant | final public double determinant()(Code) | | Calculates and returns the determinant of this transform.
the double precision determinant |
epsilonEquals | public boolean epsilonEquals(Transform3D t1, double epsilon)(Code) | | Returns true if the L-infinite distance between this matrix
and matrix m1 is less than or equal to the epsilon parameter,
otherwise returns false. The L-infinite
distance is equal to
MAX[i=0,1,2,3 ; j=0,1,2,3 ; abs[(this.m(i,j) - m1.m(i,j)]
Parameters: t1 - the transform to be compared to this transform Parameters: epsilon - the threshold value |
equals | public boolean equals(Transform3D t1)(Code) | | Returns true if all of the data members of transform t1 are
equal to the corresponding data members in this Transform3D.
Parameters: t1 - the transform with which the comparison is made true or false |
equals | public boolean equals(Object o1)(Code) | | 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.
Parameters: o1 - the object with which the comparison is made. true or false |
frustum | public void frustum(double left, double right, double bottom, double top, double near, double far)(Code) | | Creates a perspective projection transform that mimics a standard,
camera-based,
view-model. This transform maps coordinates from Eye Coordinates (EC)
to Clipping Coordinates (CC). Note that unlike the similar function
in OpenGL, the clipping coordinates generated by the resulting
transform are in a right-handed coordinate system
(as are all other coordinate systems in Java 3D).
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 nearclipping plane mapped to the left edge of the graphics window Parameters: right - the vertical line on the right edge of the nearclipping plane mapped to the right edge of the graphics window Parameters: bottom - the horizontal line on the bottom edge of the nearclipping plane mapped to the bottom edge of the graphics window Parameters: top - the horizontal line on the top edge of the near Parameters: near - the distance to the frustum's near clipping plane.This value must be positive, (the value -near is the location of thenear clip plane). Parameters: far - the distance to the frustum's far clipping plane.This value must be positive, and must be greater than near. |
get | final public void get(double[] matrix)(Code) | | Places the values of this transform into the double precision array
of length 16. The first four elements of the array will contain
the top row of the transform matrix, etc.
Parameters: matrix - the double precision array of length 16 |
get | final public void get(float[] matrix)(Code) | | Places the values of this transform into the single precision array
of length 16. The first four elements of the array will contain
the top row of the transform matrix, etc.
Parameters: matrix - the single precision array of length 16 |
get | final public void get(Matrix3d m1)(Code) | | Places the normalized rotational component of this transform
into the 3x3 matrix argument.
Parameters: m1 - the matrix into which the rotational component is placed |
get | final public void get(Matrix3f m1)(Code) | | Places the normalized rotational component of this transform
into the 3x3 matrix argument.
Parameters: m1 - the matrix into which the rotational component is placed |
get | final public void get(Quat4f q1)(Code) | | Places the quaternion equivalent of the normalized rotational
component of this transform into the quaternion parameter.
Parameters: q1 - the quaternion into which the rotation component is placed |
get | final public void get(Quat4d q1)(Code) | | Places the quaternion equivalent of the normalized rotational
component of this transform into the quaternion parameter.
Parameters: q1 - the quaternion into which the rotation component is placed |
get | final public void get(Matrix4d matrix)(Code) | | Places the values of this transform into the double precision
matrix argument.
Parameters: matrix - the double precision matrix |
get | final public void get(Matrix4f matrix)(Code) | | Places the values of this transform into the single precision matrix
argument.
Parameters: matrix - the single precision matrix |
get | final public double get(Quat4d q1, Vector3d t1)(Code) | | Places the quaternion equivalent of the normalized rotational
component of this transform into the quaternion parameter;
places the translational component into the Vector parameter.
Parameters: q1 - the quaternion representing the rotation Parameters: t1 - the translation component the scale component of this transform |
get | final public float get(Quat4f q1, Vector3f t1)(Code) | | Places the quaternion equivalent of the normalized rotational
component of this transform into the quaternion parameter;
places the translational component into the Vector parameter.
Parameters: q1 - the quaternion representing the rotation Parameters: t1 - the translation component the scale component of this transform |
get | final public double get(Quat4f q1, Vector3d t1)(Code) | | Places the quaternion equivalent of the normalized rotational
component of this transform into the quaternion parameter;
places the translational component into the Vector parameter.
Parameters: q1 - the quaternion representing the rotation Parameters: t1 - the translation component the scale component of this transform |
get | final public double get(Matrix3d m1, Vector3d t1)(Code) | | Places the normalized rotational component of this transform
into the matrix parameter; place the translational component
into the vector parameter.
Parameters: m1 - the normalized matrix representing the rotation Parameters: t1 - the translation component the scale component of this transform |
get | final public float get(Matrix3f m1, Vector3f t1)(Code) | | Places the normalized rotational component of this transform
into the matrix parameter; place the translational component
into the vector parameter.
Parameters: m1 - the normalized matrix representing the rotation Parameters: t1 - the translation component the scale component of this transform |
get | final public double get(Matrix3f m1, Vector3d t1)(Code) | | Places the normalized rotational component of this transform
into the matrix parameter; place the translational component
into the vector parameter.
Parameters: m1 - the normalized matrix representing the rotation Parameters: t1 - the translation component the scale component of this transform |
get | final public void get(Vector3f trans)(Code) | | Retrieves the translational components of this transform.
Parameters: trans - the vector that will receive the translational component |
get | final public void get(Vector3d trans)(Code) | | Retrieves the translational components of this transform.
Parameters: trans - the vector that will receive the translational component |
getAutoNormalize | final public boolean getAutoNormalize()(Code) | | Returns the state of auto-normalization.
boolean state of auto-normalization |
getBestType | final public int getBestType()(Code) | | 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.
If the matrix is ORTHOGONAL, calling the method
getDeterminantSign() will yield more information.
the least general matrix type |
getDeterminantSign | final public boolean getDeterminantSign()(Code) | | Returns the sign of the determinant of this matrix; a return value
of true indicates a non-negative determinant; a return value of false
indicates a negative determinant. A value of true will be returned if
the determinant is NaN. In general, an orthogonal matrix
with a positive determinant is a pure rotation matrix; an orthogonal
matrix with a negative determinant is a both a rotation and a
reflection matrix.
determinant sign : true means non-negative, false means negative |
getDistanceScale | double getDistanceScale()(Code) | | get the scaling factor of matrix in this transform,
use for distance scaling
|
getRotationScale | final public void getRotationScale(Matrix3f m1)(Code) | | Gets the upper 3x3 values of this matrix and places them into
the matrix m1.
Parameters: m1 - the matrix that will hold the values |
getRotationScale | final public void getRotationScale(Matrix3d m1)(Code) | | Gets the upper 3x3 values of this matrix and places them into
the matrix m1.
Parameters: m1 - the matrix that will hold the values |
getScale | final public double getScale()(Code) | | Returns the uniform scale factor of this matrix.
If the matrix has non-uniform scale factors, the largest of the
x, y, and z scale factors will be returned.
the scale factor of this matrix |
getScale | final public void getScale(Vector3d scale)(Code) | | Gets the possibly non-uniform scale components of the current
transform and places them into the scale vector.
Parameters: scale - the vector into which the x,y,z scale values will be placed |
getType | final public int getType()(Code) | | Returns the type of this matrix as an or'ed bitmask of
of all of the type classifications to which it belongs.
or'ed bitmask of all of the type classificationsof this transform |
hashCode | public int hashCode()(Code) | | Returns a hash code value based on the data values in this
object. Two different Transform3D objects with identical data
values (i.e., Transform3D.equals returns true) will return the
same hash number. Two Transform3D objects with different data
members may return the same hash value, although this is not
likely.
the integer hash code value |
invert | final public void invert(Transform3D t1)(Code) | | Sets the value of this transform to the inverse of the passed
Transform3D parameter. This method uses the transform type
to determine the optimal algorithm for inverting transform t1.
Parameters: t1 - the transform to be inverted exception: SingularMatrixException - thrown if transform t1 isnot invertible |
invert | final public void invert()(Code) | | Inverts this transform in place. This method uses the transform
type to determine the optimal algorithm for inverting this transform.
exception: SingularMatrixException - thrown if this transform isnot invertible |
invertAffine | final void invertAffine(Transform3D t1)(Code) | | Affine invert routine. Inverts t1 and places the result in "this".
|
invertAffine | final void invertAffine()(Code) | | Affine invert routine. Inverts "this" matrix in place.
|
invertGeneral | final void invertGeneral(Transform3D t1)(Code) | | General invert routine. Inverts t1 and places the result in "this".
Note that this routine handles both the "this" version and the
non-"this" version.
Also note that since this routine is slow anyway, we won't worry
about allocating a little bit of garbage.
|
isAffine | final boolean isAffine()(Code) | | |
isCongruent | final boolean isCongruent()(Code) | | |
isOrtho | final boolean isOrtho()(Code) | | |
isRigid | final boolean isRigid()(Code) | | |
lookAt | public void lookAt(Point3d eye, Point3d center, Vector3d up)(Code) | | Helping function that specifies the position and orientation of a
view matrix. The inverse of this transform can be used to control
the ViewPlatform object within the scene graph.
Parameters: eye - the location of the eye Parameters: center - a point in the virtual world where the eye is looking Parameters: up - an up vector specifying the frustum's up direction |
luBacksubstitution | static void luBacksubstitution(double[] matrix1, int[] row_perm, double[] matrix2)(Code) | | Solves a set of linear equations. The input parameters "matrix1",
and "row_perm" come from luDecompostionD4x4 and do not change
here. The parameter "matrix2" is a set of column vectors assembled
into a 4x4 matrix of floating-point values. The procedure takes each
column of "matrix2" in turn and treats it as the right-hand side of the
matrix equation Ax = LUx = b. The solution vector replaces the
original column of the matrix.
If "matrix2" is the identity matrix, the procedure replaces its contents
with the inverse of the matrix from which "matrix1" was originally
derived.
|
luDecomposition | static boolean luDecomposition(double[] matrix0, int[] row_perm)(Code) | | Given a 4x4 array "matrix0", this function replaces it with the
LU decomposition of a row-wise permutation of itself. The input
parameters are "matrix0" and "dimen". The array "matrix0" is also
an output parameter. The vector "row_perm[4]" is an output
parameter that contains the row permutations resulting from partial
pivoting. The output parameter "even_row_xchg" is 1 when the
number of row exchanges is even, or -1 otherwise. Assumes data
type is always double.
This function is similar to luDecomposition, except that it
is tuned specifically for 4x4 matrices.
true if the matrix is nonsingular, or false otherwise. |
max | final static double max(double a, double b)(Code) | | |
min | final static double min(double a, double b)(Code) | | |
mul | final public void mul(double scalar)(Code) | | Multiplies each element of this transform by a scalar.
Parameters: scalar - the scalar multiplier |
mul | final public void mul(double scalar, Transform3D t1)(Code) | | Multiplies each element of transform t1 by a scalar and places
the result into this. Transform t1 is not modified.
Parameters: scalar - the scalar multiplier Parameters: t1 - the original transform |
mul | final public void mul(Transform3D t1)(Code) | | Sets the value of this transform to the result of multiplying itself
with transform t1 (this = this * t1).
Parameters: t1 - the other transform |
mul | final public void mul(Transform3D t1, Transform3D t2)(Code) | | Sets the value of this transform to the result of multiplying transform
t1 by transform t2 (this = t1*t2).
Parameters: t1 - the left transform Parameters: t2 - the right transform |
mulInverse | final public void mulInverse(Transform3D t1)(Code) | | Multiplies this transform by the inverse of transform t1. The final
value is placed into this matrix (this = this*t1^-1).
Parameters: t1 - the matrix whose inverse is computed. |
mulInverse | final public void mulInverse(Transform3D t1, Transform3D t2)(Code) | | Multiplies transform t1 by the inverse of transform t2. The final
value is placed into this matrix (this = t1*t2^-1).
Parameters: t1 - the left transform in the multiplication Parameters: t2 - the transform whose inverse is computed. |
mulTransposeBoth | final public void mulTransposeBoth(Transform3D t1, Transform3D t2)(Code) | | Multiplies the transpose of transform t1 by the transpose of
transform t2 and places the result into this transform
(this = transpose(t1) * transpose(t2)).
Parameters: t1 - the transform on the left hand side of the multiplication Parameters: t2 - the transform on the right hand side of the multiplication |
mulTransposeLeft | final public void mulTransposeLeft(Transform3D t1, Transform3D t2)(Code) | | Multiplies the transpose of transform t1 by transform t2 and places
the result into this matrix (this = transpose(t1) * t2).
Parameters: t1 - the transform whose transpose is computed Parameters: t2 - the transform on the right hand side of the multiplication |
mulTransposeRight | final public void mulTransposeRight(Transform3D t1, Transform3D t2)(Code) | | Multiplies transform t1 by the transpose of transform t2 and places
the result into this transform (this = t1 * transpose(t2)).
Parameters: t1 - the transform on the left hand side of the multiplication Parameters: t2 - the transform whose transpose is computed |
normalize | final public void normalize()(Code) | | Normalizes the rotational components (upper 3x3) of this matrix
in place using a Singular Value Decomposition (SVD).
This operation ensures that the column vectors of this matrix
are orthogonal to each other. The primary use of this method
is to correct for floating point errors that accumulate over
time when concatenating a large number of rotation matrices.
Note that the scale of the matrix is not altered by this method.
|
normalize | final public void normalize(Transform3D t1)(Code) | | Normalizes the rotational components (upper 3x3) of transform t1
using a Singular Value Decomposition (SVD), and places the result
into this transform.
This operation ensures that the column vectors of this matrix
are orthogonal to each other. The primary use of this method
is to correct for floating point errors that accumulate over
time when concatenating a large number of rotation matrices.
Note that the scale of the matrix is not altered by this method.
Parameters: t1 - the source transform, which is not modified |
normalizeCP | final public void normalizeCP()(Code) | | Normalizes the rotational components (upper 3x3) of this transform
in place using a Cross Product (CP) normalization.
This operation ensures that the column vectors of this matrix
are orthogonal to each other. The primary use of this method
is to correct for floating point errors that accumulate over
time when concatenating a large number of rotation matrices.
Note that the scale of the matrix is not altered by this method.
|
normalizeCP | final public void normalizeCP(Transform3D t1)(Code) | | Normalizes the rotational components (upper 3x3) of transform t1
using a Cross Product (CP) normalization, and
places the result into this transform.
This operation ensures that the column vectors of this matrix
are orthogonal to each other. The primary use of this method
is to correct for floating point errors that accumulate over
time when concatenating a large number of rotation matrices.
Note that the scale of the matrix is not altered by this method.
Parameters: t1 - the transform to be normalized |
ortho | public void ortho(double left, double right, double bottom, double top, double near, double far)(Code) | | Creates an orthographic projection transform that mimics a standard,
camera-based,
view-model. This transform maps coordinates from Eye Coordinates (EC)
to Clipping Coordinates (CC). Note that unlike the similar function
in OpenGL, the clipping coordinates generated by the resulting
transform are in a right-handed coordinate system
(as are all other coordinate systems in Java 3D).
Parameters: left - the vertical line on the left edge of the nearclipping plane mapped to the left edge of the graphics window Parameters: right - the vertical line on the right edge of the nearclipping plane mapped to the right edge of the graphics window Parameters: bottom - the horizontal line on the bottom edge of the nearclipping plane mapped to the bottom edge of the graphics window Parameters: top - the horizontal line on the top edge of the nearclipping plane mapped to the top edge of the graphics window Parameters: near - the distance to the frustum's near clipping plane(the value -near is the location of the near clip plane) Parameters: far - the distance to the frustum's far clipping plane |
perspective | public void perspective(double fovx, double aspect, double zNear, double zFar)(Code) | | Creates a perspective projection transform that mimics a standard,
camera-based,
view-model. This transform maps coordinates from Eye Coordinates (EC)
to Clipping Coordinates (CC). Note that unlike the similar function
in OpenGL, the clipping coordinates generated by the resulting
transform are in a right-handed coordinate system
(as are all other coordinate systems in Java 3D). Also note that the
field of view is specified in radians.
Parameters: fovx - specifies the field of view in the x direction, in radians Parameters: aspect - specifies the aspect ratio and thus the field ofview in the x direction. The aspect ratio is the ratio of x to y,or width to height. Parameters: zNear - the distance to the frustum's near clipping plane.This value must be positive, (the value -zNear is the location of thenear clip plane). Parameters: zFar - the distance to the frustum's far clipping plane |
rotX | public void rotX(double angle)(Code) | | Sets the value of this transform to a counter clockwise rotation
about the x axis. All of the non-rotational components are set as
if this were an identity matrix.
Parameters: angle - the angle to rotate about the X axis in radians |
rotY | public void rotY(double angle)(Code) | | Sets the value of this transform to a counter clockwise rotation about
the y axis. All of the non-rotational components are set as if this
were an identity matrix.
Parameters: angle - the angle to rotate about the Y axis in radians |
rotZ | public void rotZ(double angle)(Code) | | Sets the value of this transform to a counter clockwise rotation
about the z axis. All of the non-rotational components are set
as if this were an identity matrix.
Parameters: angle - the angle to rotate about the Z axis in radians |
rotateZero | final boolean rotateZero()(Code) | | |
scaleAdd | final public void scaleAdd(double s, Transform3D t1, Transform3D t2)(Code) | | Scales transform t1 by a Uniform scale matrix with scale
factor s and then adds transform t2 (this = S*t1 + t2).
Parameters: s - the scale factor Parameters: t1 - the transform to be scaled Parameters: t2 - the transform to be added |
scaleAdd | final public void scaleAdd(double s, Transform3D t1)(Code) | | Scales this transform by a Uniform scale matrix with scale factor
s and then adds transform t1 (this = S*this + t1).
Parameters: s - the scale factor Parameters: t1 - the transform to be added |
set | final public void set(Quat4f q1)(Code) | | Sets the value of this transform to the matrix conversion of the
single precision quaternion argument; the non-rotational
components are set as if this were an identity matrix.
Parameters: q1 - the quaternion to be converted |
set | final public void set(Quat4d q1)(Code) | | Sets the value of this transform to the matrix conversion of the
double precision quaternion argument; the non-rotational
components are set as if this were an identity matrix.
Parameters: q1 - the quaternion to be converted |
set | final public void set(AxisAngle4f a1)(Code) | | Sets the value of this transform to the matrix conversion
of the single precision axis-angle argument; all of the matrix
values are modified.
Parameters: a1 - the axis-angle to be converted (x, y, z, angle) |
set | final public void set(AxisAngle4d a1)(Code) | | Sets the value of this transform to the matrix conversion
of the double precision axis-angle argument; all of the matrix
values are modified.
Parameters: a1 - the axis-angle to be converted (x, y, z, angle) |
set | final public void set(Vector3f trans)(Code) | | 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.
Parameters: trans - the translational component |
set | final public void set(Vector3d trans)(Code) | | 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.
Parameters: trans - the translational component |
set | final public void set(Quat4d q1, Vector3d t1, double s)(Code) | | Sets the value of this matrix from the rotation expressed
by the quaternion q1, the translation t1, and the scale s.
Parameters: q1 - the rotation expressed as a quaternion Parameters: t1 - the translation Parameters: s - the scale value |
set | final public void set(Quat4f q1, Vector3d t1, double s)(Code) | | Sets the value of this matrix from the rotation expressed
by the quaternion q1, the translation t1, and the scale s.
Parameters: q1 - the rotation expressed as a quaternion Parameters: t1 - the translation Parameters: s - the scale value |
set | final public void set(Quat4f q1, Vector3f t1, float s)(Code) | | Sets the value of this matrix from the rotation expressed
by the quaternion q1, the translation t1, and the scale s.
Parameters: q1 - the rotation expressed as a quaternion Parameters: t1 - the translation Parameters: s - the scale value |
set | final public void set(Matrix3f m1, Vector3f t1, float s)(Code) | | Sets the value of this matrix from the rotation expressed
by the rotation matrix m1, the translation t1, and the scale s.
The scale is only applied to the
rotational component of the matrix (upper 3x3) and not to the
translational component of the matrix.
Parameters: m1 - the rotation matrix Parameters: t1 - the translation Parameters: s - the scale value |
set | final public void set(Matrix3f m1, Vector3d t1, double s)(Code) | | Sets the value of this matrix from the rotation expressed
by the rotation matrix m1, the translation t1, and the scale s.
The scale is only applied to the
rotational component of the matrix (upper 3x3) and not to the
translational component of the matrix.
Parameters: m1 - the rotation matrix Parameters: t1 - the translation Parameters: s - the scale value |
set | final public void set(Matrix3d m1, Vector3d t1, double s)(Code) | | Sets the value of this matrix from the rotation expressed
by the rotation matrix m1, the translation t1, and the scale s.
The scale is only applied to the
rotational component of the matrix (upper 3x3) and not to the
translational component of the matrix.
Parameters: m1 - the rotation matrix Parameters: t1 - the translation Parameters: s - the scale value |
set | final public void set(GMatrix matrix)(Code) | | Sets the matrix values of this transform to the matrix values in the
upper 4x4 corner of the GMatrix parameter. If the parameter matrix is
smaller than 4x4, the remaining elements in the transform matrix are
assigned to zero. The transform matrix type is classified
internally by the Transform3D class.
Parameters: matrix - the general matrix from which the Transform3D matrix is derived |
set | final public void set(Transform3D t1)(Code) | | Sets the matrix, type, and state of this transform to the matrix,
type, and state of transform t1.
Parameters: t1 - the transform to be copied |
set | final public void set(double[] matrix)(Code) | | Sets the matrix values of this transform to the matrix values in the
double precision array parameter. The matrix type is classified
internally by the Transform3D class.
Parameters: matrix - the double precision array of length 16 in row major format |
set | final public void set(float[] matrix)(Code) | | Sets the matrix values of this transform to the matrix values in the
single precision array parameter. The matrix type is classified
internally by the Transform3D class.
Parameters: matrix - the single precision array of length 16 in row major format |
set | final public void set(Matrix4d m1)(Code) | | Sets the matrix values of this transform to the matrix values in the
double precision Matrix4d argument. The transform type is classified
internally by the Transform3D class.
Parameters: m1 - the double precision 4x4 matrix |
set | final public void set(Matrix4f m1)(Code) | | Sets the matrix values of this transform to the matrix values in the
single precision Matrix4f argument. The transform type is classified
internally by the Transform3D class.
Parameters: m1 - the single precision 4x4 matrix |
set | final public void set(Matrix3f m1)(Code) | | 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).
Parameters: m1 - the single precision 3x3 matrix |
set | final public void set(Matrix3d m1)(Code) | | 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).
Parameters: m1 - the double precision 3x3 matrix |
set | final public void set(double scale)(Code) | | Sets the value of this transform to a uniform scale; all of
the matrix values are modified.
Parameters: scale - the scale factor for the transform |
set | final public void set(double scale, Vector3d v1)(Code) | | 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.
Parameters: scale - the scale factor for the transform Parameters: v1 - the translation amount |
set | final public void set(float scale, Vector3f v1)(Code) | | 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.
Parameters: scale - the scale factor for the transform Parameters: v1 - the translation amount |
set | final public void set(Vector3d v1, double scale)(Code) | | 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.
Parameters: v1 - the translation amount Parameters: scale - the scale factor for the transform AND the translation |
set | final public void set(Vector3f v1, float scale)(Code) | | 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.
Parameters: v1 - the translation amount Parameters: scale - the scale factor for the transform AND the translation |
setAutoNormalize | final public void setAutoNormalize(boolean autoNormalize)(Code) | | Sets a flag that enables or disables automatic SVD
normalization. If this flag is enabled, an automatic SVD
normalization of the rotational components (upper 3x3) of this
matrix is done after every subsequent matrix operation that
modifies this matrix. This is functionally equivalent to
calling normalize() after every subsequent call, but may be
less computationally expensive.
The default value for this parameter is false.
Parameters: autoNormalize - the boolean state of auto normalization |
setEuler | final public void setEuler(Vector3d euler)(Code) | | Sets the rotational component (upper 3x3) of this transform to the
rotation matrix converted from the Euler angles provided; the other
non-rotational elements are set as if this were an identity matrix.
The euler parameter is a Vector3d consisting of three rotation angles
applied first about the X, then Y then Z axis.
These rotations are applied using a static frame of reference. In
other words, the orientation of the Y rotation axis is not affected
by the X rotation and the orientation of the Z rotation axis is not
affected by the X or Y rotation.
Parameters: euler - the Vector3d consisting of three rotation angles about X,Y,Z |
setIdentity | final public void setIdentity()(Code) | | Sets this transform to the identity matrix.
|
setNonUniformScale | final public void setNonUniformScale(double xScale, double yScale, double zScale)(Code) | | Replaces the current transform with a non-uniform scale transform.
All values of the existing transform are replaced.
Parameters: xScale - the new X scale amount Parameters: yScale - the new Y scale amount Parameters: zScale - the new Z scale amount |
setOrthoDirtyBit | final void setOrthoDirtyBit()(Code) | | |
setRotation | final public void setRotation(Matrix3d m1)(Code) | | 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 pre-existing scale
will be preserved; the argument matrix m1 will be checked for proper
normalization when this transform is internally classified.
Parameters: m1 - the double precision 3x3 matrix |
setRotation | final public void setRotation(Matrix3f m1)(Code) | | 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 pre-existing scale
will be preserved; the argument matrix m1 will be checked for proper
normalization when this transform is internally classified.
Parameters: m1 - the single precision 3x3 matrix |
setRotation | final public void setRotation(Quat4f q1)(Code) | | 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 pre-existing scale
in the transform is preserved.
Parameters: q1 - the quaternion that specifies the rotation |
setRotation | final public void setRotation(Quat4d q1)(Code) | | 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 pre-existing scale
in the transform is preserved.
Parameters: q1 - the quaternion that specifies the rotation |
setRotation | final public void setRotation(AxisAngle4d a1)(Code) | | Sets the rotational component (upper 3x3) of this transform to the
matrix equivalent values of the axis-angle argument; the other
elements of this transform are unchanged; any pre-existing scale
in the transform is preserved.
Parameters: a1 - the axis-angle to be converted (x, y, z, angle) |
setRotation | final public void setRotation(AxisAngle4f a1)(Code) | | Sets the rotational component (upper 3x3) of this transform to the
matrix equivalent values of the axis-angle argument; the other
elements of this transform are unchanged; any pre-existing scale
in the transform is preserved.
Parameters: a1 - the axis-angle to be converted (x, y, z, angle) |
setRotationScale | final public void setRotationScale(Matrix3f m1)(Code) | | 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 |
setRotationScale | final public void setRotationScale(Matrix3d m1)(Code) | | 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 |
setScale | final public void setScale(double scale)(Code) | | 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.
Parameters: scale - the new scale amount |
setScale | final public void setScale(Vector3d scale)(Code) | | Sets the possibly non-uniform scale component of the current
transform; any existing scale is first factored out of the
existing transform before the new scale is applied.
Parameters: scale - the new x,y,z scale values |
setTranslation | final public void setTranslation(Vector3f trans)(Code) | | Replaces the translational components of this transform to the values
in the Vector3f argument; the other values of this transform are not
modified.
Parameters: trans - the translational component |
setTranslation | final public void setTranslation(Vector3d trans)(Code) | | Replaces the translational components of this transform to the values
in the Vector3d argument; the other values of this transform are not
modified.
Parameters: trans - the translational component |
setZero | final public void setZero()(Code) | | Sets this transform to all zeros.
|
sub | final public void sub(Transform3D t1)(Code) | | Subtracts transform t1 from this transform and places the result
into this: this = this - t1.
Parameters: t1 - the transform to be subtracted from this transform |
sub | final public void sub(Transform3D t1, Transform3D t2)(Code) | | Subtracts transform t2 from transform t1 and places the result into
this: this = t1 - t2.
Parameters: t1 - the left transform Parameters: t2 - the right transform |
toString | public String toString()(Code) | | Returns the matrix elements of this transform as a string.
the matrix elements of this transform |
transform | void transform(Point3d point, Point4d pointOut)(Code) | | Transforms the point parameter with this transform and
places the result into pointOut. The fourth element of the
point input paramter is assumed to be one.
Parameters: point - the input point to be transformed Parameters: pointOut - the transformed point |
transform | final public void transform(Vector4d vec, Vector4d vecOut)(Code) | | Transform the vector vec using this transform and place the
result into vecOut.
Parameters: vec - the double precision vector to be transformed Parameters: vecOut - the vector into which the transformed values are placed |
transform | final public void transform(Vector4d vec)(Code) | | Transform the vector vec using this Transform and place the
result back into vec.
Parameters: vec - the double precision vector to be transformed |
transform | final public void transform(Vector4f vec, Vector4f vecOut)(Code) | | Transform the vector vec using this Transform and place the
result into vecOut.
Parameters: vec - the single precision vector to be transformed Parameters: vecOut - the vector into which the transformed values are placed |
transform | final public void transform(Vector4f vec)(Code) | | Transform the vector vec using this Transform and place the
result back into vec.
Parameters: vec - the single precision vector to be transformed |
transform | final public void transform(Point3d point, Point3d pointOut)(Code) | | Transforms the point parameter with this transform and
places the result into pointOut. The fourth element of the
point input paramter is assumed to be one.
Parameters: point - the input point to be transformed Parameters: pointOut - the transformed point |
transform | final public void transform(Point3d point)(Code) | | Transforms the point parameter with this transform and
places the result back into point. The fourth element of the
point input paramter is assumed to be one.
Parameters: point - the input point to be transformed |
transform | final public void transform(Vector3d normal, Vector3d normalOut)(Code) | | Transforms the normal parameter by this transform and places the value
into normalOut. The fourth element of the normal is assumed to be zero.
Parameters: normal - the input normal to be transformed Parameters: normalOut - the transformed normal |
transform | final public void transform(Vector3d normal)(Code) | | Transforms the normal parameter by this transform and places the value
back into normal. The fourth element of the normal is assumed to be zero.
Parameters: normal - the input normal to be transformed |
transform | final public void transform(Point3f point, Point3f pointOut)(Code) | | Transforms the point parameter with this transform and
places the result into pointOut. The fourth element of the
point input paramter is assumed to be one.
Parameters: point - the input point to be transformed Parameters: pointOut - the transformed point |
transform | final public void transform(Point3f point)(Code) | | Transforms the point parameter with this transform and
places the result back into point. The fourth element of the
point input paramter is assumed to be one.
Parameters: point - the input point to be transformed |
transform | final public void transform(Vector3f normal, Vector3f normalOut)(Code) | | Transforms the normal parameter by this transform and places the value
into normalOut. The fourth element of the normal is assumed to be zero.
Note: For correct lighting results, if a transform has uneven scaling
surface normals should transformed by the inverse transpose of
the transform. This the responsibility of the application and is not
done automatically by this method.
Parameters: normal - the input normal to be transformed Parameters: normalOut - the transformed normal |
transform | final public void transform(Vector3f normal)(Code) | | Transforms the normal parameter by this transform and places the value
back into normal. The fourth element of the normal is assumed to be zero.
Note: For correct lighting results, if a transform has uneven scaling
surface normals should transformed by the inverse transpose of
the transform. This the responsibility of the application and is not
done automatically by this method.
Parameters: normal - the input normal to be transformed |
transpose | final public void transpose()(Code) | | Transposes this matrix in place.
|
transpose | final public void transpose(Transform3D t1)(Code) | | Transposes transform t1 and places the value into this transform.
The transform t1 is not modified.
Parameters: t1 - the transform whose transpose is placed into this transform |
zeroTranslation | final boolean zeroTranslation()(Code) | | |
|
|