00001 /*======================================================================= 00002 *** THE CONTENT OF THIS WORK IS PROPRIETARY TO FEI S.A.S, (FEI S.A.S.), *** 00003 *** AND IS DISTRIBUTED UNDER A LICENSE AGREEMENT. *** 00004 *** *** 00005 *** REPRODUCTION, DISCLOSURE, OR USE, IN WHOLE OR IN PART, OTHER THAN AS *** 00006 *** SPECIFIED IN THE LICENSE ARE NOT TO BE UNDERTAKEN EXCEPT WITH PRIOR *** 00007 *** WRITTEN AUTHORIZATION OF FEI S.A.S. *** 00008 *** *** 00009 *** RESTRICTED RIGHTS LEGEND *** 00010 *** USE, DUPLICATION, OR DISCLOSURE BY THE GOVERNMENT OF THE CONTENT OF THIS *** 00011 *** WORK OR RELATED DOCUMENTATION IS SUBJECT TO RESTRICTIONS AS SET FORTH IN *** 00012 *** SUBPARAGRAPH (C)(1) OF THE COMMERCIAL COMPUTER SOFTWARE RESTRICTED RIGHT *** 00013 *** CLAUSE AT FAR 52.227-19 OR SUBPARAGRAPH (C)(1)(II) OF THE RIGHTS IN *** 00014 *** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 52.227-7013. *** 00015 *** *** 00016 *** COPYRIGHT (C) 1996-2020 BY FEI S.A.S, *** 00017 *** BORDEAUX, FRANCE *** 00018 *** ALL RIGHTS RESERVED *** 00019 **=======================================================================*/ 00020 /*======================================================================= 00021 ** Author : VSG (MMM YYYY) 00022 **=======================================================================*/ 00023 00024 #ifndef _SO_WIN_STEREOVIEW_TYPE 00025 #define _SO_WIN_STEREOVIEW_TYPE 00026 00027 #include <Inventor/Gui/SoGui.h> 00028 #include <Inventor/sys/port.h> 00029 #include <Inventor/SbBasic.h> 00030 #include <Inventor/nodes/SoCamera.h> 00031 00032 class SoStereoViewer; 00033 class SoSceneManager; 00034 00059 class SoBaseStereo { 00060 00061 public: 00063 enum StereoViewType { 00067 NO_STEREO_VIEW = 0, 00071 INTERLACED_STEREO = 1, 00075 HALF_SCREEN_STEREO = 2, 00079 RAW_STEREO = 3, 00081 OPENGL_STEREO = 3, 00085 ANAGLYPH_STEREO = 4, 00087 ANAGLYPH = 4, 00088 #ifndef HIDDEN_FROM_DOC 00089 00092 SSDI_STEREO = 5, 00093 #endif 00094 00095 PASSIVE_STEREO = 6 00096 }; 00097 00101 SoBaseStereo(SoStereoViewer *stereoViewer = NULL); 00102 00106 virtual ~SoBaseStereo(); 00107 00111 void setStereoViewer(SoStereoViewer *viewer = NULL) { stereoViewer = viewer; } 00112 00117 SoStereoViewer *getStereoViewer() { return stereoViewer; } 00118 00123 virtual void reverseStereoView(SbBool reverse) = 0; 00127 virtual SbBool isStereoViewReversed() = 0; 00128 00133 virtual void renderStereoView() = 0; 00134 00135 00139 virtual StereoViewType getStereoViewType() = 0; 00140 00148 virtual SbBool canClearBeforeRender() = 0; 00149 00153 virtual SbBool requireHardware() = 0; 00154 00159 virtual void clearStereo(); 00160 00162 void setStereoElement( SoSceneManager*, SoCamera::StereoMode stereoMode ); 00163 00164 private: 00174 virtual SbBool isMPStereoViewTypeSupported(); 00175 00176 /* 00177 * methods use in MP mode only. These methods are called by the threads within the 00178 * render area if the stereo is active. 00179 */ 00180 virtual void doLeftEyeSettings() = 0; 00181 virtual void doRightEyeSettings() = 0; 00182 virtual void doMonoscopicSettings() = 0; 00183 00187 void setRenderFastEditNodes(SbBool render); 00188 00189 private: 00190 00191 // Render stereo test pattern for specified eye. 00192 virtual void renderTestPattern( SbBool leftEye ); 00193 00194 SoStereoViewer *stereoViewer; 00195 SbBool renderFastEdit; 00196 00197 }; 00198 00199 #endif // _SO_WIN_STEREOVIEW_TYPE 00200 00201