Overview | Package | Class | Use | Tree | Index | Help
| NASA World Wind
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## gov.nasa.worldwind.geom
Class Quaternion

    java.lang.Object
      gov.nasa.worldwind.geom.Quaternion

    public class Quaternion

extends Object

Constructor Summary
`Quaternion(double x, double y, double z, double w)`

Method Summary
`static double` | `Abs(Quaternion q)`
`static Quaternion` | `Add(Quaternion a, Quaternion b)`
`static Quaternion` | `AxisAngleToQuaternion(Angle angle, double x, double y, double z)`
`Quaternion` | `Conjugate()`
`static Quaternion` | `Divide(Quaternion q, double s)`
`static Quaternion` | `Divide(Quaternion a, Quaternion b)`
`static double` | `Dot(Quaternion a, Quaternion b)`
`boolean` | `equals(Object o)`
`static Quaternion` | `EulerToQuaternion(double yaw, double pitch, double roll)`
`Quaternion` | `Exp()`
`static Quaternion` | `Exp(Quaternion q)`
`int` | `hashCode()` Generates an integer that is always the same for identical objects, but usually different for different objects.
`double` | `Length()`
`Quaternion` | `Ln()`
`static Quaternion` | `Ln(Quaternion q)`
`static Quaternion` | `Multiply(double s, Quaternion q)`
`static Quaternion` | `Multiply(Point v, Quaternion q)` equivalent to multiplying by the quaternion (0, v)
`static Quaternion` | `Multiply(Quaternion q, double s)`
`static Quaternion` | `Multiply(Quaternion a, Quaternion b)`
`static double` | `Norm2(Quaternion q)`
`Quaternion` | `Normalize()`
`static Point` | `QuaternionToAxisAngle(Quaternion q)`
`static Point` | `QuaternionToEuler(Quaternion q)` Transforms a rotation in quaternion form to a set of Euler angles
`static Quaternion` | `Slerp(Quaternion q0, Quaternion q1, double t)`
`static Quaternion` | `Squad(Quaternion q1, Quaternion a, Quaternion b, Quaternion c, double t)`
`static Quaternion` | `Subtract(Quaternion a, Quaternion b)`
`String` | `toString()`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Constructor Detail

### Quaternion

    public Quaternion(double x,
                      double y,
                      double z,
                      double w)

Method Detail

### Abs

    public static double Abs(Quaternion q)

  Parameters:
    `q` -
  Returns:
  Throws:
    `IllegalArgumentException` - if `q` is null

### Add

    public static Quaternion Add(Quaternion a,
                                 Quaternion b)

  Parameters:
    `a` -
    `b` -
  Returns:
  Throws:
    `IllegalArgumentException` - if `a` or `b` is null

### AxisAngleToQuaternion

    public static Quaternion AxisAngleToQuaternion(Angle angle,
                                                   double x,
                                                   double y,
                                                   double z)

### Conjugate

    public Quaternion Conjugate()

### Divide

    public static Quaternion Divide(Quaternion q,
                                    double s)

  Parameters:
    `q` -
    `s` -
  Returns:
  Throws:
    `IllegalArgumentException` - if `q` is null

### Divide

    public static Quaternion Divide(Quaternion a,
                                    Quaternion b)

  Parameters:
    `a` -
    `b` -
  Returns:
  Throws:
    `IllegalArgumentException` - if `a` or `b` is null

### Dot

    public static double Dot(Quaternion a,
                             Quaternion b)

  Parameters:
    `a` -
    `b` -
  Returns:
  Throws:
    `IllegalArgumentException` - if `a` or `b` is null

### equals

    public boolean equals(Object o)

  Overrides:
    `equals` in class `Object`

### EulerToQuaternion

    public static Quaternion EulerToQuaternion(double yaw,
                                               double pitch,
                                               double roll)

### Exp

    public Quaternion Exp()

### Exp

    public static Quaternion Exp(Quaternion q)

  Parameters:
    `q` -
  Returns:
  Throws:
    `IllegalArgumentException` - if `q` is null

### hashCode

    public int hashCode()

  Generates an integer that is always the same for identical objects, but usually different for different objects. This method overrides the one in `Object`.

  This method makes comparisons on private fields; overriding implementations should include a call to `super.hashCode()`.

  Overrides:
    `hashCode` in class `Object`
  Returns:
    the hashCode for this `Point`.

### Length

    public double Length()

### Ln

    public Quaternion Ln()

### Ln

    public static Quaternion Ln(Quaternion q)

  Parameters:
    `q` -
  Returns:
  Throws:
    `IllegalArgumentException` - if `q` is null

### Multiply

    public static Quaternion Multiply(double s,
                                      Quaternion q)

  Parameters:
    `q` -
  Returns:
  Throws:
    `IllegalArgumentException` - if `q` is null

### Multiply

    public static Quaternion Multiply(Point v,
                                      Quaternion q)

  equivalent to multiplying by the quaternion (0, v)

  Parameters:
    `v` -
    `q` -
  Returns:
  Throws:
    `IllegalArgumentException` - if `q` or `v` is null

### Multiply

    public static Quaternion Multiply(Quaternion q,
                                      double s)

  Parameters:
    `q` -
    `s` -
  Returns:
  Throws:
    `IllegalArgumentException` - if `q` is null

### Multiply

    public static Quaternion Multiply(Quaternion a,
                                      Quaternion b)

  Parameters:
    `a` -
    `b` -
  Returns:
  Throws:
    `IllegalArgumentException` - if `a` or `b` is null

### Norm2

    public static double Norm2(Quaternion q)

  Parameters:
    `q` -
  Returns:
  Throws:
    `IllegalArgumentException` - if `q` is null

### Normalize

    public Quaternion Normalize()

### QuaternionToAxisAngle

    public static Point QuaternionToAxisAngle(Quaternion q)

### QuaternionToEuler

    public static Point QuaternionToEuler(Quaternion q)

  Transforms a rotation in quaternion form to a set of Euler angles

  Parameters:
    `q` -
  Returns:
    The rotation transformed to Euler angles, X=Yaw, Y=Pitch, Z=Roll (radians)
  Throws:
    `IllegalArgumentException` - if `q` is null

### Slerp

    public static Quaternion Slerp(Quaternion q0,
                                   Quaternion q1,
                                   double t)

  Parameters:
    `q0` -
    `q1` -
    `t` -
  Returns:
  Throws:
    `IllegalArgumentException` - if either supplied `Quaternion` is null

### Squad

    public static Quaternion Squad(Quaternion q1,
                                   Quaternion a,
                                   Quaternion b,
                                   Quaternion c,
                                   double t)

  Parameters:
    `q1` -
    `a` -
    `b` -
    `c` -
    `t` -
  Returns:
  Throws:
    `IllegalArgumentException` - if any argument is null

### Subtract

    public static Quaternion Subtract(Quaternion a,
                                      Quaternion b)

  Parameters:
    `a` -
    `b` -
  Returns:
  Throws:
    `IllegalArgumentException` - if `a` or `b` is null

### toString

    public final String toString()

  Overrides:
    `toString` in class `Object`

Overview | Package | Class | Use | Tree | Index | Help
| NASA World Wind
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD