Hi,
To my mind there are two solutions :
1. You put your callback on the LOD child you want, so when the child
will be hidden by a upper-detailed level child, the callback should not
be traversed
2. in your callback you check if your node is still active, and if not,
just do nothing.
Hope this will help you.
Regards,
Vincent.
Le 08/09/2010 14:20, Roman Grigoriev a écrit :
Hi,
I have LOD with 3 nodes and use updatecallback to Animate children, I setup
updatecallback to my highest LOD, my when i switch to medium lod my update
callback worked also. Is it possible to switch it off when my model switches to
another LOD.
my updatecallback
class ModelNodeCallbackTower : public osg::NodeCallback
{
public:
virtual void operator()(osg::Node* node, osg::NodeVisitor* nv)
{
osg::MatrixTransform* mtx =
dynamic_cast<osg::MatrixTransform*>(node);
if (mtx&& nv->getFrameStamp())
{
std::cout<<"!!!"<<std::endl;
}
traverse(node, nv);
}
};
...
Thank you!
Cheers,
Roman
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=31412#31412
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org