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> 67 #if defined(OM_CC_MIPS) // avoid warnings 68 # define MIPS_WARN_WA( Item ) \ 69 void raise(typename M:: ## Item ## Handle &_h, state_t _target_state ) \ 70 { Inherited::raise(_h, _target_state); } 72 # define MIPS_WARN_WA( Item ) 78 namespace Subdivider {
94 COMPOSITE_RULE(
Tvv3, M );
102 explicit Tvv3(M& _mesh) : Inherited(_mesh) { Base::set_subdiv_type(3); };
104 void raise(
typename M::FaceHandle& _fh,
state_t _target_state)
override;
105 void raise(
typename M::VertexHandle& _vh,
state_t _target_state)
override;
117 COMPOSITE_RULE(
Tvv4, M );
122 typedef typename M::HalfedgeHandle HEH;
123 typedef typename M::VertexHandle VH;
127 explicit Tvv4(M& _mesh) : Inherited(_mesh) { Base::set_subdiv_type(4); };
129 void raise(
typename M::FaceHandle& _fh,
state_t _target_state)
override;
130 void raise(
typename M::VertexHandle& _vh,
state_t _target_state)
override;
131 void raise(
typename M::EdgeHandle& _eh,
state_t _target_state)
override;
135 void split_edge(HEH& _hh, VH& _vh,
state_t _target_state);
136 void check_edge(
const typename M::HalfedgeHandle& _hh,
148 COMPOSITE_RULE(
VF, M );
155 explicit VF(M& _mesh) : Inherited(_mesh) {}
157 void raise(
typename M::FaceHandle& _fh,
state_t _target_state)
override;
170 COMPOSITE_RULE(
FF, M );
177 explicit FF(M& _mesh) : Inherited(_mesh) {}
179 void raise(
typename M::FaceHandle& _fh,
state_t _target_state)
override;
192 COMPOSITE_RULE(
FFc, M );
199 explicit FFc(M& _mesh) : Inherited(_mesh) {}
201 void raise(
typename M::FaceHandle& _fh,
state_t _target_state)
override;
214 COMPOSITE_RULE(
FV, M );
221 explicit FV(M& _mesh) : Inherited(_mesh) {}
223 void raise(
typename M::VertexHandle& _vh,
state_t _target_state)
override;
236 COMPOSITE_RULE(
FVc, M );
243 explicit FVc(M& _mesh) : Inherited(_mesh) { init_coeffs(50); }
245 void raise(
typename M::VertexHandle& _vh,
state_t _target_state)
override;
249 static void init_coeffs(
size_t _max_valence);
250 static const std::vector<double>& coeffs() {
return coeffs_; }
252 double coeff(
size_t _valence )
254 assert(_valence < coeffs_.size());
255 return coeffs_[_valence];
260 static std::vector<double> coeffs_;
272 COMPOSITE_RULE(
VV, M );
280 explicit VV(M& _mesh) : Inherited(_mesh) {}
282 void raise(
typename M::VertexHandle& _vh,
state_t _target_state)
override;
295 COMPOSITE_RULE(
VVc, M );
302 explicit VVc(M& _mesh) : Inherited(_mesh) {}
304 void raise(
typename M::VertexHandle& _vh,
state_t _target_state)
override;
317 COMPOSITE_RULE(
VE, M );
324 explicit VE(M& _mesh) : Inherited(_mesh) {}
326 void raise(
typename M::EdgeHandle& _eh,
state_t _target_state)
override;
339 COMPOSITE_RULE(
VdE, M );
346 explicit VdE(M& _mesh) : Inherited(_mesh) {}
348 void raise(
typename M::EdgeHandle& _eh,
state_t _target_state)
override;
361 COMPOSITE_RULE(
VdEc, M );
368 explicit VdEc(M& _mesh) : Inherited(_mesh) {}
370 void raise(
typename M::EdgeHandle& _eh,
state_t _target_state)
override;
383 COMPOSITE_RULE(
EV, M );
390 explicit EV(M& _mesh) : Inherited(_mesh) {}
392 void raise(
typename M::VertexHandle& _vh,
state_t _target_state)
override;
405 COMPOSITE_RULE(
EVc, M );
413 explicit EVc(M& _mesh) : Inherited(_mesh) { init_coeffs(50); }
415 void raise(
typename M::VertexHandle& _vh,
state_t _target_state)
override;
419 static void init_coeffs(
size_t _max_valence);
420 static const std::vector<double>& coeffs() {
return coeffs_; }
422 double coeff(
size_t _valence )
424 assert(_valence < coeffs_.size());
425 return coeffs_[_valence];
430 static std::vector<double> coeffs_;
442 COMPOSITE_RULE(
EF, M );
449 explicit EF(M& _mesh) : Inherited(_mesh) {}
451 void raise(
typename M::FaceHandle& _fh,
state_t _target_state)
override;
464 COMPOSITE_RULE(
FE, M );
471 explicit FE(M& _mesh) : Inherited(_mesh) {}
473 void raise(
typename M::EdgeHandle& _eh,
state_t _target_state)
override;
486 COMPOSITE_RULE(
EdE, M );
493 explicit EdE(M& _mesh) : Inherited(_mesh) {}
495 void raise(
typename M::EdgeHandle& _eh,
state_t _target_state)
override;
508 COMPOSITE_RULE(
EdEc, M );
515 explicit EdEc(M& _mesh) : Inherited(_mesh) {}
517 void raise(
typename M::EdgeHandle& _eh,
state_t _target_state)
override;
531 #if defined(OM_INCLUDE_TEMPLATES) && !defined(OPENMESH_SUBDIVIDER_ADAPTIVE_RULEST_CC) 532 # define OPENMESH_SUBDIVIDER_TEMPLATES 536 #endif // OPENMESH_SUBDIVIDER_ADAPTIVE_RULEST_HH defined
scalar_t coeff() const
Get coefficient - ignored by non-parameterized rules.
CompositeTraits::state_t state_t