.. Generated automatically by doc/tools/makerst.py in Godot's source tree. .. DO NOT EDIT THIS FILE, but the doc/base/classes.xml source instead. .. _class_Transform: Transform ========= **Category:** Built-In Types Brief Description ----------------- 3D Transformation. Member Functions ---------------- +------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Transform` | :ref:`Transform` **(** :ref:`Vector3` x_axis, :ref:`Vector3` y_axis, :ref:`Vector3` z_axis, :ref:`Vector3` origin **)** | +------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Transform` | :ref:`Transform` **(** :ref:`Basis` basis, :ref:`Vector3` origin **)** | +------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Transform` | :ref:`Transform` **(** :ref:`Transform2D` from **)** | +------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Transform` | :ref:`Transform` **(** :ref:`Quat` from **)** | +------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Transform` | :ref:`Transform` **(** :ref:`Basis` from **)** | +------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Transform` | :ref:`affine_inverse` **(** **)** | +------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Transform` | :ref:`interpolate_with` **(** :ref:`Transform` transform, :ref:`float` weight **)** | +------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Transform` | :ref:`inverse` **(** **)** | +------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Transform` | :ref:`looking_at` **(** :ref:`Vector3` target, :ref:`Vector3` up **)** | +------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Transform` | :ref:`orthonormalized` **(** **)** | +------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Transform` | :ref:`rotated` **(** :ref:`Vector3` axis, :ref:`float` phi **)** | +------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Transform` | :ref:`scaled` **(** :ref:`Vector3` scale **)** | +------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Transform` | :ref:`translated` **(** :ref:`Vector3` ofs **)** | +------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | var | :ref:`xform` **(** var v **)** | +------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | var | :ref:`xform_inv` **(** var v **)** | +------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Member Variables ---------------- - :ref:`Basis` **basis** - The basis is a matrix containing 3 [Vector3] as its columns: X axis, Y axis, and Z axis. These vectors can be interpreted as the basis vectors of local coordinate system travelling with the object. - :ref:`Vector3` **origin** - The origin of the transform. Which is the translation offset. 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 --------------------------- .. _class_Transform_Transform: - :ref:`Transform` **Transform** **(** :ref:`Vector3` x_axis, :ref:`Vector3` y_axis, :ref:`Vector3` z_axis, :ref:`Vector3` origin **)** Construct the Transform from four Vector3. Each axis corresponds to local basis vectors (some of which may be scaled). .. _class_Transform_Transform: - :ref:`Transform` **Transform** **(** :ref:`Basis` basis, :ref:`Vector3` origin **)** Construct the Transform from a Basis and Vector3. .. _class_Transform_Transform: - :ref:`Transform` **Transform** **(** :ref:`Transform2D` from **)** Construct the Transform from a Transform2D. .. _class_Transform_Transform: - :ref:`Transform` **Transform** **(** :ref:`Quat` from **)** Construct the Transform from a Quat. The origin will be Vector3(0, 0, 0). .. _class_Transform_Transform: - :ref:`Transform` **Transform** **(** :ref:`Basis` from **)** Construct the Transform from a Basis. The origin will be Vector3(0, 0, 0). .. _class_Transform_affine_inverse: - :ref:`Transform` **affine_inverse** **(** **)** Returns the inverse of the transfrom, under the assumption that the transformation is composed of rotation, scaling and translation. .. _class_Transform_interpolate_with: - :ref:`Transform` **interpolate_with** **(** :ref:`Transform` transform, :ref:`float` weight **)** .. _class_Transform_inverse: - :ref:`Transform` **inverse** **(** **)** Returns the inverse of the transform, under the assumption that the transformation is composed of rotation and translation (no scaling). .. _class_Transform_looking_at: - :ref:`Transform` **looking_at** **(** :ref:`Vector3` target, :ref:`Vector3` up **)** Rotate the transform around the up vector to face the target. .. _class_Transform_orthonormalized: - :ref:`Transform` **orthonormalized** **(** **)** Returns a transfrom with the basis orthogonal (90 degrees), and normalized axis vectors. .. _class_Transform_rotated: - :ref:`Transform` **rotated** **(** :ref:`Vector3` axis, :ref:`float` phi **)** Rotate the transform around given axis by phi. The axis must be a normalized vector. .. _class_Transform_scaled: - :ref:`Transform` **scaled** **(** :ref:`Vector3` scale **)** Scale the transform by the specified 3D scaling factors. .. _class_Transform_translated: - :ref:`Transform` **translated** **(** :ref:`Vector3` ofs **)** Translate the transform by the specified displacement. .. _class_Transform_xform: - var **xform** **(** var v **)** Transforms the given vector "v" by this transform. .. _class_Transform_xform_inv: - var **xform_inv** **(** var v **)** Inverse-transforms vector "v" by this transform.