Open Inventor Release 2024.2.1
 
Loading...
Searching...
No Matches
PbDataMapping Class Referenceabstract

MeshViz Abstract class for data mapping. More...

#include <MeshViz/graph/PbDataMapping.h>

+ Inheritance diagram for PbDataMapping:

Public Types

typedef float PbHLSColor[3]
 

Public Member Functions

 PbDataMapping ()
 Default constructor.
 
 ~PbDataMapping ()
 Destructor.
 
 PbDataMapping (const PbDataMapping &dataMapping)
 Copy constructor.
 
PbDataMappingoperator= (const PbDataMapping &dataMapping)
 Assignment operator.
 
const SbColorgetRGBColor (float value) const
 Gets RGB color associated to a value.
 
const float * getHLSColor (float value) const
 Gets HLS color associated with a value.
 
const SbColorgetRGBColor (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 SbColorgetMinRGBThreshold (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 SbColorgetMinRGBThreshold (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 SbColorgetMaxRGBThreshold (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 SbColorgetMaxRGBThreshold (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.
 
PbBaseoperator= (const PbBase &base)
 Assignment operator.
 

Detailed Description

MeshViz Abstract class for data mapping.

Data mapping defines an association between colors, transparencies and floating-point values. Giving transparencies is not compulsory. When they are not given, they are supposed to be equal to 0 , i.e. each color is opaque.

Whichever data mapping, two threshold values can be defined, threshold_min and threshold_max. One color (cmin) and one transparency (transp_min) are associated to threshold_min . As well, cmax and transp_max are associated to threshold_max. For a given value vi <= threshold_min, the associated color ci is cmin and the associated transparency ti is transp_min. As well, for a given value vi >= threshold_max, the associated color ci is cmax and the associated transparency ti is transp_max.

By default min and max thresholds are disabled, threshold_min = 0 and threshold_max = 1 and no color is associated to threshold_min and threshold_max. Each part of primitive of which transparency is greater or equal 0.95 is deleted. This default value can be changed by the method setTransparencyValueDeletedParts().

Definition at line 57 of file PbDataMapping.h.

Member Typedef Documentation

◆ PbHLSColor

typedef float PbDataMapping::PbHLSColor[3]

Definition at line 61 of file PbDataMapping.h.

Constructor & Destructor Documentation

◆ PbDataMapping() [1/2]

PbDataMapping::PbDataMapping ( )

Default constructor.

◆ ~PbDataMapping()

PbDataMapping::~PbDataMapping ( )

Destructor.

◆ PbDataMapping() [2/2]

PbDataMapping::PbDataMapping ( const PbDataMapping dataMapping)

Copy constructor.

Member Function Documentation

◆ enableThresholds()

void PbDataMapping::enableThresholds ( SbBool  min,
SbBool  max 
)

Enable/Disable the taking into account of threshold values.

◆ enableTransparency()

void PbDataMapping::enableTransparency ( SbBool  flag)

Enable/Disable the taking into account of transparency.

If it is disable, the different shape are always opaque.

◆ getHLSColor() [1/2]

const float * PbDataMapping::getHLSColor ( float  value) const

Gets HLS color associated with a value.

If the returned value is NULL, this means that there is no color associated with this value.

◆ getHLSColor() [2/2]

const float * PbDataMapping::getHLSColor ( float  value,
float &  transparency 
) const

Gets the HLS color and the transparency associated to a value.

If the returned value is NULL, this means that there is no color associated to this value.

◆ getMaxHLSThreshold() [1/2]

const float * PbDataMapping::getMaxHLSThreshold ( float &  threshold_max) const

Gets the maximum threshold and its associated HLS color.

NULL is returned if no color is associated to this threshold.

◆ getMaxHLSThreshold() [2/2]

const float * PbDataMapping::getMaxHLSThreshold ( float &  threshold_max,
float &  transp_max 
) const

Gets the maximum threshold, its associated HLS color and transparency.

NULL is returned if no color is associated to this threshold.

◆ getMaxRGBThreshold() [1/2]

const SbColor * PbDataMapping::getMaxRGBThreshold ( float &  threshold_max) const

Gets the maximum threshold and its associated RGB color.

NULL is returned if no color is associated to this threshold.

◆ getMaxRGBThreshold() [2/2]

const SbColor * PbDataMapping::getMaxRGBThreshold ( float &  threshold_max,
float &  transp_max 
) const

Gets the maximum threshold, its associated RGB color and transparency.

NULL is returned if no color is associated to this threshold.

◆ getMinHLSThreshold() [1/2]

const float * PbDataMapping::getMinHLSThreshold ( float &  threshold_min) const

Gets the minimum threshold and its associated HLS color.

NULL is returned if no color is associated to this threshold.

◆ getMinHLSThreshold() [2/2]

const float * PbDataMapping::getMinHLSThreshold ( float &  threshold_min,
float &  transp_min 
) const

Gets the minimum threshold, its associated HLS color and transparency.

NULL is returned if no color is associated to this threshold.

◆ getMinRGBThreshold() [1/2]

const SbColor * PbDataMapping::getMinRGBThreshold ( float &  threshold_min) const

Gets the minimum threshold and its associated RGB color.

NULL is returned if no color is associated to this threshold.

◆ getMinRGBThreshold() [2/2]

const SbColor * PbDataMapping::getMinRGBThreshold ( float &  threshold_min,
float &  transp_min 
) const

Gets the minimum threshold, its associated RGB color and transparency.

NULL is returned if no color is associated to this threshold.

◆ getRGBColor() [1/2]

const SbColor * PbDataMapping::getRGBColor ( float  value) const

Gets RGB color associated to a value.

If the returned value is NULL, this means that there is no color associated to this value.

◆ getRGBColor() [2/2]

const SbColor * PbDataMapping::getRGBColor ( float  value,
float &  transparency 
) const

Gets the RGB color and the transparency associated with a value.

If the returned value is NULL, this means that there is no color associated to this value.

◆ getTransparencyValueDeletedParts()

float PbDataMapping::getTransparencyValueDeletedParts ( ) const

Gets a value that defines the following property : each primitive part of which transparency >= value, is deleted.

◆ isTransparencyEnabled()

SbBool PbDataMapping::isTransparencyEnabled ( ) const
inline

Returns TRUE if transparency is enabled, otherwise FALSE.

Definition at line 227 of file PbDataMapping.h.

◆ operator=()

PbDataMapping & PbDataMapping::operator= ( const PbDataMapping dataMapping)

Assignment operator.

◆ setMaxThreshold() [1/3]

void PbDataMapping::setMaxThreshold ( float  threshold_max)

Sets a maximum threshold.

No color is associated to this threshold.

◆ setMaxThreshold() [2/3]

void PbDataMapping::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.

◆ setMaxThreshold() [3/3]

void PbDataMapping::setMaxThreshold ( float  threshold_max,
PbHLSColor  cmax,
float  transp_max = 0.0 
)

Sets a maximum threshold, associated to a HLS color and a transparency value.

◆ setMinThreshold() [1/3]

void PbDataMapping::setMinThreshold ( float  threshold_min)

Sets a minimum threshold.

No color is associated to this threshold.

◆ setMinThreshold() [2/3]

void PbDataMapping::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.

◆ setMinThreshold() [3/3]

void PbDataMapping::setMinThreshold ( float  threshold_min,
PbHLSColor  cmin,
float  transp_min = 0.0 
)

Sets a minimum threshold, associated to a HLS color and a transparency value.

◆ setTransparencyValueDeletedParts()

void PbDataMapping::setTransparencyValueDeletedParts ( float  value)

Sets a value that defines the following property : each primitive part of which transparency >= value, is deleted.

value = 0.95 by default.

◆ thresholdsEnabled()

void PbDataMapping::thresholdsEnabled ( SbBool min,
SbBool max 
) const
inline

Returns min=TRUE if the minimum threshold is enabled, otherwise FALSE.

Idem with max.

Definition at line 215 of file PbDataMapping.h.


The documentation for this class was generated from the following file: