54#ifndef OPENMESH_SMOOTHER_SMOOTHERT_HH
55#define OPENMESH_SMOOTHER_SMOOTHERT_HH
60#include <OpenMesh/Core/System/config.hh>
61#include <OpenMesh/Core/Utils/Property.hh>
62#include <OpenMesh/Core/Utils/Noncopyable.hh>
80 typedef typename Mesh::Scalar Scalar;
106 virtual ~SmootherT();
123 virtual void smooth(
unsigned int _n);
184 void set_active_vertices();
187 void compute_new_positions();
188 void project_to_tangent_plane();
189 void local_error_check();
197 virtual void compute_new_positions_C0() = 0;
198 virtual void compute_new_positions_C1() = 0;
207 {
return mesh_.property(original_positions_, _vh); }
210 {
return mesh_.property(original_normals_, _vh); }
212 const Point& new_position(VertexHandle _vh)
const
213 {
return mesh_.property(new_positions_, _vh); }
215 void set_new_position(VertexHandle _vh,
const Point& _p)
216 { mesh_.property(new_positions_, _vh) = _p; }
218 bool is_active(VertexHandle _vh)
const
219 {
return mesh_.property(is_active_, _vh); }
221 Component component()
const {
return component_; }
222 Continuity continuity()
const {
return continuity_; }
233 Scalar normal_deviation_;
235 Continuity continuity_;
248#if defined(OM_INCLUDE_TEMPLATES) && !defined(OPENMESH_SMOOTHERT_C)
249#define OPENMESH_SMOOTHERT_TEMPLATES
Contains all the mesh ingredients like the polygonal mesh, the triangle mesh, different mesh kernels ...
Definition: MeshItems.hh:59
Handle for a vertex entity.
Definition: Handles.hh:121
Polygonal mesh based on the ArrayKernel.
Definition: PolyMesh_ArrayKernelT.hh:96
Kernel::VertexHandle VertexHandle
Handle for referencing the corresponding item.
Definition: PolyMeshT.hh:136
Kernel::EdgeHandle EdgeHandle
Scalar type.
Definition: PolyMeshT.hh:138
Kernel::Normal Normal
Normal type.
Definition: PolyMeshT.hh:114
Kernel::Point Point
Coordinate type.
Definition: PolyMeshT.hh:112
This class demonstrates the non copyable idiom.
Definition: Noncopyable.hh:72
Base class for smoothing algorithms.
Definition: SmootherT.hh:77
virtual void smooth(unsigned int _n)
Do _n smoothing iterations.
Definition: SmootherT_impl.hh:302
Component
Definition: SmootherT.hh:87
@ Tangential_and_Normal
Smooth tangential and normal direction.
Definition: SmootherT.hh:90
@ Tangential
Smooth tangential direction.
Definition: SmootherT.hh:88
@ Normal
Smooth normal direction.
Definition: SmootherT.hh:89
void initialize(Component _comp, Continuity _cont)
Initialize smoother.
Definition: SmootherT_impl.hh:122
void set_absolute_local_error(Scalar _err)
Set local error as an absolute value.
Definition: SmootherT_impl.hh:278
void disable_local_error_check()
Disable error control of the smoother.
Definition: SmootherT_impl.hh:290
void set_relative_local_error(Scalar _err)
Set local error relative to bounding box.
Definition: SmootherT_impl.hh:248
SmootherT(Mesh &_mesh)
constructor & destructor
Definition: SmootherT_impl.hh:73
void skip_features(bool _state)
enable or disable feature handling
Definition: SmootherT.hh:167