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 #ifndef SO_UPDATE_AREA_ELEMENT 00022 #define SO_UPDATE_AREA_ELEMENT 00023 00024 #include <Inventor/SbLinear.h> 00025 #include <Inventor/elements/SoSubElement.h> 00026 00051 class SoUpdateAreaElement : public SoElement 00052 { 00053 00054 SO_ELEMENT_HEADER( SoUpdateAreaElement ); 00055 00056 public: 00060 static void set( SoState* state, const SbVec2f& origin, const SbVec2f& size ); 00061 00066 static bool get( SoState* state, SbVec2f& origin, SbVec2f& size ); 00067 00071 static SbVec2f getDefaultOrigin() { return SbVec2f( 0.0f, 0.0f ); } 00072 00076 static SbVec2f getDefaultSize() { return SbVec2f( 0.0f, 0.0f ); } 00077 00081 virtual void push( SoState* state ); 00082 00086 virtual void print( FILE* fp ) const; 00087 00088 private: 00089 static void initClass(); 00090 static void exitClass(); 00091 00092 private: 00093 00095 virtual void init( SoState* state ); 00096 00100 virtual SbBool matches( const SoElement* elt ) const; 00101 00105 virtual SoElement* copyMatchInfo() const; 00106 00110 virtual void setElt( SoState* state, const SbVec2f& origin, const SbVec2f& size ); 00111 00112 SbVec2f m_origin; 00113 SbVec2f m_size; 00114 00115 virtual ~SoUpdateAreaElement(); 00116 }; 00117 00118 #endif /* SO_UPDATE_AREA_ELEMENT */ 00119