Exemplo n.º 1
0
 public static ModelReference CreateModelReference(IFile file)
 {
     var model = LoadModel(file);
     var reference = new ModelReference(file.FullPathName, model);
     References.Add(reference);
     return reference;
 }
Exemplo n.º 2
0
 private static void SetModel(Entity entity, ModelReference model)
 {
     entity.MetaData.Set(ModelMetaKey, model);
     entity.MetaData.Set(ModelNameMetaKey, GetModelName(entity));
     entity.MetaData.Set(ModelBoundingBoxMetaKey, model.Model.GetBoundingBox());
     entity.UpdateBoundingBox();
 }
Exemplo n.º 3
0
 public static void DeleteModelReference(ModelReference reference)
 {
     References.Remove(reference);
     if (References.All(x => x.Model != reference.Model))
     {
         UnloadModel(reference.Model);
     }
 }
Exemplo n.º 4
0
 public static void DeleteModelReference(ModelReference reference)
 {
     References.Remove(reference);
     if (References.All(x => x.Model != reference.Model))
     {
         UnloadModel(reference.Model);
     }
 }
Exemplo n.º 5
0
        public static ModelReference CreateModelReference(IFile file)
        {
            var model     = LoadModel(file);
            var reference = new ModelReference(file.FullPathName, model);

            References.Add(reference);
            return(reference);
        }
Exemplo n.º 6
0
 public static void SetModel(this Entity entity, ModelReference model)
 {
     entity.MetaData.Set(ModelMetaKey, model);
     entity.MetaData.Set(ModelBoundingBoxMetaKey, (Box) null); //todo.
 }
Exemplo n.º 7
0
 private static void SetModel(Entity entity, ModelReference model)
 {
     entity.MetaData.Set(ModelMetaKey, model);
     entity.MetaData.Set(ModelNameMetaKey, GetModelName(entity));
     entity.MetaData.Set(ModelBoundingBoxMetaKey, (Box) null); //todo.
 }