59#ifndef OPENMESH_SUBDIVIDER_UNIFORM_COMPOSITESQRT3T_HH
60#define OPENMESH_SUBDIVIDER_UNIFORM_COMPOSITESQRT3T_HH
80template <
typename MeshType,
typename RealType=
float>
81class CompositeSqrt3T :
public CompositeT<MeshType, RealType>
85 typedef CompositeT<MeshType, RealType> Inherited;
89 CompositeSqrt3T() : Inherited() {};
90 CompositeSqrt3T(MeshType& _mesh) : Inherited(_mesh) {};
95 const char *
name()
const {
return "Uniform Composite Sqrt3"; }
109 typedef typename Inherited::Coeff Coeff;
114 struct FVCoeff :
public Coeff
116 FVCoeff() : Coeff() { init(50); }
118 void init(
size_t _max_valence)
120 weights_.resize(_max_valence);
121 std::generate(weights_.begin(),
125 double operator()(
size_t _valence) {
return weights_[_valence]; }
129 struct compute_weight
131 compute_weight() : val_(0) { }
133 double operator()(
void)
135 return 2.0/3.0 * (cos(2.0*M_PI/val_++)+1.0);
140 std::vector<double> weights_;
Contains all the mesh ingredients like the polygonal mesh, the triangle mesh, different mesh kernels ...
Definition MeshItems.hh:64
Software related to uniform subdivision of meshes.
void apply_rules(void)
Assemble here the rule sequence, by calling the constructor of the wanted rules.
Definition CompositeSqrt3T.hh:99
const char * name() const
Return name of subdivision algorithm.
Definition CompositeSqrt3T.hh:95
Definition CompositeSqrt3T.hh:130
Mesh traits for uniform composite subdivision.