Example #1
0
        public void When_FindFloorFaceOfSimpleCube_Expect_FloorFace(Structure structure)
        {
            Component simpleCube = structure.components[0];

            int lowestVertex = ComponentGraphGenerator.FindLowestVertex(simpleCube);

            int faceIndex = ComponentGraphGenerator.FindStartFloorFace(simpleCube, lowestVertex);

            Assert.That(faceIndex == SimpleCubeBottomFace1 || faceIndex == SimpleCubeBottomFace2);
        }
Example #2
0
        public void When_FindLowestVertexOfSimpleCube_Expect_YIsZero(Structure structure)
        {
            Component simpleCube = structure.components[0];

            Assert.That(Util.NearlyEqual(simpleCube.vertices[ComponentGraphGenerator.FindLowestVertex(simpleCube)].coordinate.y, 0));
        }
Example #3
0
        public void When_FindLowestVertexEmptyComponent_ExpectThrowEmptyListException_Helper()
        {
            Component c = new Component();

            ComponentGraphGenerator.FindLowestVertex(c);
        }