Open Inventor Release 2024.1.1
 
Loading...
Searching...
No Matches
PoLinearDataMapping.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_LINEAR_DATA_MAPPING_
25#define _PO_LINEAR_DATA_MAPPING_
26
27#include <Inventor/fields/SoSFFloat.h>
28#include <Inventor/fields/SoSFColor.h>
29
30#include <MeshViz/nodes/PoDataMapping.h>
31
32class SoFieldSensor ;
33
84 SO_NODE_HEADER(PoLinearDataMapping) ;
85
86
87 public:
88
89 /* Fields */
90
95
100
105
110
115
120
121 /* Methods */
122
127
131 virtual const SbColor* getColor(float value) ;
132
136 virtual const SbColor* getColor(float value, float &transparency) ;
137
138 /*----------------------------------------------------------------------------*/
139 private:
140 virtual void doAction(SoAction *action) ;
141
142 private:
143 static void initClass() ;
144 static void exitClass() ;
145
146 private:
147 virtual ~PoLinearDataMapping() ;
148 virtual void updateDataMapping() ;
149
150 private:
151 static void fieldChangedCB(void *data, SoSensor *) ;
152
153 SbBool m_isFieldChanged ;
154 SoFieldSensor *value1Sensor ;
155 SoFieldSensor *color1Sensor ;
156 SoFieldSensor *transparency1Sensor ;
157 SoFieldSensor *value2Sensor ;
158 SoFieldSensor *color2Sensor ;
159 SoFieldSensor *transparency2Sensor ;
160
161} ;
162
163/*----------------------------------------------------------------------------*/
164
165#endif /* _PO_LINEAR_DATA_MAPPING_ */
166
<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 l...
SoSFFloat value2
Defines the second value of the linear data mapping.
SoSFFloat transparency2
Defines the second transparency of the linear data mapping.
SoSFFloat transparency1
Defines the first transparency of the linear data mapping.
virtual const SbColor * getColor(float value)
Returns the color associated to a value.
SoSFColor color2
Defines the second color of the linear data mapping.
SoSFFloat value1
Defines the first value of the linear data mapping.
PoLinearDataMapping()
Constructor.
virtual const SbColor * getColor(float value, float &transparency)
Returns the color and transparency associated to a value.
SoSFColor color1
Defines the first color of the linear data mapping.
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.
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