I did the following:

class CullCallback : public osg::NodeCallback
{
public:
        bool isVisible;
        CullCallback():isVisible(false){}
    virtual void operator()(osg::Node* node, osg::NodeVisitor* nv)
    { 
        traverse(node,nv);
                if (!((osgUtil::CullVisitor*) nv)->isCulled(*node))
                        this->isVisible=true;
    }
};

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
visible.
Everything is said to be visible.

Please help me. I really don't get it.

Greeting 
        Hagen
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to