Class Slerp.Spherical

  • All Implemented Interfaces:
    java.util.function.DoubleFunction<Quaternion>
    Enclosing class:
    Slerp

    private final class Slerp.Spherical
    extends java.lang.Object
    implements java.util.function.DoubleFunction<Quaternion>
    Spherical interpolation, used when the quaternions are too closely aligned. When we may end up dividing by zero (cf. 1/sin(theta) term below). Slerp.Linear interpolation must be used.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private double sinTheta
      Sine of theta.
      private double theta
      Angle of rotation.
    • Constructor Summary

      Constructors 
      Constructor Description
      Spherical​(double dot)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Quaternion apply​(double t)
      • Methods inherited from class java.lang.Object

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

      • theta

        private final double theta
        Angle of rotation.
      • sinTheta

        private final double sinTheta
        Sine of theta.
    • Constructor Detail

      • Spherical

        Spherical​(double dot)
        Parameters:
        dot - Dot product of the start and end quaternions.
    • Method Detail

      • apply

        public Quaternion apply​(double t)
        Specified by:
        apply in interface java.util.function.DoubleFunction<Quaternion>