mirror of
https://github.com/aelurum/AssetStudio.git
synced 2025-07-19 11:34:16 -04:00
optimizing
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using SharpDX;
|
||||
@ -15,11 +16,61 @@ namespace AssetStudio
|
||||
List<ImportedMorph> MorphList { get; }
|
||||
}
|
||||
|
||||
public class ImportedFrame : ObjChildren<ImportedFrame>, IObjChild
|
||||
public class ImportedFrame : IEnumerable<ImportedFrame>
|
||||
{
|
||||
public string Name { get; set; }
|
||||
public Matrix Matrix { get; set; }
|
||||
public dynamic Parent { get; set; }
|
||||
public ImportedFrame Parent { get; set; }
|
||||
|
||||
private List<ImportedFrame> children;
|
||||
|
||||
public ImportedFrame this[int i] => children[i];
|
||||
|
||||
public int Count => children.Count;
|
||||
|
||||
public void InitChildren(int count)
|
||||
{
|
||||
children = new List<ImportedFrame>(count);
|
||||
}
|
||||
|
||||
public void AddChild(ImportedFrame obj)
|
||||
{
|
||||
children.Add(obj);
|
||||
obj.Parent = this;
|
||||
}
|
||||
|
||||
public void InsertChild(int i, ImportedFrame obj)
|
||||
{
|
||||
children.Insert(i, obj);
|
||||
obj.Parent = this;
|
||||
}
|
||||
|
||||
public void RemoveChild(ImportedFrame obj)
|
||||
{
|
||||
obj.Parent = null;
|
||||
children.Remove(obj);
|
||||
}
|
||||
|
||||
public void RemoveChild(int i)
|
||||
{
|
||||
children[i].Parent = null;
|
||||
children.RemoveAt(i);
|
||||
}
|
||||
|
||||
public int IndexOf(ImportedFrame obj)
|
||||
{
|
||||
return children.IndexOf(obj);
|
||||
}
|
||||
|
||||
public IEnumerator<ImportedFrame> GetEnumerator()
|
||||
{
|
||||
return children.GetEnumerator();
|
||||
}
|
||||
|
||||
IEnumerator IEnumerable.GetEnumerator()
|
||||
{
|
||||
return GetEnumerator();
|
||||
}
|
||||
}
|
||||
|
||||
public class ImportedMesh
|
||||
|
Reference in New Issue
Block a user