Open Inventor Release 2024.2.1
 
Loading...
Searching...
No Matches
SoDataRange.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-2024 BY FEI S.A.S, ***
17 *** BORDEAUX, FRANCE ***
18 *** ALL RIGHTS RESERVED ***
19**=======================================================================*/
20/*=======================================================================
21** Author : Jerome Hummel (Oct 2006)
22**=======================================================================*/
23
24
25#ifndef _SO_DATA_RANGE__
26#define _SO_DATA_RANGE__
27
28#include <Inventor/nodes/SoNode.h>
29#include <Inventor/fields/SoSFDouble.h>
30#include <Inventor/fields/SoSFBool.h>
31#include <Inventor/fields/SoSFInt32.h>
32
33#include <LDM/nodes/SoDataSet.h>
34#include <Inventor/algorithms/SoConversion.h>
35
181class SoDataRange : public SoNode {
182 SO_NODE_HEADER( SoDataRange );
183
184public:
189
200
206
211
225
226private:
227 static void initClass();
228 static void exitClass();
229
234 static void mapDataRangeToIndex(
235 const SoDataSet::DataType dataTypeSrc, SoBufferObject* sourceBufferObject,
236 const SoDataSet::DataType dataTypeDst, SoBufferObject* targetBufferObject,
237 const double dataRangeMin, const double dataRangeMax, const bool dataRangeMap,
238 const double undefinedValue = std::numeric_limits<double>::quiet_NaN()
239 );
240
241
246 static void mapDataRangeToRgba(
247 const SoDataSet::DataType dataTypeSrc, SoBufferObject* sourceBufferObject,
248 const SoDataSet::DataType dataTypeDst, SoBufferObject* targetBufferObject,
249 const double dataRangeMin, const double dataRangeMax, const bool dataRangeMap,
250 SoBufferObject *rgba, const int numRgba, SoConversion::MappingMethod rgbaMapping
251 );
252
259 static void mapDataToIndex(
260 const SoDataSet::DataType dataTypeSrc, SoBufferObject* sourceBufferObject,
261 const SoDataSet::DataType dataTypeDst, SoBufferObject* targetBufferObject,
262 const int numSigBits
263 );
264
265
272 static void mapDataToRgba(
273 const SoDataSet::DataType dataTypeSrc, SoBufferObject* sourceBufferObject,
274 const SoDataSet::DataType dataTypeDst, SoBufferObject* targetBufferObject,
275 const int numSigBits,
276 SoBufferObject *rgba, const int numRgba, SoConversion::MappingMethod rgbaMapping
277 );
278
279
280private:
281 virtual void doAction( SoAction *action );
282 virtual void GLRender( SoGLRenderAction *action );
283 virtual void callback( SoCallbackAction *action );
284 virtual void getBoundingBox(SoGetBoundingBoxAction *action);
285 virtual void pick(SoPickAction *action) ;
286 virtual void write(SoWriteAction *action);
287
288private:
289 // Destructor
290 virtual ~SoDataRange();
291
292private:
293
294 static SoConversion* s_conversion;
295};
296
297#endif // _SO_DATA_RANGE__
298
299
Abstract base class for all actions.
Definition SoAction.h:132
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Abstract base cl...
Performs a generic traversal of a scene graph or path.
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Type conversion ...
<a href="IconLegend.html"><img src="extLDM.gif" alt="Large Data Management" border="0"></a> Range of...
SoSFDouble min
Minimum data value of the data range.
SoSFDouble max
Maximum data value of the data range.
SoSFBool mapOnFullColorRange
Specifies how to map data values that are outside of the data range.
SoDataRange()
Constructor.
SoSFInt32 dataRangeId
This field allows the use of multiple data ranges for the same shape.
DataType
Supported data type.
Definition SoDataSet.h:664
Renders a scene graph using Open Inventor's Render Engine.
Computes bounding box of a scene.
Abstract base class for all database nodes.
Definition SoNode.h:145
Abstract base class for picking objects in a scene.
Field containing a single Boolean value.
Definition SoSFBool.h:79
Field containing a floating-point value.
Definition SoSFDouble.h:53
Field containing a int32_t integer.
Definition SoSFInt32.h:80
Writes a scene graph to a file.