Open Inventor Release 2024.2.0
 
Loading...
Searching...
No Matches
PbNonLinearDataMapping.h
1/*=======================================================================
2 *** THE CONTENT OF THIS WORK IS PROPRIETARY TO FEI S.A.S, (FEI S.A.S.), ***
3 *** AND IS DISTRIBUTED UNDER A LICENSE AGREEMENT. ***
4 *** ***
5 *** REPRODUCTION, DISCLOSURE, OR USE, IN WHOLE OR IN PART, OTHER THAN AS ***
6 *** SPECIFIED IN THE LICENSE ARE NOT TO BE UNDERTAKEN EXCEPT WITH PRIOR ***
7 *** WRITTEN AUTHORIZATION OF FEI S.A.S. ***
8 *** ***
9 *** RESTRICTED RIGHTS LEGEND ***
10 *** USE, DUPLICATION, OR DISCLOSURE BY THE GOVERNMENT OF THE CONTENT OF THIS ***
11 *** WORK OR RELATED DOCUMENTATION IS SUBJECT TO RESTRICTIONS AS SET FORTH IN ***
12 *** SUBPARAGRAPH (C)(1) OF THE COMMERCIAL COMPUTER SOFTWARE RESTRICTED RIGHT ***
13 *** CLAUSE AT FAR 52.227-19 OR SUBPARAGRAPH (C)(1)(II) OF THE RIGHTS IN ***
14 *** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 52.227-7013. ***
15 *** ***
16 *** COPYRIGHT (C) 1996-2014 BY FEI S.A.S, ***
17 *** BORDEAUX, FRANCE ***
18 *** ALL RIGHTS RESERVED ***
19**=======================================================================*/
20/*=======================================================================
21** Author : VSG (MMM YYYY)
22**=======================================================================*/
23
24#ifndef _PB_NON_LINEAR_DATA_MAPPING_
25#define _PB_NON_LINEAR_DATA_MAPPING_
26
27#include <MeshViz/graph/PbDataMapping.h>
28
48
49 public:
50
54 typedef const SbColor* RGBFunction(void* userData, float);
55
59 typedef const float* HLSFunction(void* userData, float);
60
61 typedef float TransparencyFunction(void* userData, float);
62
67
72 void setRGBFunction(RGBFunction* func, void* userData) ;
73
78 void setRGBFunction(const SbColor* (*func)(float)) ;
79
84 void setHLSFunction(HLSFunction* func, void* userData) ;
85
90 void setHLSFunction(const float* (*func)(float)) ;
91
97 void setTransparencyFunction(TransparencyFunction* func, void* userData) ;
98
103 void setTransparencyFunction(float (*func)(float));
104
105 /*---------------------------------------------------------------------------*/
106 private:
107 virtual ClassType getClassType() const
108 { return NON_LINEAR_DATA_MAPPING1 ;}
109
110 private:
111
112 const SbColor* computeColor(float value) const;
113 const SbColor* computeColor(float value, float &transparency) const;
114
115 static const SbColor* defaultColorFunc(float value) ;
116 // Default color function
117
118 static float defaultTransparencyFunction(float value) ;
119 // Default transp. function
120
121 const SbColor* (*m_RGBFunc)(float) ;
122 const float* (*m_HLSFunc)(float) ;
123 float (*m_TransparencyFunc)(float) ;
124
125 const SbColor* (*m_RGBFunc2)(void*, float) ;
126 const float* (*m_HLSFunc2)(void*, float) ;
127 float (*m_TransparencyFunc2)(void*, float) ;
128
129 void * m_RGBUserData;
130 void * m_HLSUserData;
131 void * m_TransparencyUserData;
132} ;
133
134/*----------------------------------------------------------------------------*/
135
136#endif /* _PB_NON_LINEAR_DATA_MAPPING_ */
137
<a href="IconLegend.html"><img src="extMV.gif" alt="MeshViz" border="0"></a> Abstract class for data ...
<a href="IconLegend.html"><img src="extMV.gif" alt="MeshViz" border="0"></a> Class to define non line...
void setHLSFunction(const float *(*func)(float))
deprecated.
void setTransparencyFunction(TransparencyFunction *func, void *userData)
Sets a function returning a transparency value.
const float * HLSFunction(void *userData, float)
void setRGBFunction(const SbColor *(*func)(float))
deprecated.
void setTransparencyFunction(float(*func)(float))
deprecated.
void setHLSFunction(HLSFunction *func, void *userData)
Sets a non linear function for data mapping.
void setRGBFunction(RGBFunction *func, void *userData)
Sets a non linear function for data mapping.
const SbColor * RGBFunction(void *userData, float)
PbNonLinearDataMapping()
Default constructor.
float TransparencyFunction(void *userData, float)
Color vector class.
Definition SbColor.h:82