sofa::core::objectmodel::BaseNode Class Reference

Base class for simulation nodes. More...

#include <BaseNode.h>

Inheritance diagram for sofa::core::objectmodel::BaseNode:

Inheritance graph
[legend]
Collaboration diagram for sofa::core::objectmodel::BaseNode:

Collaboration graph
[legend]

Public Member Functions

virtual ~BaseNode ()
Scene hierarchy
virtual BaseNode * getParent ()=0
 Get parent node (or NULL if no hierarchy or for root node).
virtual const BaseNode * getParent () const =0
 Get parent node (or NULL if no hierarchy or for root node).
virtual sofa::helper::vector
< BaseNode * > 
getChildren ()=0
 Get a list of child node.
virtual const
sofa::helper::vector< BaseNode * > 
getChildren () const =0
 Get a list of child node.
virtual void addChild (BaseNode *node)=0
 Add a child node.
virtual void removeChild (BaseNode *node)=0
 Remove a child node.
virtual bool addObject (BaseObject *obj)=0
 Add a generic object.
virtual bool removeObject (BaseObject *obj)=0
 Remove a generic object.
virtual BaseContext * getContext ()=0
 Get this node context.
virtual const BaseContext * getContext () const =0
 Get this node context.

Detailed Description

Base class for simulation nodes.

A Node is a class defining the main scene data structure of a simulation. It defined hierarchical relations between elements. Each node can have parent and child nodes (potentially defining a tree), as well as attached objects (the leaves of the tree).

Author:
Jeremie Allard

Definition at line 53 of file BaseNode.h.


Constructor & Destructor Documentation

virtual sofa::core::objectmodel::BaseNode::~BaseNode (  )  [inline, virtual]

Definition at line 56 of file BaseNode.h.


Member Function Documentation

virtual void sofa::core::objectmodel::BaseNode::addChild ( BaseNode *  node  )  [pure virtual]

Add a child node.

Implemented in sofa::simulation::tree::GNode.

virtual bool sofa::core::objectmodel::BaseNode::addObject ( BaseObject *  obj  )  [pure virtual]

Add a generic object.

Implemented in sofa::simulation::tree::GNode.

virtual const sofa::helper::vector< BaseNode* > sofa::core::objectmodel::BaseNode::getChildren (  )  const [pure virtual]

Get a list of child node.

Implemented in sofa::simulation::tree::GNode.

virtual sofa::helper::vector< BaseNode* > sofa::core::objectmodel::BaseNode::getChildren (  )  [pure virtual]

virtual const BaseContext* sofa::core::objectmodel::BaseNode::getContext (  )  const [pure virtual]

Get this node context.

Implemented in sofa::simulation::tree::GNode.

virtual BaseContext* sofa::core::objectmodel::BaseNode::getContext (  )  [pure virtual]

virtual const BaseNode* sofa::core::objectmodel::BaseNode::getParent (  )  const [pure virtual]

Get parent node (or NULL if no hierarchy or for root node).

Implemented in sofa::simulation::tree::GNode.

virtual BaseNode* sofa::core::objectmodel::BaseNode::getParent (  )  [pure virtual]

virtual void sofa::core::objectmodel::BaseNode::removeChild ( BaseNode *  node  )  [pure virtual]

virtual bool sofa::core::objectmodel::BaseNode::removeObject ( BaseObject *  obj  )  [pure virtual]

Remove a generic object.

Implemented in sofa::simulation::tree::GNode.


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

Generated on Sun Nov 23 04:23:43 2008 for Sofa by  doxygen 1.5.7.1