|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.kuka.roboticsAPI.geometricModel.math.AbstractTransformation
com.kuka.roboticsAPI.geometricModel.math.MatrixTransformation
public final class MatrixTransformation
Immutable implementation of a spatial transformation in matrix form, that is the rotation part and the vector part of the homogeneous transformation matrix.
The Robotics API always assumes the translation part to be given in [mm].
| Field Summary | |
|---|---|
static MatrixTransformation |
IDENTITY
Immutable MatrixTransformation instance representing identity
(i.e. unchanging) transformation. |
| Method Summary | |
|---|---|
MatrixTransformation |
compose(MatrixTransformation other)
The effect of A.compose(B) is that of the matrix multiplication A*B. |
boolean |
equals(Object obj)
|
void |
fillRowFirstArray(double[] elements)
Fills a "RowFirst" representation (double[3,4]) Array "Frame34" - represented as 12 element vector. |
MatrixRotation |
getRotation()
Returns the rotation corresponding to this transformation. |
Matrix |
getRotationMatrix()
Returns the rotational part of the transformation as a 3x3 matrix. |
Vector |
getTranslation()
Returns the translation part of the transformation, i.e. the upper-right 3x1 part of the corresponding homogeneous transformation matrix. |
double |
getX()
Returns the x element of the translation part of the
transformation. |
double |
getY()
Returns the y element of the translation part of the
transformation. |
double |
getZ()
Returns the z element of the translation part of the
transformation. |
int |
hashCode()
|
MatrixTransformation |
invert()
Returns an inverted transformation, i.e. a transformation that reverses the effect of this one. |
static MatrixTransformation |
of(ITransformation orig)
Returns an immutable MatrixTransformation instance with the same
value as the given transformation. |
static MatrixTransformation |
of(Vector translation,
IRotation rot)
Returns an immutable MatrixTransformation instance, consisting of
a rotational and a translational part. |
static MatrixTransformation |
of(Vector translation,
Matrix rotMatrix)
Returns an immutable MatrixTransformation instance, consisting of
a rotational and a translational part. |
static MatrixTransformation |
ofRowFirst(double... elements)
Creates a Matrix Transform based on a "row first" matrix 3x4 -> 12 Elements... |
static MatrixTransformation |
ofTranslation(double x,
double y,
double z)
Returns an immutable MatrixTransformation instance, consisting of
a translational part and no rotation. |
static MatrixTransformation |
ofTranslation(Vector translation)
Returns an immutable MatrixTransformation instance, consisting of
a translational part and no rotation. |
double[] |
toRowFirstArray()
Serialization Support Serialize the MatrixTransform to a linear 12 Vector to support "rowFirstArray" (double[3][4]) Frame34 Represenations. |
String |
toString()
Returns a textual description of the transformation. |
MatrixTransformation |
withRotation(Matrix rotMatrix)
Returns an immutable MatrixTransformation instance, consisting of
a rotational and a translational part. |
MatrixTransformation |
withRotation(MatrixRotation rotation)
Returns an immutable MatrixTransformation instance, consisting of
a rotational and a translational part. |
MatrixTransformation |
withTranslation(Vector translation)
Returns a new instance (copy) of the transformation, with the translational part replaced by the given translation. |
| Methods inherited from class com.kuka.roboticsAPI.geometricModel.math.AbstractTransformation |
|---|
applyTo, applyTo, compose, distanceTo, rotationalDistanceTo, transformationTo, withRotation |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final MatrixTransformation IDENTITY
MatrixTransformation instance representing identity
(i.e. unchanging) transformation.
| Method Detail |
|---|
public static MatrixTransformation of(Vector translation,
Matrix rotMatrix)
MatrixTransformation instance, consisting of
a rotational and a translational part.
translation - the translational part of the transformation (the upper-right
3x1 part of a homogeneous transformation matrix).rotMatrix - the rotational part of the transformation (the upper-left 3x3
part of a homogeneous transformation matrix).
MatrixTransformation instance
public static MatrixTransformation of(Vector translation,
IRotation rot)
MatrixTransformation instance, consisting of
a rotational and a translational part.
translation - the translational part of the transformation (the upper-right
3x1 part of a homogeneous transformation matrix).rot - the rotational part of the transformation (the upper-left 3x3
part of a homogeneous transformation matrix).
MatrixTransformation instancepublic static MatrixTransformation ofTranslation(Vector translation)
MatrixTransformation instance, consisting of
a translational part and no rotation.
translation - the translational part of the transformation (the upper-right
3x1 part of a homogeneous transformation matrix).
MatrixTransformation instance
public static MatrixTransformation ofTranslation(double x,
double y,
double z)
MatrixTransformation instance, consisting of
a translational part and no rotation. The translation is given by the
three cartesian vector elements x, y, z.
x - x element of translationy - y element of translationz - z element of translation
MatrixTransformation instancepublic static MatrixTransformation of(ITransformation orig)
MatrixTransformation instance with the same
value as the given transformation. If the given transformation already is
of a known immutable type then it is returned unchanged.
orig - The transformation whose value should be taken over.
MatrixTransformation instance
IllegalArgumentException - if orig is nullpublic MatrixRotation getRotation()
ITransformation
getRotation in interface ITransformationgetRotation in class AbstractTransformationpublic Vector getTranslation()
ITransformation
getTranslation in interface ITransformationgetTranslation in class AbstractTransformationpublic MatrixTransformation withRotation(Matrix rotMatrix)
MatrixTransformation instance, consisting of
a rotational and a translational part.
rotMatrix - the rotational part of the transformation (the upper-left 3x3
part of a homogeneous transformation matrix).
MatrixTransformation instancepublic MatrixTransformation withRotation(MatrixRotation rotation)
MatrixTransformation instance, consisting of
a rotational and a translational part.
rotation - the rotational part of the transformation (the upper-left 3x3
part of a homogeneous transformation matrix).
MatrixTransformation instancepublic MatrixTransformation withTranslation(Vector translation)
AbstractTransformation
withTranslation in class AbstractTransformationtranslation - the translational part of the transformation (the upper-right
3x1 part of a homogeneous transformation matrix).
public double getX()
x element of the translation part of the
transformation.
x element of the translation part of the
transformationpublic double getY()
y element of the translation part of the
transformation.
y element of the translation part of the
transformationpublic double getZ()
z element of the translation part of the
transformation.
z element of the translation part of the
transformationpublic Matrix getRotationMatrix()
public MatrixTransformation compose(MatrixTransformation other)
other - the transformation to combine with this one
public MatrixTransformation invert()
ITransformation
invert in interface ITransformationinvert in class AbstractTransformationpublic int hashCode()
hashCode in class Objectpublic boolean equals(Object obj)
equals in class Objectpublic static MatrixTransformation ofRowFirst(double... elements)
elements - a double Array (row major) with exactly 12 Elements of the
sequence: [rot00, rot01, rot02, transX, rot10, rot11, rot12,
transY, rot20,rot21,rot22,transZ]
public double[] toRowFirstArray()
public void fillRowFirstArray(double[] elements)
elements - - a double vector with exactly 12 Elements It will be filled
with the elements of the transformation in the following
sequence: [rot00, rot01, rot02, transX, rot10, rot11, rot12,
transY, rot20,rot21,rot22,transZ]public String toString()
This implementation will return the homogeneous transformation matrix in row-first order. The following string can be regarded as typical:
"[[0.00 0.00 -1.00 10.00]; [0.00 -1.00 0.00 20.00]; [-1.00 0.00 0.00 30.00]; [0.00 0.00 0.00 1.00]]"
toString in class AbstractTransformation
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||