A scene in the engine.
More...
#include <scene.h>
A scene in the engine.
A scene contains (pointers to) a number of PhysicsEntity objects to simululate and a number of Model objects to render.
Creates a Scene instance with the provided TimeIntegrator and ForceGenerator members
- Parameters
-
integrator | TimeIngrator instance to handle time evolution of the PhysicsEntities in the scene |
net_force_accumulator | NetForceAccumulator used to compute net forces acting on PhysicsEntities in the scene |
void Scene::AddModel |
( |
std::shared_ptr< Model > |
model_ptr | ) |
|
Adds a Model to the scene
- Parameters
-
model_ptr | a shared pointer to the model to be added to the scene |
void Scene::AddPhysicsEntity |
( |
std::shared_ptr< PhysicsEntity > |
entity_ptr | ) |
|
void Scene::AddSpring |
( |
Spring |
spring | ) |
|
Adds a spring connecting two entities in the scene
- Parameters
-
Removes all Model data from the GPU
void Scene::GetModel |
( |
const GLuint |
index, |
|
|
std::shared_ptr< Model > & |
model_ptr, |
|
|
GLuint & |
VAO |
|
) |
| |
Loads the Model at the given index into the supplied shared pointer
- Parameters
-
index | index into the Model list for this Scene |
model_ptr | pointer that will be modifed to point to the Model at the given index |
VAO | uint that will be modifed to store the vertex array object id for the Model |
GLuint Scene::GetModelCount |
( |
| ) |
|
- Returns
- The number of Models in the Scene
void Scene::GetPhysicsEntity |
( |
const GLuint |
index, |
|
|
std::shared_ptr< PhysicsEntity > & |
entity_ptr |
|
) |
| |
Loads the PhysicsEntity at the given index into the supplied shared pointer
- Parameters
-
GLuint Scene::GetPhysicsEntityCount |
( |
| ) |
|
- Returns
- The number of Physics Entites in the Scene
void Scene::Render |
( |
Shader |
shader, |
|
|
Vector3Gf |
view_pos |
|
) |
| |
Renders the Models in the Scene to the screen
- Parameters
-
shader | shader to use to render scene |
view_pos | position scene is being viewed from |
void Scene::SetLight |
( |
Light |
light | ) |
|
Sets the light for the scene
- Parameters
-
void Scene::StepPhysics |
( |
| ) |
|
Moves the physical simulation one time step forward
The documentation for this class was generated from the following files: