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 : 6 6 2008 00029 *============================================================================== 00030 * 00031 * Description : Element that stores a mesh. 00032 * 00033 *============================================================================*/ 00034 00035 #ifndef _MO_MESH_ELEMENT_ 00036 #define _MO_MESH_ELEMENT_ 00037 00038 #include <Inventor/elements/SoReplacedElement.h> 00039 #include <MeshVizXLM/mapping/MoMeshVizDataMapping.h> 00040 00041 class MiVolumeMeshUnstructured; 00042 class MiMesh; 00043 class MoMeshRepresentation; 00044 00055 class MESHVIZXLM_DMAP_API MoMeshElement : public SoReplacedElement { 00056 00057 SO_ELEMENT_HEADER(MoMeshElement); 00058 00059 public: 00061 static void set(SoState *state, SoNode *node, MeshType meshType, const MiMesh *mesh , MoMeshRepresentation* meshRepresentation, size_t nodeTimeStamp); 00062 00064 static const MiMesh *getMesh(SoState *state, MeshType &meshType, size_t& meshTimeStamp); 00065 00067 static MoMeshRepresentation *getConnectedRepresentation(SoState *state, MeshType &meshType); 00068 00072 virtual void print(FILE *fp) const; 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 // Initializes the class 00091 static void initClass(); 00092 static void exitClass() ; 00093 00094 size_t getTimeStamp() const; 00095 00096 private: 00097 const MiMesh *m_mesh; 00098 MeshType m_meshType; 00099 size_t m_nodeTimeStamp; 00100 MoMeshRepresentation *m_connectFrom; 00101 00102 virtual ~MoMeshElement(); 00103 00104 }; 00105 /*----------------------------------------------------------------------------*/ 00106 00107 #endif // _MO_MESH_ELEMENT_ 00108 00109 00110