stuff-from-scratch/src/visual_elements/Scene.h

34 lines
538 B
C
Raw Normal View History

2022-11-14 11:19:51 +00:00
#pragma once
#include <vector>
2022-11-14 13:07:11 +00:00
#include <memory>
2022-11-14 11:19:51 +00:00
class VisualLayer;
2022-11-14 13:07:11 +00:00
class TriMesh;
class RectangleNode;
template <typename T>
class Image;
2022-11-14 11:19:51 +00:00
class Scene
{
public:
Scene() = default;
2022-11-14 13:07:11 +00:00
void syncLayers(const std::vector<VisualLayer*>& layers);
void update(Image<unsigned char>* image = nullptr);
unsigned getNumMeshes() const;
TriMesh* getMesh(std::size_t idx) const;
2022-11-14 11:19:51 +00:00
private:
2022-11-14 13:07:11 +00:00
void processRectangleNode(RectangleNode* node);
std::vector<TriMesh*> mWorkingMeshs;
2022-11-14 11:19:51 +00:00
std::vector<VisualLayer*> mLayers;
};