Converter
Quick Facts
| Property | Value |
|---|---|
| Class | Converter |
| Module | cenpymath.Converter |
| Package | cenpymath |
| Release | R2025.2.4 |
| Methods | 9 |
Quick Start
# Boilerplate Example
converter = ... # obtained from the runtime context
result = converter.GetMatrixFromEuler(0, 0, 0, 0, 0, 0)Method Index
| Method | Returns | Summary |
|---|---|---|
GetMatrixFromEuler | Matrix | Generates a cenpymath>Matrix from the given Euler angles and position |
ConvertEuler | list | Converts Euler angle from notationFrom to notationTo |
ConvertEulerToMatrix | Matrix | Converts the given Euler angles into a rotation matrix. |
ConvertMatrixToEuler | tuple | Converts the given matrix into Euler angles of the given notation |
_getEulerOrderNotation | int | — |
_getEulerOrderNotationHelper | int | — |
_getEulerOrder | list | — |
_getMatrixArrayFromEuler | list | — |
_getEulerFromMatrix | tuple | — |
Query Methods
GetMatrixFromEuler
def GetMatrixFromEuler(rotZ: float, rotY: float, rotX: float, x: float, y: float, z: float) -> MatrixGenerates a cenpymath>Matrix from the given Euler angles and position
Parameters:
| Name | Type | Description |
|---|---|---|
rotZ | float | rotation around Z-axis |
rotY | float | rotation around Y-axis |
rotX | float | rotation around X-axis |
x | float | rotation around X-axis |
y | float | rotation around Y-axis |
z | float | rotation around Z-axis |
Returns: Matrix — returns resulting matrix
Execution & Actions
ConvertEuler
def ConvertEuler(rotX: float, rotY: float, rotZ: float, notationTo: Notations, notationFrom: Notations) -> listConverts Euler angle from notationFrom to notationTo
Parameters:
| Name | Type | Description |
|---|---|---|
rotX | float | rotation around X-axis |
rotY | float | rotation around Y-axis |
rotZ | float | rotation around Z-axis |
notationTo | Notations | target notation |
notationFrom | Notations | source notation |
Returns: list — returns a tuple with the converted angles in order rotX, rotY, rotZ
ConvertEulerToMatrix
def ConvertEulerToMatrix(rotX: float, rotY: float, rotZ: float, notationFrom: Notations) -> MatrixConverts the given Euler angles into a rotation matrix.
Parameters:
| Name | Type | Description |
|---|---|---|
rotX | float | rotation around X-axis |
rotY | float | rotation around Y-axis |
rotZ | float | rotation around Z-axis |
notationFrom | Notations | source notation |
Returns: Matrix — returns resulting rotation matrix
ConvertMatrixToEuler
def ConvertMatrixToEuler(matrix: Matrix, notationTo: Notations) -> tupleConverts the given matrix into Euler angles of the given notation
Parameters:
| Name | Type | Description |
|---|---|---|
matrix | Matrix | matrix to convert |
notationTo | Notations | — |
Returns: tuple — returns resulting Euler angles in order rotX, rotY, rotZ
Utilities
_getEulerOrderNotation
def _getEulerOrderNotation(notation: Notations) -> intParameters:
| Name | Type | Description |
|---|---|---|
notation | Notations | — |
Returns: int
_getEulerOrderNotationHelper
def _getEulerOrderNotationHelper(i: int, p: int, r: int, f: int) -> intParameters:
| Name | Type | Description |
|---|---|---|
i | int | — |
p | int | — |
r | int | — |
f | int | — |
Returns: int
_getEulerOrder
def _getEulerOrder(order: int) -> listParameters:
| Name | Type | Description |
|---|---|---|
order | int | — |
Returns: list
_getMatrixArrayFromEuler
def _getMatrixArrayFromEuler(ea: tuple, order: int) -> listParameters:
| Name | Type | Description |
|---|---|---|
ea | tuple | — |
order | int | — |
Returns: list
_getEulerFromMatrix
def _getEulerFromMatrix(matrix: list, order: int) -> tupleParameters:
| Name | Type | Description |
|---|---|---|
matrix | list | — |
order | int | — |
Returns: tuple
Related Types
Version Notes
This class is documented as of release R2025.2.4.
Was this page helpful?