HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RU_ColorFunctions.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * NAME: RU_ColorFunctions.h
7  *
8  * COMMENTS:
9  * Various pixel functions for manipulating colors.
10  */
11 #ifndef RU_ColorFunctions_h
12 #define RU_ColorFunctions_h
13 
14 #include "RU_API.h"
15 #include "RU_PixelFunction.h"
16 
18 
20 {
21 public:
22  RU_ColorReplace( float hmin, float hmax, float hspill,
23  float smin, float smax, float sspill,
24  float lmin, float lmax, float lspill,
25  RU_InterpFunction interp,
26  float hshift, float sscale, float lscale)
27  {
28  myHueMin = hmin; myHueMax = hmax; myHueSpill = hspill;
29  mySatMin = smin; mySatMax = smax; mySatSpill = sspill;
30  myLumMin = lmin; myLumMax = lmax; myLumSpill = lspill;
31 
32  myInterp = interp;
33 
34  myHueShift = hshift; mySatScale = sscale; myLumScale = lscale;
35  }
36 
37  inline float hueKey(float hue) const;
38  inline float satKey(float sat) const;
39  inline float lumKey(float lum) const;
40 protected:
41  static void replacecolor(RU_PixelFunction *f, float **vals,
42  const bool *scope);
43 
44  bool needAllComponents() const override { return true; }
46  { return replacecolor; }
47 
48 private:
49  // Source region parameters
50  float myHueMin;
51  float myHueMax;
52  float myHueSpill;
53  float mySatMin;
54  float mySatMax;
55  float mySatSpill;
56  float myLumMin;
57  float myLumMax;
58  float myLumSpill;
59  RU_InterpFunction myInterp;
60 
61  // Color transform parameters
62  float myHueShift;
63  float mySatScale;
64  float myLumScale;
65 };
66 
67 #endif
float(* RU_InterpFunction)(float)
#define RU_API
Definition: RU_API.h:10
RU_ColorReplace(float hmin, float hmax, float hspill, float smin, float smax, float sspill, float lmin, float lmax, float lspill, RU_InterpFunction interp, float hshift, float sscale, float lscale)
RUVectorFunc getVectorFunction() const override
GLfloat f
Definition: glcorearb.h:1926
IMATH_NAMESPACE::V2f float
bool needAllComponents() const override
void(* RUVectorFunc)(RU_PixelFunction *, float **, const bool *)