Open Inventor Release 2024.2.0
 
Loading...
Searching...
No Matches
SoVolumeShape.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-2023 BY FEI S.A.S, ***
17 *** BORDEAUX, FRANCE ***
18 *** ALL RIGHTS RESERVED ***
19**=======================================================================*/
20/*=======================================================================
21** Author : VSG (MMM YYYY)
22**=======================================================================*/
23
24
25#ifndef SO_VOLUME_SHAPE_H
26#define SO_VOLUME_SHAPE_H
27
28#include <Inventor/nodes/SoShape.h>
29
30#include <Inventor/fields/SoSFBool.h>
31#include <Inventor/fields/SoSFFloat.h>
32#include <Inventor/fields/SoSFEnum.h>
33#include <Inventor/fields/SoSFUInt32.h>
34#include <Inventor/fields/SoSFNode.h>
35
36#include <Inventor/STL/vector>
37
38#include <Inventor/sys/SoGLType.h>
39
40#include <Inventor/SbViewportRegion.h>
41
42#include <LDM/nodes/SoTransferFunction.h>
43#include <LDM/nodes/SoLdmShape.h>
44
45class SoState;
46class SoVolumeData;
48class SoVolumeShader;
49class SoVolumeShaderARB;
50class SoVolumeState;
52
53#ifdef _WIN32
54#pragma warning( push )
55#pragma warning(disable:4251)
56#endif
57
58
86class SoVolumeShape : public SoLdmShape {
87 SO_NODE_ABSTRACT_HEADER(SoVolumeShape);
88
89public:
90
167
175
206
207#if 1 SoDEPRECATED enum
223 };
224SoDEPRECATED
252
253#endif
255private:
256
258 virtual void GLRender(SoGLRenderAction *action);
259
261 virtual void computeBBox(SoAction *action, SbBox3f &box, SbVec3f &center);
262
264 virtual void getBoundingBox(SoGetBoundingBoxAction *action);
265
266 // ScaleViz specific : force rendering on all oiru in depth compositing mode
267 // As VolumeViz shape nodes are considered as transparent (alpha)
268 virtual int32_t getRenderUnitID() const;
269
270private:
271
273 static void initClass();
274
276 static void exitClass();
277
281 void setVVizUniforms( SoGLRenderAction* action,
282 const float *sliceTangent, const float *sliceBinormal,
283 float scale, float sliceSpacing,
284 const SbVec3f& scaleFactor,
285 const SbVec3f& lowResScaleFactor, SbBool doTexGen = TRUE,
286 const SbMatrix* virtToPageTableMatrix = NULL, const SbMatrix* shapeToVirtMatrix = NULL);
287
291 void setVVizZAxis( SoGLRenderAction* action, const SbVec3f& zAxis );
292
298 virtual bool enableColorMap(SoState *state,
299 SoTransferFunction::GLColorMapType colorMapInstalled,
300 int &texType);
301
305 SoTransferFunction::GLColorMapType getInstalledColorMap() const;
306
310 SoTexture::Filter getTexFilter() const;
311
315 virtual void enableBlending(SoState *state);
316
320 virtual void onUserInteractionChange(SoState* state, bool stopMoving);
321
325 SoVolumeShape::Interpolation getInteractiveInterpolationValue(SoState* state) const;
326
327 SoVolumeState* getVolumeState() const
328 {
329 return m_volumeState;
330 }
331
332private:
333 SoVolumeState* m_volumeState;
334
336 virtual ~SoVolumeShape();
337
341 virtual bool isTransparent(SoState *state);
342
346 virtual void delayRendering( SoGLRenderAction* action );
347
351 bool isDelayed();
352
356 SoVolumeShader* getVolumeShader(SoState *state);
357
362 void useSeparateAlphaBlend(bool flag);
363
367 GLenum getDepthInternalFormat();
368
372 bool isMoving();
373
377 virtual void doRendering(SoGLRenderAction* action) = 0;
378
379 static void onUserInteractionChangeCb(SoState* state, SoNode* node, bool moving);
380
381 SoProgressIndicator* m_renderProgress;
382
383#ifndef HIDDEN_FROM_DOC
384 friend class SoSliceInterface;
385 friend class SoVolumeState;
386#endif
387
388SoINTERNAL private:
389
391 virtual void ldmAction( SoLdmValuationAction* action );
392};
393
394#if defined(_WIN32)
395#pragma warning( pop )
396#pragma warning(disable:4251)
397#endif
398
399#endif
400
401
3D box class.
Definition SbBox.h:649
4x4 matrix class.
Definition SbMatrix.h:309
3D vector class.
Definition SbVec.h:932
Abstract base class for all actions.
Definition SoAction.h:132
Renders a scene graph using Open Inventor's Render Engine.
Computes bounding box of a scene.
<a href="IconLegend.html"><img src="extLDM.gif" alt="Large Data Management" border="0"></a> Abstract...
Definition SoLdmShape.h:65
friend class SoLdmValuationAction
Definition SoLdmShape.h:84
Abstract base class for all database nodes.
Definition SoNode.h:145
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Class for report...
Field containing an enumerated value.
Definition SoSFEnum.h:89
Traversal state.
Definition SoState.h:74
Filter
Specifies the OpenGL filtering method for minification and magnification.
Definition SoTexture.h:452
<a href="IconLegend.html"><img src="extVR.gif" alt="VolumeViz" border="0"></a> Volume data property ...
<a href="IconLegend.html"><img src="extVR.gif" alt="VolumeViz" border="0"></a> Volume rendering qual...
<a href="IconLegend.html"><img src="extVR.gif" alt="VolumeViz" border="0"></a> Shader node for volum...
<a href="IconLegend.html"><img src="extVR.gif" alt="VolumeViz" border="0"></a> Abstract base class f...
Interpolation
Interpolation mode.
@ MULTISAMPLE_12
Multi-sample interpolation for slice shapes.
@ LINEAR
OpenGL linear interpolation (Default).
@ TRILINEAR
Tri-linear interpolation for SoObliqueSlice.
@ CUBIC
Cubic interpolation.
@ NEAREST
OpenGL "nearest neighbor" interpolation.
SoDEPRECATED SoSFEnum composition
Specifies color composition mode.
SoSFEnum interpolation
Interpolation mode.
Composition
Composition mode.
@ MIN_INTENSITY
Min intensity.
@ MAX_INTENSITY
Max intensity.
@ ALPHA_BLENDING
Alpha blending (Default)
@ SUM_INTENSITY
Sum intensity.
virtual void setRenderProgress(SoProgressIndicator *ps)
Set an application defined SoProgressIndicator object which will raise an event before and after the ...
int SbBool
Boolean type.
Definition SbBase.h:87