59 #ifndef OPENMESH_SUBDIVIDER_UNIFORM_COMPOSITELOOPT_HH
60 #define OPENMESH_SUBDIVIDER_UNIFORM_COMPOSITELOOPT_HH
65 #include "Composite/CompositeT.hh"
66 #include "Composite/CompositeTraits.hh"
72 namespace Subdivider {
80 template <
class MeshType,
class RealType=
float>
95 const char *
name()
const {
return "Uniform Composite Loop"; }
103 Inherited::EVc(coeffs_);
105 Inherited::EVc(coeffs_);
110 typedef typename Inherited::Coeff 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]; }
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_;
156 #endif // OPENMESH_SUBDIVIDER_UNIFORM_COMPOSITELOOPT_HH defined
void apply_rules(void)
Assemble here the rule sequence, by calling the constructor of the wanted rules.
Definition: CompositeLoopT.hh:99
Uniform composite Loop subdivision algorithm.
Definition: CompositeLoopT.hh:81
This class provides the composite subdivision rules for the uniform case.
Definition: CompositeT.hh:94
Contains all the mesh ingredients like the polygonal mesh, the triangle mesh, different mesh kernels ...
Definition: MeshItems.hh:64
Definition: CompositeLoopT.hh:130
Helper struct.
Definition: CompositeLoopT.hh:116
const char * name() const
Return name of subdivision algorithm.
Definition: CompositeLoopT.hh:95