GlobalTransform class

GlobalTransform class

Global transform is similar to Transform but it’s immutable while it represents the final evaluated transformation. Right-hand coordinate system is used while evaluating global transform

The GlobalTransform type exposes the following members:

Properties

PropertyDescription
translationGets the translation
scaleGets the scale
euler_anglesGets the rotation represented in Euler angles, measured in degree
rotationGets the rotation represented in quaternion.
transform_matrixGets the transform matrix.

Example

The following code shows how to read node’s global transform

from aspose.threed import Scene
from aspose.threed.entities import Box
from aspose.threed.utilities import Vector3

scene = Scene()
boxNode = scene.root_node.create_child_node(Box())
# place the box at (10, 0, 0)
boxNode.transform.translation = Vector3(10, 0, 0)
global = boxNode.global_transform
print(f"The box's position in world coordinate is {global.translation}")

See Also