bool plPhysXCooking::IsPointInsideHull(hsPlane3* hull, int nPlanes, const hsPoint3& pos) { int i; for( i = 0; i < nPlanes; i++ ) { // add a fudge to the point so not to trip on the ever so slightly concave // ... so pull the point out in the direction of the normal of the plane we are testing. hsPoint3 fudgepos = pos + (hull[i].GetNormal()*0.005f); if (!ITestPlane(fudgepos, hull[i])) return false; } return true; }
bool plPXPhysical::IsObjectInsideHull(const hsPoint3& pos) { if (fSaveTriangles) { ISetHullToWorldWTriangles(); int i; for( i = 0; i < fHullNumberPlanes; i++ ) { if (!ITestPlane(pos, fWorldHull[i])) return false; } return true; } return false; }