forked from natikgadzhi/XNMaths
-
Notifications
You must be signed in to change notification settings - Fork 1
/
XNTabulatedFunctionOf2D.h
72 lines (52 loc) · 2.2 KB
/
XNTabulatedFunctionOf2D.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
//
// XNTabulatedFunctionOf2D.h
// XNMaths
//
// Created by Нат Гаджибалаев on 02.12.09.
// Copyright 2009 Нат Гаджибалаев. All rights reserved.
//
#pragma mark -
#pragma mark Imports
#import <Cocoa/Cocoa.h>
#import "XN3DPoint.h"
@class XNSurfaceData;
@class XNFloatRange;
#pragma mark -
#pragma mark XNTabulatedFunctionOf2D interface
@interface XNTabulatedFunctionOf2D : NSObject {
XNSurfaceData *surface;
//
// arguments are stored as a grids.
XNFloatRange *firstArgumentRange, *secondArgumentRange;
CGFloat firstArgumentIncrement, secondArgumentIncrement;
}
@property(retain) XNSurfaceData *surface;
#pragma mark -
#pragma mark Class init methods
+ (XNTabulatedFunctionOf2D *) functionWithSurface: (XNSurfaceData*) aSurface;
+ (XNTabulatedFunctionOf2D *) functionWithCapacityI: (NSUInteger) iCount J: (NSUInteger) jCount;
+ (XNTabulatedFunctionOf2D *) functionWithFirstArgumentCapacity: (NSUInteger) iCount
range: (XNFloatRange *) newFirstArgumentRange
secondArgumentCapacity: (NSUInteger) jCount
range: (XNFloatRange *) newSecondArgumentRange;
#pragma mark -
#pragma mark Instance init methods
- (XNTabulatedFunctionOf2D *) initWithSurface: (XNSurfaceData*) aSurface;
- (XNTabulatedFunctionOf2D *) initWithCapacityI: (NSUInteger) iCount J: (NSUInteger) jCount;
- (XNTabulatedFunctionOf2D *) initWithFirstArgumentCapacity: (NSUInteger) iCount
range: (XNFloatRange *) newFirstArgumentRange
secondArgumentCapacity: (NSUInteger) jCount
range: (XNFloatRange *) newSecondArgumentRange;
#pragma mark -
#pragma mark Instance logic
- (CGFloat) valueAtI: (NSUInteger) i J: (NSUInteger) j;
- (XN3DPoint) pointAtI: (NSUInteger) i J: (NSUInteger) j;
- (void) setValue: (CGFloat) value atI: (NSUInteger) i J: (NSUInteger) j dirty: (BOOL) dirty;
- (void) set3DPoint: (XN3DPoint) point atI: (NSUInteger) i J: (NSUInteger) j dirty: (BOOL) dirty;
//
// Argument grids
- (void) setFirstArgumentRange: (XNFloatRange *) range;
- (void) setFirstArgumentFrom: (CGFloat) from to: (CGFloat) to;
- (void) setFirstArgumentRange: (XNFloatRange *) range;
- (void) setFirstArgumentFrom: (CGFloat) from to: (CGFloat) to;
@end