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: Transform
→
A3DObject
The Transform type exposes the following members:
Properties
Property | Description |
---|---|
name | Gets or sets the name. |
properties | Gets the collection of all properties. |
geometric_translation | Gets 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_scaling | Gets 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_rotation | Gets 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. |
translation | Gets or sets the translation |
scale | Gets or sets the scale |
scaling | Gets or sets the scaling |
scaling_offset | Gets or sets the scaling offset |
scaling_pivot | Gets or sets the scaling pivot |
pre_rotation | Gets or sets the pre-rotation represented in degree |
rotation_offset | Gets or sets the rotation offset |
rotation_pivot | Gets or sets the rotation pivot |
post_rotation | Gets or sets the post-rotation represented in degree |
euler_angles | Gets or sets the rotation represented in Euler angles, measured in degree |
rotation | Gets or sets the rotation represented in quaternion. |
transform_matrix | Gets or sets the transform matrix. |
Methods
Method | Description |
---|---|
remove_property | Removes a dynamic property. |
remove_property | Remove the specified property identified by name |
get_property | Get the value of specified property |
set_property | Sets the value of specified property |
find_property | Finds the property. It can be a dynamic property (Created by CreateDynamicProperty/SetProperty) or native property(Identified by its name) |
set_geometric_translation | 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. |
set_geometric_scaling | 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. |
set_geometric_rotation | 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. |
set_translation | Sets the translation of current transform. |
set_scale | Sets the scale of current transform. |
set_euler_angles | Sets the Euler angles in degrees of current transform. |
set_rotation | Sets the rotation(as quaternion components) of current transform. |
set_pre_rotation | Sets the pre-rotation represented in degree |
set_post_rotation | Sets 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
- module
aspose.threed
- class
A3DObject
- class
Transform