From 03e2508e45dac88010dcf97d62d471b435ba4f41 Mon Sep 17 00:00:00 2001 From: Grosskopf Date: Sun, 22 Oct 2017 22:43:35 +0200 Subject: Added various docs, mostly mathematical basics --- doc/classes/Curve2D.xml | 3 +++ doc/classes/Node2D.xml | 36 +++++++++++++++++++----------------- doc/classes/Path2D.xml | 5 +++-- doc/classes/Quat.xml | 15 +++++++++++++-- doc/classes/Rect2.xml | 24 +++++++++++++----------- doc/classes/Rect3.xml | 43 ++++++++++++++++++++++--------------------- doc/classes/Vector3.xml | 23 ++++++++++++----------- 7 files changed, 85 insertions(+), 64 deletions(-) diff --git a/doc/classes/Curve2D.xml b/doc/classes/Curve2D.xml index 4362887be3..99ec2b7d94 100644 --- a/doc/classes/Curve2D.xml +++ b/doc/classes/Curve2D.xml @@ -32,6 +32,7 @@ + Removes all points from the curve. @@ -191,8 +192,10 @@ + The points describing the curve. Value is a [Dictionary] with the keys [code]in[/code], [code]out[/code], and [code]pos[/code]. The key pos is the position of a vertex of the curve, the key in is the vector from that position to the control point before this vertex, the key out is the vector from that position to the controlpoint after this vertex. + The distance in pixels between two adjacent cached points. Changing it forces the cache to be recomputed the next time the [method get_baked_points] or [method get_baked_length] function is called. The smaller the distance, the more points in the cache and the more memory it will consume, so use with care. diff --git a/doc/classes/Node2D.xml b/doc/classes/Node2D.xml index 084bee92df..b00020b227 100644 --- a/doc/classes/Node2D.xml +++ b/doc/classes/Node2D.xml @@ -26,7 +26,7 @@ - Set the pivot position of the 2D node to 'pivot' value. Only some Node2Ds implement this method. + Sets the node's pivot position. @@ -143,7 +143,7 @@ - Apply a local translation on the node's X axis based on the process's 'delta'. If 'scaled' is false, normalizes the movement. + Applies a local translation on the node's X axis based on the [method Node._process]'s [code]delta[/code]. If [code]scaled[/code] is false, normalizes the movement. @@ -154,7 +154,7 @@ - Apply a local translation on the node's Y axis based on the process's 'delta'. If 'scaled' is false, normalizes the movement. + Applies a local translation on the node's Y axis based on the [method Node._process]'s [code]delta[/code]. If [code]scaled[/code] is false, normalizes the movement. @@ -163,7 +163,7 @@ - Apply a rotation to the node, in radians, starting from its current rotation. + Applies a rotation to the node, in radians, starting from its current rotation. @@ -172,7 +172,7 @@ - Set the node's global position. + Sets the node's global position. @@ -181,7 +181,7 @@ - Set the node's global rotation in radians. + Sets the node's global rotation in radians. @@ -190,7 +190,7 @@ - Set the node's global rotation in degrees. + Sets the node's global rotation in degrees. @@ -199,7 +199,7 @@ - Set the node's global scale. + Sets the node's global scale. @@ -208,7 +208,7 @@ - Set the node's global [Transform2D]. + Sets the node's global [Transform2D]. @@ -217,7 +217,7 @@ - Set the node's position. + Sets the node's position. @@ -226,7 +226,7 @@ - Set the node's rotation in radians. + Sets the node's rotation in radians. @@ -235,7 +235,7 @@ - Set the node's rotation in degrees. + Sets the node's rotation in degrees. @@ -244,7 +244,7 @@ - Set the node's scale. + Sets the node's scale. @@ -253,7 +253,7 @@ - Set the node's local [Transform2D]. + Sets the node's local [Transform2D]. @@ -262,7 +262,7 @@ - Set the node's Z-index. + Sets the node's Z-index. @@ -271,7 +271,7 @@ - Make the node's Z-index relative to its parent's Z-index. If this node's Z-index is 2 and its parent's effective Z-index is 3, then this node's effective Z-index will be 2 + 3 = 5. + Makes the node's Z-index relative to its parent's Z-index. If this node's Z-index is 2 and its parent's effective Z-index is 3, then this node's effective Z-index will be 2 + 3 = 5. @@ -280,6 +280,7 @@ + Converts a local point's coordinates to global coordinates. @@ -288,6 +289,7 @@ + Converts a global point's coordinates to local coordinates. @@ -296,7 +298,7 @@ - Translate the node locally by the 'offset' vector, starting from its current local position. + Translates the node by the given [code]offset[/code] in local coordinates. diff --git a/doc/classes/Path2D.xml b/doc/classes/Path2D.xml index 839e617375..722e0c1240 100644 --- a/doc/classes/Path2D.xml +++ b/doc/classes/Path2D.xml @@ -1,10 +1,10 @@ - Container for a [Curve2D]. + Contains a [Curve2D] path for [PathFollow2D] nodes to follow. - This class is a container/Node-ification of a [Curve2D], so it can have [Node2D] properties and [Node] info. + Can have [PathFollow2D] child-nodes moving along the [Curve2D]. See [PathFollow2D] for more information on this usage. @@ -30,6 +30,7 @@ + A [Curve2D] describing the path. diff --git a/doc/classes/Quat.xml b/doc/classes/Quat.xml index f07e143aa0..d351cdfbc0 100644 --- a/doc/classes/Quat.xml +++ b/doc/classes/Quat.xml @@ -4,7 +4,10 @@ Quaternion. - 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. + A 4-dimensional vector representing a rotation. + The vector represents a 4 dimensional complex number where multiplication of the basis elements is not commutative (multiplying i with j gives a different result than multiplying j with i). + Multiplying quaternions reproduces rotation sequences. However quaternions need to be often renormalized, or else they suffer from precision issues. + It can be used to perform SLERP (spherical-linear interpolation) between two rotations. @@ -23,6 +26,7 @@ + Returns a quaternion defined by these values. @@ -57,6 +61,7 @@ + Performs a cubic spherical-linear interpolation with another quaternion. @@ -111,7 +116,7 @@ - Perform a spherical-linear interpolation with another quaternion. + Performs a spherical-linear interpolation with another quaternion. @@ -122,6 +127,7 @@ + Performs a spherical-linear interpolation with another quaterion without checking if the rotation path is not bigger than 90°. @@ -130,17 +136,22 @@ + Transforms the vector [code]v[/code] by this quaternion. + W component of the quaternion. Default value: [code]1[/code] + X component of the quaternion. Default value: [code]0[/code] + Y component of the quaternion. Default value: [code]0[/code] + Z component of the quaternion. Default value: [code]0[/code] diff --git a/doc/classes/Rect2.xml b/doc/classes/Rect2.xml index 13b786908e..5af8c82a7b 100644 --- a/doc/classes/Rect2.xml +++ b/doc/classes/Rect2.xml @@ -4,7 +4,7 @@ 2D Axis-aligned bounding box. - Rect2 provides an 2D Axis-Aligned Bounding Box. It consists of a position, a size, and several utility functions. It is typically used for fast overlap tests. + Rect2 consists of a position, a size, and several utility functions. It is typically used for fast overlap tests. @@ -19,7 +19,7 @@ - Construct a [code]Rect2[/code] by position and size. + Constructs a [code]Rect2[/code] by position and size. @@ -34,7 +34,7 @@ - Construct a [code]Rect2[/code] by x, y, width and height. + Constructs a [code]Rect2[/code] by x, y, width, and height. @@ -52,7 +52,7 @@ - Returns true if this [code]Rect2[/code] completely encloses another one. + Returns [code]true[/code] if this [code]Rect2[/code] completely encloses another one. @@ -61,14 +61,14 @@ - Return this [code]Rect2[/code] expanded to include a given point. + Returns this [code]Rect2[/code] expanded to include a given point. - Get the area of the [code]Rect2[/code]. + Returns the area of the [code]Rect2[/code]. @@ -77,7 +77,7 @@ - Return a copy of the [code]Rect2[/code] grown a given amount of units towards all the sides. + Returns a copy of the [code]Rect2[/code] grown a given amount of units towards all the sides. @@ -92,6 +92,7 @@ + Returns a copy of the [code]Rect2[/code] grown a given amount of units towards each direction individually. @@ -102,13 +103,14 @@ + Returns a copy of the [code]Rect2[/code] grown a given amount of units towards the [Margin] direction. - Return true if the [code]Rect2[/code] is flat or empty. + Returns [code]true[/code] if the [code]Rect2[/code] is flat or empty. @@ -117,7 +119,7 @@ - Return true if the [code]Rect2[/code] contains a point. + Returns [code]true[/code] if the [code]Rect2[/code] contains a point. @@ -126,7 +128,7 @@ - Return true if the [code]Rect2[/code] overlaps with another. + Returns [code]true[/code] if the [code]Rect2[/code] overlaps with another. @@ -135,7 +137,7 @@ - Combine this [code]Rect2[/code] with another, a larger one is returned that contains both. + Returns a larger Rect2 that contains this Rect2 and [code]with[/code]. diff --git a/doc/classes/Rect3.xml b/doc/classes/Rect3.xml index 7adf4377aa..a56dac57c7 100644 --- a/doc/classes/Rect3.xml +++ b/doc/classes/Rect3.xml @@ -4,7 +4,7 @@ Axis-Aligned Bounding Box. - Rect3 provides an 3D Axis-Aligned Bounding Box. It consists of a position, a size, and several utility functions. It is typically used for simple (fast) overlap tests. + Rect3 consists of a position, a size, and several utility functions. It is typically used for fast overlap tests. @@ -28,7 +28,7 @@ - Return true if this [code]Rect3[/code] completely encloses another one. + Returns [code]true[/code] if this [code]Rect3[/code] completely encloses another one. @@ -37,14 +37,14 @@ - Return this [code]Rect3[/code] expanded to include a given point. + Returns this [code]Rect3[/code] expanded to include a given point. - Get the area of the [code]Rect3[/code]. + Gets the area of the [code]Rect3[/code]. @@ -53,49 +53,49 @@ - Get the position of the 8 endpoints of the [code]Rect3[/code] in space. + Gets the position of the 8 endpoints of the [code]Rect3[/code] in space. - Return the normalized longest axis of the [code]Rect3[/code]. + Returns the normalized longest axis of the [code]Rect3[/code]. - Return the index of the longest axis of the [code]Rect3[/code] (according to [Vector3]::AXIS* enum). + Returns the index of the longest axis of the [code]Rect3[/code] (according to [Vector3]::AXIS* enum). - Return the scalar length of the longest axis of the [code]Rect3[/code]. + Returns the scalar length of the longest axis of the [code]Rect3[/code]. - Return the normalized shortest axis of the [code]Rect3[/code]. + Returns the normalized shortest axis of the [code]Rect3[/code]. - Return the index of the shortest axis of the [code]Rect3[/code] (according to [Vector3]::AXIS* enum). + Returns the index of the shortest axis of the [code]Rect3[/code] (according to [Vector3]::AXIS* enum). - Return the scalar length of the shortest axis of the [code]Rect3[/code]. + Returns the scalar length of the shortest axis of the [code]Rect3[/code]. @@ -104,7 +104,7 @@ - Return the support point in a given direction. This is useful for collision detection algorithms. + Returns the support point in a given direction. This is useful for collision detection algorithms. @@ -113,21 +113,21 @@ - Return a copy of the [code]Rect3[/code] grown a given amount of units towards all the sides. + Returns a copy of the [code]Rect3[/code] grown a given amount of units towards all the sides. - Return true if the [code]Rect3[/code] is flat or empty. + Returns [code]true[/code] if the [code]Rect3[/code] is flat or empty. - Return true if the [code]Rect3[/code] is empty. + Returns [code]true[/code] if the [code]Rect3[/code] is empty. @@ -136,7 +136,7 @@ - Return true if the [code]Rect3[/code] contains a point. + Returns [code]true[/code] if the [code]Rect3[/code] contains a point. @@ -145,7 +145,7 @@ - Return the intersection between two [code]Rect3[/code]. An empty Rect3 (size 0,0,0) is returned on failure. + Returns the intersection between two [code]Rect3[/code]. An empty Rect3 (size 0,0,0) is returned on failure. @@ -154,7 +154,7 @@ - Return true if the [code]Rect3[/code] overlaps with another. + Returns [code]true[/code] if the [code]Rect3[/code] overlaps with another. @@ -163,7 +163,7 @@ - Return true if the [code]Rect3[/code] is at both sides of a plane. + Returns [code]true[/code] if the [code]Rect3[/code] is on both sides of a plane. @@ -174,7 +174,7 @@ - Return true if the [code]Rect3[/code] intersects the line segment between from and to + Returns [code]true[/code] if the [code]Rect3[/code] intersects the line segment between [code]from[/code] and [code]to[/code]. @@ -183,7 +183,7 @@ - Combine this [code]Rect3[/code] with another, a larger one is returned that contains both. + Returns a larger Rect3 that contains this Rect3 and [code]with[/code]. @@ -192,6 +192,7 @@ Ending corner. + Beginning corner. Size from position to end. diff --git a/doc/classes/Vector3.xml b/doc/classes/Vector3.xml index fdbdabafd3..a05bc5db9a 100644 --- a/doc/classes/Vector3.xml +++ b/doc/classes/Vector3.xml @@ -37,6 +37,7 @@ + Returns the vector's minimum angle to the vector [code]to[/code]. @@ -61,7 +62,7 @@ - Return the cross product with b. + Returns the cross product with [code]b[/code]. @@ -76,7 +77,7 @@ - Perform a cubic interpolation between vectors pre_a, a, b, post_b (a is current), by the given amount (t). + 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 (t). @@ -85,7 +86,7 @@ - Return the squared distance (distance minus the last square root) to b. Prefer this function over distance_to if you need to sort vectors or need the squared distance for some formula. + Returns the squared distance to [code]b[/code]. Prefer this function over distance_to if you need to sort vectors or need the squared distance for some formula. @@ -94,7 +95,7 @@ - Return the distance to b. + Returns the distance to b. @@ -103,7 +104,7 @@ - Return the dot product with b. + Returns the dot product with b. @@ -131,14 +132,14 @@ - Return the length of the vector. + Returns the length of the vector. - Return the length of the vector, squared. Prefer this function over "length" if you need to sort vectors or need the squared length for some formula. + Returns the length of the vector, squared. Prefer this function over "length" if you need to sort vectors or need the squared length for some formula. @@ -170,7 +171,7 @@ - Return a copy of the normalized vector to unit length. This is the same as v / v.length(). + Returns a copy of the normalized vector to unit length. This is the same as v / v.length(). @@ -179,7 +180,7 @@ - Return the outer product with b. + Returns the outer product with b. @@ -217,14 +218,14 @@ - Return a copy of the vector, snapped to the lowest neared multiple. + Returns a copy of the vector, snapped to the lowest neared multiple. - Return a diagonal matrix with the vector as main diagonal. + Returns a diagonal matrix with the vector as main diagonal. -- cgit v1.2.3