8#include <entt/entity/registry.hpp>
9#include <SDL3/SDL_gpu.h>
19 const Float4 &color = 0x40FF00CC_rgbaf);
22 const Camera &camera,
const AABB &aabb,
23 const Float4 &color = 0x00BFFFff_rgbaf);
26 const Camera &camera,
const coal::OBB &obb,
27 const Float4 &color = 0x00BFFFff_rgbaf);
41 std::variant<AABB, coal::OBB>
bounds;
49 entt::registry &_registry;
55 entt::registry &
registry() {
return _registry; }
56 const entt::registry &
registry()
const {
return _registry; }
58 std::tuple<entt::entity, DebugFrustumComponent &>
63 return {entity, item};
66 template <
typename BoundsType>
67 std::tuple<entt::entity, DebugBoundsComponent &>
71 return {entity, item};
76 void release() noexcept { pipeline.release(); }
80static_assert(Scene<FrustumBoundsDebugSystem>);
Definition CommandBuffer.h:16
std::tuple< entt::entity, DebugFrustumComponent & > addFrustum(const Camera &otherCam, Float4 color=0x00BFFFff_rgbaf)
Definition Frustum.h:59
FrustumBoundsDebugSystem(entt::registry ®istry, const RenderContext &renderer)
void update()
Definition Frustum.h:78
std::tuple< entt::entity, DebugBoundsComponent & > addBounds(const BoundsType &bounds)
Definition Frustum.h:68
void render(CommandBuffer &cmdBuf, const Camera &camera)
const entt::registry & registry() const
Definition Frustum.h:56
void release() noexcept
Definition Frustum.h:76
entt::registry & registry()
Definition Frustum.h:55
Class representing a graphics pipeline.
Definition GraphicsPipeline.h:15
void renderFrustum(CommandBuffer &cmdBuf, SDL_GPURenderPass *render_pass, const Camera &mainCamera, const Camera &otherCam, const Float4 &color=0x40FF00CC_rgbaf)
void renderOBB(CommandBuffer &cmdBuf, SDL_GPURenderPass *render_pass, const Camera &camera, const coal::OBB &obb, const Float4 &color=0x00BFFFff_rgbaf)
void renderAABB(CommandBuffer &cmdBuf, SDL_GPURenderPass *render_pass, const Camera &camera, const AABB &aabb, const Float4 &color=0x00BFFFff_rgbaf)
GraphicsPipeline createFrustumDebugPipeline(const RenderContext &renderer)
Eigen::Vector3f Float3
Definition math_types.h:8
Eigen::Vector4f Float4
Definition math_types.h:9
Eigen::Matrix< float, 4, 1, Eigen::DontAlign > GpuVec4
Definition math_types.h:19
Eigen::Matrix4f Mat4f
Definition math_types.h:11
The main way of using a camera to render things.
Definition Camera.h:19
GpuVec4 color
Definition Frustum.h:42
std::variant< AABB, coal::OBB > bounds
Definition Frustum.h:41
Camera const * otherCam
Definition Frustum.h:36
GpuVec4 color
Definition Frustum.h:37
RAII wrapper for SDL_GPUDevice.
Definition Device.h:17
The RenderContext class provides a rendering context for a graphical application.
Definition RenderContext.h:36