|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.kuka.roboticsAPI.geometricModel.math.AbstractRotation
com.kuka.roboticsAPI.geometricModel.math.MatrixRotation
public final class MatrixRotation
Immutable representation of a spatial rotation in matrix form.
| Field Summary | |
|---|---|
static MatrixRotation |
NONE
Immutable MatrixRotation instance representing no rotation. |
| Method Summary | |
|---|---|
MatrixRotation |
compose(MatrixRotation 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,3]) Array "Frame33" - represented as 9 element vector. |
Matrix |
getMatrix()
Returns the underlying matrix that represents this rotation. |
Vector |
getUnitVectorX()
Returns the x unit vector after it has been rotated by this rotation. |
Vector |
getUnitVectorY()
Returns the y unit vector after it has been rotated by this rotation. |
Vector |
getUnitVectorZ()
Returns the z unit vector after it has been rotated by this rotation. |
int |
hashCode()
|
MatrixRotation |
invert()
Returns an inverted rotation, i.e. a rotation that reverses the effect of this one. |
static MatrixRotation |
of(IRotation orig)
Returns an immutable instance from the values of the provided rotation. |
static MatrixRotation |
of(Matrix matrix)
Checked creation of a MatrixRotation from a given rotation
matrix. |
static MatrixRotation |
ofUnchecked(Matrix matrix)
Unchecked creation of a MatrixRotation from a given rotation
matrix. |
double[] |
toRowFirstArray()
Serialization Support Serialize the MatrixRotation to a linear 9 Vector to support "rowFirstArray" (double[3][3]) Frame33 Represenations. |
String |
toString()
Returns a textual description of the rotation. |
| Methods inherited from class com.kuka.roboticsAPI.geometricModel.math.AbstractRotation |
|---|
applyTo, applyTo, compose, rotationalDistanceTo, rotationTo |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final MatrixRotation NONE
MatrixRotation instance representing no rotation.
| Method Detail |
|---|
public static MatrixRotation ofUnchecked(Matrix matrix)
MatrixRotation from a given rotation
matrix. The matrix must be a rotation matrix, i.e. it must fulfill the
following conditions:
equal(matrix.determinant(), 1, epsilon);
equal(matrix.transpose(), matrix.invert(), epsilon);
where equal(a, b, epsilon) is an element-wise test of approximate
equality (small epsilon test).
Caution: Don't use this method unless you are absolutely sure that
the matrix is a valid rotation matrix! If in doubt, use
of(Matrix).
matrix - a rotation matrix. Will be checked if (and only if) assertions
are enabled in the VM.
public static MatrixRotation of(Matrix matrix)
MatrixRotation from a given rotation
matrix. The matrix must be a rotation matrix, i.e. it must fulfill the
following conditions:
equal(matrix.determinant(), 1, epsilon);
equal(matrix.transpose(), matrix.invert(), epsilon);
where equal(a, b, epsilon) is an element-wise test of approximate
equality (small epsilon test).
The above conditions will be checked upon creation of the rotation.
matrix - a rotation matrix. Will be checked.
IllegalArgumentException - if the matrix is null or not a rotation matrixpublic static MatrixRotation of(IRotation orig)
orig - the instance from which to take over the rotation
public Matrix getMatrix()
getMatrix in interface IRotationgetMatrix in class AbstractRotationpublic MatrixRotation compose(MatrixRotation other)
other - the rotation to combine with this one
public MatrixRotation invert()
IRotation
invert in interface IRotationinvert in class AbstractRotationpublic Vector getUnitVectorX()
getUnitVectorY(),
getUnitVectorZ()public Vector getUnitVectorY()
getUnitVectorX(),
getUnitVectorZ()public Vector getUnitVectorZ()
getUnitVectorX(),
getUnitVectorY()public double[] toRowFirstArray()
public void fillRowFirstArray(double[] elements)
elements - - a double vector with exactly 9 Elements It will be filled
with the elements of the rotation in the following sequence:
[rot00, rot01, rot02, rot10, rot11, rot12, rot20,rot21,rot22]public int hashCode()
hashCode in class Objectpublic boolean equals(Object obj)
equals in class Objectpublic String toString()
This implementation will return the rotation matrix in row-first order. The following string can be regarded as typical:
"[[0.00 0.00 -1.00]; [0.00 -1.00 0.00]; [-1.00 0.00 0.00]]"
toString in class AbstractRotation
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||