60 #ifndef OPENMESH_SUBDIVIDER_ADAPTIVE_RULEST_HH 61 #define OPENMESH_SUBDIVIDER_ADAPTIVE_RULEST_HH 66 #include <OpenMesh/Core/System/config.hh> 67 #include <OpenMesh/Tools/Subdivider/Adaptive/Composite/RuleInterfaceT.hh> 72 #if defined(OM_CC_MIPS) // avoid warnings 73 # define MIPS_WARN_WA( Item ) \ 74 void raise(typename M:: ## Item ## Handle &_h, state_t _target_state ) \ 75 { Inherited::raise(_h, _target_state); } 77 # define MIPS_WARN_WA( Item ) 83 namespace Subdivider {
107 explicit Tvv3(M& _mesh) : Inherited(_mesh) { Base::set_subdiv_type(3); };
109 void raise(
typename M::FaceHandle& _fh,
state_t _target_state);
110 void raise(
typename M::VertexHandle& _vh,
state_t _target_state);
127 typedef typename M::HalfedgeHandle HEH;
128 typedef typename M::VertexHandle VH;
132 explicit Tvv4(M& _mesh) : Inherited(_mesh) { Base::set_subdiv_type(4); };
134 void raise(
typename M::FaceHandle& _fh,
state_t _target_state);
135 void raise(
typename M::VertexHandle& _vh,
state_t _target_state);
136 void raise(
typename M::EdgeHandle& _eh,
state_t _target_state);
140 void split_edge(HEH& _hh, VH& _vh,
state_t _target_state);
141 void check_edge(
const typename M::HalfedgeHandle& _hh,
153 COMPOSITE_RULE(
VF, M );
160 explicit VF(M& _mesh) : Inherited(_mesh) {}
162 void raise(
typename M::FaceHandle& _fh,
state_t _target_state);
175 COMPOSITE_RULE(
FF, M );
182 explicit FF(M& _mesh) : Inherited(_mesh) {}
184 void raise(
typename M::FaceHandle& _fh,
state_t _target_state);
204 explicit FFc(M& _mesh) : Inherited(_mesh) {}
206 void raise(
typename M::FaceHandle& _fh,
state_t _target_state);
219 COMPOSITE_RULE(
FV, M );
226 explicit FV(M& _mesh) : Inherited(_mesh) {}
228 void raise(
typename M::VertexHandle& _vh,
state_t _target_state);
248 explicit FVc(M& _mesh) : Inherited(_mesh) { init_coeffs(50); }
250 void raise(
typename M::VertexHandle& _vh,
state_t _target_state);
254 static void init_coeffs(
size_t _max_valence);
255 static const std::vector<double>& coeffs() {
return coeffs_; }
257 double coeff(
size_t _valence )
259 assert(_valence < coeffs_.size());
260 return coeffs_[_valence];
265 static std::vector<double> coeffs_;
277 COMPOSITE_RULE(
VV, M );
285 explicit VV(M& _mesh) : Inherited(_mesh) {}
287 void raise(
typename M::VertexHandle& _vh,
state_t _target_state);
307 explicit VVc(M& _mesh) : Inherited(_mesh) {}
309 void raise(
typename M::VertexHandle& _vh,
state_t _target_state);
322 COMPOSITE_RULE(
VE, M );
329 explicit VE(M& _mesh) : Inherited(_mesh) {}
331 void raise(
typename M::EdgeHandle& _eh,
state_t _target_state);
351 explicit VdE(M& _mesh) : Inherited(_mesh) {}
353 void raise(
typename M::EdgeHandle& _eh,
state_t _target_state);
373 explicit VdEc(M& _mesh) : Inherited(_mesh) {}
375 void raise(
typename M::EdgeHandle& _eh,
state_t _target_state);
388 COMPOSITE_RULE(
EV, M );
395 explicit EV(M& _mesh) : Inherited(_mesh) {}
397 void raise(
typename M::VertexHandle& _vh,
state_t _target_state);
418 explicit EVc(M& _mesh) : Inherited(_mesh) { init_coeffs(50); }
420 void raise(
typename M::VertexHandle& _vh,
state_t _target_state);
424 static void init_coeffs(
size_t _max_valence);
425 static const std::vector<double>& coeffs() {
return coeffs_; }
427 double coeff(
size_t _valence )
429 assert(_valence < coeffs_.size());
430 return coeffs_[_valence];
435 static std::vector<double> coeffs_;
447 COMPOSITE_RULE(
EF, M );
454 explicit EF(M& _mesh) : Inherited(_mesh) {}
456 void raise(
typename M::FaceHandle& _fh,
state_t _target_state);
469 COMPOSITE_RULE(
FE, M );
476 explicit FE(M& _mesh) : Inherited(_mesh) {}
478 void raise(
typename M::EdgeHandle& _eh,
state_t _target_state);
498 explicit EdE(M& _mesh) : Inherited(_mesh) {}
500 void raise(
typename M::EdgeHandle& _eh,
state_t _target_state);
520 explicit EdEc(M& _mesh) : Inherited(_mesh) {}
522 void raise(
typename M::EdgeHandle& _eh,
state_t _target_state);
536 #if defined(OM_INCLUDE_TEMPLATES) && !defined(OPENMESH_SUBDIVIDER_ADAPTIVE_RULEST_CC) 537 # define OPENMESH_SUBDIVIDER_TEMPLATES 541 #endif // OPENMESH_SUBDIVIDER_ADAPTIVE_RULEST_HH defined Adaptive Composite Subdivision framework.
Definition: RulesT.hh:97
Composite rule VF.
Definition: RulesT.hh:151
Contains all the mesh ingredients like the polygonal mesh, the triangle mesh, different mesh kernels ...
Definition: MeshItems.hh:64
Composite rule VV.
Definition: RulesT.hh:275
Composite rule FFc.
Definition: RulesT.hh:195
Composite rule EV.
Definition: RulesT.hh:386
Composite rule VE.
Definition: RulesT.hh:320
scalar_t coeff() const
Get coefficient - ignored by non-parameterized rules.
Definition: RuleInterfaceT.hh:356
Composite rule EdEc.
Definition: RulesT.hh:511
Composite rule EF.
Definition: RulesT.hh:445
CompositeTraits::state_t state_t
Adaptive Composite Subdivision framework.
Definition: CompositeTraits.hh:255
Composite rule FVc.
Definition: RulesT.hh:239
Composite rule FF.
Definition: RulesT.hh:173
Composite rule VdEc.
Definition: RulesT.hh:364
Composite rule VVc.
Definition: RulesT.hh:298
Composite rule FV.
Definition: RulesT.hh:217
Composite rule EdE.
Definition: RulesT.hh:489
Composite rule EVc.
Definition: RulesT.hh:408
Composite rule VdE.
Definition: RulesT.hh:342
Base class for adaptive composite subdivision rules.
Definition: CompositeT.hh:84
Composite rule FE.
Definition: RulesT.hh:467
Topological composite rule Tvv,4 doing a 1-4 split of a face.
Definition: RulesT.hh:120