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-2014 BY FEI S.A.S, *** 00017 *** BORDEAUX, FRANCE *** 00018 *** ALL RIGHTS RESERVED *** 00019 **=======================================================================*/ 00020 /*======================================================================= 00021 ** Author : Nicolas DAGUISE (Nov 2007) 00022 **=======================================================================*/ 00023 00024 00025 #ifndef SO_MODIFY_LOGICAL_VIEWPORT_ELEMENT_H 00026 #define SO_MODIFY_LOGICAL_VIEWPORT_ELEMENT_H 00027 00028 #include <Inventor/SbViewportRegion.h> 00029 #include <Inventor/elements/SoSubElement.h> 00030 00041 SoEXTENDER_Documented class SoModifyLogicalViewportElement : public SoElement { 00042 00043 SO_ELEMENT_HEADER(SoModifyLogicalViewportElement); 00044 00045 public: 00049 static void set(SoState *state, const SbVec4f& portion); 00050 00054 static const SbVec4f &get(SoState *state); 00055 00059 static SbVec4f getDefault() 00060 { return SbVec4f( 0.0f, 0.0f, 1.0f, 1.0f ); } 00061 00067 static SoModifyLogicalViewportElement *getInstance(const SoState *state, SbBool &elemIsSet); 00068 00072 virtual void print(FILE *fp) const; 00073 00074 private: 00075 00077 virtual void init(SoState *state); 00078 00082 virtual SbBool matches(const SoElement* elt) const; 00083 00087 virtual SoElement* copyMatchInfo() const; 00088 00089 private: 00090 // Initializes the SoModifyLogicalViewportElement class 00091 static void initClass(); 00092 static void exitClass(); 00093 00094 private: 00095 00096 virtual ~SoModifyLogicalViewportElement(); 00097 00098 private: 00099 SbVec4f m_portion; 00100 SbBool m_isSet; 00101 00102 }; 00103 #endif // SO_MODIFY_LOGICAL_VIEWPORT_ELEMENT_H 00104 00105 00106