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 : Martial Bonaventure (Nov 2010) 00022 **=======================================================================*/ 00023 00024 00025 #ifndef _MO_FACEDETAIL_ 00026 #define _MO_FACEDETAIL_ 00027 00028 #include <Inventor/details/SoFaceDetail.h> 00029 #include <Inventor/STL/vector> 00030 #include <MeshVizXLM/MbVec3.h> 00031 #include <MeshVizXLM/mapping/MoMeshVizDataMapping.h> 00032 00033 #include <MeshVizXLM/mapping/details/MoMeshDetail.h> 00034 #include <MeshVizXLM/mapping/details/MoSurfaceMeshDetail.h> 00035 00036 class MeXTopologyI; 00037 00039 // 00040 // Class: MoFaceDetail 00041 // 00042 // Detail information about vertex-based shapes made of faces. It 00043 // adds indices of various items that vary among faces, vertices and input cell 00044 // 00045 // 00047 00073 class MESHIVIZDM_API MoFaceDetail : public SoFaceDetail { 00074 00075 SO_DETAIL_HEADER(MoFaceDetail); 00076 00077 public: 00081 MoFaceDetail(); 00085 virtual ~MoFaceDetail(); 00086 00091 double getValue(const SbVec3f& point) const; 00092 00097 std::vector<double> getValues(const SbVec3f& point) const; 00098 00103 const MoMeshDetail* getMeshDetail() const { return &m_meshDetail; } 00104 00110 const MoSurfaceMeshDetail* getMeshRepresentationDetail() const { return m_repDetail; } 00111 00112 // Returns an instance that is a copy of this instance. The caller 00113 // is responsible for deleting the copy when done. 00114 virtual MoFaceDetail * copy() const; 00115 00116 private: 00117 // Copies the given details. Optional table to mapp the facet indices to 00118 // the extracted surfaceCell which is mandatory when the extracted mesh contains deadcells 00119 MoFaceDetail(const SoFaceDetail* faceDetail, const MoSurfaceMeshDetail* surfMeshDetail, const std::vector<size_t>* facetMapping = NULL); 00120 // Copy constructor 00121 MoFaceDetail(const MoFaceDetail& faceDetail); 00122 // Assignment operator 00123 MoFaceDetail& operator=(const MoFaceDetail& faceDetail); 00124 00125 private: 00126 static void initClass(); 00127 static void exitClass(); 00128 00129 private: 00130 MoMeshDetail m_meshDetail; 00131 MoSurfaceMeshDetail* m_repDetail; 00132 00133 size_t getExtractedCellIndex() const { return m_extractedCellIndex; } 00134 00135 private: 00136 size_t m_extractedCellIndex; 00137 00138 }; 00139 00140 #endif /* _MO_FACEDETAIL_ */ 00141 00142