RU_LevelsFunc Class Reference

#include <RU_PixelFunctions.h>

Inheritance diagram for RU_LevelsFunc:

RU_GammaFunc RU_PixelFunction

List of all members.

Public Member Functions

 RU_LevelsFunc (float effect, float global_in_range_min, float global_in_range_max, float global_out_range_min, float global_out_range_max, float global_gamma, float comp_in_range_min[4], float comp_in_range_max[4], float comp_out_range_min[4], float comp_out_range_max[4], float comp_gamma[4])
 RU_LevelsFunc (float effect, float global_in_range_min, float global_in_range_max, float global_out_range_min, float global_out_range_max, float global_gamma, float comp_in_range_min, float comp_in_range_max, float comp_out_range_min, float comp_out_range_max, float comp_gamma)

Protected Member Functions

float safeLevels (float val, int)
virtual RUPixelFunc getPixelFunction () const
virtual void getPixelShader (UT_String &frag_shader)

Static Protected Member Functions

static float fastLevels (RU_PixelFunction *pf, float val, int)
 for the usual case, MAdd, gamma, MAdd, gamma
static float safeLevels (RU_PixelFunction *pf, float val, int)
 handles degenerate input level ranges
static void colourMap (float const effect, const float from_min, const float from_max, const float to_min, const float to_max, float &factor, float &addend)

Protected Attributes

float myGlobalGamma
float myGlobalFactor
float myGlobalAddend
float myFactor [4]
float myAddend [4]
float myGlobalInRangeMin
float myGlobalInRangeMax
float myGlobalOutRangeMin
float myGlobalOutRangeMax
float myCompInRangeMin [4]
float myCompInRangeMax [4]
float myCompOutRangeMin [4]
float myCompOutRangeMax [4]
RUPixelFunc myLevelsFunc


Detailed Description

Definition at line 624 of file RU_PixelFunctions.h.


Constructor & Destructor Documentation

RU_LevelsFunc::RU_LevelsFunc ( float  effect,
float  global_in_range_min,
float  global_in_range_max,
float  global_out_range_min,
float  global_out_range_max,
float  global_gamma,
float  comp_in_range_min[4],
float  comp_in_range_max[4],
float  comp_out_range_min[4],
float  comp_out_range_max[4],
float  comp_gamma[4] 
)

passing all data down, rather than precomputing MAdds, so that we can correctly handle the degenerate cases of 0-width input ranges.

Parameters:
effect frame scope effect, applied by the ctor to the ranges but not the gammas (caller should apply it to the gammas)

RU_LevelsFunc::RU_LevelsFunc ( float  effect,
float  global_in_range_min,
float  global_in_range_max,
float  global_out_range_min,
float  global_out_range_max,
float  global_gamma,
float  comp_in_range_min,
float  comp_in_range_max,
float  comp_out_range_min,
float  comp_out_range_max,
float  comp_gamma 
)


Member Function Documentation

static void RU_LevelsFunc::colourMap ( float const   effect,
const float  from_min,
const float  from_max,
const float  to_min,
const float  to_max,
float &  factor,
float &  addend 
) [static, protected]

static float RU_LevelsFunc::fastLevels ( RU_PixelFunction pf,
float  val,
int   
) [static, protected]

for the usual case, MAdd, gamma, MAdd, gamma

virtual RUPixelFunc RU_LevelsFunc::getPixelFunction (  )  const [inline, protected, virtual]

Reimplemented from RU_GammaFunc.

Definition at line 662 of file RU_PixelFunctions.h.

virtual void RU_LevelsFunc::getPixelShader ( UT_String frag_shader  )  [protected, virtual]

Reimplemented from RU_GammaFunc.

float RU_LevelsFunc::safeLevels ( float  val,
int   
) [protected]

static float RU_LevelsFunc::safeLevels ( RU_PixelFunction pf,
float  val,
int   
) [static, protected]

handles degenerate input level ranges


Member Data Documentation

float RU_LevelsFunc::myAddend[4] [protected]

Definition at line 671 of file RU_PixelFunctions.h.

float RU_LevelsFunc::myCompInRangeMax[4] [protected]

Definition at line 679 of file RU_PixelFunctions.h.

float RU_LevelsFunc::myCompInRangeMin[4] [protected]

Definition at line 678 of file RU_PixelFunctions.h.

float RU_LevelsFunc::myCompOutRangeMax[4] [protected]

Definition at line 681 of file RU_PixelFunctions.h.

float RU_LevelsFunc::myCompOutRangeMin[4] [protected]

Definition at line 680 of file RU_PixelFunctions.h.

float RU_LevelsFunc::myFactor[4] [protected]

Definition at line 670 of file RU_PixelFunctions.h.

float RU_LevelsFunc::myGlobalAddend [protected]

Definition at line 669 of file RU_PixelFunctions.h.

float RU_LevelsFunc::myGlobalFactor [protected]

Definition at line 668 of file RU_PixelFunctions.h.

float RU_LevelsFunc::myGlobalGamma [protected]

Definition at line 665 of file RU_PixelFunctions.h.

Definition at line 675 of file RU_PixelFunctions.h.

Definition at line 674 of file RU_PixelFunctions.h.

Definition at line 677 of file RU_PixelFunctions.h.

Definition at line 676 of file RU_PixelFunctions.h.

Definition at line 683 of file RU_PixelFunctions.h.


The documentation for this class was generated from the following file:

Generated on Mon Jan 28 00:29:52 2013 for HDK by  doxygen 1.5.9