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_LINEDETAIL_ 00026 #define _MO_LINEDETAIL_ 00027 00028 #include <Inventor/details/SoLineDetail.h> 00029 #include <MeshVizXLM/MbVec3.h> 00030 #include <MeshVizXLM/mapping/MoMeshVizDataMapping.h> 00031 00032 #include <MeshVizXLM/mapping/details/MoMeshDetail.h> 00033 #include <MeshVizXLM/mapping/details/MoLineMeshDetail.h> 00034 00035 class MeXTopologyI; 00036 00038 // 00039 // Class: MoLineDetail 00040 // 00041 // Detail information about vertex-based shapes made of line 00042 // segments. It adds indices of various items that vary among lines, vertices 00043 // and cell id 00044 // 00045 // 00047 00074 class MESHIVIZDM_API MoLineDetail : public SoLineDetail { 00075 00076 SO_DETAIL_HEADER(MoLineDetail); 00077 00078 public: 00082 MoLineDetail(); 00086 virtual ~MoLineDetail(); 00087 00092 double getValue(const SbVec3f& point) const; 00093 00098 std::vector<double> getValues(const SbVec3f& point) const; 00099 00104 const MoMeshDetail* getMeshDetail() const { return &m_meshDetail; } 00105 00110 const MoLineMeshDetail* 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 MoLineDetail * copy() const; 00115 00116 private: 00117 // Copies the given details 00118 MoLineDetail(const SoLineDetail* lineDetail, const MoLineMeshDetail* lineMeshDetail, const std::vector<size_t>* lineMapping = NULL); 00119 // Copy constructore 00120 MoLineDetail(const MoLineDetail& lineDetail); 00121 // Assignment operator 00122 MoLineDetail& operator=(const MoLineDetail& lineDetail); 00123 00124 private: 00125 static void initClass(); 00126 static void exitClass(); 00127 00128 private: 00129 MoMeshDetail m_meshDetail; 00130 MoLineMeshDetail* m_repDetail; 00131 00132 size_t getExtractedCellIndex() const { return m_extractedCellIndex; } 00133 00134 private: 00135 size_t m_extractedCellIndex; 00136 00137 }; 00138 00139 #endif /* _MO_LINEDETAIL_ */ 00140 00141