You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-17 14:11:06 +00:00
committed by
Rémi Verschelde
parent
0cc1ba947f
commit
7603d77d1d
@@ -123,6 +123,12 @@ void AStar::disconnect_points(int p_id, int p_with_id) {
|
|||||||
a->neighbours.erase(b);
|
a->neighbours.erase(b);
|
||||||
b->neighbours.erase(a);
|
b->neighbours.erase(a);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool AStar::has_point(int p_id) const {
|
||||||
|
|
||||||
|
return points.has(p_id);
|
||||||
|
}
|
||||||
|
|
||||||
bool AStar::are_points_connected(int p_id, int p_with_id) const {
|
bool AStar::are_points_connected(int p_id, int p_with_id) const {
|
||||||
|
|
||||||
Segment s(p_id, p_with_id);
|
Segment s(p_id, p_with_id);
|
||||||
@@ -400,6 +406,7 @@ void AStar::_bind_methods() {
|
|||||||
ObjectTypeDB::bind_method(_MD("get_point_pos", "id"), &AStar::get_point_pos);
|
ObjectTypeDB::bind_method(_MD("get_point_pos", "id"), &AStar::get_point_pos);
|
||||||
ObjectTypeDB::bind_method(_MD("get_point_weight_scale", "id"), &AStar::get_point_weight_scale);
|
ObjectTypeDB::bind_method(_MD("get_point_weight_scale", "id"), &AStar::get_point_weight_scale);
|
||||||
ObjectTypeDB::bind_method(_MD("remove_point", "id"), &AStar::remove_point);
|
ObjectTypeDB::bind_method(_MD("remove_point", "id"), &AStar::remove_point);
|
||||||
|
ObjectTypeDB::bind_method(_MD("has_point", "id"), &AStar::has_point);
|
||||||
|
|
||||||
ObjectTypeDB::bind_method(_MD("connect_points", "id", "to_id", "bidirectional"), &AStar::connect_points, DEFVAL(true));
|
ObjectTypeDB::bind_method(_MD("connect_points", "id", "to_id", "bidirectional"), &AStar::connect_points, DEFVAL(true));
|
||||||
ObjectTypeDB::bind_method(_MD("disconnect_points", "id", "to_id"), &AStar::disconnect_points);
|
ObjectTypeDB::bind_method(_MD("disconnect_points", "id", "to_id"), &AStar::disconnect_points);
|
||||||
|
|||||||
@@ -104,6 +104,7 @@ public:
|
|||||||
Vector3 get_point_pos(int p_id) const;
|
Vector3 get_point_pos(int p_id) const;
|
||||||
float get_point_weight_scale(int p_id) const;
|
float get_point_weight_scale(int p_id) const;
|
||||||
void remove_point(int p_id);
|
void remove_point(int p_id);
|
||||||
|
bool has_point(int p_id) const;
|
||||||
|
|
||||||
void connect_points(int p_id, int p_with_id, bool bidirectional = true);
|
void connect_points(int p_id, int p_with_id, bool bidirectional = true);
|
||||||
void disconnect_points(int p_id, int p_with_id);
|
void disconnect_points(int p_id, int p_with_id);
|
||||||
|
|||||||
Reference in New Issue
Block a user