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-2018 BY FEI S.A.S, *** 00017 *** MERIGNAC, 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 00088 virtual SoNode* getSceneGraph() const; 00089 00094 virtual SbBool processEvent(const SoEvent *event); 00095 00100 virtual SbBool processEvents(const std::vector<const SoEvent*>& eventList); 00101 00108 virtual RenderStatus render(); 00109 00114 virtual void setSize(const SbVec2i32& size); 00115 00119 virtual SbVec2i32 getSize() const; 00120 00124 virtual SbViewportRegion getViewportRegion() const; 00125 00135 virtual void setTransparencyType( SoGLRenderAction::TransparencyType type ); 00136 00140 virtual SoGLRenderAction::TransparencyType getTransparencyType() const; 00141 00145 SoSceneManager* getSceneManager() const; 00146 00151 virtual void setInteractiveMode(SoInteractiveComplexity::InteractiveMode mode); 00152 00156 virtual SoInteractiveComplexity::InteractiveMode getInteractiveMode() const; 00157 00170 virtual void setStereoParameters(SoStereoParameters* parameters); 00171 00175 virtual SoStereoParameters* getStereoParameters() const; 00176 00190 virtual void activateStereo(bool activate); 00191 00195 virtual bool isStereoActivated() const; 00196 00201 virtual void setAntialiasingMode(SoSceneManager::AntialiasingMode mode); 00202 00206 virtual SoSceneManager::AntialiasingMode getAntialiasingMode() const; 00207 00213 virtual void setAntialiasingQuality(float quality); 00214 00218 virtual float getAntialiasingQuality() const; 00219 00227 virtual void setClearPolicy(ClearPolicy policy); 00228 00232 virtual ClearPolicy getClearPolicy() const; 00233 00242 virtual void setClearColor(const SbColorRGBA& color); 00243 00247 virtual SbColorRGBA getClearColor() const; 00248 00255 virtual void setClearDepth(float depth); 00256 00260 virtual float getClearDepth() const; 00261 00265 virtual SbEventHandler<RenderEventArg&>& onStartRender(); 00266 00274 virtual void setStillSuperSamplingQuality(float quality); 00275 00279 virtual float getStillSuperSamplingQuality() const; 00280 00288 virtual void setStillSuperSamplingDelay(unsigned int delay); 00289 00293 virtual unsigned int getStillSuperSamplingDelay() const; 00294 00295 private: 00296 00300 void invalidateGLContext(); 00301 00305 SoGLContext* getGLContext() const; 00306 00307 private: 00308 00314 SoRenderAreaCore(); 00315 00319 virtual ~SoRenderAreaCore(); 00320 00321 }; 00322 00323 #endif // _SO_RENDER_AREA_CORE_ 00324 00325 00326