AutoOpenRigidMatrix Module
When Euclid is opened this module will be auto-opened. It only contains extension members for type RigidMatrix.
Type extensions
| Type extension |
Description
|
Full Usage:
this.Decompose
Parameters:
unit
Returns: Quaternion * Vec
A tuple of the rotation quaternion and the translation vector.
RigidMatrix.createFromTranslationAndQuaternion recomposes the matrix.
|
Decomposes this RigidMatrix into its rotation and translation. The rotation is applied first and the translation second.
Extended Type:
|
Full Usage:
this.Interpolate
Parameters:
RigidMatrix
-
The matrix at factor 1.
factor : float
-
The finite interpolation factor.
Returns: RigidMatrix
A new interpolated RigidMatrix.
|
Interpolates from this matrix to finish for animations. The translation is interpolated linearly, so the origin moves on a straight line. The rotation is interpolated with Quaternion.slerp along the shortest rotation, at a constant angular speed. Factor 0 returns this matrix and factor 1 returns finish. The factor is not clamped: negative factors and factors above one extrapolate. Fails if the factor is not finite.
Extended Type:
|
Full Usage:
RigidMatrix.createFromTranslationAndQuaternion rotation translation
Parameters:
Quaternion
-
The rotation, applied first.
translation : Vec
-
The translation, applied second.
Returns: RigidMatrix
A new RigidMatrix.
|
Creates a RigidMatrix that first rotates and then translates.
Extended Type:
|
Full Usage:
RigidMatrix.decompose m
Parameters:
RigidMatrix
-
The matrix to decompose.
Returns: Quaternion * Vec
A tuple of the rotation quaternion and the translation vector.
RigidMatrix.createFromTranslationAndQuaternion recomposes the matrix.
|
Decomposes a RigidMatrix into its rotation and translation. The rotation is applied first and the translation second.
Extended Type:
|
Full Usage:
RigidMatrix.interpolate start finish factor
Parameters:
RigidMatrix
-
The matrix at factor 0.
finish : RigidMatrix
-
The matrix at factor 1.
factor : float
-
The finite interpolation factor.
Returns: RigidMatrix
A new interpolated RigidMatrix.
|
Interpolates from start to finish for animations. The translation is interpolated linearly, so the origin moves on a straight line. The rotation is interpolated with Quaternion.slerp along the shortest rotation, at a constant angular speed. Unlike an interpolation of the 12 matrix elements, the result is always a valid RigidMatrix. Factor 0 returns start and factor 1 returns finish. The factor is not clamped: negative factors and factors above one extrapolate. Fails if the factor is not finite.
Extended Type:
|
Euclid