55#ifndef OPENMESH_SUBDIVIDER_ADAPTIVE_RULEST_HH
56#define OPENMESH_SUBDIVIDER_ADAPTIVE_RULEST_HH
61#include <OpenMesh/Core/System/config.hh>
62#include <OpenMesh/Tools/Subdivider/Adaptive/Composite/RuleInterfaceT.hh>
94 explicit Tvv3(M& _mesh) :
Inherited(_mesh) { Base::set_subdiv_type(3); };
96 void raise(
typename M::FaceHandle& _fh,
state_t _target_state)
override;
97 void raise(
typename M::VertexHandle& _vh,
state_t _target_state)
override;
113 typedef typename M::HalfedgeHandle HEH;
114 typedef typename M::VertexHandle VH;
118 explicit Tvv4(M& _mesh) :
Inherited(_mesh) { Base::set_subdiv_type(4); };
120 void raise(
typename M::FaceHandle& _fh,
state_t _target_state)
override;
121 void raise(
typename M::VertexHandle& _vh,
state_t _target_state)
override;
122 void raise(
typename M::EdgeHandle& _eh,
state_t _target_state)
override;
126 void split_edge(HEH& _hh, VH& _vh,
state_t _target_state);
127 void check_edge(
const typename M::HalfedgeHandle& _hh,
139 COMPOSITE_RULE(
VF, M );
148 void raise(
typename M::FaceHandle& _fh,
state_t _target_state)
override;
159 COMPOSITE_RULE(
FF, M );
168 void raise(
typename M::FaceHandle& _fh,
state_t _target_state)
override;
188 void raise(
typename M::FaceHandle& _fh,
state_t _target_state)
override;
199 COMPOSITE_RULE(
FV, M );
208 void raise(
typename M::VertexHandle& _vh,
state_t _target_state)
override;
226 explicit FVc(M& _mesh) :
Inherited(_mesh) { init_coeffs(50); }
228 void raise(
typename M::VertexHandle& _vh,
state_t _target_state)
override;
230 static void init_coeffs(
size_t _max_valence);
231 static const std::vector<double>& coeffs() {
return coeffs_; }
233 double coeff(
size_t _valence )
235 assert(_valence < coeffs_.size());
236 return coeffs_[_valence];
241 static std::vector<double> coeffs_;
253 COMPOSITE_RULE(
VV, M );
263 void raise(
typename M::VertexHandle& _vh,
state_t _target_state)
override;
283 void raise(
typename M::VertexHandle& _vh,
state_t _target_state)
override;
294 COMPOSITE_RULE(
VE, M );
303 void raise(
typename M::EdgeHandle& _eh,
state_t _target_state)
override;
323 void raise(
typename M::EdgeHandle& _eh,
state_t _target_state)
override;
343 void raise(
typename M::EdgeHandle& _eh,
state_t _target_state)
override;
354 COMPOSITE_RULE(
EV, M );
363 void raise(
typename M::VertexHandle& _vh,
state_t _target_state)
override;
382 explicit EVc(M& _mesh) :
Inherited(_mesh) { init_coeffs(50); }
384 void raise(
typename M::VertexHandle& _vh,
state_t _target_state)
override;
386 static void init_coeffs(
size_t _max_valence);
387 static const std::vector<double>& coeffs() {
return coeffs_; }
389 double coeff(
size_t _valence )
391 assert(_valence < coeffs_.size());
392 return coeffs_[_valence];
397 static std::vector<double> coeffs_;
409 COMPOSITE_RULE(
EF, M );
418 void raise(
typename M::FaceHandle& _fh,
state_t _target_state)
override;
429 COMPOSITE_RULE(
FE, M );
438 void raise(
typename M::EdgeHandle& _eh,
state_t _target_state)
override;
458 void raise(
typename M::EdgeHandle& _eh,
state_t _target_state)
override;
478 void raise(
typename M::EdgeHandle& _eh,
state_t _target_state)
override;
489#if defined(OM_INCLUDE_TEMPLATES) && !defined(OPENMESH_SUBDIVIDER_ADAPTIVE_RULEST_CC)
490# define OPENMESH_SUBDIVIDER_TEMPLATES
Contains all the mesh ingredients like the polygonal mesh, the triangle mesh, different mesh kernels ...
Definition: MeshItems.hh:59
CompositeTraits::state_t state_t
Adaptive Composite Subdivision framework.
Definition: CompositeTraits.hh:250
Base class for adaptive composite subdivision rules.
Definition: RuleInterfaceT.hh:109
scalar_t coeff() const
Get coefficient - ignored by non-parameterized rules.
Definition: RuleInterfaceT.hh:351
Adaptive Composite Subdivision framework.
Definition: RulesT.hh:85
void raise(typename M::FaceHandle &_fh, state_t _target_state) override
Raise item to target state _target_state.
Definition: RulesT_impl.hh:99
Topological composite rule Tvv,4 doing a 1-4 split of a face.
Definition: RulesT.hh:107
void raise(typename M::FaceHandle &_fh, state_t _target_state) override
Raise item to target state _target_state.
Definition: RulesT_impl.hh:338
Composite rule VF.
Definition: RulesT.hh:138
void raise(typename M::FaceHandle &_fh, state_t _target_state) override
Raise item to target state _target_state.
Composite rule FF.
Definition: RulesT.hh:158
void raise(typename M::FaceHandle &_fh, state_t _target_state) override
Raise item to target state _target_state.
Composite rule FFc.
Definition: RulesT.hh:178
void raise(typename M::FaceHandle &_fh, state_t _target_state) override
Raise item to target state _target_state.
Composite rule FV.
Definition: RulesT.hh:198
void raise(typename M::VertexHandle &_vh, state_t _target_state) override
Raise item to target state _target_state.
Composite rule FVc.
Definition: RulesT.hh:218
void raise(typename M::VertexHandle &_vh, state_t _target_state) override
Raise item to target state _target_state.
Composite rule VV.
Definition: RulesT.hh:252
void raise(typename M::VertexHandle &_vh, state_t _target_state) override
Raise item to target state _target_state.
Composite rule VVc.
Definition: RulesT.hh:273
void raise(typename M::VertexHandle &_vh, state_t _target_state) override
Raise item to target state _target_state.
Composite rule VE.
Definition: RulesT.hh:293
void raise(typename M::EdgeHandle &_eh, state_t _target_state) override
Raise item to target state _target_state.
Composite rule VdE.
Definition: RulesT.hh:313
void raise(typename M::EdgeHandle &_eh, state_t _target_state) override
Raise item to target state _target_state.
Composite rule VdEc.
Definition: RulesT.hh:333
void raise(typename M::EdgeHandle &_eh, state_t _target_state) override
Raise item to target state _target_state.
Composite rule EV.
Definition: RulesT.hh:353
void raise(typename M::VertexHandle &_vh, state_t _target_state) override
Raise item to target state _target_state.
Composite rule EVc.
Definition: RulesT.hh:373
void raise(typename M::VertexHandle &_vh, state_t _target_state) override
Raise item to target state _target_state.
Composite rule EF.
Definition: RulesT.hh:408
void raise(typename M::FaceHandle &_fh, state_t _target_state) override
Raise item to target state _target_state.
Composite rule FE.
Definition: RulesT.hh:428
void raise(typename M::EdgeHandle &_eh, state_t _target_state) override
Raise item to target state _target_state.
Composite rule EdE.
Definition: RulesT.hh:448
void raise(typename M::EdgeHandle &_eh, state_t _target_state) override
Raise item to target state _target_state.
Composite rule EdEc.
Definition: RulesT.hh:468
void raise(typename M::EdgeHandle &_eh, state_t _target_state) override
Raise item to target state _target_state.