phoenix::PhSceneNode Class Reference

Scenenode Prototype. More...

#include <PhSceneManager.h>

Inheritance diagram for phoenix::PhSceneNode:

phoenix::PhBackground phoenix::PhDrawSceneNode phoenix::PhExtendedBackground phoenix::PhSolidBackground phoenix::PhSpriteAnimation phoenix::PhTileMap

List of all members.

Public Member Functions

 PhSceneNode ()
 Constructor.
virtual ~PhSceneNode ()
 Virtual destructor.
virtual void onPreRender ()
 Pre-render call.
virtual void onRender ()
 Render call.
virtual void onPostRender ()
 Post-render call.
void setDepth (float d)
 Set depth function.
float getDepth ()
 Get depth function.

Protected Attributes

float depth
 Depth value.


Detailed Description

Scenenode Prototype.

This is the prototype for a scenenode, all scenenodes should be derived from this class.


Constructor & Destructor Documentation

phoenix::PhSceneNode::PhSceneNode (  )  [inline]

Constructor.

Does nothing as this is a base class meant to be derived from.

virtual phoenix::PhSceneNode::~PhSceneNode (  )  [inline, virtual]

Virtual destructor.

Does nothing.


Member Function Documentation

virtual void phoenix::PhSceneNode::onPreRender (  )  [inline, virtual]

Pre-render call.

All nodes in the list will have this function called by the scenemanger once per frame. Overloading this is required. If the scene node wants to be drawn it must call phoenix::PhSceneManger::registerForRendering().

Reimplemented in phoenix::PhBackground, phoenix::PhDrawSceneNode, phoenix::PhExtendedBackground, phoenix::PhSolidBackground, phoenix::PhSpriteAnimation, and phoenix::PhTileMap.

virtual void phoenix::PhSceneNode::onRender (  )  [inline, virtual]

Render call.

Any nodes that called phoenix::PhSceneManger::registerForRendering() will first be sorted according to their depth, then this function is called for each node in order. It is highly suggested that you put any drawing code in this function. Of course, it's possible to draw during any of the three node passes, but this pass is the only one that is exclusive (Nodes must register) and is the only one that is depth sorted.

Reimplemented in phoenix::PhBackground, phoenix::PhDrawSceneNode, phoenix::PhExtendedBackground, phoenix::PhSolidBackground, phoenix::PhSpriteAnimation, and phoenix::PhTileMap.

virtual void phoenix::PhSceneNode::onPostRender (  )  [inline, virtual]

Post-render call.

The third render pass takes place at the end of every frame, the scene manager calls this function for every node in the list, and any code that should happen after everything is drawn should go here.

Reimplemented in phoenix::PhBackground, phoenix::PhDrawSceneNode, phoenix::PhExtendedBackground, phoenix::PhSolidBackground, phoenix::PhSpriteAnimation, and phoenix::PhTileMap.

void phoenix::PhSceneNode::setDepth ( float  d  )  [inline]

Set depth function.

Sets the depth of this node.

Parameters:
d The new depth.
See also:
depth

float phoenix::PhSceneNode::getDepth (  )  [inline]

Get depth function.

Returns the current depth of this node.

Returns:
Current depth.
See also:
depth


Member Data Documentation

float phoenix::PhSceneNode::depth [protected]

Depth value.

This value is used by the scenemanger to depth sort all drawn nodes. if your object does not execute the onRender() call, then it does not matter to you.

See also:
getDepth(), setDepth(), phoenix::PhSceneManager


The documentation for this class was generated from the following file:
Generated on Tue Nov 20 21:59:24 2007 for Phoenix by  doxygen 1.5.4