mirror of
https://github.com/godotengine/godot-docs.git
synced 2025-12-31 17:49:03 +03:00
580 lines
28 KiB
ReStructuredText
580 lines
28 KiB
ReStructuredText
:github_url: hide
|
||
|
||
.. DO NOT EDIT THIS FILE!!!
|
||
.. Generated automatically from Godot engine sources.
|
||
.. Generator: https://github.com/godotengine/godot/tree/4.0/doc/tools/make_rst.py.
|
||
.. XML source: https://github.com/godotengine/godot/tree/4.0/doc/classes/Transform3D.xml.
|
||
|
||
.. _class_Transform3D:
|
||
|
||
Transform3D
|
||
===========
|
||
|
||
A 3×4 matrix representing a 3D transformation.
|
||
|
||
.. rst-class:: classref-introduction-group
|
||
|
||
Description
|
||
-----------
|
||
|
||
A 3×4 matrix (3 rows, 4 columns) used for 3D linear transformations. It can represent transformations such as translation, rotation, and scaling. It consists of a :ref:`basis<class_Transform3D_property_basis>` (first 3 columns) and a :ref:`Vector3<class_Vector3>` for the :ref:`origin<class_Transform3D_property_origin>` (last column).
|
||
|
||
For more information, read the "Matrices and transforms" documentation article.
|
||
|
||
.. rst-class:: classref-introduction-group
|
||
|
||
Tutorials
|
||
---------
|
||
|
||
- :doc:`Math documentation index <../tutorials/math/index>`
|
||
|
||
- :doc:`Matrices and transforms <../tutorials/math/matrices_and_transforms>`
|
||
|
||
- :doc:`Using 3D transforms <../tutorials/3d/using_transforms>`
|
||
|
||
- `Matrix Transform Demo <https://godotengine.org/asset-library/asset/584>`__
|
||
|
||
- `3D Platformer Demo <https://godotengine.org/asset-library/asset/125>`__
|
||
|
||
- `2.5D Demo <https://godotengine.org/asset-library/asset/583>`__
|
||
|
||
.. rst-class:: classref-reftable-group
|
||
|
||
Properties
|
||
----------
|
||
|
||
.. table::
|
||
:widths: auto
|
||
|
||
+-------------------------------+--------------------------------------------------+--------------------------------------+
|
||
| :ref:`Basis<class_Basis>` | :ref:`basis<class_Transform3D_property_basis>` | ``Basis(1, 0, 0, 0, 1, 0, 0, 0, 1)`` |
|
||
+-------------------------------+--------------------------------------------------+--------------------------------------+
|
||
| :ref:`Vector3<class_Vector3>` | :ref:`origin<class_Transform3D_property_origin>` | ``Vector3(0, 0, 0)`` |
|
||
+-------------------------------+--------------------------------------------------+--------------------------------------+
|
||
|
||
.. rst-class:: classref-reftable-group
|
||
|
||
Constructors
|
||
------------
|
||
|
||
.. table::
|
||
:widths: auto
|
||
|
||
+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Transform3D<class_Transform3D>` | :ref:`Transform3D<class_Transform3D_constructor_Transform3D>` **(** **)** |
|
||
+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Transform3D<class_Transform3D>` | :ref:`Transform3D<class_Transform3D_constructor_Transform3D>` **(** :ref:`Transform3D<class_Transform3D>` from **)** |
|
||
+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Transform3D<class_Transform3D>` | :ref:`Transform3D<class_Transform3D_constructor_Transform3D>` **(** :ref:`Basis<class_Basis>` basis, :ref:`Vector3<class_Vector3>` origin **)** |
|
||
+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Transform3D<class_Transform3D>` | :ref:`Transform3D<class_Transform3D_constructor_Transform3D>` **(** :ref:`Projection<class_Projection>` from **)** |
|
||
+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Transform3D<class_Transform3D>` | :ref:`Transform3D<class_Transform3D_constructor_Transform3D>` **(** :ref:`Vector3<class_Vector3>` x_axis, :ref:`Vector3<class_Vector3>` y_axis, :ref:`Vector3<class_Vector3>` z_axis, :ref:`Vector3<class_Vector3>` origin **)** |
|
||
+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
|
||
.. rst-class:: classref-reftable-group
|
||
|
||
Methods
|
||
-------
|
||
|
||
.. table::
|
||
:widths: auto
|
||
|
||
+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Transform3D<class_Transform3D>` | :ref:`affine_inverse<class_Transform3D_method_affine_inverse>` **(** **)** |const| |
|
||
+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Transform3D<class_Transform3D>` | :ref:`interpolate_with<class_Transform3D_method_interpolate_with>` **(** :ref:`Transform3D<class_Transform3D>` xform, :ref:`float<class_float>` weight **)** |const| |
|
||
+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Transform3D<class_Transform3D>` | :ref:`inverse<class_Transform3D_method_inverse>` **(** **)** |const| |
|
||
+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`is_equal_approx<class_Transform3D_method_is_equal_approx>` **(** :ref:`Transform3D<class_Transform3D>` xform **)** |const| |
|
||
+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`is_finite<class_Transform3D_method_is_finite>` **(** **)** |const| |
|
||
+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Transform3D<class_Transform3D>` | :ref:`looking_at<class_Transform3D_method_looking_at>` **(** :ref:`Vector3<class_Vector3>` target, :ref:`Vector3<class_Vector3>` up=Vector3(0, 1, 0) **)** |const| |
|
||
+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Transform3D<class_Transform3D>` | :ref:`orthonormalized<class_Transform3D_method_orthonormalized>` **(** **)** |const| |
|
||
+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Transform3D<class_Transform3D>` | :ref:`rotated<class_Transform3D_method_rotated>` **(** :ref:`Vector3<class_Vector3>` axis, :ref:`float<class_float>` angle **)** |const| |
|
||
+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Transform3D<class_Transform3D>` | :ref:`rotated_local<class_Transform3D_method_rotated_local>` **(** :ref:`Vector3<class_Vector3>` axis, :ref:`float<class_float>` angle **)** |const| |
|
||
+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Transform3D<class_Transform3D>` | :ref:`scaled<class_Transform3D_method_scaled>` **(** :ref:`Vector3<class_Vector3>` scale **)** |const| |
|
||
+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Transform3D<class_Transform3D>` | :ref:`scaled_local<class_Transform3D_method_scaled_local>` **(** :ref:`Vector3<class_Vector3>` scale **)** |const| |
|
||
+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Transform3D<class_Transform3D>` | :ref:`translated<class_Transform3D_method_translated>` **(** :ref:`Vector3<class_Vector3>` offset **)** |const| |
|
||
+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Transform3D<class_Transform3D>` | :ref:`translated_local<class_Transform3D_method_translated_local>` **(** :ref:`Vector3<class_Vector3>` offset **)** |const| |
|
||
+---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
|
||
.. rst-class:: classref-reftable-group
|
||
|
||
Operators
|
||
---------
|
||
|
||
.. table::
|
||
:widths: auto
|
||
|
||
+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`operator !=<class_Transform3D_operator_neq_Transform3D>` **(** :ref:`Transform3D<class_Transform3D>` right **)** |
|
||
+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`AABB<class_AABB>` | :ref:`operator *<class_Transform3D_operator_mul_AABB>` **(** :ref:`AABB<class_AABB>` right **)** |
|
||
+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`PackedVector3Array<class_PackedVector3Array>` | :ref:`operator *<class_Transform3D_operator_mul_PackedVector3Array>` **(** :ref:`PackedVector3Array<class_PackedVector3Array>` right **)** |
|
||
+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Plane<class_Plane>` | :ref:`operator *<class_Transform3D_operator_mul_Plane>` **(** :ref:`Plane<class_Plane>` right **)** |
|
||
+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Transform3D<class_Transform3D>` | :ref:`operator *<class_Transform3D_operator_mul_Transform3D>` **(** :ref:`Transform3D<class_Transform3D>` right **)** |
|
||
+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Vector3<class_Vector3>` | :ref:`operator *<class_Transform3D_operator_mul_Vector3>` **(** :ref:`Vector3<class_Vector3>` right **)** |
|
||
+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Transform3D<class_Transform3D>` | :ref:`operator *<class_Transform3D_operator_mul_float>` **(** :ref:`float<class_float>` right **)** |
|
||
+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Transform3D<class_Transform3D>` | :ref:`operator *<class_Transform3D_operator_mul_int>` **(** :ref:`int<class_int>` right **)** |
|
||
+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`operator ==<class_Transform3D_operator_eq_Transform3D>` **(** :ref:`Transform3D<class_Transform3D>` right **)** |
|
||
+-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
|
||
|
||
.. rst-class:: classref-section-separator
|
||
|
||
----
|
||
|
||
.. rst-class:: classref-descriptions-group
|
||
|
||
Constants
|
||
---------
|
||
|
||
.. _class_Transform3D_constant_IDENTITY:
|
||
|
||
.. rst-class:: classref-constant
|
||
|
||
**IDENTITY** = ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)``
|
||
|
||
**Transform3D** with no translation, rotation or scaling applied. When applied to other data structures, :ref:`IDENTITY<class_Transform3D_constant_IDENTITY>` performs no transformation.
|
||
|
||
.. _class_Transform3D_constant_FLIP_X:
|
||
|
||
.. rst-class:: classref-constant
|
||
|
||
**FLIP_X** = ``Transform3D(-1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)``
|
||
|
||
**Transform3D** with mirroring applied perpendicular to the YZ plane.
|
||
|
||
.. _class_Transform3D_constant_FLIP_Y:
|
||
|
||
.. rst-class:: classref-constant
|
||
|
||
**FLIP_Y** = ``Transform3D(1, 0, 0, 0, -1, 0, 0, 0, 1, 0, 0, 0)``
|
||
|
||
**Transform3D** with mirroring applied perpendicular to the XZ plane.
|
||
|
||
.. _class_Transform3D_constant_FLIP_Z:
|
||
|
||
.. rst-class:: classref-constant
|
||
|
||
**FLIP_Z** = ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, -1, 0, 0, 0)``
|
||
|
||
**Transform3D** with mirroring applied perpendicular to the XY plane.
|
||
|
||
.. rst-class:: classref-section-separator
|
||
|
||
----
|
||
|
||
.. rst-class:: classref-descriptions-group
|
||
|
||
Property Descriptions
|
||
---------------------
|
||
|
||
.. _class_Transform3D_property_basis:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`Basis<class_Basis>` **basis** = ``Basis(1, 0, 0, 0, 1, 0, 0, 0, 1)``
|
||
|
||
The basis is a matrix containing 3 :ref:`Vector3<class_Vector3>` as its columns: X axis, Y axis, and Z axis. These vectors can be interpreted as the basis vectors of local coordinate system traveling with the object.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Transform3D_property_origin:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`Vector3<class_Vector3>` **origin** = ``Vector3(0, 0, 0)``
|
||
|
||
The translation offset of the transform (column 3, the fourth column). Equivalent to array index ``3``.
|
||
|
||
.. rst-class:: classref-section-separator
|
||
|
||
----
|
||
|
||
.. rst-class:: classref-descriptions-group
|
||
|
||
Constructor Descriptions
|
||
------------------------
|
||
|
||
.. _class_Transform3D_constructor_Transform3D:
|
||
|
||
.. rst-class:: classref-constructor
|
||
|
||
:ref:`Transform3D<class_Transform3D>` **Transform3D** **(** **)**
|
||
|
||
Constructs a default-initialized **Transform3D** set to :ref:`IDENTITY<class_Transform3D_constant_IDENTITY>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. rst-class:: classref-constructor
|
||
|
||
:ref:`Transform3D<class_Transform3D>` **Transform3D** **(** :ref:`Transform3D<class_Transform3D>` from **)**
|
||
|
||
Constructs a **Transform3D** as a copy of the given **Transform3D**.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. rst-class:: classref-constructor
|
||
|
||
:ref:`Transform3D<class_Transform3D>` **Transform3D** **(** :ref:`Basis<class_Basis>` basis, :ref:`Vector3<class_Vector3>` origin **)**
|
||
|
||
Constructs a Transform3D from a :ref:`Basis<class_Basis>` and :ref:`Vector3<class_Vector3>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. rst-class:: classref-constructor
|
||
|
||
:ref:`Transform3D<class_Transform3D>` **Transform3D** **(** :ref:`Projection<class_Projection>` from **)**
|
||
|
||
Constructs a Transform3D from a :ref:`Projection<class_Projection>` by trimming the last row of the projection matrix (``from.x.w``, ``from.y.w``, ``from.z.w``, and ``from.w.w`` are not copied over).
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. rst-class:: classref-constructor
|
||
|
||
:ref:`Transform3D<class_Transform3D>` **Transform3D** **(** :ref:`Vector3<class_Vector3>` x_axis, :ref:`Vector3<class_Vector3>` y_axis, :ref:`Vector3<class_Vector3>` z_axis, :ref:`Vector3<class_Vector3>` origin **)**
|
||
|
||
Constructs a Transform3D from four :ref:`Vector3<class_Vector3>` values (matrix columns). Each axis corresponds to local basis vectors (some of which may be scaled).
|
||
|
||
.. rst-class:: classref-section-separator
|
||
|
||
----
|
||
|
||
.. rst-class:: classref-descriptions-group
|
||
|
||
Method Descriptions
|
||
-------------------
|
||
|
||
.. _class_Transform3D_method_affine_inverse:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Transform3D<class_Transform3D>` **affine_inverse** **(** **)** |const|
|
||
|
||
Returns the inverse of the transform, under the assumption that the transformation is composed of rotation, scaling and translation.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Transform3D_method_interpolate_with:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Transform3D<class_Transform3D>` **interpolate_with** **(** :ref:`Transform3D<class_Transform3D>` xform, :ref:`float<class_float>` weight **)** |const|
|
||
|
||
Returns a transform interpolated between this transform and another by a given ``weight`` (on the range of 0.0 to 1.0).
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Transform3D_method_inverse:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Transform3D<class_Transform3D>` **inverse** **(** **)** |const|
|
||
|
||
Returns the inverse of the transform, under the assumption that the transformation is composed of rotation and translation (no scaling, use :ref:`affine_inverse<class_Transform3D_method_affine_inverse>` for transforms with scaling).
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Transform3D_method_is_equal_approx:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`bool<class_bool>` **is_equal_approx** **(** :ref:`Transform3D<class_Transform3D>` xform **)** |const|
|
||
|
||
Returns ``true`` if this transform and ``xform`` are approximately equal, by calling ``is_equal_approx`` on each component.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Transform3D_method_is_finite:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`bool<class_bool>` **is_finite** **(** **)** |const|
|
||
|
||
Returns ``true`` if this transform is finite, by calling :ref:`@GlobalScope.is_finite<class_@GlobalScope_method_is_finite>` on each component.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Transform3D_method_looking_at:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Transform3D<class_Transform3D>` **looking_at** **(** :ref:`Vector3<class_Vector3>` target, :ref:`Vector3<class_Vector3>` up=Vector3(0, 1, 0) **)** |const|
|
||
|
||
Returns a copy of the transform rotated such that the forward axis (-Z) points towards the ``target`` position.
|
||
|
||
The up axis (+Y) points as close to the ``up`` vector as possible while staying perpendicular to the forward axis. The resulting transform is orthonormalized. The existing rotation, scale, and skew information from the original transform is discarded. The ``target`` and ``up`` vectors cannot be zero, cannot be parallel to each other, and are defined in global/parent space.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Transform3D_method_orthonormalized:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Transform3D<class_Transform3D>` **orthonormalized** **(** **)** |const|
|
||
|
||
Returns the transform with the basis orthogonal (90 degrees), and normalized axis vectors (scale of 1 or -1).
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Transform3D_method_rotated:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Transform3D<class_Transform3D>` **rotated** **(** :ref:`Vector3<class_Vector3>` axis, :ref:`float<class_float>` angle **)** |const|
|
||
|
||
Returns a copy of the transform rotated around the given ``axis`` by the given ``angle`` (in radians).
|
||
|
||
The ``axis`` must be a normalized vector.
|
||
|
||
This method is an optimized version of multiplying the given transform ``X`` with a corresponding rotation transform ``R`` from the left, i.e., ``R * X``.
|
||
|
||
This can be seen as transforming with respect to the global/parent frame.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Transform3D_method_rotated_local:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Transform3D<class_Transform3D>` **rotated_local** **(** :ref:`Vector3<class_Vector3>` axis, :ref:`float<class_float>` angle **)** |const|
|
||
|
||
Returns a copy of the transform rotated around the given ``axis`` by the given ``angle`` (in radians).
|
||
|
||
The ``axis`` must be a normalized vector.
|
||
|
||
This method is an optimized version of multiplying the given transform ``X`` with a corresponding rotation transform ``R`` from the right, i.e., ``X * R``.
|
||
|
||
This can be seen as transforming with respect to the local frame.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Transform3D_method_scaled:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Transform3D<class_Transform3D>` **scaled** **(** :ref:`Vector3<class_Vector3>` scale **)** |const|
|
||
|
||
Returns a copy of the transform scaled by the given ``scale`` factor.
|
||
|
||
This method is an optimized version of multiplying the given transform ``X`` with a corresponding scaling transform ``S`` from the left, i.e., ``S * X``.
|
||
|
||
This can be seen as transforming with respect to the global/parent frame.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Transform3D_method_scaled_local:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Transform3D<class_Transform3D>` **scaled_local** **(** :ref:`Vector3<class_Vector3>` scale **)** |const|
|
||
|
||
Returns a copy of the transform scaled by the given ``scale`` factor.
|
||
|
||
This method is an optimized version of multiplying the given transform ``X`` with a corresponding scaling transform ``S`` from the right, i.e., ``X * S``.
|
||
|
||
This can be seen as transforming with respect to the local frame.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Transform3D_method_translated:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Transform3D<class_Transform3D>` **translated** **(** :ref:`Vector3<class_Vector3>` offset **)** |const|
|
||
|
||
Returns a copy of the transform translated by the given ``offset``.
|
||
|
||
This method is an optimized version of multiplying the given transform ``X`` with a corresponding translation transform ``T`` from the left, i.e., ``T * X``.
|
||
|
||
This can be seen as transforming with respect to the global/parent frame.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Transform3D_method_translated_local:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Transform3D<class_Transform3D>` **translated_local** **(** :ref:`Vector3<class_Vector3>` offset **)** |const|
|
||
|
||
Returns a copy of the transform translated by the given ``offset``.
|
||
|
||
This method is an optimized version of multiplying the given transform ``X`` with a corresponding translation transform ``T`` from the right, i.e., ``X * T``.
|
||
|
||
This can be seen as transforming with respect to the local frame.
|
||
|
||
.. rst-class:: classref-section-separator
|
||
|
||
----
|
||
|
||
.. rst-class:: classref-descriptions-group
|
||
|
||
Operator Descriptions
|
||
---------------------
|
||
|
||
.. _class_Transform3D_operator_neq_Transform3D:
|
||
|
||
.. rst-class:: classref-operator
|
||
|
||
:ref:`bool<class_bool>` **operator !=** **(** :ref:`Transform3D<class_Transform3D>` right **)**
|
||
|
||
Returns ``true`` if the transforms are not equal.
|
||
|
||
\ **Note:** Due to floating-point precision errors, consider using :ref:`is_equal_approx<class_Transform3D_method_is_equal_approx>` instead, which is more reliable.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Transform3D_operator_mul_AABB:
|
||
|
||
.. rst-class:: classref-operator
|
||
|
||
:ref:`AABB<class_AABB>` **operator *** **(** :ref:`AABB<class_AABB>` right **)**
|
||
|
||
Transforms (multiplies) the :ref:`AABB<class_AABB>` by the given **Transform3D** matrix.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Transform3D_operator_mul_PackedVector3Array:
|
||
|
||
.. rst-class:: classref-operator
|
||
|
||
:ref:`PackedVector3Array<class_PackedVector3Array>` **operator *** **(** :ref:`PackedVector3Array<class_PackedVector3Array>` right **)**
|
||
|
||
Transforms (multiplies) each element of the :ref:`Vector3<class_Vector3>` array by the given **Transform3D** matrix.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Transform3D_operator_mul_Plane:
|
||
|
||
.. rst-class:: classref-operator
|
||
|
||
:ref:`Plane<class_Plane>` **operator *** **(** :ref:`Plane<class_Plane>` right **)**
|
||
|
||
Transforms (multiplies) the :ref:`Plane<class_Plane>` by the given **Transform3D** transformation matrix.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Transform3D_operator_mul_Transform3D:
|
||
|
||
.. rst-class:: classref-operator
|
||
|
||
:ref:`Transform3D<class_Transform3D>` **operator *** **(** :ref:`Transform3D<class_Transform3D>` right **)**
|
||
|
||
Composes these two transformation matrices by multiplying them together. This has the effect of transforming the second transform (the child) by the first transform (the parent).
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Transform3D_operator_mul_Vector3:
|
||
|
||
.. rst-class:: classref-operator
|
||
|
||
:ref:`Vector3<class_Vector3>` **operator *** **(** :ref:`Vector3<class_Vector3>` right **)**
|
||
|
||
Transforms (multiplies) the :ref:`Vector3<class_Vector3>` by the given **Transform3D** matrix.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Transform3D_operator_mul_float:
|
||
|
||
.. rst-class:: classref-operator
|
||
|
||
:ref:`Transform3D<class_Transform3D>` **operator *** **(** :ref:`float<class_float>` right **)**
|
||
|
||
This operator multiplies all components of the **Transform3D**, including the origin vector, which scales it uniformly.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Transform3D_operator_mul_int:
|
||
|
||
.. rst-class:: classref-operator
|
||
|
||
:ref:`Transform3D<class_Transform3D>` **operator *** **(** :ref:`int<class_int>` right **)**
|
||
|
||
This operator multiplies all components of the **Transform3D**, including the origin vector, which scales it uniformly.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_Transform3D_operator_eq_Transform3D:
|
||
|
||
.. rst-class:: classref-operator
|
||
|
||
:ref:`bool<class_bool>` **operator ==** **(** :ref:`Transform3D<class_Transform3D>` right **)**
|
||
|
||
Returns ``true`` if the transforms are exactly equal.
|
||
|
||
\ **Note:** Due to floating-point precision errors, consider using :ref:`is_equal_approx<class_Transform3D_method_is_equal_approx>` instead, which is more reliable.
|
||
|
||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
||
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
||
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|