PixelLightAPI
.
|
Basic scene application class. More...
#include <EngineApplication.h>
Public Member Functions | |
PL_API | EngineApplication (PLCore::Frontend &cFrontend, const PLCore::String &sSceneFilename="") |
Constructor. | |
virtual PL_API | ~EngineApplication () |
Destructor. | |
PL_API PLScene::SceneContainer * | GetScene () const |
Returns the scene container (the 'concrete scene') | |
PL_API void | SetScene (PLScene::SceneContainer *pContainer) |
Sets the scene container (the 'concrete scene') | |
PL_API void | ClearScene () |
Clears the scene, after calling this method the scene is empty. | |
PL_API PLScene::SNCamera * | GetCamera () const |
Get scene camera. | |
PL_API PLInput::VirtualController * | GetInputController () const |
Get virtual input controller. | |
PL_API void | SetInputController (PLInput::VirtualController *pInputController) |
Set virtual input controller. | |
PL_API SceneRendererTool & | GetSceneRendererTool () |
Get scene renderer tool. | |
PL_API const SceneRendererTool & | GetSceneRendererTool () const |
Get scene renderer tool. | |
PL_API Screenshot & | GetScreenshotTool () |
Get screenshot tool. | |
PL_API bool | IsEditModeEnabled () const |
Returns whether or not edit mode is enabled. | |
PL_API void | SetEditModeEnabled (bool bEnabled=true) |
Sets whether or not edit mode is enabled. | |
PL_API void | ConsoleCommandQuit (ConsoleCommand &cCommand) |
Quit the engine. | |
virtual PL_API void | SetCamera (PLScene::SNCamera *pCamera) |
Sets the scene camera. | |
virtual PL_API bool | LoadScene (const PLCore::String &sFilename) |
Loads a scene. | |
Protected Member Functions | |
virtual PL_API bool | OnStart () override |
Initialization function that is called prior to OnInit() | |
virtual PL_API void | OnResume () override |
Called when the object has the focus (keep the implementation lightweight) | |
virtual PL_API void | OnPause () override |
Called when the object has no longer the focus (keep the implementation lightweight) | |
virtual PL_API void | OnStop () override |
De-initialization function that is called after OnDeInit() | |
virtual PL_API void | OnUpdate () override |
Called to let the frontend update it's states. | |
virtual PL_API void | OnCreateRootScene () override |
Function that is called to create the application's root scene. | |
virtual PL_API void | OnCreateScene (PLScene::SceneContainer &cContainer) |
Function that is called to create the application's scene container. | |
virtual PL_API void | OnCreateInputController () |
Function that is called to initialize the application's virtual input controller. | |
virtual PL_API void | OnInputControllerFound (PLInput::Controller *pInputController, PLCore::String sInputSemantic) |
Function that is called when an input controller has been found. | |
virtual PL_API void | OnLoadProgress (float fLoadProgress) |
Called on load progress. | |
Protected Attributes | |
PLScene::SceneNodeHandler | m_cSceneContainerHandler |
PLScene::SceneNodeHandler | m_cCameraHandler |
PLCore::String | m_sDefaultSceneRenderer |
PLCore::String | m_sSceneRendererVariables |
PLCore::String | m_sClearColor |
PLCore::String | m_sStartCamera |
PLScene::SceneNode * | m_pFirstFoundCamera |
bool | m_bHasLoadScreen |
PLInput::VirtualController * | m_pInputController |
SceneRendererTool | m_cSceneRendererTool |
Screenshot | m_cScreenshot |
bool | m_bEditModeEnabled |
Basic scene application class.
PL_API PLEngine::EngineApplication::EngineApplication | ( | PLCore::Frontend & | cFrontend, |
const PLCore::String & | sSceneFilename = "" |
||
) |
Constructor.
< The used default (and very basic) scene renderer
[in] | cFrontend | Frontend this application instance is running in |
[in] | sSceneFilename | Filename of the scene to load |
virtual PL_API PLEngine::EngineApplication::~EngineApplication | ( | ) | [virtual] |
Destructor.
PL_API PLScene::SceneContainer* PLEngine::EngineApplication::GetScene | ( | ) | const |
Returns the scene container (the 'concrete scene')
PL_API void PLEngine::EngineApplication::SetScene | ( | PLScene::SceneContainer * | pContainer | ) |
Sets the scene container (the 'concrete scene')
[in] | pContainer | New scene container, can be a null pointer |
PL_API void PLEngine::EngineApplication::ClearScene | ( | ) |
Clears the scene, after calling this method the scene is empty.
PL_API PLScene::SNCamera* PLEngine::EngineApplication::GetCamera | ( | ) | const |
Get scene camera.
PL_API PLInput::VirtualController* PLEngine::EngineApplication::GetInputController | ( | ) | const |
Get virtual input controller.
PL_API void PLEngine::EngineApplication::SetInputController | ( | PLInput::VirtualController * | pInputController | ) |
Set virtual input controller.
[in] | pInputController | Virtual input controller (can be a null pointer) |
Get scene renderer tool.
This component is initialized within the application framework initialization function "OnStart()" that is called prior to "Main()". As a result, using the returned component instance prior to the application-specific initialization routine "OnInit()" will not work.
PL_API const SceneRendererTool& PLEngine::EngineApplication::GetSceneRendererTool | ( | ) | const |
Get scene renderer tool.
Get screenshot tool.
PL_API bool PLEngine::EngineApplication::IsEditModeEnabled | ( | ) | const |
Returns whether or not edit mode is enabled.
PL_API void PLEngine::EngineApplication::SetEditModeEnabled | ( | bool | bEnabled = true | ) |
Sets whether or not edit mode is enabled.
[in] | bEnabled | 'true' if edit mode is enabled, else 'false' |
PL_API void PLEngine::EngineApplication::ConsoleCommandQuit | ( | ConsoleCommand & | cCommand | ) |
Quit the engine.
[in] | cCommand | Calling command |
virtual PL_API void PLEngine::EngineApplication::SetCamera | ( | PLScene::SNCamera * | pCamera | ) | [virtual] |
Sets the scene camera.
[in] | pCamera | New scene camera, can be a null pointer |
virtual PL_API bool PLEngine::EngineApplication::LoadScene | ( | const PLCore::String & | sFilename | ) | [virtual] |
Loads a scene.
[in] | sFilename | Filename of the scene to load |
' 'ClearColor' '<red> <green> <blue> <alpha>' (all floating point values from 0-1) 'StartCamera' '<name of="" the="" start="" camera="" scene="" node>="">' (name is relative to the loaded scene container)
virtual PL_API bool PLEngine::EngineApplication::OnStart | ( | ) | [override, protected, virtual] |
Initialization function that is called prior to OnInit()
Reimplemented from PLScene::SceneApplication.
virtual PL_API void PLEngine::EngineApplication::OnResume | ( | ) | [override, protected, virtual] |
Called when the object has the focus (keep the implementation lightweight)
Reimplemented from PLCore::CoreApplication.
virtual PL_API void PLEngine::EngineApplication::OnPause | ( | ) | [override, protected, virtual] |
Called when the object has no longer the focus (keep the implementation lightweight)
Reimplemented from PLCore::CoreApplication.
virtual PL_API void PLEngine::EngineApplication::OnStop | ( | ) | [override, protected, virtual] |
De-initialization function that is called after OnDeInit()
Reimplemented from PLScene::SceneApplication.
virtual PL_API void PLEngine::EngineApplication::OnUpdate | ( | ) | [override, protected, virtual] |
Called to let the frontend update it's states.
Reimplemented from PLScene::SceneApplication.
Reimplemented in PLEngine::ScriptApplication.
virtual PL_API void PLEngine::EngineApplication::OnCreateRootScene | ( | ) | [override, protected, virtual] |
Function that is called to create the application's root scene.
Reimplemented from PLScene::SceneApplication.
virtual PL_API void PLEngine::EngineApplication::OnCreateScene | ( | PLScene::SceneContainer & | cContainer | ) | [protected, virtual] |
Function that is called to create the application's scene container.
[in] | cContainer | Scene container where the 'concrete scene' should be created in |
virtual PL_API void PLEngine::EngineApplication::OnCreateInputController | ( | ) | [protected, virtual] |
Function that is called to initialize the application's virtual input controller.
virtual PL_API void PLEngine::EngineApplication::OnInputControllerFound | ( | PLInput::Controller * | pInputController, |
PLCore::String | sInputSemantic | ||
) | [protected, virtual] |
Function that is called when an input controller has been found.
[in] | pInputController | Found input controller, always valid |
[in] | sInputSemantic | Purpose of this input controller |
virtual PL_API void PLEngine::EngineApplication::OnLoadProgress | ( | float | fLoadProgress | ) | [protected, virtual] |
Called on load progress.
[in] | fLoadProgress | Load progress (0.0-1.0) |
Scene node handler for the scene container
Scene node handler for the camera
Default scene renderer
Scene renderer variables
Clear color
Name of the given start camera
First found camera, can be a null pointer
bool PLEngine::EngineApplication::m_bHasLoadScreen [protected] |
Is there a load screen?
Virtual input controller, can be a null pointer
Scene renderer tool
Screenshot PLEngine::EngineApplication::m_cScreenshot [protected] |
Screenshot tool
bool PLEngine::EngineApplication::m_bEditModeEnabled [protected] |
Edit mode enabled?
|