Are you aware that you could just write your scene graph as a .osg file? .osg is ASCII text. -Paul
> -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf > Of Per Rosengren > Sent: Sunday, February 17, 2008 7:07 AM > To: OpenSceneGraph Users > Subject: [osg-users] Printing the scene graph as text > > I order to debug the osg program I am currently working on, I > have written some functions to print the scene graph as text. > For instance, > > notify(NOTICE) << myNode; > > will print the following to stdout: > -------------------------------------------- > Camera: > Group: Scene root > Group: ../../models/polis-tri-v2.3ds > Geode: Cube > Geometry: : Vertices: 194 > Geode: Cylinder > Geometry: : Vertices: 392 > Switch: Switch blobs on/off: On: 0 1 > PositionAttitudeTransform: : Pos: ( -3.21639, -1.86514, > 0.587853 ), Scale: ( 1, 1, 1 ) > Geode: > ShapeDrawable: -> Sphere: : Radius: 0.1 > PositionAttitudeTransform: : Pos: ( 2.39094, -1.85198, > -0.263018 ), Scale: ( 1.5, 1.5, 1.5 ) > Geode: > ShapeDrawable: -> Sphere: : Radius: 0.1 > PositionAttitudeTransform: : Pos: ( -0.351465, -1.85198, > -0.231732 ), Scale: ( 1.9, 1.9, 1.9 ) > Geode: > ShapeDrawable: -> Sphere: : Radius: 0.1 > PositionAttitudeTransform: : Pos: ( 2.39094, -1.85198, > -0.263018 ), > Scale: ( 1.9, 1.9, 1.9 ) > Geode: > ShapeDrawable: -> Sphere: : Radius: 0.1 > > > -------------------------------------------- > > This is very useful for me, and would probably be useful for > others as well. Should I add these functions to osg, and in > that case, where and how? > > _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

