summaryrefslogtreecommitdiff
path: root/doc/classes/Quaternion.xml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/classes/Quaternion.xml')
-rw-r--r--doc/classes/Quaternion.xml213
1 files changed, 79 insertions, 134 deletions
diff --git a/doc/classes/Quaternion.xml b/doc/classes/Quaternion.xml
index 678fb0d44d..720188f67e 100644
--- a/doc/classes/Quaternion.xml
+++ b/doc/classes/Quaternion.xml
@@ -14,269 +14,214 @@
</tutorials>
<methods>
<method name="Quaternion" qualifiers="constructor">
- <return type="Quaternion">
- </return>
+ <return type="Quaternion" />
<description>
Constructs a default-initialized quaternion with all components set to [code]0[/code].
</description>
</method>
<method name="Quaternion" qualifiers="constructor">
- <return type="Quaternion">
- </return>
- <argument index="0" name="from" type="Quaternion">
- </argument>
+ <return type="Quaternion" />
+ <argument index="0" name="from" type="Quaternion" />
<description>
Constructs a [Quaternion] as a copy of the given [Quaternion].
</description>
</method>
<method name="Quaternion" qualifiers="constructor">
- <return type="Quaternion">
- </return>
- <argument index="0" name="arc_from" type="Vector3">
- </argument>
- <argument index="1" name="arc_to" type="Vector3">
- </argument>
+ <return type="Quaternion" />
+ <argument index="0" name="arc_from" type="Vector3" />
+ <argument index="1" name="arc_to" type="Vector3" />
<description>
</description>
</method>
<method name="Quaternion" qualifiers="constructor">
- <return type="Quaternion">
- </return>
- <argument index="0" name="axis" type="Vector3">
- </argument>
- <argument index="1" name="angle" type="float">
- </argument>
+ <return type="Quaternion" />
+ <argument index="0" name="axis" type="Vector3" />
+ <argument index="1" name="angle" type="float" />
<description>
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="Quaternion" qualifiers="constructor">
- <return type="Quaternion">
- </return>
- <argument index="0" name="euler" type="Vector3">
- </argument>
+ <return type="Quaternion" />
+ <argument index="0" name="euler" type="Vector3" />
<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="Quaternion" qualifiers="constructor">
- <return type="Quaternion">
- </return>
- <argument index="0" name="from" type="Basis">
- </argument>
+ <return type="Quaternion" />
+ <argument index="0" name="from" type="Basis" />
<description>
Constructs a quaternion from the given [Basis].
</description>
</method>
<method name="Quaternion" qualifiers="constructor">
- <return type="Quaternion">
- </return>
- <argument index="0" name="x" type="float">
- </argument>
- <argument index="1" name="y" type="float">
- </argument>
- <argument index="2" name="z" type="float">
- </argument>
- <argument index="3" name="w" type="float">
- </argument>
+ <return type="Quaternion" />
+ <argument index="0" name="x" type="float" />
+ <argument index="1" name="y" type="float" />
+ <argument index="2" name="z" type="float" />
+ <argument index="3" name="w" type="float" />
<description>
Constructs a quaternion defined by the given values.
</description>
</method>
+ <method name="angle_to" qualifiers="const">
+ <return type="float" />
+ <argument index="0" name="to" type="Quaternion" />
+ <description>
+ Returns the angle between this quaternion and [code]to[/code]. This is the magnitude of the angle you would need to rotate by to get from one to the other.
+ [b]Note:[/b] This method has an abnormally high amount of floating-point error, so methods such as [code]is_zero_approx[/code] will not work reliably.
+ </description>
+ </method>
<method name="cubic_slerp" qualifiers="const">
- <return type="Quaternion">
- </return>
- <argument index="0" name="b" type="Quaternion">
- </argument>
- <argument index="1" name="pre_a" type="Quaternion">
- </argument>
- <argument index="2" name="post_b" type="Quaternion">
- </argument>
- <argument index="3" name="weight" type="float">
- </argument>
+ <return type="Quaternion" />
+ <argument index="0" name="b" type="Quaternion" />
+ <argument index="1" name="pre_a" type="Quaternion" />
+ <argument index="2" name="post_b" type="Quaternion" />
+ <argument index="3" name="weight" type="float" />
<description>
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" qualifiers="const">
- <return type="float">
- </return>
- <argument index="0" name="with" type="Quaternion">
- </argument>
+ <return type="float" />
+ <argument index="0" name="with" type="Quaternion" />
<description>
Returns the dot product of two quaternions.
</description>
</method>
<method name="get_euler" qualifiers="const">
- <return type="Vector3">
- </return>
+ <return type="Vector3" />
<description>
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).
</description>
</method>
<method name="inverse" qualifiers="const">
- <return type="Quaternion">
- </return>
+ <return type="Quaternion" />
<description>
Returns the inverse of the quaternion.
</description>
</method>
<method name="is_equal_approx" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="to" type="Quaternion">
- </argument>
+ <return type="bool" />
+ <argument index="0" name="to" type="Quaternion" />
<description>
Returns [code]true[/code] if this quaternion and [code]quat[/code] are approximately equal, by running [method @GlobalScope.is_equal_approx] on each component.
</description>
</method>
<method name="is_normalized" qualifiers="const">
- <return type="bool">
- </return>
+ <return type="bool" />
<description>
Returns whether the quaternion is normalized or not.
</description>
</method>
<method name="length" qualifiers="const">
- <return type="float">
- </return>
+ <return type="float" />
<description>
Returns the length of the quaternion.
</description>
</method>
<method name="length_squared" qualifiers="const">
- <return type="float">
- </return>
+ <return type="float" />
<description>
Returns the length of the quaternion, squared.
</description>
</method>
<method name="normalized" qualifiers="const">
- <return type="Quaternion">
- </return>
+ <return type="Quaternion" />
<description>
Returns a copy of the quaternion, normalized to unit length.
</description>
</method>
<method name="operator !=" qualifiers="operator">
- <return type="bool">
- </return>
- <argument index="0" name="right" type="Quaternion">
- </argument>
+ <return type="bool" />
+ <argument index="0" name="right" type="Quaternion" />
<description>
</description>
</method>
<method name="operator *" qualifiers="operator">
- <return type="Quaternion">
- </return>
- <argument index="0" name="right" type="Quaternion">
- </argument>
+ <return type="Vector3" />
+ <argument index="0" name="right" type="Vector3" />
<description>
</description>
</method>
<method name="operator *" qualifiers="operator">
- <return type="Vector3">
- </return>
- <argument index="0" name="right" type="Vector3">
- </argument>
+ <return type="Quaternion" />
+ <argument index="0" name="right" type="Quaternion" />
<description>
</description>
</method>
<method name="operator *" qualifiers="operator">
- <return type="Quaternion">
- </return>
- <argument index="0" name="right" type="float">
- </argument>
+ <return type="Quaternion" />
+ <argument index="0" name="right" type="float" />
<description>
</description>
</method>
<method name="operator *" qualifiers="operator">
- <return type="Quaternion">
- </return>
- <argument index="0" name="right" type="int">
- </argument>
+ <return type="Quaternion" />
+ <argument index="0" name="right" type="int" />
<description>
</description>
</method>
<method name="operator +" qualifiers="operator">
- <return type="Quaternion">
- </return>
+ <return type="Quaternion" />
+ <argument index="0" name="right" type="Quaternion" />
<description>
</description>
</method>
- <method name="operator +" qualifiers="operator">
- <return type="Quaternion">
- </return>
- <argument index="0" name="right" type="Quaternion">
- </argument>
+ <method name="operator -" qualifiers="operator">
+ <return type="Quaternion" />
+ <argument index="0" name="right" type="Quaternion" />
<description>
</description>
</method>
- <method name="operator -" qualifiers="operator">
- <return type="Quaternion">
- </return>
+ <method name="operator /" qualifiers="operator">
+ <return type="Quaternion" />
+ <argument index="0" name="right" type="float" />
<description>
</description>
</method>
- <method name="operator -" qualifiers="operator">
- <return type="Quaternion">
- </return>
- <argument index="0" name="right" type="Quaternion">
- </argument>
+ <method name="operator /" qualifiers="operator">
+ <return type="Quaternion" />
+ <argument index="0" name="right" type="int" />
<description>
</description>
</method>
- <method name="operator /" qualifiers="operator">
- <return type="Quaternion">
- </return>
- <argument index="0" name="right" type="float">
- </argument>
+ <method name="operator ==" qualifiers="operator">
+ <return type="bool" />
+ <argument index="0" name="right" type="Quaternion" />
<description>
</description>
</method>
- <method name="operator /" qualifiers="operator">
- <return type="Quaternion">
- </return>
- <argument index="0" name="right" type="int">
- </argument>
+ <method name="operator []" qualifiers="operator">
+ <return type="float" />
+ <argument index="0" name="index" type="int" />
<description>
</description>
</method>
- <method name="operator ==" qualifiers="operator">
- <return type="bool">
- </return>
- <argument index="0" name="right" type="Quaternion">
- </argument>
+ <method name="operator unary+" qualifiers="operator">
+ <return type="Quaternion" />
<description>
</description>
</method>
- <method name="operator []" qualifiers="operator">
- <return type="float">
- </return>
- <argument index="0" name="index" type="int">
- </argument>
+ <method name="operator unary-" qualifiers="operator">
+ <return type="Quaternion" />
<description>
</description>
</method>
<method name="slerp" qualifiers="const">
- <return type="Quaternion">
- </return>
- <argument index="0" name="to" type="Quaternion">
- </argument>
- <argument index="1" name="weight" type="float">
- </argument>
+ <return type="Quaternion" />
+ <argument index="0" name="to" type="Quaternion" />
+ <argument index="1" name="weight" type="float" />
<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" qualifiers="const">
- <return type="Quaternion">
- </return>
- <argument index="0" name="to" type="Quaternion">
- </argument>
- <argument index="1" name="weight" type="float">
- </argument>
+ <return type="Quaternion" />
+ <argument index="0" name="to" type="Quaternion" />
+ <argument index="1" name="weight" type="float" />
<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>
@@ -301,7 +246,7 @@
</member>
</members>
<constants>
- <constant name="IDENTITY" value="Quaternion( 0, 0, 0, 1 )">
+ <constant name="IDENTITY" value="Quaternion(0, 0, 0, 1)">
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.
</constant>
</constants>