Editing the modelimporter to allow to create scene graphs

This commit is contained in:
2022-07-08 21:35:14 +02:00
parent 85f9c78adf
commit b7e3465406
19 changed files with 241 additions and 256 deletions

View File

@ -0,0 +1,21 @@
#pragma once
#include <string>
#include <vector>
#include "Graphics/Transform.h"
class Node {
public:
std::string& name;
Node* parent;
std::vector<Node*> children;
void addChild(Node& node);
};
class Group : Node {
Transform& transform;
};

View File

@ -0,0 +1,14 @@
#pragma once
#include "Graphics/Renderable.h"
#include "Scene/SceneNodeTypes.h"
#include <glm/glm.hpp>
/*
* Define a helper class to more easily build a proper scene
*/
static class SceneBuilder {
static Group* AddGroup(std::string name);
static SceneObject* AddVisual(std::string name, Renderable& object, glm::vec3 position );
};

View File

@ -0,0 +1,15 @@
#pragma once
#include <string>
#include <map>
#include "Scene.h"
static class SceneManager {
public:
static Scene* CreateScene();
static Scene& GetScene(std::string name);
private:
static std::map<std::string , Scene*>
};

View File

@ -0,0 +1,21 @@
#pragma once
#include "Graphics/Camera.h"
#include "Graphics/Renderable.h"
#include "Scene/Node.h"
class SceneCamera : Group
{
Camera& camera;
};
class SceneObject : Group
{
Renderable& renderable;
};