Quaternion

Overview

Quaternion is a enum in Aspose.3d for Python.

Quaternion provides getter and setter methods for its components w, x, y, and z, allowing direct manipulation of quaternion values.

Values

ValueDescription
IDENTITYRepresents the identity quaternion constant

Properties

NameTypeAccessDescription
wfloatRead, x(), y(), and z()` act as both getters and setters for the quaternion components
xfloatReadIs the first vector component of the quaternion
yfloatReadIs the second vector component of the quaternion
zfloatReadIs the third vector component of the quaternion
lengthfloatReadReturns the magnitude of the quaternion

Methods

SignatureDescription
__init__(w, x, y, z)
get_IDENTITY()'Quaternion'Returns the identity quaternion (w=1, x=0, y=0, z=0)
normalize()'Quaternion'Returns a new Quaternion representing the normalized (unit length) version of the original quaternion
conjugate()'Quaternion'Returns the conjugate of this quaternion
inverse()'Quaternion'Returns the inverse quaternion
dot(q: 'Quaternion')floatComputes the dot product with another quaternion
concat(rhs: 'Quaternion')'Quaternion'Returns the concatenation (multiplication) with rhs quaternion
euler_angles()'Vector3'Returns the Euler angles as a Vector3
to_matrix(translation)'Matrix4'Returns a Matrix4 representing rotation and given translation
to_angle_axis(angle, axis)Converts the quaternion to angle and axis values
from_euler_angle(pitch, yaw, roll)'Quaternion'Creates a quaternion from pitch, yaw and roll angles
from_angle_axis(a: float, axis)'Quaternion'Creates a quaternion from an angle and rotation axis
from_rotation(orig, dest)'Quaternion'Creates a quaternion rotating from orig vector to dest vector
interpolate(t: float, from_q: 'Quaternion', to_q: 'Quaternion')'Quaternion'Linearly interpolates between from_q and to_q by factor t
slerp(t: float, v1: 'Quaternion', v2: 'Quaternion')'Quaternion'Performs spherical linear interpolation between v1 and v2 by t
get_keyframe_sequence(anim, create)Retrieves or creates a keyframe sequence for an animation
get_bind_point(anim, create)Retrieves or creates a bind point for an animation