|
deegree 2.1 (2007/11/08 09:57 build-328-official) | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.deegree.model.csct.ct.AbstractMathTransform
org.deegree.model.csct.ct.MatrixTransform
final class MatrixTransform
Transforms multi-dimensional coordinate points using a Matrix
.
Nested Class Summary | |
---|---|
(package private) static class |
MatrixTransform.Provider
The provider for MatrixTransform . |
Nested classes/interfaces inherited from class org.deegree.model.csct.ct.AbstractMathTransform |
---|
AbstractMathTransform.Inverse |
Constructor Summary | |
---|---|
protected |
MatrixTransform(javax.vecmath.GMatrix matrix)
Construct a transform. |
Method Summary | |
---|---|
Matrix |
derivative(CoordinatePoint point)
Gets the derivative of this transform at a point. |
Matrix |
derivative(Point2D point)
Gets the derivative of this transform at a point. |
boolean |
equals(Object object)
Compares the specified object with this math transform for equality. |
int |
getDimSource()
Gets the dimension of input points. |
int |
getDimTarget()
Gets the dimension of output points. |
Matrix |
getMatrix()
Returns a copy of the matrix. |
int |
hashCode()
Returns a hash value for this transform. |
MathTransform |
inverse()
Creates the inverse transform of this object. |
boolean |
isIdentity()
Tests whether this transform does not move any points. |
String |
toString()
Returns the WKT for this math transform. |
(package private) static String |
toString(Matrix matrix)
Returns the WKT for an affine transform using the specified matrix. |
void |
transform(double[] srcPts,
int srcOff,
double[] dstPts,
int dstOff,
int numPts)
Transforms an array of floating point coordinates by this matrix. |
void |
transform(float[] srcPts,
int srcOff,
float[] dstPts,
int dstOff,
int numPts)
Transforms an array of floating point coordinates by this matrix. |
Methods inherited from class org.deegree.model.csct.ct.AbstractMathTransform |
---|
addParameter, addParameter, createTransformedShape, createTransformedShape, getName, paramMT, transform, transform |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
protected MatrixTransform(javax.vecmath.GMatrix matrix)
Method Detail |
---|
public void transform(float[] srcPts, int srcOff, float[] dstPts, int dstOff, int numPts)
GMatrix.getNumCol()
-1
. For example, for square
matrix of size 4×4, coordinate points are three-dimensional and stored in the arrays
starting at the specified offset (srcOff
) in the order
[x0, y0, z0,
x1, y1, z1...,
xn, yn, zn]
.
The transformed points (x',y',z')
are computed as below (note that this
computation is similar to PerspectiveTransform
):
[ u ] [ m<sub>00</sub> m<sub>01</sub> m<sub>02</sub> m<sub>03</sub> ] [ x ] [ v ] = [ m<sub>10</sub> m<sub>11</sub> m<sub>12</sub> m<sub>13</sub> ] [ y ] [ w ] [ m<sub>20</sub> m<sub>21</sub> m<sub>22</sub> m<sub>23</sub> ] [ z ] [ t ] [ m<sub>30</sub> m<sub>31</sub> m<sub>32</sub> m<sub>33</sub> ] [ 1 ] x' = u/t y' = v/t y' = w/t
transform
in interface MathTransform
transform
in class AbstractMathTransform
srcPts
- The array containing the source point coordinates.srcOff
- The offset to the first point to be transformed in the source array.dstPts
- The array into which the transformed point coordinates are returned.dstOff
- The offset to the location of the first transformed point that is stored in the
destination array. The source and destination array sections can be overlaps.numPts
- The number of points to be transformedpublic void transform(double[] srcPts, int srcOff, double[] dstPts, int dstOff, int numPts)
GMatrix.getNumCol()
-1
. For example, for square
matrix of size 4×4, coordinate points are three-dimensional and stored in the arrays
starting at the specified offset (srcOff
) in the order
[x0, y0, z0,
x1, y1, z1...,
xn, yn, zn]
.
The transformed points (x',y',z')
are computed as below (note that this
computation is similar to PerspectiveTransform
):
[ u ] [ m<sub>00</sub> m<sub>01</sub> m<sub>02</sub> m<sub>03</sub> ] [ x ] [ v ] = [ m<sub>10</sub> m<sub>11</sub> m<sub>12</sub> m<sub>13</sub> ] [ y ] [ w ] [ m<sub>20</sub> m<sub>21</sub> m<sub>22</sub> m<sub>23</sub> ] [ z ] [ t ] [ m<sub>30</sub> m<sub>31</sub> m<sub>32</sub> m<sub>33</sub> ] [ 1 ] x' = u/t y' = v/t y' = w/t
transform
in interface MathTransform
srcPts
- The array containing the source point coordinates.srcOff
- The offset to the first point to be transformed in the source array.dstPts
- The array into which the transformed point coordinates are returned.dstOff
- The offset to the location of the first transformed point that is stored in the
destination array. The source and destination array sections can be overlaps.numPts
- The number of points to be transformedpublic Matrix derivative(Point2D point)
derivative
in class AbstractMathTransform
point
- The coordinate point where to evaluate the derivative.
MathTransform2D.derivative(Point2D)
public Matrix derivative(CoordinatePoint point)
derivative
in interface MathTransform
derivative
in class AbstractMathTransform
point
- The coordinate point where to evaluate the derivative.
null
).public Matrix getMatrix()
public int getDimSource()
getDimSource
in interface MathTransform
public int getDimTarget()
getDimTarget
in interface MathTransform
public boolean isIdentity()
isIdentity
in interface MathTransform
true
if this MathTransform
is an identity transform;
false
otherwise.public MathTransform inverse() throws NoninvertibleTransformException
inverse
in interface MathTransform
inverse
in class AbstractMathTransform
NoninvertibleTransformException
- if the transform can't be inversed.public int hashCode()
hashCode
in class AbstractMathTransform
public boolean equals(Object object)
equals
in class AbstractMathTransform
public String toString()
toString
in class AbstractMathTransform
static String toString(Matrix matrix)
|
deegree 2.1 (2007/11/08 09:57 build-328-official) | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://deegree.sourceforge.net