Engine → Renderer → debug_draw.h
debug_draw_buffer¶
| Type | Class |
| Namespace | conjure::renderer |
| Include File Path | engine/include/conjure/renderer/debug_draw.h |
| Source File Path | engine/src/renderer/debug_draw.cpp |
| API ↗ | Rendering, Rendering a frame |
Syntax¶
Constructors¶
| Access | Signature | Description |
|---|---|---|
| public | debug_draw_buffer(); | |
| public | debug_draw_buffer(
const debug_draw_buffer &) = default; | |
| public | debug_draw_buffer(
debug_draw_buffer &&) noexcept = default; |
Destructors¶
| Access | Signature | Description |
|---|---|---|
| public | ~debug_draw_buffer(); |
Variables¶
| Access | Name | Type | Default | Description |
|---|---|---|---|---|
| private | mDepthTested | std:: | {} | |
| private | mDropped | u32 | 0 | |
| private | mOverlay | std:: | {} |
Functions¶
Public¶
append¶
append¶void append(
const debug_draw_buffer &other);Appends every vertex of another buffer and adds its dropped count to this one's.
axes¶
axes¶void axes(
const math::mat4 &worldFromLocal,
f32 length = 1.0f,
debug_depth depth = debug_depth::TESTED);Three axis lines (red X, green Y, blue Z) of length from the origin of a transform.
box¶
box¶void box(
const math::aabb &box,
const math::vec4 &colour,
debug_depth depth = debug_depth::TESTED);The twelve edges of a box (24 vertices). An invalid box adds nothing.
depth_tested¶
depth_tested¶[[nodiscard]] std::span<const debug_vertex> depth_tested() const noexcept;dropped_count¶
dropped_count¶[[nodiscard]] u32 dropped_count() const noexcept;Vertices refused because a list was at MAX_DEBUG_VERTICES.
empty¶
empty¶[[nodiscard]] bool empty() const noexcept;frustum¶
frustum¶void frustum(
const math::mat4 &clipFromWorld,
const math::vec4 &colour,
debug_depth depth = debug_depth::TESTED);The twelve edges of the view volume of a clip-from-world matrix (24 vertices).
grid¶
grid¶void grid(
const math::vec3 ¢re,
u32 halfLines,
f32 spacing,
const math::vec4 &colour,
debug_depth depth = debug_depth::TESTED);A grid in the XZ plane centred on centre: (2 * halfLines + 1) lines along each axis, spacing apart.
line¶
line¶void line(
const math::vec3 &a,
const math::vec3 &b,
const math::vec4 &colour,
debug_depth depth = debug_depth::TESTED);One line from a to b.
overlay¶
overlay¶[[nodiscard]] std::span<const debug_vertex> overlay() const noexcept;sphere¶
sphere¶void sphere(
const math::vec3 ¢re,
f32 radius,
const math::vec4 &colour,
debug_depth depth = debug_depth::TESTED,
u32 segments = 24);Three great circles of segments lines each.
Private¶
push_line¶
push_line¶void push_line(
const math::vec3 &a,
const math::vec3 &b,
u32 packed,
debug_depth depth);Operator Overloads¶
Public¶
operator=¶
operator=¶debug_draw_buffer &operator=(
const debug_draw_buffer &) = default;debug_draw_buffer &operator=(
debug_draw_buffer &&) noexcept = default;