24#ifndef _PB_DATA_MAPPING_
25#define _PB_DATA_MAPPING_
216 { min = m_minEnabled ; max = m_maxEnabled ;}
228 {
return m_transparencyEnabled ; }
250 NON_LINEAR_DATA_MAPPING1,
251 NON_LINEAR_DATA_MAPPING2
254 virtual ClassType getClassType()
const
255 {
return DATA_MAPPING ; }
257 uint32_t getId()
const {
return m_uniqueId; }
266 static void colorInterpolation(
const SbColor &c1,
float v1,
269 static void colorInterpolation(
const SbColor &c1,
float t1,
float v1,
270 const SbColor &c2,
float t2,
float v2,
271 float vi,
SbColor *ci,
float &ti) ;
272 static void transparencyInterpolation(
float t1,
float v1,
274 float vi,
float ti) ;
276 float m_transparencyValueDeletedParts;
278 virtual const SbColor* computeColor(
float value)
const=0;
279 virtual const SbColor* computeColor(
float value,
float &transparency)
const=0;
280 SbBool m_transparencyEnabled;
286 static uint32_t sm_nextUniqueId;
291 float m_thresholdMin, m_thresholdMax, m_transparencyMin, m_transparencyMax;
292 SbColor m_colorMin, m_colorMax ;
293 SbBool m_minEnabled, m_maxEnabled, m_isMinColor, m_isMaxColor;
<a href="IconLegend.html"><img src="extMV.gif" alt="MeshViz" border="0"></a> Abstract class for all b...
<a href="IconLegend.html"><img src="extMV.gif" alt="MeshViz" border="0"></a> Abstract class for data ...
const SbColor * getMaxRGBThreshold(float &threshold_max) const
Gets the maximum threshold and its associated RGB color.
PbDataMapping()
Default constructor.
PbDataMapping(const PbDataMapping &dataMapping)
Copy constructor.
const float * getHLSColor(float value, float &transparency) const
Gets the HLS color and the transparency associated to a value.
const float * getMaxHLSThreshold(float &threshold_max, float &transp_max) const
Gets the maximum threshold, its associated HLS color and transparency.
const float * getMaxHLSThreshold(float &threshold_max) const
Gets the maximum threshold and its associated HLS color.
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.
const SbColor * getRGBColor(float value) const
Gets RGB color associated to a value.
SbBool isTransparencyEnabled() const
Returns TRUE if transparency is enabled, otherwise FALSE.
PbDataMapping & operator=(const PbDataMapping &dataMapping)
Assignment operator.
const float * getMinHLSThreshold(float &threshold_min) const
Gets the minimum threshold and its associated HLS color.
void setTransparencyValueDeletedParts(float value)
Sets a value that defines the following property : each primitive part of which transparency >= value...
void enableTransparency(SbBool flag)
Enable/Disable the taking into account of transparency.
~PbDataMapping()
Destructor.
float getTransparencyValueDeletedParts() const
Gets a value that defines the following property : each primitive part of which transparency >= value...
const SbColor * getMinRGBThreshold(float &threshold_min, float &transp_min) const
Gets the minimum threshold, its associated RGB color and transparency.
const SbColor * getMinRGBThreshold(float &threshold_min) const
Gets the minimum threshold and its associated RGB color.
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.
const SbColor * getMaxRGBThreshold(float &threshold_max, float &transp_max) const
Gets the maximum threshold, its associated RGB color and transparency.
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 * getRGBColor(float value, float &transparency) const
Gets the RGB color and the transparency associated with a value.
const float * getHLSColor(float value) const
Gets HLS color associated with a value.
void thresholdsEnabled(SbBool &min, SbBool &max) const
Returns min=TRUE if the minimum threshold is enabled, otherwise FALSE.
void setMaxThreshold(float threshold_max)
Sets a maximum threshold.
void setMinThreshold(float threshold_min)
Sets a minimum threshold.
const float * getMinHLSThreshold(float &threshold_min, float &transp_min) const
Gets the minimum threshold, its associated HLS color and transparency.
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 enableThresholds(SbBool min, SbBool max)
Enable/Disable the taking into account of threshold values.