Ejemplo n.º 1
0
        public static Mesh CreateMesh(string pathToMesh)
        {
            var modelLoader     = LoaderFactory.GetModelLoader(pathToMesh);
            var indices         = new List <uint>();
            var indexedVertices = new List <Vector3>();
            var indexedUvs      = new List <Vector2>();
            var indexedNormals  = new List <Vector3>();

            modelLoader.LoadModel(pathToMesh, indices, indexedVertices, indexedUvs, indexedNormals);

            return(new Mesh(indexedVertices, indexedUvs, indexedNormals, indices));
        }