navigation_server_dummy.h 6.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. /**************************************************************************/
  2. /* navigation_server_dummy.h */
  3. /**************************************************************************/
  4. /* This file is part of: */
  5. /* GODOT ENGINE */
  6. /* https://godotengine.org */
  7. /**************************************************************************/
  8. /* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
  9. /* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
  10. /* */
  11. /* Permission is hereby granted, free of charge, to any person obtaining */
  12. /* a copy of this software and associated documentation files (the */
  13. /* "Software"), to deal in the Software without restriction, including */
  14. /* without limitation the rights to use, copy, modify, merge, publish, */
  15. /* distribute, sublicense, and/or sell copies of the Software, and to */
  16. /* permit persons to whom the Software is furnished to do so, subject to */
  17. /* the following conditions: */
  18. /* */
  19. /* The above copyright notice and this permission notice shall be */
  20. /* included in all copies or substantial portions of the Software. */
  21. /* */
  22. /* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
  23. /* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
  24. /* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
  25. /* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
  26. /* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
  27. /* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
  28. /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
  29. /**************************************************************************/
  30. #ifndef NAVIGATION_SERVER_DUMMY_H
  31. #define NAVIGATION_SERVER_DUMMY_H
  32. #include "servers/navigation_server.h"
  33. class NavigationServerDummy : public NavigationServer {
  34. GDCLASS(NavigationServerDummy, NavigationServer);
  35. public:
  36. Array get_maps() const { return Array(); }
  37. RID map_create() const { return RID(); }
  38. void map_set_active(RID p_map, bool p_active) const {}
  39. bool map_is_active(RID p_map) const { return false; }
  40. void map_set_up(RID p_map, Vector3 p_up) const {}
  41. Vector3 map_get_up(RID p_map) const { return Vector3(); }
  42. void map_set_cell_size(RID p_map, real_t p_cell_size) const {}
  43. real_t map_get_cell_size(RID p_map) const { return 0; }
  44. void map_set_cell_height(RID p_map, real_t p_cell_height) const {}
  45. real_t map_get_cell_height(RID p_map) const { return 0; }
  46. void map_set_edge_connection_margin(RID p_map, real_t p_connection_margin) const {}
  47. real_t map_get_edge_connection_margin(RID p_map) const { return 0; }
  48. Vector<Vector3> map_get_path(RID p_map, Vector3 p_origin, Vector3 p_destination, bool p_optimize, uint32_t p_navigation_layers) const { return Vector<Vector3>(); }
  49. Vector3 map_get_closest_point_to_segment(RID p_map, const Vector3 &p_from, const Vector3 &p_to, const bool p_use_collision) const { return Vector3(); }
  50. Vector3 map_get_closest_point(RID p_map, const Vector3 &p_point) const { return Vector3(); }
  51. Vector3 map_get_closest_point_normal(RID p_map, const Vector3 &p_point) const { return Vector3(); }
  52. RID map_get_closest_point_owner(RID p_map, const Vector3 &p_point) const { return RID(); }
  53. Array map_get_regions(RID p_map) const { return Array(); }
  54. Array map_get_agents(RID p_map) const { return Array(); }
  55. void map_force_update(RID p_map) {}
  56. RID region_create() const { return RID(); }
  57. void region_set_enter_cost(RID p_region, real_t p_enter_cost) const {}
  58. real_t region_get_enter_cost(RID p_region) const { return 0; }
  59. void region_set_travel_cost(RID p_region, real_t p_travel_cost) const {}
  60. real_t region_get_travel_cost(RID p_region) const { return 0; }
  61. bool region_owns_point(RID p_region, const Vector3 &p_point) const { return false; }
  62. void region_set_map(RID p_region, RID p_map) const {}
  63. RID region_get_map(RID p_region) const { return RID(); }
  64. void region_set_navigation_layers(RID p_region, uint32_t p_navigation_layers) const {}
  65. uint32_t region_get_navigation_layers(RID p_region) const { return 0; }
  66. void region_set_transform(RID p_region, Transform p_transform) const {}
  67. void region_set_navmesh(RID p_region, Ref<NavigationMesh> p_nav_mesh) const {}
  68. void region_bake_navmesh(Ref<NavigationMesh> r_mesh, Node *p_node) const {}
  69. int region_get_connections_count(RID p_region) const { return 0; }
  70. Vector3 region_get_connection_pathway_start(RID p_region, int p_connection_id) const { return Vector3(); }
  71. Vector3 region_get_connection_pathway_end(RID p_region, int p_connection_id) const { return Vector3(); }
  72. RID agent_create() const { return RID(); }
  73. void agent_set_map(RID p_agent, RID p_map) const {}
  74. RID agent_get_map(RID p_agent) const { return RID(); }
  75. void agent_set_neighbor_dist(RID p_agent, real_t p_dist) const {}
  76. void agent_set_max_neighbors(RID p_agent, int p_count) const {}
  77. void agent_set_time_horizon(RID p_agent, real_t p_time) const {}
  78. void agent_set_radius(RID p_agent, real_t p_radius) const {}
  79. void agent_set_max_speed(RID p_agent, real_t p_max_speed) const {}
  80. void agent_set_velocity(RID p_agent, Vector3 p_velocity) const {}
  81. void agent_set_target_velocity(RID p_agent, Vector3 p_velocity) const {}
  82. void agent_set_position(RID p_agent, Vector3 p_position) const {}
  83. void agent_set_ignore_y(RID p_agent, bool p_ignore) const {}
  84. bool agent_is_map_changed(RID p_agent) const { return false; }
  85. void agent_set_callback(RID p_agent, ObjectID p_object_id, StringName p_method, Variant p_udata = Variant()) const {}
  86. void free(RID p_object) const {}
  87. void set_active(bool p_active) const {}
  88. void process(real_t delta_time) {}
  89. };
  90. #endif // NAVIGATION_SERVER_DUMMY_H