| VRS - The Virtual Rendering System |
| version 3.3 |
#include <vrs/sg/scenegraphprinter.h>

Public Types | |
| typedef CallbackR1 < std::string, SO < VRS::SharedObj > > | ToStringCallback |
Public Member Functions | |
| SceneGraphPrinter (unsigned int maxLevels=1000) | |
| virtual VisitMode | visit (VRS::SharedObj *obj, bool pushObj) |
| void | registerCustomToString (const VRS::ID &className, SO< ToStringCallback > callback) |
| void | printHeader () const |
| void | writeToFile (SO< SceneNode > scene, const std::string &filename) |
Protected Member Functions | |
| virtual void | print (VRS::SharedObj *obj, bool pushObj) |
Protected Attributes | |
| const unsigned int | m_maxLevels |
| std::string | m_indentation |
| std::map< VRS::ID, SO < ToStringCallback > > | m_customToStrings |
Please feel free to add custom output for more Attributes and Shapes! If you need to add Shapes or other objects that are not part of VRS itself, subclass this class and overwrite print(). You can call it explicitly via SceneGraphPrinter::print() inside that overwritten method to use the existing functionality.
Usage: SceneGraphPrinter printer; mySceneThing->accept(printer);
| typedef CallbackR1<std::string, SO<VRS::SharedObj> > VRS::SceneGraphPrinter::ToStringCallback |
| VRS::SceneGraphPrinter::SceneGraphPrinter | ( | unsigned int | maxLevels = 1000 |
) |
| virtual VisitMode VRS::SceneGraphPrinter::visit | ( | VRS::SharedObj * | obj, | |
| bool | pushObj | |||
| ) | [virtual] |
Implements VRS::Visitor< VRS::SharedObj >.
| void VRS::SceneGraphPrinter::registerCustomToString | ( | const VRS::ID & | className, | |
| SO< ToStringCallback > | callback | |||
| ) |
| void VRS::SceneGraphPrinter::printHeader | ( | ) | const |
| virtual void VRS::SceneGraphPrinter::print | ( | VRS::SharedObj * | obj, | |
| bool | pushObj | |||
| ) | [protected, virtual] |
const unsigned int VRS::SceneGraphPrinter::m_maxLevels [protected] |
std::string VRS::SceneGraphPrinter::m_indentation [protected] |
std::map<VRS::ID, SO<ToStringCallback> > VRS::SceneGraphPrinter::m_customToStrings [protected] |