glviewvol
diff src/xfermap.h @ 7:71b479ffb9f7
curve manipulation works
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Tue, 30 Dec 2014 17:28:38 +0200 |
parents | f22be47a3572 |
children | 773f89037a35 |
line diff
1.1 --- a/src/xfermap.h Tue Dec 30 06:22:54 2014 +0200 1.2 +++ b/src/xfermap.h Tue Dec 30 17:28:38 2014 +0200 1.3 @@ -12,11 +12,20 @@ 1.4 class TransferWindow : public TransferFunc { 1.5 private: 1.6 float soft_rad; 1.7 - float low[4], high[4]; // rgb 1.8 + float low[3], high[3]; // rgb 1.9 1.10 public: 1.11 + enum { HANDLE_LOW = 0, HANDLE_HIGH = 1}; 1.12 + 1.13 TransferWindow(); 1.14 1.15 + // handle: 0 or HANDLE_LOW is low, 1 or HANDLE_HIGH is high 1.16 + // if channel == -1, change all channels simultaneously 1.17 + void set_handle(int channel, int handle, float val); 1.18 + float get_handle(int channel, int handle) const; 1.19 + 1.20 + int nearest_handle(int channel, float pos) const; 1.21 + 1.22 void set_interval(float a, float b); 1.23 void set_interval(float *rgba_low, float *rgba_high); 1.24 void set_interval_rgba(int channel, float a, float b);