52 #ifndef OPENMESH_SUBDIVIDER_UNIFORM_COMPOSITESQRT3T_HH
53 #define OPENMESH_SUBDIVIDER_UNIFORM_COMPOSITESQRT3T_HH
58 #include "Composite/CompositeT.hh"
59 #include "Composite/CompositeTraits.hh"
65 namespace Subdivider {
73 template <
typename MeshType,
typename RealType=
float>
88 const char *
name()
const {
return "Uniform Composite Sqrt3"; }
97 Inherited::FVc(coeffs_);
102 typedef typename Inherited::Coeff Coeff;
109 FVCoeff() : Coeff() { init(50); }
111 void init(
size_t _max_valence)
113 weights_.resize(_max_valence);
114 std::generate(weights_.begin(),
118 double operator()(
size_t _valence) {
return weights_[_valence]; }
126 double operator()(
void)
128 return 2.0/3.0 * (cos(2.0*M_PI/val_++)+1.0);
133 std::vector<double> weights_;
145 #endif // OPENMESH_SUBDIVIDER_UNIFORM_COMPOSITESQRT3T_HH defined
This class provides the composite subdivision rules for the uniform case.
Definition: CompositeT.hh:87
void apply_rules(void)
Assemble here the rule sequence, by calling the constructor of the wanted rules.
Definition: CompositeSqrt3T.hh:92
const char * name() const
Return name of subdivision algorithm.
Definition: CompositeSqrt3T.hh:88
Uniform composite sqrt(3) subdivision algorithm.
Definition: CompositeSqrt3T.hh:74
Helper class.
Definition: CompositeSqrt3T.hh:107
Contains all the mesh ingredients like the polygonal mesh, the triangle mesh, different mesh kernels ...
Definition: MeshItems.hh:56
Definition: CompositeSqrt3T.hh:122