org.geotools.referencing.operation.matrix
Class Matrix4

java.lang.Object
  extended byjavax.vecmath.Matrix4d
      extended byorg.geotools.referencing.operation.matrix.Matrix4
All Implemented Interfaces:
org.opengis.util.Cloneable, java.lang.Cloneable, org.opengis.referencing.operation.Matrix, java.io.Serializable, XMatrix

public class Matrix4
extends javax.vecmath.Matrix4d
implements XMatrix

A matrix of fixed {@value}×{@value} size. This specialized matrix provides better accuracy than GeneralMatrix for matrix inversion and multiplication. It is used primarily for supporting datum shifts.

Since:
2.2
Version:
$Id: Matrix4.java 17964 2006-02-10 11:27:41Z desruisseaux $
Author:
Martin Desruisseaux
See Also:
Serialized Form

Field Summary
static int SIZE
          The matrix size, which is 4.
 
Fields inherited from class javax.vecmath.Matrix4d
m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31, m32, m33
 
Constructor Summary
Matrix4()
          Creates a new identity matrix.
Matrix4(double m00, double m01, double m02, double m03, double m10, double m11, double m12, double m13, double m20, double m21, double m22, double m23, double m30, double m31, double m32, double m33)
          Creates a new matrix initialized to the specified values.
Matrix4(org.opengis.referencing.operation.Matrix matrix)
          Creates a new matrix initialized to the same value than the specified one.
 
Method Summary
 int getNumCol()
          Returns the number of colmuns in this matrix, which is always {@value} in this implementation.
 int getNumRow()
          Returns the number of rows in this matrix, which is always {@value} in this implementation.
 boolean isAffine()
          Returns if this matrix is an affine transform. A transform is affine if the matrix is square and last row contains only zeros, except in the last column which contains 1.
 boolean isIdentity()
          Returns if this matrix is an identity matrix.
 void multiply(org.opengis.referencing.operation.Matrix matrix)
          Sets the value of this matrix to the result of multiplying itself with the specified matrix. In other words, performs = × . In the context of coordinate transformations, this is equivalent to AffineTransform.concatenate: first transforms by the supplied transform and then transform the result by the original transform.
 java.lang.String toString()
          Returns a string representation of this matrix.
 
Methods inherited from class javax.vecmath.Matrix4d
add, add, add, add, clone, determinant, epsilonEquals, epsilonEquals, equals, equals, get, get, get, get, get, get, get, getColumn, getColumn, getElement, getRotationScale, getRotationScale, getRow, getRow, getScale, hashCode, invert, invert, mul, mul, mul, mul, mulTransposeBoth, mulTransposeLeft, mulTransposeRight, negate, negate, rotX, rotY, rotZ, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, setColumn, setColumn, setColumn, setElement, setIdentity, setRotation, setRotation, setRotation, setRotation, setRotation, setRotationScale, setRotationScale, setRow, setRow, setRow, setScale, setTranslation, setZero, sub, sub, transform, transform, transform, transform, transform, transform, transform, transform, transform, transform, transform, transform, transpose, transpose
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.geotools.referencing.operation.matrix.XMatrix
invert, negate, setIdentity, setZero, transpose
 
Methods inherited from interface org.opengis.referencing.operation.Matrix
clone, getElement, setElement
 

Field Detail

SIZE

public static final int SIZE
The matrix size, which is 4.

See Also:
Constant Field Values
Constructor Detail

Matrix4

public Matrix4()
Creates a new identity matrix.


Matrix4

public Matrix4(double m00,
               double m01,
               double m02,
               double m03,
               double m10,
               double m11,
               double m12,
               double m13,
               double m20,
               double m21,
               double m22,
               double m23,
               double m30,
               double m31,
               double m32,
               double m33)
Creates a new matrix initialized to the specified values.


Matrix4

public Matrix4(org.opengis.referencing.operation.Matrix matrix)
Creates a new matrix initialized to the same value than the specified one. The specified matrix size must be {@value}×{@value}.

Method Detail

getNumRow

public final int getNumRow()
Returns the number of rows in this matrix, which is always {@value} in this implementation.

Specified by:
getNumRow in interface org.opengis.referencing.operation.Matrix

getNumCol

public final int getNumCol()
Returns the number of colmuns in this matrix, which is always {@value} in this implementation.

Specified by:
getNumCol in interface org.opengis.referencing.operation.Matrix

isIdentity

public final boolean isIdentity()
Returns if this matrix is an identity matrix.

Specified by:
isIdentity in interface org.opengis.referencing.operation.Matrix

isAffine

public final boolean isAffine()
Returns if this matrix is an affine transform. A transform is affine if the matrix is square and last row contains only zeros, except in the last column which contains 1.

Specified by:
isAffine in interface XMatrix

multiply

public final void multiply(org.opengis.referencing.operation.Matrix matrix)
Sets the value of this matrix to the result of multiplying itself with the specified matrix. In other words, performs = × . In the context of coordinate transformations, this is equivalent to AffineTransform.concatenate: first transforms by the supplied transform and then transform the result by the original transform.

Specified by:
multiply in interface XMatrix

toString

public java.lang.String toString()
Returns a string representation of this matrix. The returned string is implementation dependent. It is usually provided for debugging purposes only.



Copyright © GeoTools. All Rights Reserved.