Loading...
Searching...
No Matches
NCGeometryUtils.h
Go to the documentation of this file.
1#import "NCExport.h"
2#import "NCGlobalPoint.h"
3#import "NCPoint.h"
4#import "NCPolygon.h"
5#import "NCSegment.h"
6#import <Foundation/Foundation.h>
7
8
20DEFAULT_EXPORT_ATTRIBUTE
21@interface NCGeometryUtils : NSObject
22
39+ (float)distanceBetweenGlobalPoints:(nonnull NCGlobalPoint *)from
40 to:(nonnull NCGlobalPoint *)to;
41
58+ (float)distanceBetweenPoints:(nonnull NCPoint *)from
59 to:(nonnull NCPoint *)to;
60
76+ (float)segmentLength:(nonnull NCSegment *)segment;
77
93+ (float)polygonArea:(nonnull NCPolygon *)polygon;
94
110+ (nonnull NCPoint *)polygonCenter:(nonnull NCPolygon *)polygon;
111
128+ (BOOL)polygonContainsPoint:(nonnull NCPolygon *)polygon
129 point:(nonnull NCPoint *)point;
130
147+ (float)segmentPointDistance:(nonnull NCSegment *)segment
148 point:(nonnull NCPoint *)point;
149
166+ (BOOL)segmentIntersectsSegment:(nonnull NCSegment *)segment1
167 segment2:(nonnull NCSegment *)segment2;
168
185+ (nonnull NCPoint *)segmentIntersectionSegment:(nonnull NCSegment *)segment1
186 segment2:(nonnull NCSegment *)segment2;
187
204+ (float)divisionRatioBySegment:(nonnull NCSegment *)segment1
205 segment2:(nonnull NCSegment *)segment2;
206
223+ (nonnull NCPoint *)getRatioPoint:(nonnull NCSegment *)segment
224 r:(double)r;
225
243+ (double)getProjectionRatio:(nonnull NCSegment *)segment
244 point:(nonnull NCPoint *)point;
245
246@end