52 #ifndef OPENMESH_SUBDIVIDER_UNIFORM_COMPOSITELOOPT_HH
53 #define OPENMESH_SUBDIVIDER_UNIFORM_COMPOSITELOOPT_HH
58 #include "Composite/CompositeT.hh"
59 #include "Composite/CompositeTraits.hh"
65 namespace Subdivider {
73 template <
class MeshType,
class RealType=
float>
88 const char *
name()
const {
return "Uniform Composite Loop"; }
96 Inherited::EVc(coeffs_);
98 Inherited::EVc(coeffs_);
103 typedef typename Inherited::Coeff Coeff;
111 EVCoeff() : Coeff() { init(50); }
113 void init(
size_t _max_valence)
115 weights_.resize(_max_valence);
116 std::generate(weights_.begin(),
120 double operator()(
size_t _valence) {
return weights_[_valence]; }
127 double operator()(
void)
132 double f1 = 1.5 + cos(2.0*M_PI/val_++);
133 return 0.5 * f1 * f1 - 1.0;
139 std::vector<double> weights_;
149 #endif // OPENMESH_SUBDIVIDER_UNIFORM_COMPOSITELOOPT_HH defined
This class provides the composite subdivision rules for the uniform case.
Definition: CompositeT.hh:87
Contains all the mesh ingredients like the polygonal mesh, the triangle mesh, different mesh kernels ...
Definition: MeshItems.hh:56
Helper struct.
Definition: CompositeLoopT.hh:109
void apply_rules(void)
Assemble here the rule sequence, by calling the constructor of the wanted rules.
Definition: CompositeLoopT.hh:92
Definition: CompositeLoopT.hh:123
const char * name() const
Return name of subdivision algorithm.
Definition: CompositeLoopT.hh:88
Uniform composite Loop subdivision algorithm.
Definition: CompositeLoopT.hh:74