5 #ifndef VART_SCENENODE_H
6 #define VART_SCENENODE_H
144 virtual void XmlPrintOn(std::ostream& os,
unsigned int indent)
const;
virtual void TraverseDepthFirst(SNOperator *operatorPtr) const
Process all children in depth-first order.
Base class for objects that compose a scene graph.
Header file for V-ART class "MemoryObj".
std::list< SceneNode * > childList
Child list.
virtual void TraverseBreadthFirst(SNOperator *operatorPtr) const
Process all children in breadth-first order.
virtual bool DrawInstanceOGL() const
Non-recursive drawing - should be overriden by every derived class.
virtual SceneNode * RecursiveCopy()
A "Memory Object" is a V-ART object that has some memory allocation attributes, allowing V-ART to aut...
SceneNode()
Creates an uninitialized scene node.
std::string description
Textual identification.
const std::string & GetDescription() const
Returns a copy of the object's description.
virtual TypeID GetID() const
Returns type identification of the node.
virtual void DrawForPicking() const =0
Draws and object, setting pick info.
virtual SceneNode * Copy()=0
Objects that process scene nodes.
virtual void XmlPrintOn(std::ostream &os, unsigned int indent) const
Recursively outputs XML representation of the scene node.
virtual void LocateBreadthFirst(SNLocator *locatorPtr) const
Seaches for a particular scene node (breadth first)
void AutoDeleteChildren() const
Deletes (dealocate memory) recursively all children marked as 'autoDelete'.
virtual void LocateDepthFirst(SNLocator *locatorPtr) const
Seaches for a particular scene node (depth first)
SceneNode & operator=(const SceneNode &node)
void SetDescription(const std::string &desc)
Changes the object's description.
std::list< SceneNode * > GetChilds()
bool RecursiveFindPathTo(SceneNode *targetPtr, SGPath *resultPtr) const
Recursive auxiliar method for FindPathTo.
static bool recursivePrinting
virtual bool DrawOGL() const
Recursive drawing using OpenGL commands.
SceneNode * FindChildByName(const std::string &name) const
Recusively searches its children for a given name.
Scene Node Locator – used to find a particular object in the scene graph.
bool FindPathTo(SceneNode *targetPtr, SGPath *resultPtr) const
Search target among children.
int GetNodeTypeList(TypeID type, std::list< SceneNode * > &nodeList)
Find all the nodes of with typeID 'type'.
bool DetachChild(SceneNode *childPtr)
Removes a child from the child list.
void AddChild(SceneNode &child)
Add a child at the end of child list.