YoggieEngine/BarinkEngine/Include/Scene.h
nigel 8cc6ed1f15 Multiple changes to prepare for the basic render engine.
* Rendering 2 cubes
* per cube transform panels
* Updated TODO.md
* Updated README.md
2022-05-28 21:19:16 +02:00

48 lines
585 B
C++

#pragma once
#include <string>
#include <vector>
#include "glm/glm.hpp"
/*
* Scene should be a description of a game world
*/
struct Transform {
glm::vec3 Position;
glm::vec3 Rotation;
glm::vec3 Scale;
glm::mat4 ModelMatrix;
};
class SceneNode {
public:
std::string name;
Transform transform;
SceneNode* parent;
std::vector<SceneNode*> children;
void addChild(SceneNode& node);
};
class Scene {
public:
SceneNode& GetSceneNode(std::string);
SceneNode& GetRoot();
Scene(std::string SceneName = "Default Scene");
~Scene();
private:
SceneNode* root;
};