45#include <OpenMesh/Core/Mesh/PolyConnectivity.hh>
52template<
class MeshT >
55 typedef typename MeshT::Point Point;
56 typedef typename MeshT::Scalar Scalar;
76 void fill_hole(
typename MeshT::EdgeHandle _eh,
int _stages = 3 );
81 void fairing( std::vector< OpenMesh::SmartFaceHandle >& _faceHandles );
84 void removeDegeneratedFaces( std::vector< typename MeshT::FaceHandle >& _faceHandles );
92 Weight() : angle_( 180 ), area_( FLT_MAX ) {}
93 Weight( Scalar _angle, Scalar _area ) : angle_( _angle ), area_( _area ) {}
96 Scalar
angle()
const {
return angle_; }
97 Scalar area()
const {
return area_; }
99 Weight operator+(
const Weight & _other )
const {
100 return Weight( std::max(
angle(), _other.angle() ),
101 area() + _other.area() );
104 bool operator<(
const Weight & _rhs )
const {
105 return (
angle() < _rhs.angle() ||
106 (
angle() == _rhs.angle() && area() < _rhs.area() ) );
115 bool refine(
typename MeshT::FaceHandle _fh );
121 bool in_circumsphere(
const Point & _x,
124 const Point & _c )
const;
127 bool fill(
int _i,
int _j );
130 Weight weight(
int _i,
int _j,
int _k );
136 Scalar area(
typename MeshT::VertexHandle _a,
typename MeshT::VertexHandle _b,
typename MeshT::VertexHandle _c );
140 Scalar dihedral_angle(
typename MeshT::VertexHandle _u,
typename MeshT::VertexHandle _v,
typename MeshT::VertexHandle _a,
typename MeshT::VertexHandle _b );
163 typedef std::vector< typename MeshT::VertexHandle > VHVec;
164 typedef typename std::vector< typename MeshT::VertexHandle >::iterator VHVecIter;
165 typedef typename std::vector< typename MeshT::VertexHandle >::const_iterator CVHVecIter;
167 typedef std::vector< typename MeshT::FaceHandle > FHVec;
168 typedef typename std::vector< typename MeshT::FaceHandle >::iterator FHVecIter;
169 typedef typename std::vector< typename MeshT::FaceHandle >::const_iterator CFHVecIter;
173 std::vector< OpenMesh::SmartVertexHandle > boundary_vertex_;
176 VHVec opposite_vertex_;
179 std::vector< OpenMesh::SmartEdgeHandle > hole_edge_;
182 std::vector< OpenMesh::SmartFaceHandle > hole_triangle_;
194 std::vector< std::vector< Weight > > w_;
195 std::vector< std::vector< int > > l_;
203 #include "HoleFillerT_impl.hh"
Contains all the mesh ingredients like the polygonal mesh, the triangle mesh, different mesh kernels ...
Definition: MeshItems.hh:59
T angle(T _cos_angle, T _sin_angle)
returns the angle determined by its cos and the sign of its sin result is positive if the angle is in...
Definition: MathDefs.hh:140
Smart version of VertexHandle contains a pointer to the corresponding mesh and allows easier access t...
Definition: SmartHandles.hh:110
Definition: SmartHandles.hh:197
Definition: HoleFillerT.hh:54
void fill_hole(typename MeshT::EdgeHandle _eh, int _stages=3)
Fill a hole which is identified by one of its boundary edges.
Definition: HoleFillerT_impl.hh:137
void fill_all_holes(int _stages=3)
Identify and fill all holes of the mesh.
Definition: HoleFillerT_impl.hh:91