PixelLightAPI  .
Public Types | Public Member Functions
PLScene::SNBitmap2D Class Reference

2D bitmap (overlay) scene node More...

#include <SNBitmap2D.h>

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

List of all members.

Public Types

enum  EFlags { Center = 1<<11, Pos3D = 1<<12, Background = 1<<13 }
 Scene node flags (SceneNode flags extension) More...

Public Member Functions

virtual PLS_API void DrawPre (PLRenderer::Renderer &cRenderer, const VisNode *pVisNode) override
 This function is called before any solid parts of the scene are drawn.
virtual PLS_API void DrawPost (PLRenderer::Renderer &cRenderer, const VisNode *pVisNode) override
 This function is called after transparent parts of the scene are drawn.

Detailed Description

2D bitmap (overlay) scene node

Remarks:
This scene node type can for instance be used to draw logos or to composite simple 'Head-Up Displays' (HUD).
Note:
  • It's NOT recommended to use this scene node to construct complex GUIs!

Member Enumeration Documentation

Scene node flags (SceneNode flags extension)

Enumerator:
Center 

Center the bitmap

Pos3D 

The bitmap is placed within 3D. If this flag is not set, the node position is in 'screen space' between 0.0 and 1.0.

Background 

Draw the bitmap at the background ('pre-draw')

Reimplemented from PLScene::SNBitmap.


Member Function Documentation

virtual PLS_API void PLScene::SNBitmap2D::DrawPre ( PLRenderer::Renderer cRenderer,
const VisNode pVisNode 
) [override, virtual]

This function is called before any solid parts of the scene are drawn.

Parameters:
[in]cRendererThe used renderer
[in]pVisNodeThe current visibility node of this scene node, can be a null pointer
Remarks:
The DrawPre(), DrawSolid(), DrawTransparent(), DrawDebug() and DrawPost() allows custom draw calls inside a scene rendering process. The function names indicate when each function is called during scene rendering. It's not predictable which render states are currently set if these functions are called and these draw functions will NOT interact automatically with 'uniform lighting and shadowing' performed on nodes providing a mesh. (GetMeshHandler()) So, try to avoid using these functions whenever possible and provide a scene node mesh instead. The default implementation does only informing the listeners, functions can be implemented in derived classes - only DrawDebug() provides a default implementation to draw for instance the bounding box of the scene node. From outside, this draw functions should ONLY be called if a node is active & visible & 'on the screen' & the draw function of the function is set. (see GetDrawFunctionFlags()) It's recommended to call these functions ONLY from inside a scene renderer! If you don't call the base implementation of a scene node draw function inside your derived draw function or if you are rendering the mesh of the node, you should call SetDraw() to mark this node as drawn. After the scene node was updated, this drawn-flag is reset automatically. Use this this information to avoid useless scene node updates. For instance do not update particle effects or other dynamic meshes if they are currently 'invisible'.
Note:
  • The default implementation only emits the SignalDrawPre signal
  • Should only be called if the draw function flag 'UseDrawPre' is set

Reimplemented from PLScene::SceneNode.

virtual PLS_API void PLScene::SNBitmap2D::DrawPost ( PLRenderer::Renderer cRenderer,
const VisNode pVisNode 
) [override, virtual]

This function is called after transparent parts of the scene are drawn.

Parameters:
[in]cRendererThe used renderer
[in]pVisNodeThe current visibility node of this scene node, can be a null pointer
Note:
  • The default implementation only emits the SignalDrawPost signal
See also:

Reimplemented from PLScene::SceneNode.


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:25
The content of this PixelLight document is published under the
Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported