public void MaxRadiusSameCenter() { var spheres = new List <Vector4> { new Vector4(0, 0, 0, 1), new Vector4(0, 0, 0, 2) }; var boundingSphere = BoundingSphereGenerator.GenerateBoundingSphere(spheres); Assert.IsTrue(SpherePointUtils.SphereContainsSpheres(boundingSphere, spheres)); }
public void SingleBoundingSphere() { var spheres = new List <Vector4> { new Vector4(0, 0, 0, 1) }; var boundingSphere = BoundingSphereGenerator.GenerateBoundingSphere(spheres); Assert.IsTrue(SpherePointUtils.SphereContainsSpheres(boundingSphere, spheres)); }
public void DifferentCenter3D() { var spheres = new List <Vector4> { new Vector4(1, 0, 1, 1), new Vector4(-1, 0, 1, 1), new Vector4(-1, 2, -1, 1), new Vector4(1, 2, -1, 1) }; var boundingSphere = BoundingSphereGenerator.GenerateBoundingSphere(spheres); Assert.IsTrue(SpherePointUtils.SphereContainsSpheres(boundingSphere, spheres)); }