[osg-users] View Frutrum Culling
paul at science.uva.nl
Wed Jul 30 05:31:16 PDT 2008
Kaiser, Hagen (CT) wrote:
> I did the following:
> class CullCallback : public osg::NodeCallback
> bool isVisible;
> virtual void operator()(osg::Node* node, osg::NodeVisitor* nv)
> if (!((osgUtil::CullVisitor*) nv)->isCulled(*node))
> I installed this to every node where I want to know if its currently
> visible or not with setCullCallback
> Then I question somewhere else the flag like this:
> return ((CullCallback*)this->node->getCullCallback())->isVisible;
> Even if my camera is far away and facing somewhere, where nothing is
> Everything is said to be visible.
> Please help me. I really don't get it.
Could it be that the cull callback is only called for objects that are
NOT culled, i.e. whose bounding spheres overlap with the frustum?
More information about the osg-users