Exemplo n.º 1
0
        private void SetNormals()
        {
            var normals = new Vector3DCollection()
            {
                new Vector3D(0, 0, -1),
                new Vector3D(0, 0, 1),
                new Vector3D(1, 0, 0),
                new Vector3D(-1, 0, 0),
                new Vector3D(0, 1, 0),
                new Vector3D(0, -1, 0)
            };
            var n2 = new Vector3DCollection()
            {
                normals[0] + normals[3] + normals[5],
                normals[0] + normals[2] + normals[5],
                normals[0] + normals[3] + normals[4],
                normals[0] + normals[2] + normals[4],
                normals[1] + normals[5] + normals[3],
                normals[1] + normals[2] + normals[5],
                normals[1] + normals[3] + normals[4],
                normals[2] + normals[4] + normals[1],
            };

            n2.ToList().ForEach(x => x.Normalize());
            D.Normals = n2;
        }