Transform
Overview
Transform is a class in Aspose.3d for Typescript.
Inherits from: Transform, A3DObject.
Transform provides methods to set translation, scaling, Euler angles, quaternion rotation, pre‑ and post‑rotation, and geometric translation/scaling/rotation, and its toString() returns a readable description.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
translation | Vector3 | Read | Holds the current translation as a Vector3 |
scaling | Vector3 | Read | |
rotation | Quaternion | Read | Stores the rotation as a Quaternion |
eulerAngles | Vector3 | Read | Provides the rotation expressed as Euler angles in a Vector3 |
scalingOffset | Vector3 | Read | Stores the offset applied before scaling as a Vector3 |
scalingPivot | Vector3 | Read | Stores the pivot point for scaling operations as a Vector3 |
rotationOffset | Vector3 | Read | Stores the offset applied before rotation as a Vector3 |
rotationPivot | Vector3 | Read | Stores the pivot point for rotation as a Vector3 |
preRotation | Vector3 | Read | Holds the pre‑rotation vector applied before the main rotation |
postRotation | Vector3 | Read | Holds the post‑rotation vector applied after the main rotation |
geometricTranslation | Vector3 | Read | Stores geometric translation components as a Vector3 |
geometricScaling | Vector3 | Read | Stores geometric scaling factors as a Vector3 |
geometricRotation | Vector3 | Read | Stores geometric rotation angles as a Vector3 |
transformMatrix | Matrix4 | Read | Provides the combined 4x4 transformation matrix |
Methods
| Signature | Description |
|---|---|
constructor(name: string) | Creates a Transform instance identified by the given name |
_computeMatrix() → Matrix4 | |
_invalidateCache() | |
setTranslation(tx: number, ty: number, tz: number) → Transform | Sets the translation components (tx, ty, tz) and returns this Transform |
setScale(sx: number, sy: number, sz: number) → Transform | Sets the scaling factors (sx, sy, sz) and returns this Transform |
setEulerAngles(rx: number, ry: number, rz: number) → Transform | Sets rotation using Euler angles (rx, ry, rz) and returns this Transform |
setRotation(rw: number, rx: number, ry: number, rz: number) → Transform | Sets rotation as a quaternion (rw, rx, ry, rz) and returns this Transform |
setPreRotation(rx: number, ry: number, rz: number) → Transform | Sets a pre‑rotation vector (rx, ry, rz) and returns this Transform |
setPostRotation(rx: number, ry: number, rz: number) → Transform | |
setGeometricTranslation(x: number, y: number, z: number) → Transform | Sets geometric translation (x, y, z) and returns this Transform |
setGeometricScaling(sx: number, sy: number, sz: number) → Transform | |
setGeometricRotation(rx: number, ry: number, rz: number) → Transform | Sets geometric rotation (rx, ry, rz) and returns this Transform |
toString() → string | Returns a human‑readable string describing the Transform |