tqec.sketchup.collada.Transformation

class Transformation(translation: ndarray[Any, dtype[float64]], scale: ndarray[Any, dtype[float64]], rotation: ndarray[Any, dtype[float64]], affine_matrix: ndarray[Any, dtype[float64]])[source]

Transformation data class to store the translation, scale, rotation, and the composed affine matrix.

For the reference of the transformation matrix, see https://en.wikipedia.org/wiki/Transformation_matrix.

translation

The length-3 translation vector.

Type:

numpy.ndarray[Any, numpy.dtype[numpy.float64]]

scale

The length-3 scaling vector, which is the scaling factor along each axis.

Type:

numpy.ndarray[Any, numpy.dtype[numpy.float64]]

rotation

The 3x3 rotation matrix.

Type:

numpy.ndarray[Any, numpy.dtype[numpy.float64]]

affine_matrix

The 4x4 affine matrix composed of the translation, scaling, and rotation.

Type:

numpy.ndarray[Any, numpy.dtype[numpy.float64]]

__init__(translation: ndarray[Any, dtype[float64]], scale: ndarray[Any, dtype[float64]], rotation: ndarray[Any, dtype[float64]], affine_matrix: ndarray[Any, dtype[float64]]) None

Methods

__init__(translation, scale, rotation, ...)

from_4d_affine_matrix(mat)

Attributes

translation

scale

rotation

affine_matrix