public Area(int APIversion, EventHandler handler, uint version, uint name, byte priority, FootprintPolyFlags areaTypeFlags, IEnumerable <PolygonPoint> closedPolygon, IntersectionFlags intersectionObjectType, IntersectionFlags allowIntersectionTypes, SurfaceTypeFlags surfaceTypeFlags, SurfaceAttribute surfaceAttributeFlags, byte deprecatedLevelOffset, BoundingBox boundingBox3D) : base(APIversion, handler) { this.ParentVersion = version; this.name = name; this.priority = priority; this.areaTypeFlags = areaTypeFlags; this.pointList = closedPolygon == null ? null : new PolygonPointList(handler, closedPolygon); this.intersectionObjectType = intersectionObjectType; this.allowIntersectionTypes = allowIntersectionTypes; this.surfaceTypeFlags = surfaceTypeFlags; this.surfaceAttributeFlags = surfaceAttributeFlags; this.deprecatedLevelOffset = deprecatedLevelOffset; this.boundingBox3D = new BoundingBox(APIversion, handler, boundingBox3D); }
void Parse(Stream s) { BinaryReader r = new BinaryReader(s); this.name = r.ReadUInt32(); this.priority = r.ReadByte(); this.areaTypeFlags = (FootprintPolyFlags)r.ReadUInt32(); this.pointList = new PolygonPointList(handler, s); this.intersectionObjectType = (IntersectionFlags)r.ReadUInt32(); this.allowIntersectionTypes = (IntersectionFlags)r.ReadUInt32(); this.surfaceTypeFlags = (SurfaceTypeFlags)r.ReadUInt32(); this.surfaceAttributeFlags = (SurfaceAttribute)r.ReadUInt32(); this.deprecatedLevelOffset = r.ReadByte(); float min3d_x = r.ReadSingle(); float min3d_z = r.ReadSingle(); float max3d_x = r.ReadSingle(); float max3d_z = r.ReadSingle(); float min3d_y = r.ReadSingle(); float max3d_y = r.ReadSingle(); boundingBox3D = new BoundingBox(1, handler, new Vertex(1, handler, min3d_x, min3d_y, min3d_z), new Vertex(1, handler, max3d_x, max3d_y, max3d_z)); }