Improved handling of bounding polytope

This commit is contained in:
Robert Osfield
2006-11-24 17:20:01 +00:00
parent 006435e679
commit 5044a85c9e
3 changed files with 82 additions and 21 deletions

View File

@@ -123,6 +123,14 @@ class OSG_EXPORT Plane
_fv[3];
}
/** calculate the dot product of the plane normal and a point.*/
inline float dotProductNormal(const osg::Vec3& v) const
{
return _fv[0]*v.x()+
_fv[1]*v.y()+
_fv[2]*v.z();
}
/** intersection test between plane and vertex list
return 1 if the bs is completely above plane,
return 0 if the bs intersects the plane,