Sly Engine
Scene Class Referenceabstract

#include <Scene.h>

Inheritance diagram for Scene:
Inheritance graph
Collaboration diagram for Scene:
Collaboration graph

Public Member Functions

 Scene ()
 Default constructor. More...
 
 Scene (const Scene &)=delete
 Copy constructor. More...
 
 Scene (Scene &&)=delete
 Move constructor. More...
 
Scene & operator= (const Scene &)=delete
 Assignment operator. More...
 
Scene & operator= (Scene &&)=delete
 Move assignment operator. More...
 
virtual ~Scene ()
 Deconstructor. More...
 
virtual void Initialize ()=0
 Initializes the scene. Put scene related startup here. More...
 
virtual void SceneEnd ()=0
 Shuts down the scene. Put scene related end tasks here. More...
 
Camera * GetCamera ()
 Gets the camera. More...
 
Camera * Get2DCamera ()
 Gets the Camera Manager's 2D camera. More...
 
void SetCurrentCamera (Camera *newCamera)
 Sets current camera. More...
 
void SetCurrent2DCamera (Camera *newCamera)
 Sets current 2D camera. More...
 
void ProcessGodCam ()
 Process the god camera. More...
 
void RequestGodCam ()
 Request god camera be present in the current scene. More...
 
- Public Member Functions inherited from UpdatableManager
 UpdatableManager ()
 Default constructor. More...
 
 UpdatableManager (const UpdatableManager &)=delete
 Copy constructor. More...
 
 UpdatableManager (UpdatableManager &&)=delete
 Move constructor. More...
 
UpdatableManager & operator= (const UpdatableManager &)=delete
 Assignment operator. More...
 
UpdatableManager & operator= (UpdatableManager &&)=delete
 Move assignment operator. More...
 
 ~UpdatableManager ()
 Deconstructor. More...
 
void ProcessElements ()
 Process the elements. More...
 
void Register (Updatable *up, UpdatableManager::StorageListRef &pStorageDeleteRef)
 Registers this. More...
 
void Deregister (Updatable *up)
 Deregisters this. More...
 
- Public Member Functions inherited from DrawableManager
 DrawableManager ()
 Default constructor. More...
 
 DrawableManager (const DrawableManager &)=delete
 Copy constructor. More...
 
 DrawableManager (DrawableManager &&)=delete
 Move constructor. More...
 
DrawableManager & operator= (const DrawableManager &)=delete
 Assignment operator. More...
 
DrawableManager & operator= (DrawableManager &&)=delete
 Move assignment operator. More...
 
 ~DrawableManager ()
 Deconstructor. More...
 
void ProcessElements ()
 Process the elements. More...
 
void Register (Drawable *dr, StorageListRef &pStorageDeleteRef)
 Registers this. More...
 
void Deregister (Drawable *dr)
 Deregisters this. More...
 
- Public Member Functions inherited from AlarmableManager
 AlarmableManager ()
 Default constructor. More...
 
 AlarmableManager (const AlarmableManager &)=delete
 Copy constructor. More...
 
 AlarmableManager (AlarmableManager &&)=delete
 Move constructor. More...
 
AlarmableManager & operator= (const AlarmableManager &)=delete
 Assignment operator. More...
 
AlarmableManager & operator= (AlarmableManager &&)=delete
 Move assignment operator. More...
 
 ~AlarmableManager ()
 Deconstructor. More...
 
void ProcessAlarms ()
 Process the alarms. More...
 
void Register (float deltaT, Alarmable *al, AlarmableManager::ALARM_ID inputId, StorageEntryRef &ref)
 Registers this. More...
 
void Deregister (StorageEntryRef &ref)
 Deregisters this. More...
 

Protected Member Functions

template<typename C1 , typename C2 >
void SetCollisionPair ()
 Sets collision pair. More...
 
template<typename C1 >
void SetCollisionSelf ()
 Sets collision self. More...
 
template<typename C1 >
void SetCollisionTerrain ()
 

Private Member Functions

void SubmitCommand (SceneRegistry *cmd)
 Submit command. More...
 
void Draw ()
 Processes draw commands for the scene. More...
 
void Update ()
 Processes update commands for the scene. More...
 

Private Attributes

UpdatableManager * UpdateableMgr
 
DrawableManager * DrawableMgr
 
SceneRegistrationBroker * RegistrationBrkr
 
AlarmableManager * AlarmMgr
 
KeyboardEventManager * KBEventMgr
 
CameraManager * CamMgr
 
CollisionManager * ColMgr
 

Friends

class SceneAttorney
 Dictates access to the Scene through the SceneAttorney. More...
 

Additional Inherited Members

- Public Types inherited from UpdatableManager
typedef StorageList::iterator StorageListRef
 Defines an alias representing the storage list reference. More...
 
- Public Types inherited from DrawableManager
typedef StorageList::iterator StorageListRef
 Defines an alias representing the storage list reference. More...
 
- Public Types inherited from AlarmableManager
enum  ALARM_ID {
  ALARM_0, ALARM_1, ALARM_2, ALARM_3,
  ALARM_4
}
 Values that represent alarm Identifiers. More...
 
typedef std::pair< Alarmable *, ALARM_ID > AlarmEvent
 Defines an alias representing the alarm event. More...
 
typedef std::multimap< float, AlarmEvent > TimeLineMap
 Defines an alias representing the time line map. More...
 
typedef TimeLineMap::iterator StorageEntryRef
 Defines an alias representing the storage entry reference. More...
 
- Static Public Attributes inherited from AlarmableManager
static const int ALARM_NUMBER = 5
 The max alarm number. More...
 

Constructor & Destructor Documentation

◆ Scene() [1/3]

Scene::Scene ( )

Default constructor.

Here is the call graph for this function:

◆ Scene() [2/3]

Scene::Scene ( const Scene &  )
delete

Copy constructor.

◆ Scene() [3/3]

Scene::Scene ( Scene &&  )
delete

Move constructor.

◆ ~Scene()

Scene::~Scene ( )
virtual

Deconstructor.

Here is the call graph for this function:

Member Function Documentation

◆ Draw()

void Scene::Draw ( )
private

Processes draw commands for the scene.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Get2DCamera()

Camera * Scene::Get2DCamera ( )

Gets the Camera Manager's 2D camera.

Returns
Null if it fails, else the current 2D camera.
Here is the call graph for this function:

◆ GetCamera()

Camera * Scene::GetCamera ( )

Gets the camera.

Returns
Null if it fails, else the current stored camera.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Initialize()

void Scene::Initialize ( )
pure virtual

Initializes the scene. Put scene related startup here.

Here is the caller graph for this function:

◆ operator=() [1/2]

Scene& Scene::operator= ( const Scene &  )
delete

Assignment operator.

◆ operator=() [2/2]

Scene& Scene::operator= ( Scene &&  )
delete

Move assignment operator.

◆ ProcessGodCam()

void Scene::ProcessGodCam ( )

Process the god camera.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ RequestGodCam()

void Scene::RequestGodCam ( )

Request god camera be present in the current scene.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SceneEnd()

void Scene::SceneEnd ( )
pure virtual

Shuts down the scene. Put scene related end tasks here.

Here is the caller graph for this function:

◆ SetCollisionPair()

template<typename C1 , typename C2 >
template< typename C1, typename C2 > void Scene::SetCollisionPair ( )
inlineprotected

Sets collision pair.

Template Parameters
C1Type of the c1.
C2Type of the c2.
Here is the call graph for this function:

◆ SetCollisionSelf()

template<typename C1 >
template< typename C1 > void Scene::SetCollisionSelf ( )
inlineprotected

Sets collision self.

Template Parameters
C1Type of the c1.
Here is the call graph for this function:

◆ SetCollisionTerrain()

template<typename C1 >
void Scene::SetCollisionTerrain ( )
inlineprotected
Here is the call graph for this function:

◆ SetCurrent2DCamera()

void Scene::SetCurrent2DCamera ( Camera *  newCamera)

Sets current 2D camera.

Parameters
[in,out]newCameraIf non-null, the new camera.

Ensure the input camera is an Orthographic camera to avoid perspective on the rendered sprites.

Here is the call graph for this function:

◆ SetCurrentCamera()

void Scene::SetCurrentCamera ( Camera *  newCamera)

Sets current camera.

Parameters
newCameraIf non-null, the new camera.
Here is the call graph for this function:

◆ SubmitCommand()

void Scene::SubmitCommand ( SceneRegistry *  cmd)
private

Submit command.

Parameters
cmdAdds the command to the RegistrationBroker
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Update()

void Scene::Update ( )
private

Processes update commands for the scene.

Here is the call graph for this function:
Here is the caller graph for this function:

Friends And Related Function Documentation

◆ SceneAttorney

friend class SceneAttorney
friend

Dictates access to the Scene through the SceneAttorney.

Member Data Documentation

◆ AlarmMgr

AlarmableManager* Scene::AlarmMgr
private

◆ CamMgr

CameraManager* Scene::CamMgr
private

◆ ColMgr

CollisionManager* Scene::ColMgr
private

◆ DrawableMgr

DrawableManager* Scene::DrawableMgr
private

◆ KBEventMgr

KeyboardEventManager* Scene::KBEventMgr
private

◆ RegistrationBrkr

SceneRegistrationBroker* Scene::RegistrationBrkr
private

◆ UpdateableMgr

UpdatableManager* Scene::UpdateableMgr
private

The documentation for this class was generated from the following files: