Class to define non linear data mapping. More...
#include <MeshViz/graph/PbNonLinearDataMapping.h>
Public Types | |
typedef const SbColor * | RGBFunction (void *userData, float) |
typedef const float * | HLSFunction (void *userData, float) |
typedef float | TransparencyFunction (void *userData, float) |
Public Member Functions | |
PbNonLinearDataMapping () | |
void | setRGBFunction (RGBFunction *func, void *userData) |
void | setRGBFunction (const SbColor *(*func)(float)) |
void | setHLSFunction (HLSFunction *func, void *userData) |
void | setHLSFunction (const float *(*func)(float)) |
void | setTransparencyFunction (TransparencyFunction *func, void *userData) |
void | setTransparencyFunction (float(*func)(float)) |
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.
typedef const float* PbNonLinearDataMapping::HLSFunction(void *userData, float) |
typedef const SbColor* PbNonLinearDataMapping::RGBFunction(void *userData, float) |
typedef float PbNonLinearDataMapping::TransparencyFunction(void *userData, float) |
PbNonLinearDataMapping::PbNonLinearDataMapping | ( | ) |
Default constructor.
void PbNonLinearDataMapping::setHLSFunction | ( | const float *(*)(float) | func | ) |
deprecated.
void PbNonLinearDataMapping::setHLSFunction | ( | HLSFunction * | func, | |
void * | userData | |||
) |
Sets a non linear function for data mapping.
This function returns a HLS color.
void PbNonLinearDataMapping::setRGBFunction | ( | const SbColor *(*)(float) | func | ) |
deprecated.
void PbNonLinearDataMapping::setRGBFunction | ( | RGBFunction * | func, | |
void * | userData | |||
) |
Sets a non linear function for data mapping.
This function returns a RGB color.
void PbNonLinearDataMapping::setTransparencyFunction | ( | float(*)(float) | func | ) |
deprecated.
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).