54#ifndef OPENMESH_SUBDIVIDER_UNIFORM_COMPOSITESQRT3T_HH
55#define OPENMESH_SUBDIVIDER_UNIFORM_COMPOSITESQRT3T_HH
75template <
typename MeshType,
typename RealType =
double>
76class CompositeSqrt3T :
public CompositeT<MeshType, RealType>
80 typedef CompositeT<MeshType, RealType> Inherited;
84 CompositeSqrt3T() : Inherited() {};
85 explicit CompositeSqrt3T(MeshType& _mesh) : Inherited(_mesh) {};
90 const char *
name()
const override {
return "Uniform Composite Sqrt3"; }
104 typedef typename Inherited::Coeff Coeff;
109 struct FVCoeff :
public Coeff
111 FVCoeff() : 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)
override {
return weights_[_valence]; }
124 struct compute_weight
126 compute_weight() : val_(0) { }
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
Software related to uniform subdivision of meshes.
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
Definition CompositeSqrt3T.hh:125
Mesh traits for uniform composite subdivision.