summaryrefslogtreecommitdiff
path: root/doc/classes/Quat.xml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/classes/Quat.xml')
-rw-r--r--doc/classes/Quat.xml168
1 files changed, 133 insertions, 35 deletions
diff --git a/doc/classes/Quat.xml b/doc/classes/Quat.xml
index 2218852dae..ef83ae7fb9 100644
--- a/doc/classes/Quat.xml
+++ b/doc/classes/Quat.xml
@@ -10,27 +10,36 @@
</description>
<tutorials>
<link title="Using 3D transforms">https://docs.godotengine.org/en/latest/tutorials/3d/using_transforms.html#interpolating-with-quaternions</link>
+ <link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
</tutorials>
<methods>
- <method name="Quat">
+ <method name="Quat" qualifiers="constructor">
<return type="Quat">
</return>
- <argument index="0" name="from" type="Basis">
+ <description>
+ Constructs a default-initialized quaternion with all components set to [code]0[/code].
+ </description>
+ </method>
+ <method name="Quat" qualifiers="constructor">
+ <return type="Quat">
+ </return>
+ <argument index="0" name="from" type="Quat">
</argument>
<description>
- Constructs a quaternion from the given [Basis].
+ Constructs a [Quat] as a copy of the given [Quat].
</description>
</method>
- <method name="Quat">
+ <method name="Quat" qualifiers="constructor">
<return type="Quat">
</return>
- <argument index="0" name="euler" type="Vector3">
+ <argument index="0" name="arc_from" type="Vector3">
+ </argument>
+ <argument index="1" name="arc_to" type="Vector3">
</argument>
<description>
- 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).
</description>
</method>
- <method name="Quat">
+ <method name="Quat" qualifiers="constructor">
<return type="Quat">
</return>
<argument index="0" name="axis" type="Vector3">
@@ -41,7 +50,25 @@
Constructs a quaternion that will rotate around the given axis by the specified angle. The axis must be a normalized vector.
</description>
</method>
- <method name="Quat">
+ <method name="Quat" qualifiers="constructor">
+ <return type="Quat">
+ </return>
+ <argument index="0" name="euler" type="Vector3">
+ </argument>
+ <description>
+ 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).
+ </description>
+ </method>
+ <method name="Quat" qualifiers="constructor">
+ <return type="Quat">
+ </return>
+ <argument index="0" name="from" type="Basis">
+ </argument>
+ <description>
+ Constructs a quaternion from the given [Basis].
+ </description>
+ </method>
+ <method name="Quat" qualifiers="constructor">
<return type="Quat">
</return>
<argument index="0" name="x" type="float">
@@ -65,16 +92,16 @@
</argument>
<argument index="2" name="post_b" type="Quat">
</argument>
- <argument index="3" name="t" type="float">
+ <argument index="3" name="weight" type="float">
</argument>
<description>
- Performs a cubic spherical interpolation between quaternions [code]preA[/code], this vector, [code]b[/code], and [code]postB[/code], by the given amount [code]t[/code].
+ 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].
</description>
</method>
<method name="dot">
<return type="float">
</return>
- <argument index="0" name="b" type="Quat">
+ <argument index="0" name="with" type="Quat">
</argument>
<description>
Returns the dot product of two quaternions.
@@ -97,10 +124,10 @@
<method name="is_equal_approx">
<return type="bool">
</return>
- <argument index="0" name="quat" type="Quat">
+ <argument index="0" name="to" type="Quat">
</argument>
<description>
- Returns [code]true[/code] if this quaterion and [code]quat[/code] are approximately equal, by running [method @GDScript.is_equal_approx] on each component.
+ Returns [code]true[/code] if this quaterion and [code]quat[/code] are approximately equal, by running [method @GlobalScope.is_equal_approx] on each component.
</description>
</method>
<method name="is_normalized">
@@ -131,56 +158,127 @@
Returns a copy of the quaternion, normalized to unit length.
</description>
</method>
- <method name="set_axis_angle">
- <return type="void">
+ <method name="operator !=" qualifiers="operator">
+ <return type="bool">
</return>
- <argument index="0" name="axis" type="Vector3">
+ <argument index="0" name="right" type="Quat">
</argument>
- <argument index="1" name="angle" type="float">
+ <description>
+ </description>
+ </method>
+ <method name="operator *" qualifiers="operator">
+ <return type="Quat">
+ </return>
+ <argument index="0" name="right" type="Quat">
</argument>
<description>
- Sets the quaternion to a rotation which rotates around axis by the specified angle, in radians. The axis must be a normalized vector.
</description>
</method>
- <method name="set_euler">
- <return type="void">
+ <method name="operator *" qualifiers="operator">
+ <return type="Vector3">
</return>
- <argument index="0" name="euler" type="Vector3">
+ <argument index="0" name="right" type="Vector3">
</argument>
<description>
- Sets the quaternion to 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).
</description>
</method>
- <method name="slerp">
+ <method name="operator *" qualifiers="operator">
<return type="Quat">
</return>
- <argument index="0" name="b" type="Quat">
+ <argument index="0" name="right" type="float">
</argument>
- <argument index="1" name="t" type="float">
+ <description>
+ </description>
+ </method>
+ <method name="operator *" qualifiers="operator">
+ <return type="Quat">
+ </return>
+ <argument index="0" name="right" type="int">
</argument>
<description>
- 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.
</description>
</method>
- <method name="slerpni">
+ <method name="operator +" qualifiers="operator">
<return type="Quat">
</return>
- <argument index="0" name="b" type="Quat">
+ <description>
+ </description>
+ </method>
+ <method name="operator +" qualifiers="operator">
+ <return type="Quat">
+ </return>
+ <argument index="0" name="right" type="Quat">
</argument>
- <argument index="1" name="t" type="float">
+ <description>
+ </description>
+ </method>
+ <method name="operator -" qualifiers="operator">
+ <return type="Quat">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="operator -" qualifiers="operator">
+ <return type="Quat">
+ </return>
+ <argument index="0" name="right" type="Quat">
</argument>
<description>
- 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.
</description>
</method>
- <method name="xform">
- <return type="Vector3">
+ <method name="operator /" qualifiers="operator">
+ <return type="Quat">
+ </return>
+ <argument index="0" name="right" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="operator /" qualifiers="operator">
+ <return type="Quat">
+ </return>
+ <argument index="0" name="right" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="operator ==" qualifiers="operator">
+ <return type="bool">
</return>
- <argument index="0" name="v" type="Vector3">
+ <argument index="0" name="right" type="Quat">
</argument>
<description>
- Returns a vector transformed (multiplied) by this quaternion.
+ </description>
+ </method>
+ <method name="operator []" qualifiers="operator">
+ <return type="float">
+ </return>
+ <argument index="0" name="index" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="slerp">
+ <return type="Quat">
+ </return>
+ <argument index="0" name="to" type="Quat">
+ </argument>
+ <argument index="1" name="weight" type="float">
+ </argument>
+ <description>
+ 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.
+ </description>
+ </method>
+ <method name="slerpni">
+ <return type="Quat">
+ </return>
+ <argument index="0" name="to" type="Quat">
+ </argument>
+ <argument index="1" name="weight" type="float">
+ </argument>
+ <description>
+ 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.
</description>
</method>
</methods>