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
38+ (float)distanceBetweenGlobalPoints:(nonnull NCGlobalPoint *)from
39 to:(nonnull NCGlobalPoint *)to;
40
56+ (float)distanceBetweenPoints:(nonnull NCPoint *)from
57 to:(nonnull NCPoint *)to;
58
73+ (float)segmentLength:(nonnull NCSegment *)segment;
74
89+ (float)polygonArea:(nonnull NCPolygon *)polygon;
90
105+ (nonnull NCPoint *)polygonCenter:(nonnull NCPolygon *)polygon;
106
122+ (BOOL)polygonContainsPoint:(nonnull NCPolygon *)polygon
123 point:(nonnull NCPoint *)point;
124
140+ (float)segmentPointDistance:(nonnull NCSegment *)segment
141 point:(nonnull NCPoint *)point;
142
158+ (BOOL)segmentIntersectsSegment:(nonnull NCSegment *)segment1
159 segment2:(nonnull NCSegment *)segment2;
160
176+ (nonnull NCPoint *)segmentIntersectionSegment:(nonnull NCSegment *)segment1
177 segment2:(nonnull NCSegment *)segment2;
178
194+ (float)divisionRatioBySegment:(nonnull NCSegment *)segment1
195 segment2:(nonnull NCSegment *)segment2;
196
212+ (nonnull NCPoint *)getRatioPoint:(nonnull NCSegment *)segment
213 r:(double)r;
214
231+ (double)getProjectionRatio:(nonnull NCSegment *)segment
232 point:(nonnull NCPoint *)point;
233
234@end