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
const char * name() const
Return name of subdivision algorithm.