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 : VSG (MMM YYYY) 00022 **=======================================================================*/ 00023 00024 #ifndef _PO_MESHLevelSurf_ 00025 #define _PO_MESHLevelSurf_ 00026 00027 #include <MeshViz/3Ddata/PoMesh3D.h> 00028 00029 00030 class PbIndexedMesh3D; 00031 class PbTetrahedronMesh3D; 00032 class PbHexahedronMesh3D; 00033 class PbGrid3D; 00034 00035 class SoMFInt32; 00036 class SbVec3f; 00037 00092 class PoMeshLevelSurf : public PoMesh3D { 00093 00094 SO_KIT_HEADER(PoMeshLevelSurf); 00095 00096 /* Define fields for new parts */ 00097 SO_KIT_CATALOG_ENTRY_HEADER(groupLevelSurf); 00098 00099 public: 00100 00104 PoMeshLevelSurf(); 00105 00109 virtual void rebuild(); 00110 00114 enum SurfOrientation { 00115 ORIENTED_TO_MIN, 00116 ORIENTED_TO_MAX 00117 }; 00118 00119 /* Fields */ 00120 00133 SoSFEnum surfOrientation; 00134 00138 SoSFFloat levelValue; 00139 00145 SoSFInt32 valuesIndexForLevel; 00146 00147 /*----------------------------------------------------------------------------*/ 00148 private: 00149 00150 static void initClass(); 00151 static void exitClass() ; 00152 00153 const float *getIsosurfDataSet(); 00154 float getIsosurfValue() const; 00155 int getSurfOrientation() { return surfOrientation.getValue(); } 00156 00157 private: 00158 00159 // Methods 00160 virtual void setDefaultOnNonWritingFields(); 00161 virtual SbBool setUpConnections(SbBool onOff, SbBool doItAlways = FALSE); 00162 virtual void addElementsAllCaches(); 00163 virtual void preRebuild(); 00164 // Destructor 00165 virtual ~PoMeshLevelSurf(); 00166 00167 virtual int getIsosurfDataSetId() const; 00168 virtual int getIsosurfDataSetIndex() const; 00169 /*----------------------------------------------------------------------------*/ 00170 private: 00171 00172 // Sensors 00173 FieldSensorList m_fieldSensorList; 00174 00175 // List of fields defined in this class 00176 SoFieldList m_fieldList; 00177 00178 uint32_t m_isoDataSetId; // State of the data set used by the last rebuilt 00179 }; 00180 00181 /*----------------------------------------------------------------------------*/ 00182 00183 #endif /* _PO_MESHLEVELSURF_ */ 00184 00185 00186 00187