33 #ifndef __H__UG_quadrialteral_util_impl
34 #define __H__UG_quadrialteral_util_impl
37 #include "boost/iterator/transform_iterator.hpp"
44 template <
class face_iter_t,
class TAAPos>
47 face_iter_t facesBegin,
51 std::vector<Edge*> edges;
84 template <
class edge_iter_t,
class TAAPos>
87 edge_iter_t edgesBegin,
91 using namespace detail::quadUtil;
95 std::multiset<EdgeToQuadInfo> ms;
97 for(edge_iter_t eiter = edgesBegin; eiter != edgesEnd; ++eiter){
100 if( faces.
size() == 2
101 && faces[0]->num_vertices() == 3
102 && faces[1]->num_vertices() == 3)
111 ms.insert(EdgeToQuadInfo(e,
FaceQuality(&fd, aaPos)));
116 typedef boost::transform_iterator<
118 std::multiset<EdgeToQuadInfo>::iterator>
123 trans_iter_t(ms.begin()),
124 trans_iter_t(ms.end()));
128 template <
class face_iter_t>
131 face_iter_t facesBegin,
132 face_iter_t facesEnd)
134 std::vector<Edge*> edges;
147 template <
class edge_iter_t>
150 edge_iter_t edgesBegin,
151 edge_iter_t edgesEnd)
154 for(edge_iter_t eiter = edgesBegin; eiter != edgesEnd;)
159 if(faces.
size() == 2) {
Base-class for edges.
Definition: grid_base_objects.h:397
Can be queried for the edges and vertices of a face.
Definition: grid_base_objects.h:684
void set_vertex(uint index, Vertex *vrt)
Definition: grid_base_objects.h:706
Manages the elements of a grid and their interconnection.
Definition: grid.h:132
geometry_traits< TGeomObj >::iterator begin()
Definition: grid_impl.hpp:164
void associated_elements(traits< Vertex >::secure_container &elemsOut, TElem *e)
Puts all elements of type TAss which are contained in 'e' or which contain 'e' into elemsOut.
Definition: grid_impl.hpp:466
Container which holds an array of pointers.
Definition: pointer_const_array.h:84
size_t size() const
returns the size of the associated array.
Definition: pointer_const_array_impl.hpp:106
Instances of this class or of derived classes are thrown if errors arise.
Definition: error.h:104
void GetInnerEdgesOfFaceSoup(std::vector< Edge * > &edgesOut, Grid &g, face_iter_t facesBegin, face_iter_t facesEnd)
Definition: edge_util_impl.hpp:47
number FaceQuality(FaceVertices *f, Grid::VertexAttachmentAccessor< APosition > aaPos)
a simple measure for the quality of a face
Definition: face_util.cpp:203
int GetConnectedVertexIndex(Face *f, const EdgeDescriptor &ed)
returns the index of the first vertex that is contained in the specified face and is not contained in...
Definition: vertex_util.cpp:101
Vertex * GetConnectedVertex(Edge *e, Vertex *v)
returns the vertex that is connected to v via e.
Definition: vertex_util.cpp:78
double number
Definition: types.h:124
void ReplaceByQuadrilaterals_EdgeBased(Grid &g, edge_iter_t edgesBegin, edge_iter_t edgesEnd, TAAPos aaPos)
Attempts to replace triangles associated with the given set of edges by a set of quadrilaterals.
Definition: quadrialteral_util_impl.h:85
void ReplaceByQuadrilaterals_FaceBasedNoSort(Grid &g, face_iter_t facesBegin, face_iter_t facesEnd)
Attempts to replace the given set of faces by a set of quadrilaterals.
Definition: quadrialteral_util_impl.h:129
Quadrilateral * ReplaceByQuadrilateral(Grid &g, Face *tri1, Face *tri2)
Replaces the specified triangles by one quadrilateral.
Definition: quadrilateral_util.cpp:69
void ReplaceByQuadrilaterals_EdgeBasedNoSort(Grid &g, edge_iter_t edgesBegin, edge_iter_t edgesEnd)
Attempts to replace triangles associated with the given set of edges by a set of quadrilaterals.
Definition: quadrialteral_util_impl.h:148
void ReplaceByQuadrilaterals_FaceBased(Grid &g, face_iter_t facesBegin, face_iter_t facesEnd, TAAPos aaPos)
Attempts to replace the given set of triangles by a set of quadrilaterals.
Definition: quadrialteral_util_impl.h:45
Definition: quadrialteral_util_impl.h:66
Edge * result_type
Definition: quadrialteral_util_impl.h:68
Edge * e
Definition: quadrialteral_util_impl.h:72
number quality
Definition: quadrialteral_util_impl.h:73
bool operator<(const EdgeToQuadInfo &other) const
Definition: quadrialteral_util_impl.h:75
Edge * operator()(const EdgeToQuadInfo &v) const
Definition: quadrialteral_util_impl.h:78
EdgeToQuadInfo()
Definition: quadrialteral_util_impl.h:67
EdgeToQuadInfo(Edge *_e, number _q)
Definition: quadrialteral_util_impl.h:68