Пример #1
0
        public void AppendModifier(List <int> vertexIndexes, TRIFile reference, string name)
        {
            if (this.header.ModVertexCount <= 0)
            {
                this.modVertices = new List <VertexPosition>();
            }
            this.header.ModVertexCount += vertexIndexes.Count;
            foreach (int vertIndex in vertexIndexes)
            {
                this.modVertices.Add(reference.vertices[vertIndex]);
            }
            TRIModifierData mod = new TRIModifierData();

            mod.NameSize = name.Length;
            mod.Name     = name.Clone() as string;
            mod.DataSize = vertexIndexes.Count;
            foreach (int vertIndex in vertexIndexes)
            {
                mod.Add(vertIndex);
            }
            if (this.header.ModifierCount <= 0)
            {
                this.modifiers = new List <TRIModifierData>();
            }
            this.modifiers.Add(mod);
            this.header.ModifierCount += 1;
        }
Пример #2
0
 public TRIModifierData(TRIModifierData mod)
     : base()
 {
     this.nameSize = mod.nameSize;
     this.name     = mod.name.Clone() as string;
     this.dataSize = mod.dataSize;
     foreach (int nr in mod)
     {
         this.Add(nr);
     }
 }