Esempio n. 1
0
        public void Encapsulate(OrientedBox orientedBox)
        {
            List <Vector3> orientedBoxPoints = orientedBox.GetCenterAndCornerPoints();

            foreach (Vector3 point in orientedBoxPoints)
            {
                AddPoint(point);
            }
        }
Esempio n. 2
0
        public bool AreAllBoxPointsOnOrInFrontOfAnyFacePlane(OrientedBox otherBox)
        {
            List <Vector3> otherBoxPoints = otherBox.GetCenterAndCornerPoints();
            List <Plane>   allFacePlanes  = GetBoxFacePlanes();

            foreach (Plane plane in allFacePlanes)
            {
                if (PlaneExtensions.AreAllPointsInFrontOrOnPlane(plane, otherBoxPoints))
                {
                    return(true);
                }
            }

            return(false);
        }