Esempio n. 1
0
        public LevelSurface(Config config)
        {
            mesh = config.meshFilter.mesh;

            MeshUtils.ApplyTransformToMesh(config.meshFilter);

            meshIndex = new MeshIndex(mesh);
        }
Esempio n. 2
0
        public MeshWalker(Mesh mesh, MeshIndex meshIndex)
        {
            if (mesh == null || meshIndex == null)
            {
                throw new System.ArgumentNullException();
            }

            this.mesh      = mesh;
            this.meshIndex = meshIndex;

            triangles = new TriangleArray(mesh.triangles);
            vertices  = mesh.vertices;
            normals   = mesh.normals;

            triangleCoords = new Vector2[3];
        }