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 : P. ESTRADE (Nov 1999) 00022 **=======================================================================*/ 00023 00024 #pragma once 00025 00026 #include <Inventor/elements/SoReplacedElement.h> 00027 00039 SoEXTENDER_Documented class SoPatternElement : public SoReplacedElement { 00040 SO_ELEMENT_HEADER( SoPatternElement ); 00041 00042 public: 00043 00047 static void set(SoState* state, SoNode* node, SbString category, SbString name); 00048 00054 static void get(SoState* state, SbString& category, SbString& name, unsigned char*& pattern); 00055 00057 virtual void push(SoState *state); 00058 00063 static void getDefault(SbString& category, SbString& name, unsigned char*& pattern); 00064 00065 private: 00066 00068 virtual void init(SoState* state); 00069 00071 virtual SbBool matches(const SoElement* elt) const; 00072 00074 virtual SoElement* copyMatchInfo() const; 00075 00076 private: 00077 // Initializes the SoPattern class 00078 static void initClass(); 00079 static void exitClass(); 00080 00081 private: 00082 SbString m_category; 00083 SbString m_name; 00084 unsigned char* m_pattern; 00085 00086 virtual void setElt( SbString category, SbString name, unsigned char* pattern ); 00087 00088 virtual ~SoPatternElement() ; 00089 }; 00090