Rev 647 | Rev 671 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 647 | Rev 648 | ||
---|---|---|---|
Line 22... | Line 22... | ||
22 | /// retrieve min and max of variable 'index'
|
22 | /// retrieve min and max of variable 'index'
|
23 | virtual void range(double &rMin, double &rMax, const int index) const=0; |
23 | virtual void range(double &rMin, double &rMax, const int index) const=0; |
24 | 24 | ||
25 | // data access functions
|
25 | // data access functions
|
26 | virtual double value(const float x, const float y, const int index) const = 0; |
26 | virtual double value(const float x, const float y, const int index) const = 0; |
- | 27 | virtual double value(const QPointF &world_coord, const int index) const = 0; |
|
27 | virtual double value(const int ix, const int iy, const int index) const = 0; |
28 | virtual double value(const int ix, const int iy, const int index) const = 0; |
28 | virtual double value(const int grid_index, const int index) const = 0; |
29 | virtual double value(const int grid_index, const int index) const = 0; |
29 | }; |
30 | }; |
30 | 31 | ||
31 | template <class T> |
32 | template <class T> |
Line 41... | Line 42... | ||
41 | 42 | ||
42 | virtual double value(const T& data, const int index) const = 0; |
43 | virtual double value(const T& data, const int index) const = 0; |
43 | double value(const T* ptr, const int index) const { return value(mGrid->constValueAtIndex(mGrid->indexOf(ptr)), index); } |
44 | double value(const T* ptr, const int index) const { return value(mGrid->constValueAtIndex(mGrid->indexOf(ptr)), index); } |
44 | double value(const int grid_index, const int index) const { return value(mGrid->constValueAtIndex(grid_index), index); } |
45 | double value(const int grid_index, const int index) const { return value(mGrid->constValueAtIndex(grid_index), index); } |
45 | double value(const float x, const float y, const int index) const { return value(mGrid->constValueAt(x,y), index); } |
46 | double value(const float x, const float y, const int index) const { return value(mGrid->constValueAt(x,y), index); } |
- | 47 | double value(const QPointF &world_coord, const int index) const { return value(mGrid->constValueAt(world_coord), index); } |
|
46 | double value(const int ix, const int iy, const int index) const { return value(mGrid->constValueAtIndex(ix, iy), index); } |
48 | double value(const int ix, const int iy, const int index) const { return value(mGrid->constValueAtIndex(ix, iy), index); } |
47 | void range(double &rMin, double &rMax, const int index) const { rMin=9999999999.; rMax=-99999999999.; |
49 | void range(double &rMin, double &rMax, const int index) const { rMin=9999999999.; rMax=-99999999999.; |
48 | for (int i=0;i<mGrid->count(); ++i) { |
50 | for (int i=0;i<mGrid->count(); ++i) { |
49 | rMin=qMin(rMin, value(i, index)); |
51 | rMin=qMin(rMin, value(i, index)); |
50 | rMax=qMax(rMax, value(i,index));}} |
52 | rMax=qMax(rMax, value(i,index));}} |