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 ** Created by : VSG (Feb 2012) 00022 **=======================================================================*/ 00023 00024 00025 #ifndef _SO_BBOX_CACHE_ELEMENT 00026 #define _SO_BBOX_CACHE_ELEMENT 00027 00028 #include <Inventor/elements/SoSubElement.h> 00029 #include <Inventor/threads/SbThreadMutex.h> 00030 00031 SoBBoxCacheElement : public SoElement 00032 { 00033 SO_ELEMENT_HEADER(SoBBoxCacheElement); 00034 00035 public: 00036 00039 enum CacheMode 00040 { 00041 DONT_CACHE = 0, 00042 DO_CACHE = 1 00043 }; 00044 00048 static void set(SoState* state, CacheMode cacheMode); 00049 00053 static CacheMode get(SoState* state); 00054 00058 virtual void print(FILE *fp) const; 00059 00063 virtual void push(SoState *state); 00064 00065 #if 1 SoDEPRECATED 00068 00071 virtual void pop(SoState *state, const SoElement *prevTopElement); 00072 #endif 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 00092 static void initClass(); 00093 00095 static void exitClass(); 00096 00097 private: 00098 00100 virtual ~SoBBoxCacheElement(); 00101 00102 CacheMode m_cacheMode; 00103 00104 }; 00105 00106 #endif // _SO_BBOX_CACHE_ELEMENT 00107 00108 00109