Module JNISpice
Package spice.basic

Class AxisAndAngle


  • public class AxisAndAngle
    extends java.lang.Object
    Class AxisAndAngle provides containers for rotation axis and angle combinations.

    Version 1.0.0 08-DEC-2009 (NJB)

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private double angle  
      private Vector3 axis  
    • Constructor Summary

      Constructors 
      Constructor Description
      AxisAndAngle​(AxisAndAngle a)
      Copy constructor.This constructor creates a deep copy.
      AxisAndAngle​(Matrix33 r)
      Create a rotation axis and angle from a rotation matrix.
      AxisAndAngle​(Vector3 v, double angle)
      Create a rotation axis and angle from a vector and scalar.
    • Method Summary

      Modifier and Type Method Description
      double getAngle()
      Get the rotation angle from this instance.
      Vector3 getAxis()
      Get the rotation axis from this instance.
      Matrix33 toMatrix()
      Create a rotation matrix from this instance.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • angle

        private double angle
    • Constructor Detail

      • AxisAndAngle

        public AxisAndAngle​(AxisAndAngle a)
        Copy constructor.This constructor creates a deep copy.
        Parameters:
        a - AxisAndAngle
      • AxisAndAngle

        public AxisAndAngle​(Vector3 v,
                            double angle)
                     throws SpiceException
        Create a rotation axis and angle from a vector and scalar.

        The axis must be non-zero.

        Parameters:
        v - Vector3
        angle - double
        Throws:
        SpiceException - exception
      • AxisAndAngle

        public AxisAndAngle​(Matrix33 r)
                     throws SpiceException
        Create a rotation axis and angle from a rotation matrix.
        Parameters:
        r - Matrix33
        Throws:
        SpiceException - exception
    • Method Detail

      • getAxis

        public Vector3 getAxis()
        Get the rotation axis from this instance.
        Returns:
        Vector3
      • getAngle

        public double getAngle()
        Get the rotation angle from this instance.
        Returns:
        angle