forked from natikgadzhi/XNMaths
-
Notifications
You must be signed in to change notification settings - Fork 1
/
XNLineData.h
49 lines (35 loc) · 1.36 KB
/
XNLineData.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
//
// XNLineData.h
// XNMaths
//
// Created by Нат Гаджибалаев on 23.11.09.
// Copyright 2009 Нат Гаджибалаев. All rights reserved.
//
#pragma mark -
#pragma mark Imports && classes requirements
#import <Cocoa/Cocoa.h>
@class XNFloatRange;
@class XNFunction;
#pragma mark -
#pragma mark XNLIneData class public interface
@interface XNLineData : NSObject {
// Store line datapoints to render it really fast.
CGFloat *xData, *yData;
// Value ranges
XNFloatRange *xRange, *yRange;
// quality is an recalculation points count per one real number.
NSUInteger quality, pointsCount;
}
#pragma mark -
#pragma mark XNLineData object public properties declaration
@property(readonly) CGFloat *xData;
@property(readonly) CGFloat *yData;
@property(readonly) XNFloatRange *xRange, *yRange;
@property(readonly) NSUInteger quality, pointsCount;
#pragma mark -
#pragma mark Class init methods
+ (XNLineData *) lineDataWithFunction: (XNFunction*)aFunction inRange: (XNFloatRange*)range withQuality: (NSUInteger) lineQuality;
+ (XNLineData *) lineDataWithXData: (CGFloat*)x yData:(CGFloat*)y pointsCount: (NSUInteger) count;
- (XNLineData *) initWithXData: (CGFloat*)x yData:(CGFloat*)y pointsCount: (NSUInteger) count;
- (XNLineData *) initWithFunction: (XNFunction *)aFunction inRange: (XNFloatRange*)newRange withQuality: (NSUInteger) lineQuality;
@end