23 #ifndef MAPPERFUNCTIONBASE_H 
   24 #define MAPPERFUNCTIONBASE_H 
   25 #define MAXCONTROLPOINTS 50 
   27 #include <vapor/ExpatParseMgr.h> 
   28 #include <vapor/OpacityMapBase.h> 
   29 #include <vapor/ColorMapBase.h> 
   30 #include <vapor/tfinterpolator.h> 
   49     float opacityValue(
float point);
 
   50     void  hsvValue(
float point, 
float* h, 
float* sat, 
float* val);
 
   59     void makeLut(
float* clut);
 
   78     virtual void setVarNum(
int var)     { colorVarNum = var; opacVarNum = var;}
 
   85     virtual OpacityMapBase* createOpacityMap(
 
   86         OpacityMapBase::Type type=OpacityMapBase::CONTROL_POINT
 
   88     virtual OpacityMapBase* getOpacityMap(
int index) 
const;
 
   89     void        deleteOpacityMap(OpacityMapBase *omap);
 
  113     virtual ColorMapBase*   getColormap() 
const;
 
  118     static void hsvToRgb(
float* hsv, 
float* rgb);
 
  119     static void rgbToHsv(
float* rgb, 
float* hsv);
 
  124     static int mapPosition(
float x, 
float minValue, 
float maxValue, 
int hSize);
 
  136       int indx = mapPosition(point, 
 
  138                              getMaxMapValue(), numEntries-1);
 
  139       if (indx < 0) indx = 0;
 
  140       if (indx > numEntries-1) indx = numEntries-1;
 
  146       return (
float)(getMinMapValue() + 
 
  147                      ((float)indx)*(float)(getMaxMapValue()-
 
  149                      (
float)(numEntries-1));
 
  154       int indx = mapPosition(point, 
 
  156                              getMaxMapValue(), numEntries-1);
 
  157       if (indx < 0) indx = 0;
 
  158       if (indx > numEntries-1) indx = numEntries-1;
 
  164       return (
float)(getMinMapValue() + 
 
  165                      ((float)indx)*(float)(getMaxMapValue()-
 
  167                      (
float)(numEntries-1));
 
  183                                      std::string&, 
const char **);
 
  185     virtual bool elementEndHandler(
ExpatParseMgr*, 
int, std::string&);
 
  192         if (_colormap) 
return _colormap->interpType();
 
  193         return TFInterpolator::linear;
 
  196         if (_colormap) _colormap->interpType(t);
 
  271 #endif //MAPPERFUNCTIONBASE_H 
float mapOpacIndexToFloat(int indx)
 
CompositionType getOpacityComposition()
 
A Params subclass for managing parameters used by Renderers. 
 
virtual void setColorVarNum(int var)
 
int getNumOpacityMaps() const 
 
static const string _rightColorBoundAttr
 
Nodes with state in Xml tree representation. 
 
int mapFloatToColorIndex(float point)
 
virtual void setOpacVarNum(int var)
 
float mapColorIndexToFloat(int indx)
 
vector< OpacityMapBase * > _opacityMaps
 
static const string _rightColorBoundTag
 
static const string _colorControlPointTag
 
static const string _hsvAttr
 
float getOpacityScaleFactor()
 
static const string _leftOpacityBoundAttr
 
TFInterpolator::type colorInterpType()
 
int mapFloatToOpacIndex(float point)
 
static const string _leftOpacityBoundTag
 
void setMinMapValue(float val)
 
void setMaxMapValue(float val)
 
virtual void setVarNum(int var)
 
void setOpacityScaleFactor(float val)
 
static const string _positionAttr
 
static const string _leftColorBoundTag
 
CompositionType _compType
 
static const string _rightOpacityBoundTag
 
static const string _opacityCompositionTag
 
void setColorInterpType(TFInterpolator::type t)
 
static const string _rightOpacityBoundAttr
 
void setNumEntries(int val)
 
static const string _opacityCompositionAttr
 
static const string _opacityAttr
 
static const string _leftColorBoundAttr
 
static const string _rgbAttr
 
static const string _opacityControlPointTag
 
static const string _mapperFunctionTag
 
void setOpacityComposition(CompositionType t)