Open Inventor Release 2024.2.1
 
Loading...
Searching...
No Matches
SoAnaglyphStereo Class Reference

VSG extension Class for anaglyph stereo support. More...

#include <Inventor/components/stereo/SoAnaglyphStereo.h>

+ Inheritance diagram for SoAnaglyphStereo:

Public Types

enum  ColorFilter {
  RED_CYAN ,
  GREEN_MAGENTA ,
  BLUE_YELLOW
}
 Color Filter. More...
 
- Public Types inherited from SoBaseStereo
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

 SoAnaglyphStereo (SoStereoViewer *stereoVwr=NULL, SoGuiViewer *guiViewer=NULL)
 Constructor.
 
 ~SoAnaglyphStereo ()
 Destructor.
 
StereoViewType getStereoViewType ()
 Always returns SoBaseStereo::ANAGLYPH_STEREO.
 
void setColorFilter (ColorFilter filter)
 Sets the filter type.
 
ColorFilter getColorFilter ()
 Queries the filter type.
 
- Public Member Functions inherited from SoBaseStereo
 SoBaseStereo (SoStereoViewer *stereoViewer=NULL, SoGuiViewer *guiViewer=NULL)
 Constructor.
 
virtual ~SoBaseStereo ()
 Destructor.
 
void setStereoViewer (SoStereoViewer *viewer=NULL)
 Sets the stereo viewer.
 
SoStereoViewergetStereoViewer ()
 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 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.
 

Detailed Description

VSG extension Class for anaglyph stereo support.

This type is similar to the raw stereo type (SoRawStereo). But it adds a color filter for each view rendered. The default is Red/Cyan. There are three kinds of filters (ColorFilter). You can reverse the left and rights views, making three new kinds of filters (CYAN_RED, etc.). The Alpha channel is used in both views.

SEE ALSO

SoStereoViewer, SoBaseStereo, SoWinViewer SoXtViewer

Definition at line 51 of file SoAnaglyphStereo.h.

Member Enumeration Documentation

◆ ColorFilter

Color Filter.

There is 3 types of filters. Note that you can reverse the view, making 3 new types of filters (CYAN_RED,etc.). Note also that this types are able to deal with two-colors glasses (rather than 3 colors) : RED_CYAN is also adpated for red/green glasses, and so on. Note that the Alpha channel is kept in both views.

Enumerator
RED_CYAN 

Default value.

GREEN_MAGENTA 
BLUE_YELLOW 

Definition at line 62 of file SoAnaglyphStereo.h.

Constructor & Destructor Documentation

◆ SoAnaglyphStereo()

SoAnaglyphStereo::SoAnaglyphStereo ( SoStereoViewer stereoVwr = NULL,
SoGuiViewer guiViewer = NULL 
)
inline

Constructor.

Definition at line 73 of file SoAnaglyphStereo.h.

◆ ~SoAnaglyphStereo()

SoAnaglyphStereo::~SoAnaglyphStereo ( )
inline

Destructor.

Definition at line 82 of file SoAnaglyphStereo.h.

Member Function Documentation

◆ getColorFilter()

ColorFilter SoAnaglyphStereo::getColorFilter ( )
inline

Queries the filter type.

Definition at line 97 of file SoAnaglyphStereo.h.

◆ getStereoViewType()

StereoViewType SoAnaglyphStereo::getStereoViewType ( )
inlinevirtual

Always returns SoBaseStereo::ANAGLYPH_STEREO.

Implements SoBaseStereo.

Definition at line 87 of file SoAnaglyphStereo.h.

◆ setColorFilter()

void SoAnaglyphStereo::setColorFilter ( ColorFilter  filter)
inline

Sets the filter type.

Definition at line 92 of file SoAnaglyphStereo.h.


The documentation for this class was generated from the following file: