|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectmaspack.matrix.MatrixObject
maspack.matrix.AffineTransform3dObject
Base class for 4 x 4 matrices representing 3D affine transformations.
A 3D affine
transformation applied to a 3-vector v has the form
A v + b
In homogeneous coordinates, this is represented by
a 4 x 4 matrix of the form
[ A p ]
M = [ ]
[ 0 1 ]
| Constructor Summary | |
AffineTransform3dObject()
|
|
| Method Summary | |
int |
colSize()
Returns the number of columns in this matrix (which is always 4). |
boolean |
epsilonEquals(AffineTransform3dObject X,
double epsilon)
Returns true if the elements of this transformation equal those of transform X1within a
prescribed tolerance epsilon. |
boolean |
equals(AffineTransform3dObject X)
Returns true if the elements of this transformation exactly equal those of transform X1. |
void |
get(double[] values)
Copies the elements of this matrix into an array of doubles. The elements are stored using row-major order, so that element (i,j) is stored at
location i*colSize()+j. |
double |
get(int i,
int j)
Gets a single element of this matrix. |
void |
getColumn(int j,
double[] values)
Copies a column of this matrix into an array of doubles. |
Matrix3dObject |
getMatrix()
Returns the matrix assiciated with this affine transform. |
Vector3d |
getOffset()
Returns the offset vector assiciated with this affine transform. |
void |
getRow(int i,
double[] values)
Copies a row of this matrix into an array of doubles. |
boolean |
invert()
Inverts this transform in place. |
void |
mul(Vector4d vr)
Multiplies the column vector vr by this transform and places the result back in vr. |
void |
mul(Vector4d vr,
Vector4d v1)
Multiplies the column vector v1 by this transform and places the result in vr. |
boolean |
mulInverse(Vector4d vr)
Multiplies the column vector vr by the inverse of this transform and places the result back in vr. |
boolean |
mulInverse(Vector4d vr,
Vector4d v1)
Multiplies the column vector v1 by the inverse of this transform and places the result in vr. |
int |
rowSize()
Returns the number of rows in this matrix (which is always 4). |
void |
set(double[] vals)
Sets the elements of this matrix from an array of doubles. The elements in the array should be stored using row-major order, so that element (i,j) is stored at location
i*colSize()+j. |
void |
set(int i,
int j,
double value)
Sets a single element of this matrix. |
void |
setColumn(int j,
double[] values)
Sets a column of this matrix from an array of doubles. |
void |
setIdentity()
Sets the transformation to the identity. |
void |
setRotation(AxisAngle axisAng)
Sets the matrix component of this affine transform to an explicit rotation. |
void |
setRotation(Quaternion quat)
Sets the matrix component of this affine transform to an explicit rotation. |
void |
setRotation(RotationMatrix3d R)
Sets the matrix component of this affine transform to an explicit rotation. |
void |
setRow(int i,
double[] values)
Set a row of this matrix from an array of doubles. |
void |
setTranslation(Vector3d p)
Sets the translation component of this affine transform. |
| Methods inherited from class maspack.matrix.MatrixObject |
determinant, epsilonEquals, equals, equals, frobeniusNorm, get, getColumn, getRow, infinityNorm, isFixedSize, oneNorm, scan, set, set, setColumn, setRow, setSize, toString, toString, toString |
| Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public AffineTransform3dObject()
| Method Detail |
public Matrix3dObject getMatrix()
public Vector3d getOffset()
public int colSize()
colSize in class MatrixObjectpublic int rowSize()
rowSize in class MatrixObject
public double get(int i,
int j)
get in class MatrixObjecti - element row indexj - element column index
public void get(double[] values)
(i,j) is stored at
location i*colSize()+j.
get in class MatrixObjectvalues - array into which values are copied
public void getColumn(int j,
double[] values)
getColumn in class MatrixObjectj - column indexvalues - array into which the column is copied
public void getRow(int i,
double[] values)
getRow in class MatrixObjecti - row indexvalues - array into which the row is copied
public final void set(int i,
int j,
double value)
set in class MatrixObjecti - element row indexj - element column indexvalue - element valuepublic void set(double[] vals)
(i,j) is stored at location
i*colSize()+j.
set in class MatrixObjectvals - array from which values are copied
public void setColumn(int j,
double[] values)
setColumn in class MatrixObjectj - column indexvalues - array from which column values are copied
public void setRow(int i,
double[] values)
setRow in class MatrixObjecti - row indexvalues - array from which the row is copiedpublic void setTranslation(Vector3d p)
p - translation vectorpublic void setRotation(AxisAngle axisAng)
axisAng - axis-angle describing the rotationpublic void setRotation(Quaternion quat)
quat - quaternion describing the rotationpublic void setRotation(RotationMatrix3d R)
R - rotation matrixpublic void setIdentity()
public void mul(Vector4d vr,
Vector4d v1)
vr - result vectorv1 - vector to multiplypublic void mul(Vector4d vr)
vr - vector to multiply (in place)
public boolean mulInverse(Vector4d vr,
Vector4d v1)
vr - result vectorv1 - vector to multiply
public boolean mulInverse(Vector4d vr)
vr - vector to multiply (in place)
public boolean invert()
public boolean epsilonEquals(AffineTransform3dObject X,
double epsilon)
X1within a
prescribed tolerance epsilon.
X - transform to compare withepsilon - comparison tolerance
public boolean equals(AffineTransform3dObject X)
X1.
X - transform to compare with
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||