feat: updated engine version to 4.4-rc1
This commit is contained in:
parent
ee00efde1f
commit
21ba8e33af
5459 changed files with 1128836 additions and 198305 deletions
|
|
@ -43,6 +43,11 @@
|
|||
class NavMeshGenerator2D;
|
||||
#endif // CLIPPER2_ENABLED
|
||||
|
||||
struct NavMeshGeometryParser2D {
|
||||
RID self;
|
||||
Callable callback;
|
||||
};
|
||||
|
||||
// This server exposes the `NavigationServer3D` features in the 2D world.
|
||||
class NavigationServer2D : public Object {
|
||||
GDCLASS(NavigationServer2D, Object);
|
||||
|
|
@ -91,7 +96,7 @@ public:
|
|||
virtual real_t map_get_link_connection_radius(RID p_map) const = 0;
|
||||
|
||||
/// Returns the navigation path to reach the destination from the origin.
|
||||
virtual Vector<Vector2> map_get_path(RID p_map, Vector2 p_origin, Vector2 p_destination, bool p_optimize, uint32_t p_navigation_layers = 1) const = 0;
|
||||
virtual Vector<Vector2> map_get_path(RID p_map, Vector2 p_origin, Vector2 p_destination, bool p_optimize, uint32_t p_navigation_layers = 1) = 0;
|
||||
|
||||
virtual Vector2 map_get_closest_point(RID p_map, const Vector2 &p_point) const = 0;
|
||||
virtual RID map_get_closest_point_owner(RID p_map, const Vector2 &p_point) const = 0;
|
||||
|
|
@ -104,6 +109,9 @@ public:
|
|||
virtual void map_force_update(RID p_map) = 0;
|
||||
virtual uint32_t map_get_iteration_id(RID p_map) const = 0;
|
||||
|
||||
virtual void map_set_use_async_iterations(RID p_map, bool p_enabled) = 0;
|
||||
virtual bool map_get_use_async_iterations(RID p_map) const = 0;
|
||||
|
||||
virtual Vector2 map_get_random_point(RID p_map, uint32_t p_navigation_layers, bool p_uniformly) const = 0;
|
||||
|
||||
/// Creates a new region.
|
||||
|
|
@ -149,7 +157,9 @@ public:
|
|||
virtual Vector2 region_get_connection_pathway_start(RID p_region, int p_connection_id) const = 0;
|
||||
virtual Vector2 region_get_connection_pathway_end(RID p_region, int p_connection_id) const = 0;
|
||||
|
||||
virtual Vector2 region_get_closest_point(RID p_region, const Vector2 &p_point) const = 0;
|
||||
virtual Vector2 region_get_random_point(RID p_region, uint32_t p_navigation_layers, bool p_uniformly) const = 0;
|
||||
virtual Rect2 region_get_bounds(RID p_region) const = 0;
|
||||
|
||||
/// Creates a new link between positions in the nav map.
|
||||
virtual RID link_create() = 0;
|
||||
|
|
@ -292,7 +302,7 @@ public:
|
|||
virtual uint32_t obstacle_get_avoidance_layers(RID p_obstacle) const = 0;
|
||||
|
||||
/// Returns a customized navigation path using a query parameters object
|
||||
virtual void query_path(const Ref<NavigationPathQueryParameters2D> &p_query_parameters, Ref<NavigationPathQueryResult2D> p_query_result) const = 0;
|
||||
virtual void query_path(const Ref<NavigationPathQueryParameters2D> &p_query_parameters, Ref<NavigationPathQueryResult2D> p_query_result, const Callable &p_callback = Callable()) = 0;
|
||||
|
||||
virtual void init() = 0;
|
||||
virtual void sync() = 0;
|
||||
|
|
@ -306,6 +316,12 @@ public:
|
|||
virtual void bake_from_source_geometry_data_async(const Ref<NavigationPolygon> &p_navigation_mesh, const Ref<NavigationMeshSourceGeometryData2D> &p_source_geometry_data, const Callable &p_callback = Callable()) = 0;
|
||||
virtual bool is_baking_navigation_polygon(Ref<NavigationPolygon> p_navigation_polygon) const = 0;
|
||||
|
||||
protected:
|
||||
static RWLock geometry_parser_rwlock;
|
||||
static RID_Owner<NavMeshGeometryParser2D> geometry_parser_owner;
|
||||
static LocalVector<NavMeshGeometryParser2D *> generator_parsers;
|
||||
|
||||
public:
|
||||
virtual RID source_geometry_parser_create() = 0;
|
||||
virtual void source_geometry_parser_set_callback(RID p_parser, const Callable &p_callback) = 0;
|
||||
|
||||
|
|
@ -317,6 +333,14 @@ public:
|
|||
void set_debug_enabled(bool p_enabled);
|
||||
bool get_debug_enabled() const;
|
||||
|
||||
protected:
|
||||
#ifndef DISABLE_DEPRECATED
|
||||
Vector<Vector2> _map_get_path_bind_compat_100129(RID p_map, Vector2 p_origin, Vector2 p_destination, bool p_optimize, uint32_t p_navigation_layers = 1) const;
|
||||
void _query_path_bind_compat_100129(const Ref<NavigationPathQueryParameters2D> &p_query_parameters, Ref<NavigationPathQueryResult2D> p_query_result) const;
|
||||
static void _bind_compatibility_methods();
|
||||
#endif
|
||||
|
||||
public:
|
||||
#ifdef DEBUG_ENABLED
|
||||
void set_debug_navigation_enabled(bool p_enabled);
|
||||
bool get_debug_navigation_enabled() const;
|
||||
|
|
@ -406,6 +430,9 @@ class NavigationServer2DManager {
|
|||
public:
|
||||
static void set_default_server(NavigationServer2DCallback p_callback);
|
||||
static NavigationServer2D *new_default_server();
|
||||
|
||||
static void initialize_server();
|
||||
static void finalize_server();
|
||||
};
|
||||
|
||||
#endif // NAVIGATION_SERVER_2D_H
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue