Esempio n. 1
0
void CVRCullVisitor::PreCullVisitor::apply(osg::Group& group)
{
    bool setMask = false;
    for(int i = 0; i < group.getNumChildren(); i++)
    {
        _setMask = false;
        group.getChild(i)->accept(*this);
        if(_setMask)
        {
            setMask = true;
        }
    }

    if(group.getNodeMask() & FIRST_CULL_STATUS)
    {
        _setMask = true;
    }
    else if(setMask)
    {
        //std::cerr << "Pulling up node mask." << std::endl;
        _setMask = true;
        group.setNodeMask(group.getNodeMask() | FIRST_CULL_STATUS);
    }

}
Esempio n. 2
0
void CVRCullVisitor::PostCullVisitor::apply(osg::Group& group)
{
    group.setNodeMask(group.getNodeMask() & ~(FIRST_CULL_STATUS));
    traverse(group);
}