PbDataMapping Class Reference
[Misc]

MeshViz Abstract class for data mapping. More...

#include <MeshViz/graph/PbDataMapping.h>

Inheritance diagram for PbDataMapping:
PbBase PbLinearDataMapping PbNonLinearDataMapping PbNonLinearDataMapping2

List of all members.

Public Types

typedef float PbHLSColor [3]

Public Member Functions

 PbDataMapping ()
 ~PbDataMapping ()
 PbDataMapping (const PbDataMapping &dataMapping)
PbDataMappingoperator= (const PbDataMapping &dataMapping)
const SbColorgetRGBColor (float value) const
const float * getHLSColor (float value) const
const SbColorgetRGBColor (float value, float &transparency) const
const float * getHLSColor (float value, float &transparency) const
void setMinThreshold (float threshold_min)
void setMinThreshold (float threshold_min, const SbColor &cmin, float transp_min=0.0)
void setMinThreshold (float threshold_min, PbHLSColor cmin, float transp_min=0.0)
void setMaxThreshold (float threshold_max)
void setMaxThreshold (float threshold_max, const SbColor &cmax, float transp_max=0.0)
void setMaxThreshold (float threshold_max, PbHLSColor cmax, float transp_max=0.0)
const SbColorgetMinRGBThreshold (float &threshold_min) const
const float * getMinHLSThreshold (float &threshold_min) const
const SbColorgetMinRGBThreshold (float &threshold_min, float &transp_min) const
const float * getMinHLSThreshold (float &threshold_min, float &transp_min) const
const SbColorgetMaxRGBThreshold (float &threshold_max) const
const float * getMaxHLSThreshold (float &threshold_max) const
const SbColorgetMaxRGBThreshold (float &threshold_max, float &transp_max) const
const float * getMaxHLSThreshold (float &threshold_max, float &transp_max) const
void enableThresholds (SbBool min, SbBool max)
void thresholdsEnabled (SbBool &min, SbBool &max) const
void enableTransparency (SbBool flag)
SbBool isTransparencyEnabled () const
void setTransparencyValueDeletedParts (float value)
float getTransparencyValueDeletedParts () const

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().


Member Typedef Documentation

typedef float PbDataMapping::PbHLSColor[3]

Constructor & Destructor Documentation

PbDataMapping::PbDataMapping (  ) 

Default constructor.

PbDataMapping::~PbDataMapping (  ) 

Destructor.

PbDataMapping::PbDataMapping ( const PbDataMapping dataMapping  ) 

Copy constructor.


Member Function Documentation

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

Enable/Disable the taking into account of threshold values.

void PbDataMapping::enableTransparency ( SbBool  flag  ) 

Enable/Disable the taking into account of transparency.

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

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

float PbDataMapping::getTransparencyValueDeletedParts (  )  const

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

SbBool PbDataMapping::isTransparencyEnabled (  )  const [inline]

Returns TRUE if transparency is enabled, otherwise FALSE.

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

Assignment operator.

Reimplemented from PbBase.

Reimplemented in PbLinearDataMapping, and PbNonLinearDataMapping2.

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.

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.

void PbDataMapping::setMaxThreshold ( float  threshold_max  ) 

Sets a maximum threshold.

No color is associated to this threshold.

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.

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.

void PbDataMapping::setMinThreshold ( float  threshold_min  ) 

Sets a minimum threshold.

No color is associated to this threshold.

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.

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

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

Idem with max.


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

Open Inventor Toolkit reference manual, generated on 12 Feb 2024
Copyright © Thermo Fisher Scientific All rights reserved.
http://www.openinventor.com/