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

NameTypeAccessDescription
translationVector3ReadHolds the current translation as a Vector3
scalingVector3Read
rotationQuaternionReadStores the rotation as a Quaternion
eulerAnglesVector3ReadProvides the rotation expressed as Euler angles in a Vector3
scalingOffsetVector3ReadStores the offset applied before scaling as a Vector3
scalingPivotVector3ReadStores the pivot point for scaling operations as a Vector3
rotationOffsetVector3ReadStores the offset applied before rotation as a Vector3
rotationPivotVector3ReadStores the pivot point for rotation as a Vector3
preRotationVector3ReadHolds the pre‑rotation vector applied before the main rotation
postRotationVector3ReadHolds the post‑rotation vector applied after the main rotation
geometricTranslationVector3ReadStores geometric translation components as a Vector3
geometricScalingVector3ReadStores geometric scaling factors as a Vector3
geometricRotationVector3ReadStores geometric rotation angles as a Vector3
transformMatrixMatrix4ReadProvides the combined 4x4 transformation matrix

Methods

SignatureDescription
constructor(name: string)Creates a Transform instance identified by the given name
_computeMatrix()Matrix4
_invalidateCache()
setTranslation(tx: number, ty: number, tz: number)TransformSets the translation components (tx, ty, tz) and returns this Transform
setScale(sx: number, sy: number, sz: number)TransformSets the scaling factors (sx, sy, sz) and returns this Transform
setEulerAngles(rx: number, ry: number, rz: number)TransformSets rotation using Euler angles (rx, ry, rz) and returns this Transform
setRotation(rw: number, rx: number, ry: number, rz: number)TransformSets rotation as a quaternion (rw, rx, ry, rz) and returns this Transform
setPreRotation(rx: number, ry: number, rz: number)TransformSets 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)TransformSets geometric translation (x, y, z) and returns this Transform
setGeometricScaling(sx: number, sy: number, sz: number)Transform
setGeometricRotation(rx: number, ry: number, rz: number)TransformSets geometric rotation (rx, ry, rz) and returns this Transform
toString()stringReturns a human‑readable string describing the Transform