MeshKit  1.0
MeshOp.hpp
Go to the documentation of this file.
00001 #ifndef MESHKIT_MESHOP_HPP
00002 #define MESHKIT_MESHOP_HPP
00003 
00004 #include "meshkit/Types.hpp"
00005 #include "meshkit/MKCore.hpp"
00006 #include "meshkit/GraphNode.hpp"
00007 #include "moab/Types.hpp"
00008 #include <vector>
00009 
00010 namespace MeshKit {
00011 
00012 class ModelEnt;
00013 
00021 class MeshOp : public GraphNode
00022 {
00023 public:
00024 
00026   MeshOp(const MeshOp &mesh_op);
00027   
00029   MeshOp(MKCore *mkcore, const MEntVector &me_vec = MEntVector());
00030 
00032   virtual ~MeshOp();
00033   
00039   virtual bool add_modelent(ModelEnt *model_ent);
00040 
00045   virtual bool remove_modelent(ModelEnt *model_ent);
00046 
00048   virtual MEntSelection &me_selection();
00049 
00051   virtual const MEntSelection &me_selection() const;
00052 
00054   MKCore *mk_core() const;
00055   
00059   virtual const moab::EntityType* mesh_types_arr() const = 0;
00060 
00064   void mesh_types(std::vector<moab::EntityType> &mesh_types);
00065   
00071   void setup_boundary();
00072 
00077   static bool canmesh_vertex(ModelEnt *model_ent);
00078   
00083   static bool canmesh_edge(ModelEnt *model_ent);
00084   
00089   static bool canmesh_face(ModelEnt *model_ent);
00090   
00095   static bool canmesh_region(ModelEnt *model_ent);
00096 
00101   void create_model_ents_from_previous_ops();
00102 
00103 protected:
00105   MEntSelection mentSelection;
00106   
00107 private:
00108 
00109 };
00110 
00111 inline const MEntSelection &MeshOp::me_selection() const
00112 {
00113   return mentSelection;
00114 }
00115 
00116 inline MEntSelection &MeshOp::me_selection() 
00117 {
00118   return mentSelection;
00119 }
00120 
00121 inline MKCore *MeshOp::mk_core() const
00122 {
00123   return dynamic_cast<MKCore*>(mkGraph);
00124 }
00125 
00126 } // namespace MeshKit
00127 
00128 #endif
00129 
00130   
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines