stk-code_catmod/lib/graphics_engine/include/ge_vulkan_scene_manager.hpp

68 lines
3.4 KiB
C++
Raw Normal View History

2022-06-06 22:34:08 -04:00
#ifndef HEADER_GE_VULKAN_SCENE_MANAGER_HPP
#define HEADER_GE_VULKAN_SCENE_MANAGER_HPP
#include "../source/Irrlicht/CSceneManager.h"
2022-07-18 01:28:07 -04:00
#include <memory>
#include <map>
2022-06-06 22:34:08 -04:00
namespace GE
{
2022-07-18 01:28:07 -04:00
class GEVulkanCameraSceneNode;
class GEVulkanDrawCall;
2022-06-06 22:34:08 -04:00
class GEVulkanSceneManager : public irr::scene::CSceneManager
{
private:
2022-07-18 01:28:07 -04:00
std::map<GEVulkanCameraSceneNode*, std::unique_ptr<GEVulkanDrawCall> > m_draw_calls;
// ------------------------------------------------------------------------
void drawAllInternal();
2022-06-06 22:34:08 -04:00
public:
// ------------------------------------------------------------------------
GEVulkanSceneManager(irr::video::IVideoDriver* driver,
irr::io::IFileSystem* fs,
irr::gui::ICursorControl* cursor_control,
irr::gui::IGUIEnvironment* gui_environment);
// ------------------------------------------------------------------------
~GEVulkanSceneManager();
// ------------------------------------------------------------------------
2022-06-16 00:00:15 -04:00
virtual irr::scene::ICameraSceneNode* addCameraSceneNode(
irr::scene::ISceneNode* parent = 0,
const irr::core::vector3df& position = irr::core::vector3df(0, 0, 0),
const irr::core::vector3df& lookat = irr::core::vector3df(0, 0, 100),
irr::s32 id = -1, bool make_active = true);
// ------------------------------------------------------------------------
virtual irr::scene::IAnimatedMeshSceneNode* addAnimatedMeshSceneNode(
irr::scene::IAnimatedMesh* mesh, irr::scene::ISceneNode* parent = NULL,
irr::s32 id = -1,
const irr::core::vector3df& position = irr::core::vector3df(0, 0, 0),
const irr::core::vector3df& rotation = irr::core::vector3df(0, 0, 0),
const irr::core::vector3df& scale = irr::core::vector3df(1.0f, 1.0f, 1.0f),
bool alsoAddIfMeshPointerZero = false);
// ------------------------------------------------------------------------
virtual irr::scene::IMeshSceneNode* addMeshSceneNode(irr::scene::IMesh* mesh,
irr::scene::ISceneNode* parent = NULL, irr::s32 id = -1,
const irr::core::vector3df& position = irr::core::vector3df(0, 0, 0),
const irr::core::vector3df& rotation = irr::core::vector3df(0, 0, 0),
const irr::core::vector3df& scale = irr::core::vector3df(1.0f, 1.0f, 1.0f),
bool alsoAddIfMeshPointerZero = false);
2022-07-18 01:28:07 -04:00
// ------------------------------------------------------------------------
2022-07-21 00:26:06 -04:00
virtual void clear();
// ------------------------------------------------------------------------
2022-07-18 01:28:07 -04:00
virtual void drawAll(irr::u32 flags = 0xFFFFFFFF);
// ------------------------------------------------------------------------
virtual irr::u32 registerNodeForRendering(irr::scene::ISceneNode* node,
irr::scene::E_SCENE_NODE_RENDER_PASS pass = irr::scene::ESNRP_AUTOMATIC);
// ------------------------------------------------------------------------
void addDrawCall(GEVulkanCameraSceneNode* cam);
// ------------------------------------------------------------------------
void removeDrawCall(GEVulkanCameraSceneNode* cam);
2022-07-19 03:56:08 -04:00
// ------------------------------------------------------------------------
std::map<GEVulkanCameraSceneNode*, std::unique_ptr<GEVulkanDrawCall> >&
getDrawCalls() { return m_draw_calls; }
2022-06-06 22:34:08 -04:00
}; // GEVulkanSceneManager
}
#endif