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

NameTypeAccessDescription
identityQuaternionReadGets the identity.

Methods

SignatureDescription
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) → QuaternionCalls fromEulerAngle(pitch, yaw, roll) on this Quaternion instance.
fromAngleAxis(angle: double, axis: Vector3) → QuaternionCreates a quaternion from a rotation angle and axis vector
getIdentity() → QuaternionReturns the identity.
normalize() → QuaternionReturns a unit‑length quaternion equivalent to the original
conjugate() → QuaternionReturns the conjugate of the quaternion (negates vector part)
multiply(a: Quaternion, b: Quaternion) → QuaternionReturns the product of two quaternions a and b
multiply(q: Quaternion) → QuaternionCalls multiply(q) on this Quaternion instance.

See Also

 English