Exemple #1
0
 public override void Read(NiHeader header, BinaryReader reader)
 {
     base.Read(header, reader);
     this.numTrianglePoints = reader.ReadUInt32();
     this.hasTriangles      = Utils.ReadBool(reader);
     if (this.hasTriangles)
     {
         for (int index = 0; index < (int)this.GetNumTriangles(); ++index)
         {
             this.triangles.Add(Utils.ReadTriangle(reader));
         }
     }
     this.numMatchGroups = reader.ReadUInt16();
     for (int index1 = 0; index1 < (int)this.numMatchGroups; ++index1)
     {
         MatchGroup matchGroup = new MatchGroup();
         matchGroup.numVertices   = reader.ReadUInt16();
         matchGroup.vertexIndices = new List <ushort>();
         for (int index2 = 0; index2 < (int)matchGroup.numVertices; ++index2)
         {
             matchGroup.vertexIndices.Add(reader.ReadUInt16());
         }
         this.matchGroups.Add(matchGroup);
     }
 }
 public override void Read(NiHeader header, BinaryReader reader)
 {
     base.Read(header, reader);
     this.numTrianglePoints = reader.ReadUInt32();
     this.hasTriangles = Utils.ReadBool(reader);
     if (this.hasTriangles)
     {
         for (int index = 0; index < (int)this.GetNumTriangles(); ++index)
             this.triangles.Add(Utils.ReadTriangle(reader));
     }
     this.numMatchGroups = reader.ReadUInt16();
     for (int index1 = 0; index1 < (int)this.numMatchGroups; ++index1)
     {
         MatchGroup matchGroup = new MatchGroup();
         matchGroup.numVertices = reader.ReadUInt16();
         matchGroup.vertexIndices = new List<ushort>();
         for (int index2 = 0; index2 < (int)matchGroup.numVertices; ++index2)
             matchGroup.vertexIndices.Add(reader.ReadUInt16());
         this.matchGroups.Add(matchGroup);
     }
 }