Beispiel #1
0
        public void MBBCreationTest()
        {
            MBB      mbb      = new MBB();
            Triangle triangle = new Triangle(new Point(1, -1, 2),
                                             new Point(4, 2, 7), new Point(-5, 5, -6));

            mbb.AddTriangle(triangle);
            Assert.AreEqual(-5, mbb._xMin);
            Assert.AreEqual(4, mbb._xMax);
            Assert.AreEqual(-1, mbb._yMin);
            Assert.AreEqual(5, mbb._yMax);
            Assert.AreEqual(-6, mbb._zMin);
            Assert.AreEqual(7, mbb._zMax);
        }
Beispiel #2
0
        public void AnotherCtorTest()
        {
            MBB      mbb      = new MBB();
            Triangle triangle = new Triangle(new Point(1, -1, 2),
                                             new Point(4, 2, 7), new Point(-5, 5, -6));

            mbb.AddTriangle(triangle);
            MBB mbb1 = new MBB(triangle);

            Assert.AreEqual(mbb1._xMin, mbb._xMin);
            Assert.AreEqual(mbb1._xMax, mbb._xMax);
            Assert.AreEqual(mbb1._yMin, mbb._yMin);
            Assert.AreEqual(mbb1._yMax, mbb._yMax);
            Assert.AreEqual(mbb1._zMin, mbb._zMin);
            Assert.AreEqual(mbb1._zMax, mbb._zMax);
        }