|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface XMatrix
A matrix capables to perform some operations. The GeoAPI Matrix interface is
basically a two dimensional array of numbers. The XMatrix interface adds
inversion and multiplication capabilities
among others. It is used as a bridge across various matrix implementations in Java3D
(Matrix3f, Matrix3d, Matrix4f,
Matrix4d, GMatrix).
MatrixFactory.toXMatrix(Matrix)
| referencing/geotk-referencing (download) | View source code for this class |
| Method Summary | |
|---|---|
XMatrix |
clone()
Returns a clone of this matrix. |
boolean |
equals(Matrix matrix,
double tolerance)
Compares the element values regardless the object class. |
boolean |
equals(Object object,
ComparisonMode mode)
Compares this matrix with the given object for equality. |
void |
invert()
Inverts this matrix in place. |
boolean |
isAffine()
Returns true if this matrix is an affine transform. |
boolean |
isIdentity(double tolerance)
Returns true if this matrix is an identity matrix using the provided tolerance. |
void |
multiply(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: this = -this. |
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 Matrix |
|---|
getElement, getNumCol, getNumRow, isIdentity, setElement |
| Methods inherited from interface LenientComparable |
|---|
equals |
| Method Detail |
|---|
void setZero()
void setIdentity()
boolean isIdentity(double tolerance)
true if this matrix is an identity matrix using the provided tolerance.
This method is equivalent to computing the difference between this matrix and an identity
matrix of identical size, and returning true if and only if all differences are
smaller than or equal to tolerance.
tolerance - The tolerance value.
true if this matrix is close enough to the identity matrix
given the tolerance value.boolean isAffine()
true 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.
true if this matrix is affine.void negate()
this = -this.
void transpose()
void invert()
throws SingularMatrixException
SingularMatrixException - if this matrix is not invertible.void multiply(Matrix matrix)
this = this × matrix. 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.
matrix - The matrix to multiply to this matrix.
boolean equals(Matrix matrix,
double tolerance)
GMatrix.epsilonEquals. The method name is
intentionally different in order to avoid ambiguities at compile-time.
matrix - The matrix to compare.tolerance - The tolerance value.
true if this matrix is close enough to the given matrix
given the tolerance value.
boolean equals(Object object,
ComparisonMode mode)
mode argument:
STRICT: the two matrixes must be of the same
class, have the same size and the same element values.BY_CONTRACT/IGNORE_METADATA: the two matrixes must have the same size and the same element
values, but are not required to be the same implementation class (any Matrix
is okay).APPROXIMATIVE: the two matrixes must have
the same size, but the element values can differ up to some threshold. The threshold
value is determined empirically and may change in future Geotk versions.
equals in interface LenientComparableobject - The object to compare to this.mode - The strictness level of the comparison.
true if both objects are equal.XMatrix clone()
clone in interface Matrix
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||