c4d.Quaternion

New in version R17.048.

Has methods for conversion to and from a rotation matrix: GetMatrix / SetMatrix / SetMatrixNorm .

Definition

class c4d. Quaternion

Members

Quaternion. w

The rotation angle.

Type: float

Quaternion. v

The direction vector.

Type: Vector

Quaternion. __init__ ( )

Returns a new Quaternion instance.

Quaternion. GetMatrix ( )

Derives a rotation matrix from the quaternion.

Return type: c4d.Matrix
Returns: The rotation matrix.
Quaternion. SetMatrix ( m )

Derives quaternion values from a rotation matrix.

Parameters: m ( c4d.Matrix ) – The rotation matrix to set.
Quaternion. SetMatrixNorm ( m )

Derives quaternion values from a normalized rotation matrix.

Parameters: m ( c4d.Matrix ) – The normalized rotation matrix to set.
Quaternion. SetHPB ( hpb )

Derives quaternion values from a HPB rotation.

Parameters: hpb ( c4d.Vector ) – The HPB rotation.
Quaternion. SetAxis ( ax , ww )

Sets the quaternion values directly.

Parameters:
  • ax ( c4d.Vector ) – The direction vector.
  • ww ( float ) – The rotation angle.

Table Of Contents