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

Last change on this file since 3464 was 2953, checked in by ldelgass, 12 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
RevLine 
[2798]1/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- */
[2853]2#ifndef VOLUME_INTERPOLATOR_H
3#define VOLUME_INTERPOLATOR_H
[884]4
[2853]5#include <vector>
6
[884]7#include "Volume.h"
8
[2853]9class VolumeInterpolator
10{
11public :
12    VolumeInterpolator();
[884]13
[2853]14    void addVolume(Volume *vol);
[884]15
[2853]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
[2877]26    bool isStarted() const;
[2853]27
28    double getInterval() const;
29
30    double getStartTime() const;
31
32    Volume *getVolume();
33
34private:
35    Volume *_volume;
36
[927]37    std::vector<Volume*> _volumes;
[884]38
[900]39    double _interval;
[927]40    bool _started;
[884]41    unsigned int _numBytes;
42    unsigned int _dataCount;
[2877]43    unsigned int _numComponents;
44    double _startTime;
[884]45};
46
[2877]47inline bool VolumeInterpolator::isStarted() const
[884]48{
49    return _started;
50}
51
52inline double VolumeInterpolator::getStartTime() const
53{
[2877]54    return _startTime;
[884]55}
56
[900]57inline double VolumeInterpolator::getInterval() const
[884]58{
59    return _interval;
60}
61
62#endif
63
Note: See TracBrowser for help on using the repository browser.