Open Inventor Release 2024.1.3
 
Loading...
Searching...
No Matches
SoBaseStereo.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-2014 BY FEI S.A.S, ***
17 *** BORDEAUX, FRANCE ***
18 *** ALL RIGHTS RESERVED ***
19 **=======================================================================*/
20/*=======================================================================
21** Author : VSG (MMM YYYY)
22**=======================================================================*/
23
24#ifndef _SO_WIN_STEREOVIEW_TYPE
25#define _SO_WIN_STEREOVIEW_TYPE
26
27#include <Inventor/Gui/SoGui.h>
28#include <Inventor/sys/port.h>
29#include <Inventor/SbBasic.h>
30#include <Inventor/nodes/SoCamera.h>
31#include <Inventor/nodes/SoSeparator.h>
32#include <Inventor/Gui/viewers/SoGuiViewer.h>
33
34class SoStereoViewer;
35class SoSceneManager;
37
61{
62
63public:
66 {
91#ifndef HIDDEN_FROM_DOC
95 SSDI_STEREO = 5,
96#endif
98 };
99
103 SoBaseStereo( SoStereoViewer* stereoViewer = NULL, SoGuiViewer* guiViewer = NULL );
104
108 virtual ~SoBaseStereo();
109
113 void setStereoViewer( SoStereoViewer* viewer = NULL ) { m_stereoViewer = viewer; }
114
119 SoStereoViewer* getStereoViewer() { return m_stereoViewer; }
120
125 virtual void reverseStereoView( SbBool reverse );
126
131
136 virtual void renderStereoView();
137
142
151
155 virtual SbBool requireHardware() { return FALSE; }
156
161 virtual void clearStereo();
162
165
166private:
176 virtual SbBool isMPStereoViewTypeSupported();
177
181 virtual void doLeftEyeSettings( SoGLRenderAction* /*action*/ ) {};
182 virtual void doRightEyeSettings( SoGLRenderAction* /*action*/ ) {};
183 virtual void doMonoscopicSettings( SoGLRenderAction* /*action*/ ) {};
184
188 void setRenderFastEditNodes( SbBool render );
189
193 void setGuiViewer( SoGuiViewer* viewer = NULL ) { m_guiViewer = viewer; }
194
195private:
196 // Insert stereo test pattern in SceneManager.
197 void insertTestPattern( SoSceneManager* mgr );
198 void removeTestPattern( SoSceneManager* mgr );
199
200 SoStereoViewer* m_stereoViewer;
201 SoGuiViewer* m_guiViewer;
202 SbBool m_renderFastEdit;
203 SbBool m_reversed;
204 SbBool m_clearBuffer;
205
206private:
207 SoRef<SoSeparator> m_patternSceneGraph;
208
210 SoRef<SoSeparator> m_oldRootSlot;
211};
212
213#endif // _SO_WIN_STEREOVIEW_TYPE
214
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Class for stereo...
virtual SbBool requireHardware()
Returns true or false depending on the type of stereo buffering.
void setStereoViewer(SoStereoViewer *viewer=NULL)
Sets the stereo viewer.
virtual void reverseStereoView(SbBool reverse)
Sets stereo reversal.
void setStereoElement(SoSceneManager *, SoCamera::StereoMode stereoMode)
Apply stereo parameters to the passed SoSceneManager.
SoBaseStereo(SoStereoViewer *stereoViewer=NULL, SoGuiViewer *guiViewer=NULL)
Constructor.
virtual ~SoBaseStereo()
Destructor.
virtual SbBool isStereoViewReversed() const
Queries stereo reversal.
virtual void clearStereo()
A stereo view type may need to restore a state when it is no longer used by a stereo viewer.
virtual StereoViewType getStereoViewType()=0
Queries the stereo view type.
SoStereoViewer * getStereoViewer()
Queries the stereo viewer.
StereoViewType
Stereo view types.
@ HALF_SCREEN_STEREO
Each view displayed in a half screen.
@ INTERLACED_STEREO
Two views interlaced in a single image.
@ ANAGLYPH_STEREO
Each view is displayed through a color filter.
@ OPENGL_STEREO
Ditto.
@ ANAGLYPH
Ditto.
@ NO_STEREO_VIEW
Monoscopic viewing.
@ RAW_STEREO
Two views superimposed on a single image.
virtual void renderStereoView()
Renders the stereo view.
virtual SbBool canClearBeforeRender() const
Queries ability to clear before rendering.
StereoMode
Stereo mode.
Definition SoCamera.h:518
Renders a scene graph using Open Inventor's Render Engine.
Smart pointer for any class inheriting SoRefCounter.
Definition SoRef.h:90
Manages scene graph rendering and event handling.
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Pure virtual cla...
int SbBool
Boolean type.
Definition SbBase.h:87