Class to define linear data mapping.
More...
#include <MeshViz/graph/PbLinearDataMapping.h>
Inheritance diagram for PbLinearDataMapping:Public Member Functions | |
| PbLinearDataMapping () | |
| Default constructor. | |
| PbLinearDataMapping (const PbLinearDataMapping &linearDataMap) | |
| Copy constructor. | |
| PbLinearDataMapping & | operator= (const PbLinearDataMapping &linearDataMap) |
| Assignment operator. | |
| void | setValues (float v1, const SbColor &c1, float v2, const SbColor &c2) |
| Sets values v1,v2 and the associated RGB colors c1, c2. | |
| void | setValues (float v1, const SbColor &c1, float t1, float v2, const SbColor &c2, float t2) |
| Sets values v1,v2, the associated transparecny t1,t2, and the associated RGB colors c1, c2. | |
| void | setValues (float v1, const PbHLSColor c1, float v2, const PbHLSColor c2) |
| Sets values v1,v2 and the associated HLS colors c1, c2. | |
| void | setValues (float v1, const PbHLSColor c1, float t1, float v2, const PbHLSColor c2, float t2) |
| Sets values v1,v2, the associated transparecny t1,t2, and the associated HLS colors c1, c2. | |
| void | getValues (float &v1, SbColor &c1, float &v2, SbColor &c2) const |
| Gets the current values v1,v2 and the associated RGB colors c1, c2. | |
| void | getValues (float &v1, SbColor &c1, float &t1, float &v2, SbColor &c2, float &t2) const |
| Gets the current values v1,v2, the associated transparecny t1,t2, and the associated RGB colors c1, c2. | |
| void | getValues (float &v1, PbHLSColor c1, float &v2, PbHLSColor c2) const |
| Gets the current values v1,v2 and the associated HLS colors c1, c2. | |
| void | getValues (float &v1, PbHLSColor c1, float &t1, float &v2, PbHLSColor c2, float &t2) const |
| Gets the current values v1,v2, the associated transparecny t1,t2, and the associated HLS colors c1, c2. | |
Public Member Functions inherited from PbDataMapping | |
| PbDataMapping () | |
| Default constructor. | |
| ~PbDataMapping () | |
| Destructor. | |
| PbDataMapping (const PbDataMapping &dataMapping) | |
| Copy constructor. | |
| PbDataMapping & | operator= (const PbDataMapping &dataMapping) |
| Assignment operator. | |
| const SbColor * | getRGBColor (float value) const |
| Gets RGB color associated to a value. | |
| const float * | getHLSColor (float value) const |
| Gets HLS color associated with a value. | |
| const SbColor * | getRGBColor (float value, float &transparency) const |
| Gets the RGB color and the transparency associated with a value. | |
| const float * | getHLSColor (float value, float &transparency) const |
| Gets the HLS color and the transparency associated to a value. | |
| void | setMinThreshold (float threshold_min) |
| Sets a minimum threshold. | |
| void | setMinThreshold (float threshold_min, const SbColor &cmin, float transp_min=0.0) |
| Sets a minimum threshold, associated to a RGB color and a transparency value. | |
| void | setMinThreshold (float threshold_min, PbHLSColor cmin, float transp_min=0.0) |
| Sets a minimum threshold, associated to a HLS color and a transparency value. | |
| void | setMaxThreshold (float threshold_max) |
| Sets a maximum threshold. | |
| void | setMaxThreshold (float threshold_max, const SbColor &cmax, float transp_max=0.0) |
| Sets a maximum threshold, associated to a RGB color and a transparency value. | |
| void | setMaxThreshold (float threshold_max, PbHLSColor cmax, float transp_max=0.0) |
| Sets a maximum threshold, associated to a HLS color and a transparency value. | |
| const SbColor * | getMinRGBThreshold (float &threshold_min) const |
| Gets the minimum threshold and its associated RGB color. | |
| const float * | getMinHLSThreshold (float &threshold_min) const |
| Gets the minimum threshold and its associated HLS color. | |
| const SbColor * | getMinRGBThreshold (float &threshold_min, float &transp_min) const |
| Gets the minimum threshold, its associated RGB color and transparency. | |
| const float * | getMinHLSThreshold (float &threshold_min, float &transp_min) const |
| Gets the minimum threshold, its associated HLS color and transparency. | |
| const SbColor * | getMaxRGBThreshold (float &threshold_max) const |
| Gets the maximum threshold and its associated RGB color. | |
| const float * | getMaxHLSThreshold (float &threshold_max) const |
| Gets the maximum threshold and its associated HLS color. | |
| const SbColor * | getMaxRGBThreshold (float &threshold_max, float &transp_max) const |
| Gets the maximum threshold, its associated RGB color and transparency. | |
| const float * | getMaxHLSThreshold (float &threshold_max, float &transp_max) const |
| Gets the maximum threshold, its associated HLS color and transparency. | |
| void | enableThresholds (SbBool min, SbBool max) |
| Enable/Disable the taking into account of threshold values. | |
| void | thresholdsEnabled (SbBool &min, SbBool &max) const |
| Returns min=TRUE if the minimum threshold is enabled, otherwise FALSE. | |
| void | enableTransparency (SbBool flag) |
| Enable/Disable the taking into account of transparency. | |
| SbBool | isTransparencyEnabled () const |
| Returns TRUE if transparency is enabled, otherwise FALSE. | |
| void | setTransparencyValueDeletedParts (float value) |
| Sets a value that defines the following property : each primitive part of which transparency >= value, is deleted. | |
| float | getTransparencyValueDeletedParts () const |
| Gets a value that defines the following property : each primitive part of which transparency >= value, is deleted. | |
Public Member Functions inherited from PbBase | |
| void | enableConnection (SbBool flag) |
| Activates/deactivates the mechanism of connection. | |
| SbBool | isConnectionEnabled () const |
| Returns TRUE if the connection mechanism is active, otherwise FALSE. | |
| void | touch () |
| Simulates the changing of an instance of this object, so all connected objects are informed of this change. | |
| PbBase & | operator= (const PbBase &base) |
| Assignment operator. | |
Additional Inherited Members | |
Public Types inherited from PbDataMapping | |
| typedef float | PbHLSColor[3] |
Class to define linear data mapping.
This class is used to define linear data mapping. This object defines a linear association between colors, transparencies and floating-point values. In other words, this association is defined by 2 functions F(c,v) and F(c,t):
F(c,v)(V) = C (with c being a color and v being a value).
F(t,v)(V) = T (with t being a transparency and v being a value).
F(c,v) and F(t,v) are linear, so only two values (v1 and v2), two associated transparencies(t1,t2) and two associated colors (c1 and c2) define these functions. For a given value vi, its color ci is determined by linear interpolation between (v1,c1) and (v2,c2). Idem for the transparencies. By default v1=0, v2=0, c1=(0,0,0) (black), c2=(1,1,1) (white), t1=t2=0.0 (opaque).
Definition at line 50 of file PbLinearDataMapping.h.
| PbLinearDataMapping::PbLinearDataMapping | ( | ) |
Default constructor.
| PbLinearDataMapping::PbLinearDataMapping | ( | const PbLinearDataMapping & | linearDataMap | ) |
Copy constructor.
| void PbLinearDataMapping::getValues | ( | float & | v1, |
| PbHLSColor | c1, | ||
| float & | t1, | ||
| float & | v2, | ||
| PbHLSColor | c2, | ||
| float & | t2 | ||
| ) | const |
Gets the current values v1,v2, the associated transparecny t1,t2, and the associated HLS colors c1, c2.
| void PbLinearDataMapping::getValues | ( | float & | v1, |
| PbHLSColor | c1, | ||
| float & | v2, | ||
| PbHLSColor | c2 | ||
| ) | const |
Gets the current values v1,v2 and the associated HLS colors c1, c2.
| void PbLinearDataMapping::getValues | ( | float & | v1, |
| SbColor & | c1, | ||
| float & | t1, | ||
| float & | v2, | ||
| SbColor & | c2, | ||
| float & | t2 | ||
| ) | const |
Gets the current values v1,v2, the associated transparecny t1,t2, and the associated RGB colors c1, c2.
Gets the current values v1,v2 and the associated RGB colors c1, c2.
| PbLinearDataMapping & PbLinearDataMapping::operator= | ( | const PbLinearDataMapping & | linearDataMap | ) |
Assignment operator.
| void PbLinearDataMapping::setValues | ( | float | v1, |
| const PbHLSColor | c1, | ||
| float | t1, | ||
| float | v2, | ||
| const PbHLSColor | c2, | ||
| float | t2 | ||
| ) |
Sets values v1,v2, the associated transparecny t1,t2, and the associated HLS colors c1, c2.
| void PbLinearDataMapping::setValues | ( | float | v1, |
| const PbHLSColor | c1, | ||
| float | v2, | ||
| const PbHLSColor | c2 | ||
| ) |
Sets values v1,v2 and the associated HLS colors c1, c2.
| void PbLinearDataMapping::setValues | ( | float | v1, |
| const SbColor & | c1, | ||
| float | t1, | ||
| float | v2, | ||
| const SbColor & | c2, | ||
| float | t2 | ||
| ) |
Sets values v1,v2, the associated transparecny t1,t2, and the associated RGB colors c1, c2.
Sets values v1,v2 and the associated RGB colors c1, c2.