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
29+ (float)distanceBetweenGlobalPoints:(nonnull NCGlobalPoint *)from
30 to:(nonnull NCGlobalPoint *)to;
31
38+ (float)distanceBetweenPoints:(nonnull NCPoint *)from
39 to:(nonnull NCPoint *)to;
40
46+ (float)segmentLength:(nonnull NCSegment *)segment;
47
53+ (float)polygonArea:(nonnull NCPolygon *)polygon;
54
60+ (nonnull NCPoint *)polygonCenter:(nonnull NCPolygon *)polygon;
61
68+ (BOOL)polygonContainsPoint:(nonnull NCPolygon *)polygon
69 point:(nonnull NCPoint *)point;
70
77+ (float)segmentPointDistance:(nonnull NCSegment *)segment
78 point:(nonnull NCPoint *)point;
79
86+ (BOOL)segmentIntersectsSegment:(nonnull NCSegment *)segment1
87 segment2:(nonnull NCSegment *)segment2;
88
95+ (nonnull NCPoint *)segmentIntersectionSegment:(nonnull NCSegment *)segment1
96 segment2:(nonnull NCSegment *)segment2;
97
104+ (float)divisionRatioBySegment:(nonnull NCSegment *)segment1
105 segment2:(nonnull NCSegment *)segment2;
106
113+ (nonnull NCPoint *)getRatioPoint:(nonnull NCSegment *)segment
114 r:(double)r;
115
123+ (double)getProjectionRatio:(nonnull NCSegment *)segment
124 point:(nonnull NCPoint *)point;
125
126@end