Pure virtual class for stereo support. More...
#include <Inventor/components/stereo/SoStereoViewer.h>
Public Member Functions | |
virtual | ~SoStereoViewer () |
Destructor. | |
virtual void | setStereoActive (SbBool activate)=0 |
Sets stereo activation. | |
virtual SbBool | isStereoActive ()=0 |
Queries stereo activation. | |
virtual void | actualRendering ()=0 |
This method is called automatically when the viewer requests that its SoBaseStereo object perform stereo rendering. | |
virtual SoCamera * | getViewerCamera ()=0 |
Returning the camera allows the SoBaseStereo to manipulate it to achieve the stereo effect. | |
virtual const SbVec2s & | getSize ()=0 |
Returns the size of the OpenGL drawing window in absolute screen coordinates (not relative to parent window) of the native window system. | |
virtual const SbVec2s & | getTopLeft ()=0 |
Returns the position of the OpenGL drawing window in absolute screen coordinates (not relative to parent window) of the native window system (typically Y increasing downward). | |
virtual const SbVec2s & | getBottomRight ()=0 |
Returns the position of the OpenGL drawing window in absolute screen coordinates (not relative to parent window) of the native window system (typically Y increasing downward). | |
virtual SbBool | isViewerDoubleBuffer ()=0 |
Queries if viewer is double buffered. | |
virtual void | setStereoViewType (SoBaseStereo *stereoViewType)=0 |
If stereoViewType is NULL, the stereo is inactivated (see setStereoActive). | |
virtual SoBaseStereo * | getStereoViewType ()=0 |
Returns the stereo view type. | |
virtual void | reverseStereoView (SbBool reverse)=0 |
Sets reversal of the left and right views. | |
virtual SbBool | isStereoViewReversed ()=0 |
Queries reversal of the left and right views. | |
virtual void | setStereoAbsoluteAdjustments (SbBool) |
Specifies if stereo adjustments are absolute. | |
virtual SbBool | isStereoAbsoluteAdjustments () const |
Queries if the stereo adjustments are absolute. | |
virtual void | setStereoOffset (float offset)=0 |
Sets the stereo offset (the distance of each eye from the camera position). | |
virtual float | getStereoOffset ()=0 |
Queries the stereo offset. | |
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 value is defined as a fraction of the camera near distance. | |
virtual float | getStereoBalance ()=0 |
Queries the stereo balance (the position of the zero parallax plane). | |
virtual SbBool | isStereoBalanceNearFrac ()=0 |
Returns TRUE when the stereo balance adjustement is defined as a fraction of the camera near distance. | |
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 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 SoGLContext * | getViewerContext ()=0 |
Returns the current SoGLContext to render to. | |
virtual SoSceneManager * | getViewerSceneManager ()=0 |
Returns the current SoSceneManager to render to. | |
Pure virtual class for stereo support.
This pure virtual class is the class that should be extended by viewer classes that will do stereo rendering.
Note: because of internal dependant calls between stereo classes and Open Inventor viewer classes, SoStereoViewer and SoBaseStereo (and inheriting classes) cannot be used without using SoWinViewer/SoXtViewer/SoQtViewer inheriting classes.
SoWinViewer, SoXtViewer, SoQtViewer
Definition at line 55 of file SoStereoViewer.h.
|
inlinevirtual |
Destructor.
Definition at line 63 of file SoStereoViewer.h.
|
pure virtual |
This method is called automatically when the viewer requests that its SoBaseStereo object perform stereo rendering.
actualRendering() may then be called twice (once for each eye view) and therefore must not take into account any stereo-specific settings. It should behave as if it were a rendering method for a monoscopic view.
Implemented in SoQtViewer, SoWinViewer, and SoXtViewer.
|
pure virtual |
Returns the position of the OpenGL drawing window in absolute screen coordinates (not relative to parent window) of the native window system (typically Y increasing downward).
Returns "Bottom" in the first value of the vector and "Right" in the second value (reverse of the usual X,Y ordering).
Implemented in SoQtViewer, SoWinViewer, and SoXtViewer.
|
pure virtual |
Returns the size of the OpenGL drawing window in absolute screen coordinates (not relative to parent window) of the native window system.
Implemented in SoQtViewer, SoWinViewer, and SoXtViewer.
|
pure virtual |
Queries the stereo balance (the position of the zero parallax plane).
Implemented in SoQtViewer, SoWinViewer, and SoXtViewer.
|
pure virtual |
Queries the stereo offset.
Implemented in SoQtViewer, SoWinViewer, and SoXtViewer.
|
pure virtual |
Returns the stereo view type.
Implemented in SoQtViewer, SoWinViewer, and SoXtViewer.
|
pure virtual |
Returns the position of the OpenGL drawing window in absolute screen coordinates (not relative to parent window) of the native window system (typically Y increasing downward).
Returns "Top" in the first value of the vector and "Left" in the second value (reverse of the usual X,Y ordering).
Implemented in SoQtViewer, SoWinViewer, and SoXtViewer.
|
pure virtual |
Returning the camera allows the SoBaseStereo to manipulate it to achieve the stereo effect.
Implemented in SoQtViewer, SoWinViewer, and SoXtViewer.
|
pure virtual |
Returns the current SoGLContext to render to.
Must return a valid SoGLContext instance.
|
pure virtual |
Returns the current SoSceneManager to render to.
Must return a valid SoSceneManager instance.
|
pure virtual |
Returns viewport region with origin (lower-left corner) and size, given as pixel coordinates.
Implemented in SoQtViewer, SoWinViewer, and SoXtViewer.
|
inlinevirtual |
Queries if the stereo adjustments are absolute.
Not virtual pure for compatibity reasons.
Reimplemented in SoQtViewer, SoWinViewer, and SoXtViewer.
Definition at line 189 of file SoStereoViewer.h.
|
pure virtual |
Queries stereo activation.
Implemented in SoQtViewer, SoWinViewer, and SoXtViewer.
|
pure virtual |
Returns TRUE when the stereo balance adjustement is defined as a fraction of the camera near distance.
Implemented in SoQtViewer, SoWinViewer, and SoXtViewer.
|
pure virtual |
Queries reversal of the left and right views.
Implemented in SoQtViewer, SoWinViewer, and SoXtViewer.
|
pure virtual |
Queries if viewer is double buffered.
Implemented in SoQtViewer, SoWinViewer, and SoXtViewer.
|
pure virtual |
Sets reversal of the left and right views.
Implemented in SoQtViewer, SoWinViewer, and SoXtViewer.
|
inlinevirtual |
Specifies if stereo adjustments are absolute.
FALSE by default.
The default non-absolute mode allows the stereo settings to be valid over a range of different view volume settings. If you chose absolute mode, you are responsible for modifying the stereo settings (if necessary) when the view volume changes.
When absolute mode is TRUE, stereo offset and balance are used as follows for the right eye view:
The left eye view is symmetric.
When absolute mode is FALSE, stereo offset and balance are used as follows for the right eye view:
Xrange is right minus left (i.e., first two arguments of glFrustum) and multiply that difference by the ratio of the distance to the desired plane of zero parallax to the near clipping plane distance.
The left eye view is symmetric.
Not virtual pure for compatiblity reasons.
Reimplemented in SoQtViewer, SoWinViewer, and SoXtViewer.
Definition at line 182 of file SoStereoViewer.h.
|
pure virtual |
Sets stereo activation.
Default is FALSE. The default can be set using the OIV_STEREO_ACTIVE environment variable.
Implemented in SoQtViewer, SoWinViewer, and SoXtViewer.
|
pure virtual |
Sets the stereo balance (the position of the zero parallax plane) and specifies whether the balance value is defined as a fraction of the camera near distance.
Note: Since the projection matrix always depends on the camera's near plane, in some cases it may be necessary to detect changes to the camera near plane and adjust by setting a new stereo balance value. Open Inventor will make these adjustments automatically if the nearFrac parameter is set to TRUE.
In this case the stereo balance value is defined as a fraction of the camera near distance.
Default balance is 1.0. The default can be set using the OIV_STEREO_BALANCE environment variable. Default nearFrac is FALSE. The default can be set using the OIV_STEREO_BALANCE_NEAR_FRAC environment variable.
Implemented in SoXtViewer, SoQtViewer, and SoWinViewer.
|
pure virtual |
Sets the stereo offset (the distance of each eye from the camera position).
The right eye is moved plus offset and the left eye is moved minus offset. Default is 0.7. The default can be set using OIV_STEREO_OFFSET environment variable.
Implemented in SoQtViewer, SoWinViewer, and SoXtViewer.
|
pure virtual |
If stereoViewType is NULL, the stereo is inactivated (see setStereoActive).
Default is SoAnaglyphStereo with RED_CYAN color filter. The default can be set using the OIV_STEREO_TYPE environment variable.
Implemented in SoQtViewer, SoWinViewer, and SoXtViewer.
|
pure virtual |
Sets viewport region with given origin (lower-left corner) and size, given as pixel coordinates.
Implemented in SoQtViewer, SoWinViewer, and SoXtViewer.