Class OrientationAxisAngle

Object
Orientation
OrientationAxisAngle
All Implemented Interfaces:
Serializable

public final class OrientationAxisAngle extends Orientation
An orientation in axis-angle representation.
Author:
Owen Feehan
See Also:
  • Constructor Details

    • OrientationAxisAngle

      public OrientationAxisAngle(Vector3d axis, double angle)
      Creates a new OrientationAxisAngle instance.
      Parameters:
      axis - Axis part of axis-angle orientation (should be normalized). Once this is passed here, it is consumed, and must not be changed elsewhere.
      angle - Angle part of axis-angle orientation (anti-clock in radians).
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • deriveRotationMatrix

      protected RotationMatrix deriveRotationMatrix()
      Description copied from class: Orientation
      Derives a RotationMatrix that can be applied to rotate an entity anti-clockwise to the current orientation.

      It presumes the existing entity has a neutral orientation along the x-axis.

      Specified by:
      deriveRotationMatrix in class Orientation
      Returns:
      the rotation-matrix.
    • negative

      public Orientation negative()
      Description copied from class: Orientation
      Derives a new Orientation in the opposite (negative) direction to the current instance.

      A unit step from the origin in the current orientation direction, summed with a unit step in the negative direction, should end in the origin.

      Specified by:
      negative in class Orientation
      Returns:
      the new Orientation in the negative direction.
    • numberDimensions

      public int numberDimensions()
      Description copied from class: Orientation
      The dimensionality of space the orientation is valid for.
      Specified by:
      numberDimensions in class Orientation
      Returns:
      2 or 3.
    • getAxis

      public Vector3d getAxis()
      Axis part of axis-angle orientation (should be normalized). Once this is passed here, it is consumed, and must not be changed elsewhere.
    • getAngle

      public double getAngle()
      Angle part of axis-angle orientation (anti-clock in radians).
    • equals

      public boolean equals(Object o)
      Specified by:
      equals in class Orientation
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in class Orientation