BDPolygonal

Objective-C

@interface BDPolygonal : BDGeometry

Swift

class BDPolygonal : BDGeometry

Base-class for BDGeometry “geometries” defined by an ordered series of BDPoint “points”.

BDPolygonal is an abstract type and cannot be instantiated directly.

Instead, instantiate one of its concrete sub-classes.

See

details in BDPolygon

See

details in BDLineString
  • @returns The number of vertices (BDPoint “point"s) that define this polygonal geometry.

    Declaration

    Objective-C

    - (NSUInteger)vertexCount;

    Swift

    func vertexCount() -> UInt
  • Convenience method to add a new vertex to this BDPolygons vertices array.

    Declaration

    Objective-C

    - (void)addVertex:(BDPoint *)vertex;

    Swift

    func addVertex(_ vertex: BDPoint!)
  • An ordered series of BDPoint “point” vertices which, when joined by straight-line segments, describe this polygonal geometry.

    Declaration

    Objective-C

    @property (nonatomic) NSMutableArray *vertices;

    Swift

    var vertices: NSMutableArray! { get set }
  • @returns YES if this geometry is closed and has an area. NO if the geometry is open-ended and has no area.

    Declaration

    Objective-C

    - (BOOL)isClosed;

    Swift

    func isClosed() -> Bool