54 #ifndef OPENMESH_SUBDIVIDER_UNIFORM_COMPOSITESQRT3T_HH
55 #define OPENMESH_SUBDIVIDER_UNIFORM_COMPOSITESQRT3T_HH
60 #include "Composite/CompositeT.hh"
61 #include "Composite/CompositeTraits.hh"
67 namespace Subdivider {
75 template <
typename MeshType,
typename RealType =
double>
90 const char *
name()
const override {
return "Uniform Composite Sqrt3"; }
99 Inherited::FVc(coeffs_);
104 typedef typename Inherited::Coeff Coeff;
113 void init(
size_t _max_valence)
115 weights_.resize(_max_valence);
116 std::generate(weights_.begin(),
120 double operator()(
size_t _valence)
override {
return weights_[_valence]; }
128 double operator()(
void)
130 return 2.0/3.0 * (cos(2.0*M_PI/val_++)+1.0);
135 std::vector<double> weights_;
Contains all the mesh ingredients like the polygonal mesh, the triangle mesh, different mesh kernels ...
Definition: MeshItems.hh:59
This class provides the composite subdivision rules for the uniform case.
Definition: CompositeT.hh:90
Abstract base class for coefficient functions.
Definition: CompositeT.hh:158
Uniform composite sqrt(3) subdivision algorithm.
Definition: CompositeSqrt3T.hh:77
const char * name() const override
Return name of subdivision algorithm.
Definition: CompositeSqrt3T.hh:90
void apply_rules(void) override
Assemble here the rule sequence, by calling the constructor of the wanted rules.
Definition: CompositeSqrt3T.hh:94
Helper class.
Definition: CompositeSqrt3T.hh:110
Definition: CompositeSqrt3T.hh:125