|
@@ -20694,7 +20694,8 @@
|
|
3x3 matrix datatype.
|
|
3x3 matrix datatype.
|
|
</brief_description>
|
|
</brief_description>
|
|
<description>
|
|
<description>
|
|
- 3x3 matrix used for 3D rotation and scale. Contains 3 vector fields x,y and z. Can also be accessed as array of 3D vectors. Almost always used as orthogonal basis for a [Transform].
|
|
|
|
|
|
+ 3x3 matrix used for 3D rotation and scale. Contains 3 vector fields x,y and z as its columns, which can be interpreted as the local basis vectors of a transformation. Can also be accessed as array of 3D vectors. Almost always used as orthogonal basis for a [Transform].
|
|
|
|
+ For such use, it is composed of a scaling and a rotation matrix, in that order (M = R.S).
|
|
</description>
|
|
</description>
|
|
<methods>
|
|
<methods>
|
|
<method name="Matrix3">
|
|
<method name="Matrix3">
|
|
@@ -20703,7 +20704,7 @@
|
|
<argument index="0" name="from" type="Quat">
|
|
<argument index="0" name="from" type="Quat">
|
|
</argument>
|
|
</argument>
|
|
<description>
|
|
<description>
|
|
- Create a matrix from a quaternion.
|
|
|
|
|
|
+ Create a rotation matrix from the given quaternion.
|
|
</description>
|
|
</description>
|
|
</method>
|
|
</method>
|
|
<method name="Matrix3">
|
|
<method name="Matrix3">
|
|
@@ -20714,7 +20715,7 @@
|
|
<argument index="1" name="phi" type="float">
|
|
<argument index="1" name="phi" type="float">
|
|
</argument>
|
|
</argument>
|
|
<description>
|
|
<description>
|
|
- Create a matrix which rotates around the given axis by the specified angle.
|
|
|
|
|
|
+ Create a rotation matrix which rotates around the given axis by the specified angle.
|
|
</description>
|
|
</description>
|
|
</method>
|
|
</method>
|
|
<method name="Matrix3">
|
|
<method name="Matrix3">
|
|
@@ -20741,26 +20742,29 @@
|
|
<return type="Vector3">
|
|
<return type="Vector3">
|
|
</return>
|
|
</return>
|
|
<description>
|
|
<description>
|
|
- Return euler angles (in the XYZ convention: first Z, then Y, and X last) from the matrix. Returned vector contains the rotation angles in the format (third,second,first).
|
|
|
|
|
|
+ Return Euler angles (in the XYZ convention: first Z, then Y, and X last) from the matrix. Returned vector contains the rotation angles in the format (third,second,first).
|
|
|
|
+ This function only works if the matrix represents a proper rotation.
|
|
</description>
|
|
</description>
|
|
</method>
|
|
</method>
|
|
<method name="get_orthogonal_index">
|
|
<method name="get_orthogonal_index">
|
|
<return type="int">
|
|
<return type="int">
|
|
</return>
|
|
</return>
|
|
<description>
|
|
<description>
|
|
|
|
+ This function considers a discretization of rotations into 24 points on unit sphere, lying along the vectors (x,y,z) with each component being either -1,0 or 1, and returns the index of the point best representing the orientation of the object. It is mainly used by the grid map editor. For further details, refer to Godot source code.
|
|
</description>
|
|
</description>
|
|
</method>
|
|
</method>
|
|
<method name="get_scale">
|
|
<method name="get_scale">
|
|
<return type="Vector3">
|
|
<return type="Vector3">
|
|
</return>
|
|
</return>
|
|
<description>
|
|
<description>
|
|
|
|
+ Assuming that the matrix is the combination of a rotation and scaling, return the absolute value of scaling factors along each axis.
|
|
</description>
|
|
</description>
|
|
</method>
|
|
</method>
|
|
<method name="inverse">
|
|
<method name="inverse">
|
|
<return type="Matrix3">
|
|
<return type="Matrix3">
|
|
</return>
|
|
</return>
|
|
<description>
|
|
<description>
|
|
- Return the affine inverse of the matrix.
|
|
|
|
|
|
+ Return the inverse of the matrix.
|
|
</description>
|
|
</description>
|
|
</method>
|
|
</method>
|
|
<method name="orthonormalized">
|
|
<method name="orthonormalized">
|
|
@@ -20777,6 +20781,9 @@
|
|
</argument>
|
|
</argument>
|
|
<argument index="1" name="phi" type="float">
|
|
<argument index="1" name="phi" type="float">
|
|
</argument>
|
|
</argument>
|
|
|
|
+ <description>
|
|
|
|
+ Introduce an additional rotation around the given axis by phi. Only relevant when the matrix is being used as a part of [Transform].
|
|
|
|
+ </description>
|
|
</method>
|
|
</method>
|
|
<method name="scaled">
|
|
<method name="scaled">
|
|
<return type="Matrix3">
|
|
<return type="Matrix3">
|
|
@@ -20784,7 +20791,7 @@
|
|
<argument index="0" name="scale" type="Vector3">
|
|
<argument index="0" name="scale" type="Vector3">
|
|
</argument>
|
|
</argument>
|
|
<description>
|
|
<description>
|
|
- Return the scaled version of the matrix, by a 3D scale.
|
|
|
|
|
|
+ Introduce an additional scaling specified by the given 3D scaling factor. Only relevant when the matrix is being used as a part of [Transform].
|
|
</description>
|
|
</description>
|
|
</method>
|
|
</method>
|
|
<method name="tdotx">
|
|
<method name="tdotx">
|
|
@@ -20827,7 +20834,7 @@
|
|
<argument index="0" name="v" type="Vector3">
|
|
<argument index="0" name="v" type="Vector3">
|
|
</argument>
|
|
</argument>
|
|
<description>
|
|
<description>
|
|
- Return a vector transformed by the matrix and return it.
|
|
|
|
|
|
+ Return a vector transformed (multiplied) by the matrix and return it.
|
|
</description>
|
|
</description>
|
|
</method>
|
|
</method>
|
|
<method name="xform_inv">
|
|
<method name="xform_inv">
|
|
@@ -20836,7 +20843,7 @@
|
|
<argument index="0" name="v" type="Vector3">
|
|
<argument index="0" name="v" type="Vector3">
|
|
</argument>
|
|
</argument>
|
|
<description>
|
|
<description>
|
|
- Return a vector transformed by the transposed matrix and return it.
|
|
|
|
|
|
+ Return a vector transformed (multiplied) by the transposed matrix and return it. Note that this is a multiplication by inverse only when the matrix represents a rotation-reflection.
|
|
</description>
|
|
</description>
|
|
</method>
|
|
</method>
|
|
</methods>
|
|
</methods>
|
|
@@ -20893,6 +20900,7 @@
|
|
<return type="Matrix32">
|
|
<return type="Matrix32">
|
|
</return>
|
|
</return>
|
|
<description>
|
|
<description>
|
|
|
|
+ Return the inverse of the matrix.
|
|
</description>
|
|
</description>
|
|
</method>
|
|
</method>
|
|
<method name="basis_xform">
|
|
<method name="basis_xform">
|
|
@@ -31482,7 +31490,7 @@
|
|
Quaternion.
|
|
Quaternion.
|
|
</brief_description>
|
|
</brief_description>
|
|
<description>
|
|
<description>
|
|
- Quaternion is a 4 dimensional vector that is used to represent a rotation. It mainly exists to perform SLERP (spherical-linear interpolation) between to rotations obtained by a Matrix3 cheaply. Multiplying quaternions also cheaply reproduces rotation sequences, however quaternions need to be often normalized, or else they suffer from precision issues.
|
|
|
|
|
|
+ Quaternion is a 4 dimensional vector that is used to represent a rotation. It mainly exists to perform SLERP (spherical-linear interpolation) between two rotations. Multiplying quaternions also cheaply reproduces rotation sequences. However quaternions need to be often renormalized, or else they suffer from precision issues.
|
|
</description>
|
|
</description>
|
|
<methods>
|
|
<methods>
|
|
<method name="Quat">
|
|
<method name="Quat">
|
|
@@ -43038,7 +43046,7 @@
|
|
3D Transformation.
|
|
3D Transformation.
|
|
</brief_description>
|
|
</brief_description>
|
|
<description>
|
|
<description>
|
|
- Transform is used to store transformations, including translations. It consists of a Matrix3 "basis" and Vector3 "origin". Transform is used to represent transformations of any object in space. It is similar to a 4x3 matrix.
|
|
|
|
|
|
+ Transform is used to store translation, rotation and scaling transformations. It consists of a Matrix3 "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.
|
|
</description>
|
|
</description>
|
|
<methods>
|
|
<methods>
|
|
<method name="Transform">
|
|
<method name="Transform">
|
|
@@ -43053,7 +43061,7 @@
|
|
<argument index="3" name="origin" type="Vector3">
|
|
<argument index="3" name="origin" type="Vector3">
|
|
</argument>
|
|
</argument>
|
|
<description>
|
|
<description>
|
|
- Construct the Transform from four Vector3. Each axis creates the basis.
|
|
|
|
|
|
+ Construct the Transform from four Vector3. Each axis corresponds to local basis vectors (some of which may be scaled).
|
|
</description>
|
|
</description>
|
|
</method>
|
|
</method>
|
|
<method name="Transform">
|
|
<method name="Transform">
|
|
@@ -43082,7 +43090,7 @@
|
|
<argument index="0" name="from" type="Quat">
|
|
<argument index="0" name="from" type="Quat">
|
|
</argument>
|
|
</argument>
|
|
<description>
|
|
<description>
|
|
- Construct the Transform from a Quat. The origin will be Vector3(0, 0, 0)
|
|
|
|
|
|
+ Construct the Transform from a Quat. The origin will be Vector3(0, 0, 0).
|
|
</description>
|
|
</description>
|
|
</method>
|
|
</method>
|
|
<method name="Transform">
|
|
<method name="Transform">
|
|
@@ -43091,21 +43099,21 @@
|
|
<argument index="0" name="from" type="Matrix3">
|
|
<argument index="0" name="from" type="Matrix3">
|
|
</argument>
|
|
</argument>
|
|
<description>
|
|
<description>
|
|
- Construct the Transform from a Matrix3. The origin will be Vector3(0, 0, 0)
|
|
|
|
|
|
+ Construct the Transform from a Matrix3. The origin will be Vector3(0, 0, 0).
|
|
</description>
|
|
</description>
|
|
</method>
|
|
</method>
|
|
<method name="affine_inverse">
|
|
<method name="affine_inverse">
|
|
<return type="Transform">
|
|
<return type="Transform">
|
|
</return>
|
|
</return>
|
|
<description>
|
|
<description>
|
|
- Returns the inverse of the transfrom, even if the transform has scale or the axis vectors are not orthogonal.
|
|
|
|
|
|
+ Returns the inverse of the transfrom, under the assumption that the transformation is composed of rotation, scaling and translation.
|
|
</description>
|
|
</description>
|
|
</method>
|
|
</method>
|
|
<method name="inverse">
|
|
<method name="inverse">
|
|
<return type="Transform">
|
|
<return type="Transform">
|
|
</return>
|
|
</return>
|
|
<description>
|
|
<description>
|
|
- Returns the inverse of the transform.
|
|
|
|
|
|
+ Returns the inverse of the transform, under the assumption that the transformation is composed of rotation and translation (no scaling).
|
|
</description>
|
|
</description>
|
|
</method>
|
|
</method>
|
|
<method name="looking_at">
|
|
<method name="looking_at">
|
|
@@ -43134,7 +43142,7 @@
|
|
<argument index="1" name="phi" type="float">
|
|
<argument index="1" name="phi" type="float">
|
|
</argument>
|
|
</argument>
|
|
<description>
|
|
<description>
|
|
- Rotate the transform locally. This introduces an additional pre-rotation to the transform, changing the basis to basis * Matrix3(axis, phi).
|
|
|
|
|
|
+ Rotate the transform around given axis by phi.
|
|
</description>
|
|
</description>
|
|
</method>
|
|
</method>
|
|
<method name="scaled">
|
|
<method name="scaled">
|
|
@@ -43143,7 +43151,7 @@
|
|
<argument index="0" name="scale" type="Vector3">
|
|
<argument index="0" name="scale" type="Vector3">
|
|
</argument>
|
|
</argument>
|
|
<description>
|
|
<description>
|
|
- Scale the transform locally.
|
|
|
|
|
|
+ Scale the transform by the specified 3D scaling factors.
|
|
</description>
|
|
</description>
|
|
</method>
|
|
</method>
|
|
<method name="translated">
|
|
<method name="translated">
|
|
@@ -43152,7 +43160,7 @@
|
|
<argument index="0" name="ofs" type="Vector3">
|
|
<argument index="0" name="ofs" type="Vector3">
|
|
</argument>
|
|
</argument>
|
|
<description>
|
|
<description>
|
|
- Translate the transform locally.
|
|
|
|
|
|
+ Translate the transform by the specified displacement.
|
|
</description>
|
|
</description>
|
|
</method>
|
|
</method>
|
|
<method name="xform">
|
|
<method name="xform">
|
|
@@ -43161,7 +43169,7 @@
|
|
<argument index="0" name="v" type="var">
|
|
<argument index="0" name="v" type="var">
|
|
</argument>
|
|
</argument>
|
|
<description>
|
|
<description>
|
|
- Transforms vector "v" by this transform.
|
|
|
|
|
|
+ Transforms the given vector "v" by this transform.
|
|
</description>
|
|
</description>
|
|
</method>
|
|
</method>
|
|
<method name="xform_inv">
|
|
<method name="xform_inv">
|
|
@@ -43176,7 +43184,7 @@
|
|
</methods>
|
|
</methods>
|
|
<members>
|
|
<members>
|
|
<member name="basis" type="Matrix3">
|
|
<member name="basis" type="Matrix3">
|
|
- The basis contains 3 [Vector3]. X axis, Y axis, and Z axis.
|
|
|
|
|
|
+ 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.
|
|
</member>
|
|
</member>
|
|
<member name="origin" type="Vector3">
|
|
<member name="origin" type="Vector3">
|
|
The origin of the transform. Which is the translation offset.
|
|
The origin of the transform. Which is the translation offset.
|