Open Inventor Release 2024.2.0
 
Loading...
Searching...
No Matches
PoDataMapping.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 _PO_DATA_MAPPING_
25#define _PO_DATA_MAPPING_
26
27#include <Inventor/fields/SoSFBool.h>
28#include <Inventor/fields/SoSFFloat.h>
29#include <Inventor/fields/SoSFColor.h>
30
31#include <MeshViz/nodes/PoNode.h>
32
33class PbDataMapping ;
34class SoFieldSensor ;
35
79class PoDataMapping : public PoNode {
80 SO_NODE_ABSTRACT_HEADER(PoDataMapping) ;
81
82
83 public:
84
85 /* Fields */
86
92
98
104
110
116
122
128
134
143
149
150 /* Methods */
151
156 virtual const SbColor* getColor(float value)=0 ;
157
163 virtual const SbColor* getColor(float value, float &transparency)=0 ;
164
165 /*----------------------------------------------------------------------------*/
166 private:
167 static void initClass() ;
168 static void exitClass() ;
169 const PbDataMapping *getDataMapping() { updateDataMapping(); return m_dataMapping;};
170
171 private:
172 PbDataMapping *m_dataMapping ;
173
174 PoDataMapping() ;
175 // Constructor.
176
177 virtual ~PoDataMapping() ;
178 virtual void updateDataMapping() ;
179
180 private:
181 static void minThresholdChangedCB(void *data, SoSensor *) ;
182 static void maxThresholdChangedCB(void *data, SoSensor *) ;
183 static void transparencyChangedCB(void *data, SoSensor *) ;
184
185 SbBool m_minThresholdChanged ;
186 SoFieldSensor *m_minThresholdEnabledSensor ;
187 SoFieldSensor *m_minThresholdSensor ;
188 SoFieldSensor *m_minThresholdColorSensor ;
189 SoFieldSensor *m_minThresholdTransSensor ;
190
191 SbBool m_maxThresholdChanged ;
192 SoFieldSensor *m_maxThresholdEnabledSensor ;
193 SoFieldSensor *m_maxThresholdSensor ;
194 SoFieldSensor *m_maxThresholdColorSensor ;
195 SoFieldSensor *m_maxThresholdTransSensor ;
196
197 SbBool m_transparencyChanged ;
198 SoFieldSensor *m_transEnabledSensor ;
199 SoFieldSensor *m_transValueDeletedPartsSensor ;
200} ;
201/*----------------------------------------------------------------------------*/
202
203#endif /* _PO_DATA_MAPPING_ */
204
<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> Abstract base class for ...
SoSFColor minThresholdColor
Color associated to values <= minThreshold.
SoSFFloat minThreshold
Minimum threshold value.
virtual const SbColor * getColor(float value)=0
Returns the color associated to a value.
SoSFBool transparencyEnabled
Enable/Disable the taking into account of transparency.
SoSFFloat maxThreshold
Maximum threshold value.
SoSFBool maxThresholdEnabled
Defines if the maximum threshold is enabled.
SoSFColor maxThresholdColor
Color associated to values >= maxThreshold.
SoSFFloat transparencyValueDeletedParts
Each primitive part of which transparency >= transparencyValueDeletedParts, is deleted.
SoSFFloat maxThresholdTransparency
Transparency associated to values >= maxThreshold.
virtual const SbColor * getColor(float value, float &transparency)=0
Returns the color and the transparency associated to a value.
SoSFBool minThresholdEnabled
Defines if the minimum threshold is enabled.
SoSFFloat minThresholdTransparency
Transparency associated to values <= minThreshold.
<a href="IconLegend.html"><img src="extMV.gif" alt="MeshViz" border="0"></a> Abstract base class for ...
Definition PoNode.h:39
Color vector class.
Definition SbColor.h:82
Sensor class that can be attached to Open Inventor fields.
Field containing a single Boolean value.
Definition SoSFBool.h:79
Field containing an RGB color.
Definition SoSFColor.h:82
Field containing a floating-point value.
Definition SoSFFloat.h:78
Abstract base class for Open Inventor sensors.
Definition SoSensor.h:100
int SbBool
Boolean type.
Definition SbBase.h:87