Enum AxisSequence

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<AxisSequence>

    public enum AxisSequence
    extends java.lang.Enum<AxisSequence>
    Enum containing rotation axis sequences for use in defining 3 dimensional rotations.
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      XYX
      Set of Euler angles around the X, Y, and X axes in that order.
      XYZ
      Set of Tait-Bryan angles around the X, Y, and Z axes in that order.
      XZX
      Set of Euler angles around the X, Z, and X axes in that order.
      XZY
      Set of Tait-Bryan angles around the X, Z, and Y axes in that order.
      YXY
      Set of Euler angles around the Y, X, and Y axes in that order.
      YXZ
      Set of Tait-Bryan angles around the Y, X, and Z axes in that order.
      YZX
      Set of Tait-Bryan angles around the Y, Z, and X axes in that order.
      YZY
      Set of Euler angles around the Y, Z, and Y axes in that order.
      ZXY
      Set of Cardan angles.
      ZXZ
      Set of Euler angles around the Z, X, and Z axes in that order.
      ZYX
      Set of Tait-Bryan angles around the Z, Y, and X axes in that order.
      ZYZ
      Set of Euler angles around the Z, Y, and Z axes in that order.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Vector3D getAxis1()
      Get the first rotation axis.
      Vector3D getAxis2()
      Get the second rotation axis.
      Vector3D getAxis3()
      Get the third rotation axis.
      AxisSequenceType getType()
      Get the axis sequence type.
      Vector3D[] toArray()
      Get an array containing the 3 rotation axes in order.
      static AxisSequence valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static AxisSequence[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • XYZ

        public static final AxisSequence XYZ
        Set of Tait-Bryan angles around the X, Y, and Z axes in that order.
      • XZY

        public static final AxisSequence XZY
        Set of Tait-Bryan angles around the X, Z, and Y axes in that order.
      • YXZ

        public static final AxisSequence YXZ
        Set of Tait-Bryan angles around the Y, X, and Z axes in that order.
      • YZX

        public static final AxisSequence YZX
        Set of Tait-Bryan angles around the Y, Z, and X axes in that order.
      • ZXY

        public static final AxisSequence ZXY
        Set of Cardan angles. this ordered set of rotations is around Z, then around X, then around Y
      • ZYX

        public static final AxisSequence ZYX
        Set of Tait-Bryan angles around the Z, Y, and X axes in that order.
      • XYX

        public static final AxisSequence XYX
        Set of Euler angles around the X, Y, and X axes in that order.
      • XZX

        public static final AxisSequence XZX
        Set of Euler angles around the X, Z, and X axes in that order.
      • YXY

        public static final AxisSequence YXY
        Set of Euler angles around the Y, X, and Y axes in that order.
      • YZY

        public static final AxisSequence YZY
        Set of Euler angles around the Y, Z, and Y axes in that order.
      • ZXZ

        public static final AxisSequence ZXZ
        Set of Euler angles around the Z, X, and Z axes in that order.
      • ZYZ

        public static final AxisSequence ZYZ
        Set of Euler angles around the Z, Y, and Z axes in that order.
    • Field Detail

      • axis1

        private final Vector3D axis1
        Axis of the first rotation.
      • axis2

        private final Vector3D axis2
        Axis of the second rotation.
      • axis3

        private final Vector3D axis3
        Axis of the third rotation.
    • Constructor Detail

      • AxisSequence

        private AxisSequence​(AxisSequenceType type,
                             Vector3D axis1,
                             Vector3D axis2,
                             Vector3D axis3)
        Simple constructor.
        Parameters:
        type - the axis sequence type
        axis1 - first rotation axis
        axis2 - second rotation axis
        axis3 - third rotation axis
    • Method Detail

      • values

        public static AxisSequence[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (AxisSequence c : AxisSequence.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static AxisSequence valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • getType

        public AxisSequenceType getType()
        Get the axis sequence type.
        Returns:
        the axis sequence type
      • getAxis1

        public Vector3D getAxis1()
        Get the first rotation axis.
        Returns:
        the first rotation axis
      • getAxis2

        public Vector3D getAxis2()
        Get the second rotation axis.
        Returns:
        the second rotation axis
      • getAxis3

        public Vector3D getAxis3()
        Get the third rotation axis.
        Returns:
        the third rotation axis
      • toArray

        public Vector3D[] toArray()
        Get an array containing the 3 rotation axes in order.
        Returns:
        a 3-element array containing the rotation axes in order