52 #ifndef OPENMESH_SMOOTHER_SMOOTHERT_HH
53 #define OPENMESH_SMOOTHER_SMOOTHERT_HH
58 #include <OpenMesh/Core/System/config.hh>
59 #include <OpenMesh/Core/Utils/Property.hh>
60 #include <OpenMesh/Core/Utils/Noncopyable.hh>
78 typedef typename Mesh::Scalar Scalar;
79 typedef typename Mesh::Point Point;
82 typedef typename Mesh::EdgeHandle EdgeHandle;
131 virtual void smooth(
unsigned int _n);
142 void compute_new_positions();
143 void project_to_tangent_plane();
144 void local_error_check();
152 virtual void compute_new_positions_C0() = 0;
153 virtual void compute_new_positions_C1() = 0;
162 {
return mesh_.property(original_positions_, _vh); }
165 {
return mesh_.property(original_normals_, _vh); }
167 const Point& new_position(VertexHandle _vh)
const
168 {
return mesh_.property(new_positions_, _vh); }
170 void set_new_position(VertexHandle _vh,
const Point& _p)
171 { mesh_.property(new_positions_, _vh) = _p; }
173 bool is_active(VertexHandle _vh)
const
174 {
return mesh_.property(is_active_, _vh); }
176 Component component()
const {
return component_; }
177 Continuity continuity()
const {
return continuity_; }
188 Scalar normal_deviation_;
190 Continuity continuity_;
203 #if defined(OM_INCLUDE_TEMPLATES) && !defined(OPENMESH_SMOOTHERT_C)
204 #define OPENMESH_SMOOTHERT_TEMPLATES
208 #endif // OPENMESH_SMOOTHER_SMOOTHERT_HH defined
void set_relative_local_error(Scalar _err)
Set local error.
Definition: SmootherT.cc:246
SmootherT(Mesh &_mesh)
constructor & destructor
Definition: SmootherT.cc:71
Kernel::Normal Normal
Normal type.
Definition: PolyMeshT.hh:110
void set_active_vertices()
Find active vertices. Resets tagged status !
Definition: SmootherT.cc:150
virtual void smooth(unsigned int _n)
Do _n smoothing iterations.
Definition: SmootherT.cc:300
Component
Definition: SmootherT.hh:85
Smooth tangential direction.
Definition: SmootherT.hh:86
Smooth tangential and normal direction.
Definition: SmootherT.hh:88
void set_absolute_local_error(Scalar _err)
Set local error.
Definition: SmootherT.cc:276
Kernel::VertexHandle VertexHandle
Handle for referencing the corresponding item.
Definition: PolyMeshT.hh:132
void skip_features(bool _state)
enable or disable feature handling
Definition: SmootherT.hh:128
Base class for smoothing algorithms.
Definition: SmootherT.hh:74
void initialize(Component _comp, Continuity _cont)
Initialize smoother.
Definition: SmootherT.cc:120
Smooth normal direction.
Definition: SmootherT.hh:87
Handle for a vertex entity.
Definition: Handles.hh:114
Polygonal mesh based on the ArrayKernel.
Definition: PolyMesh_ArrayKernelT.hh:91
This class demonstrates the non copyable idiom.
Definition: Noncopyable.hh:69
void disable_local_error_check()
Set local error.
Definition: SmootherT.cc:288