Open Inventor Release 2024.2.0
 
Loading...
Searching...
No Matches
PoNonLinearDataMapping2.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_NON_LINEAR_DATA_MAPPING2_
25#define _PO_NON_LINEAR_DATA_MAPPING2_
26
27#include <Inventor/fields/SoSFEnum.h>
28#include <Inventor/fields/SoMFFloat.h>
29#include <Inventor/fields/SoMFColor.h>
30
31#include <MeshViz/nodes/PoDataMapping.h>
32
33class SoFieldSensor ;
34
93 SO_NODE_HEADER(PoNonLinearDataMapping2) ;
94
95
96 public:
97
111
112 /* Fields */
113
118
123
131
138
139 /* Methods */
140
145
149 virtual const SbColor* getColor(float value) ;
150
154 virtual const SbColor* getColor(float value, float &transparency) ;
155
156 /*----------------------------------------------------------------------------*/
157
158
159 private:
160 virtual void doAction(SoAction *action) ;
161
162 private:
163 static void initClass() ;
164 static void exitClass() ;
165
166 private:
167 virtual ~PoNonLinearDataMapping2() ;
168 virtual void updateDataMapping() ;
169
170 private:
171 static void fieldChangedCB(void *data, SoSensor *) ;
172
173 SbBool m_isFieldChanged ;
174 SoFieldSensor *m_typeSensor ;
175 SoFieldSensor *m_valueSensor ;
176 SoFieldSensor *m_colorSensor ;
177 SoFieldSensor *m_transparencySensor ;
178
179} ;
180
181/*----------------------------------------------------------------------------*/
182
183#endif /* _PO_NON_LINEAR_DATA_MAPPING2_ */
184
<a href="IconLegend.html"><img src="extMV.gif" alt="MeshViz" border="0"></a> Abstract base class for ...
<a href="IconLegend.html"><img src="extMV.gif" alt="MeshViz" border="0"></a> Node class to define a n...
SoMFFloat transparency
Defines the list of transparencies for the data mapping.
SoMFFloat value
Defines the list of values for the data mapping.
SoSFEnum type
Defines the type of data mapping.
virtual const SbColor * getColor(float value)
Returns the color associated to a value.
SoMFColor color
Defines the list of colors for the data mapping.
PoNonLinearDataMapping2()
Constructor.
virtual const SbColor * getColor(float value, float &transparency)
Returns the color and transparency associated to a value.
@ LINEAR_PER_LEVEL
The data mapping is non linear but linear per level.
@ NON_LINEAR_PER_LEVEL
The data mapping is non linear per level.
Color vector class.
Definition SbColor.h:82
Abstract base class for all actions.
Definition SoAction.h:132
Sensor class that can be attached to Open Inventor fields.
Multiple-value field containing any number of RGB colors stored as three floats.
Definition SoMFColor.h:98
Multiple-value field containing any number of floating point values.
Definition SoMFFloat.h:90
Field containing an enumerated value.
Definition SoSFEnum.h:89
Abstract base class for Open Inventor sensors.
Definition SoSensor.h:100
int SbBool
Boolean type.
Definition SbBase.h:87