Debug Draw 3D (and 2D) 1.3.0
Draw 3D debug graphics and 2D overlays with this add-on.
Loading...
Searching...
No Matches
config_scope_3d.h
1#pragma once
2
3#include "utils/compiler.h"
4
5#include <functional>
6
7GODOT_WARNING_DISABLE()
8#include <godot_cpp/classes/ref_counted.hpp>
9GODOT_WARNING_RESTORE()
10using namespace godot;
11
32class DebugDraw3DScopeConfig : public RefCounted {
33 GDCLASS(DebugDraw3DScopeConfig, RefCounted)
34
35protected:
37 static void _bind_methods();
38
39private:
40 uint64_t thread_id;
41 uint64_t guard_id;
42
43 typedef std::function<void(uint64_t, uint64_t)> unregister_func;
44 unregister_func unregister_action;
45
46 // Update constructor!
47 real_t thickness;
48 real_t center_brightness;
49 bool hd_sphere;
50 real_t plane_size;
51
52public:
54 // It can be used for example in C#
55 void _manual_unregister();
56
62 Ref<DebugDraw3DScopeConfig> set_thickness(real_t value);
63 real_t get_thickness();
64
70 Ref<DebugDraw3DScopeConfig> set_center_brightness(real_t value);
71 real_t get_center_brightness();
72
78 Ref<DebugDraw3DScopeConfig> set_hd_sphere(bool value);
79 bool is_hd_sphere();
80
86 Ref<DebugDraw3DScopeConfig> set_plane_size(real_t value);
87 real_t get_plane_size();
88
91
92 // `DDScopedConfig3D` is passed as Ref to avoid a random unreference
94 DebugDraw3DScopeConfig(const uint64_t &p_thread_id, const uint64_t &p_guard_id, const DebugDraw3DScopeConfig *parent, const unregister_func p_unreg);
96};
This class is used to override scope parameters for DebugDraw3D.
Definition config_scope_3d.h:32
Ref< DebugDraw3DScopeConfig > set_hd_sphere(bool value)
Ref< DebugDraw3DScopeConfig > set_center_brightness(real_t value)
Ref< DebugDraw3DScopeConfig > set_plane_size(real_t value)
Ref< DebugDraw3DScopeConfig > set_thickness(real_t value)