App::ColorField Class Reference

#include <ColorModel.h>

Public Member Functions

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

Protected Member Functions

void interpolate (Color clCol1, std::size_t usPos1, Color clCol2, std::size_t usPos2)
 
void rebuild ()
 

Protected Attributes

std::vector< ColorcolorField
 
ColorModel colorModel
 
std::size_t ctColors
 
float fAscent
 
float fConstant
 
float fMax
 
float fMin
 

Constructor & Destructor Documentation

◆ ColorField() [1/3]

ColorField::ColorField ( )

References set().

◆ ColorField() [2/3]

ColorField::ColorField ( const ColorField rclCF)

◆ ColorField() [3/3]

ColorField::ColorField ( const ColorModel rclModel,
float  fMin,
float  fMax,
std::size_t  usCt 
)

References fMax, fMin, and set().

◆ ~ColorField()

virtual App::ColorField::~ColorField ( )
virtualdefault

Member Function Documentation

◆ getColor() [1/2]

◆ getColor() [2/2]

◆ getColorIndex()

std::size_t App::ColorField::getColorIndex ( float  fVal) const

◆ getColorModel()

const ColorModel & App::ColorField::getColorModel ( ) const

◆ getCountColors()

std::size_t App::ColorField::getCountColors ( ) const

◆ getMaxValue()

float App::ColorField::getMaxValue ( ) const

◆ getMinColors()

std::size_t App::ColorField::getMinColors ( ) const

◆ getMinValue()

float App::ColorField::getMinValue ( ) const

◆ getRange()

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

◆ interpolate()

void ColorField::interpolate ( Color  clCol1,
std::size_t  usPos1,
Color  clCol2,
std::size_t  usPos2 
)
protected

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

Referenced by rebuild().

◆ operator=()

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

References colorField.

◆ rebuild()

void ColorField::rebuild ( )
protected

◆ set()

void ColorField::set ( const ColorModel rclModel,
float  fMin,
float  fMax,
std::size_t  usCt 
)

◆ setColorModel()

void ColorField::setColorModel ( const ColorModel rclModel)

References colorModel, and rebuild().

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

◆ setCountColors()

void App::ColorField::setCountColors ( std::size_t  usCt)

◆ setDirect()

void App::ColorField::setDirect ( std::size_t  usInd,
Color  clCol 
)

◆ setRange()

void App::ColorField::setRange ( float  fMin,
float  fMax 
)

Member Data Documentation

◆ colorField

std::vector<Color> App::ColorField::colorField
protected

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

◆ colorModel

ColorModel App::ColorField::colorModel
protected

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

◆ ctColors

std::size_t App::ColorField::ctColors
protected

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

◆ fAscent

float App::ColorField::fAscent
protected

Referenced by getColorIndex(), and rebuild().

◆ fConstant

float App::ColorField::fConstant
protected

Referenced by getColorIndex(), and rebuild().

◆ fMax

float App::ColorField::fMax
protected

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

◆ fMin

float App::ColorField::fMin
protected

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


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