Class for stereo management. More...
#include <Inventor/components/stereo/SoBaseStereo.h>
Public Types | |
enum | StereoViewType { NO_STEREO_VIEW = 0 , INTERLACED_STEREO = 1 , HALF_SCREEN_STEREO = 2 , RAW_STEREO = 3 , OPENGL_STEREO = 3 , ANAGLYPH_STEREO = 4 , ANAGLYPH = 4 , PASSIVE_STEREO = 6 } |
Stereo view types. More... | |
Public Member Functions | |
SoBaseStereo (SoStereoViewer *stereoViewer=NULL, SoGuiViewer *guiViewer=NULL) | |
Constructor. | |
virtual | ~SoBaseStereo () |
Destructor. | |
void | setStereoViewer (SoStereoViewer *viewer=NULL) |
Sets the stereo viewer. | |
SoStereoViewer * | getStereoViewer () |
Queries the stereo viewer. | |
virtual void | reverseStereoView (SbBool reverse) |
Sets stereo reversal. | |
virtual SbBool | isStereoViewReversed () const |
Queries stereo reversal. | |
virtual void | renderStereoView () |
Renders the stereo view. | |
virtual StereoViewType | getStereoViewType ()=0 |
Queries the stereo view type. | |
virtual SbBool | canClearBeforeRender () const |
Queries ability to clear before rendering. | |
virtual SbBool | requireHardware () |
Returns true or false depending on the type of stereo buffering. | |
virtual void | clearStereo () |
A stereo view type may need to restore a state when it is no longer used by a stereo viewer. | |
void | setStereoElement (SoSceneManager *, SoCamera::StereoMode stereoMode) |
Apply stereo parameters to the passed SoSceneManager. | |
This class defines a strategy of stereo management. Using a subclass of SoBaseStereo allows an SoWinViewer object to use a stereoscopic rendering mode.
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.
SoStereoViewer, SoWinViewer, SoXtViewer, SoQtViewer
Definition at line 60 of file SoBaseStereo.h.
Stereo view types.
Definition at line 65 of file SoBaseStereo.h.
SoBaseStereo::SoBaseStereo | ( | SoStereoViewer * | stereoViewer = NULL , |
SoGuiViewer * | guiViewer = NULL |
||
) |
Constructor.
|
virtual |
Destructor.
The destructor calls clearStereo().
|
virtual |
Queries ability to clear before rendering.
This allows a subclass to forbid the color buffer from being cleared before any rendering. Typically, this takes place after rendering the first view. Then, if canClearBeforeRender() returns FALSE, the color buffer can keep previous modifications, such as for the stencil buffer, etc.
|
virtual |
A stereo view type may need to restore a state when it is no longer used by a stereo viewer.
|
inline |
Queries the stereo viewer.
Definition at line 119 of file SoBaseStereo.h.
|
pure virtual |
Queries the stereo view type.
Implemented in SoAnaglyphStereo, SoHalfScreenStereo, SoInterlacedStereo, SoNoStereoView, SoPassiveStereo, and SoRawStereo.
|
virtual |
Queries stereo reversal.
|
virtual |
Renders the stereo view.
You can use the SoNoStereoView subclass to render the view without any stereo effect.
Reimplemented in SoHalfScreenStereo, SoNoStereoView, and SoPassiveStereo.
|
inlinevirtual |
Returns true or false depending on the type of stereo buffering.
Reimplemented in SoRawStereo.
Definition at line 155 of file SoBaseStereo.h.
|
virtual |
Sets stereo reversal.
The left view becomes the right view, and the right view becomes the left view.
void SoBaseStereo::setStereoElement | ( | SoSceneManager * | , |
SoCamera::StereoMode | stereoMode | ||
) |
Apply stereo parameters to the passed SoSceneManager.
|
inline |
Sets the stereo viewer.
Definition at line 113 of file SoBaseStereo.h.