Skip to Content

Converter

Quick Facts

PropertyValue
ClassConverter
Modulecenpymath.Converter
Packagecenpymath
ReleaseR2025.2.4
Methods9

Quick Start

# Boilerplate Example converter = ... # obtained from the runtime context result = converter.GetMatrixFromEuler(0, 0, 0, 0, 0, 0)

Method Index

MethodReturnsSummary
GetMatrixFromEulerMatrixGenerates a cenpymath>Matrix from the given Euler angles and position
ConvertEulerlistConverts Euler angle from notationFrom to notationTo
ConvertEulerToMatrixMatrixConverts the given Euler angles into a rotation matrix.
ConvertMatrixToEulertupleConverts the given matrix into Euler angles of the given notation
_getEulerOrderNotationint
_getEulerOrderNotationHelperint
_getEulerOrderlist
_getMatrixArrayFromEulerlist
_getEulerFromMatrixtuple

Query Methods

GetMatrixFromEuler

def GetMatrixFromEuler(rotZ: float, rotY: float, rotX: float, x: float, y: float, z: float) -> Matrix

Generates a cenpymath>Matrix from the given Euler angles and position

Parameters:

NameTypeDescription
rotZfloatrotation around Z-axis
rotYfloatrotation around Y-axis
rotXfloatrotation around X-axis
xfloatrotation around X-axis
yfloatrotation around Y-axis
zfloatrotation around Z-axis

Returns: Matrix — returns resulting matrix

Execution & Actions

ConvertEuler

def ConvertEuler(rotX: float, rotY: float, rotZ: float, notationTo: Notations, notationFrom: Notations) -> list

Converts Euler angle from notationFrom to notationTo

Parameters:

NameTypeDescription
rotXfloatrotation around X-axis
rotYfloatrotation around Y-axis
rotZfloatrotation around Z-axis
notationToNotationstarget notation
notationFromNotationssource 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) -> Matrix

Converts the given Euler angles into a rotation matrix.

Parameters:

NameTypeDescription
rotXfloatrotation around X-axis
rotYfloatrotation around Y-axis
rotZfloatrotation around Z-axis
notationFromNotationssource notation

Returns: Matrix — returns resulting rotation matrix

ConvertMatrixToEuler

def ConvertMatrixToEuler(matrix: Matrix, notationTo: Notations) -> tuple

Converts the given matrix into Euler angles of the given notation

Parameters:

NameTypeDescription
matrixMatrixmatrix to convert
notationToNotations

Returns: tuple — returns resulting Euler angles in order rotX, rotY, rotZ

Utilities

_getEulerOrderNotation

def _getEulerOrderNotation(notation: Notations) -> int

Parameters:

NameTypeDescription
notationNotations

Returns: int

_getEulerOrderNotationHelper

def _getEulerOrderNotationHelper(i: int, p: int, r: int, f: int) -> int

Parameters:

NameTypeDescription
iint
pint
rint
fint

Returns: int

_getEulerOrder

def _getEulerOrder(order: int) -> list

Parameters:

NameTypeDescription
orderint

Returns: list

_getMatrixArrayFromEuler

def _getMatrixArrayFromEuler(ea: tuple, order: int) -> list

Parameters:

NameTypeDescription
eatuple
orderint

Returns: list

_getEulerFromMatrix

def _getEulerFromMatrix(matrix: list, order: int) -> tuple

Parameters:

NameTypeDescription
matrixlist
orderint

Returns: tuple

Version Notes

This class is documented as of release R2025.2.4.

Was this page helpful?