Class Quaternion

java.lang.Object
org.jlab.rec.rich.Quaternion

public class Quaternion extends Object
  • Field Details

    • x

      public double x
    • y

      public double y
    • z

      public double z
    • w

      public double w
  • Constructor Details

    • Quaternion

      public Quaternion()
    • Quaternion

      public Quaternion(double angle, Vector3D rotationAxis)
    • Quaternion

      public Quaternion(double w, double x, double y, double z)
  • Method Details

    • set

      public void set(double angle, Vector3D rotationAxis)
      Set the rotation Quaternion
      Parameters:
      angle - the angle of rotation
      rotationAxis - the rotation axis (normal two the vector plane)
    • set

      public void set(double w, double x, double y, double z)
    • set

      public void set(Quaternion q)
      Set the Quaternion using another one
      Parameters:
      q -
    • getSize

      public double getSize()
    • normalize

      public void normalize()
    • multiply

      public Quaternion multiply(Quaternion qb)
      Multiplication between two Quaternions
      Parameters:
      qb - the one that multiply
      result - of the multiplication
    • conjugate

      public void conjugate()
    • rotate

      public Vector3D rotate(Vector3D vector)
    • toRotation

      public Matrix toRotation(Quaternion q1)
    • GetX

      public double GetX()
    • GetY

      public double GetY()
    • GetZ

      public double GetZ()
    • GetW

      public double GetW()
    • show

      public void show()