com.kuka.math.geometry
Interface IRotation

All Known Implementing Classes:
AbstractRotation, AxisAngleRotation, EulerZyxRotation, MatrixRotation, Rotation

public interface IRotation

Abstract representation of a rotation in 3-dimensional space.

A rotation of some rigid body in space has three degrees of freedom. Coordinate systems can be regarded as rigid bodies.

See Also:
Rotation, MatrixRotation, EulerZyxRotation, AxisAngleRotation

Method Summary
 Point3D applyTo(Point3D point)
          Applies this rotation to the given point, i.e. rotates the point around the origin of its coordinate system.
 Vector3D applyTo(Vector3D vector)
          Applies this rotation to the given vector.
 IRotation compose(IRotation other)
          If the rotations A and B are represented as matrices, then the effect of A.compose(B) is corresponding to the matrix multiplication A*B.
 Matrix getMatrix()
          Returns a matrix representing this rotation.
 IRotation invert()
          Returns an inverted rotation, i.e. a rotation that reverses the effect of this one.
 double rotationalDistanceTo(IRotation other)
          Calculates the rotational distance from this rotation to the other rotation.
 IRotation rotationTo(IRotation other)
          Calculates the rotation needed to turn this rotation into the other rotation.
 

Method Detail

applyTo

Vector3D applyTo(Vector3D vector)
Applies this rotation to the given vector.

Parameters:
vector - the vector to be rotated
Returns:
a new rotated vector

applyTo

Point3D applyTo(Point3D point)
Applies this rotation to the given point, i.e. rotates the point around the origin of its coordinate system.

Parameters:
point - the point to be rotated around the origin of its coordinate system
Returns:
a new point

compose

IRotation compose(IRotation other)
If the rotations A and B are represented as matrices, then the effect of A.compose(B) is corresponding to the matrix multiplication A*B.

Parameters:
other - the rotation to combine with this one
Returns:
the combined rotation

invert

IRotation invert()
Returns an inverted rotation, i.e. a rotation that reverses the effect of this one.

Returns:
the inverted rotation.

rotationTo

IRotation rotationTo(IRotation other)
Calculates the rotation needed to turn this rotation into the other rotation. The following holds true:

rot1.compose(rot1.rotationTo(rot2)) is equal to rot2

Parameters:
other - another rotation
Returns:
the difference rotation between this and the other rotation.

rotationalDistanceTo

double rotationalDistanceTo(IRotation other)
Calculates the rotational distance from this rotation to the other rotation. The rotational distance is the angle of the corresponding AxisAngleRotation which turns this rotation into the other rotation.

Use this function to compare two rotations.

Parameters:
other - another rotation
Returns:
the positive rotational distance to the other rotation, in the range 0 to pi.

getMatrix

Matrix getMatrix()
Returns a matrix representing this rotation. This is potentially a costly conversion.

Returns:
a Matrix representing this rotation. This is potentially a costly conversion


Copyright © 2019. All rights reserved.