54#ifndef OPENMESH_SUBDIVIDER_UNIFORM_COMPOSITELOOPT_HH
55#define OPENMESH_SUBDIVIDER_UNIFORM_COMPOSITELOOPT_HH
75template <
class MeshType,
class RealType =
double>
76class CompositeLoopT :
public CompositeT<MeshType, RealType>
80 typedef CompositeT<MeshType, RealType> Inherited;
84 CompositeLoopT() : Inherited() {};
85 explicit CompositeLoopT(MeshType& _mesh) : Inherited(_mesh) {};
90 const char *
name()
const override {
return "Uniform Composite Loop"; }
105 typedef typename Inherited::Coeff Coeff;
111 struct EVCoeff :
public Coeff
113 EVCoeff() : Coeff() { init(50); }
115 void init(
size_t _max_valence)
117 weights_.resize(_max_valence);
118 std::generate(weights_.begin(),
122 double operator()(
size_t _valence)
override {
return weights_[_valence]; }
125 struct compute_weight
127 compute_weight() : val_(0) { }
129 double operator()(
void)
134 double f1 = 1.5 + cos(2.0*M_PI/val_++);
135 return 0.5 * f1 * f1 - 1.0;
141 std::vector<double> weights_;
Contains all the mesh ingredients like the polygonal mesh, the triangle mesh, different mesh kernels ...
Definition MeshItems.hh:59
Software related to uniform subdivision of meshes.
void apply_rules(void) override
Assemble here the rule sequence, by calling the constructor of the wanted rules.
Definition CompositeLoopT.hh:94
const char * name() const override
Return name of subdivision algorithm.
Definition CompositeLoopT.hh:90
Definition CompositeLoopT.hh:126
Mesh traits for uniform composite subdivision.