PixelLightAPI
.
|
Scene graph surface painter class. More...
#include <SPScene.h>
Public Member Functions | |
PLS_API | SPScene (PLRenderer::Renderer &cRenderer) |
Constructor. | |
virtual PLS_API | ~SPScene () |
Destructor. | |
PLS_API SceneContext * | GetSceneContext () const |
Returns the used scene context. | |
PLS_API SceneContainer * | GetRootContainer () const |
Returns the scene root container. | |
PLS_API bool | SetRootContainer (SceneContainer *pContainer) |
Sets the scene root container. | |
PLS_API SceneContainer * | GetSceneContainer () const |
Returns the scene container. | |
PLS_API bool | SetSceneContainer (SceneContainer *pContainer) |
Sets the scene container. | |
PLS_API SNCamera * | GetCamera () const |
Returns the default camera scene node. | |
PLS_API void | SetCamera (SNCamera *pCamera) |
Sets the default camera scene. | |
PLS_API SQCull * | GetCullQuery () const |
Returns the cull query. | |
PLS_API SceneRenderer * | GetDefaultSceneRenderer () const |
Returns the default scene renderer. | |
PLS_API void | SetDefaultSceneRenderer (const PLCore::String &sSceneRenderer="Forward.sr") |
Sets the default scene renderer. | |
virtual void | OnPaint (PLRenderer::Surface &cSurface) override |
Is called when the owner surface is painted. |
Scene graph surface painter class.
'The scene' is normally subdivided into a 'root container' and a 'scene container' - both normally instances of SceneContainer. The 'root container' is responsible for clearing the frame buffer, drawing the 'scene container' and finally adding some additional things like GUI, engine information, console etc. The 'scene container' itself is the concrete scene - this distinction between 'root' and 'scene' is quite comfortable when it comes to things like rendering 'reflection/refraction' where only the 'scene' should be rendered without clearing the frame buffer or adding additional information like FPS display. Here's an example how such a root container may look like: SceneContainer (Root container) SceneContainer (Scene container with the 'real scene') SNCamera SNSky SNMesh ... SNGui SNEngineInformation SNConsole This make things extreme flexible. :)
PLS_API PLScene::SPScene::SPScene | ( | PLRenderer::Renderer & | cRenderer | ) |
Constructor.
[in] | cRenderer | Renderer to use |
virtual PLS_API PLScene::SPScene::~SPScene | ( | ) | [virtual] |
Destructor.
PLS_API SceneContext* PLScene::SPScene::GetSceneContext | ( | ) | const |
Returns the used scene context.
PLS_API SceneContainer* PLScene::SPScene::GetRootContainer | ( | ) | const |
Returns the scene root container.
PLS_API bool PLScene::SPScene::SetRootContainer | ( | SceneContainer * | pContainer | ) |
Sets the scene root container.
[in] | pContainer | Scene root container, can be a null pointer |
PLS_API SceneContainer* PLScene::SPScene::GetSceneContainer | ( | ) | const |
Returns the scene container.
PLS_API bool PLScene::SPScene::SetSceneContainer | ( | SceneContainer * | pContainer | ) |
Sets the scene container.
[in] | pContainer | Scene container, can be a null pointer |
PLS_API SNCamera* PLScene::SPScene::GetCamera | ( | ) | const |
Returns the default camera scene node.
PLS_API void PLScene::SPScene::SetCamera | ( | SNCamera * | pCamera | ) |
Sets the default camera scene.
[in] | pCamera | New default camera scene node, can be a null pointer |
PLS_API SQCull* PLScene::SPScene::GetCullQuery | ( | ) | const |
Returns the cull query.
PLS_API SceneRenderer* PLScene::SPScene::GetDefaultSceneRenderer | ( | ) | const |
Returns the default scene renderer.
PLS_API void PLScene::SPScene::SetDefaultSceneRenderer | ( | const PLCore::String & | sSceneRenderer = "Forward.sr" | ) |
Sets the default scene renderer.
[in] | sSceneRenderer | Filename of the default scene renderer |
virtual void PLScene::SPScene::OnPaint | ( | PLRenderer::Surface & | cSurface | ) | [override, virtual] |
Is called when the owner surface is painted.
[in] | cSurface | Surface we're painting on |
Implements PLRenderer::SurfacePainter.
|