Home | Namespaces | Hierarchy | Alphabetical List | Class list | Files | Namespace Members | Class members | File members

nge::engine::ILevelNode Class Reference

#include <ILevelNode.hpp>

Inheritance diagram for nge::engine::ILevelNode:

irr::IReferenceCounted nge::engine::IRegionLevelNode nge::game::GameEntity nge::engine::IWorldLevelNode nge::engine::IZoneGroupLevelNode nge::engine::IZoneLevelNode nge::game::IActor nge::game::IItemEntity nge::game::INPC nge::game::IPlayer nge::game::PlayerSpaceship

List of all members.

Public Member Functions

virtual void addChild (ILevelNode *child)
virtual ILevelNodeclone (ILevelNode *newParent=0, ILevelManager *newManager=0)
 Creates a clone of this level node and its children.
virtual void drawDebugData ()
 Draws the node's debug data based on its DebugDataVisible member.
list< ILevelNode * > & getChildren ()
 Returns a const reference to the list of all children.
virtual s32 getID () const
 Returns the id of the level node. This id can be used to identify the node.
virtual const c8getName () const
ILevelNodegetParent () const
 Returns the parent of this level node.
virtual E_LEVEL_NODE_TYPE getType () const
 Returns type of the level node.
 ILevelNode (ILevelNode *parent, ILevelManager *lmgr, s32 id=-1)
 Constructor.
E_DEBUG_LEVEL_TYPE isDebugDataVisible () const
 Returns if debug data are drawed.
virtual bool isIdle () const
 Returns true if the node is Idle.
virtual void OnEvent (const NGEReceiver *event)
virtual void OnRegisterLevelNode ()
 This method is called just before the processing of the node.
virtual void process ()=0
 Process the node.
virtual void remove ()
 Removes this level node from the level, deleting it.
virtual bool removeChild (ILevelNode *child)
virtual void removeChildren ()
 Removes all children of this level node.
virtual void setDebugDataVisible (E_DEBUG_LEVEL_TYPE Visible)
 Sets if and which debug data should be drawn.
virtual void setID (s32 id)
 Sets the id of the level node. This id can be used to identify the node.
virtual void setIdle (bool isIdle)
 Sets if the node should be idle or not. All children of this node won't be processed too if this node is idle.
virtual void setName (const c8 *name)
virtual void setParent (ILevelNode *newParent)
 Changes the parent of the level node.
virtual ~ILevelNode ()
 Destructor.

Protected Member Functions

void cloneMembers (ILevelNode *toCopyFrom, ILevelManager *newManager)
 This method should be used by clone() implementations of derived classes.
void processEvent (const NGEReceiver *event)

Protected Attributes

list< ILevelNode * > Children
 List of all children of this node.
E_DEBUG_LEVEL_TYPE DebugDataVisible
 Flag if debug data should be drawn.
s32 ID
 Id of the node.
bool IsIdle
 Is the node Idle?
ILevelManagerLevelManager
 Pointer to the level manager.
stringc Name
 Name of the level node.
ILevelNodeParent
 Pointer to the parent.


Detailed Description

Definition at line 18 of file ILevelNode.hpp.


Constructor & Destructor Documentation

nge::engine::ILevelNode::ILevelNode ( ILevelNode parent,
ILevelManager lmgr,
s32  id = -1 
) [inline]

Constructor.

Definition at line 22 of file ILevelNode.hpp.

References addChild(), and Parent.

virtual nge::engine::ILevelNode::~ILevelNode (  )  [inline, virtual]

Destructor.

Definition at line 32 of file ILevelNode.hpp.

References removeChildren().


Member Function Documentation

virtual void nge::engine::ILevelNode::addChild ( ILevelNode child  )  [inline, virtual]

Adds a child to this level node. If the level node already has got a parent, it is removed from there as child.

Definition at line 129 of file ILevelNode.hpp.

References Children, irr::IReferenceCounted::grab(), Parent, and remove().

Referenced by ILevelNode(), and setParent().

virtual ILevelNode* nge::engine::ILevelNode::clone ( ILevelNode newParent = 0,
ILevelManager newManager = 0 
) [inline, virtual]

Creates a clone of this level node and its children.

Definition at line 234 of file ILevelNode.hpp.

void nge::engine::ILevelNode::cloneMembers ( ILevelNode toCopyFrom,
ILevelManager newManager 
) [inline, protected]

This method should be used by clone() implementations of derived classes.

Definition at line 241 of file ILevelNode.hpp.

References Children, DebugDataVisible, ID, IsIdle, LevelManager, and Name.

virtual void nge::engine::ILevelNode::drawDebugData (  )  [inline, virtual]

Draws the node's debug data based on its DebugDataVisible member.

Reimplemented in nge::engine::IRegionLevelNode.

Definition at line 70 of file ILevelNode.hpp.

References Children.

Referenced by nge::engine::IRegionLevelNode::drawDebugData().

list<ILevelNode*>& nge::engine::ILevelNode::getChildren (  )  [inline]

Returns a const reference to the list of all children.

Definition at line 196 of file ILevelNode.hpp.

References Children.

Referenced by nge::engine::IRegionLevelNode::setIdle().

virtual s32 nge::engine::ILevelNode::getID (  )  const [inline, virtual]

Returns the id of the level node. This id can be used to identify the node.

Definition at line 114 of file ILevelNode.hpp.

References ID.

Referenced by nge::engine::IRegionLevelNode::drawDebugData().

virtual const c8* nge::engine::ILevelNode::getName (  )  const [inline, virtual]

Returns the name of the node.

Returns:
Returns name as character string.

Definition at line 84 of file ILevelNode.hpp.

References Name.

Referenced by nge::engine::IRegionLevelNode::drawDebugData().

ILevelNode* nge::engine::ILevelNode::getParent (  )  const [inline]

Returns the parent of this level node.

Definition at line 220 of file ILevelNode.hpp.

References Parent.

virtual E_LEVEL_NODE_TYPE nge::engine::ILevelNode::getType (  )  const [inline, virtual]

Returns type of the level node.

Reimplemented in nge::game::GameEntity, nge::game::IPlayer, and nge::engine::IRegionLevelNode.

Definition at line 227 of file ILevelNode.hpp.

References nge::engine::ELNT_UNKNOWN.

E_DEBUG_LEVEL_TYPE nge::engine::ILevelNode::isDebugDataVisible (  )  const [inline]

Returns if debug data are drawed.

Definition at line 189 of file ILevelNode.hpp.

References DebugDataVisible.

virtual bool nge::engine::ILevelNode::isIdle (  )  const [inline, virtual]

Returns true if the node is Idle.

Definition at line 99 of file ILevelNode.hpp.

References IsIdle.

Referenced by nge::engine::IRegionLevelNode::drawDebugData(), and nge::engine::IRegionLevelNode::OnRegisterLevelNode().

virtual void nge::engine::ILevelNode::OnEvent ( const NGEReceiver event  )  [inline, virtual]

Reimplemented in nge::game::GameEntity.

Definition at line 64 of file ILevelNode.hpp.

virtual void nge::engine::ILevelNode::OnRegisterLevelNode (  )  [inline, virtual]

This method is called just before the processing of the node.

Nodes may register themselves in the process pipeline during this call, precalculate everything that should be processed, and prevent their children from being able to register themselves if they are idle by simply not calling their OnRegisterLevelNode() method. If you are implementing your own level node, you should override this method with an implementtion code looking like this:

                        if(!IsIdle)
                        LevelManager->registerNodeForProcessing(this, pass);

                        ILevelNode::OnRegisterLevelNode();

Reimplemented in nge::game::GameEntity, nge::game::IPlayer, and nge::engine::IRegionLevelNode.

Definition at line 53 of file ILevelNode.hpp.

References Children, and IsIdle.

Referenced by nge::engine::IRegionLevelNode::OnRegisterLevelNode().

virtual void nge::engine::ILevelNode::process (  )  [pure virtual]

Process the node.

Implemented in nge::game::GameEntity, and nge::game::PlayerSpaceship.

void nge::engine::ILevelNode::processEvent ( const NGEReceiver event  )  [inline, protected]

Definition at line 260 of file ILevelNode.hpp.

References Children.

virtual void nge::engine::ILevelNode::remove (  )  [inline, virtual]

Removes this level node from the level, deleting it.

Definition at line 174 of file ILevelNode.hpp.

References Parent, and removeChild().

Referenced by addChild().

virtual bool nge::engine::ILevelNode::removeChild ( ILevelNode child  )  [inline, virtual]

Removes a child from this level node.

Returns:
Returns true if the child could be removed, and false if not.

Definition at line 143 of file ILevelNode.hpp.

References Children.

Referenced by remove().

virtual void nge::engine::ILevelNode::removeChildren (  )  [inline, virtual]

Removes all children of this level node.

Definition at line 160 of file ILevelNode.hpp.

References Children.

Referenced by ~ILevelNode().

virtual void nge::engine::ILevelNode::setDebugDataVisible ( E_DEBUG_LEVEL_TYPE  Visible  )  [inline, virtual]

Sets if and which debug data should be drawn.

Definition at line 182 of file ILevelNode.hpp.

References DebugDataVisible.

virtual void nge::engine::ILevelNode::setID ( s32  id  )  [inline, virtual]

Sets the id of the level node. This id can be used to identify the node.

Definition at line 121 of file ILevelNode.hpp.

References ID.

virtual void nge::engine::ILevelNode::setIdle ( bool  isIdle  )  [inline, virtual]

Sets if the node should be idle or not. All children of this node won't be processed too if this node is idle.

Reimplemented in nge::engine::IRegionLevelNode.

Definition at line 107 of file ILevelNode.hpp.

References IsIdle.

Referenced by nge::engine::IRegionLevelNode::setIdle().

virtual void nge::engine::ILevelNode::setName ( const c8 name  )  [inline, virtual]

Sets the name of the node.

Parameters:
name,: New name of the level node.

Definition at line 92 of file ILevelNode.hpp.

References Name.

virtual void nge::engine::ILevelNode::setParent ( ILevelNode newParent  )  [inline, virtual]

Changes the parent of the level node.

Definition at line 203 of file ILevelNode.hpp.

References addChild(), irr::IReferenceCounted::drop(), irr::IReferenceCounted::grab(), and Parent.


Member Data Documentation

Flag if debug data should be drawn.

Definition at line 292 of file ILevelNode.hpp.

Referenced by cloneMembers(), nge::engine::IRegionLevelNode::drawDebugData(), isDebugDataVisible(), and setDebugDataVisible().

Id of the node.

Definition at line 283 of file ILevelNode.hpp.

Referenced by cloneMembers(), getID(), and setID().

Is the node Idle?

Definition at line 289 of file ILevelNode.hpp.

Referenced by cloneMembers(), isIdle(), OnRegisterLevelNode(), and setIdle().

stringc nge::engine::ILevelNode::Name [protected]

Name of the level node.

Definition at line 274 of file ILevelNode.hpp.

Referenced by cloneMembers(), getName(), and setName().

Pointer to the parent.

Definition at line 277 of file ILevelNode.hpp.

Referenced by addChild(), getParent(), ILevelNode(), remove(), setParent(), and nge::engine::IRegionLevelNode::~IRegionLevelNode().


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

The NUSoftware Game Engine
The NUSoftware Game Engine Documentation © 2007-2008 by Tomer Nosrati. Generated on Sat Apr 26 16:52:35 2008 by Doxygen (1.5.5)