Transform class

Transform class

A transform contains information that allow access to object’s translate/scale/rotation or transform matrix at minimum cost This is used by local transform.

Inheritance: TransformA3DObject

The Transform type exposes the following members:

Properties

PropertyDescription
nameGets or sets the name.
propertiesGets the collection of all properties.
geometric_translationGets or sets the geometric translation.
Geometric transformation only affects the entities attached and leave the child nodes unaffected.
It will be merged as local transformation when you export the geometric transformation to file types that does not support it.
geometric_scalingGets or sets the geometric scaling.
Geometric transformation only affects the entities attached and leave the child nodes unaffected.
It will be merged as local transformation when you export the geometric transformation to file types that does not support it.
geometric_rotationGets or sets the geometric Euler rotation(measured in degree).
Geometric transformation only affects the entities attached and leave the child nodes unaffected.
It will be merged as local transformation when you export the geometric transformation to file types that does not support it.
translationGets or sets the translation
scaleGets or sets the scale
scalingGets or sets the scaling
scaling_offsetGets or sets the scaling offset
scaling_pivotGets or sets the scaling pivot
pre_rotationGets or sets the pre-rotation represented in degree
rotation_offsetGets or sets the rotation offset
rotation_pivotGets or sets the rotation pivot
post_rotationGets or sets the post-rotation represented in degree
euler_anglesGets or sets the rotation represented in Euler angles, measured in degree
rotationGets or sets the rotation represented in quaternion.
transform_matrixGets or sets the transform matrix.

Methods

MethodDescription
remove_propertyRemoves a dynamic property.
remove_propertyRemove the specified property identified by name
get_propertyGet the value of specified property
set_propertySets the value of specified property
find_propertyFinds the property.
It can be a dynamic property (Created by CreateDynamicProperty/SetProperty)
or native property(Identified by its name)
set_geometric_translationSets the geometric translation.
Geometric transformation only affects the entities attached and leave the child nodes unaffected.
It will be merged as local transformation when you export the geometric transformation to file types that does not support it.
set_geometric_scalingSets the geometric scaling.
Geometric transformation only affects the entities attached and leave the child nodes unaffected.
It will be merged as local transformation when you export the geometric transformation to file types that does not support it.
set_geometric_rotationSets the geometric Euler rotation(measured in degree).
Geometric transformation only affects the entities attached and leave the child nodes unaffected.
It will be merged as local transformation when you export the geometric transformation to file types that does not support it.
set_translationSets the translation of current transform.
set_scaleSets the scale of current transform.
set_euler_anglesSets the Euler angles in degrees of current transform.
set_rotationSets the rotation(as quaternion components) of current transform.
set_pre_rotationSets the pre-rotation represented in degree
set_post_rotationSets the post-rotation represented in degree

Example

The following code shows how to change the transform of the node:

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)

See Also