From 8acd13a456050ded00f0f264ff0aa91a304f6c54 Mon Sep 17 00:00:00 2001 From: Marcel Admiraal Date: Wed, 20 Jan 2021 07:02:02 +0000 Subject: Rename Quat to Quaternion --- doc/classes/@GlobalScope.xml | 4 +- doc/classes/Animation.xml | 4 +- doc/classes/Basis.xml | 10 +- doc/classes/Quat.xml | 308 ------------------------------------------- doc/classes/Quaternion.xml | 308 +++++++++++++++++++++++++++++++++++++++++++ doc/classes/Vector3.xml | 2 +- doc/classes/float.xml | 6 +- doc/classes/int.xml | 4 +- 8 files changed, 323 insertions(+), 323 deletions(-) delete mode 100644 doc/classes/Quat.xml create mode 100644 doc/classes/Quaternion.xml (limited to 'doc/classes') diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml index 00bfb3dbb9..ed0cf5bd5d 100644 --- a/doc/classes/@GlobalScope.xml +++ b/doc/classes/@GlobalScope.xml @@ -2596,8 +2596,8 @@ Variable is of type [Plane]. - - Variable is of type [Quat]. + + Variable is of type [Quaternion]. Variable is of type [AABB]. diff --git a/doc/classes/Animation.xml b/doc/classes/Animation.xml index 7f99d06357..02203a3725 100644 --- a/doc/classes/Animation.xml +++ b/doc/classes/Animation.xml @@ -640,7 +640,7 @@ - + @@ -656,7 +656,7 @@ - Returns the interpolated value of a transform track at a given time (in seconds). An array consisting of 3 elements: position ([Vector3]), rotation ([Quat]) and scale ([Vector3]). + Returns the interpolated value of a transform track at a given time (in seconds). An array consisting of 3 elements: position ([Vector3]), rotation ([Quaternion]) and scale ([Vector3]). diff --git a/doc/classes/Basis.xml b/doc/classes/Basis.xml index f01a11e399..14fca04672 100644 --- a/doc/classes/Basis.xml +++ b/doc/classes/Basis.xml @@ -53,13 +53,13 @@ Constructs a pure rotation basis matrix from the given Euler angles (in the YXZ convention: when *composing*, first Y, then X, and Z last), given in the vector format as (X angle, Y angle, Z angle). - Consider using the [Quat] constructor instead, which uses a quaternion instead of Euler angles. + Consider using the [Quaternion] constructor instead, which uses a quaternion instead of Euler angles. - + Constructs a pure rotation basis matrix from the given quaternion. @@ -91,7 +91,7 @@ Returns the basis's rotation in the form of Euler angles (in the YXZ convention: when decomposing, first Z, then X, and Y last). The returned vector contains the rotation angles in the format (X angle, Y angle, Z angle). - Consider using the [method get_rotation_quat] method instead, which returns a [Quat] quaternion instead of Euler angles. + Consider using the [method get_rotation_quaternion] method instead, which returns a [Quaternion] quaternion instead of Euler angles. @@ -101,8 +101,8 @@ 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 [GridMap] editor. For further details, refer to the Godot source code. - - + + Returns the basis's rotation in the form of a quaternion. See [method get_euler] if you need Euler angles, but keep in mind quaternions should generally be preferred to Euler angles. diff --git a/doc/classes/Quat.xml b/doc/classes/Quat.xml deleted file mode 100644 index 1c0a3e37c0..0000000000 --- a/doc/classes/Quat.xml +++ /dev/null @@ -1,308 +0,0 @@ - - - - Quaternion. - - - A unit quaternion used for representing 3D rotations. Quaternions need to be normalized to be used for rotation. - It is similar to Basis, which implements matrix representation of rotations, and can be parametrized using both an axis-angle pair or Euler angles. Basis stores rotation, scale, and shearing, while Quat only stores rotation. - Due to its compactness and the way it is stored in memory, certain operations (obtaining axis-angle and performing SLERP, in particular) are more efficient and robust against floating-point errors. - - - https://docs.godotengine.org/en/latest/tutorials/3d/using_transforms.html#interpolating-with-quaternions - https://godotengine.org/asset-library/asset/678 - - - - - - - Constructs a default-initialized quaternion with all components set to [code]0[/code]. - - - - - - - - - Constructs a [Quat] as a copy of the given [Quat]. - - - - - - - - - - - - - - - - - - - - - Constructs a quaternion that will rotate around the given axis by the specified angle. The axis must be a normalized vector. - - - - - - - - - Constructs a quaternion that will perform a rotation specified by Euler angles (in the YXZ convention: when decomposing, first Z, then X, and Y last), given in the vector format as (X angle, Y angle, Z angle). - - - - - - - - - Constructs a quaternion from the given [Basis]. - - - - - - - - - - - - - - - Constructs a quaternion defined by the given values. - - - - - - - - - - - - - - - Performs a cubic spherical interpolation between quaternions [code]pre_a[/code], this vector, [code]b[/code], and [code]post_b[/code], by the given amount [code]weight[/code]. - - - - - - - - - Returns the dot product of two quaternions. - - - - - - - Returns Euler angles (in the YXZ convention: when decomposing, first Z, then X, and Y last) corresponding to the rotation represented by the unit quaternion. Returned vector contains the rotation angles in the format (X angle, Y angle, Z angle). - - - - - - - Returns the inverse of the quaternion. - - - - - - - - - Returns [code]true[/code] if this quaternion and [code]quat[/code] are approximately equal, by running [method @GlobalScope.is_equal_approx] on each component. - - - - - - - Returns whether the quaternion is normalized or not. - - - - - - - Returns the length of the quaternion. - - - - - - - Returns the length of the quaternion, squared. - - - - - - - Returns a copy of the quaternion, normalized to unit length. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Returns the result of the spherical linear interpolation between this quaternion and [code]to[/code] by amount [code]weight[/code]. - [b]Note:[/b] Both quaternions must be normalized. - - - - - - - - - - - Returns the result of the spherical linear interpolation between this quaternion and [code]to[/code] by amount [code]weight[/code], but without checking if the rotation path is not bigger than 90 degrees. - - - - - - W component of the quaternion (real part). - Quaternion components should usually not be manipulated directly. - - - X component of the quaternion (imaginary [code]i[/code] axis part). - Quaternion components should usually not be manipulated directly. - - - Y component of the quaternion (imaginary [code]j[/code] axis part). - Quaternion components should usually not be manipulated directly. - - - Z component of the quaternion (imaginary [code]k[/code] axis part). - Quaternion components should usually not be manipulated directly. - - - - - The identity quaternion, representing no rotation. Equivalent to an identity [Basis] matrix. If a vector is transformed by an identity quaternion, it will not change. - - - diff --git a/doc/classes/Quaternion.xml b/doc/classes/Quaternion.xml new file mode 100644 index 0000000000..678fb0d44d --- /dev/null +++ b/doc/classes/Quaternion.xml @@ -0,0 +1,308 @@ + + + + Quaternion. + + + A unit quaternion used for representing 3D rotations. Quaternions need to be normalized to be used for rotation. + It is similar to Basis, which implements matrix representation of rotations, and can be parametrized using both an axis-angle pair or Euler angles. Basis stores rotation, scale, and shearing, while Quaternion only stores rotation. + Due to its compactness and the way it is stored in memory, certain operations (obtaining axis-angle and performing SLERP, in particular) are more efficient and robust against floating-point errors. + + + https://docs.godotengine.org/en/latest/tutorials/3d/using_transforms.html#interpolating-with-quaternions + https://godotengine.org/asset-library/asset/678 + + + + + + + Constructs a default-initialized quaternion with all components set to [code]0[/code]. + + + + + + + + + Constructs a [Quaternion] as a copy of the given [Quaternion]. + + + + + + + + + + + + + + + + + + + + + Constructs a quaternion that will rotate around the given axis by the specified angle. The axis must be a normalized vector. + + + + + + + + + Constructs a quaternion that will perform a rotation specified by Euler angles (in the YXZ convention: when decomposing, first Z, then X, and Y last), given in the vector format as (X angle, Y angle, Z angle). + + + + + + + + + Constructs a quaternion from the given [Basis]. + + + + + + + + + + + + + + + Constructs a quaternion defined by the given values. + + + + + + + + + + + + + + + Performs a cubic spherical interpolation between quaternions [code]pre_a[/code], this vector, [code]b[/code], and [code]post_b[/code], by the given amount [code]weight[/code]. + + + + + + + + + Returns the dot product of two quaternions. + + + + + + + Returns Euler angles (in the YXZ convention: when decomposing, first Z, then X, and Y last) corresponding to the rotation represented by the unit quaternion. Returned vector contains the rotation angles in the format (X angle, Y angle, Z angle). + + + + + + + Returns the inverse of the quaternion. + + + + + + + + + Returns [code]true[/code] if this quaternion and [code]quat[/code] are approximately equal, by running [method @GlobalScope.is_equal_approx] on each component. + + + + + + + Returns whether the quaternion is normalized or not. + + + + + + + Returns the length of the quaternion. + + + + + + + Returns the length of the quaternion, squared. + + + + + + + Returns a copy of the quaternion, normalized to unit length. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Returns the result of the spherical linear interpolation between this quaternion and [code]to[/code] by amount [code]weight[/code]. + [b]Note:[/b] Both quaternions must be normalized. + + + + + + + + + + + Returns the result of the spherical linear interpolation between this quaternion and [code]to[/code] by amount [code]weight[/code], but without checking if the rotation path is not bigger than 90 degrees. + + + + + + W component of the quaternion (real part). + Quaternion components should usually not be manipulated directly. + + + X component of the quaternion (imaginary [code]i[/code] axis part). + Quaternion components should usually not be manipulated directly. + + + Y component of the quaternion (imaginary [code]j[/code] axis part). + Quaternion components should usually not be manipulated directly. + + + Z component of the quaternion (imaginary [code]k[/code] axis part). + Quaternion components should usually not be manipulated directly. + + + + + The identity quaternion, representing no rotation. Equivalent to an identity [Basis] matrix. If a vector is transformed by an identity quaternion, it will not change. + + + diff --git a/doc/classes/Vector3.xml b/doc/classes/Vector3.xml index fdddddee28..b6effd441b 100644 --- a/doc/classes/Vector3.xml +++ b/doc/classes/Vector3.xml @@ -286,7 +286,7 @@ - + diff --git a/doc/classes/float.xml b/doc/classes/float.xml index 11f6d91b05..f75c130039 100644 --- a/doc/classes/float.xml +++ b/doc/classes/float.xml @@ -113,12 +113,12 @@ - + - + - Multiplies each component of the [Quat] by the given [float]. + Multiplies each component of the [Quaternion] by the given [float]. diff --git a/doc/classes/int.xml b/doc/classes/int.xml index 119cdf8eeb..b0ad963998 100644 --- a/doc/classes/int.xml +++ b/doc/classes/int.xml @@ -183,9 +183,9 @@ - + - + Multiplies each component of the quaternion by the given integer. -- cgit v1.2.3