PixelLightAPI  .
Public Member Functions
PLScene::SPScene Class Reference

Scene graph surface painter class. More...

#include <SPScene.h>

Inheritance diagram for PLScene::SPScene:
Inheritance graph
[legend]

List of all members.

Public Member Functions

PLS_API SPScene (PLRenderer::Renderer &cRenderer)
 Constructor.
virtual PLS_API ~SPScene ()
 Destructor.
PLS_API SceneContextGetSceneContext () const
 Returns the used scene context.
PLS_API SceneContainerGetRootContainer () const
 Returns the scene root container.
PLS_API bool SetRootContainer (SceneContainer *pContainer)
 Sets the scene root container.
PLS_API SceneContainerGetSceneContainer () const
 Returns the scene container.
PLS_API bool SetSceneContainer (SceneContainer *pContainer)
 Sets the scene container.
PLS_API SNCameraGetCamera () const
 Returns the default camera scene node.
PLS_API void SetCamera (SNCamera *pCamera)
 Sets the default camera scene.
PLS_API SQCullGetCullQuery () const
 Returns the cull query.
PLS_API SceneRendererGetDefaultSceneRenderer () 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.

Detailed Description

Scene graph surface painter class.

Remarks:
The scene surface painter is responsible for rendering the scene by using a given camera.

'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. :)


Constructor & Destructor Documentation

Constructor.

Parameters:
[in]cRendererRenderer to use
virtual PLS_API PLScene::SPScene::~SPScene ( ) [virtual]

Destructor.


Member Function Documentation

Returns the used scene context.

Returns:
The used scene context, can be a null pointer

Returns the scene root container.

Returns:
Scene root container, a null pointer if there's no one
PLS_API bool PLScene::SPScene::SetRootContainer ( SceneContainer pContainer)

Sets the scene root container.

Parameters:
[in]pContainerScene root container, can be a null pointer
Returns:
'true' if all went fine, else 'false'

Returns the scene container.

Returns:
Scene container, a null pointer if there's no one
PLS_API bool PLScene::SPScene::SetSceneContainer ( SceneContainer pContainer)

Sets the scene container.

Parameters:
[in]pContainerScene container, can be a null pointer
Returns:
'true' if all went fine, else 'false'

Returns the default camera scene node.

Returns:
Default camera scene node, a null pointer if there's no one
PLS_API void PLScene::SPScene::SetCamera ( SNCamera pCamera)

Sets the default camera scene.

Parameters:
[in]pCameraNew default camera scene node, can be a null pointer

Returns the cull query.

Returns:
The cull query, a null pointer on error

Returns the default scene renderer.

Returns:
The default scene renderer, can be a null pointer
Note:
  • The default scene renderer is used if the used camera has no scene renderer set or there's no camera at all
PLS_API void PLScene::SPScene::SetDefaultSceneRenderer ( const PLCore::String sSceneRenderer = "Forward.sr")

Sets the default scene renderer.

Parameters:
[in]sSceneRendererFilename of the default scene renderer
See also:
virtual void PLScene::SPScene::OnPaint ( PLRenderer::Surface cSurface) [override, virtual]

Is called when the owner surface is painted.

Parameters:
[in]cSurfaceSurface we're painting on

Implements PLRenderer::SurfacePainter.


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


PixelLight PixelLight 0.9.10-R1
Copyright (C) 2002-2011 by The PixelLight Team
Last modified Fri Dec 23 2011 15:51:26
The content of this PixelLight document is published under the
Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported