| 
    osgEarth 2.1.1 
   | 
 
Public Member Functions | |
| CullNodeByNormal (const osg::Vec3d &normal) | |
| void | operator() (osg::Node *node, osg::NodeVisitor *nv) | 
Public Attributes | |
| osg::Vec3d | _normal | 
A simple culling-plane callback (a simpler version of ClusterCullingCallback)
| CullNodeByNormal::CullNodeByNormal | ( | const osg::Vec3d & | normal | ) | 
| void CullNodeByNormal::operator() | ( | osg::Node * | node, | 
| osg::NodeVisitor * | nv | ||
| ) | 
Definition at line 75 of file Utils.cpp.
{
    osg::Vec3d eye, center, up;
    osgUtil::CullVisitor* cv = static_cast<osgUtil::CullVisitor*>( nv );
    cv->getCurrentCamera()->getViewMatrixAsLookAt(eye,center,up);
    eye.normalize();
    osg::Vec3d normal = _normal;
    normal.normalize();
    double dotProduct = eye * normal;
    if ( dotProduct > 0.0 )
    {
        traverse(node, nv);
    }
}
| osg::Vec3d osgEarth::CullNodeByNormal::_normal | 
 1.7.3