SFEvent

Objective-C

@interface SFEvent : NSObject

Swift

class SFEvent : NSObject

Event element

  • Initialize

    Declaration

    Objective-C

    - (instancetype)initWithEdge:(int)edge
                         andRing:(int)ring
                        andPoint:(SFPoint *)point
                         andType:(enum SFEventType)type;

    Swift

    init!(edge: Int32, andRing ring: Int32, andPoint point: SFPoint!, andType type: SFEventType)

    Parameters

    edge

    edge number

    ring

    ring number

    point

    point

    type

    event type

    Return Value

    event

  • Get the edge

    Declaration

    Objective-C

    - (int)edge;

    Swift

    func edge() -> Int32

    Return Value

    edge number

  • Get the polygon ring number

    Declaration

    Objective-C

    - (int)ring;

    Swift

    func ring() -> Int32

    Return Value

    polygon ring number

  • Get the polygon point

    Declaration

    Objective-C

    - (SFPoint *)point;

    Swift

    func point() -> SFPoint!

    Return Value

    polygon point

  • Get the event type

    Declaration

    Objective-C

    - (enum SFEventType)type;

    Swift

    func type() -> SFEventType

    Return Value

    event type

  • Sort the events

    Declaration

    Objective-C

    + (NSArray<SFEvent *> *)sort:(NSArray<SFEvent *> *)events;

    Swift

    class func sort(_ events: [SFEvent]!) -> [SFEvent]!

    Return Value

    sorted events