Esempio n. 1
0
 public static void Write(this BinaryWriter writer, Index3 idx)
 {
     writer.Write(idx.Index0);
     writer.Write(idx.Index1);
     writer.Write(idx.Index2);
 }
Esempio n. 2
0
        /// <summary>
        /// Reads the WMO Vertex Index List
        /// </summary>
        /// <param name="br"></param>
        /// <param name="group"></param>
        static void ReadMOVI(BinaryReader br, WMOGroup group)
        {
            //group.Triangles = new ushort[group.TriangleCount * 3];
            for (uint i = 0; i < group.TriangleCount; i++)
            {
                var one = br.ReadInt16();
                var two = br.ReadInt16();
                var three = br.ReadInt16();

                var ind = new Index3 {Index0 = three, Index1 = two, Index2 = one};
                //var ind = new Index3 { Index0 = one, Index1 = two, Index2 = three };
                group.Indices.Add(ind);
            }
        }