Debug Draw 3D 1.7.1
Draw 3D debug graphics and 2D overlays with this add-on.
Loading...
Searching...
No Matches
debug_draw_3d.h
1#pragma once
2
3#include "common/colors.h"
4#include "common/i_scope_storage.h"
5#include "config_scope_3d.h"
6#include "geometry_generators.h"
7#include "render_instances_enums.h"
8#include "utils/compiler.h"
9#include "utils/native_api_hooks.h"
10#include "utils/profiler.h"
11
12#include <map>
13#include <memory>
14#include <mutex>
15
16GODOT_WARNING_DISABLE()
17#include <godot_cpp/classes/array_mesh.hpp>
18#include <godot_cpp/classes/node3d.hpp>
19#include <godot_cpp/classes/shader.hpp>
20#include <godot_cpp/classes/shader_material.hpp>
21#include <godot_cpp/classes/sub_viewport.hpp>
22GODOT_WARNING_RESTORE()
23using namespace godot;
24
25class DebugDraw3D;
29
30#ifndef DISABLE_DEBUG_RENDERING
31class DebugGeometryContainer;
32class NodesContainer;
33struct DelayedRendererLine;
34#endif
35
37enum class MeshMaterialType : char {
38 Wireframe,
39 Billboard,
40 Plane,
41 Extendable,
42 MAX,
43};
44
46enum class MeshMaterialVariant : char {
47 Normal,
48 NoDepth,
49 MAX,
50};
51
52#ifndef DISABLE_DEBUG_RENDERING
54class _DD3D_WorldWatcher : public Node3D {
55 GDCLASS(_DD3D_WorldWatcher, Node3D)
56protected:
57 DebugDraw3D *m_owner = nullptr;
58 uint64_t m_world_id;
59 Node *m_nodes_root = nullptr;
60 static void _bind_methods() {}
61
62public:
63 virtual void _process(double p_delta) override;
64 virtual void _notification(int p_what);
65 Node *get_nodes_root() const;
66
67 _DD3D_WorldWatcher() :
68 m_world_id() {}
69 _DD3D_WorldWatcher(DebugDraw3D *p_root, uint64_t p_world_id);
70};
71
72#endif
73
121NAPI_CLASS_SINGLETON class DebugDraw3D : public Object, public IScopeStorage<DebugDraw3DScopeConfig, DebugDraw3DScopeConfig::Data> {
122 GDCLASS(DebugDraw3D, Object)
123
124 friend DebugDrawManager;
125
126#ifndef DISABLE_DEBUG_RENDERING
127 friend DebugGeometryContainer;
128 friend NodesContainer;
129 friend _DD3D_WorldWatcher;
130#endif
131
132public:
136 NAPI_ENUM enum PointType : uint32_t {
137 POINT_TYPE_SQUARE,
138 POINT_TYPE_SPHERE,
139 };
140
141private:
142 static DebugDraw3D *singleton;
143
144 String root_settings_section;
145 static constexpr const char *s_use_icosphere = "use_icosphere";
146 static constexpr const char *s_use_icosphere_hd = "use_icosphere_for_hd";
147 static constexpr const char *s_add_bevel_to_volumetric = "add_bevel_to_volumetric_geometry";
148 static constexpr const char *s_default_frustum_scale = "defaults/frustum_length_scale";
149
150 static constexpr const char *s_default_thickness = "volumetric_defaults/thickness";
151 static constexpr const char *s_default_center_brightness = "volumetric_defaults/center_brightness";
152 static constexpr const char *s_default_hd_spheres = "volumetric_defaults/hd_spheres";
153 static constexpr const char *s_default_plane_size = "volumetric_defaults/plane_size";
154
155 static constexpr const char *s_render_priority = "rendering/render_priority";
156 static constexpr const char *s_render_mode = "rendering/render_mode";
157 static constexpr const char *s_render_fog_disabled = "rendering/disable_fog";
158
159 std::vector<SubViewport *> custom_editor_viewports;
160 DebugDrawManager *root_node = nullptr;
161
162 Ref<DebugDraw3DScopeConfig> default_scoped_config;
163
164#ifndef DISABLE_DEBUG_RENDERING
165 ProfiledMutex(std::recursive_mutex, datalock, "3D Geometry lock");
166
167 struct ScopedPairIdConfig {
168 uint64_t id;
170 ScopedPairIdConfig(uint64_t id, DebugDraw3DScopeConfig *scfg) :
171 id(id), scfg(scfg) {}
172 };
173 // stores thread id and array of id's with ptrs
174 std::unordered_map<uint64_t, std::vector<ScopedPairIdConfig>> scoped_configs;
175 // stores thread id and most recent config
176 std::unordered_map<uint64_t, std::shared_ptr<DebugDraw3DScopeConfig::Data>> cached_scoped_configs;
177 uint64_t created_scoped_configs = 0;
178 struct {
179 uint64_t created;
180 uint64_t orphans;
181 } scoped_stats_3d = {};
182
183 // Inherited via IScopeStorage
184 const DebugDraw3DScopeConfig::Data *scoped_config_for_current_thread() override;
185
186 // Meshes
188 std::vector<std::array<GeometryGenerator::GeneratedMeshData, (int)MeshMaterialVariant::MAX>> shared_generated_meshes;
189
191 struct ViewportToDebugContainerItem {
192 uint64_t world_id;
193 _DD3D_WorldWatcher *world_watcher;
194 std::unique_ptr<DebugGeometryContainer> dgcs[(int)MeshMaterialVariant::MAX];
195 std::unique_ptr<NodesContainer> ncs[(int)MeshMaterialVariant::MAX];
196
197 ViewportToDebugContainerItem();
198 ViewportToDebugContainerItem(ViewportToDebugContainerItem &&other) noexcept;
199 ~ViewportToDebugContainerItem();
200 };
201
202 std::unordered_map<uint64_t /* World3D */, ViewportToDebugContainerItem> debug_containers;
203 // invalidate on add/remove operations or use ptrs
204 std::unordered_map<const Viewport *, ViewportToDebugContainerItem *> viewport_to_world_cache;
205 std::unordered_map<uint64_t /*Viewport * */, Ref<World3D>> world3ds_found_for_threads_cache;
206
207 // Default materials and shaders
208 Ref<ShaderMaterial> mesh_shaders[(int)MeshMaterialType::MAX][(int)MeshMaterialVariant::MAX];
209
210 // Inherited via IScopeStorage
211 void _register_scoped_config(uint64_t p_thread_id, uint64_t p_guard_id, DebugDraw3DScopeConfig *p_cfg) override;
212 void _unregister_scoped_config(uint64_t p_thread_id, uint64_t p_guard_id) override;
213 void _clear_scoped_configs() override;
214 void _clear_all_remove_watcher_as_child(uint64_t world_watcher_id);
215
216 std::array<GeometryGenerator::GeneratedMeshData, (int)MeshMaterialVariant::MAX> *get_shared_meshes();
217 DebugDraw3D::ViewportToDebugContainerItem *get_debug_container(const DebugDraw3DScopeConfig::DebugContainerDependent &p_dgcd, const bool p_generate_new_container);
218 void _deferred_find_world_in_viewport(uint64_t p_viewport_id);
219 void _register_viewport_world_deferred(uint64_t /*Viewport * */ p_viewport_id, const uint64_t p_world_id, _DD3D_WorldWatcher *watcher);
220 Node *_get_root_world_node(Node *p_scene_root, Viewport *p_vp);
221 void _remove_debug_container(const uint64_t &p_world_id);
222
223 _FORCE_INLINE_ Vector3 get_up_vector(const Vector3 &p_dir);
224 void add_or_update_line_with_thickness(real_t p_exp_time, const Vector3 *p_lines, const size_t p_line_count, const Color &p_col, const std::function<void(DelayedRendererLine *)> p_custom_upd = nullptr);
225 Node *get_root_node();
226
227 void create_arrow(const Vector3 &p_a, const Vector3 &p_b, const Color &p_color, const real_t &p_arrow_size, const bool &p_is_absolute_size, const real_t &p_duration = 0);
228 void create_capsule(const Transform3D &p_xf, const Vector3 &p_center, const Vector3 &p_top_cap, const Vector3 &p_bottom_cap, const real_t &p_radius, const real_t &p_height, const Color &p_color, const real_t &p_duration = 0);
229
230#ifdef DEV_ENABLED
231 void _save_generated_meshes();
232#endif
233
234#endif
235
236 void init(DebugDrawManager *p_root);
237
238 void set_custom_editor_viewport(std::vector<SubViewport *> p_viewports);
239 std::vector<SubViewport *> get_custom_editor_viewports();
240
241 Ref<ShaderMaterial> get_material_variant(MeshMaterialType p_type, MeshMaterialVariant p_var);
242
243 void _load_materials();
244 inline bool _is_enabled_override() const;
245
246 void process_start(double delta);
247 void process_end(double delta);
248 void physics_process_start(double p_delta);
249 void physics_process_end(double p_delta);
250
251#pragma region Exposed Parameter Values
252
254 bool debug_enabled = true;
255
256 Ref<DebugDraw3DConfig> config;
257
258#pragma endregion // Exposed Parameter Values
259
260protected:
262 static void _bind_methods();
263
264public:
265 DebugDraw3D();
266 ~DebugDraw3D();
267
271 static DebugDraw3D *get_singleton() {
272 return singleton;
273 }
274
275#pragma region Configs
283 NAPI Ref<DebugDraw3DScopeConfig> new_scoped_config();
296 NAPI Ref<DebugDraw3DScopeConfig> scoped_config() override;
297
301 NAPI void set_config(Ref<DebugDraw3DConfig> cfg);
305 NAPI Ref<DebugDraw3DConfig> get_config() const;
306
307#pragma endregion // Configs
308
309#pragma region Exposed Parameters
311 void set_empty_color(const godot::Color &col) {}
315 Color get_empty_color() const;
316
320 NAPI void set_debug_enabled(const bool &state);
321 NAPI bool is_debug_enabled() const;
322
323#pragma endregion // Exposed Parametes
324
325#pragma region Exposed Draw Methods
326
332 NAPI Ref<DebugDraw3DStats> get_render_stats();
333
339 NAPI Ref<DebugDraw3DStats> get_render_stats_for_world(godot::Viewport *viewport);
340
341#ifndef DISABLE_DEBUG_RENDERING
342#define FAKE_FUNC_IMPL
343#else
344#define FAKE_FUNC_IMPL \
345 { \
346 }
347#endif
348
355
359 NAPI void clear_all();
360
361#pragma region Spheres
362
364 void draw_sphere_base(const godot::Transform3D &transform, const godot::Color &color = Colors::empty_color, const real_t &duration = 0) FAKE_FUNC_IMPL;
375 NAPI void draw_sphere(const godot::Vector3 &position, const real_t &radius = 0.5f, const godot::Color &color = Colors::empty_color, const real_t &duration = 0) FAKE_FUNC_IMPL;
385 NAPI void draw_sphere_xf(const godot::Transform3D &transform, const godot::Color &color = Colors::empty_color, const real_t &duration = 0) FAKE_FUNC_IMPL;
386
387#pragma endregion // Spheres
388
389#pragma region Cylinders
390
410 NAPI void draw_capsule(const godot::Vector3 &position, const godot::Quaternion &rotation, const real_t &radius, const real_t &height, const godot::Color &color = Colors::empty_color, const real_t &duration = 0) FAKE_FUNC_IMPL;
411
426 NAPI void draw_capsule_ab(const godot::Vector3 &a, const godot::Vector3 &b, const real_t &radius = 0.5f, const godot::Color &color = Colors::empty_color, const real_t &duration = 0) FAKE_FUNC_IMPL;
427
437 NAPI void draw_cylinder(const godot::Transform3D &transform, const godot::Color &color = Colors::empty_color, const real_t &duration = 0) FAKE_FUNC_IMPL;
438
453 NAPI void draw_cylinder_ab(const godot::Vector3 &a, const godot::Vector3 &b, const real_t &radius = 0.5f, const godot::Color &color = Colors::empty_color, const real_t &duration = 0) FAKE_FUNC_IMPL;
454
455#pragma endregion // Cylinders
456
457#pragma region Boxes
458
473 NAPI void draw_box(const godot::Vector3 &position, const godot::Quaternion &rotation, const godot::Vector3 &size, const godot::Color &color = Colors::empty_color, const bool &is_box_centered = false, const real_t &duration = 0) FAKE_FUNC_IMPL;
474
492 NAPI void draw_box_ab(const godot::Vector3 &a, const godot::Vector3 &b, const godot::Vector3 &up, const godot::Color &color = Colors::empty_color, const bool &is_ab_diagonal = true, const real_t &duration = 0) FAKE_FUNC_IMPL;
493
502 NAPI void draw_box_xf(const godot::Transform3D &transform, const godot::Color &color = Colors::empty_color, const bool &is_box_centered = true, const real_t &duration = 0) FAKE_FUNC_IMPL;
503
511 NAPI void draw_aabb(const godot::AABB &aabb, const godot::Color &color = Colors::empty_color, const real_t &duration = 0) FAKE_FUNC_IMPL;
512
521 NAPI void draw_aabb_ab(const godot::Vector3 &a, const godot::Vector3 &b, const godot::Color &color = Colors::empty_color, const real_t &duration = 0) FAKE_FUNC_IMPL;
522
523#pragma endregion // Boxes
524
525#pragma region Lines
526
543 NAPI void draw_line_hit(const godot::Vector3 &start, const godot::Vector3 &end, const godot::Vector3 &hit, const bool &is_hit, const real_t &hit_size = 0.25f, const godot::Color &hit_color = Colors::empty_color, const godot::Color &after_hit_color = Colors::empty_color, const real_t &duration = 0) FAKE_FUNC_IMPL;
544
561 NAPI void draw_line_hit_offset(const godot::Vector3 &start, const godot::Vector3 &end, const bool &is_hit, const real_t &unit_offset_of_hit = 0.5f, const real_t &hit_size = 0.25f, const godot::Color &hit_color = Colors::empty_color, const godot::Color &after_hit_color = Colors::empty_color, const real_t &duration = 0) FAKE_FUNC_IMPL;
562
563#pragma region Normal
564
575 NAPI void draw_line(const godot::Vector3 &a, const godot::Vector3 &b, const godot::Color &color = Colors::empty_color, const real_t &duration = 0) FAKE_FUNC_IMPL;
576
588 NAPI void draw_ray(const godot::Vector3 &origin, const godot::Vector3 &direction, const real_t &length, const godot::Color &color = Colors::empty_color, const real_t &duration = 0) FAKE_FUNC_IMPL;
589
599 void draw_lines(const godot::PackedVector3Array &lines, const godot::Color &color = Colors::empty_color, const real_t &duration = 0) FAKE_FUNC_IMPL;
601 // #docs_func draw_lines
602 NAPI void draw_lines_c(const godot::Vector3 *lines_data, const uint64_t &lines_size, const godot::Color &color = Colors::empty_color, const real_t &duration = 0) FAKE_FUNC_IMPL;
603
618 void draw_line_path(const godot::PackedVector3Array &path, const godot::Color &color = Colors::empty_color, const real_t &duration = 0) FAKE_FUNC_IMPL;
620 // #docs_func draw_line_path
621 NAPI void draw_line_path_c(const godot::Vector3 *path_data, const uint64_t &path_size, const godot::Color &color = Colors::empty_color, const real_t &duration = 0) FAKE_FUNC_IMPL;
622
623#pragma endregion // Normal
624
625#pragma region Arrows
626
634 NAPI void draw_arrowhead(const godot::Transform3D &transform, const godot::Color &color = Colors::empty_color, const real_t &duration = 0) FAKE_FUNC_IMPL;
635
651 NAPI void draw_arrow(const godot::Vector3 &a, const godot::Vector3 &b, const godot::Color &color = Colors::empty_color, const real_t &arrow_size = 0.5f, const bool &is_absolute_size = false, const real_t &duration = 0) FAKE_FUNC_IMPL;
652
664 NAPI void draw_arrow_ray(const godot::Vector3 &origin, const godot::Vector3 &direction, const real_t &length, const godot::Color &color = Colors::empty_color, const real_t &arrow_size = 0.5f, const bool &is_absolute_size = false, const real_t &duration = 0) FAKE_FUNC_IMPL;
665
680 void draw_arrow_path(const godot::PackedVector3Array &path, const godot::Color &color = Colors::empty_color, const real_t &arrow_size = 0.75f, const bool &is_absolute_size = true, const real_t &duration = 0) FAKE_FUNC_IMPL;
682 // #docs_func draw_arrow_path
683 NAPI void draw_arrow_path_c(const godot::Vector3 *path_data, const uint64_t &path_size, const godot::Color &color = Colors::empty_color, const real_t &arrow_size = 0.75f, const bool &is_absolute_size = true, const real_t &duration = 0) FAKE_FUNC_IMPL;
684
685#pragma endregion // Arrows
686#pragma region Points
687
705 void draw_point_path(const godot::PackedVector3Array &path, const DebugDraw3D::PointType type = PointType::POINT_TYPE_SQUARE, const real_t &size = 0.25f, const godot::Color &points_color = Colors::empty_color, const godot::Color &lines_color = Colors::empty_color, const real_t &duration = 0) FAKE_FUNC_IMPL;
707 // #docs_func draw_point_path
708 NAPI void draw_point_path_c(const godot::Vector3 *path_data, const uint64_t &path_size, const DebugDraw3D::PointType type = PointType::POINT_TYPE_SQUARE, const real_t &size = 0.25f, const godot::Color &points_color = Colors::empty_color, const godot::Color &lines_color = Colors::empty_color, const real_t &duration = 0) FAKE_FUNC_IMPL;
709
710#pragma endregion // Points
711#pragma endregion // Lines
712
713#pragma region Misc
714
726 void draw_points(const godot::PackedVector3Array &points, const DebugDraw3D::PointType type = DebugDraw3D::PointType::POINT_TYPE_SQUARE, const real_t &size = 0.25f, const godot::Color &color = Colors::empty_color, const real_t &duration = 0) FAKE_FUNC_IMPL;
728 // #docs_func draw_points
729 NAPI void draw_points_c(const godot::Vector3 *points_data, const uint64_t &points_size, const DebugDraw3D::PointType type = DebugDraw3D::PointType::POINT_TYPE_SQUARE, const real_t &size = 0.25f, const godot::Color &color = Colors::empty_color, const real_t &duration = 0) FAKE_FUNC_IMPL;
730
739 NAPI void draw_square(const godot::Vector3 &position, const real_t &size = 0.2f, const godot::Color &color = Colors::empty_color, const real_t &duration = 0) FAKE_FUNC_IMPL;
740
753 NAPI void draw_plane(const godot::Plane &plane, const godot::Color &color = Colors::empty_color, const godot::Vector3 &anchor_point = godot::Vector3(INFINITY, INFINITY, INFINITY), const real_t &duration = 0) FAKE_FUNC_IMPL;
754
764 NAPI void draw_position(const godot::Transform3D &transform, const godot::Color &color = Colors::empty_color, const real_t &duration = 0) FAKE_FUNC_IMPL;
765
778 NAPI void draw_gizmo(const godot::Transform3D &transform, const godot::Color &color = Colors::empty_color, const bool &is_centered = false, const real_t &duration = 0) FAKE_FUNC_IMPL;
779
793 NAPI void draw_grid(const godot::Vector3 &origin, const godot::Vector3 &x_size, const godot::Vector3 &y_size, const godot::Vector2i &subdivision, const godot::Color &color = Colors::empty_color, const bool &is_centered = true, const real_t &duration = 0) FAKE_FUNC_IMPL;
794
806 NAPI void draw_grid_xf(const godot::Transform3D &transform, const godot::Vector2i &p_subdivision, const godot::Color &color = Colors::empty_color, const bool &is_centered = true, const real_t &duration = 0) FAKE_FUNC_IMPL;
807
808#pragma region Camera Frustum
809
819 NAPI void draw_camera_frustum(const class godot::Camera3D *camera, const godot::Color &color = Colors::empty_color, const real_t &duration = 0) FAKE_FUNC_IMPL;
820
828 void draw_camera_frustum_planes(const godot::Array &camera_frustum, const godot::Color &color = Colors::empty_color, const real_t &duration = 0) FAKE_FUNC_IMPL;
830 // #docs_func draw_camera_frustum_planes
831 NAPI void draw_camera_frustum_planes_c(const godot::Plane *camera_frustum_data, const uint64_t camera_frustum_size, const godot::Color &color = Colors::empty_color, const real_t &duration = 0) FAKE_FUNC_IMPL;
832
833#pragma endregion // Camera Frustum
834
835#pragma region Text
852 void draw_text(const godot::Vector3 &position, const godot::String text, const int size = 32, const godot::Color &color = Colors::empty_color, const real_t &duration = 0) FAKE_FUNC_IMPL;
854 // #docs_func draw_text
855 NAPI void draw_text_c(const godot::Vector3 &position, const char *text_string, const int size = 32, const godot::Color &color = Colors::empty_color, const real_t &duration = 0) FAKE_FUNC_IMPL;
856
857#pragma endregion // Text
858
859#pragma endregion // Misc
860#pragma endregion // Exposed Draw Methods
861
862#undef FAKE_FUNC_IMPL
863};
864
865VARIANT_ENUM_CAST(DebugDraw3D::PointType);
This is a class for storing part of the DebugDraw3D configuration.
Definition config_3d.h:18
This class is used to override scope parameters for DebugDraw3D.
Definition config_scope_3d.h:60
You can get statistics about 3D rendering from this class.
Definition stats_3d.h:25
Singleton class for calling debugging 3D methods.
Definition debug_draw_3d.h:121
NAPI void draw_ray(const godot::Vector3 &origin, const godot::Vector3 &direction, const real_t &length, const godot::Color &color=Colors::empty_color, const real_t &duration=0) FAKE_FUNC_IMPL
NAPI void draw_arrowhead(const godot::Transform3D &transform, const godot::Color &color=Colors::empty_color, const real_t &duration=0) FAKE_FUNC_IMPL
NAPI void draw_line_hit(const godot::Vector3 &start, const godot::Vector3 &end, const godot::Vector3 &hit, const bool &is_hit, const real_t &hit_size=0.25f, const godot::Color &hit_color=Colors::empty_color, const godot::Color &after_hit_color=Colors::empty_color, const real_t &duration=0) FAKE_FUNC_IMPL
NAPI void clear_all()
NAPI Ref< DebugDraw3DScopeConfig > new_scoped_config()
NAPI void draw_arrow(const godot::Vector3 &a, const godot::Vector3 &b, const godot::Color &color=Colors::empty_color, const real_t &arrow_size=0.5f, const bool &is_absolute_size=false, const real_t &duration=0) FAKE_FUNC_IMPL
NAPI void draw_position(const godot::Transform3D &transform, const godot::Color &color=Colors::empty_color, const real_t &duration=0) FAKE_FUNC_IMPL
NAPI void draw_box_xf(const godot::Transform3D &transform, const godot::Color &color=Colors::empty_color, const bool &is_box_centered=true, const real_t &duration=0) FAKE_FUNC_IMPL
NAPI void set_config(Ref< DebugDraw3DConfig > cfg)
void draw_text(const godot::Vector3 &position, const godot::String text, const int size=32, const godot::Color &color=Colors::empty_color, const real_t &duration=0) FAKE_FUNC_IMPL
NAPI void draw_capsule_ab(const godot::Vector3 &a, const godot::Vector3 &b, const real_t &radius=0.5f, const godot::Color &color=Colors::empty_color, const real_t &duration=0) FAKE_FUNC_IMPL
NAPI void set_debug_enabled(const bool &state)
PointType
Definition debug_draw_3d.h:136
void draw_arrow_path(const godot::PackedVector3Array &path, const godot::Color &color=Colors::empty_color, const real_t &arrow_size=0.75f, const bool &is_absolute_size=true, const real_t &duration=0) FAKE_FUNC_IMPL
NAPI void draw_cylinder(const godot::Transform3D &transform, const godot::Color &color=Colors::empty_color, const real_t &duration=0) FAKE_FUNC_IMPL
NAPI Ref< DebugDraw3DStats > get_render_stats()
NAPI void draw_sphere_xf(const godot::Transform3D &transform, const godot::Color &color=Colors::empty_color, const real_t &duration=0) FAKE_FUNC_IMPL
NAPI void draw_grid_xf(const godot::Transform3D &transform, const godot::Vector2i &p_subdivision, const godot::Color &color=Colors::empty_color, const bool &is_centered=true, const real_t &duration=0) FAKE_FUNC_IMPL
NAPI void draw_box(const godot::Vector3 &position, const godot::Quaternion &rotation, const godot::Vector3 &size, const godot::Color &color=Colors::empty_color, const bool &is_box_centered=false, const real_t &duration=0) FAKE_FUNC_IMPL
Color get_empty_color() const
NAPI void draw_box_ab(const godot::Vector3 &a, const godot::Vector3 &b, const godot::Vector3 &up, const godot::Color &color=Colors::empty_color, const bool &is_ab_diagonal=true, const real_t &duration=0) FAKE_FUNC_IMPL
NAPI void draw_plane(const godot::Plane &plane, const godot::Color &color=Colors::empty_color, const godot::Vector3 &anchor_point=godot::Vector3(INFINITY, INFINITY, INFINITY), const real_t &duration=0) FAKE_FUNC_IMPL
void draw_points(const godot::PackedVector3Array &points, const DebugDraw3D::PointType type=DebugDraw3D::PointType::POINT_TYPE_SQUARE, const real_t &size=0.25f, const godot::Color &color=Colors::empty_color, const real_t &duration=0) FAKE_FUNC_IMPL
NAPI void draw_arrow_ray(const godot::Vector3 &origin, const godot::Vector3 &direction, const real_t &length, const godot::Color &color=Colors::empty_color, const real_t &arrow_size=0.5f, const bool &is_absolute_size=false, const real_t &duration=0) FAKE_FUNC_IMPL
NAPI void draw_square(const godot::Vector3 &position, const real_t &size=0.2f, const godot::Color &color=Colors::empty_color, const real_t &duration=0) FAKE_FUNC_IMPL
NAPI void draw_line(const godot::Vector3 &a, const godot::Vector3 &b, const godot::Color &color=Colors::empty_color, const real_t &duration=0) FAKE_FUNC_IMPL
NAPI void draw_cylinder_ab(const godot::Vector3 &a, const godot::Vector3 &b, const real_t &radius=0.5f, const godot::Color &color=Colors::empty_color, const real_t &duration=0) FAKE_FUNC_IMPL
NAPI void draw_aabb_ab(const godot::Vector3 &a, const godot::Vector3 &b, const godot::Color &color=Colors::empty_color, const real_t &duration=0) FAKE_FUNC_IMPL
NAPI Ref< DebugDraw3DScopeConfig > scoped_config() override
NAPI void draw_camera_frustum(const class godot::Camera3D *camera, const godot::Color &color=Colors::empty_color, const real_t &duration=0) FAKE_FUNC_IMPL
void draw_camera_frustum_planes(const godot::Array &camera_frustum, const godot::Color &color=Colors::empty_color, const real_t &duration=0) FAKE_FUNC_IMPL
void draw_line_path(const godot::PackedVector3Array &path, const godot::Color &color=Colors::empty_color, const real_t &duration=0) FAKE_FUNC_IMPL
NAPI void draw_capsule(const godot::Vector3 &position, const godot::Quaternion &rotation, const real_t &radius, const real_t &height, const godot::Color &color=Colors::empty_color, const real_t &duration=0) FAKE_FUNC_IMPL
void draw_point_path(const godot::PackedVector3Array &path, const DebugDraw3D::PointType type=PointType::POINT_TYPE_SQUARE, const real_t &size=0.25f, const godot::Color &points_color=Colors::empty_color, const godot::Color &lines_color=Colors::empty_color, const real_t &duration=0) FAKE_FUNC_IMPL
NAPI void draw_gizmo(const godot::Transform3D &transform, const godot::Color &color=Colors::empty_color, const bool &is_centered=false, const real_t &duration=0) FAKE_FUNC_IMPL
NAPI Ref< DebugDraw3DConfig > get_config() const
NAPI void draw_grid(const godot::Vector3 &origin, const godot::Vector3 &x_size, const godot::Vector3 &y_size, const godot::Vector2i &subdivision, const godot::Color &color=Colors::empty_color, const bool &is_centered=true, const real_t &duration=0) FAKE_FUNC_IMPL
NAPI void draw_line_hit_offset(const godot::Vector3 &start, const godot::Vector3 &end, const bool &is_hit, const real_t &unit_offset_of_hit=0.5f, const real_t &hit_size=0.25f, const godot::Color &hit_color=Colors::empty_color, const godot::Color &after_hit_color=Colors::empty_color, const real_t &duration=0) FAKE_FUNC_IMPL
NAPI Ref< DebugDraw3DStats > get_render_stats_for_world(godot::Viewport *viewport)
NAPI void draw_aabb(const godot::AABB &aabb, const godot::Color &color=Colors::empty_color, const real_t &duration=0) FAKE_FUNC_IMPL
static DebugDraw3D * get_singleton()
Definition debug_draw_3d.h:271
NAPI void draw_sphere(const godot::Vector3 &position, const real_t &radius=0.5f, const godot::Color &color=Colors::empty_color, const real_t &duration=0) FAKE_FUNC_IMPL
void draw_lines(const godot::PackedVector3Array &lines, const godot::Color &color=Colors::empty_color, const real_t &duration=0) FAKE_FUNC_IMPL
NAPI void regenerate_geometry_meshes()
The main singleton class that handles DebugDraw2D and DebugDraw3D.
Definition debug_draw_manager.h:55