disguise developers

Python API

Execute Python code in Designer sessions to control and query projects programmatically.

Quaternion

Properties

q0 : float

q1 : float

q2 : float

q3 : float

Constructors

__init__(self, _w: float, _x: float, _y: float, _z: float)

__init__(self, n: VecD, theta: float)

Methods

inverse(self) -> Quaternion

toAxisAndTheta(self, v: VecD | Vec2 | Vec, theta: float)

toEuler(self) -> VecD

Static Methods

fromEuler(euler: VecD | Vec2 | Vec) -> Quaternion

Special Methods

__div__(self, rhs: Quaternion) -> Quaternion

Divides this rotation by another, giving the rotation that takes rhs to this one.

Parameters:

Returns This quaternion multiplied by the inverse of rhs.

__mul__(self, rhs: Quaternion) -> Quaternion

__truediv__(self, rhs: Quaternion) -> Quaternion

Divides this rotation by another, giving the rotation that takes rhs to this one.

Parameters:

Returns This quaternion multiplied by the inverse of rhs.