Open Inventor Release 2024.1.0
 
Loading...
Searching...
No Matches
SoDataCompositor.h
Go to the documentation of this file.
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 : Jerome Hummel (Dec 2005)
22**=======================================================================*/
23
24
25#ifndef _SO_DATA_COMPOSITOR__
26#define _SO_DATA_COMPOSITOR__
27
32#include <Inventor/SbDataType.h>
33#include <Inventor/SbVec.h>
34#include <LDM/SoLDM.h>
35
36class SoBufferObject;
38
110class SoDataCompositor : public SoNode {
112
113 public:
114
120
140
148
157
164
178
188
197
216 virtual void compose(int numDataSet, const SbVec3i32& tileDimension,
217 int* vdid, SoBufferObject** inputBuffer,
218 SoBufferObject* outputBuffer);
219
233 virtual void compose(int numDataSet, const SbVec3i32& tileDimension,
234 int* vdid, SoBufferObject** inputBuffer, SoDataCompositor::DataType* dataTypes,
235 SoBufferObject* outputBuffer);
236
242
246 int getDataSize() const;
247
251 int getNumSigBits() const;
252
257
258#if 1 SoDEPRECATED
261 virtual void compose(int numDataSet, const SbVec3i32& tileDimension,
262 int* vdid, void** inputBuffer,
263 void* outputBuffer);
264SoDEPRECATED
266 virtual void compose(int numDataSet, const SbVec3i32& tileDimension,
267 int* vdid, void** inputBuffer, SoDataCompositor::DataType* dataTypes,
268 void* outputBuffer);
269
270#endif
272 private:
273
274 virtual void doAction( SoAction *action );
275 virtual void callback( SoCallbackAction *action );
276 virtual void GLRender( SoGLRenderAction *action );
277 virtual void write(SoWriteAction *action);
278 virtual void getBoundingBox(SoGetBoundingBoxAction *action);
279 virtual void pick(SoPickAction *action) ;
280
281
282 private:
283 static void initClass();
284 static void exitClass();
285
286 void preDefCompose(int numDataSet, const SbVec3i32& tileDimension,
287 int* vdid, SoBufferObject** inputBuffer,
288 SoBufferObject* outputBuffer);
289
290 private:
291 // Destructor
292 virtual ~SoDataCompositor();
293
294 private:
295
296 // TODO Damien: Fix this class
297
298 // CPU optimized version
299 void minus(int numDataSet, const SbVec3i32& tileDimension,
300 int* vdid, SoBufferObject** inputBuffer,
301 SoCpuBufferObject* outputBuffer);
302 void add(int numDataSet, const SbVec3i32& tileDimension,
303 int* vdid, SoBufferObject** inputBuffer,
304 SoCpuBufferObject* outputBuffer);
305 void multiply(int numDataSet, const SbVec3i32& tileDimension,
306 int* vdid, SoBufferObject** inputBuffer,
307 SoCpuBufferObject* outputBuffer);
308
309 // CUDA optimized version
310 void minus(int numDataSet, const SbVec3i32& tileDimension,
311 int* vdid, SoBufferObject** inputBuffer,
312 SoBufferObject* outputBuffer);
313 void add(int numDataSet, const SbVec3i32& tileDimension,
314 int* vdid, SoBufferObject** inputBuffer,
315 SoBufferObject* outputBuffer);
316 void multiply(int numDataSet, const SbVec3i32& tileDimension,
317 int* vdid, SoBufferObject** inputBuffer,
318 SoBufferObject* outputBuffer);
319};
320//--------------------------------------------------------------------------------
321
322#endif // _SO_DATA_COMPOSITOR__
323
324
#define SO_NODE_HEADER(className)
Definition SoSubNode.h:151
@ FLOAT
float
Definition SbDataType.h:78
@ SIGNED_BYTE
signed byte
Definition SbDataType.h:72
@ UNSIGNED_INT32
unsigned int (32bits)
Definition SbDataType.h:70
@ UNSIGNED_BYTE
unsigned byte
Definition SbDataType.h:66
@ SIGNED_SHORT
signed short
Definition SbDataType.h:74
@ UNSIGNED_SHORT
unsigned short
Definition SbDataType.h:68
@ SIGNED_INT32
signed int (32bits)
Definition SbDataType.h:76
3D vector class.
Definition SbVec.h:1517
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> CPU buffer objec...
<a href="IconLegend.html"><img src="extLDM.gif" alt="Large Data Management" border="0"></a> Data set...
virtual void compose(int numDataSet, const SbVec3i32 &tileDimension, int *vdid, SoBufferObject **inputBuffer, SoBufferObject *outputBuffer)
The compose method can be overridden in a subclass to specify a custom composition.
SoSFBool rgbaMode
Final composed buffer contains RGBA values (default is FALSE).
static SbBool isDataSigned(DataType dataType)
Returns TRUE if the given data type is a signed integer data type.
DataType
Supported data types.
@ SIGNED_BYTE
signed byte
@ UNSIGNED_INT32
unsigned int (32bits)
@ UNSIGNED_BYTE
unsigned byte
@ SIGNED_INT32
signed int (32bits)
@ UNSIGNED_SHORT
unsigned short
@ SIGNED_SHORT
signed short
virtual SoDEPRECATED void compose(int numDataSet, const SbVec3i32 &tileDimension, int *vdid, void **inputBuffer, void *outputBuffer)
SoDataCompositor()
Constructor.
PreDefCompositor
Predefined compositor.
virtual SoDEPRECATED void compose(int numDataSet, const SbVec3i32 &tileDimension, int *vdid, void **inputBuffer, SoDataCompositor::DataType *dataTypes, void *outputBuffer)
int getNumSigBits() const
Returns the output number of significant bits.
DataType getDataType() const
Returns the output data type.
virtual void compose(int numDataSet, const SbVec3i32 &tileDimension, int *vdid, SoBufferObject **inputBuffer, SoDataCompositor::DataType *dataTypes, SoBufferObject *outputBuffer)
Same as the compose method described above with one additional parameter: dataTypes is an array of So...
SoSFShort numSigBits
Number of significant bits of the final composed datum.
int getDataSize() const
Returns number of bytes for output datum.
SoSFEnum preDefCompositor
Predefined composition method.
SoSFBool convert
If the convert field is TRUE, LDM will call the compose method after automatically converting data to...
SoSFEnum dataType
Data type of the final composed buffer.
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 an enumerated value.
Definition SoSFEnum.h:89
Field containing a short integer.
Definition SoSFShort.h:81
Writes a scene graph to a file.
int SbBool
Boolean type.
Definition SbBase.h:87