App::ColorField Class Reference

#include <ColorModel.h>

List of all members.

Public Member Functions

 ColorField (const ColorModel &rclModel, float fMin, float fMax, unsigned short usCt)
 ColorField (const ColorField &rclCF)
 ColorField (void)
Color getColor (float fVal) const
Color getColor (unsigned short usIndex) const
unsigned short getColorIndex (float fVal) const
const ColorModelgetColorModel (void) const
unsigned short getCountColors (void) const
float getMaxValue (void) const
unsigned short getMinColors (void) const
float getMinValue (void) const
void getRange (float &rfMin, float &rfMax)
ColorFieldoperator= (const ColorField &rclCF)
void set (const ColorModel &rclModel, float fMin, float fMax, unsigned short usCt)
void setColorModel (const ColorModel &rclModel)
void setCountColors (unsigned short usCt)
void setDirect (unsigned short usInd, Color clCol)
void setRange (float fMin, float fMax)
virtual ~ColorField ()

Protected Member Functions

void interpolate (Color clCol1, unsigned short usPos1, Color clCol2, unsigned short usPos2)
void rebuild (void)

Protected Attributes

std::vector< Color_aclField
ColorModel _clModel
float _fAscent
float _fConstant
float _fMax
float _fMin
unsigned short _usCtColors

Detailed Description

Definition at line 193 of file ColorModel.h.


Constructor & Destructor Documentation

ColorField::ColorField ( void   ) 

Definition at line 71 of file ColorModel.cpp.

ColorField::ColorField ( const ColorField rclCF  ) 

Definition at line 87 of file ColorModel.cpp.

ColorField::ColorField ( const ColorModel rclModel,
float  fMin,
float  fMax,
unsigned short  usCt 
)

Definition at line 77 of file ColorModel.cpp.

ColorField::~ColorField (  )  [virtual]

Definition at line 83 of file ColorModel.cpp.


Member Function Documentation

Color App::ColorField::getColor ( float  fVal  )  const [inline]
Color App::ColorField::getColor ( unsigned short  usIndex  )  const [inline]

Definition at line 215 of file ColorModel.h.

Referenced by App::ColorGradient::getColor().

unsigned short App::ColorField::getColorIndex ( float  fVal  )  const [inline]

Definition at line 265 of file ColorModel.h.

References _fAscent, _fConstant, _usCtColors, and Py::int.

Referenced by getColor(), and App::ColorGradient::getColorIndex().

const ColorModel& App::ColorField::getColorModel ( void   )  const [inline]

Definition at line 210 of file ColorModel.h.

unsigned short App::ColorField::getCountColors ( void   )  const [inline]

Definition at line 203 of file ColorModel.h.

Referenced by App::ColorGradient::getColorIndex().

float App::ColorField::getMaxValue ( void   )  const [inline]

Definition at line 213 of file ColorModel.h.

unsigned short App::ColorField::getMinColors ( void   )  const [inline]

Definition at line 208 of file ColorModel.h.

Referenced by App::ColorGradient::getMinColors().

float App::ColorField::getMinValue ( void   )  const [inline]

Definition at line 212 of file ColorModel.h.

void App::ColorField::getRange ( float &  rfMin,
float &  rfMax 
) [inline]

Definition at line 207 of file ColorModel.h.

void ColorField::interpolate ( Color  clCol1,
unsigned short  usPos1,
Color  clCol2,
unsigned short  usPos2 
) [protected]

Definition at line 138 of file ColorModel.cpp.

References _aclField, App::Color::b, App::Color::g, and App::Color::r.

Referenced by rebuild().

ColorField & ColorField::operator= ( const ColorField rclCF  ) 

Definition at line 93 of file ColorModel.cpp.

References _aclField.

void ColorField::rebuild ( void   )  [protected]
void ColorField::set ( const ColorModel rclModel,
float  fMin,
float  fMax,
unsigned short  usCt 
)
void ColorField::setColorModel ( const ColorModel rclModel  ) 

Definition at line 108 of file ColorModel.cpp.

References _clModel, and rebuild().

Referenced by App::ColorGradient::setColorModel().

void App::ColorField::setCountColors ( unsigned short  usCt  )  [inline]

Definition at line 205 of file ColorModel.h.

void App::ColorField::setDirect ( unsigned short  usInd,
Color  clCol 
) [inline]

Definition at line 211 of file ColorModel.h.

void App::ColorField::setRange ( float  fMin,
float  fMax 
) [inline]

Definition at line 206 of file ColorModel.h.


Member Data Documentation

std::vector<Color> App::ColorField::_aclField [protected]

Definition at line 224 of file ColorModel.h.

Referenced by getColor(), interpolate(), operator=(), and rebuild().

Definition at line 220 of file ColorModel.h.

Referenced by getColor(), rebuild(), set(), and setColorModel().

float App::ColorField::_fAscent [protected]

Definition at line 222 of file ColorModel.h.

Referenced by getColorIndex(), and rebuild().

float App::ColorField::_fConstant [protected]

Definition at line 222 of file ColorModel.h.

Referenced by getColorIndex(), and rebuild().

float App::ColorField::_fMax [protected]

Definition at line 221 of file ColorModel.h.

Referenced by getColor(), rebuild(), and set().

float App::ColorField::_fMin [protected]

Definition at line 221 of file ColorModel.h.

Referenced by getColor(), rebuild(), and set().

unsigned short App::ColorField::_usCtColors [protected]

Definition at line 223 of file ColorModel.h.

Referenced by getColorIndex(), rebuild(), and set().


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

Generated on Wed Nov 23 19:01:42 2011 for FreeCAD by  doxygen 1.6.1