Public Member Functions | Public Attributes | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Friends

Node Class Reference

Inheritance diagram for Node:
Transformable World Camera Geometry Group Light

List of all members.

Public Member Functions

void renderAll ()
void setName (char *nname)
u32 getChildrenCount () const
void attachChild (Node *node)
void detachChild (Node *node)
void detachFromParent ()
NodegetChild (u32 index)
NodegetChild (char *search_name, u32 max_depth)
NodegetNextSibling ()
NodegetParent ()
void setActive (bool active)
void setVisible (bool visible)
char * getName ()
NodeType_t getNodeType () const
Nodeduplicate (char *new_name, bool recursively)
bool isTransformable ()
virtual void logInfo ()

Public Attributes

bool isActive
bool isVisible
Auxiliary auxiliary

Protected Member Functions

 Node (const char *nname, NodeType_t ntype)
virtual ~Node ()
virtual void drawSelf ()
virtual NodeduplicateSelf ()
virtual void detached ()
void logNodeInfo ()

Static Protected Member Functions

static char * getNewNodeName (char *buf, char *base, NodeType_t type)

Protected Attributes

char * name
NodeType_t type
Nodeparent
NodefirstChild
Nodenext
u16 nChildren
bool is_transformable
bool broken

Friends

class SceneGraph
class Transformable
class State
class Light
class Geometry

Constructor & Destructor Documentation

Node::~Node (  ) [protected, virtual]

Delete this node and its contents. This also recursively deletes the children of the node.


Member Function Documentation

void Node::attachChild ( Node node )

Attach a child to this node. The child musn't already have parent. If it has, detach it first.

void Node::detachChild ( Node node )

Detaches the child node from this node.

void Node::detachFromParent (  )

Detach this node from its parent

Node * Node::duplicate ( char *  new_name,
bool  recursively 
)

Duplicates the node, which means that a new node is created, but all the resources are instantiated. Only the base node changes name to new_name, all its children will still have their old name.

Node * Node::getChild ( char *  search_name,
u32  max_depth 
)

Search for a child with a certain name. Returns 0 if the child is not found.

Node * Node::getChild ( u32  index )

Get the child on position "index". Returns 0 if no child is found.

u32 Node::getChildrenCount (  ) const

Get the number of children

char * Node::getName (  )

Get the name of the node

Node * Node::getNextSibling (  )

Get the next node of the same parent

NodeType_t Node::getNodeType (  ) const

Get node type

Node * Node::getParent (  )

Return parent node

void Node::renderAll (  )

Draw scene graph hierarchy, beginning with this node

void Node::setActive ( bool  active )

Mark this node as active or inactive. When drawing the scene graph, inactive nodes terminate the recursive traversal, so none of its children will be drawn either.

void Node::setName ( char *  nname )

Change the name of the node

void Node::setVisible ( bool  visible )

Mark this node as visible or invisible. An invisible node is not drawn during a draw()-call, but the node's transforms are calculated and its children are drawn.


The documentation for this class was generated from the following files:
 All Classes Functions