|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object vmm.core3D.GridTransformMatrix
public class GridTransformMatrix
Represents an affine transform on real 3-space as a matrix;
meant for use with Grid3D
to represent transformations
applied to a basic grid to produce additional segments of a complete surface.
Constructor Summary | |
---|---|
GridTransformMatrix()
Constructs an identity matrix. |
|
GridTransformMatrix(GridTransformMatrix m)
Copy constructor. |
Method Summary | |
---|---|
Vector3D |
apply(Vector3D vec)
Applies the transform to a vector. |
Vector3D |
applyToNormal(Vector3D N)
Apply the transformation to a surface normal. |
boolean |
equals(java.lang.Object o)
Tests whether a given object is equal to this TransformMatrix. |
boolean |
getReverseSurfaceOrientation()
Gets the value of the reverseSurfaceOrientation property. |
GridTransformMatrix |
leftMultiplyBy(GridTransformMatrix m)
Multiplying this GridTransformationMatrix on the left by another matrix. |
GridTransformMatrix |
reverse()
Reverses the value of the reverseSurfaceOrientation property. |
GridTransformMatrix |
rotateX(double degrees)
Applies a rotation operation to this TransformMatrix, by multiplying it on the LEFT by a rotation matrix. |
GridTransformMatrix |
rotateY(double degrees)
Applies a rotation operation to this TransformMatrix, by multiplying it on the LEFT by a rotation matrix. |
GridTransformMatrix |
rotateZ(double degrees)
Applies a rotation operation to this TransformMatrix, by multiplying it on the LEFT by a rotation matrix. |
GridTransformMatrix |
scale(double s)
Applies a scaling operation to this TransformMatrix, by multiplying it on the LEFT by a scaling matrix. |
GridTransformMatrix |
scale(double sx,
double sy,
double sz)
Applies a scaling operation to this TransformMatrix, by multiplying it on the LEFT by a scaling matrix. |
static GridTransformMatrix |
SetGridTransformMatrix(double a0,
double a1,
double a2,
double a3,
double b0,
double b1,
double b2,
double b3,
double c0,
double c1,
double c2,
double c3,
boolean or)
Explicit constructor, giving the entries in the transformation matrix. |
GridTransformMatrix |
setReverseSurfaceOrientation(boolean reverseSurfaceOrientation)
Sets the value of the reverseSurfaceOrientation property. |
GridTransformMatrix |
setTranslation(double x,
double y,
double z)
Replaces the translation part of the matrix with the vector (x,y,z). |
GridTransformMatrix |
setTranslation(Vector3D vt)
Replaces the translation part of the matrix with a given Vector3D vt. |
GridTransformMatrix |
translate(double tx,
double ty,
double tz)
Applies a translation operation to this TransformMatrix, by multiplying it on the LEFT by a translation matrix. |
GridTransformMatrix |
translate(Vector3D v)
Applies a translation operation to this TransformMatrix, by multiplying it on the LEFT by a translation matrix. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GridTransformMatrix()
public GridTransformMatrix(GridTransformMatrix m)
m
- The TransformMatrix object to be copied. If m is null, an identity matrix is constructed.Method Detail |
---|
public static GridTransformMatrix SetGridTransformMatrix(double a0, double a1, double a2, double a3, double b0, double b1, double b2, double b3, double c0, double c1, double c2, double c3, boolean or)
or
- tells whether the transformation should be orientation-reversing.public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public Vector3D apply(Vector3D vec)
vec
- The non-null vector that is to be transformed. This vector is not modified.
public Vector3D applyToNormal(Vector3D N)
N
- The non-null normal vector that is to be transformed. This vector is not modified.
public boolean getReverseSurfaceOrientation()
setReverseSurfaceOrientation(boolean)
public GridTransformMatrix setReverseSurfaceOrientation(boolean reverseSurfaceOrientation)
applyToNormal(Vector3D)
method. If the value of this property is
true, then the transformed vector is negated.
public GridTransformMatrix reverse()
public GridTransformMatrix scale(double s)
s
- The (uniform) scale factor.
public GridTransformMatrix scale(double sx, double sy, double sz)
sx
- The scaling in the x direction.sy
- The scaling in the y direction.sz
- The scaling in the z direction.
public GridTransformMatrix translate(double tx, double ty, double tz)
tx
- The translation in the x direction.ty
- The translation in the y direction.tz
- The translation in the z direction.
public GridTransformMatrix translate(Vector3D v)
v
- The translation vector. If v == null: return this.
public GridTransformMatrix setTranslation(Vector3D vt)
vt
- The vector that becomes the new translation. A null vector is taken to be zero.
public GridTransformMatrix setTranslation(double x, double y, double z)
public GridTransformMatrix rotateZ(double degrees)
degrees
- Measure, in degrees, of the angle of rotation about the z-axis.
public GridTransformMatrix rotateX(double degrees)
degrees
- Measure, in degrees, of the angle of rotation about the x-axis.
public GridTransformMatrix rotateY(double degrees)
degrees
- Measure, in degrees, of the angle of rotation about the y-axis.
public GridTransformMatrix leftMultiplyBy(GridTransformMatrix m)
m
- the matrix by which this matrix is to be multiplied on the left. If m is null, this
matrix is not modified.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |