public BoxFace GetBoxFaceWhichFacesNormal(Vector3 normal) { List <Plane> facePlanes = GetBoxFacePlanes(); int planeIndex; PlaneExtensions.GetPlaneWhichFacesNormal(facePlanes, normal, out planeIndex); return((BoxFace)planeIndex); }
public BoxFace GetBoxFaceMostAlignedWithNormal(Vector3 normal) { List <Plane> facePlanes = GetBoxFacePlanes(); int planeIndex; PlaneExtensions.GetPlaneMostAlignedWithNormal(facePlanes, normal, out planeIndex); return((BoxFace)planeIndex); }
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); }