TransformBuilder class
TransformBuilder class
The TransformBuilder
is used to build transform matrix by a chain of transformations.
The TransformBuilder type exposes the following members:
Constructors
Constructor | Description |
---|---|
init | Construct a TransformBuilder with initial transform matrix and specified compose order |
init | Construct a TransformBuilder with initial identity transform matrix and specified compose order |
Properties
Property | Description |
---|---|
matrix | Gets or sets the current matrix value |
compose_order | Gets or sets the chain compose order. |
Methods
Method | Description |
---|---|
scale | Chain a scaling transform matrix with a component scaled by s |
scale | Chain a scaling transform matrix |
scale | Chain a scale transform |
rotate_degree | Chain a rotation transform in degree |
rotate_degree | Append rotation with specified order |
rotate_radian | Chain a rotation transform in radian |
rotate_radian | Append rotation with specified order |
rotate_euler_radian | Chain a rotation by Euler angles in radian |
rotate_euler_radian | Chain a rotation by Euler angles in radian |
translate | Chain a translation transform |
translate | Chain a translation transform |
compose | Append or prepend the argument to internal matrix. |
append | Append the new transform matrix to the transform chain. |
prepend | Prepend the new transform matrix to the transform chain. |
rearrange | Rearrange the layout of the axis. |
rotate | Chain a rotation by a quaternion |
rotate_euler_degree | Chain a rotation by Euler angles in degree |
reset | Reset the transform to identity matrix |
Example
The following code shows how to create a matrix by a set of operation
from aspose.threed.utilities import TransformBuilder
tb = TransformBuilder()
tb.translate(10, 20, 0)
tb.scale(10, 10, 10)
tb.rotate_euler_degree(90, 0, 0)
print(f"Transform Matrix: {tb.matrix}")
See Also
- module
aspose.threed.utilities
- class
TransformBuilder