-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFilter.h
47 lines (37 loc) · 1.03 KB
/
Filter.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
#ifndef __FILTER_H__
#define __FILTER_H__
#include <omega.h>
using namespace omega;
class Dataset;
class Field;
///////////////////////////////////////////////////////////////////////////////
class Filter : public WorkerTask
{
public:
static const int MaxFields = 4;
Filter();
~Filter();
void setField(uint index, Field* f);
void setRange(uint index, float fmin, float fmax);
void setNormalizedRange(uint index, float fmin, float fmax);
void execute(WorkerTask::TaskInfo* ti);
void update();
GpuBuffer* getIndexBuffer(const DrawContext& dc);
uint getFilteredLength() { return myIndexLen; }
double getIndexStamp() { return myIndexStamp; }
private:
template<typename T> void filterKernel(double timestamp);
private:
WorkerPool myUpdater;
GpuRef<GpuBuffer> myGpuBuffer;
Lock myLock;
uint* myIndices;
uint myIndexLen;
Field* myField[MaxFields];
float myMin[MaxFields];
float myMax[MaxFields];
int myNumFields;
double myRangeStamp;
double myIndexStamp;
};
#endif