diff --git a/cocos/3d/CCPlane.cpp b/cocos/3d/CCPlane.cpp index 3fa0b7f8b9..722ed2e91d 100755 --- a/cocos/3d/CCPlane.cpp +++ b/cocos/3d/CCPlane.cpp @@ -92,17 +92,4 @@ PointSide Plane::getSide(const Vec3& point) const return PointSide::IN_PLANE; } -PointSide Plane::getSide(const Vec3& point, const Vec3& tolerance) const -{ - float dist = dist2Plane(point); - float maxAbsDist = fabs(_normal.x * tolerance.x) + fabs(_normal.y * tolerance.y) + fabs(_normal.z * tolerance.z); - - if (dist > maxAbsDist) - return PointSide::FRONT_PLANE; - else if (dist < -maxAbsDist) - return PointSide::BEHIND_PLANE; - else - return PointSide::IN_PLANE; -} - NS_CC_END diff --git a/cocos/3d/CCPlane.h b/cocos/3d/CCPlane.h index 87509b32f3..cc1baf822c 100755 --- a/cocos/3d/CCPlane.h +++ b/cocos/3d/CCPlane.h @@ -100,11 +100,6 @@ public: */ PointSide getSide(const Vec3& point) const; - /** - * Return the side where the point is. - */ - PointSide getSide(const Vec3& point, const Vec3& tolerance) const; - protected: Vec3 _normal; // the normal line of the plane float _dist; // original displacement of the normal