[osg-users] Need a non-const NodeVisitor -- again
pmartz at skew-matrix.com
Sat Sep 15 14:29:21 PDT 2007
Hi Robert -- Here's an interesting aspect of OSG's design I've just recently
osgDB::ReaderWriter::writeNode's first param is a const osg::Node&. I can
understand that writing a file is inherently a const operation as far as the
scene graph is concerned. However, the obvious thing to do within writeNode
is to traverse the node with a NodeVisitor, which requires calling
Node::accept(), which requires the node to be non-const.
So it seems like the nature of the design is to require writeNode to cast
away const, but I wanted to check: Did you intend implementations of
writeNode to do something other than use a NodeVisitor?
Skew Matrix Software LLC
303 859 9466
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the osg-users