org.geotools.referencing.operation.matrix
Interface XMatrix

All Superinterfaces:
org.opengis.util.Cloneable, java.lang.Cloneable, org.opengis.referencing.operation.Matrix
All Known Implementing Classes:
GeneralMatrix, Matrix1, Matrix2, Matrix3, Matrix4

public interface XMatrix
extends org.opengis.referencing.operation.Matrix

A matrix capables to perform some matrix operations. The basic Matrix interface is basically just a two dimensional array of numbers. The interface add inversion and multiplication capabilities. It is used as a bridge across various matrix implementations in Java3D (Matrix3f, Matrix3d, Matrix4f, Matrix4d, GMatrix).

Since:
2.2
Version:
$Id: XMatrix.java 17964 2006-02-10 11:27:41Z desruisseaux $
Author:
Martin Desruisseaux

Method Summary
 void invert()
          Inverts this matrix in place.
 boolean isAffine()
          Returns if this matrix is an affine transform.
 void multiply(org.opengis.referencing.operation.Matrix matrix)
          Sets the value of this matrix to the result of multiplying itself with the specified matrix.
 void negate()
          Negates the value of this matrix: = .
 void setIdentity()
          Sets this matrix to the identity matrix.
 void setZero()
          Sets all the values in this matrix to zero.
 void transpose()
          Sets the value of this matrix to its transpose.
 
Methods inherited from interface org.opengis.referencing.operation.Matrix
clone, getElement, getNumCol, getNumRow, isIdentity, setElement
 

Method Detail

setZero

public void setZero()
Sets all the values in this matrix to zero.


setIdentity

public void setIdentity()
Sets this matrix to the identity matrix.


isAffine

public 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.


negate

public void negate()
Negates the value of this matrix: = .


transpose

public void transpose()
Sets the value of this matrix to its transpose.


invert

public void invert()
            throws javax.vecmath.SingularMatrixException
Inverts this matrix in place.

Throws:
javax.vecmath.SingularMatrixException - if this matrix is not invertible.

multiply

public 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.



Copyright © GeoTools. All Rights Reserved.