Exemplo n.º 1
0
        public void AddModel(libTechModel Model)
        {
            Array.Resize(ref MapModels, MapModels.Length + 1);
            MapModels[MapModels.Length - 1] = Model;
            Model.SetLabel(string.Format("Map model {0}", MapModels.Length - 1));

            /*foreach (var Msh in Model.GetMeshes())
             *      if (Msh.Material.MaterialName == "water")
             *              Msh.SetWireframe(true);*/
        }
Exemplo n.º 2
0
        public libTechModel LoadModel(string Pth)
        {
            if (LoadedModels.ContainsKey(Pth))
            {
                return(LoadedModels[Pth]);
            }

            libTechModel Mdl = Engine.Load <libTechModel>(Pth);

            if (Mdl == null)
            {
                throw new Exception("Could not load model " + Pth);
            }

            Mdl.SetLabel(Pth);
            LoadedModels.Add(Pth, Mdl);
            return(Mdl);
        }