40 lines
751 B
C++
40 lines
751 B
C++
#ifndef SCENE_H
|
|
#define SCENE_H
|
|
|
|
#include "mesh.h"
|
|
#include "material.h"
|
|
#include <glew/glew.h>
|
|
|
|
class Camera;
|
|
|
|
class Scene
|
|
{
|
|
typedef struct s_entity
|
|
{
|
|
Material mat;
|
|
Mesh mesh;
|
|
s_entity* parent;
|
|
glm::mat4 modelMatrix;
|
|
s_entity(s_entity* myParent, Mesh &myMesh, Material &myMat)
|
|
{
|
|
parent = myParent;
|
|
mesh = myMesh;
|
|
mat = myMat;
|
|
}
|
|
} Entity;
|
|
|
|
// lights
|
|
std::vector<Entity*> entities;
|
|
Camera* camera;
|
|
public:
|
|
Scene();
|
|
~Scene();
|
|
void addEntity(Mesh& mesh, Material& mat);
|
|
void addEntity(Mesh& mesh);
|
|
void drawEntities(GLuint programId);
|
|
void setCamera(Camera* myCamera);
|
|
Camera* getCamera();
|
|
};
|
|
|
|
#endif // SCENE_H
|