Class TransMatrixd
- All Implemented Interfaces:
Serializable
The MIPAV 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
However, because the transform type is limited, we can always set the third row to [ 0 0 0 1] and write instead:
[ m00 m01 m02 ] [ x ] [ t0 ] [ x' ]
[ m10 m11 m12 ] . [ y ] + [ t1 ] = [ y' ]
[ m20 m21 m22 ] [ z ] [ t2 ] [ z' ]
x' = m00*x + m01*y + m02*z + t0
y' = m10*x + m11*y + m12*z + t1
z' = m20*x + m21*y + m22*z + t2
We still represent 4x4 m with a WildMagic Matrix4d, because of the existing implementations that assume a 4x4 matrix, and the use of the upper 3x3 matrix as a 2D transform.
We considered representing m with a WildMagic Matrix3d, and t with a Vector3d, as encapsulated in the WildMagic Transformation class, but it does not match typical Mipav usage.
ORDER OF TRANSFORMATIONS = TRANSLATE, ROTATE, ZOOM or TRANSLATE, ROTATE,
SKEW, ZOOM
Row, Col format - right hand rule
2D Example
zoom_x theta tx
theta zoom_y ty
0 0 1
represented in 3D by leaving Z the identity transform:
zoom_x theta 0 tx
theta zoom_y 0 ty
0 0 1 0
0 0 0 1
Note that for 2D, the tx and ty components are stored in M02 and M12, and not in M03 and M13, as might be guessed by the use of a Matrix4d to store both 2D and 3D transforms.
Note for 3D - ref. Foley, Van Dam p. 214
Axis of rotation Direction of positive rotation is
x y to z
y z to x
z x to y
Order of rotation is important (i.e. not commutative)
Rx Ry Ry != Ry Rx Rz
- Version:
- 2, July 24, 2008, original 0.1 Nov 15, 1997
- Author:
- Matthew J. McAuliffe, Ph.D., changes Aron Helser, Geometric Tools
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intused for setting rotationprivate booleanTransform was constructed to transform 2D vectors, instead of 3Dprivate booleanboolean indicating whether this matrix is associated with a NIFTI image (special case handling)private booleanIf true, nifti matrix codes for a qform matrix If false, nifti matrix codes for a sform matrix Value has no effect if not a nifti matrixprivate intTransform ID associated with the matrix.static final intused for setting rotationstatic final intAnother Dataset transform ID.static final intComposite, dynamically generated matrix typeprivate static final String[]Array of transform ID strings.static final intMNI 152 transform ID.static final intScanner anatomical matrix associated with NIFTI typestatic final intScanner Anatomical transform ID.static final intTalairach Tournoux transform ID.static final intComposite transform ID.Fields inherited from class WildMagic.LibFoundation.Mathematics.Matrix4d
IDENTITY, M00, M01, M02, M03, M10, M11, M12, M13, M20, M21, M22, M23, M30, M31, M32, M33, ZERO -
Constructor Summary
ConstructorsConstructorDescriptionTransMatrixd(int dim) Construct a transformation matrix.TransMatrixd(int dim, int id) TransMatrixd(int dim, int id, boolean is_nifti, boolean isQform) TransMatrixd(TransMatrixd rkTM) copy constructor. -
Method Summary
Modifier and TypeMethodDescriptionclone()voidCopy(TransMatrixd rkTM) copy, overwrite this.voidcopyMatrix(double[][] newMatrix) Copies provided transformation matrix.private voiddecodeLine(RandomAccessFile raFile, int row, WildMagic.LibFoundation.Mathematics.Matrix4d matrix) Decodes the line in the matrix file.voiddecodeMatrixString(String str) Decodes the matrix from a string into the matrix array.booleandecomposeMatrix(WildMagic.LibFoundation.Mathematics.Vector3d rotate, WildMagic.LibFoundation.Mathematics.Vector3d trans, WildMagic.LibFoundation.Mathematics.Vector3d scale, WildMagic.LibFoundation.Mathematics.Vector3d shear) Decomposing a matrix into simple transformations TransMatrixd transformation sequence: Scale(Sx, Sy, Sz)*ShearXY*ShearXZ*ShearYZ* RotateX*RotateY*RotateZ*Translate(tx, ty, tz) ( *Perspective(Px, Py, Pz, Pw), no longer supported)voidgetColumn(int r, double[] column) Copy our data into the provided double arrayintgetDim()Return dimension passed to constructor.intgetID()final intReturns the transform ID associated with the matrix.static intReturns the transform ID associated with a string.static String[]Return the list of transform ID strings (for edit attributes combo box.static StringgetTransformIDStr(int m) Return the string associated with the matrix transform ID.voidInverse()Matrix inversion that replaces this objects matrix with an inverted matrix.booleanReports whether transform is Identity transform, to within a small epsilon.booleanisNIFTI()Tells whether this matrix is associated with a NIFTI image this only matters when the matrix is being saved/when the composite matrix is being generated in MatrixHolderbooleanisQform()Tells whether a NIFTI matrix is a qform matrix or a sform matrixmatrixToString(int w, int d) Produces a string of the matrix values.voidreadMatrix(RandomAccessFile raFile, boolean composite) Reads transformation matrix to a text file.voidsaveMatrix(RandomAccessFile raFile) Saves transformation matrix to a text file MIPAV formatvoidsaveMatrix(RandomAccessFile raFile, String message) Saves transformation matrix to a text file MIPAV formatvoidsaveMatrix(String fileName) Saves transformation matrix to a text file MIPAV formatvoidsaveMatrix(String fileName, String message) Saves transformation matrix to a text file MIPAV formatvoidsaveXFMMatrix(RandomAccessFile raFile) Saves transformation matrix to McGill XFM formatvoidsetIsNIFTI(boolean is_NIFTI) Accessor that sets whether or not the matrix is a NIFTI matrix.voidsetIsQform(boolean is_Qform) Accessor that sets whether a nifti matrix is a qform matrix or a sform matrix.voidsetMatrix(double[][] X) Set a submatrix.voidsetMatrix(int i0, int i1, int j0, int j1, double[][] X) Set a submatrix.voidsetRotate(double theta) Sets the rotation (2D) of transformation matrix.voidsetRotate(double thetaX, double thetaY, double thetaZ, int degreeORradian) Sets rotation (3D) of transformation matrix.voidsetRotate(WildMagic.LibFoundation.Mathematics.Vector3d alpha, WildMagic.LibFoundation.Mathematics.Vector3d beta, WildMagic.LibFoundation.Mathematics.Vector3d gamma) Sets rotation (3D) of transformation matrix.voidsetSkew(double x, double y) Sets skew part of 2D matrix.voidsetSkew(double x, double y, double z) Sets the skew parts of 3D matrix (4D Homogenous).voidsetTransform(double tX, double tY, double r) Sets 2D transformation matrix.voidsetTransform(double tX, double tY, double tZ, double rX, double rY, double rZ) Sets the 3D transformation matrix [4x4].voidsetTransform(double tX, double tY, double tZ, double rX, double rY, double rZ, double sX, double sY, double sZ, double skX, double skY, double skZ) Sets the 3D transformation matrix [4x4].voidsetTransformID(int t_id) Sets the transform ID for the matrix.voidsetTranslate(double x, double y) Sets translation parts of 2D matrix.voidsetTranslate(double x, double y, double z) Sets the translation parts of 3D matrix (4D Homogenous).voidsetZoom(double sx, double sy) Sets the zoom parts of 2D matrix.voidsetZoom(double sx, double sy, double sz) Sets the zoom parts of 3D matrix.Produces a string of the matrix values, rows separated by tabs.toString()ToString method that includes the matrix printout as well as the transform ID of the transmatrixdfinal voidtransform(double[] pt, double[] tPt) Takes a 3D or 2D point (as a double array) and premultiplies it by the 3D transformation matrix.final voidtransform(double x, double y, double[] tPt) Takes double components of a 2D point and premultiplies it by the 2d transformation matrix.final voidtransform(double x, double y, double z, double[] tPt) Takes the double components of a 3D point and premultiplies it by the 3D transformation matrix.final voidtransform(float[] pt, float[] tPt) Takes a 3D point, as a float array, and premultiplies it by the 3D transformation matrix.final voidtransform(float x, float y, float[] tPt) Takes float components of a 2D point and premultiplies it by the 2d transformation matrix.final voidtransform(float x, float y, float z, float[] tPt) Takes the float components of a 3D point and premultiplies it by the 3D transformation matrix.final PolygonTranforms a Polygon (2D).final voidtransformAsPoint2Dd(WildMagic.LibFoundation.Mathematics.Vector2d[] vects, WildMagic.LibFoundation.Mathematics.Vector2d[] tVects) Takes an array of Point2Dd 2D vectors and multiplies them with the 2d transformation matrix.final voidtransformAsPoint3Dd(WildMagic.LibFoundation.Mathematics.Vector3d pt, WildMagic.LibFoundation.Mathematics.Vector3d tPt) Takes a Point3Dd 3D point and multiplies it by the 3D transformation matrix.final voidtransformAsVector3Dd(VOIBase vects, WildMagic.LibFoundation.Mathematics.Vector3d[] tVects) Takes an array of Vector3Dd 2D vectors and multiplies them with the 2d transformation matrix.final voidtransformAsVector3Dd(WildMagic.LibFoundation.Mathematics.Vector3d[] vects, WildMagic.LibFoundation.Mathematics.Vector3d[] tVects) Takes an array of Vector3Dd 2D vectors and multiplies them with the 2d transformation matrix.Methods inherited from class WildMagic.LibFoundation.Mathematics.Matrix4d
adjoint, copy, determinant, equals, get, getColumnMajor, getData, getData, identity, inverse, inverse, makeObliqueProjection, makePerspectiveProjection, makeReflection, makeZero, mult, mult, mult, mult, multLeft, multLeft, multLeft, multRight, multRight, qForm, set, set, timesTranspose, transpose, transpose, transposeTimes, transposeTimes
-
Field Details
-
TRANSFORM_UNKNOWN
public static final int TRANSFORM_UNKNOWNComposite transform ID.- See Also:
-
TRANSFORM_SCANNER_ANATOMICAL
public static final int TRANSFORM_SCANNER_ANATOMICALScanner Anatomical transform ID.- See Also:
-
TRANSFORM_ANOTHER_DATASET
public static final int TRANSFORM_ANOTHER_DATASETAnother Dataset transform ID.- See Also:
-
TRANSFORM_TALAIRACH_TOURNOUX
public static final int TRANSFORM_TALAIRACH_TOURNOUXTalairach Tournoux transform ID.- See Also:
-
TRANSFORM_MNI_152
public static final int TRANSFORM_MNI_152MNI 152 transform ID.- See Also:
-
TRANSFORM_COMPOSITE
public static final int TRANSFORM_COMPOSITEComposite, dynamically generated matrix type- See Also:
-
TRANSFORM_NIFTI_SCANNER_ANATOMICAL
public static final int TRANSFORM_NIFTI_SCANNER_ANATOMICALScanner anatomical matrix associated with NIFTI type- See Also:
-
TRANSFORM_ID_STR
Array of transform ID strings. -
DEGREES
public static final int DEGREESused for setting rotation- See Also:
-
RADIANS
public static final int RADIANSused for setting rotation- See Also:
-
m_TransformID
private int m_TransformIDTransform ID associated with the matrix. -
m_IsNIFTI
private boolean m_IsNIFTIboolean indicating whether this matrix is associated with a NIFTI image (special case handling) -
m_IsQform
private boolean m_IsQformIf true, nifti matrix codes for a qform matrix If false, nifti matrix codes for a sform matrix Value has no effect if not a nifti matrix -
m_Is2D
private boolean m_Is2DTransform was constructed to transform 2D vectors, instead of 3D
-
-
Constructor Details
-
TransMatrixd
public TransMatrixd(int dim) Construct a transformation matrix.- Parameters:
dim- should be 3 or 4 (square matrix)
-
TransMatrixd
public TransMatrixd(int dim, int id) -
TransMatrixd
public TransMatrixd(int dim, int id, boolean is_nifti, boolean isQform) -
TransMatrixd
copy constructor.- Parameters:
rkTM- matrix to copy
-
-
Method Details
-
getDim
public int getDim()Return dimension passed to constructor.- Returns:
- 3 for 2D transform, 4 for 3D transform.
-
getID
public int getID() -
clone
-
Copy
copy, overwrite this.- Parameters:
rkTM- matrix to copy
-
decodeMatrixString
Decodes the matrix from a string into the matrix array.- Parameters:
str- Matrix represented as a string.
-
decomposeMatrix
public boolean decomposeMatrix(WildMagic.LibFoundation.Mathematics.Vector3d rotate, WildMagic.LibFoundation.Mathematics.Vector3d trans, WildMagic.LibFoundation.Mathematics.Vector3d scale, WildMagic.LibFoundation.Mathematics.Vector3d shear) Decomposing a matrix into simple transformations TransMatrixd transformation sequence: Scale(Sx, Sy, Sz)*ShearXY*ShearXZ*ShearYZ* RotateX*RotateY*RotateZ*Translate(tx, ty, tz) ( *Perspective(Px, Py, Pz, Pw), no longer supported)- Parameters:
rotate- rotation about x, y, z axis, in radianstrans- translationscale- scale, for each dimensionshear- shear.X is XY, shear.Y is XZ, shear.Z is YZ- Returns:
- true if decompose was successful.
-
isIdentity
public boolean isIdentity()Reports whether transform is Identity transform, to within a small epsilon.- Returns:
- true iff identity
-
isNIFTI
public boolean isNIFTI()Tells whether this matrix is associated with a NIFTI image this only matters when the matrix is being saved/when the composite matrix is being generated in MatrixHolder- Returns:
- is this a nifti matrix
-
setIsNIFTI
public void setIsNIFTI(boolean is_NIFTI) Accessor that sets whether or not the matrix is a NIFTI matrix.- Parameters:
is_NIFTI- val to set
-
isQform
public boolean isQform()Tells whether a NIFTI matrix is a qform matrix or a sform matrix- Returns:
- true if qform, false if sform.
-
setIsQform
public void setIsQform(boolean is_Qform) Accessor that sets whether a nifti matrix is a qform matrix or a sform matrix.- Parameters:
is_Qform- val to set
-
readMatrix
Reads transformation matrix to a text file.This method reads two formats MIPAV format
4 // number of rows in matrix 4 // number of cols in matrix 0.234 0.33 0.22 5.0 // matrix info separated by a space 0.234 0.33 0.22 10.0 // matrix info separated by a space 0.234 0.33 0.22 12.0 // matrix info separated by a space 0.0 0.0 0.0 1.0 // matrix info separated by a space.
Note the above is a homogenous transformation matrix
FSL or alternate format supported
0.234 0.33 0.22 5.0 // matrix info separated by 2 spaces 0.234 0.33 0.22 5.0 // matrix info separated by 2 spaces 0.234 0.33 0.22 5.0 // matrix info separated by 2 spaces 0 0 0 1 // matrix info separated by 2 spaces
also note integer values
- Parameters:
raFile- random access file pointercomposite- if true make a composite matrix of the by multipling this matrix with the one to be read from the file. If false replace this object matrix with a new matrix read from the file.
-
saveMatrix
Saves transformation matrix to a text file MIPAV format- Parameters:
fileName- - file name, including the path- See Also:
-
saveMatrix
Saves transformation matrix to a text file MIPAV format- Parameters:
fileName- - file name, including the pathmessage- String, may be null for no message.- See Also:
-
saveMatrix
Saves transformation matrix to a text file MIPAV format4 // number of rows in matrix 4 // number of cols in matrix 0.234 0.33 0.22 5.0 // matrix info separated by a space 0.234 0.33 0.22 10.0 // matrix info separated by a space 0.234 0.33 0.22 12.0 // matrix info separated by a space 0.0 0.0 0.0 1.0 // matrix info separated by a space.
- Parameters:
raFile- random access file pointer- See Also:
-
saveMatrix
Saves transformation matrix to a text file MIPAV format4 // number of rows in matrix 4 // number of cols in matrix 0.234 0.33 0.22 5.0 // matrix info separated by a space 0.234 0.33 0.22 10.0 // matrix info separated by a space 0.234 0.33 0.22 12.0 // matrix info separated by a space 0.0 0.0 0.0 1.0 // matrix info separated by a space.
- Parameters:
raFile- random access file pointermessage- String, may be null for no message.
-
saveXFMMatrix
Saves transformation matrix to McGill XFM format- Parameters:
raFile- random access file pointer
-
copyMatrix
public void copyMatrix(double[][] newMatrix) Copies provided transformation matrix.- Parameters:
newMatrix- 2D array to copy, 3x3 or 4x4
-
getColumn
public void getColumn(int r, double[] column) Copy our data into the provided double array- Parameters:
r- row to copycolumn- place to put column data, length 3 or 4
-
setMatrix
public void setMatrix(int i0, int i1, int j0, int j1, double[][] X) Set a submatrix. Borrowed from Jama, useful for copying a Jama matrix M by passing in M.getArray() for param X- Parameters:
i0- Initial row indexi1- Final row indexj0- Initial column indexj1- Final column indexX- A(i0:i1,j0:j1)- Throws:
ArrayIndexOutOfBoundsException- Submatrix indices
-
setMatrix
public void setMatrix(double[][] X) Set a submatrix. Borrowed from Jama, useful for copying a Jama matrix M by passing in M.getArray() for param X- Parameters:
X- A(i0:i1,j0:j1)- Throws:
ArrayIndexOutOfBoundsException- Submatrix indices
-
setRotate
public void setRotate(double theta) Sets the rotation (2D) of transformation matrix.- Parameters:
theta- angle of rotation, in degrees
-
setRotate
public void setRotate(WildMagic.LibFoundation.Mathematics.Vector3d alpha, WildMagic.LibFoundation.Mathematics.Vector3d beta, WildMagic.LibFoundation.Mathematics.Vector3d gamma) Sets rotation (3D) of transformation matrix.- Parameters:
alpha- row0beta- row1gamma- row2
-
setRotate
public void setRotate(double thetaX, double thetaY, double thetaZ, int degreeORradian) Sets rotation (3D) of transformation matrix.- Parameters:
thetaX- angle (degrees or radians) of rotation about the X axis;thetaY- angle (degrees or radians) of rotation about the Y axis;thetaZ- angle (degrees or radians) of rotation about the Z axis;degreeORradian- DEGREES or RADIANS
-
setSkew
public void setSkew(double x, double y) Sets skew part of 2D matrix.- Parameters:
x- Skew x parameter.y- Skew y parameter.
-
setSkew
public void setSkew(double x, double y, double z) Sets the skew parts of 3D matrix (4D Homogenous).- Parameters:
x- x skewy- y skewz- z skew
-
setTransform
public void setTransform(double tX, double tY, double r) Sets 2D transformation matrix.- Parameters:
tX- x translationtY- y translationr- rotation angle in degrees, about unseen z axis
-
setTransform
public void setTransform(double tX, double tY, double tZ, double rX, double rY, double rZ) Sets the 3D transformation matrix [4x4].- Parameters:
tX- x translationtY- y translationtZ- z translationrX- x rotation angle in degreesrY- y rotation angle in degreesrZ- z rotation angle in degrees
-
setTransform
public void setTransform(double tX, double tY, double tZ, double rX, double rY, double rZ, double sX, double sY, double sZ, double skX, double skY, double skZ) Sets the 3D transformation matrix [4x4].- Parameters:
tX- x translationtY- y translationtZ- z translationrX- x rotation angle in degreesrY- y rotation angle in degreesrZ- z rotation angle in degreessX- x scalesY- y scalesZ- z scaleskX- x skewskY- y skewskZ- z skew
-
setTranslate
public void setTranslate(double x, double y) Sets translation parts of 2D matrix.- Parameters:
x- x translationy- y translation
-
setTranslate
public void setTranslate(double x, double y, double z) Sets the translation parts of 3D matrix (4D Homogenous).- Parameters:
x- x translationy- y translationz- z translation
-
setZoom
public void setZoom(double sx, double sy) Sets the zoom parts of 2D matrix.- Parameters:
sx- zoom in the x coordinatesy- zoom in the y coordinate
-
setZoom
public void setZoom(double sx, double sy, double sz) Sets the zoom parts of 3D matrix.- Parameters:
sx- zoom in the x coordinatesy- zoom in the y coordinatesz- zoom in the z coordinate
-
toDialogString
Produces a string of the matrix values, rows separated by tabs.- Returns:
- formatted string
-
transform
Tranforms a Polygon (2D).- Parameters:
gon- input polygon- Returns:
- returns new transformed Polygon
-
transformAsPoint2Dd
public final void transformAsPoint2Dd(WildMagic.LibFoundation.Mathematics.Vector2d[] vects, WildMagic.LibFoundation.Mathematics.Vector2d[] tVects) Takes an array of Point2Dd 2D vectors and multiplies them with the 2d transformation matrix.- Parameters:
vects- double vectors to be transformedtVects- transformed vectors
-
transformAsVector3Dd
public final void transformAsVector3Dd(WildMagic.LibFoundation.Mathematics.Vector3d[] vects, WildMagic.LibFoundation.Mathematics.Vector3d[] tVects) Takes an array of Vector3Dd 2D vectors and multiplies them with the 2d transformation matrix.- Parameters:
vects- double vectors to be transformedtVects- transformed vectors
-
transformAsVector3Dd
public final void transformAsVector3Dd(VOIBase vects, WildMagic.LibFoundation.Mathematics.Vector3d[] tVects) Takes an array of Vector3Dd 2D vectors and multiplies them with the 2d transformation matrix.- Parameters:
vects- double vectors to be transformedtVects- transformed vectors
-
transform
public final void transform(double[] pt, double[] tPt) Takes a 3D or 2D point (as a double array) and premultiplies it by the 3D transformation matrix.- Parameters:
pt- coordinate to be transformedtPt- transformed point
-
transform
public final void transform(float[] pt, float[] tPt) Takes a 3D point, as a float array, and premultiplies it by the 3D transformation matrix.- Parameters:
pt- coordinate to be transformedtPt- the transformed point
-
transformAsPoint3Dd
public final void transformAsPoint3Dd(WildMagic.LibFoundation.Mathematics.Vector3d pt, WildMagic.LibFoundation.Mathematics.Vector3d tPt) Takes a Point3Dd 3D point and multiplies it by the 3D transformation matrix.- Parameters:
pt- 3D double point to be transformedtPt- transformed point
-
transform
public final void transform(double x, double y, double[] tPt) Takes double components of a 2D point and premultiplies it by the 2d transformation matrix.- Parameters:
x- x coordinate to be transformdy- y coordinate to be transformdtPt- transformed point
-
transform
public final void transform(float x, float y, float[] tPt) Takes float components of a 2D point and premultiplies it by the 2d transformation matrix.- Parameters:
x- x coordinate to be transformedy- y coordinate to be transformedtPt- transformed point
-
transform
public final void transform(double x, double y, double z, double[] tPt) Takes the double components of a 3D point and premultiplies it by the 3D transformation matrix.- Parameters:
x- x coordinate to be transformedy- y coordinate to be transformedz- z coordinate to be transformedtPt- transformed point
-
transform
public final void transform(float x, float y, float z, float[] tPt) Takes the float components of a 3D point and premultiplies it by the 3D transformation matrix.- Parameters:
x- x coordinate to be transformedy- y coordinate to be transformedz- z coordinate to be transformedtPt- the transformed point
-
getTransformID
public final int getTransformID()Returns the transform ID associated with the matrix.- Returns:
- int transform ID
-
getTransformIDFromStr
Returns the transform ID associated with a string.- Parameters:
s- String to test- Returns:
- data type
-
getTransformIDStr
Return the list of transform ID strings (for edit attributes combo box.- Returns:
- string [] of transform ID
-
getTransformIDStr
Return the string associated with the matrix transform ID.- Parameters:
m- transform ID- Returns:
- the string associated with the transform ID
-
setTransformID
public void setTransformID(int t_id) Sets the transform ID for the matrix.- Parameters:
t_id- transform ID
-
toString
ToString method that includes the matrix printout as well as the transform ID of the transmatrixd- Overrides:
toStringin classWildMagic.LibFoundation.Mathematics.Matrix4d- Returns:
- printout
-
decodeLine
private void decodeLine(RandomAccessFile raFile, int row, WildMagic.LibFoundation.Mathematics.Matrix4d matrix) Decodes the line in the matrix file.- Parameters:
raFile- file pointerrow- row reference to store transformation matrixmatrix- the matrix where the data is to be stored
-
Inverse
public void Inverse()Matrix inversion that replaces this objects matrix with an inverted matrix. Special handling for 2D vs 3D cases. -
matrixToString
Produces a string of the matrix values.- Parameters:
w- Column width.d- Number of digits after the decimal.- Returns:
- String containing the values from the matrix.
-