Open Inventor Release 2023.2.3
 
Loading...
Searching...
No Matches
SoVolumeMaskGroup.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 : VSG (MMM YYYY)
22**=======================================================================*/
23#ifndef SOVOLUMEMASKGROUP_H
24#define SOVOLUMEMASKGROUP_H
25
31
32class SbVec4ub;
35class SoCache;
36
79{
81public:
86
92
93private:
95 virtual void GLRender(SoGLRenderAction *action);
97 virtual void doAction(SoAction *action);
99 virtual void pick(SoPickAction *action);
100
101private:
102 static void initClass();
103 static void exitClass();
104
105 static int getTestTextureUnit(SoGLRenderAction *action);
106 static int getStyleTextureUnit(SoGLRenderAction *action);
107
117 SoSFBool isosurfaceCompliance;
118
119 // Size of the vmTex (it is a square texture used to render boundary)
120 static const int s_vmTexSize;
121
122private:
124 void updateCache(SoState *state);
125
127
128private:
129 struct BoundaryPalette
130 {
132 BoundaryPalette();
133 unsigned char renderStyle;
134 unsigned char padRenderStyle[3];
135 unsigned char diffuse[4];
136 unsigned char specular[3];
137 unsigned char shininess;
138 };
139
141 void setupIntersectionDrawStyle(SoAction* state);
142
147 SoVolumeDataDrawStyle* getVolumeDataDrawStyle(SoState* state);
148
150 void bindVmTexture(SoGLRenderAction* action, const SoLDM::DataSetIdPairList& dsList);
151
157 static bool isSupported(SoState* state);
158
160 void invalidateVolumeMaskTextures(SoState* state);
161
163 SoRef<SoTexture2> m_styleTexture;
164 SoRef<SoTextureUnit> m_styleTextureUnit;
165
167 SoRef<SoTexture2> m_testTexture;
168 SoRef<SoTextureUnit> m_testTextureUnit;
169
171 SoRef<SoTextureUnit> m_emptyTextureUnit;
172
173 SoRef<SoGroup> m_internalSceneGraph;
174
176 SoCache* m_cacheData;
177
179 SoCache* m_cacheStyle;
180
182 SoVolumeDataDrawStyle* m_defaultIntersectionDrawStyle;
183
185 SoTransferFunction* m_defaultIntersectionTf;
186
188};
189
190#endif
191
192
#define SO_NODE_HEADER(className)
Definition SoSubNode.h:151
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> 4D vector class.
Definition SbVec.h:3421
Abstract base class for all actions.
Definition SoAction.h:132
Renders a scene graph using Open Inventor's Render Engine.
Base class for all group nodes.
Definition SoGroup.h:122
Abstract base class for picking objects in a scene.
Smart pointer for any class inheriting SoRefCounter.
Definition SoRef.h:90
Field containing a single Boolean value.
Definition SoSFBool.h:79
Traversal state.
Definition SoState.h:74
<a href="IconLegend.html"><img src="extLDM.gif" alt="Large Data Management" border="0"></a> Describe...
<a href="IconLegend.html"><img src="extVR.gif" alt="VolumeViz" border="0"></a> Volume draw style.
<a href="IconLegend.html"><img src="extVR.gif" alt="VolumeViz" border="0"></a> Volume mask group.
static short TRANSFERFUNCTION_INTERSECTION_ID
Intersections between masks will be rendered with the transfer function with id = TRANSFERFUNCTION_IN...
friend struct SetBoundsColorsAndStyles
SoVolumeMaskGroup()
Constructor.
std::vector< DataSetIdPair > DataSetIdPairList
List of DataSetIdPair.
Definition SoLDM.h:76