Пример #1
0
        public void GetShapeVolumeArgumentOutOfRangeException2()
        {
            var s = new SphereShape(1);
            var c = new MinkowskiSumShape(new GeometricObject(s), new GeometricObject(new PointShape()));

            c.GetVolume(0.01f, -1);
        }
Пример #2
0
        public void ApproximateVolume()
        {
            var s = new SphereShape(1);
            var c = new MinkowskiSumShape(new GeometricObject(s), new GeometricObject(new PointShape()));
            var v = c.GetVolume(0.001f,
                                0); // !!!

            // v is AABB volume.
            Assert.AreEqual(2 * 2 * 2, v);
        }