59#ifndef OPENMESH_SUBDIVIDER_UNIFORM_COMPOSITELOOPT_HH
60#define OPENMESH_SUBDIVIDER_UNIFORM_COMPOSITELOOPT_HH
80template <
class MeshType,
class RealType=
float>
81class CompositeLoopT :
public CompositeT<MeshType, RealType>
85 typedef CompositeT<MeshType, RealType> Inherited;
89 CompositeLoopT() : Inherited() {};
90 CompositeLoopT(MeshType& _mesh) : Inherited(_mesh) {};
95 const char *
name()
const {
return "Uniform Composite Loop"; }
110 typedef typename Inherited::Coeff Coeff;
116 struct EVCoeff :
public Coeff
118 EVCoeff() : Coeff() { init(50); }
120 void init(
size_t _max_valence)
122 weights_.resize(_max_valence);
123 std::generate(weights_.begin(),
127 double operator()(
size_t _valence) {
return weights_[_valence]; }
130 struct compute_weight
132 compute_weight() : val_(0) { }
134 double operator()(
void)
139 double f1 = 1.5 + cos(2.0*M_PI/val_++);
140 return 0.5 * f1 * f1 - 1.0;
146 std::vector<double> weights_;
Contains all the mesh ingredients like the polygonal mesh, the triangle mesh, different mesh kernels ...
Definition MeshItems.hh:64
Software related to uniform subdivision of meshes.
const char * name() const
Return name of subdivision algorithm.
Definition CompositeLoopT.hh:95
void apply_rules(void)
Assemble here the rule sequence, by calling the constructor of the wanted rules.
Definition CompositeLoopT.hh:99
Definition CompositeLoopT.hh:131
Mesh traits for uniform composite subdivision.