#include "godot_navigation_server_3d.h"
#include "core/os/mutex.h"
#include "scene/main/node.h"
#ifndef _3D_DISABLED
#include "nav_mesh_generator_3d.h"
#endif
usingnamespaceNavigationUtilities;
#define COMMAND_1 …
#define COMMAND_2 …
GodotNavigationServer3D::GodotNavigationServer3D() { … }
GodotNavigationServer3D::~GodotNavigationServer3D() { … }
void GodotNavigationServer3D::add_command(SetCommand *command) { … }
TypedArray<RID> GodotNavigationServer3D::get_maps() const { … }
RID GodotNavigationServer3D::map_create() { … }
COMMAND_2(map_set_active, RID, p_map, bool, p_active) { … }
bool GodotNavigationServer3D::map_is_active(RID p_map) const { … }
COMMAND_2(map_set_up, RID, p_map, Vector3, p_up) { … }
Vector3 GodotNavigationServer3D::map_get_up(RID p_map) const { … }
COMMAND_2(map_set_cell_size, RID, p_map, real_t, p_cell_size) { … }
real_t GodotNavigationServer3D::map_get_cell_size(RID p_map) const { … }
COMMAND_2(map_set_cell_height, RID, p_map, real_t, p_cell_height) { … }
real_t GodotNavigationServer3D::map_get_cell_height(RID p_map) const { … }
COMMAND_2(map_set_merge_rasterizer_cell_scale, RID, p_map, float, p_value) { … }
float GodotNavigationServer3D::map_get_merge_rasterizer_cell_scale(RID p_map) const { … }
COMMAND_2(map_set_use_edge_connections, RID, p_map, bool, p_enabled) { … }
bool GodotNavigationServer3D::map_get_use_edge_connections(RID p_map) const { … }
COMMAND_2(map_set_edge_connection_margin, RID, p_map, real_t, p_connection_margin) { … }
real_t GodotNavigationServer3D::map_get_edge_connection_margin(RID p_map) const { … }
COMMAND_2(map_set_link_connection_radius, RID, p_map, real_t, p_connection_radius) { … }
real_t GodotNavigationServer3D::map_get_link_connection_radius(RID p_map) const { … }
Vector<Vector3> GodotNavigationServer3D::map_get_path(RID p_map, Vector3 p_origin, Vector3 p_destination, bool p_optimize, uint32_t p_navigation_layers) const { … }
Vector3 GodotNavigationServer3D::map_get_closest_point_to_segment(RID p_map, const Vector3 &p_from, const Vector3 &p_to, const bool p_use_collision) const { … }
Vector3 GodotNavigationServer3D::map_get_closest_point(RID p_map, const Vector3 &p_point) const { … }
Vector3 GodotNavigationServer3D::map_get_closest_point_normal(RID p_map, const Vector3 &p_point) const { … }
RID GodotNavigationServer3D::map_get_closest_point_owner(RID p_map, const Vector3 &p_point) const { … }
TypedArray<RID> GodotNavigationServer3D::map_get_links(RID p_map) const { … }
TypedArray<RID> GodotNavigationServer3D::map_get_regions(RID p_map) const { … }
TypedArray<RID> GodotNavigationServer3D::map_get_agents(RID p_map) const { … }
TypedArray<RID> GodotNavigationServer3D::map_get_obstacles(RID p_map) const { … }
RID GodotNavigationServer3D::region_get_map(RID p_region) const { … }
RID GodotNavigationServer3D::agent_get_map(RID p_agent) const { … }
Vector3 GodotNavigationServer3D::map_get_random_point(RID p_map, uint32_t p_navigation_layers, bool p_uniformly) const { … }
RID GodotNavigationServer3D::region_create() { … }
COMMAND_2(region_set_enabled, RID, p_region, bool, p_enabled) { … }
bool GodotNavigationServer3D::region_get_enabled(RID p_region) const { … }
COMMAND_2(region_set_use_edge_connections, RID, p_region, bool, p_enabled) { … }
bool GodotNavigationServer3D::region_get_use_edge_connections(RID p_region) const { … }
COMMAND_2(region_set_map, RID, p_region, RID, p_map) { … }
COMMAND_2(region_set_transform, RID, p_region, Transform3D, p_transform) { … }
Transform3D GodotNavigationServer3D::region_get_transform(RID p_region) const { … }
COMMAND_2(region_set_enter_cost, RID, p_region, real_t, p_enter_cost) { … }
real_t GodotNavigationServer3D::region_get_enter_cost(RID p_region) const { … }
COMMAND_2(region_set_travel_cost, RID, p_region, real_t, p_travel_cost) { … }
real_t GodotNavigationServer3D::region_get_travel_cost(RID p_region) const { … }
COMMAND_2(region_set_owner_id, RID, p_region, ObjectID, p_owner_id) { … }
ObjectID GodotNavigationServer3D::region_get_owner_id(RID p_region) const { … }
bool GodotNavigationServer3D::region_owns_point(RID p_region, const Vector3 &p_point) const { … }
COMMAND_2(region_set_navigation_layers, RID, p_region, uint32_t, p_navigation_layers) { … }
uint32_t GodotNavigationServer3D::region_get_navigation_layers(RID p_region) const { … }
COMMAND_2(region_set_navigation_mesh, RID, p_region, Ref<NavigationMesh>, p_navigation_mesh) { … }
#ifndef DISABLE_DEPRECATED
void GodotNavigationServer3D::region_bake_navigation_mesh(Ref<NavigationMesh> p_navigation_mesh, Node *p_root_node) { … }
#endif
int GodotNavigationServer3D::region_get_connections_count(RID p_region) const { … }
Vector3 GodotNavigationServer3D::region_get_connection_pathway_start(RID p_region, int p_connection_id) const { … }
Vector3 GodotNavigationServer3D::region_get_connection_pathway_end(RID p_region, int p_connection_id) const { … }
Vector3 GodotNavigationServer3D::region_get_closest_point_to_segment(RID p_region, const Vector3 &p_from, const Vector3 &p_to, bool p_use_collision) const { … }
Vector3 GodotNavigationServer3D::region_get_closest_point(RID p_region, const Vector3 &p_point) const { … }
Vector3 GodotNavigationServer3D::region_get_closest_point_normal(RID p_region, const Vector3 &p_point) const { … }
Vector3 GodotNavigationServer3D::region_get_random_point(RID p_region, uint32_t p_navigation_layers, bool p_uniformly) const { … }
RID GodotNavigationServer3D::link_create() { … }
COMMAND_2(link_set_map, RID, p_link, RID, p_map) { … }
RID GodotNavigationServer3D::link_get_map(const RID p_link) const { … }
COMMAND_2(link_set_enabled, RID, p_link, bool, p_enabled) { … }
bool GodotNavigationServer3D::link_get_enabled(RID p_link) const { … }
COMMAND_2(link_set_bidirectional, RID, p_link, bool, p_bidirectional) { … }
bool GodotNavigationServer3D::link_is_bidirectional(RID p_link) const { … }
COMMAND_2(link_set_navigation_layers, RID, p_link, uint32_t, p_navigation_layers) { … }
uint32_t GodotNavigationServer3D::link_get_navigation_layers(const RID p_link) const { … }
COMMAND_2(link_set_start_position, RID, p_link, Vector3, p_position) { … }
Vector3 GodotNavigationServer3D::link_get_start_position(RID p_link) const { … }
COMMAND_2(link_set_end_position, RID, p_link, Vector3, p_position) { … }
Vector3 GodotNavigationServer3D::link_get_end_position(RID p_link) const { … }
COMMAND_2(link_set_enter_cost, RID, p_link, real_t, p_enter_cost) { … }
real_t GodotNavigationServer3D::link_get_enter_cost(const RID p_link) const { … }
COMMAND_2(link_set_travel_cost, RID, p_link, real_t, p_travel_cost) { … }
real_t GodotNavigationServer3D::link_get_travel_cost(const RID p_link) const { … }
COMMAND_2(link_set_owner_id, RID, p_link, ObjectID, p_owner_id) { … }
ObjectID GodotNavigationServer3D::link_get_owner_id(RID p_link) const { … }
RID GodotNavigationServer3D::agent_create() { … }
COMMAND_2(agent_set_avoidance_enabled, RID, p_agent, bool, p_enabled) { … }
bool GodotNavigationServer3D::agent_get_avoidance_enabled(RID p_agent) const { … }
COMMAND_2(agent_set_use_3d_avoidance, RID, p_agent, bool, p_enabled) { … }
bool GodotNavigationServer3D::agent_get_use_3d_avoidance(RID p_agent) const { … }
COMMAND_2(agent_set_map, RID, p_agent, RID, p_map) { … }
COMMAND_2(agent_set_paused, RID, p_agent, bool, p_paused) { … }
bool GodotNavigationServer3D::agent_get_paused(RID p_agent) const { … }
COMMAND_2(agent_set_neighbor_distance, RID, p_agent, real_t, p_distance) { … }
real_t GodotNavigationServer3D::agent_get_neighbor_distance(RID p_agent) const { … }
COMMAND_2(agent_set_max_neighbors, RID, p_agent, int, p_count) { … }
int GodotNavigationServer3D::agent_get_max_neighbors(RID p_agent) const { … }
COMMAND_2(agent_set_time_horizon_agents, RID, p_agent, real_t, p_time_horizon) { … }
real_t GodotNavigationServer3D::agent_get_time_horizon_agents(RID p_agent) const { … }
COMMAND_2(agent_set_time_horizon_obstacles, RID, p_agent, real_t, p_time_horizon) { … }
real_t GodotNavigationServer3D::agent_get_time_horizon_obstacles(RID p_agent) const { … }
COMMAND_2(agent_set_radius, RID, p_agent, real_t, p_radius) { … }
real_t GodotNavigationServer3D::agent_get_radius(RID p_agent) const { … }
COMMAND_2(agent_set_height, RID, p_agent, real_t, p_height) { … }
real_t GodotNavigationServer3D::agent_get_height(RID p_agent) const { … }
COMMAND_2(agent_set_max_speed, RID, p_agent, real_t, p_max_speed) { … }
real_t GodotNavigationServer3D::agent_get_max_speed(RID p_agent) const { … }
COMMAND_2(agent_set_velocity, RID, p_agent, Vector3, p_velocity) { … }
Vector3 GodotNavigationServer3D::agent_get_velocity(RID p_agent) const { … }
COMMAND_2(agent_set_velocity_forced, RID, p_agent, Vector3, p_velocity) { … }
COMMAND_2(agent_set_position, RID, p_agent, Vector3, p_position) { … }
Vector3 GodotNavigationServer3D::agent_get_position(RID p_agent) const { … }
bool GodotNavigationServer3D::agent_is_map_changed(RID p_agent) const { … }
COMMAND_2(agent_set_avoidance_callback, RID, p_agent, Callable, p_callback) { … }
bool GodotNavigationServer3D::agent_has_avoidance_callback(RID p_agent) const { … }
COMMAND_2(agent_set_avoidance_layers, RID, p_agent, uint32_t, p_layers) { … }
uint32_t GodotNavigationServer3D::agent_get_avoidance_layers(RID p_agent) const { … }
COMMAND_2(agent_set_avoidance_mask, RID, p_agent, uint32_t, p_mask) { … }
uint32_t GodotNavigationServer3D::agent_get_avoidance_mask(RID p_agent) const { … }
COMMAND_2(agent_set_avoidance_priority, RID, p_agent, real_t, p_priority) { … }
real_t GodotNavigationServer3D::agent_get_avoidance_priority(RID p_agent) const { … }
RID GodotNavigationServer3D::obstacle_create() { … }
COMMAND_2(obstacle_set_avoidance_enabled, RID, p_obstacle, bool, p_enabled) { … }
bool GodotNavigationServer3D::obstacle_get_avoidance_enabled(RID p_obstacle) const { … }
COMMAND_2(obstacle_set_use_3d_avoidance, RID, p_obstacle, bool, p_enabled) { … }
bool GodotNavigationServer3D::obstacle_get_use_3d_avoidance(RID p_obstacle) const { … }
COMMAND_2(obstacle_set_map, RID, p_obstacle, RID, p_map) { … }
RID GodotNavigationServer3D::obstacle_get_map(RID p_obstacle) const { … }
COMMAND_2(obstacle_set_paused, RID, p_obstacle, bool, p_paused) { … }
bool GodotNavigationServer3D::obstacle_get_paused(RID p_obstacle) const { … }
COMMAND_2(obstacle_set_radius, RID, p_obstacle, real_t, p_radius) { … }
real_t GodotNavigationServer3D::obstacle_get_radius(RID p_obstacle) const { … }
COMMAND_2(obstacle_set_height, RID, p_obstacle, real_t, p_height) { … }
real_t GodotNavigationServer3D::obstacle_get_height(RID p_obstacle) const { … }
COMMAND_2(obstacle_set_velocity, RID, p_obstacle, Vector3, p_velocity) { … }
Vector3 GodotNavigationServer3D::obstacle_get_velocity(RID p_obstacle) const { … }
COMMAND_2(obstacle_set_position, RID, p_obstacle, Vector3, p_position) { … }
Vector3 GodotNavigationServer3D::obstacle_get_position(RID p_obstacle) const { … }
void GodotNavigationServer3D::obstacle_set_vertices(RID p_obstacle, const Vector<Vector3> &p_vertices) { … }
Vector<Vector3> GodotNavigationServer3D::obstacle_get_vertices(RID p_obstacle) const { … }
COMMAND_2(obstacle_set_avoidance_layers, RID, p_obstacle, uint32_t, p_layers) { … }
uint32_t GodotNavigationServer3D::obstacle_get_avoidance_layers(RID p_obstacle) const { … }
void GodotNavigationServer3D::parse_source_geometry_data(const Ref<NavigationMesh> &p_navigation_mesh, const Ref<NavigationMeshSourceGeometryData3D> &p_source_geometry_data, Node *p_root_node, const Callable &p_callback) { … }
void GodotNavigationServer3D::bake_from_source_geometry_data(const Ref<NavigationMesh> &p_navigation_mesh, const Ref<NavigationMeshSourceGeometryData3D> &p_source_geometry_data, const Callable &p_callback) { … }
void GodotNavigationServer3D::bake_from_source_geometry_data_async(const Ref<NavigationMesh> &p_navigation_mesh, const Ref<NavigationMeshSourceGeometryData3D> &p_source_geometry_data, const Callable &p_callback) { … }
bool GodotNavigationServer3D::is_baking_navigation_mesh(Ref<NavigationMesh> p_navigation_mesh) const { … }
COMMAND_1(free, RID, p_object) { … }
void GodotNavigationServer3D::internal_free_agent(RID p_object) { … }
void GodotNavigationServer3D::internal_free_obstacle(RID p_object) { … }
void GodotNavigationServer3D::set_active(bool p_active) { … }
void GodotNavigationServer3D::flush_queries() { … }
void GodotNavigationServer3D::map_force_update(RID p_map) { … }
uint32_t GodotNavigationServer3D::map_get_iteration_id(RID p_map) const { … }
void GodotNavigationServer3D::sync() { … }
void GodotNavigationServer3D::process(real_t p_delta_time) { … }
void GodotNavigationServer3D::init() { … }
void GodotNavigationServer3D::finish() { … }
PathQueryResult GodotNavigationServer3D::_query_path(const PathQueryParameters &p_parameters) const { … }
RID GodotNavigationServer3D::source_geometry_parser_create() { … }
void GodotNavigationServer3D::source_geometry_parser_set_callback(RID p_parser, const Callable &p_callback) { … }
Vector<Vector3> GodotNavigationServer3D::simplify_path(const Vector<Vector3> &p_path, real_t p_epsilon) { … }
LocalVector<uint32_t> GodotNavigationServer3D::get_simplified_path_indices(const Vector<Vector3> &p_path, real_t p_epsilon) { … }
void GodotNavigationServer3D::simplify_path_segment(int p_start_inx, int p_end_inx, const Vector<Vector3> &p_points, real_t p_epsilon, LocalVector<bool> &r_valid_points) { … }
int GodotNavigationServer3D::get_process_info(ProcessInfo p_info) const { … }
#undef COMMAND_1
#undef COMMAND_2