diff options
Diffstat (limited to 'doc/classes/Vector3.xml')
-rw-r--r-- | doc/classes/Vector3.xml | 76 |
1 files changed, 33 insertions, 43 deletions
diff --git a/doc/classes/Vector3.xml b/doc/classes/Vector3.xml index 62d467c505..1653b66003 100644 --- a/doc/classes/Vector3.xml +++ b/doc/classes/Vector3.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Vector3" version="4.0"> +<class name="Vector3" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> Vector used for 3D math using floating point coordinates. </brief_description> @@ -86,7 +86,7 @@ <return type="Vector3" /> <argument index="0" name="with" type="Vector3" /> <description> - Returns the cross product of this vector and [code]b[/code]. + Returns the cross product of this vector and [code]with[/code]. </description> </method> <method name="cubic_interpolate" qualifiers="const"> @@ -96,36 +96,36 @@ <argument index="2" name="post_b" type="Vector3" /> <argument index="3" name="weight" type="float" /> <description> - Performs a cubic interpolation between vectors [code]pre_a[/code], [code]a[/code], [code]b[/code], [code]post_b[/code] ([code]a[/code] is current), by the given amount [code]weight[/code]. [code]weight[/code] is on the range of 0.0 to 1.0, representing the amount of interpolation. + Performs a cubic interpolation between this vector and [code]b[/code] using [code]pre_a[/code] and [code]post_b[/code] as handles, and returns the result at position [code]weight[/code]. [code]weight[/code] is on the range of 0.0 to 1.0, representing the amount of interpolation. </description> </method> <method name="direction_to" qualifiers="const"> <return type="Vector3" /> - <argument index="0" name="b" type="Vector3" /> + <argument index="0" name="to" type="Vector3" /> <description> - Returns the normalized vector pointing from this vector to [code]b[/code]. This is equivalent to using [code](b - a).normalized()[/code]. + Returns the normalized vector pointing from this vector to [code]to[/code]. This is equivalent to using [code](b - a).normalized()[/code]. </description> </method> <method name="distance_squared_to" qualifiers="const"> <return type="float" /> - <argument index="0" name="b" type="Vector3" /> + <argument index="0" name="to" type="Vector3" /> <description> - Returns the squared distance between this vector and [code]b[/code]. + Returns the squared distance between this vector and [code]to[/code]. This method runs faster than [method distance_to], so prefer it if you need to compare vectors or need the squared distance for some formula. </description> </method> <method name="distance_to" qualifiers="const"> <return type="float" /> - <argument index="0" name="b" type="Vector3" /> + <argument index="0" name="to" type="Vector3" /> <description> - Returns the distance between this vector and [code]b[/code]. + Returns the distance between this vector and [code]to[/code]. </description> </method> <method name="dot" qualifiers="const"> <return type="float" /> <argument index="0" name="with" type="Vector3" /> <description> - Returns the dot product of this vector and [code]b[/code]. This can be used to compare the angle between two vectors. For example, this can be used to determine whether an enemy is facing the player. + Returns the dot product of this vector and [code]with[/code]. This can be used to compare the angle between two vectors. For example, this can be used to determine whether an enemy is facing the player. The dot product will be [code]0[/code] for a straight angle (90 degrees), greater than 0 for angles narrower than 90 degrees and lower than 0 for angles wider than 90 degrees. When using unit (normalized) vectors, the result will always be between [code]-1.0[/code] (180 degree angle) when the vectors are facing opposite directions, and [code]1.0[/code] (0 degree angle) when the vectors are aligned. [b]Note:[/b] [code]a.dot(b)[/code] is equivalent to [code]b.dot(a)[/code]. @@ -184,16 +184,16 @@ Returns the vector with a maximum length by limiting its length to [code]length[/code]. </description> </method> - <method name="max_axis" qualifiers="const"> + <method name="max_axis_index" qualifiers="const"> <return type="int" /> <description> - Returns the axis of the vector's largest value. See [code]AXIS_*[/code] constants. If all components are equal, this method returns [constant AXIS_X]. + Returns the axis of the vector's highest value. See [code]AXIS_*[/code] constants. If all components are equal, this method returns [constant AXIS_X]. </description> </method> - <method name="min_axis" qualifiers="const"> + <method name="min_axis_index" qualifiers="const"> <return type="int" /> <description> - Returns the axis of the vector's smallest value. See [code]AXIS_*[/code] constants. If all components are equal, this method returns [constant AXIS_Z]. + Returns the axis of the vector's lowest value. See [code]AXIS_*[/code] constants. If all components are equal, this method returns [constant AXIS_Z]. </description> </method> <method name="move_toward" qualifiers="const"> @@ -201,7 +201,7 @@ <argument index="0" name="to" type="Vector3" /> <argument index="1" name="delta" type="float" /> <description> - Moves this vector toward [code]to[/code] by the fixed [code]delta[/code] amount. + Returns a new vector moved toward [code]to[/code] by the fixed [code]delta[/code] amount. Will not go past the final value. </description> </method> <method name="normalized" qualifiers="const"> @@ -225,7 +225,7 @@ <return type="Basis" /> <argument index="0" name="with" type="Vector3" /> <description> - Returns the outer product with [code]b[/code]. + Returns the outer product with [code]with[/code]. </description> </method> <method name="posmod" qualifiers="const"> @@ -246,7 +246,7 @@ <return type="Vector3" /> <argument index="0" name="b" type="Vector3" /> <description> - Returns this vector projected onto another vector [code]b[/code]. + Returns this vector projected onto the vector [code]b[/code]. </description> </method> <method name="reflect" qualifiers="const"> @@ -267,13 +267,13 @@ <method name="round" qualifiers="const"> <return type="Vector3" /> <description> - Returns this vector with all components rounded to the nearest integer, with halfway cases rounded away from zero. + Returns a new vector with all components rounded to the nearest integer, with halfway cases rounded away from zero. </description> </method> <method name="sign" qualifiers="const"> <return type="Vector3" /> <description> - Returns a vector with each component set to one or negative one, depending on the signs of this vector's components, or zero if the component is zero, by calling [method @GlobalScope.sign] on each component. + Returns a new vector with each component set to one or negative one, depending on the signs of the components, or zero if the component is zero, by calling [method @GlobalScope.sign] on each component. </description> </method> <method name="signed_angle_to" qualifiers="const"> @@ -290,7 +290,7 @@ <argument index="1" name="weight" type="float" /> <description> Returns the result of spherical linear interpolation between this vector and [code]to[/code], by amount [code]weight[/code]. [code]weight[/code] is on the range of 0.0 to 1.0, representing the amount of interpolation. - [b]Note:[/b] Both vectors must be normalized. + This method also handles interpolating the lengths if the input vectors have different lengths. For the special case of one or both input vectors having zero length, this method behaves like [method lerp]. </description> </method> <method name="slide" qualifiers="const"> @@ -321,13 +321,13 @@ </members> <constants> <constant name="AXIS_X" value="0"> - Enumerated value for the X axis. Returned by [method max_axis] and [method min_axis]. + Enumerated value for the X axis. Returned by [method max_axis_index] and [method min_axis_index]. </constant> <constant name="AXIS_Y" value="1"> - Enumerated value for the Y axis. Returned by [method max_axis] and [method min_axis]. + Enumerated value for the Y axis. Returned by [method max_axis_index] and [method min_axis_index]. </constant> <constant name="AXIS_Z" value="2"> - Enumerated value for the Z axis. Returned by [method max_axis] and [method min_axis]. + Enumerated value for the Z axis. Returned by [method max_axis_index] and [method min_axis_index]. </constant> <constant name="ZERO" value="Vector3(0, 0, 0)"> Zero vector, a vector with all components set to [code]0[/code]. @@ -360,11 +360,6 @@ <operators> <operator name="operator !="> <return type="bool" /> - <description> - </description> - </operator> - <operator name="operator !="> - <return type="bool" /> <argument index="0" name="right" type="Vector3" /> <description> Returns [code]true[/code] if the vectors are not equal. @@ -373,16 +368,6 @@ </operator> <operator name="operator *"> <return type="Vector3" /> - <argument index="0" name="right" type="Vector3" /> - <description> - Multiplies each component of the [Vector3] by the components of the given [Vector3]. - [codeblock] - print(Vector3(10, 20, 30) * Vector3(3, 4, 5)) # Prints "(30, 80, 150)" - [/codeblock] - </description> - </operator> - <operator name="operator *"> - <return type="Vector3" /> <argument index="0" name="right" type="Basis" /> <description> Inversely transforms (multiplies) the [Vector3] by the given [Basis] matrix. @@ -404,6 +389,16 @@ </operator> <operator name="operator *"> <return type="Vector3" /> + <argument index="0" name="right" type="Vector3" /> + <description> + Multiplies each component of the [Vector3] by the components of the given [Vector3]. + [codeblock] + print(Vector3(10, 20, 30) * Vector3(3, 4, 5)) # Prints "(30, 80, 150)" + [/codeblock] + </description> + </operator> + <operator name="operator *"> + <return type="Vector3" /> <argument index="0" name="right" type="float" /> <description> Multiplies each component of the [Vector3] by the given [float]. @@ -476,11 +471,6 @@ </operator> <operator name="operator =="> <return type="bool" /> - <description> - </description> - </operator> - <operator name="operator =="> - <return type="bool" /> <argument index="0" name="right" type="Vector3" /> <description> Returns [code]true[/code] if the vectors are exactly equal. |