Beispiel #1
0
        public static OpsModel FromFile(Device device, string path)
        {
            OpsModel result = new OpsModel();

            OpsAllocateHierarchy alloc = new OpsAllocateHierarchy();

            AnimationRootFrame arf = Mesh.LoadHierarchyFromFile(path, MeshFlags.SystemMemory | MeshFlags.Use32Bit, device, alloc, null);

            result.HierarchyRoot  = arf.FrameHierarchy;
            result.AnimationMixer = arf.AnimationController;

            result.Name = System.IO.Path.GetFileNameWithoutExtension(path);

            return(result);
        }
 public void AddModel( OpsModel model ){ ModelTable.Add(model.Name, model); }
 public string FriendlyName(OpsModel model)
 {
     return String.Format("mesh: {0} in model: {1}",
         ((Name == null || Name.Length == 0) ? "Unnamed" : Name),
         model.Name);
 }
        public static OpsModel FromFile( Device device, string path)
        {
            OpsModel result = new OpsModel();

            OpsAllocateHierarchy alloc = new OpsAllocateHierarchy();

            AnimationRootFrame arf= Mesh.LoadHierarchyFromFile( path, MeshFlags.SystemMemory|MeshFlags.Use32Bit, device, alloc, null);

            result.HierarchyRoot = arf.FrameHierarchy;
            result.AnimationMixer = arf.AnimationController;

            result.Name = System.IO.Path.GetFileNameWithoutExtension(path);

            return result;
        }
Beispiel #5
0
 public void AddModel(OpsModel model)
 {
     ModelTable.Add(model.Name, model);
 }
Beispiel #6
0
 public string FriendlyName(OpsModel model)
 {
     return(String.Format("mesh: {0} in model: {1}",
                          ((Name == null || Name.Length == 0) ? "Unnamed" : Name),
                          model.Name));
 }