source: nanovis/branches/1.1/VolumeInterpolator.h @ 5722

Last change on this file since 5722 was 4904, checked in by ldelgass, 9 years ago

Merge serveral changes from trunk. Does not include threading, world space
changes, etc.

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