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-2017 BY FEI S.A.S, *** 00017 *** BORDEAUX, FRANCE *** 00018 *** ALL RIGHTS RESERVED *** 00019 **=======================================================================*/ 00020 /*======================================================================= 00021 ** Author : David Beilloin (May 2011) 00022 **=======================================================================*/ 00023 #ifndef _SO_VIEWPORT_H_ 00024 #define _SO_VIEWPORT_H_ 00025 00026 #include <Inventor/nodes/SoNode.h> 00027 #include <Inventor/elements/SoViewportRegionElement.h> 00028 00029 #include <Inventor/fields/SoSFVec2f.h> 00030 00031 00032 class SoGLRenderAction; 00033 class SoCallbackAction; 00034 class SoPickAction; 00035 class SoGetBoundingBoxAction; 00036 class SoGetMatrixAction; 00037 class SoHandleEventAction; 00038 00039 00040 //@TOBEWRAPPED 00102 class SoViewport : public SoNode 00103 { 00104 SO_NODE_HEADER(SoViewport); 00105 00106 public: 00107 00113 SoSFVec2f origin; 00114 00120 SoSFVec2f size; 00121 00123 SoViewport(); 00124 00125 private: 00126 00128 virtual void doAction(SoAction *action); 00129 00131 virtual void pick(SoPickAction *action); 00132 00134 virtual void callback(SoCallbackAction* action); 00135 00137 virtual void GLRender(SoGLRenderAction * action); 00138 00140 virtual void getBoundingBox(SoGetBoundingBoxAction* action); 00141 00143 virtual void getMatrix(SoGetMatrixAction* action); 00144 00146 virtual void handleEvent(SoHandleEventAction* action); 00147 00148 private: 00150 static void initClass(); 00151 00153 static void exitClass(); 00154 00159 SbVec2i32 windowSize; 00160 00161 private: 00163 virtual ~SoViewport(); 00164 }; 00165 00166 #endif /* _SO_VIEWPORT_H_ */ 00167 00168 00169