JugiMap Framework
App Class Referenceabstract

The App is the base class of the application. More...

#include <jmApp.h>

Public Member Functions

 App ()
 Constructor. More...
 
virtual ~App ()
 Destructor. More...
 
virtual bool Init ()=0
 Initialize the application. More...
 
virtual void Update (float _framePeriod)
 Update the application logic. The given *_framePeriod* is a period of one frame in seconds. More...
 
virtual void Draw ()
 Execute drawing of the application graphics. This function is available for engines which does not handle drawing automatically as part of the engine update. More...
 
void SetPhysicsEnabled (bool _physicsEnabled)
 Set the physics enabled flag. More...
 
bool HasPhysicsEnabled ()
 Returns the physics enabled flag. More...
 
EngineAppGetEngineApp ()
 Returns the engine app object of this application. More...
 
void AddScene (Scene *_scene)
 Add the given *_scene* to this application. The application takes over the ownership of the scene! More...
 
std::vector< Scene * > & GetScenes ()
 Returns a reference to the vector of stored scenes. More...
 
virtual void SetActiveScene (Scene *_scene)
 Set the active scene. More...
 
SceneGetActiveScene ()
 Returns the active scene or nullptr if none. More...
 

Detailed Description

The App is the base class of the application.

Constructor & Destructor Documentation

◆ App()

App ( )

Constructor.

◆ ~App()

~App ( )
virtual

Destructor.

Member Function Documentation

◆ Init()

virtual bool Init ( )
pure virtual

Initialize the application.

◆ Update()

void Update ( float  _framePeriod)
virtual

Update the application logic. The given *_framePeriod* is a period of one frame in seconds.

◆ Draw()

void Draw ( )
virtual

Execute drawing of the application graphics. This function is available for engines which does not handle drawing automatically as part of the engine update.

◆ SetPhysicsEnabled()

void SetPhysicsEnabled ( bool  _physicsEnabled)
inline

Set the physics enabled flag.

You can use this flag as an indicator if physics are used in this app.

◆ HasPhysicsEnabled()

bool HasPhysicsEnabled ( )
inline

Returns the physics enabled flag.

◆ GetEngineApp()

EngineApp* GetEngineApp ( )
inline

Returns the engine app object of this application.

◆ AddScene()

void AddScene ( Scene _scene)
inline

Add the given *_scene* to this application. The application takes over the ownership of the scene!

◆ GetScenes()

std::vector<Scene*>& GetScenes ( )
inline

Returns a reference to the vector of stored scenes.

◆ SetActiveScene()

void SetActiveScene ( Scene _scene)
virtual

Set the active scene.

◆ GetActiveScene()

Scene* GetActiveScene ( )
inline

Returns the active scene or nullptr if none.


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