Open Inventor Release 2024.1.1
 
Loading...
Searching...
No Matches
SoOverlayGroup.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#pragma once
22
23#include <Inventor/nodes/SoGroup.h>
24#include <Inventor/nodes/SoSeparator.h>
25#include <Inventor/nodes/SoTexture2.h>
26#include <Inventor/nodes/SoCallback.h>
27#include <Inventor/nodes/SoShaderProgram.h>
28#include <Inventor/nodes/SoSwitch.h>
29
99class SoOverlayGroup : public SoGroup
100{
101 SO_NODE_HEADER( SoOverlayGroup );
102
103public:
108
109private:
110 void doAction( SoAction* action ) override;
111 void callback( SoCallbackAction* action ) override;
112 void GLRender( SoGLRenderAction* action ) override;
113 void getBoundingBox( SoGetBoundingBoxAction* action ) override;
114 void getMatrix( SoGetMatrixAction* action ) override;
115 void handleEvent( SoHandleEventAction* action ) override;
116 void pick( SoPickAction* action ) override;
117 void search( SoSearchAction* action ) override;
118 void write( SoWriteAction* action ) override;
119 void getPrimitiveCount( SoGetPrimitiveCountAction* action ) override;
120
121private:
122
123 // Specifies whether SoOverlayGroup behavior is enabled or disabled.
124 // If disabled, the SoOverlayGroup behaves like an SoGroup.
125 // Default is true.
126 SoSFBool enabled;
127
128 static void initClass();
129 static void exitClass();
130
131 void addChild( SoNode* child ) override;
132 void insertChild( SoNode* child, int newChildIndex ) override;
133 SoNode* getChild( int index ) const override;
134 int findChild( const SoNode* child ) const override;
135 int getNumChildren() const override;
136 void removeChild( int index ) override;
137 void removeChild( SoNode* child ) override;
138 void removeAllChildren() override;
139 void replaceChild( int index, SoNode* newChild ) override;
140 void replaceChild( SoNode* oldChild, SoNode* newChild ) override;
141 SbBool affectsState() const override;
142
143 void fieldHasChanged( SoField* field ) override;
144
145private:
146 ~SoOverlayGroup() override;
147 SoNode* buildSceneGraph( SoState* state );
148
149private:
150
151 SoRef<SoGroup> m_publicChildren;
152
153 SoRef<SoSeparator> m_rttScene;
154 SoRef<SoSeparator> m_rttRenderTriangle;
155
156 std::vector<SoCallback*> m_callbackNodes;
157 SoRef<SoCallback> m_updateElementsCallback;
158 SoRef<SoCallback> m_rttSetupElementsCallback;
159
160 SoRef<SoTexture2> m_depthTexture;
161 SoRef<SoTexture2> m_colorTexture;
162
163 SoRef<SoShaderProgram> m_shaderProg;
164
165 SoRef<SoSwitch> m_useRTTSwitch;
166
167 bool m_isTraversed;
168};
Abstract base class for all actions.
Definition SoAction.h:132
Performs a generic traversal of a scene graph or path.
Base class for all fields.
Definition SoField.h:234
Renders a scene graph using Open Inventor's Render Engine.
Computes bounding box of a scene.
Computes transformation matrix for a subgraph.
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Counts number of...
Base class for all group nodes.
Definition SoGroup.h:122
Allows nodes in a graph to receive input events.
Abstract base class for all database nodes.
Definition SoNode.h:145
Group node dedicated to render multiple co-planar shapes.
SoOverlayGroup()
Creates an empty overlay group node.
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
Searches for nodes in a scene graph.
Traversal state.
Definition SoState.h:74
Writes a scene graph to a file.
int SbBool
Boolean type.
Definition SbBase.h:87