Open Inventor Release 2024.2.1
 
Loading...
Searching...
No Matches
PbNonLinearDataMapping Class Reference

MeshViz Class to define non linear data mapping. More...

#include <MeshViz/graph/PbNonLinearDataMapping.h>

+ Inheritance diagram for PbNonLinearDataMapping:

Public Types

typedef const SbColorRGBFunction(void *userData, float)
 
typedef const float * HLSFunction(void *userData, float)
 
typedef float TransparencyFunction(void *userData, float)
 
- Public Types inherited from PbDataMapping
typedef float PbHLSColor[3]
 

Public Member Functions

 PbNonLinearDataMapping ()
 Default constructor.
 
void setRGBFunction (RGBFunction *func, void *userData)
 Sets a non linear function for data mapping.
 
void setRGBFunction (const SbColor *(*func)(float))
 deprecated.
 
void setHLSFunction (HLSFunction *func, void *userData)
 Sets a non linear function for data mapping.
 
void setHLSFunction (const float *(*func)(float))
 deprecated.
 
void setTransparencyFunction (TransparencyFunction *func, void *userData)
 Sets a function returning a transparency value.
 
void setTransparencyFunction (float(*func)(float))
 deprecated.
 
- Public Member Functions inherited from PbDataMapping
 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 Class to define non linear data mapping.

This class is used 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).

F(c,v) and F(t,v) are given by the user. If they are not given by the user, default one are used. The default F(c,v) computes a linear data mapping between black and white. The default F(c,t) returns always 0.

Definition at line 47 of file PbNonLinearDataMapping.h.

Member Typedef Documentation

◆ HLSFunction

typedef const float * PbNonLinearDataMapping::HLSFunction(void *userData, float)

Definition at line 59 of file PbNonLinearDataMapping.h.

◆ RGBFunction

typedef const SbColor * PbNonLinearDataMapping::RGBFunction(void *userData, float)

Definition at line 54 of file PbNonLinearDataMapping.h.

◆ TransparencyFunction

typedef float PbNonLinearDataMapping::TransparencyFunction(void *userData, float)

Definition at line 61 of file PbNonLinearDataMapping.h.

Constructor & Destructor Documentation

◆ PbNonLinearDataMapping()

PbNonLinearDataMapping::PbNonLinearDataMapping ( )

Default constructor.

Member Function Documentation

◆ setHLSFunction() [1/2]

void PbNonLinearDataMapping::setHLSFunction ( const float *(*)(float)  func)

deprecated.

◆ setHLSFunction() [2/2]

void PbNonLinearDataMapping::setHLSFunction ( HLSFunction func,
void *  userData 
)

Sets a non linear function for data mapping.

This function returns a HLS color.

◆ setRGBFunction() [1/2]

void PbNonLinearDataMapping::setRGBFunction ( const SbColor *(*)(float)  func)

deprecated.

◆ setRGBFunction() [2/2]

void PbNonLinearDataMapping::setRGBFunction ( RGBFunction func,
void *  userData 
)

Sets a non linear function for data mapping.

This function returns a RGB color.

◆ setTransparencyFunction() [1/2]

void PbNonLinearDataMapping::setTransparencyFunction ( float(*)(float)  func)

deprecated.

◆ setTransparencyFunction() [2/2]

void PbNonLinearDataMapping::setTransparencyFunction ( TransparencyFunction func,
void *  userData 
)

Sets a function returning a transparency value.

If no function is set, a default function is used (returning always 0.0).


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