Open Inventor Release 2023.2.3
 
Loading...
Searching...
No Matches
SoStereoElement.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-2017 BY FEI S.A.S, ***
17 *** BORDEAUX, FRANCE ***
18 *** ALL RIGHTS RESERVED ***
19**=======================================================================*/
20/*=======================================================================
21** Author : Olivier Fedkiw (MMM yyyy)
22**=======================================================================*/
23
24#ifndef _SO_STEREO_ELEMENT
25#define _SO_STEREO_ELEMENT
26
29
42
44
45 public:
51 static void setStereoAbsoluteAdjustments(SoState * state, SbBool absolute);
56
60 static void setStereoAdjustment(SoState * state, float stoffset);
61
66 static void setBalanceAdjustment(SoState * state, float stbalance, SbBool stNearFrac = false);
67
71 static void setInterEyeDistance(SoState * state, float ied);
72
76 static void setReversedView(SoState * state, bool strev);
77
81 static float getStereoAdjustment(SoState *state);
82
86 static float getBalanceAdjustment(SoState *state);
87
93
97 static float getInterEyeDistance(SoState *state);
98
102 static bool getReversedView(SoState *state);
103
107 static void set(SoState *state, const SoCamera::StereoMode mode);
108
109 // Returns the boolean that tells the camera to narrow or not the view volume
110 //static const SbBool getNarrow(SoState *state);
111
116
122 static SoStereoElement *getInstance(const SoState *state, SbBool &elemIsSet);
123
124private:
125
127 virtual void init(SoState *state);
128
132 virtual SbBool matches(const SoElement* elt) const;
133
137 virtual SoElement* copyMatchInfo() const;
138
139 private:
140 // Initializes the SoStereoElement class
141 static void initClass();
142 static void exitClass();
143
144private:
145
146 SoCamera::StereoMode stereoMode;
147 SbBool stereoAbsoluteAdjustments;
148 float stereoOffset;
149 bool stereoNearFrac;
150 float stereoBalance;
151 float interEyeDistance;
152 bool reversed;
153 SbBool isSet;
154
155 virtual ~SoStereoElement();
156
157 friend class SoGuiRenderArea;
158 friend class SoBaseStereo;
159 friend class SoStereoCamera;
160};
161#endif /* _SO_STEREO_ELEMENT */
162
163
#define SoEXTENDER_Documented
static void init()
#define SO_ELEMENT_HEADER(className)
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Class for stereo...
StereoMode
Stereo mode.
Definition SoCamera.h:518
Abstract base class for all state elements.
Definition SoElement.h:102
Traversal state.
Definition SoState.h:74
Stereo camera node.
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Stores the curre...
static void setBalanceAdjustment(SoState *state, float stbalance, SbBool stNearFrac=false)
Sets the stereo balance adjustment.
static SoStereoElement * getInstance(const SoState *state, SbBool &elemIsSet)
Return the top (current) instance of the element in the state.
static void setStereoAdjustment(SoState *state, float stoffset)
Sets the stereo offset adjustment.
static void setInterEyeDistance(SoState *state, float ied)
Sets the inter-eye distance (immersive MP only).
static void set(SoState *state, const SoCamera::StereoMode mode)
Sets the stereo mode, LEFT_VIEW, RIGHT_VIEW, or MONOSCOPIC.
static SoCamera::StereoMode getStereoMode(SoState *state)
Returns the stereoMode.
static void setStereoAbsoluteAdjustments(SoState *state, SbBool absolute)
Indicates if the stereo offset and and balance setting should be interpreted as factors or as absolut...
static bool getReversedView(SoState *state)
Returns the inverted view flag.
static void setReversedView(SoState *state, bool strev)
Sets the stereo inverted view flag.
static float getStereoAdjustment(SoState *state)
Returns the stereo offset adjustment.
static bool isStereoAbsoluteAdjustments(SoState *state)
Returns TRUE if stereo adjustments are absolute.
static float getBalanceAdjustment(SoState *state)
Returns the stereo balance adjustment.
static float getInterEyeDistance(SoState *state)
Returns the inter-eye distance (immersive MP only).
static SbBool isBalanceAdjustmentNearFrac(SoState *state)
Returns TRUE when the stereo balance adjustement is defined as a fraction of the camera near distance...
int SbBool
Boolean type.
Definition SbBase.h:87