Update callbacks replace the standard traversal (see osg::NodeCallback's
header file), so you have to call osg::NodeCallback::traverse() to
traverse the Node's children. So:
Kenny Chang wrote on Friday, September 01, 2006 5:27 PM:
> class callback : public osg::NodeCallback
> {
> public:
> callback( internal* p )
> : parent( p )
> {}
>
> virtual void operator()( osg::Node* n, osg::NodeVisitor* nv )
> {
> parent->update( nv, n );
traverse(n,nv);
> }
> internal* parent;
> };
>
> internal::init()
> {
> ...
> root = new osg::Group;
>
> transpStateSet = new osg::StateSet;
> // set some state set stuff..
>
> root->setStateSet( transpStateSet.get() );
> root->setUpdateCallback( new callback( this ) );
> ...
> }
--
Bryan Thrall
FlightSafety International
[EMAIL PROTECTED]
.
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/