Last change
on this file since 1522 was
1478,
checked in by gah, 15 years ago
|
Fix volume management routines to handle deletion
|
File size:
1.2 KB
|
Line | |
---|
1 | #ifndef __VOLUME_INTERPOLATOR_H__ |
---|
2 | #define __VOLUME_INTERPOLATOR_H__ |
---|
3 | |
---|
4 | #include "Volume.h" |
---|
5 | |
---|
6 | #include <vector> |
---|
7 | |
---|
8 | class VolumeInterpolator { |
---|
9 | Volume* _volume; |
---|
10 | |
---|
11 | std::vector<Volume*> _volumes; |
---|
12 | |
---|
13 | double _interval; |
---|
14 | bool _started; |
---|
15 | unsigned int _numBytes; |
---|
16 | unsigned int _dataCount; |
---|
17 | unsigned int _n_components; |
---|
18 | unsigned int _referenceOfVolume; |
---|
19 | double _start_time; |
---|
20 | |
---|
21 | public : |
---|
22 | VolumeInterpolator(); |
---|
23 | void addVolume(Volume* vol); |
---|
24 | void clearAll(); |
---|
25 | |
---|
26 | void start(); |
---|
27 | Volume* update(float fraction); |
---|
28 | void stop(); |
---|
29 | void computeKeys(float fraction, int count, float* interp, int* key1, int* key2); |
---|
30 | bool is_started() const; |
---|
31 | double getInterval() const; |
---|
32 | double getStartTime() const; |
---|
33 | unsigned int getReferenceVolumeID() const; |
---|
34 | Volume* getVolume(); |
---|
35 | }; |
---|
36 | |
---|
37 | inline bool VolumeInterpolator::is_started() const |
---|
38 | { |
---|
39 | return _started; |
---|
40 | } |
---|
41 | |
---|
42 | inline double VolumeInterpolator::getStartTime() const |
---|
43 | { |
---|
44 | return _start_time; |
---|
45 | } |
---|
46 | |
---|
47 | inline double VolumeInterpolator::getInterval() const |
---|
48 | { |
---|
49 | return _interval; |
---|
50 | } |
---|
51 | |
---|
52 | inline unsigned int VolumeInterpolator::getReferenceVolumeID() const |
---|
53 | { |
---|
54 | return _referenceOfVolume; |
---|
55 | } |
---|
56 | |
---|
57 | //inline Volume* VolumeInterpolator::getVolume() |
---|
58 | //{ |
---|
59 | // return _volume; |
---|
60 | // //return _volumes[0]; |
---|
61 | //} |
---|
62 | #endif |
---|
63 | |
---|
Note: See
TracBrowser
for help on using the repository browser.