Quaternion
Overview
Quaternion is a class in Aspose.3D FOSS for Java.
Inherits from: Serializable.
Quaternion provides static factory methods to create quaternions from Euler angles or an angle‑axis pair, as well as instance methods for normalization and multiplication.
This class provides 9 methods for working with Quaternion objects in Java programs.
Available methods include: Quaternion, conjugate, fromAngleAxis, fromEulerAngle, getIdentity, multiply, normalize.
All public members are accessible to any Java application after installing the Aspose.3D FOSS for Java package.
Properties: identity.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
identity | Quaternion | Read | Gets the identity. |
Methods
| Signature | Description |
|---|---|
Quaternion() | Initializes quaternion with given x, y, z, w components |
Quaternion(w: double, x: double, y: double, z: double) | Calls Quaternion(w, x, y, z) on this Quaternion instance. |
fromEulerAngle(pitch: double, yaw: double, roll: double) → Quaternion | Calls fromEulerAngle(pitch, yaw, roll) on this Quaternion instance. |
fromAngleAxis(angle: double, axis: Vector3) → Quaternion | Creates a quaternion from a rotation angle and axis vector |
getIdentity() → Quaternion | Returns the identity. |
normalize() → Quaternion | Returns a unit‑length quaternion equivalent to the original |
conjugate() → Quaternion | Returns the conjugate of the quaternion (negates vector part) |
multiply(a: Quaternion, b: Quaternion) → Quaternion | Returns the product of two quaternions a and b |
multiply(q: Quaternion) → Quaternion | Calls multiply(q) on this Quaternion instance. |