Debug Draw 3D (and 2D) 1.4.0
Draw 3D debug graphics and 2D overlays with this add-on.
Loading...
Searching...
No Matches
config_3d.h
1#pragma once
2
3#include "common/colors.h"
4#include "utils/compiler.h"
5
6GODOT_WARNING_DISABLE()
7#include <godot_cpp/classes/ref_counted.hpp>
8GODOT_WARNING_RESTORE()
9using namespace godot;
10
17class DebugDraw3DConfig : public RefCounted {
18 GDCLASS(DebugDraw3DConfig, RefCounted)
19
20private:
21 int32_t geometry_render_layers = 1;
22 bool freeze_3d_render = false;
23 bool visible_instance_bounds = false;
24 bool use_frustum_culling = true;
25 real_t frustum_length_scale = 0;
26 bool force_use_camera_from_scene = false;
27 Color line_hit_color = Colors::red;
28 Color line_after_hit_color = Colors::green;
29
30protected:
32 static void _bind_methods();
33
34public:
39 void set_freeze_3d_render(const bool &_state);
40 bool is_freeze_3d_render() const;
41
46 void set_visible_instance_bounds(const bool &_state);
47 bool is_visible_instance_bounds() const;
48
52 void set_use_frustum_culling(const bool &_state);
53 bool is_use_frustum_culling() const;
54
58 void set_frustum_length_scale(const real_t &_distance);
59 real_t get_frustum_length_scale() const;
60
64 void set_force_use_camera_from_scene(const bool &_state);
65 bool is_force_use_camera_from_scene() const;
66
71 void set_geometry_render_layers(const int32_t &_layers);
72 int32_t get_geometry_render_layers() const;
73
77 void set_line_hit_color(const Color &_new_color);
78 Color get_line_hit_color() const;
79
83 void set_line_after_hit_color(const Color &_new_color);
84 Color get_line_after_hit_color() const;
85};
This is a class for storing part of the DebugDraw3D configuration.
Definition config_3d.h:17
void set_line_hit_color(const Color &_new_color)
void set_frustum_length_scale(const real_t &_distance)
void set_geometry_render_layers(const int32_t &_layers)
void set_force_use_camera_from_scene(const bool &_state)
void set_freeze_3d_render(const bool &_state)
void set_visible_instance_bounds(const bool &_state)
void set_line_after_hit_color(const Color &_new_color)
void set_use_frustum_culling(const bool &_state)