All Packages Class Hierarchy This Package Previous Next Index
Class java.media.j3d.Transform3D
java.lang.Object
|
+----java.media.j3d.Transform3D
- public class Transform3D
- extends Object
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 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.
-
AFFINE
- An affine matrix can translate, rotate, reflect, scale anisotropically,
and shear.
-
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 which is uniform in all directions.
-
IDENTITY
- An identity matrix.
-
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.
-
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.
-
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.
-
SCALE
- A Uniform scale matrix with no translation or other
off-diagonal components.
-
TRANSLATION
- A translation-only matrix with ones on the diagonal.
-
ZERO
- A zero matrix.
-
Transform3D()
- Constructs and initializes a transform to the identity matrix.
-
Transform3D(double[])
-
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[])
- 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)
-
Constructs a transform and initializes it to the upper 4x4
of the GMatrix argument.
-
Transform3D(Matrix3d, Vector3d, double)
-
Constructs and initializes a transform from the rotation matrix,
translation, and scale values.
-
Transform3D(Matrix3f, Vector3d, double)
- Constructs and initializes a transform from the rotation matrix,
translation, and scale values.
-
Transform3D(Matrix3f, Vector3f, float)
-
Constructs and initializes a transform from the rotation matrix,
translation, and scale values.
-
Transform3D(Matrix4d)
- Constructs and initializes a transform from the 4x4 matrix.
-
Transform3D(Matrix4f)
- Constructs and initializes a transform from the 4x4 matrix.
-
Transform3D(Quat4d, Vector3d, double)
-
Constructs and initializes a transform from the quaternion,
translation, and scale values.
-
Transform3D(Quat4f, Vector3d, double)
- Constructs and initializes a transform from the quaternion,
translation, and scale values.
-
Transform3D(Quat4f, Vector3f, float)
- Constructs and initializes a transform from the quaternion,
translation, and scale values.
-
Transform3D(Transform3D)
- Constructs and initializes a transform from the Transform3D object.
-
add(Transform3D)
- Adds this transform to transform t1 and places the result into
this: this = this + t1.
-
add(Transform3D, Transform3D)
-
Adds transforms t1 and t2 and places the result into this transform.
-
determinant()
-
Calculates and returns the determinant of this transform.
-
epsilonEquals(Transform3D, double)
- 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.
-
equals(Transform3D)
- Returns true if all of the data members of transform t1 are
equal to the corresponding data members in this Transform3D.
-
frustum(double, double, double, double, double, double)
- Creates a projection transform that mimics a standard, camera-based,
view-model.
-
get(double[])
- Places the values of this transform into the double precision array
of length 16.
-
get(float[])
-
Places the values of this transform into the single precision array
of length 16.
-
get(Matrix3d)
-
Performs an SVD normalization of this matrix in order to acquire
the normalized rotational component; the values are placed into
the Matrix3d parameter.
-
get(Matrix3d, Vector3d)
-
Performs an SVD normalization of this matrix to calculate
the rotation as a 3x3 matrix, the translation, and the scale.
-
get(Matrix3f)
- Performs an SVD normalization of this matrix in order to acquire
the normalized rotational component; the values are placed into
the Matrix3f parameter.
-
get(Matrix3f, Vector3d)
-
Performs an SVD normalization of this matrix to calculate
the rotation as a 3x3 matrix, the translation, and the scale.
-
get(Matrix3f, Vector3f)
-
Performs an SVD normalization of this matrix to calculate
the rotation as a 3x3 matrix, the translation, and the scale.
-
get(Matrix4d)
-
Places the values of this transform into the double precision
matrix argument.
-
get(Matrix4f)
- Places the values of this transform into the single precision matrix
argument.
-
get(Quat4d)
-
Performs an SVD normalization of this matrix in order to acquire
the normalized rotational component; the values are placed into
the Quat4d parameter.
-
get(Quat4d, Vector3d)
- Performs an SVD normalization of this matrix to calculate
the rotation as a quaternion, the translation, and the scale.
-
get(Quat4f)
- Performs an SVD normalization of this matrix in order to acquire
the normalized rotational component; the values are placed into
the Quat4f parameter.
-
get(Quat4f, Vector3d)
-
Performs an SVD normalization of this matrix to calculate
the rotation as a quaternion, the translation, and the scale.
-
get(Quat4f, Vector3f)
-
Performs an SVD normalization of this matrix to calculate
the rotation as a quaternion, the translation, and the scale.
-
get(Vector3d)
-
Retrieves the translational components of this transform.
-
get(Vector3f)
-
Retrieves the translational components of this transform.
-
getAutoNormalize()
- Returns the state of auto-normalization.
-
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.
-
getDeterminantSign()
- Returns the sign of the determinant of this matrix; a return value
of true indicates a positive determinant; a return value of false
indicates a negative determinant.
-
getRotationScale(Matrix3d)
- Gets the upper 3x3 values of this matrix and places them into
the matrix m1.
-
getRotationScale(Matrix3f)
- Gets the upper 3x3 values of this matrix and places them into
the matrix m1.
-
getScale()
- Performs an SVD normalization of this transform to calculate
and return the scale factor.
-
getType()
- Returns the type of this matrix as an or'ed bitmask of
of all of the type classifications to which it belongs.
-
hashCode()
- Returns a hash number based on the data values in this
object.
-
invert()
- Inverts this transform in place.
-
invert(Transform3D)
- Sets the value of this transform to the inverse of the passed
Transform3D parameter.
-
lookAt(Point3d, Point3d, Vector3d)
- Helping function that specifies the position and orientation of a
view matrix.
-
mul(Transform3D)
- Sets the value of this transform to the result of multiplying itself
with transform t1 (this = this * t1).
-
mul(Transform3D, Transform3D)
-
Sets the value of this transform to the result of multiplying transform
t1 by transform t2 (this = t1*t2).
-
mulInverse(Transform3D)
- Multiplies this transform by the inverse of transform t1.
-
mulInverse(Transform3D, Transform3D)
-
Multiplies transform t1 by the inverse of transform t2.
-
mulTransposeBoth(Transform3D, Transform3D)
-
Multiplies the transpose of transform t1 by the transpose of
transform t2 and places the result into this transform
(this = transpose(t1) * transpose(t2)).
-
mulTransposeLeft(Transform3D, Transform3D)
-
Multiplies the transpose of transform t1 by transform t2 and places
the result into this matrix (this = transpose(t1) * t2).
-
mulTransposeRight(Transform3D, Transform3D)
-
Multiplies transform t1 by the transpose of transform t2 and places
the result into this transform (this = t1 * transpose(t2)).
-
normalize()
- Normalizes the rotational components (upper 3x3) of this matrix in place;
a Singular Value Decomposition (SVD) normalization is used.
-
normalize(Transform3D)
-
Normalizes the rotational components (upper 3x3) of transform t1 using
a singular value decomposition (SVD) and
places the values into this transform.
-
normalizeCP()
-
Normalizes the rotational components (upper 3x3) of this transform
in place using a Cross Product (CP) normalization.
-
normalizeCP(Transform3D)
-
Normalizes the rotational components (upper 3x3) of transform t1
using a Cross Product (CP) normalization and
places the values into this transform.
-
ortho(double, double, double, double, double, double)
- Specifies an orthographic viewing frustum in eye coordinates.
-
perspective(double, double, double, double)
- Creates a projection transform that mimics a standard, camera-based,
view-model.
-
rotX(double)
- Sets the value of this transform to a rotation about the x axis;
all of the non-rotational components are set as if this were an
an identity matrix.
-
rotY(double)
- Sets the value of this transform to a rotation about the y axis;
all of the non-rotational components are set as if this were an
an identity matrix.
-
rotZ(double)
- Sets the value of this transform to a rotation about the z axis;
all of the non-rotational components are set as if this were an
an identity matrix.
-
set(AxisAngle4d)
- Sets the value of this transform to the matrix conversion
of the double precision axis-angle argument.
-
set(AxisAngle4f)
- Sets the value of this transform to the matrix conversion
of the single precision axis-angle argument.
-
set(double)
- Sets the value of this transform to a uniform scale; all of
the matrix values are modified.
-
set(double, Vector3d)
- 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.
-
set(double[])
-
Sets the matrix values of this transform to the matrix values in the
double precision array parameter.
-
set(float, Vector3f)
- 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.
-
set(float[])
- Sets the matrix values of this transform to the matrix values in the
single precision array parameter.
-
set(GMatrix)
- Sets the matrix values of this transform to the matrix values in the
upper 4x4 corner of the GMatrix parameter.
-
set(Matrix3d)
-
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).
-
set(Matrix3d, Vector3d, double)
- Sets the value of this matrix from the rotation expressed
by the rotation matrix m1, the translation t1, and the scale s.
-
set(Matrix3f)
-
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 (ie, affine matrix with no translational component).
-
set(Matrix3f, Vector3d, double)
- Sets the value of this matrix from the rotation expressed
by the rotation matrix m1, the translation t1, and the scale s.
-
set(Matrix3f, Vector3f, float)
- Sets the value of this matrix from the rotation expressed
by the rotation matrix m1, the translation t1, and the scale s.
-
set(Matrix4d)
- Sets the matrix values of this transform to the matrix values in the
double precision Matrix4d argument.
-
set(Matrix4f)
-
Sets the matrix values of this transform to the matrix values in the
single precision Matrix4f argument.
-
set(Quat4d)
- 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.
-
set(Quat4d, Vector3d, double)
- Sets the value of this matrix from the rotation expressed
by the quaternion q1, the translation t1, and the scale s.
-
set(Quat4f)
- 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.
-
set(Quat4f, Vector3d, double)
-
Sets the value of this matrix from the rotation expressed
by the quaternion q1, the translation t1, and the scale s.
-
set(Quat4f, Vector3f, float)
-
Sets the value of this matrix from the rotation expressed
by the quaternion q1, the translation t1, and the scale s.
-
set(Transform3D)
-
Sets the matrix, type, and state of this transform to the matrix,
type, and state of transform t1.
-
set(Vector3d)
-
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.
-
set(Vector3d, double)
- 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.
-
set(Vector3f)
- 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.
-
set(Vector3f, float)
-
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.
-
setAutoNormalize(boolean)
- Performs an automatic SVD normalization of the rotational components
(upper 3x3) of this matrix after every subsequent matrix operation
on this object, unless the boolean is subsequently set to false.
-
setEuler(Vector3d)
- 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.
-
setIdentity()
- Sets this transform to the identity matrix.
-
setRotation(AxisAngle4d)
- Sets the rotational component (upper 3x3) of this matrix to the
matrix equivalent values of the axis-angle argument; the other
elements of this matrix are unchanged; a singular value
decomposition is performed on this object's upper 3x3 matrix to
factor out the scale, then this object's upper 3x3 matrix components
are replaced by the matrix equivalent of the axis-angle,
and then the scale is reapplied to the rotational components.
-
setRotation(AxisAngle4f)
- Sets the rotational component (upper 3x3) of this matrix to the
matrix equivalent values of the axis-angle argument; the other
elements of this matrix are unchanged; a singular value
decomposition is performed on this object's upper 3x3 matrix to
factor out the scale, then this object's upper 3x3 matrix components
are replaced by the matrix equivalent of the axis-angle,
and then the scale is reapplied to the rotational components.
-
setRotation(Matrix3d)
- Sets the rotational component (upper 3x3) of this matrix to the
matrix values in the double precision Matrix3d argument; the other
elements of this matrix are unchanged; a singular value
decomposition is performed on this object's upper 3x3 matrix to
factor out the scale, then this object's upper 3x3 matrix components
are replaced by the passed rotation components,
and then the scale is reapplied to the rotational components.
-
setRotation(Matrix3f)
-
Sets the rotational component (upper 3x3) of this matrix to the
matrix values in the single precision Matrix3f argument; the other
elements of this matrix are unchanged; a singular value
decomposition is performed on this object's upper 3x3 matrix to
factor out the scale, then this object's upper 3x3 matrix components
are replaced by the passed rotation components,
and then the scale is reapplied to the rotational components.
-
setRotation(Quat4d)
- Sets the rotational component (upper 3x3) of this matrix to the
matrix equivalent values of the quaternion argument; the other
elements of this matrix are unchanged; a singular value
decomposition is performed on this object's upper 3x3 matrix to
factor out the scale, then this object's upper 3x3 matrix components
are replaced by the matrix equivalent of the quaternion,
and then the scale is reapplied to the rotational components.
-
setRotation(Quat4f)
- Sets the rotational component (upper 3x3) of this matrix to the
matrix equivalent values of the quaternion argument; the other
elements of this matrix are unchanged; a singular value
decomposition is performed on this object's upper 3x3 matrix to
factor out the scale, then this object's upper 3x3 matrix components
are replaced by the matrix equivalent of the quaternion,
and then the scale is reapplied to the rotational components.
-
setRotationScale(Matrix3d)
- Replaces the upper 3x3 matrix values of this transform with the
values in the matrix m1.
-
setRotationScale(Matrix3f)
- Replaces the upper 3x3 matrix values of this transform with the
values in the matrix m1.
-
setScale(double)
- Sets the scale component of the current matrix by factoring
out the current scale (by doing an SVD) from the rotational
component and multiplying by the new scale.
-
setTranslation(Vector3d)
-
Replaces the translational components of this transform to the values
in the Vector3d argument; the other values of this transform are not
modified.
-
setTranslation(Vector3f)
-
Replaces the translational components of this transform to the values
in the Vector3f argument; the other values of this transform are not
modified.
-
setZero()
-
Sets this transform to all zeros.
-
sub(Transform3D)
- Subtracts transform t1 from this transform and places the result
into this: this = this - t1.
-
sub(Transform3D, Transform3D)
-
Subtracts transform t2 from transform t1 and places the result into
this: this = t1 - t2.
-
toString()
- Returns the matrix elements of this transform as a string.
-
transform(Point3d)
-
Transforms the point parameter with this transform and
places the result back into point.
-
transform(Point3d, Point3d)
- Transforms the point parameter with this transform and
places the result into pointOut.
-
transform(Point3f)
- Transforms the point parameter with this transform and
places the result back into point.
-
transform(Point3f, Point3f)
- Transforms the point parameter with this transform and
places the result into pointOut.
-
transform(Vector3d)
-
Transforms the normal parameter by this transform and places the value
back into normal.
-
transform(Vector3d, Vector3d)
- Transforms the normal parameter by this transform and places the value
into normalOut.
-
transform(Vector3f)
- Transforms the normal parameter by this transform and places the value
back into normal.
-
transform(Vector3f, Vector3f)
- Transforms the normal parameter by this transform and places the value
into normalOut.
-
transform(Vector4d)
-
Transform the vector vec using this Transform and place the
result back into vec.
-
transform(Vector4d, Vector4d)
- Transform the vector vec using this transform and place the
result into vecOut.
-
transform(Vector4f)
-
Transform the vector vec using this Transform and place the
result back into vec.
-
transform(Vector4f, Vector4f)
-
Transform the vector vec using this Transform and place the
result into vecOut.
-
transpose()
- Transposes this matrix in place.
-
transpose(Transform3D)
- Transposes transform t1 and places the value into this transform.
ZERO
public static final int ZERO
- A zero matrix.
IDENTITY
public static final int IDENTITY
- An identity matrix.
SCALE
public static final int SCALE
- A Uniform scale matrix with no translation or other
off-diagonal components.
TRANSLATION
public static final int TRANSLATION
- A translation-only matrix with ones on the diagonal.
ORTHOGONAL
public static final 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.
RIGID
public static final 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.
CONGRUENT
public static final 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 which is uniform in all directions.
These operations preserve the distance between any two points and the
angle between any two intersecting lines.
AFFINE
public static final int 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.
NEGATIVE_DETERMINANT
public static final 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.
Transform3D
public Transform3D(Matrix4f m1)
- Constructs and initializes a transform from the 4x4 matrix. The
type of the constructed transform will be classified automatically.
- Parameters:
- m1 - the 4x4 transformation matrix
Transform3D
public Transform3D(Matrix4d m1)
- Constructs and initializes a transform from the 4x4 matrix. The
type of the constructed transform will be classified automatically.
- Parameters:
- m1 - the 4x4 transformation matrix
Transform3D
public Transform3D(Transform3D t1)
- Constructs and initializes a transform from the Transform3D object.
- Parameters:
- t1 - the transformation object to be copied
Transform3D
public Transform3D()
- Constructs and initializes a transform to the identity matrix.
Transform3D
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. The type of the transform
object is classified internally.
- Parameters:
- matrix - a float array of 16
Transform3D
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. The type of the transform is
classified internally.
- Parameters:
- matrix - a float array of 16
Transform3D
public Transform3D(Quat4d q1,
Vector3d t1,
double s)
- 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 3x3) and not to the
translational components of the matrix.
- Parameters:
- q1 - The quaternion value representing the rotational component
- t1 - The translational component of the matrix
- s - The scale value applied to the rotational components
Transform3D
public Transform3D(Quat4f q1,
Vector3d t1,
double s)
- 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 3x3) and not to the
translational components of the matrix.
- Parameters:
- q1 - The quaternion value representing the rotational component
- t1 - The translational component of the matrix
- s - The scale value applied to the rotational components
Transform3D
public Transform3D(Quat4f q1,
Vector3f t1,
float s)
- 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 3x3) and not to the
translational components of the matrix.
- Parameters:
- q1 - The quaternion value representing the rotational component
- t1 - The translational component of the matrix
- s - The scale value applied to the rotational components
Transform3D
public Transform3D(GMatrix m1)
- Constructs a transform and initializes it to the upper 4x4
of the GMatrix argument. If the parameter matrix is
smaller than 4x4, the remaining elements in the transform matrix are
assigned to zero.
Transform3D
public Transform3D(Matrix3f m1,
Vector3d t1,
double s)
- 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
- t1 - The translational component of the matrix
- s - The scale value applied to the rotational components
Transform3D
public Transform3D(Matrix3d m1,
Vector3d t1,
double s)
- 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
- t1 - The translational component of the matrix
- s - The scale value applied to the rotational components
Transform3D
public Transform3D(Matrix3f m1,
Vector3f t1,
float s)
- 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
- t1 - The translational component of the matrix
- s - The scale value applied to the rotational components
getType
public final int getType()
- Returns the type of this matrix as an or'ed bitmask of
of all of the type classifications to which it belongs.
- Returns:
- or'ed bitmask of all of the type classifications of this transform
getBestType
public final 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.
If the matrix is ORTHOGONAL, calling the method
getDeterminantSign() will yield more information.
- Returns:
- the least general matrix type
getDeterminantSign
public final boolean getDeterminantSign()
- Returns the sign of the determinant of this matrix; a return value
of true indicates a positive determinant; a return value of false
indicates a negative determinant. 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.
- Returns:
- determinant sign : true means positive, false means negative
setAutoNormalize
public final void setAutoNormalize(boolean autoNormalize)
- Performs an automatic SVD normalization of the rotational components
(upper 3x3) of this matrix after every subsequent matrix operation
on this object, unless the boolean is subsequently set to false.
The default value for this parameter is false.
- Parameters:
- autoNormalize - boolean state of auto normalization
getAutoNormalize
public final boolean getAutoNormalize()
- Returns the state of auto-normalization.
- Returns:
- boolean state of auto-normalization
toString
public String toString()
- Returns the matrix elements of this transform as a string.
- Returns:
- the matrix elements of this transform
- Overrides:
- toString in class Object
setIdentity
public final void setIdentity()
- Sets this transform to the identity matrix.
setZero
public final void setZero()
- Sets this transform to all zeros.
add
public final void add(Transform3D t1)
- Adds this transform to transform t1 and places the result into
this: this = this + t1.
- Parameters:
- t1 - transform to be added to this transform
add
public final void add(Transform3D t1,
Transform3D t2)
- Adds transforms t1 and t2 and places the result into this transform.
- Parameters:
- t1 - transform to be added
- t2 - transform to be added
sub
public final void sub(Transform3D t1)
- Subtracts transform t1 from this transform and places the result
into this: this = this - t1.
- Parameters:
- t1 - transform to be subtracted from this transform
sub
public final void sub(Transform3D t1,
Transform3D t2)
- Subtracts transform t2 from transform t1 and places the result into
this: this = t1 - t2.
- Parameters:
- t1 - left transform
- t2 - right transform
transpose
public final void transpose()
- Transposes this matrix in place.
transpose
public final void transpose(Transform3D t1)
- 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
set
public final 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.
- Parameters:
- q1 - the quaternion to be converted
set
public final 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.
- Parameters:
- q1 - the quaternion to be converted
setRotation
public final void setRotation(Matrix3d m1)
- Sets the rotational component (upper 3x3) of this matrix to the
matrix values in the double precision Matrix3d argument; the other
elements of this matrix are unchanged; a singular value
decomposition is performed on this object's upper 3x3 matrix to
factor out the scale, then this object's upper 3x3 matrix components
are replaced by the passed rotation components,
and then the scale is reapplied to the rotational components.
- Parameters:
- m1 - double precision 3x3 matrix
setRotation
public final void setRotation(Matrix3f m1)
- Sets the rotational component (upper 3x3) of this matrix to the
matrix values in the single precision Matrix3f argument; the other
elements of this matrix are unchanged; a singular value
decomposition is performed on this object's upper 3x3 matrix to
factor out the scale, then this object's upper 3x3 matrix components
are replaced by the passed rotation components,
and then the scale is reapplied to the rotational components.
- Parameters:
- m1 - single precision 3x3 matrix
setRotation
public final void setRotation(Quat4f q1)
- Sets the rotational component (upper 3x3) of this matrix to the
matrix equivalent values of the quaternion argument; the other
elements of this matrix are unchanged; a singular value
decomposition is performed on this object's upper 3x3 matrix to
factor out the scale, then this object's upper 3x3 matrix components
are replaced by the matrix equivalent of the quaternion,
and then the scale is reapplied to the rotational components.
- Parameters:
- q1 - the quaternion that specifies the rotation
setRotation
public final void setRotation(Quat4d q1)
- Sets the rotational component (upper 3x3) of this matrix to the
matrix equivalent values of the quaternion argument; the other
elements of this matrix are unchanged; a singular value
decomposition is performed on this object's upper 3x3 matrix to
factor out the scale, then this object's upper 3x3 matrix components
are replaced by the matrix equivalent of the quaternion,
and then the scale is reapplied to the rotational components.
- Parameters:
- q1 - the quaternion that specifies the rotation
set
public final void set(AxisAngle4f a1)
- Sets the value of this transform to the matrix conversion
of the single precision axis-angle argument.
- Parameters:
- a1 - the axis-angle to be converted (x, y, z, angle)
set
public final void set(AxisAngle4d a1)
- Sets the value of this transform to the matrix conversion
of the double precision axis-angle argument.
- Parameters:
- a1 - the axis-angle to be converted (x, y, z, angle)
setRotation
public final void setRotation(AxisAngle4d a1)
- Sets the rotational component (upper 3x3) of this matrix to the
matrix equivalent values of the axis-angle argument; the other
elements of this matrix are unchanged; a singular value
decomposition is performed on this object's upper 3x3 matrix to
factor out the scale, then this object's upper 3x3 matrix components
are replaced by the matrix equivalent of the axis-angle,
and then the scale is reapplied to the rotational components.
- Parameters:
- a1 - the axis-angle to be converted (x, y, z, angle)
setRotation
public final void setRotation(AxisAngle4f a1)
- Sets the rotational component (upper 3x3) of this matrix to the
matrix equivalent values of the axis-angle argument; the other
elements of this matrix are unchanged; a singular value
decomposition is performed on this object's upper 3x3 matrix to
factor out the scale, then this object's upper 3x3 matrix components
are replaced by the matrix equivalent of the axis-angle,
and then the scale is reapplied to the rotational components.
- Parameters:
- a1 - the axis-angle to be converted (x, y, z, angle)
rotX
public void rotX(double angle)
- Sets the value of this transform to a rotation about the x axis;
all of the non-rotational components are set as if this were an
an identity matrix.
- Parameters:
- angle - the angle to rotate about the X axis in radians
rotY
public void rotY(double angle)
- Sets the value of this transform to a rotation about the y axis;
all of the non-rotational components are set as if this were an
an identity matrix.
- Parameters:
- angle - the angle to rotate about the Y axis in radians
rotZ
public void rotZ(double angle)
- Sets the value of this transform to a rotation about the z axis;
all of the non-rotational components are set as if this were an
an identity matrix.
- Parameters:
- angle - the angle to rotate about the Z axis in radians
set
public final 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.
- Parameters:
- trans - The translational component
set
public final 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.
- Parameters:
- trans - The translational component
setScale
public final void setScale(double scale)
- Sets the scale component of the current matrix by factoring
out the current scale (by doing an SVD) from the rotational
component and multiplying by the new scale.
- Parameters:
- scale - the new scale amount
setTranslation
public final 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.
- Parameters:
- trans - the translational component
setTranslation
public final 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.
- Parameters:
- trans - the translational component
set
public final 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.
- Parameters:
- q1 - the rotation expressed as a quaternion
- t1 - the translation
- s - the scale value
set
public final 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.
- Parameters:
- q1 - the rotation expressed as a quaternion
- t1 - the translation
- s - the scale value
set
public final 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.
- Parameters:
- q1 - the rotation expressed as a quaternion
- t1 - the translation
- s - the scale value
set
public final 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.
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
- t1 - the translation
- s - the scale value
set
public final void set(Matrix3f m1,
Vector3d t1,
double d)
- 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
- t1 - the translation
- s - the scale value
set
public final 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.
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
- t1 - the translation
- s - the scale value
set
public final void set(GMatrix matrix)
- 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 - General matrix from which the Transform3D matrix is derived
set
public final void set(Transform3D t1)
- 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
public final void set(double matrix[])
- 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 - double precision array of length 16 in row major format
set
public final void set(float matrix[])
- 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 - single precision array of length 16 in row major format
set
public final void set(Matrix4d m1)
- 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 - double precision 4x4 matrix
set
public final void set(Matrix4f m1)
- 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 - single precision 4x4 matrix
set
public final 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 (ie, affine matrix with no translational component).
- Parameters:
- m1 - single precision 3x3 matrix
set
public final 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).
- Parameters:
- m1 - double precision 3x3 matrix
setEuler
public final 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.
- Parameters:
- euler - Vector3d consisting of roll, pitch, yaw
get
public final void get(double matrix[])
- 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 - double precision array of length 16
get
public final void get(float matrix[])
- 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 - single precision array of length 16
get
public final void get(Matrix3d m1)
- Performs an SVD normalization of this matrix in order to acquire
the normalized rotational component; the values are placed into
the Matrix3d parameter.
- Parameters:
- m1 - matrix into which the rotational component is placed
get
public final void get(Matrix3f m1)
- Performs an SVD normalization of this matrix in order to acquire
the normalized rotational component; the values are placed into
the Matrix3f parameter.
- Parameters:
- m1 - matrix into which the rotational component is placed
get
public final void get(Quat4f q1)
- Performs an SVD normalization of this matrix in order to acquire
the normalized rotational component; the values are placed into
the Quat4f parameter.
- Parameters:
- q1 - quaternion into which the rotation component is placed
get
public final void get(Quat4d q1)
- Performs an SVD normalization of this matrix in order to acquire
the normalized rotational component; the values are placed into
the Quat4d parameter.
- Parameters:
- q1 - quaternion into which the rotation component is placed
get
public final void get(Matrix4d matrix)
- Places the values of this transform into the double precision
matrix argument.
- Parameters:
- matrix - double precision matrix
get
public final void get(Matrix4f matrix)
- Places the values of this transform into the single precision matrix
argument.
- Parameters:
- matrix - single precision matrix
get
public final double get(Quat4d q1,
Vector3d t1)
- Performs an SVD normalization of this matrix to calculate
the rotation as a quaternion, the translation, and the scale.
None of the matrix values are modified.
- Parameters:
- q1 - The quaternion representing the rotation
- t1 - The translation component
- Returns:
- The scale component of this transform
get
public final float get(Quat4f q1,
Vector3f t1)
- Performs an SVD normalization of this matrix to calculate
the rotation as a quaternion, the translation, and the scale.
None of the matrix values are modified.
- Parameters:
- q1 - The quaternion representing the rotation
- t1 - The translation component
- Returns:
- The scale component of this transform
get
public final double get(Quat4f q1,
Vector3d t1)
- Performs an SVD normalization of this matrix to calculate
the rotation as a quaternion, the translation, and the scale.
None of the matrix values are modified.
- Parameters:
- q1 - The quaternion representing the rotation
- t1 - The translation component
- Returns:
- The scale component of this transform
get
public final double get(Matrix3d m1,
Vector3d t1)
- Performs an SVD normalization of this matrix to calculate
the rotation as a 3x3 matrix, the translation, and the scale.
None of the matrix values are modified.
- Parameters:
- m1 - The normalized matrix representing the rotation
- t1 - The translation component
- Returns:
- The scale component of this transform
get
public final float get(Matrix3f m1,
Vector3f t1)
- Performs an SVD normalization of this matrix to calculate
the rotation as a 3x3 matrix, the translation, and the scale.
None of the matrix values are modified.
- Parameters:
- m1 - The normalized matrix representing the rotation
- t1 - The translation component
- Returns:
- The scale component of this transform
get
public final double get(Matrix3f m1,
Vector3d t1)
- Performs an SVD normalization of this matrix to calculate
the rotation as a 3x3 matrix, the translation, and the scale.
None of the matrix values are modified.
- Parameters:
- m1 - The normalized matrix representing the rotation
- t1 - The translation component
- Returns:
- The scale component of this transform
getScale
public final double getScale()
- Performs an SVD normalization of this transform to calculate
and return the scale factor. This transform is not modified.
- Returns:
- the scale factor of this matrix
get
public final void get(Vector3f trans)
- Retrieves the translational components of this transform.
- Parameters:
- trans - the vector that will receive the tranlational component
get
public final void get(Vector3d trans)
- Retrieves the translational components of this transform.
- Parameters:
- trans - the vector that will receive the translational component
invert
public final void invert(Transform3D t1)
- 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
- Throws: SingularMatrixException
- thrown if transform t1 is
not invertible
invert
public final void invert()
- Inverts this transform in place. This method uses the transform
type to determine the optimal algorithm for inverting this transform.
- Throws: SingularMatrixException
- thrown if this transform is
not invertible
determinant
public final double determinant()
- Calculates and returns the determinant of this transform.
- Returns:
- the double precision determinant
set
public final void set(double scale)
- 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
public final 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.
- Parameters:
- scale - the scale factor for the transform
- v1 - the translation amount
set
public final 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.
- Parameters:
- scale - the scale factor for the transform
- v1 - the translation amount
set
public final 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.
- Parameters:
- v1 - the translation amount
- scale - the scale factor for the transform AND the translation
set
public final 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.
- Parameters:
- v1 - the translation amount
- scale - the scale factor for the transform AND the translation
mul
public final void mul(Transform3D t1)
- Sets the value of this transform to the result of multiplying itself
with transform t1 (this = this * t1).
- Parameters:
- t1 - the other transform
mul
public final 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).
- Parameters:
- t1 - the left transform
- t2 - the right transform
mulInverse
public final void mulInverse(Transform3D t1)
- 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
public final void mulInverse(Transform3D t1,
Transform3D t2)
- 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
- t2 - The transform whose inverse is computed.
mulTransposeRight
public final 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)).
- Parameters:
- t1 - The transform on the left hand side of the multiplication
- t2 - The transform whose transpose is computed
mulTransposeLeft
public final 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).
- Parameters:
- t1 - The transform whose transpose is computed
- t2 - The transform on the right hand side of the multiplication
mulTransposeBoth
public final 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)).
- Parameters:
- t1 - The transform on the left hand side of the multiplication
- t2 - The transform on the right hand side of the multiplication
normalize
public final void normalize()
- Normalizes the rotational components (upper 3x3) of this matrix in place;
a Singular Value Decomposition (SVD) normalization is used.
normalize
public final void normalize(Transform3D t1)
- Normalizes the rotational components (upper 3x3) of transform t1 using
a singular value decomposition (SVD) and
places the values into this transform.
- Parameters:
- t1 - The source transform, which is not modified
normalizeCP
public final void normalizeCP()
- Normalizes the rotational components (upper 3x3) of this transform
in place using a Cross Product (CP) normalization.
normalizeCP
public final void normalizeCP(Transform3D t1)
- Normalizes the rotational components (upper 3x3) of transform t1
using a Cross Product (CP) normalization and
places the values into this transform.
equals
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.
- Parameters:
- t1 - The transform with which the comparison is made.
- Returns:
- true or false
epsilonEquals
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. 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
- epsilon - the threshold value
hashCode
public int hashCode()
- Returns a hash number based on the data values in this
object. Two different Transform3D objects with identical data values
(ie, returns true for trans.equals(Transform3D) ) will return the same
hash number. Two Transform3Ds with different data members may return the
same hash value, although this is not likely.
- Returns:
- the integer hash value
- Overrides:
- hashCode in class Object
transform
public final void transform(Vector4d vec,
Vector4d vecOut)
- Transform the vector vec using this transform and place the
result into vecOut.
- Parameters:
- vec - the double precision vector to be transformed
- vecOut - the vector into which the transformed values are placed
transform
public final void transform(Vector4d vec)
- Transform the vector vec using this Transform and place the
result back into vec.
- Parameters:
- vec - the double precision vector to be transformed
transform
public final void transform(Vector4f vec,
Vector4f vecOut)
- Transform the vector vec using this Transform and place the
result into vecOut.
- Parameters:
- vec - the single precision vector to be transformed
- vecOut - the vector into which the transformed values are placed
transform
public final void transform(Vector4f vec)
- Transform the vector vec using this Transform and place the
result back into vec.
- Parameters:
- vec - the single precision vector to be transformed
transform
public final void transform(Point3d point,
Point3d pointOut)
- 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.
- pointOut - the transformed point
transform
public final void transform(Point3d point)
- 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
public final void transform(Vector3d normal,
Vector3d normalOut)
- 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.
- normalOut - the transformed normal
transform
public final void transform(Vector3d normal)
- 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
public final void transform(Point3f point,
Point3f pointOut)
- 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.
- pointOut - the transformed point
transform
public final void transform(Point3f point)
- 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
public final void transform(Vector3f normal,
Vector3f normalOut)
- 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.
- normalOut - the transformed normal
transform
public final void transform(Vector3f normal)
- 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.
setRotationScale
public final void setRotationScale(Matrix3f m1)
- Replaces the upper 3x3 matrix values of this transform with the
values in the matrix m1.
- Parameters:
- m1 - The matrix that will be the new upper 3x3
setRotationScale
public final void setRotationScale(Matrix3d m1)
- Replaces the upper 3x3 matrix values of this transform with the
values in the matrix m1.
- Parameters:
- m1 - The matrix that will be the new upper 3x3
getRotationScale
public final void getRotationScale(Matrix3f m1)
- 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
public final void getRotationScale(Matrix3d m1)
- Gets the upper 3x3 values of this matrix and places them into
the matrix m1.
- Parameters:
- m1 - The matrix that will hold the values
lookAt
public void lookAt(Point3d eye,
Point3d center,
Vector3d up)
- Helping function that specifies the position and orientation of a
view matrix.
- Parameters:
- eye - the location of the eye
- center - a point in the virtual world where the eye is looking
- up - an up vector specifying the frustum's up direction
frustum
public void frustum(double left,
double right,
double bottom,
double top,
double near,
double far)
- Creates a projection transform that mimics a standard, camera-based,
view-model. The
frustum function-call establishes a view model with the eye
at the apex of a symmetric view frustum. The arguments
define the frustum and its associated perspective projection:
(left, bottom, -near) and (right, top, -near) specify the
point on the near clipping plane that maps onto the
lower-left and upper-right corners of the window respectively,
assuming the eye is located at (0, 0, 0).
- Parameters:
- left - the vertical line on the left edge of the near
clipping plane mapped to the left edge of the graphics window
- right - the vertical line on the right edge of the near
clipping plane mapped to the right edge of the graphics window
- bottom - the horizontal line on the bottom edge of the near
clipping plane mapped to the bottom edge of the graphics window
- top - the horizontal line on the top edge of the near
- near - the distance to the frustum's near clipping plane.
This value must be positive, (the value -near is the location of the
near clip plane).
- far - the distance to the frustum's far clipping plane.
This value must be positive, and must be greater than near.
perspective
public void perspective(double fovy,
double aspect,
double zNear,
double zFar)
- Creates a projection transform that mimics a standard, camera-based,
view-model.
- Parameters:
- fovy - specifies the field of view in the y direction
- aspect - specifies the aspect ratio and thus the field of
view in the x direction. The aspect ratio is the ratio of x to y,
or width to height.
- zNear - the distance to the frustum's near clipping plane.
This value must be positive, (the value -zNear is the location of the
near clip plane).
- zFar - the distance to the frustum's far clipping plane.
ortho
public void ortho(double left,
double right,
double bottom,
double top,
double near,
double far)
- Specifies an orthographic viewing frustum in eye coordinates.
- Parameters:
- left - the vertical line on the left edge of the near
clipping plane mapped to the left edge of the graphics window
- right - the vertical line on the right edge of the near
clipping plane mapped to the right edge of the graphics window
- bottom - the horizontal line on the bottom edge of the near
clipping plane mapped to the bottom edge of the graphics window
- top - the horizontal line on the top edge of the near
clipping plane mapped to the top edge of the graphics window
- near - the distance to the frustum's near clipping plane.
(the value -near is the location of the near clip plane)
- far - the distance to the frustum's far clipping plane.
All Packages Class Hierarchy This Package Previous Next Index