Node class to define a non linear data mapping. More...
#include <MeshViz/nodes/PoNonLinearDataMapping2.h>
Public Types | |
enum | Type { NON_LINEAR_PER_LEVEL, LINEAR_PER_LEVEL } |
Public Member Functions | |
virtual SoType | getTypeId () const |
PoNonLinearDataMapping2 () | |
virtual const SbColor * | getColor (float value) |
virtual const SbColor * | getColor (float value, float &transparency) |
Static Public Member Functions | |
static SoType | getClassTypeId () |
Public Attributes | |
SoSFEnum | type |
SoMFFloat | value |
SoMFColor | color |
SoMFFloat | transparency |
This node defines the current data mapping for all subsequent MeshViz representations which use it. There is no data mapping until a PoDataMapping node is traversed.
This node 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)
type | LINEAR_PER_LEVEL |
value | 0 |
color | 0 0 0 |
transparency | 0 |
minThresholdEnabled | FALSE |
minThreshold | 0 |
minThresholdColor | 0 0 0 |
minThresholdTransparency | 0.0 |
maxThresholdEnabled | FALSE |
maxThreshold | 1 |
maxThresholdColor | 0 0 0 |
maxThresholdTransparency | 0.0 |
transparencyEnabled | FALSE |
transparencyValueDeletedParts | 0.95 |
PoNonLinearDataMapping2::PoNonLinearDataMapping2 | ( | ) |
Constructor.
static SoType PoNonLinearDataMapping2::getClassTypeId | ( | ) | [static] |
Returns the type identifier for this class.
Reimplemented from PoDataMapping.
virtual const SbColor* PoNonLinearDataMapping2::getColor | ( | float | value, | |
float & | transparency | |||
) | [virtual] |
Returns the color and transparency associated to a value.
Implements PoDataMapping.
virtual const SbColor* PoNonLinearDataMapping2::getColor | ( | float | value | ) | [virtual] |
Returns the color associated to a value.
Implements PoDataMapping.
virtual SoType PoNonLinearDataMapping2::getTypeId | ( | ) | const [virtual] |
Returns the type identifier for this specific instance.
Reimplemented from PoDataMapping.
Defines the list of colors for the data mapping.
The number of colors must be >= the number of values + 1 if the type is NON_LINEAR_PER_LEVEL and >= the number of values otherwise.
Defines the list of transparencies for the data mapping.
To be taken into account the number of transparencies must be equal to the number of colors, otherwise transparencies are ignored.
Defines the type of data mapping.
Defines the list of values for the data mapping.