summaryrefslogtreecommitdiff
path: root/doc/classes/PathFollow2D.xml
diff options
context:
space:
mode:
authorBojidar Marinov <bojidar.marinov.bg@gmail.com>2018-01-12 00:38:35 +0200
committerBojidar Marinov <bojidar.marinov.bg@gmail.com>2018-01-12 00:58:22 +0200
commitad79c703008394a360eb9875196a9414e1c84585 (patch)
tree99087c85636f2caf8717e42660017d9beb8a0f1f /doc/classes/PathFollow2D.xml
parent9b8e8b2220b4e2bac3310262d3d1cd7a8eb3b0a5 (diff)
Update docs
[ci skip]
Diffstat (limited to 'doc/classes/PathFollow2D.xml')
-rw-r--r--doc/classes/PathFollow2D.xml142
1 files changed, 27 insertions, 115 deletions
diff --git a/doc/classes/PathFollow2D.xml b/doc/classes/PathFollow2D.xml
index 56bec3d719..eed12b610d 100644
--- a/doc/classes/PathFollow2D.xml
+++ b/doc/classes/PathFollow2D.xml
@@ -12,122 +12,34 @@
<demos>
</demos>
<methods>
- <method name="get_cubic_interpolation" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- This method returns whether the position between two cached points (see [method set_cubic_interpolation]) is interpolated linearly, or cubicly.
- </description>
- </method>
- <method name="get_h_offset" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Returns the horizontal displacement this node has from its parent [Path2D].
- </description>
- </method>
- <method name="get_offset" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Returns the distance along the path in pixels.
- </description>
- </method>
- <method name="get_unit_offset" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Returns the distance along the path as a number in the range 0.0 (for the first vertex) to 1.0 (for the last).
- </description>
- </method>
- <method name="get_v_offset" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Returns the vertical displacement this node has from its parent [Path2D].
- </description>
- </method>
- <method name="has_loop" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Returns whether this node wraps its offsets around, or truncates them to the path ends.
- </description>
- </method>
- <method name="is_rotating" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Returns whether this node rotates to follow the path.
- </description>
- </method>
- <method name="set_cubic_interpolation">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- The points along the [Curve2D] of the [Path2D] are precomputed before use, for faster calculations. The point at the requested offset is then calculated interpolating between two adjacent cached points. This may present a problem if the curve makes sharp turns, as the cached points may not follow the curve closely enough.
- There are two answers to this problem: Either increase the number of cached points and increase memory consumption, or make a cubic interpolation between two points at the cost of (slightly) slower calculations.
- This method controls whether the position between two cached points is interpolated linearly, or cubicly.
- </description>
- </method>
- <method name="set_h_offset">
- <return type="void">
- </return>
- <argument index="0" name="h_offset" type="float">
- </argument>
- <description>
- Moves this node horizontally. As this node's position will be set every time its offset is set, this allows many PathFollow2D to share the same curve (and thus the same movement pattern), yet not return the same position for a given path offset.
- A similar effect may be achieved moving this node's descendants.
- </description>
- </method>
- <method name="set_loop">
- <return type="void">
- </return>
- <argument index="0" name="loop" type="bool">
- </argument>
- <description>
- If set, any offset outside the path's length (whether set by [method set_offset] or [method set_unit_offset] will wrap around, instead of stopping at the ends. Set it for cyclic paths.
- </description>
- </method>
- <method name="set_offset">
- <return type="void">
- </return>
- <argument index="0" name="offset" type="float">
- </argument>
- <description>
- Sets the distance from the first vertex, measured in pixels along the path. This sets this node's position to a point within the path.
- </description>
- </method>
- <method name="set_rotate">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- If set, this node rotates to follow the path, making its descendants rotate.
- </description>
- </method>
- <method name="set_unit_offset">
- <return type="void">
- </return>
- <argument index="0" name="unit_offset" type="float">
- </argument>
- <description>
- Sets the distance from the first vertex, considering 0.0 as the first vertex and 1.0 as the last. This is just another way of expressing the offset within the path, as the offset supplied is multiplied internally by the path's length.
- </description>
- </method>
- <method name="set_v_offset">
- <return type="void">
- </return>
- <argument index="0" name="v_offset" type="float">
- </argument>
- <description>
- Moves the PathFollow2D vertically, for the same reasons of [method set_h_offset].
- </description>
- </method>
</methods>
+ <members>
+ <member name="cubic_interp" type="bool" setter="set_cubic_interpolation" getter="get_cubic_interpolation">
+ If [code]true[/code] the position between two cached points is interpolated cubically, and linearly otherwise.
+ The points along the [Curve2D] of the [Path2D] are precomputed before use, for faster calculations. The point at the requested offset is then calculated interpolating between two adjacent cached points. This may present a problem if the curve makes sharp turns, as the cached points may not follow the curve closely enough.
+ There are two answers to this problem: Either increase the number of cached points and increase memory consumption, or make a cubic interpolation between two points at the cost of (slightly) slower calculations.
+ </member>
+ <member name="h_offset" type="float" setter="set_h_offset" getter="get_h_offset">
+ The node's offset along the curve.
+ </member>
+ <member name="lookahead" type="float" setter="set_lookahead" getter="get_lookahead">
+ </member>
+ <member name="loop" type="bool" setter="set_loop" getter="has_loop">
+ If [code]true[/code], any offset outside the path's length will wrap around, instead of stopping at the ends. Use it for cyclic paths.
+ </member>
+ <member name="offset" type="float" setter="set_offset" getter="get_offset">
+ The distance along the path in pixels.
+ </member>
+ <member name="rotate" type="bool" setter="set_rotate" getter="is_rotating">
+ If [code]true[/code], this node rotates to follow the path, making its descendants rotate.
+ </member>
+ <member name="unit_offset" type="float" setter="set_unit_offset" getter="get_unit_offset">
+ The distance along the path as a number in the range 0.0 (for the first vertex) to 1.0 (for the last). This is just another way of expressing the offset within the path, as the offset supplied is multiplied internally by the path's length.
+ </member>
+ <member name="v_offset" type="float" setter="set_v_offset" getter="get_v_offset">
+ The node's offset perpendicular to the curve.
+ </member>
+ </members>
<constants>
</constants>
</class>