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 |
| 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(self, property) | Removes a dynamic property. |
remove_property(self, property) | Remove the specified property identified by name |
get_property(self, property) | Get the value of specified property |
set_property(self, property, value) | Sets the value of specified property |
find_property(self, property_name) | Finds the property. |
It can be a dynamic property (Created by CreateDynamicProperty/SetProperty) | |
or native property(Identified by its name) | |
set_geometric_translation(self, x, y, z) | 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(self, sx, sy, sz) | 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(self, rx, ry, rz) | 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(self, tx, ty, tz) | Sets the translation of current transform. |
set_scale(self, sx, sy, sz) | Sets the scale of current transform. |
set_euler_angles(self, rx, ry, rz) | Sets the Euler angles in degrees of current transform. |
set_rotation(self, rw, rx, ry, rz) | Sets the rotation(as quaternion components) of current transform. |
set_pre_rotation(self, rx, ry, rz) | Sets the pre-rotation represented in degree |
set_post_rotation(self, rx, ry, rz) | 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())
# kutuyu (10, 0, 0) konumuna yerleştir
boxNode.transform.translation = Vector3(10, 0, 0)
See Also
- module
aspose.threed - class
A3DObject - class
Transform