MC_connectivity_index.hpp
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef MC_CONNECTIVITY_INDEX_H_
00020 #define MC_CONNECTIVITY_INDEX_H_
00021
00022 #include <MC_int_vector_vector.hpp>
00023
00024 #include <map>
00025 #include <set>
00026
00027
00028 namespace mesh_conv
00029 {
00030
00031 class MC_int_pair;
00032 class MC_int_pair_less;
00033
00034
00036 class MC_connectivity_index : public MC_int_vector_vector
00037 {
00038 public:
00039
00040
00041
00042
00043
00044
00045
00047 MC_connectivity_index();
00049 MC_connectivity_index(const MC_int_vector& v0);
00051 MC_connectivity_index(const MC_int_vector& v0,const MC_int_vector& v1);
00053 MC_connectivity_index(const MC_int_vector& v0,const MC_int_vector& v1,const MC_int_vector& v2);
00055 MC_connectivity_index(const MC_int_vector& v0,const MC_int_vector& v1,const MC_int_vector& v2,const MC_int_vector& v3);
00057 MC_connectivity_index(const MC_int_vector_vector& v0);
00059 MC_connectivity_index(const MC_connectivity_index& v0);
00060
00061
00062
00063
00064
00065
00066
00067
00068
00070 MC_connectivity_index& build_ring();
00072 const std::map<int,std::set<int> >& ring() const;
00073
00075 MC_connectivity_index& build_star();
00077 const std::map<int,std::set<int> >& star() const;
00078
00080 std::map<int,std::set<int> > polygon_neighbors() const;
00081
00083 MC_connectivity_index& update_neighbors();
00084
00085
00086
00087
00088
00089
00090
00091
00095 std::set<int> used_vertex() const;
00096
00098 bool is_triangle_only() const;
00099
00100
00101
00102
00103
00104
00105
00106
00111 MC_connectivity_index triangulated() const;
00112
00114 MC_connectivity_index fliped_polygon() const;
00115
00116
00117
00118
00119
00120
00121
00123 std::set <MC_int_pair,MC_int_pair_less> boundary() const;
00125 std::set<int> boundary_vertex() const;
00130 std::set<int> boundary_polygon() const;
00131
00132
00133
00134
00135
00136
00137
00138
00140 std::set<MC_int_pair,MC_int_pair_less> edges() const;
00141
00142
00143
00144
00145
00146
00147
00149 MC_int_vector triangle_propagation_using_vertex_field(const MC_int_vector& seed_vertices,const MC_double_vector& field_per_vertex,const double& threshold,const std::set<int>& invalidated_triangle) const;
00150
00151
00152
00153 private:
00154
00156 std::map<int,std::set<int> > ring_1;
00158 std::map<int,std::set<int> > star_1;
00159 };
00160 }
00161
00162 #endif