Node class to define a linear data mapping. More...
#include <MeshViz/nodes/PoLinearDataMapping.h>
Public Member Functions | |
virtual SoType | getTypeId () const |
PoLinearDataMapping () | |
virtual const SbColor * | getColor (float value) |
virtual const SbColor * | getColor (float value, float &transparency) |
Static Public Member Functions | |
static SoType | getClassTypeId () |
Public Attributes | |
SoSFFloat | value1 |
SoSFColor | color1 |
SoSFFloat | transparency1 |
SoSFFloat | value2 |
SoSFColor | color2 |
SoSFFloat | transparency2 |
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 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 linear, so only two values (value1 and value2), two associated transparencies (transparency1,transparency2) and two associated colors (color1 and color2) define these functions. For a given value vi, its color ci is determined by linear interpolation between (value1,color1) and (value2,color2). Idem for the transparencies.
value1 | 0 |
color1 | 0 0 0 |
transparency1 | 0 |
value2 | 1 |
color2 | 1 1 1 |
transparency2 | 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 |
PoLinearDataMapping::PoLinearDataMapping | ( | ) |
Constructor.
static SoType PoLinearDataMapping::getClassTypeId | ( | ) | [static] |
Returns the type identifier for this class.
Reimplemented from PoDataMapping.
virtual const SbColor* PoLinearDataMapping::getColor | ( | float | value, | |
float & | transparency | |||
) | [virtual] |
Returns the color and transparency associated to a value.
Implements PoDataMapping.
virtual const SbColor* PoLinearDataMapping::getColor | ( | float | value | ) | [virtual] |
Returns the color associated to a value.
Implements PoDataMapping.
virtual SoType PoLinearDataMapping::getTypeId | ( | ) | const [virtual] |
Returns the type identifier for this specific instance.
Reimplemented from PoDataMapping.
Defines the first color of the linear data mapping.
Defines the second color of the linear data mapping.
Defines the first transparency of the linear data mapping.
Defines the second transparency of the linear data mapping.
Defines the first value of the linear data mapping.
Defines the second value of the linear data mapping.