Open Inventor Release 2024.1.3
 
Loading...
Searching...
No Matches
SoStereoViewer.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#ifndef _SO_WIN_STEREOVIEWER
25#define _SO_WIN_STEREOVIEWER
26
27#include <Inventor/SbBasic.h>
28#include <Inventor/SbViewportRegion.h>
29
30class SbVec2s;
31class SoCamera;
32class SoBaseStereo;
33class SoGLContext;
34class SoSceneManager;
35
56{
57
58 public:
59
63 virtual ~SoStereoViewer() {}
64
69 virtual void setStereoActive(SbBool activate) = 0;
70
74 virtual SbBool isStereoActive() = 0;
75
83 virtual void actualRendering() = 0;
84
89 virtual SoCamera * getViewerCamera() = 0;
90
95 virtual const SbVec2s& getSize() = 0;
96
104 virtual const SbVec2s& getTopLeft() = 0;
105
113 virtual const SbVec2s& getBottomRight() = 0;
114
119
125 virtual void setStereoViewType(SoBaseStereo * stereoViewType) = 0;
126
131
135 virtual void reverseStereoView(SbBool reverse) = 0;
136
141
183
189 virtual SbBool isStereoAbsoluteAdjustments() const { return FALSE; };
190
196 virtual void setStereoOffset(float offset) = 0;
197
201 virtual float getStereoOffset() = 0;
202
217 virtual void setStereoBalance(float balance, SbBool nearFrac = false) = 0;
218
222 virtual float getStereoBalance() = 0;
223
229
234 virtual void setViewport(short left, short bottom,
235 short width, short height) = 0;
236
241 virtual void getViewport(short &left, short &bottom,
242 short &width, short &height) = 0;
243
249
255
256private:
257
258 //get a pointer to the viewer
259 virtual void* getViewer() = 0;
260};
261
262#endif // _SO_WIN_STEREOVIEWER
263
264
2D vector class.
Definition SbVec.h:700
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Class for stereo...
Abstract base class for camera nodes.
Definition SoCamera.h:188
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> OpenGL context m...
Manages scene graph rendering and event handling.
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Pure virtual cla...
virtual void getViewport(short &left, short &bottom, short &width, short &height)=0
Returns viewport region with origin (lower-left corner) and size, given as pixel coordinates.
virtual SbBool isViewerDoubleBuffer()=0
Queries if viewer is double buffered.
virtual float getStereoBalance()=0
Queries the stereo balance (the position of the zero parallax plane).
virtual void setStereoOffset(float offset)=0
Sets the stereo offset (the distance of each eye from the camera position).
virtual const SbVec2s & getSize()=0
Returns the size of the OpenGL drawing window in absolute screen coordinates (not relative to parent ...
virtual const SbVec2s & getBottomRight()=0
Returns the position of the OpenGL drawing window in absolute screen coordinates (not relative to par...
virtual const SbVec2s & getTopLeft()=0
Returns the position of the OpenGL drawing window in absolute screen coordinates (not relative to par...
virtual SbBool isStereoViewReversed()=0
Queries reversal of the left and right views.
virtual void setStereoAbsoluteAdjustments(SbBool)
Specifies if stereo adjustments are absolute.
virtual SbBool isStereoBalanceNearFrac()=0
Returns TRUE when the stereo balance adjustement is defined as a fraction of the camera near distance...
virtual void actualRendering()=0
This method is called automatically when the viewer requests that its SoBaseStereo object perform ste...
virtual SoGLContext * getViewerContext()=0
Returns the current SoGLContext to render to.
virtual void setViewport(short left, short bottom, short width, short height)=0
Sets viewport region with given origin (lower-left corner) and size, given as pixel coordinates.
virtual SbBool isStereoActive()=0
Queries stereo activation.
virtual void setStereoActive(SbBool activate)=0
Sets stereo activation.
virtual SoSceneManager * getViewerSceneManager()=0
Returns the current SoSceneManager to render to.
virtual SoBaseStereo * getStereoViewType()=0
Returns the stereo view type.
virtual float getStereoOffset()=0
Queries the stereo offset.
virtual SbBool isStereoAbsoluteAdjustments() const
Queries if the stereo adjustments are absolute.
virtual void reverseStereoView(SbBool reverse)=0
Sets reversal of the left and right views.
virtual SoCamera * getViewerCamera()=0
Returning the camera allows the SoBaseStereo to manipulate it to achieve the stereo effect.
virtual void setStereoBalance(float balance, SbBool nearFrac=false)=0
Sets the stereo balance (the position of the zero parallax plane) and specifies whether the balance v...
virtual void setStereoViewType(SoBaseStereo *stereoViewType)=0
If stereoViewType is NULL, the stereo is inactivated (see setStereoActive).
virtual ~SoStereoViewer()
Destructor.
int SbBool
Boolean type.
Definition SbBase.h:87