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-2021 BY FEI S.A.S, *** 00017 *** BORDEAUX, FRANCE *** 00018 *** ALL RIGHTS RESERVED *** 00019 **=======================================================================*/ 00020 00021 #ifndef _SO_RENDER_AREA_CORE_ 00022 #define _SO_RENDER_AREA_CORE_ 00023 00024 #include <Inventor/misc/SoRefCounter.h> 00025 #include <Inventor/SbLinear.h> 00026 #include <Inventor/actions/SoGLRenderAction.h> 00027 #include <Inventor/SbPImpl.h> 00028 #include <Inventor/nodes/SoInteractiveComplexity.h> 00029 #include <Inventor/ViewerComponents/SiRenderAreaAntialiasing.h> 00030 #include <Inventor/ViewerComponents/SiRenderAreaTransparency.h> 00031 #include <Inventor/ViewerComponents/SiRenderAreaStereo.h> 00032 #include <Inventor/ViewerComponents/SiRenderAreaInteractive.h> 00033 #include <Inventor/ViewerComponents/SiRenderArea.h> 00034 #include <Inventor/ViewerComponents/SiRenderAreaStillSuperSampling.h> 00035 00036 class SoGLContext; 00037 class SoSceneManager; 00038 class SoEvent; 00039 class SoStereoParameters; 00040 00041 SO_PIMPL_BASE_PUBLIC_DECLARATION(SoRenderAreaCore); 00042 00064 class SoRenderAreaCore : public SoRefCounter, public SiRenderAreaAntialiasing, public SiRenderAreaTransparency, 00065 public SiRenderAreaStereo, public SiRenderAreaInteractive, public SiRenderArea, 00066 public SiRenderAreaStillSuperSampling 00067 { 00068 00069 SO_PIMPL_BASE_PUBLIC_HEADER(SoRenderAreaCore); 00070 00071 public: 00072 00076 SoRenderAreaCore(SoGLContext* glContext); 00077 00083 virtual void setSceneGraph(SoNode *newScene); 00084 00089 virtual SoNode* getSceneGraph() const; 00090 00095 virtual SbBool processEvent(const SoEvent *event); 00096 00101 virtual SbBool processEvents(const std::vector<const SoEvent*>& eventList); 00102 00109 virtual RenderStatus render(); 00110 00115 virtual void setSize(const SbVec2i32& size); 00116 00120 virtual SbVec2i32 getSize() const; 00121 00131 virtual void setTransparencyType( SoGLRenderAction::TransparencyType type ); 00132 00136 virtual SoGLRenderAction::TransparencyType getTransparencyType() const; 00137 00138 SoSceneManager* getSceneManager() const; 00139 00144 virtual void setInteractiveMode(SoInteractiveComplexity::InteractiveMode mode); 00145 00149 virtual SoInteractiveComplexity::InteractiveMode getInteractiveMode() const; 00150 00163 virtual void setStereoParameters(SoStereoParameters* parameters); 00164 00168 virtual SoStereoParameters* getStereoParameters() const; 00169 00183 virtual void activateStereo(bool activate); 00184 00188 virtual bool isStereoActivated() const; 00189 00194 virtual void setAntialiasingMode(SoSceneManager::AntialiasingMode mode); 00195 00199 virtual SoSceneManager::AntialiasingMode getAntialiasingMode() const; 00200 00206 virtual void setAntialiasingQuality(float quality); 00207 00211 virtual float getAntialiasingQuality() const; 00212 00220 virtual void setClearPolicy(ClearPolicy policy); 00221 00225 virtual ClearPolicy getClearPolicy() const; 00226 00235 virtual void setClearColor(const SbColorRGBA& color); 00236 00240 virtual SbColorRGBA getClearColor() const; 00241 00248 virtual void setClearDepth(float depth); 00249 00253 virtual float getClearDepth() const; 00254 00258 virtual SbEventHandler<RenderEventArg&>& onStartRender(); 00259 00267 virtual void setStillSuperSamplingQuality(float quality); 00268 00272 virtual float getStillSuperSamplingQuality() const; 00273 00281 virtual void setStillSuperSamplingDelay(unsigned int delay); 00282 00286 virtual unsigned int getStillSuperSamplingDelay() const; 00287 00288 private: 00289 00293 void invalidateGLContext(); 00294 00298 SoGLContext* getGLContext() const; 00299 00300 private: 00301 00307 SoRenderAreaCore(); 00308 00312 virtual ~SoRenderAreaCore(); 00313 00314 }; 00315 00316 #endif // _SO_RENDER_AREA_CORE_ 00317 00318 00319