SFSweepLine
Objective-C
@interface SFSweepLine : NSObject
Swift
class SFSweepLine : NSObject
Sweep Line algorithm
-
Initialize
Declaration
Objective-C
- (instancetype)initWithRings:(NSArray<SFLineString *> *)rings;Swift
init!(rings: [SFLineString]!)Parameters
ringspolygon rings
Return Value
sweep line
-
Add the event to the sweep line
Declaration
Parameters
eventevent
Return Value
added segment
-
Find the existing event segment
Declaration
Parameters
eventevent
Return Value
segment
-
Determine if the two segments intersect
Declaration
Parameters
segment1segment 1
segment2segment 2
Return Value
true if intersection, false if not
-
XY order of two points
Declaration
Parameters
point1point 1
point2point 2
Return Value
NSOrderedDescending if p1 > p2, NSOrderedAscending if p1 < p2, NSOrderedSame if equal
View on GitHub
SFSweepLine Class Reference