public void Encapsulate(OrientedBox orientedBox) { List <Vector3> orientedBoxPoints = orientedBox.GetCenterAndCornerPoints(); foreach (Vector3 point in orientedBoxPoints) { AddPoint(point); } }
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); }