#include <Legend.h>
Public Member Functions | |
Legend () | |
Legend (const Legend &legend) | |
Legend (const std::string &path) | |
~Legend () | |
Legend & | operator= (const Legend &legend) |
bool | operator== (const Legend &rhs) const |
void | Reset () |
double | GetMin () const |
double | GetMax () const |
double | GetStart () const |
double | GetEnd () const |
unsigned int | GetRangesNumber (void) const |
LegendType | GetLegendType (void) const |
bool | GetOutsideBlack (void) const |
bool | IsValid () const |
std::vector< colormap_value > & | GetColors () |
const std::vector < colormap_value > & | GetColors () const |
template<typename T > | |
int | PackValuesIntoArray (T buffer[][4], const int max_size) const |
void | SetMin (double minValue) |
void | SetMax (double maxValue) |
void | SetStart (double startValue) |
void | SetEnd (double endValue) |
void | SetRange (unsigned int numRanges) |
void | SetType (LegendType type) |
void | SetOutsideBlack (bool outsideBlack) |
void | Draw (void) |
void | Update (void) |
void | Create (void) |
void | Set (double minValue=0.0, double maxValue=1.0, double startValue=0.0, double endValue=1.0, unsigned int rangesNumber=_ncont, LegendType legendType=_dftype, bool outsideBlack=false) |
int | GetLiczbaGranic (void) const |
Zwraca liczbe granic w legendzie nowa wersja. | |
double | GetWartoscGranicy (const unsigned int &i) const |
Zwraca wartosc granicy opodanym indeksie 0..n-1. | |
int | IsBorderNr (double value) const |
Zwraca numer granicy dla podnaje wartosci lub -1 jesli nie jest granica. | |
std::vector< ColorRGB > | GetColors (const std::vector< double > &vValues) |
Pobiera wartosci dla kt�rych zwraca kolor�w je�li mieszcz� si� w tym samym przedziale legendy. | |
std::vector< unsigned int > | GetRanges (const double &d) const |
Pobiera element graficzny i wylicza dla niego wartosci kolorow legendy. | |
int | GetRanges (const double &v1, const double &v2) const |
Dla podanych dwu wartosci podaje mozliwy przedzial lub -1 jesli niemoze ich zakwalifikowac do jednego luba zadnego. | |
void | GetRangeValues (unsigned int i, double &v1, double &v2) const |
Dla przedzia�u o podanym numerze pobiera jego graniczne wartosci. | |
size_t | GetRangesSize (void) const |
Zwraca liczbe przedzialow w legendzie. | |
bool | GetColor (const double &value, const unsigned int &range, ColorRGB &c) const |
Dla podanego przedzialu i wartosci zwrocenie skladowe koloru. | |
void | GetRange3 (const unsigned int &range, double &sValue, ColorRGB &sColor, double &eValue, ColorRGB &eColor) |
void | GetRange (const unsigned int &range, double &sValue, ColorRGB &sColor, double &eValue, ColorRGB &eColor) |
Dla podanego przedzia�u zwraca poczatkowa oraz koncowa - wartosc oraz kolor. | |
double | GetInterp (double value) |
A member function. | |
double | GetInterp (double a, double b, double value) const |
double | GetValue (double a, double b, double interp) const |
Na podstawie poczatkoej i koncowej wartosci oraz interpolacji zwraca wartosc wewnetrzna. | |
void | GetBorders (const double &s, const double &e, std::vector< double > &vD) const |
Dla dwoch wartosci zwraca wektor ktory zawiera je jako poczatkowa i koncowa oraz wewnatrz wszytskie granice miedzy tymiwartosciami. | |
bool | GetRangesBorder (const double &value, double &s, double &e) const |
Dla podanej wartosci zwraca gorna oraz dolna wartosc przedzialu - nowa wersja. | |
bool | IsBorder2 (double value) const |
sprawdza czy podana wartosc jest granica - nowa wersja | |
bool | IsBorder3 (double value) const |
Stare metdy juz najprawdopodobniej niewykorzystywane | |
int | GetIndexMax (void) |
A member function. | |
void | GetColor (double value) |
A member function. | |
float | GetColor3b (double value) |
double | GetValue (const ColorRGB &rgb) |
void | GetColor (double value, colormap_value &lv) |
bool | IsBorder (double value) |
A member function. | |
bool | IsInStartEnd (double value) |
A member function. | |
int | GetStartIndex (void) |
Zwraca indeks elementu odpowiadajacego typu start w legendzie. | |
int | GetEndIndex (void) |
Zwraca indeks elementu odpowiadajacego typu end w legendzie. | |
void | GetInterval (double valueStart, double valueEnd) |
Public Attributes | |
colormap_value | color |
Protected Member Functions | |
void | GetRangeColor (const unsigned int &range, double &sValue, ColorRGB &sColor, double &eValue, ColorRGB &eColor) |
void | GetRangeGradient (const unsigned int &range, double &sValue, ColorRGB &sColor, double &eValue, ColorRGB &eColor) |
void | MinMaxPos (int &mi, int &mx) |
Zwraca pozycje min i max wzgledem start end. | |
void | FillStartEndColor (void) |
Na podstawie wewnetrznych ustawien. | |
void | FillStartEndGradient (void) |
void | AddMinMaxColor (void) |
void | AddMinMaxGradient (void) |
FemViewer::Legend::Legend | ( | ) | [explicit] |
FemViewer::Legend::Legend | ( | const Legend & | legend | ) | [explicit] |
FemViewer::Legend::Legend | ( | const std::string & | path | ) | [explicit] |
FemViewer::Legend::~Legend | ( | ) |
Na podstawie wewnetrznych ustawien.
void FemViewer::Legend::GetBorders | ( | const double & | s, | |
const double & | e, | |||
std::vector< double > & | vD | |||
) | const [inline] |
Dla dwoch wartosci zwraca wektor ktory zawiera je jako poczatkowa i koncowa oraz wewnatrz wszytskie granice miedzy tymiwartosciami.
void FemViewer::Legend::GetColor | ( | double | value, | |
colormap_value & | lv | |||
) |
void FemViewer::Legend::GetColor | ( | double | value | ) |
A member function.
zwraca wartosc skladowych kolorw dla podanej wartosci w postaci publicznego skladnika klasy
value | wartosc dla korej podane sa skaldowe kolorow. |
bool FemViewer::Legend::GetColor | ( | const double & | value, | |
const unsigned int & | range, | |||
ColorRGB & | c | |||
) | const |
Dla podanego przedzialu i wartosci zwrocenie skladowe koloru.
float FemViewer::Legend::GetColor3b | ( | double | value | ) | [inline] |
std::vector< ColorRGB > FemViewer::Legend::GetColors | ( | const std::vector< double > & | vValues | ) |
Pobiera wartosci dla kt�rych zwraca kolor�w je�li mieszcz� si� w tym samym przedziale legendy.
const std::vector<colormap_value>& FemViewer::Legend::GetColors | ( | ) | const [inline] |
std::vector<colormap_value>& FemViewer::Legend::GetColors | ( | ) | [inline] |
double FemViewer::Legend::GetEnd | ( | ) | const [inline] |
int FemViewer::Legend::GetEndIndex | ( | void | ) | [inline] |
Zwraca indeks elementu odpowiadajacego typu end w legendzie.
unsigned int FemViewer::Legend::GetIndexMax | ( | void | ) | [inline] |
A member function.
//Zwraca indeks przedzialu <1-n> do ktorego nalezy na podstawie wartosci. //zwraca maksymalna wartosc indeksu Zwraca liczba indeksow (0-n)
double FemViewer::Legend::GetInterp | ( | double | a, | |
double | b, | |||
double | value | |||
) | const |
double FemViewer::Legend::GetInterp | ( | double | value | ) |
A member function.
Dla podanej wartosci rozwiazania zwraca wartosc interpolacji <0-1> z przynaleznego przedzialu tej wartosci
value | sprawdzana wartosc. |
void FemViewer::Legend::GetInterval | ( | double | valueStart, | |
double | valueEnd | |||
) |
LegendType FemViewer::Legend::GetLegendType | ( | void | ) | const [inline] |
int FemViewer::Legend::GetLiczbaGranic | ( | void | ) | const [inline] |
Zwraca liczbe granic w legendzie nowa wersja.
double FemViewer::Legend::GetMax | ( | ) | const [inline] |
double FemViewer::Legend::GetMin | ( | ) | const [inline] |
bool FemViewer::Legend::GetOutsideBlack | ( | void | ) | const [inline] |
void FemViewer::Legend::GetRange | ( | const unsigned int & | range, | |
double & | sValue, | |||
ColorRGB & | sColor, | |||
double & | eValue, | |||
ColorRGB & | eColor | |||
) | [inline] |
Dla podanego przedzia�u zwraca poczatkowa oraz koncowa - wartosc oraz kolor.
Je�li podany przedzialu jest z po za zakrestu to w wartosciach zwracanych nie jest dokonywana zmiana
range | numer sprawdzanego przedzialu | |
sValue | poczatkowa wartosc | |
sColor | poczatkowy kolor | |
eValue | koncowa wartos | |
eColor | koncowy kolor |
void FemViewer::Legend::GetRange3 | ( | const unsigned int & | range, | |
double & | sValue, | |||
ColorRGB & | sColor, | |||
double & | eValue, | |||
ColorRGB & | eColor | |||
) |
void FemViewer::Legend::GetRangeColor | ( | const unsigned int & | range, | |
double & | sValue, | |||
ColorRGB & | sColor, | |||
double & | eValue, | |||
ColorRGB & | eColor | |||
) | [protected] |
void FemViewer::Legend::GetRangeGradient | ( | const unsigned int & | range, | |
double & | sValue, | |||
ColorRGB & | sColor, | |||
double & | eValue, | |||
ColorRGB & | eColor | |||
) | [protected] |
int FemViewer::Legend::GetRanges | ( | const double & | v1, | |
const double & | v2 | |||
) | const |
Dla podanych dwu wartosci podaje mozliwy przedzial lub -1 jesli niemoze ich zakwalifikowac do jednego luba zadnego.
std::vector< unsigned int > FemViewer::Legend::GetRanges | ( | const double & | d | ) | const |
Pobiera element graficzny i wylicza dla niego wartosci kolorow legendy.
Dla granicy powinny to byc dwie warto�ci: lewa i prawa dla wartosci miedzy granicami jest to tylko jeden przedzial
bool FemViewer::Legend::GetRangesBorder | ( | const double & | value, | |
double & | s, | |||
double & | e | |||
) | const |
Dla podanej wartosci zwraca gorna oraz dolna wartosc przedzialu - nowa wersja.
unsigned int FemViewer::Legend::GetRangesNumber | ( | void | ) | const [inline] |
size_t FemViewer::Legend::GetRangesSize | ( | void | ) | const |
Zwraca liczbe przedzialow w legendzie.
void FemViewer::Legend::GetRangeValues | ( | unsigned int | i, | |
double & | v1, | |||
double & | v2 | |||
) | const |
Dla przedzia�u o podanym numerze pobiera jego graniczne wartosci.
double FemViewer::Legend::GetStart | ( | ) | const [inline] |
int FemViewer::Legend::GetStartIndex | ( | void | ) | [inline] |
Zwraca indeks elementu odpowiadajacego typu start w legendzie.
double FemViewer::Legend::GetValue | ( | const ColorRGB & | rgb | ) |
double FemViewer::Legend::GetValue | ( | double | a, | |
double | b, | |||
double | interp | |||
) | const |
Na podstawie poczatkoej i koncowej wartosci oraz interpolacji zwraca wartosc wewnetrzna.
double FemViewer::Legend::GetWartoscGranicy | ( | const unsigned int & | i | ) | const [inline] |
Zwraca wartosc granicy opodanym indeksie 0..n-1.
bool FemViewer::Legend::IsBorder | ( | double | value | ) |
A member function.
Sprawdzenie czy podana wartosc jest granica - stara wersja.
value | sprawdzana wartosc. |
bool FemViewer::Legend::IsBorder2 | ( | double | value | ) | const |
sprawdza czy podana wartosc jest granica - nowa wersja
bool FemViewer::Legend::IsBorder3 | ( | double | value | ) | const |
int FemViewer::Legend::IsBorderNr | ( | double | value | ) | const |
Zwraca numer granicy dla podnaje wartosci lub -1 jesli nie jest granica.
bool FemViewer::Legend::IsInStartEnd | ( | double | value | ) |
A member function.
Sprawdza czy podana wartosc jest >= start i <=end. Zwraca true dla prawdy lub false jesli nie
value | sprawdzana wartosc. |
bool FemViewer::Legend::IsValid | ( | ) | const [inline] |
void FemViewer::Legend::MinMaxPos | ( | int & | mi, | |
int & | mx | |||
) | [protected] |
Zwraca pozycje min i max wzgledem start end.
mi dla min, mx dla max: -1 - mnijeszy od min 0 - miedzy min a max 1 wiekszy od max
bool FemViewer::Legend::operator== | ( | const Legend & | rhs | ) | const |
int FemViewer::Legend::PackValuesIntoArray | ( | T | buffer[][4], | |
const int | max_size | |||
) | const [inline] |
void FemViewer::Legend::Set | ( | double | minValue = 0.0 , |
|
double | maxValue = 1.0 , |
|||
double | startValue = 0.0 , |
|||
double | endValue = 1.0 , |
|||
unsigned int | rangesNumber = _ncont , |
|||
LegendType | legendType = _dftype , |
|||
bool | outsideBlack = false | |||
) |
void FemViewer::Legend::SetEnd | ( | double | endValue | ) | [inline] |
void FemViewer::Legend::SetMax | ( | double | maxValue | ) | [inline] |
void FemViewer::Legend::SetMin | ( | double | minValue | ) | [inline] |
void FemViewer::Legend::SetOutsideBlack | ( | bool | outsideBlack | ) | [inline] |
void FemViewer::Legend::SetRange | ( | unsigned int | numRanges | ) | [inline] |
void FemViewer::Legend::SetStart | ( | double | startValue | ) | [inline] |
void FemViewer::Legend::SetType | ( | LegendType | type | ) | [inline] |