nigel
8cc6ed1f15
* Rendering 2 cubes * per cube transform panels * Updated TODO.md * Updated README.md
48 lines
585 B
C++
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;
|
|
|
|
};
|
|
|