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 *** MERIGNAC, FRANCE *** 00018 *** ALL RIGHTS RESERVED *** 00019 **=======================================================================*/ 00020 /*======================================================================= 00021 ** Author : Martial Bonaventure (Mar 2010) 00022 **=======================================================================*/ 00023 00024 #ifndef _MySurfaceMeshUnstructured_H 00025 #define _MySurfaceMeshUnstructured_H 00026 00052 #include <MeshVizXLM/mesh/cell/MiSurfaceCell.h> 00056 class MySurfaceCell : public MiSurfaceCell 00057 { 00058 public: 00062 size_t getNumNodes() const 00063 { 00064 // @ADD YOUR CODE HERE. 00065 } 00066 00071 size_t getNodeIndex(size_t node) const 00072 { 00073 // @ADD YOUR CODE HERE. 00074 } 00075 00083 double getRelativeSize(const MiGeometryI* meshGeometry) const 00084 { 00085 // @ADD YOUR CODE HERE (Optional). 00086 // Used only by MoMeshCellShape to display node names if using the relative offset feature and 00087 // MoMeshStreamline/MiStreamlineExtractUnstructured to adapt the step integration to the size of the cell. 00088 // 00089 // Must not return 0. For instance, use provided MxXXXXCellExtract::getLongestEdgeLength(). 00090 // Remove this method if not needed or to use the default implementation that returns 1. 00091 } 00092 00104 bool isPointInsideCell(const MiGeometryI& meshGeometry, 00105 const MbVec3d& point, 00106 std::vector<double>& weights) const 00107 { 00108 // @ADD YOUR CODE HERE (Optional). 00109 // Implementation provided for common surface cells (see MxXXXXCellExtract::isPointInsideCell()) 00110 // Requested by MoPointProbe/MiPointProbeUnstructured, 00111 // MoMeshStreamline/MiStreamlineExtractUnstrctured, 00112 // Remove this method otherwise. 00113 // 00114 // It is not nessessary to resize the weight vector array since 00115 // extraction classes are optimized such as weight vectors passed to this method are 00116 // already allocated and large enough to retrieve all the computed weights. 00117 } 00118 00119 }; 00120 00121 #include <MeshVizXLM/mesh/topology/MiSurfaceTopologyExplicitI.h> 00125 class MySurfaceTopologyExplicitI : public MiSurfaceTopologyExplicitI 00126 { 00127 public: 00131 size_t getNumCells() const 00132 { 00133 // @ADD YOUR CODE HERE. 00134 } 00135 00141 bool hasDeadCells() const 00142 { 00143 // @ADD YOUR CODE HERE (Optional). 00144 // Required only if the topology has dead cells, remove this method otherwise to use 00145 // the default implementation that always returns false. 00146 } 00147 00153 bool isDead(size_t i) const 00154 { 00155 // @ADD YOUR CODE HERE (Optional). 00156 // Required only if the topology has dead cells, remove this method otherwise to use 00157 // the default implementation that always returns false. 00158 } 00159 00164 const MiSurfaceCell* getCell(size_t id) const 00165 { 00166 // @ADD YOUR CODE HERE. 00167 // For instance, can return an instance of MySurfaceCell. 00168 } 00169 00176 size_t getEndNodeId() const 00177 { 00178 // @ADD YOUR CODE HERE. 00179 } 00180 00187 size_t getBeginNodeId() const 00188 { 00189 // @ADD YOUR CODE HERE (Optional). 00190 // Remove this method to use the default implementation that returns 0. 00191 } 00192 00196 size_t getTimeStamp() const 00197 { 00198 // @ADD YOUR CODE HERE (see MxTimeStamp). 00199 // When the content of the topology changes, the time stamp must also change. 00200 // The time stamp allows MeshViz to be aware of any change to this topology. 00201 } 00202 00203 }; 00204 00205 #include <MeshVizXLM/mesh/geometry/MiGeometryI.h> 00209 class MyGeometryI : public MiGeometryI //, public YourGeometry 00210 // Advised to inherit from the class containing your application geometry. 00211 { 00212 public: 00216 MbVec3d getCoord(size_t i) const 00217 { 00218 // @ADD YOUR CODE HERE. 00219 } 00220 00224 size_t getTimeStamp() const 00225 { 00226 // @ADD YOUR CODE HERE (see MxTimeStamp). 00227 // When the content of the geometry changes, the time stamp must also change. 00228 // The time stamp allows MeshViz to be aware of any change to this geometry. 00229 } 00230 }; 00231 00232 #include <MeshVizXLM/mesh/MiSurfaceMeshUnstructured.h> 00236 class MySurfaceMeshUnstructured : public MiSurfaceMeshUnstructured 00237 { 00238 00239 public: 00243 const MiGeometryI& getGeometry() const 00244 { 00245 return m_geometry; 00246 } 00247 00251 const MiSurfaceTopologyExplicitI& getTopology() const 00252 { 00253 return m_topology; 00254 } 00255 00256 00257 private: 00258 MyGeometryI m_geometry; 00259 MySurfaceTopologyExplicitI m_topology; 00260 00261 }; 00262 00263 #include <MeshVizXLM/mesh/data/MiDataSetI.h> 00267 class MyScalarSetI : public MiScalardSetI //, public YourData 00268 // Advised to inherit from the class containing your application data. 00269 { 00270 public: 00271 00275 double get(size_t i) const 00276 { 00277 // @ADD YOUR CODE HERE. 00278 } 00279 00283 size_t getTimeStamp() const 00284 { 00285 // @ADD YOUR CODE HERE (see MxTimeStamp). 00286 // When the content of the scalar set changes, the time stamp must also change. 00287 // The time stamp allows MeshViz to be aware of any change to this scalar set. 00288 } 00289 00293 std::string getName() const 00294 { 00295 // @ADD YOUR CODE HERE. 00296 } 00297 00301 DataBinding getBinding() const 00302 { 00303 // @ADD YOUR CODE HERE (see MiDataSet::DataBinding). 00304 } 00305 00306 }; 00307 00308 #include <MeshVizXLM/mesh/data/MiDataSetI.h> 00312 class MyVectorSetI : public MiVec3dSetI //, public YourData 00313 // Advised to inherit from the class containing your application data. 00314 { 00315 public: 00316 00320 MbVec3d get(size_t i) const 00321 { 00322 // @ADD YOUR CODE HERE. 00323 } 00324 00328 size_t getTimeStamp() const 00329 { 00330 // @ADD YOUR CODE HERE (see MxTimeStamp). 00331 // When the content of the vector set changes, the time stamp must also change. 00332 // The time stamp allows MeshViz to be aware of any change to this vector set. 00333 } 00334 00338 std::string getName() const 00339 { 00340 // @ADD YOUR CODE HERE. 00341 } 00342 00346 DataBinding getBinding() const 00347 { 00348 // @ADD YOUR CODE HERE (see MiDataSet::DataBinding). 00349 } 00350 00351 }; 00352 00353 00354 #endif 00355 00356 00357 00358 00359 00360 00361 00362