Changeset 4655 for geovis/trunk/Trace.h
- Timestamp:
- Oct 21, 2014 10:26:44 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
geovis/trunk/Trace.h
r4422 r4655 9 9 #define GEOVIS_TRACE_H 10 10 11 #include <cstring> 11 12 #include <string> 12 13 13 14 #include <syslog.h> 15 16 #include <osg/NodeVisitor> 14 17 15 18 namespace GeoVis { … … 39 42 #define USER_ERROR(...) GeoVis::logUserMessage(__VA_ARGS__) 40 43 44 class GraphPrintVisitor : public osg::NodeVisitor 45 { 46 public: 47 GraphPrintVisitor() 48 : osg::NodeVisitor(osg::NodeVisitor::TRAVERSE_ALL_CHILDREN) 49 {} 50 51 virtual void apply(osg::Node& node) 52 { 53 char space[256]; 54 size_t len = getNodePath().size(); 55 memset(space, ' ', len); 56 space[len] = '\0'; 57 TRACE("%s%s (%s) %p", space, node.className(), node.getName().c_str(), &node); 58 traverse(node); 59 } 60 }; 61 41 62 } 42 63
Note: See TracChangeset
for help on using the changeset viewer.