COSC-3P93-Project/Step 3/include/graphics/debug_gui.h

56 lines
1.4 KiB
C
Raw Normal View History

/*
* Created by Brett Terpstra 6920201 on 30/10/22.
* Copyright (c) 2022 Brett Terpstra. All Rights Reserved.
*/
#ifndef STEP_3_DEBUG_GUI_H
#define STEP_3_DEBUG_GUI_H
#include <functional>
#include <memory>
#include <string>
#include <engine/math/bvh.h>
2022-12-13 17:36:01 -05:00
/**
* This stuff can safely be ignored as it is purely for me to debug
*/
namespace Raytracing {
class DebugUI {
public:
static void render(const std::function<void()>& generalTab);
2022-12-13 17:36:01 -05:00
static void registerTab(const std::string& name, const std::function<void()>& tabFunc);
};
class DebugObject {
public:
virtual void render() = 0;
};
2022-12-13 17:36:01 -05:00
class DebugMenus {
public:
static void add(const std::shared_ptr<DebugObject>& object);
2022-12-13 17:36:01 -05:00
static void remove(DebugObject* object);
2022-12-13 17:36:01 -05:00
static void render();
};
2022-12-13 17:36:01 -05:00
class DebugBVH : public DebugObject {
private:
2022-12-13 17:36:01 -05:00
BVHTree* m_bvhTree = nullptr;
TriangleBVHTree* m_triangleBVHTree = nullptr;
Shader& m_shader;
public:
explicit DebugBVH(BVHTree* bvhTree, Shader& shader);
2022-12-13 17:36:01 -05:00
explicit DebugBVH(TriangleBVHTree* bvhTree, Shader& shader);
2022-12-13 17:36:01 -05:00
void render();
2022-12-13 17:36:01 -05:00
~DebugBVH();
};
}
#endif //STEP_3_DEBUG_GUI_H