コード例 #1
0
 public void Load(BinaryReader reader)
 {
     if (globalVersion == 0)
     {
         index  = MBUtil.LoadInt32(reader);
         col    = MBUtil.LoadUInt32(reader);              // color x vert! as 4 bytes AABBGGRR
         __norm = MBUtil.LoadPoint3F(reader);
         ta     = MBUtil.LoadPoint2F(reader);
         ta.Y   = 1 - ta.Y;
         tb     = MBUtil.LoadPoint2F(reader);
         tb.Y   = 1 - tb.Y;
     }
     else if (globalVersion == 1)
     {
         index  = MBUtil.LoadInt32(reader);
         col    = MBUtil.LoadUInt32(reader);              // color x vert! as 4 bytes AABBGGRR
         __norm = MBUtil.LoadPoint3F(reader);
         tang   = MBUtil.LoadPoint3F(reader);
         tangi  = MBUtil.LoadByte(reader);
         ta     = MBUtil.LoadPoint2F(reader);
         ta.Y   = 1 - ta.Y;
         tb     = ta;
     }
     else if (globalVersion == 2)
     {
         index  = MBUtil.LoadInt32(reader);
         col    = MBUtil.LoadUInt32(reader);              // color x vert! as 4 bytes AABBGGRR
         __norm = MBUtil.LoadPoint3F(reader);
         ta     = MBUtil.LoadPoint2F(reader);
         ta.Y   = 1 - ta.Y;
         tb     = ta;
     }
 }