Example #1
0
        public override void Read(BinaryReaderExt r)
        {
            base.Read(r);
            r.ReadByte();
            Vector1 = new LVDVector3(r.ReadSingle(), r.ReadSingle(), r.ReadSingle());
            r.ReadByte();
            Vector2 = new LVDVector3(r.ReadSingle(), r.ReadSingle(), r.ReadSingle());
            r.ReadByte();

            int vec3Count = r.ReadInt32();

            for (int i = 0; i < vec3Count; i++)
            {
                r.ReadByte();
                Vectors.Add(new LVDVector3(r.ReadSingle(), r.ReadSingle(), r.ReadSingle()));
            }

            r.ReadByte();
            Mat4x4_1 = new float[16];
            for (int i = 0; i < 16; i++)
            {
                Mat4x4_1[i] = r.ReadSingle();
            }

            r.ReadByte();
            Mat4x4_2 = new float[16];
            for (int i = 0; i < 16; i++)
            {
                Mat4x4_2[i] = r.ReadSingle();
            }
        }
Example #2
0
        public virtual void Read(BinaryReaderExt r)
        {
            EntryFlags  = r.ReadInt64();
            EntryNumber = r.ReadInt32();

            bool hasString = r.ReadBoolean();

            EntryName = r.ReadString(0x38);

            bool hasLabel = r.ReadBoolean();

            EntryLabel = r.ReadString(0x40);

            bool hasStartPosition = r.ReadBoolean();

            StartPosition    = new LVDVector3(r.ReadSingle(), r.ReadSingle(), r.ReadSingle());
            UseStartPosition = r.ReadBoolean();

            // Unknown
            r.Skip(1);
            UnknownIndex2 = r.ReadInt32();

            r.Skip(1);
            UnknownVector = new LVDVector3(r.ReadSingle(), r.ReadSingle(), r.ReadSingle());
            UnknownIndex  = r.ReadInt32();

            r.Skip(1);
            BoneName = r.ReadString(0x40);
        }