Exemplo n.º 1
0
        public void GetAllVertices_Offset_Test()
        {
            //offset 5 blocks to the right, 1 up, 1 in.
            var result = BlockMesh.GetAllVertices(new Vector3(5, 1, 1));

            Assert.AreEqual(new Vector3[]
            {
                new Vector3(4.5f, 0.5f, 0.5f),  //Left Bottom Back
                new Vector3(5.5f, 0.5f, 0.5f),  //Right Bottom Back
                new Vector3(5.5f, 1.5f, 0.5f),  //Right Top Back
                new Vector3(4.5f, 1.5f, 0.5f),  //Left Top Back - One face is completed!
                new Vector3(4.5f, 0.5f, 1.5f),  //Left Bottom Front
                new Vector3(5.5f, 0.5f, 1.5f),  //Right Bottom Front
                new Vector3(5.5f, 1.5f, 1.5f),  //Right Top Front
                new Vector3(4.5f, 1.5f, 1.5f),  //Left Top Front
            }, result);
        }