Beispiel #1
0
        public void BlockSizesChangesCube()
        {
            var cube = CubeFactory.GetCubeWithDefaultFaces(3);

            AssertCubeBounds(new Vector3(-1.5f, -1.5f, -1.5f),
                             new Vector3(1.5f, 1.5f, 1.5f), cube);
        }
Beispiel #2
0
        /// <summary>
        ///  _+ size /2__
        /// |            |
        /// |    _       |
        /// |            |
        /// |__- size /2_|
        /// </summary>
        public void CubeAtOrigin()
        {
            var cube = CubeFactory.GetCubeWithDefaultFaces(BlockSize);

            const float halfSize = BlockSize / 2f;

            AssertCubeBounds(new Vector3(-halfSize, -halfSize, -halfSize),
                             new Vector3(halfSize, halfSize, halfSize), cube);
        }
Beispiel #3
0
        public void CubeHasCorrectNumberOfVertices()
        {
            const int verticesInAFace = 6;
            const int facesInACube    = 6;

            var cube = CubeFactory.GetCubeWithDefaultFaces(BlockSize);

            cube.Length.ShouldBe(verticesInAFace * facesInACube);
        }