Ejemplo n.º 1
0
        public static Mesh LoadMesh(XmlElement def)
        {
            Mesh toReturn = new Mesh();

            if(def.HasAttribute("filename"))
            {
                string str_file = def.GetAttribute("filename");
                bool smooth = false;
                if (def.HasAttribute("smooth"))
                    smooth = Convert.ToBoolean(def.GetAttribute("smooth"));

                toReturn.loadFromFile(str_file, smooth);
            }

            toReturn.SetupCells();

            return toReturn;
        }