com.kuka.roboticsAPI.geometricModel.math
Class AxisAngleRotation

java.lang.Object
  extended by com.kuka.roboticsAPI.geometricModel.math.AbstractRotation
      extended by com.kuka.roboticsAPI.geometricModel.math.AxisAngleRotation
All Implemented Interfaces:
IRotation

public final class AxisAngleRotation
extends AbstractRotation

Immutable representation of a spatial rotation in axis-angle form.

According to Euler's rotation theorem every rotation of a body in three-dimensional space around a fixed point can be represented as a rotation around a fixed axis through that point.

The Robotics API always assumes the axis of the rotation to be given in [mm].


Method Summary
 boolean equals(Object obj)
           
 double getAngle()
          Returns the angle of this rotation around its axis.
 Vector getAxis()
          Returns the axis of this rotation.
 Matrix getMatrix()
          Returns a matrix representing this rotation.
 int hashCode()
           
static AxisAngleRotation of(IRotation orig)
          Returns a new immutable instance of this class from the value of the given rotation.
static AxisAngleRotation of(Vector axis, double angle)
          Returns a new immutable instance of this class that represents a spatial rotation around the given axis through the given angle.
 String toString()
          Returns a textual description of the rotation.
 AxisAngleRotation withAngle(double angle)
          Returns a new instance (copy) of the rotation, with the angle replaced by the new value.
 AxisAngleRotation withAxis(Vector axis)
          Returns a new instance (copy) of the rotation, with the rotation axis replaced by the new value.
 
Methods inherited from class com.kuka.roboticsAPI.geometricModel.math.AbstractRotation
applyTo, applyTo, compose, invert, rotationalDistanceTo, rotationTo
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

of

public static AxisAngleRotation of(Vector axis,
                                   double angle)
Returns a new immutable instance of this class that represents a spatial rotation around the given axis through the given angle.

Parameters:
axis - The axis of the rotation. Doesn't need to be normalized.
angle - the angle of the rotation around the axis in [rad]
Returns:
a new class instance

of

public static AxisAngleRotation of(IRotation orig)
Returns a new immutable instance of this class from the value of the given rotation. The new rotation will represent the same spatial rotation as the original one.

Parameters:
orig - the original rotation
Returns:
a new axis-angle rotation. The angle of the rotation is a positive value in the range 0 through pi.

getAxis

public Vector getAxis()
Returns the axis of this rotation.

Returns:
the normalized axis of this rotation.

getAngle

public double getAngle()
Returns the angle of this rotation around its axis.

Returns:
The angle of the rotation. Not necessarily bounded.

getMatrix

public Matrix getMatrix()
Description copied from interface: IRotation
Returns a matrix representing this rotation. This is potentially a costly conversion.

Specified by:
getMatrix in interface IRotation
Specified by:
getMatrix in class AbstractRotation
Returns:
a Matrix representing this rotation. This is potentially a costly conversion

withAxis

public AxisAngleRotation withAxis(Vector axis)
Returns a new instance (copy) of the rotation, with the rotation axis replaced by the new value.

Parameters:
axis - the new axis the rotation
Returns:
a new instance of the class

withAngle

public AxisAngleRotation withAngle(double angle)
Returns a new instance (copy) of the rotation, with the angle replaced by the new value.

Parameters:
angle - the angle of the rotation around the axis in [rad]
Returns:
a new instance of the class

toString

public String toString()
Description copied from class: AbstractRotation
Returns a textual description of the rotation. The representation is subject to change.

This implementation will return a description in Euler Z-Y-X angles in [rad] with KUKA notation (A, B, C). The following string can be regarded as typical:

"[A=1.23 B=3.14 C=-0.13]"

Overrides:
toString in class AbstractRotation
Returns:
a brief description of the rotation

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object


Copyright © 2019. All rights reserved.