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 ** Author : VSG (MMM YYYY) 00022 **=======================================================================*/ 00023 #ifndef _SO_VERTEX_FLAG_ELEMENT 00024 #define _SO_VERTEX_FLAG_ELEMENT 00025 00026 #include <Inventor/fields/SoMFInt32.h> 00027 #include <Inventor/elements/SoReplacedElement.h> 00028 00040 SoEXTENDER_Documented class SoVertexFlagElement : public SoReplacedElement { 00041 00042 SO_ELEMENT_HEADER(SoVertexFlagElement); 00043 00044 public: 00048 static void reInit(SoState *, SoNode *); 00052 static void setMarked(SoState *state, SoNode *node, 00053 int32_t numFlags, const int32_t *flags); 00054 00058 static void setUnmarked(SoState *state, SoNode *node, 00059 int32_t numFlags, const int32_t *flags); 00060 00064 static int getDefault() {return -1;} 00065 00069 static const SoVertexFlagElement * getInstance(SoState *state) 00070 {return getConstElement<SoVertexFlagElement>(state);} 00071 00075 int32_t getNumMarked() const { return numMarked; } 00079 int32_t getNumUnmarked() const { return numUnmarked; } 00080 00086 const int32_t * getMarked() const { return marked; } 00092 const int32_t * getUnmarked() const { return unmarked; } 00093 00097 virtual void print(FILE *fp) const; 00098 00099 private: 00100 00102 virtual void init(SoState *state); 00103 00104 private: 00105 // Initializes the SoVertexFlagElement class 00106 static void initClass(); 00107 static void exitClass(); 00108 00109 private: 00110 int32_t numMarked, numUnmarked; 00111 const int32_t * marked; 00112 const int32_t * unmarked; 00113 00114 static int32_t markedDefault[1] ; 00115 static int32_t unmarkedDefault[1] ; 00116 00117 virtual ~SoVertexFlagElement(); 00118 00119 private: 00120 void _init(); 00121 }; 00122 00123 #endif /* _SO_VERTEX_FLAG_ELEMENT */ 00124 00125 00126