Engine
scene.h
1 #ifndef SCENE
2 #define SCENE
3 
4 #include <physics_entity.h>
5 #include <model.h>
6 #include <memory>
7 #include <vector3G.h>
8 #include <time_integrator.h>
9 #include <shader.h>
10 #include <camera.h>
11 #include <GLFW/glfw3.h>
12 #include <net_force_accumulator.h>
13 #include <spring.h>
14 #include <light.h>
15 
21 class Scene
22 {
23  private:
24  std::vector<std::shared_ptr<PhysicsEntity>> m_physics_entity_ptrs;
25  std::vector<std::shared_ptr<Model>> m_model_ptrs;
26  std::shared_ptr<TimeIntegrator> m_time_integrator;
27 
28  NetForceAccumulator m_net_force_accumulator;
29 
30  Light m_light;
31  public :
35  Scene();
36 
42  Scene(std::shared_ptr<TimeIntegrator> integrator, NetForceAccumulator net_force_accumulator);
43 
48  void AddPhysicsEntity(std::shared_ptr<PhysicsEntity> entity_ptr);
49 
55  void GetPhysicsEntity(const GLuint index, std::shared_ptr<PhysicsEntity> &entity_ptr);
56 
61  void AddModel(std::shared_ptr<Model> model_ptr);
62 
69  void GetModel(const GLuint index, std::shared_ptr<Model> &model_ptr, GLuint &VAO);
70 
74  GLuint GetPhysicsEntityCount();
75 
79  GLuint GetModelCount();
80 
85  void AddSpring(Spring spring);
86 
91  void SetLight(Light light);
92 
96  void StepPhysics();
97 
103  void Render(Shader shader, Vector3Gf view_pos);
104 
108  void CleanUp();
109 };
110 #endif
void AddModel(std::shared_ptr< Model > model_ptr)
Definition: scene.cpp:28
void Render(Shader shader, Vector3Gf view_pos)
Definition: scene.cpp:74
Definition: shader.h:13
data structure that represents a spring
Definition: spring.h:10
Scene()
Definition: scene.cpp:7
GLuint GetModelCount()
Definition: scene.cpp:44
void CleanUp()
Definition: scene.cpp:116
Definition: light.h:5
void GetModel(const GLuint index, std::shared_ptr< Model > &model_ptr, GLuint &VAO)
Definition: scene.cpp:33
void AddPhysicsEntity(std::shared_ptr< PhysicsEntity > entity_ptr)
Definition: scene.cpp:18
void StepPhysics()
Definition: scene.cpp:59
A scene in the engine.
Definition: scene.h:21
void AddSpring(Spring spring)
Definition: scene.cpp:49
GLuint GetPhysicsEntityCount()
Definition: scene.cpp:39
void GetPhysicsEntity(const GLuint index, std::shared_ptr< PhysicsEntity > &entity_ptr)
Definition: scene.cpp:23
void SetLight(Light light)
Definition: scene.cpp:54
Definition: net_force_accumulator.h:14