public static Triangle Deserialize(FZReader reader)
        {
            var obj = new Triangle();

            obj.address  = (int)reader.BaseStream.Position;
            obj.unknown1 = reader.ReadInt32();
            obj.normal   = reader.ReadVector3();
            obj.vertex1  = reader.ReadVector3();
            obj.vertex2  = reader.ReadVector3();
            obj.vertex3  = reader.ReadVector3();
            obj.unknown2 = reader.ReadBytes(36);

            return(obj);
        }
        public static CheckpointData Deserialize(FZReader reader)
        {
            var obj = new CheckpointData();

            obj.address        = (int)reader.BaseStream.Position;
            obj.trackOffset1   = reader.ReadSingle();
            obj.trackOffset2   = reader.ReadSingle();
            obj.unknown3       = reader.ReadSingle();
            obj.startTangent   = reader.ReadVector3();
            obj.start          = reader.ReadVector3();
            obj.unknown4       = reader.ReadSingle();
            obj.endTangent     = reader.ReadVector3();
            obj.end            = reader.ReadVector3();
            obj.unknown5       = reader.ReadSingle();
            obj.unknown6       = reader.ReadSingle();
            obj.width          = reader.ReadSingle();
            obj.startConnected = reader.ReadByte();
            obj.endConnected   = reader.ReadByte();
            obj.flag3          = reader.ReadByte();
            obj.flag4          = reader.ReadByte();

            return(obj);
        }
Exemple #3
0
        public static FZObjectData Deserialize(FZReader reader)
        {
            var obj = new FZObjectData();

            obj.address           = (int)reader.BaseStream.Position;
            obj.unknown1          = reader.ReadInt32();
            obj.unknown2          = reader.ReadInt32();
            obj.unknown3          = reader.ReadInt32();
            obj.position          = reader.ReadVector3();
            obj.unknown4          = reader.ReadInt32();
            obj.unknown5          = reader.ReadInt32();
            obj.scale             = reader.ReadVector3();
            obj.unknown6          = reader.ReadInt32();
            obj.unknownOffset1    = reader.ReadInt32();
            obj.unknownOffset2    = reader.ReadInt32();
            obj.unknown7          = reader.ReadInt32();
            obj.orientationOffset = reader.ReadInt32();
            if (obj.orientationOffset != 0)
            {
                obj.orientation = reader.ReadAtOffset(obj.orientationOffset, FZOrientation.Deserialize);
            }

            return(obj);
        }