Class to define non linear data mapping. More...
#include <MeshViz/graph/PbNonLinearDataMapping2.h>
Public Types | |
enum | Type { NON_LINEAR_PER_LEVEL , LINEAR_PER_LEVEL } |
Type of data mapping. More... | |
Public Types inherited from PbDataMapping | |
typedef float | PbHLSColor[3] |
Public Member Functions | |
PbNonLinearDataMapping2 () | |
Default constructor. | |
PbNonLinearDataMapping2 (const PbNonLinearDataMapping2 &nonLinearDataMap2) | |
Copy constructor. | |
~PbNonLinearDataMapping2 () | |
Destructor. | |
PbNonLinearDataMapping2 & | operator= (const PbNonLinearDataMapping2 &nonLinearDataMap2) |
Assignment operator. | |
void | setValues (Type type, int numValues, const float *v, const SbColor *c) |
Sets non linear function for data mapping, with RGB color. | |
void | setValues (Type type, int numValues, const float *v, const SbColor *c, const float *t) |
Sets non linear function for data mapping, with RGB color and transparencies. | |
void | setValues (Type type, int numValues, const float *v, const PbHLSColor *c) |
Sets non linear function for data mapping, with HLS color. | |
void | setValues (Type type, int numValues, const float *v, const PbHLSColor *c, const float *t) |
Sets non linear function for data mapping, with HLS color and transparencies. | |
const float * | getValuesList (int &numValues) const |
Gets the list of values defining the current non linear data mapping. | |
const SbColor * | getRGBColorsList (int &numColors) const |
Gets the list of RGB colors defining the current non linear data mapping. | |
const PbHLSColor * | getHLSColorsList (int &numColors) |
Gets the list of HLS colors defining the current non linear data mapping. | |
const float * | getTransparencyList (int &num_transparency) const |
Gets the list of transparencies defining the current non linear data mapping. | |
Type | getType () const |
Returns the data mapping type. | |
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. | |
Class to define non linear data mapping.
This object defines a non 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).
There are two ways to express F(c,v)(V):
There are as well, two ways to express F(t,v)(V)
Definition at line 62 of file PbNonLinearDataMapping2.h.
Type of data mapping.
Enumerator | |
---|---|
NON_LINEAR_PER_LEVEL | |
LINEAR_PER_LEVEL |
Definition at line 69 of file PbNonLinearDataMapping2.h.
PbNonLinearDataMapping2::PbNonLinearDataMapping2 | ( | ) |
Default constructor.
PbNonLinearDataMapping2::PbNonLinearDataMapping2 | ( | const PbNonLinearDataMapping2 & | nonLinearDataMap2 | ) |
Copy constructor.
PbNonLinearDataMapping2::~PbNonLinearDataMapping2 | ( | ) |
Destructor.
const PbHLSColor * PbNonLinearDataMapping2::getHLSColorsList | ( | int & | numColors | ) |
Gets the list of HLS colors defining the current non linear data mapping.
|
inline |
Gets the list of RGB colors defining the current non linear data mapping.
Definition at line 140 of file PbNonLinearDataMapping2.h.
|
inline |
Gets the list of transparencies defining the current non linear data mapping.
Definition at line 153 of file PbNonLinearDataMapping2.h.
|
inline |
Returns the data mapping type.
Definition at line 158 of file PbNonLinearDataMapping2.h.
|
inline |
Gets the list of values defining the current non linear data mapping.
Definition at line 133 of file PbNonLinearDataMapping2.h.
PbNonLinearDataMapping2 & PbNonLinearDataMapping2::operator= | ( | const PbNonLinearDataMapping2 & | nonLinearDataMap2 | ) |
Assignment operator.
void PbNonLinearDataMapping2::setValues | ( | Type | type, |
int | numValues, | ||
const float * | v, | ||
const PbHLSColor * | c | ||
) |
Sets non linear function for data mapping, with HLS color.
If type = NON_LINEAR_PER_LEVEL, the number of colors must be equal to numValues + 1, otherwise it must be equal to numValues.
void PbNonLinearDataMapping2::setValues | ( | Type | type, |
int | numValues, | ||
const float * | v, | ||
const PbHLSColor * | c, | ||
const float * | t | ||
) |
Sets non linear function for data mapping, with HLS color and transparencies.
If type = NON_LINEAR_PER_LEVEL, the number of colors and transparencies must be equal to numValues + 1, otherwise it must be equal to numValues.
void PbNonLinearDataMapping2::setValues | ( | Type | type, |
int | numValues, | ||
const float * | v, | ||
const SbColor * | c | ||
) |
Sets non linear function for data mapping, with RGB color.
If type = NON_LINEAR_PER_LEVEL, the number of colors must be equal to numValues + 1, otherwise it must be equal to numValues.
void PbNonLinearDataMapping2::setValues | ( | Type | type, |
int | numValues, | ||
const float * | v, | ||
const SbColor * | c, | ||
const float * | t | ||
) |
Sets non linear function for data mapping, with RGB color and transparencies.
If type = NON_LINEAR_PER_LEVEL, the number of colors and transparencies must be equal to numValues + 1, otherwise it must be equal to numValues.