Blowbox 2017
A 3D Game Engine by Riko Ophorst using DirectX 12
|
#include <scene_manager.h>
Public Member Functions | |
SceneManager () | |
~SceneManager () | |
SharedPtr< Entity > | GetRootEntity () |
Vector< SharedPtr< Entity > > & | GetEntities () |
const Vector< SharedPtr< Entity > > & | GetEntities () const |
void | SetMainCamera (SharedPtr< Camera > camera) |
SharedPtr< Camera > | GetMainCamera () |
Protected Member Functions | |
void | Startup () |
void | Update () |
void | PostUpdate () |
void | Shutdown () |
void | AddEntity (SharedPtr< Entity > entity) |
void | RemoveEntity (SharedPtr< Entity > entity) |
Private Attributes | |
SharedPtr< Entity > | root_entity_ |
Vector< SharedPtr< Entity > > | all_entities_ |
Queue< SharedPtr< Entity > > | entities_to_be_added_ |
Queue< SharedPtr< Entity > > | entities_to_be_removed_ |
SharedPtr< Camera > | main_camera_ |
Friends | |
class | BlowboxCore |
class | EntityFactory |
class | Entity |
Manages the entire scene.
Manages the entire scene. It keeps a list of all Entity instances and updates them accordingly. It also keeps track of the root of the scene graph. It also stores stuff like all the lights in the scene and it also keeps track of the main Camera.
blowbox::SceneManager::SceneManager | ( | ) |
Constructs the SceneManager.
blowbox::SceneManager::~SceneManager | ( | ) |
Destructs the SceneManager.
Adds an Entity and all of its children to the scene.
[in] | entity | The entity to add to the scene. |
Const version of SceneManager::GetEntities().
|
protected |
PostUpdates the entire scene.
Removes an Entity and all of its children from the scene.
[in] | entity | The entity to remove from the scene. |
|
protected |
Shuts down the entire scene.
|
protected |
Starts up the entire scene.
|
protected |
Updates the entire scene.
All Entity instances in the scene.
Queue for Entity instances that need to be added to the scene.
Queue for Entity instances that need to be removed from the scene.