summaryrefslogtreecommitdiff
path: root/doc/classes/AStar.xml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/classes/AStar.xml')
-rw-r--r--doc/classes/AStar.xml49
1 files changed, 47 insertions, 2 deletions
diff --git a/doc/classes/AStar.xml b/doc/classes/AStar.xml
index 9b15afbbd4..ceb3c907a6 100644
--- a/doc/classes/AStar.xml
+++ b/doc/classes/AStar.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AStar" inherits="Reference" category="Core" version="3.0.alpha.custom_build">
+<class name="AStar" inherits="Reference" category="Core" version="3.0-alpha">
<brief_description>
AStar class representation that uses vectors as edges.
</brief_description>
@@ -50,6 +50,7 @@
as.add_point(1, Vector3(1,0,0), 4) # Adds the point (1,0,0) with weight_scale=4 and id=1
[/codeblock]
+ If there already exists a point for the given id, its position and weight scale are updated to the given values.
</description>
</method>
<method name="are_points_connected" qualifiers="const">
@@ -107,7 +108,7 @@
<return type="int">
</return>
<description>
- Returns an id with no point associated to it.
+ Returns the next available point id with no point associated to it.
</description>
</method>
<method name="get_closest_point" qualifiers="const">
@@ -167,6 +168,28 @@
If you change the 2nd point's weight to 3, then the result will be [code][1, 4, 3][/code] instead, because now even though the distance is longer, it's "easier" to get through point 4 than through point 2.
</description>
</method>
+ <method name="get_point_connections">
+ <return type="PoolIntArray">
+ </return>
+ <argument index="0" name="arg0" type="int">
+ </argument>
+ <description>
+ Returns an array with the ids of the points that form the connect with the given point.
+ [codeblock]
+ var as = AStar.new()
+
+ as.add_point(1, Vector3(0,0,0))
+ as.add_point(2, Vector3(0,1,0))
+ as.add_point(3, Vector3(1,1,0))
+ as.add_point(4, Vector3(2,0,0))
+
+ as.connect_points(1, 2, true)
+ as.connect_points(1, 3, true)
+
+ var neighbors = as.get_point_connections(1) # returns [2, 3]
+ [/codeblock]
+ </description>
+ </method>
<method name="get_point_path">
<return type="PoolVector3Array">
</return>
@@ -220,6 +243,28 @@
Removes the point associated with the given id from the points pool.
</description>
</method>
+ <method name="set_point_position">
+ <return type="void">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <argument index="1" name="position" type="Vector3">
+ </argument>
+ <description>
+ Sets the position for the point with the given id.
+ </description>
+ </method>
+ <method name="set_point_weight_scale">
+ <return type="void">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <argument index="1" name="weight_scale" type="float">
+ </argument>
+ <description>
+ Sets the [code]weight_scale[/code] for the point with the given id.
+ </description>
+ </method>
</methods>
<constants>
</constants>