source: trunk/packages/vizservers/nanovis/VolumeInterpolator.h @ 3464

Last change on this file since 3464 was 2953, checked in by ldelgass, 8 years ago

Remove unused global origin, make default transfer function a bit more
sensible (used to have full opacity at 0). Fix HeightMap? dtor to use delete[]
instead of free() on array allocated with new[]. Document data response in
protocol.

  • Property svn:eol-style set to native
File size: 1.0 KB
Line 
1/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- */
2#ifndef VOLUME_INTERPOLATOR_H
3#define VOLUME_INTERPOLATOR_H
4
5#include <vector>
6
7#include "Volume.h"
8
9class VolumeInterpolator
10{
11public :
12    VolumeInterpolator();
13
14    void addVolume(Volume *vol);
15
16    void clearAll();
17   
18    void start();
19
20    Volume *update(float fraction);
21
22    void stop();
23
24    void computeKeys(float fraction, int count, float *interp, int *key1, int *key2);
25
26    bool isStarted() const;
27
28    double getInterval() const;
29
30    double getStartTime() const;
31
32    Volume *getVolume();
33
34private:
35    Volume *_volume;
36
37    std::vector<Volume*> _volumes;
38
39    double _interval;
40    bool _started;
41    unsigned int _numBytes;
42    unsigned int _dataCount;
43    unsigned int _numComponents;
44    double _startTime;
45};
46
47inline bool VolumeInterpolator::isStarted() const
48{
49    return _started;
50}
51
52inline double VolumeInterpolator::getStartTime() const
53{
54    return _startTime;
55}
56
57inline double VolumeInterpolator::getInterval() const
58{
59    return _interval;
60}
61
62#endif
63
Note: See TracBrowser for help on using the repository browser.