SUMO - Simulation of Urban MObility
|
#include <GUIPropertyScheme.h>
Public Member Functions | |
unsigned int | addColor (const T &color, const SUMOReal threshold, const std::string &name="") |
bool | allowsNegativeValues () const |
void | clear () |
const T | getColor (const SUMOReal value) const |
const std::vector< T > & | getColors () const |
const std::string & | getName () const |
const std::vector< std::string > & | getNames () const |
std::string | getTagName (std::vector< RGBColor >) const |
std::string | getTagName (std::vector< SUMOReal >) const |
const std::vector< SUMOReal > & | getThresholds () const |
GUIPropertyScheme (const std::string &name, const T &baseColor, const std::string &colName="", const bool isFixed=false, SUMOReal baseValue=0) | |
Constructor. More... | |
RGBColor | interpolate (const RGBColor &min, const RGBColor &max, SUMOReal weight) const |
specializations for GUIColorScheme More... | |
SUMOReal | interpolate (const SUMOReal &min, const SUMOReal &max, SUMOReal weight) const |
specializations for GUIScaleScheme More... | |
bool | isFixed () const |
bool | isInterpolated () const |
bool | operator== (const GUIPropertyScheme &c) const |
void | removeColor (const size_t pos) |
void | save (OutputDevice &dev) const |
void | setAllowsNegativeValues (bool value) |
void | setColor (const size_t pos, const T &color) |
bool | setColor (const std::string &name, const T &color) |
void | setInterpolated (const bool interpolate, SUMOReal interpolationStart=0.f) |
void | setThreshold (const size_t pos, const SUMOReal threshold) |
Private Attributes | |
bool | myAllowNegativeValues |
std::vector< T > | myColors |
bool | myIsFixed |
bool | myIsInterpolated |
std::string | myName |
std::vector< std::string > | myNames |
std::vector< SUMOReal > | myThresholds |
This class provides a mapping from real values to properties (mainly colors). Each color is stored along with a threshold value. Color values between thresholds are obtained by interpolation
Definition at line 52 of file GUIPropertyScheme.h.
|
inline |
Constructor.
Definition at line 55 of file GUIPropertyScheme.h.
References GUIPropertyScheme< T >::addColor().
|
inline |
Definition at line 83 of file GUIPropertyScheme.h.
References GUIPropertyScheme< T >::myColors, GUIPropertyScheme< T >::myNames, and GUIPropertyScheme< T >::myThresholds.
Referenced by GUIPropertyScheme< T >::GUIPropertyScheme(), GUIVisualizationSettings::GUIVisualizationSettings(), GUISettingsHandler::myStartElement(), GUIDialog_ViewSettings::updateColorRanges(), and GUIDialog_ViewSettings::updateScaleRanges().
|
inline |
Definition at line 164 of file GUIPropertyScheme.h.
References GUIPropertyScheme< T >::myAllowNegativeValues.
Referenced by GUIDialog_ViewSettings::rebuildColorMatrix(), and GUIDialog_ViewSettings::rebuildScaleMatrix().
|
inline |
Definition at line 107 of file GUIPropertyScheme.h.
References GUIPropertyScheme< T >::myColors, GUIPropertyScheme< T >::myNames, and GUIPropertyScheme< T >::myThresholds.
Referenced by GUISettingsHandler::myStartElement().
|
inline |
Definition at line 113 of file GUIPropertyScheme.h.
References GUIPropertyScheme< T >::interpolate(), GUIPropertyScheme< T >::myColors, GUIPropertyScheme< T >::myIsInterpolated, GUIPropertyScheme< T >::myThresholds, and SUMOReal.
Referenced by GUIJunctionWrapper::drawGL(), GUILane::drawGL(), GUIContainer::setColor(), GUIPerson::setColor(), GUILane::setColor(), GUIVehicle::setColor(), and GUILane::setMultiColor().
|
inline |
Definition at line 144 of file GUIPropertyScheme.h.
References GUIPropertyScheme< T >::myColors.
Referenced by GUIDialog_ViewSettings::rebuildColorMatrix(), and GUIDialog_ViewSettings::rebuildScaleMatrix().
|
inline |
Definition at line 140 of file GUIPropertyScheme.h.
References GUIPropertyScheme< T >::myName.
|
inline |
Definition at line 156 of file GUIPropertyScheme.h.
References GUIPropertyScheme< T >::myNames.
Referenced by GUIDialog_ViewSettings::rebuildColorMatrix(), and GUIDialog_ViewSettings::rebuildScaleMatrix().
|
inline |
Definition at line 210 of file GUIPropertyScheme.h.
References SUMO_TAG_COLORSCHEME, and toString().
Referenced by GUIPropertyScheme< T >::save().
|
inline |
Definition at line 220 of file GUIPropertyScheme.h.
References SUMO_TAG_SCALINGSCHEME, and toString().
|
inline |
Definition at line 148 of file GUIPropertyScheme.h.
References GUIPropertyScheme< T >::myThresholds.
Referenced by GUIDialog_ViewSettings::rebuildColorMatrix(), and GUIDialog_ViewSettings::rebuildScaleMatrix().
|
inline |
specializations for GUIColorScheme
Definition at line 206 of file GUIPropertyScheme.h.
References RGBColor::interpolate().
Referenced by GUIPropertyScheme< T >::getColor(), and GUIPropertyScheme< T >::setInterpolated().
|
inline |
specializations for GUIScaleScheme
Definition at line 216 of file GUIPropertyScheme.h.
References min.
|
inline |
Definition at line 160 of file GUIPropertyScheme.h.
References GUIPropertyScheme< T >::myIsFixed.
Referenced by GUISettingsHandler::myStartElement(), GUIDialog_ViewSettings::rebuildColorMatrix(), GUIDialog_ViewSettings::rebuildScaleMatrix(), GUIDialog_ViewSettings::updateColorRanges(), and GUIDialog_ViewSettings::updateScaleRanges().
|
inline |
Definition at line 152 of file GUIPropertyScheme.h.
References GUIPropertyScheme< T >::myIsInterpolated.
Referenced by GUIDialog_ViewSettings::rebuildColorMatrix(), and GUIDialog_ViewSettings::rebuildScaleMatrix().
|
inline |
Definition at line 200 of file GUIPropertyScheme.h.
References GUIPropertyScheme< T >::myColors, GUIPropertyScheme< T >::myIsInterpolated, GUIPropertyScheme< T >::myName, and GUIPropertyScheme< T >::myThresholds.
|
inline |
Definition at line 100 of file GUIPropertyScheme.h.
References GUIPropertyScheme< T >::myColors, GUIPropertyScheme< T >::myNames, and GUIPropertyScheme< T >::myThresholds.
Referenced by GUIDialog_ViewSettings::updateColorRanges(), and GUIDialog_ViewSettings::updateScaleRanges().
|
inline |
Definition at line 172 of file GUIPropertyScheme.h.
References OutputDevice::closeTag(), GUIPropertyScheme< T >::getTagName(), GUIPropertyScheme< T >::myColors, GUIPropertyScheme< T >::myIsFixed, GUIPropertyScheme< T >::myIsInterpolated, GUIPropertyScheme< T >::myName, GUIPropertyScheme< T >::myNames, GUIPropertyScheme< T >::myThresholds, OutputDevice::openTag(), SUMO_ATTR_COLOR, SUMO_ATTR_INTERPOLATED, SUMO_ATTR_NAME, SUMO_ATTR_THRESHOLD, SUMO_TAG_ENTRY, and OutputDevice::writeAttr().
|
inline |
Definition at line 168 of file GUIPropertyScheme.h.
References GUIPropertyScheme< T >::myAllowNegativeValues.
Referenced by GUIVisualizationSettings::GUIVisualizationSettings().
|
inline |
Definition at line 67 of file GUIPropertyScheme.h.
References GUIPropertyScheme< T >::myColors.
Referenced by GUISettingsHandler::myStartElement(), GUIDialog_ViewSettings::updateColorRanges(), and GUIDialog_ViewSettings::updateScaleRanges().
|
inline |
Definition at line 71 of file GUIPropertyScheme.h.
References GUIPropertyScheme< T >::myColors, and GUIPropertyScheme< T >::myNames.
|
inline |
Definition at line 133 of file GUIPropertyScheme.h.
References GUIPropertyScheme< T >::interpolate(), GUIPropertyScheme< T >::myIsInterpolated, and GUIPropertyScheme< T >::myThresholds.
Referenced by GUISettingsHandler::myStartElement(), and GUIDialog_ViewSettings::onCmdColorChange().
|
inline |
Definition at line 63 of file GUIPropertyScheme.h.
References GUIPropertyScheme< T >::myThresholds.
Referenced by GUIDialog_ViewSettings::updateColorRanges(), and GUIDialog_ViewSettings::updateScaleRanges().
|
private |
Definition at line 232 of file GUIPropertyScheme.h.
Referenced by GUIPropertyScheme< T >::allowsNegativeValues(), and GUIPropertyScheme< T >::setAllowsNegativeValues().
|
private |
Definition at line 227 of file GUIPropertyScheme.h.
Referenced by GUIPropertyScheme< T >::addColor(), GUIPropertyScheme< T >::clear(), GUIPropertyScheme< T >::getColor(), GUIPropertyScheme< T >::getColors(), GUIPropertyScheme< T >::operator==(), GUIPropertyScheme< T >::removeColor(), GUIPropertyScheme< T >::save(), and GUIPropertyScheme< T >::setColor().
|
private |
Definition at line 231 of file GUIPropertyScheme.h.
Referenced by GUIPropertyScheme< T >::isFixed(), and GUIPropertyScheme< T >::save().
|
private |
Definition at line 229 of file GUIPropertyScheme.h.
Referenced by GUIPropertyScheme< T >::getColor(), GUIPropertyScheme< T >::isInterpolated(), GUIPropertyScheme< T >::operator==(), GUIPropertyScheme< T >::save(), and GUIPropertyScheme< T >::setInterpolated().
|
private |
Definition at line 226 of file GUIPropertyScheme.h.
Referenced by GUIPropertyScheme< T >::getName(), GUIPropertyScheme< T >::operator==(), and GUIPropertyScheme< T >::save().
|
private |
Definition at line 230 of file GUIPropertyScheme.h.
Referenced by GUIPropertyScheme< T >::addColor(), GUIPropertyScheme< T >::clear(), GUIPropertyScheme< T >::getNames(), GUIPropertyScheme< T >::removeColor(), GUIPropertyScheme< T >::save(), and GUIPropertyScheme< T >::setColor().
|
private |
Definition at line 228 of file GUIPropertyScheme.h.
Referenced by GUIPropertyScheme< T >::addColor(), GUIPropertyScheme< T >::clear(), GUIPropertyScheme< T >::getColor(), GUIPropertyScheme< T >::getThresholds(), GUIPropertyScheme< T >::operator==(), GUIPropertyScheme< T >::removeColor(), GUIPropertyScheme< T >::save(), GUIPropertyScheme< T >::setInterpolated(), and GUIPropertyScheme< T >::setThreshold().