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-2017 BY FEI S.A.S, *** 00017 *** BORDEAUX, FRANCE *** 00018 *** ALL RIGHTS RESERVED *** 00019 **=======================================================================*/ 00020 /*======================================================================= 00021 ** Author : VSG (MMM YYYY) 00022 ** Modified by : M. Bonaventure (Mar 2010) 00023 **=======================================================================*/ 00024 /*============================================================================== 00025 * File : MoMeshElement.h 00026 * Classes : MoMeshElement 00027 * Author(s) : Pascal Doux 00028 * Date : 16 2 2009 00029 *============================================================================== 00030 * 00031 * Description : Element that stores a Tessellator. 00032 * 00033 *============================================================================*/ 00034 00035 #ifndef _MoTessellatorElement_ 00036 #define _MoTessellatorElement_ 00037 00038 #include <Inventor/elements/SoReplacedElement.h> 00039 #include <MeshVizXLM/mapping/MoMeshVizDataMapping.h> 00040 00041 class MiTessellator; 00042 00053 class MESHVIZXLM_DMAP_API MoTessellatorElement : public SoReplacedElement 00054 { 00055 00056 SO_ELEMENT_HEADER(MoTessellatorElement); 00057 00058 public: 00059 00061 static void set(SoState *state, SoNode *node, MiTessellator *tess , size_t nodeTimeStamp); 00062 00064 static MiTessellator *getTessellator(SoState *state, size_t& eltTimeStamp); 00065 00069 virtual void print(FILE *fp) const; 00070 00071 private: 00072 00074 virtual void init(SoState *state); 00075 00079 virtual SbBool matches(const SoElement* elt) const; 00080 00084 virtual SoElement* copyMatchInfo() const; 00085 00086 private: 00087 // Initializes the class 00088 static void initClass(); 00089 static void exitClass() ; 00090 00094 size_t getTimeStamp() const; 00095 00096 private: 00097 MiTessellator *m_tessellator; 00098 size_t m_tessTimeStamp; 00099 size_t m_nodeTimeStamp; 00100 00101 virtual ~MoTessellatorElement(); 00102 00103 }; 00104 /*----------------------------------------------------------------------------*/ 00105 00106 #endif // _MoTessellatorElement_ 00107 00108 00109