Esempio n. 1
0
 /// <summary>
 /// Create a new TMD normal by reading from a binary stream.
 /// </summary>
 /// <param name="br">The binary stream.</param>
 public TMDNormal(BinaryReader br)
 {
     X = br.ReadBytes(2);
     Y = br.ReadBytes(2);
     Z = br.ReadBytes(2);
     br.ReadInt16();
 }
Esempio n. 2
0
        /// <summary>
        /// Create this packet from a stream.
        /// </summary>
        /// <param name="br">The stream.</param>
        /// <param name="flag">Packet flag.</param>
        public TODMatrixPacketData(BinaryReader br, int flag)
            : base(flag)
        {
            Rotation = new FixedPoint16Bit[3, 3];
            for (int y = 0; y < 3; y++)
            {
                for (int x = 0; x < 3; x++)
                {
                    Rotation[y, x] = new FixedPoint16Bit(br.ReadBytes(2));
                }
            }

            br.ReadBytes(2); // skip 2 bytes

            Translation = new FixedPoint32Bit[3];
            for (int i = 0; i < 3; i++)
            {
                Translation[i] = new FixedPoint32Bit(br.ReadBytes(4));
            }
        }