osgEarth 2.1.1
|
Public Member Functions | |
bool | intersects (const osg::BoundingSphere &bs) const |
bool | intersects (const osg::BoundingBox &box) const |
Extends ConvexPolyhedron to add bounds tests.
Definition at line 43 of file OverlayDecorator.cpp.
bool anonymous_namespace{OverlayDecorator.cpp}::MyConvexPolyhedron::intersects | ( | const osg::BoundingSphere & | bs | ) | const [inline] |
Definition at line 46 of file OverlayDecorator.cpp.
{ for( Faces::const_iterator i = _faces.begin(); i != _faces.end(); ++i ) { osg::Plane up = i->plane; up.makeUnitLength(); if ( up.distance( bs.center() ) < -bs.radius() ) return false; } return true; }
bool anonymous_namespace{OverlayDecorator.cpp}::MyConvexPolyhedron::intersects | ( | const osg::BoundingBox & | box | ) | const [inline] |
Definition at line 58 of file OverlayDecorator.cpp.
{ for( Faces::const_iterator i = _faces.begin(); i != _faces.end(); ++i ) { osg::Plane up = i->plane; up.makeUnitLength(); if ( up.intersect(box) < 0 ) return false; } return true; }