Transform¶
Category: Built-In Types
Brief Description¶
3D Transformation.
Member Functions¶
Transform | Transform ( Vector3 x_axis, Vector3 y_axis, Vector3 z_axis, Vector3 origin ) |
Transform | Transform ( Basis basis, Vector3 origin ) |
Transform | Transform ( Transform2D from ) |
Transform | Transform ( Quat from ) |
Transform | Transform ( Basis from ) |
Transform | affine_inverse ( ) |
Transform | interpolate_with ( Transform transform, float weight ) |
Transform | inverse ( ) |
Transform | looking_at ( Vector3 target, Vector3 up ) |
Transform | orthonormalized ( ) |
Transform | rotated ( Vector3 axis, float phi ) |
Transform | scaled ( Vector3 scale ) |
Transform | translated ( Vector3 ofs ) |
var | xform ( var v ) |
var | xform_inv ( var v ) |
Member Variables¶
Description¶
Transform is used to store translation, rotation and scaling transformations. It consists of a Basis “basis” and Vector3 “origin”. Transform is used to represent transformations of objects in space, and as such, determine their position, orientation and scale. It is similar to a 3x4 matrix.
Member Function Description¶
Construct the Transform from four Vector3. Each axis corresponds to local basis vectors (some of which may be scaled).
Construct the Transform from a Basis and Vector3.
- Transform Transform ( Transform2D from )
Construct the Transform from a Transform2D.
Construct the Transform from a Quat. The origin will be Vector3(0, 0, 0).
Construct the Transform from a Basis. The origin will be Vector3(0, 0, 0).
- Transform affine_inverse ( )
Returns the inverse of the transfrom, under the assumption that the transformation is composed of rotation, scaling and translation.
- Transform inverse ( )
Returns the inverse of the transform, under the assumption that the transformation is composed of rotation and translation (no scaling).
Rotate the transform around the up vector to face the target.
- Transform orthonormalized ( )
Returns a transfrom with the basis orthogonal (90 degrees), and normalized axis vectors.
Rotate the transform around given axis by phi. The axis must be a normalized vector.
Scale the transform by the specified 3D scaling factors.
Translate the transform by the specified displacement.
- var xform ( var v )
Transforms the given vector “v” by this transform.
- var xform_inv ( var v )
Inverse-transforms vector “v” by this transform.