54 #define OPENMESH_JACOBI_LAPLACE_SMOOTHERT_C 
   76   if (Base::continuity() > Base::C0)
 
   78     Base::mesh_.add_property(umbrellas_);
 
   79     if (Base::continuity() > Base::C1)
 
   80       Base::mesh_.add_property(squared_umbrellas_);
 
   85   if (Base::continuity() > Base::C0)
 
   87     Base::mesh_.remove_property(umbrellas_);
 
   88     if (Base::continuity() > Base::C1)
 
   89       Base::mesh_.remove_property(squared_umbrellas_);
 
  107   for (v_it=Base::mesh_.vertices_begin(); v_it!=v_end; ++v_it)
 
  109     if (this->is_active(*v_it))
 
  113       for (voh_it = Base::mesh_.cvoh_iter(*v_it); voh_it.is_valid(); ++voh_it) {
 
  114         w = this->weight(Base::mesh_.edge_handle(*voh_it));
 
  115         u += vector_cast<typename Mesh::Normal>(Base::mesh_.point(Base::mesh_.to_vertex_handle(*voh_it))) * w;
 
  117       u *= this->weight(*v_it);
 
  118       u -= vector_cast<typename Mesh::Normal>(Base::mesh_.point(*v_it));
 
  124       p  = vector_cast<typename Mesh::Normal>(Base::mesh_.point(*v_it));
 
  126       this->set_new_position(*v_it, p);
 
  135 template <
class Mesh>
 
  137 JacobiLaplaceSmootherT<Mesh>::
 
  138 compute_new_positions_C1()
 
  140   typename Mesh::VertexIter                                                     v_it, v_end(Base::mesh_.vertices_end());
 
  143   typename Mesh::Scalar                                                         w, diag;
 
  147   for (v_it=Base::mesh_.vertices_begin(); v_it!=v_end; ++v_it)
 
  150     for (voh_it = Base::mesh_.cvoh_iter(*v_it); voh_it.is_valid(); ++voh_it) {
 
  151       w  = this->weight(Base::mesh_.edge_handle(*voh_it));
 
  152       u -= vector_cast<typename Mesh::Normal>(Base::mesh_.point(Base::mesh_.to_vertex_handle(*voh_it)))*w;
 
  154     u *= this->weight(*v_it);
 
  155     u += vector_cast<typename Mesh::Normal>(Base::mesh_.point(*v_it));
 
  157     Base::mesh_.property(umbrellas_, *v_it) = u;
 
  162   for (v_it=Base::mesh_.vertices_begin(); v_it!=v_end; ++v_it)
 
  164     if (this->is_active(*v_it))
 
  168       for (voh_it = Base::mesh_.cvoh_iter(*v_it); voh_it.is_valid(); ++voh_it) {
 
  169         w  = this->weight(Base::mesh_.edge_handle(*voh_it));
 
  170         uu   -= Base::mesh_.property(umbrellas_, Base::mesh_.to_vertex_handle(*voh_it));
 
  171         diag += (w * this->weight(Base::mesh_.to_vertex_handle(*voh_it)) + 
static_cast<typename Mesh::Scalar
>(1.0) ) * w;
 
  173       uu   *= this->weight(*v_it);
 
  174       diag *= this->weight(*v_it);
 
  175       uu   += Base::mesh_.property(umbrellas_, *v_it);
 
  176       if (diag) uu *= 
static_cast<typename Mesh::Scalar
>(1.0) / diag;
 
  182       p  = vector_cast<typename Mesh::Normal>(Base::mesh_.point(*v_it));
 
  184       this->set_new_position(*v_it, p);
 
Contains all the mesh ingredients like the polygonal mesh, the triangle mesh, different mesh kernels ...
Definition: MeshItems.hh:59
 
Kernel::Scalar Scalar
Scalar type.
Definition: PolyMeshT.hh:110
 
Kernel::Normal Normal
Normal type.
Definition: PolyMeshT.hh:114
 
Kernel::ConstVertexOHalfedgeIter ConstVertexOHalfedgeIter
Circulator.
Definition: PolyMeshT.hh:173
 
Kernel::VertexIter VertexIter
Scalar type.
Definition: PolyMeshT.hh:143
 
T::value_type value_type
Type of the scalar value.
Definition: vector_traits.hh:94
 
Laplacian Smoothing.
Definition: JacobiLaplaceSmootherT.hh:76
 
void smooth(unsigned int _n)
Do _n smoothing iterations.
Definition: JacobiLaplaceSmootherT_impl.hh:74
 
virtual void smooth(unsigned int _n)
Do _n smoothing iterations.
Definition: SmootherT_impl.hh:302