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 {
99 COMPOSITE_RULE(
Tvv3, M );
107 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);
122 COMPOSITE_RULE(
Tvv4, M );
127 typedef typename M::HalfedgeHandle HEH;
128 typedef typename M::VertexHandle VH;
132 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 VF(M& _mesh) : Inherited(_mesh) {}
162 void raise(
typename M::FaceHandle& _fh,
state_t _target_state);
175 COMPOSITE_RULE(
FF, M );
182 FF(M& _mesh) : Inherited(_mesh) {}
184 void raise(
typename M::FaceHandle& _fh,
state_t _target_state);
197 COMPOSITE_RULE(
FFc, M );
204 FFc(M& _mesh) : Inherited(_mesh) {}
206 void raise(
typename M::FaceHandle& _fh,
state_t _target_state);
219 COMPOSITE_RULE(
FV, M );
226 FV(M& _mesh) : Inherited(_mesh) {}
228 void raise(
typename M::VertexHandle& _vh,
state_t _target_state);
241 COMPOSITE_RULE(
FVc, M );
248 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 VV(M& _mesh) : Inherited(_mesh) {}
287 void raise(
typename M::VertexHandle& _vh,
state_t _target_state);
300 COMPOSITE_RULE(
VVc, M );
307 VVc(M& _mesh) : Inherited(_mesh) {}
309 void raise(
typename M::VertexHandle& _vh,
state_t _target_state);
322 COMPOSITE_RULE(
VE, M );
329 VE(M& _mesh) : Inherited(_mesh) {}
331 void raise(
typename M::EdgeHandle& _eh,
state_t _target_state);
344 COMPOSITE_RULE(
VdE, M );
351 VdE(M& _mesh) : Inherited(_mesh) {}
353 void raise(
typename M::EdgeHandle& _eh,
state_t _target_state);
366 COMPOSITE_RULE(
VdEc, M );
373 VdEc(M& _mesh) : Inherited(_mesh) {}
375 void raise(
typename M::EdgeHandle& _eh,
state_t _target_state);
388 COMPOSITE_RULE(
EV, M );
395 EV(M& _mesh) : Inherited(_mesh) {}
397 void raise(
typename M::VertexHandle& _vh,
state_t _target_state);
410 COMPOSITE_RULE(
EVc, M );
418 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 EF(M& _mesh) : Inherited(_mesh) {}
456 void raise(
typename M::FaceHandle& _fh,
state_t _target_state);
469 COMPOSITE_RULE(
FE, M );
476 FE(M& _mesh) : Inherited(_mesh) {}
478 void raise(
typename M::EdgeHandle& _eh,
state_t _target_state);
491 COMPOSITE_RULE(
EdE, M );
498 EdE(M& _mesh) : Inherited(_mesh) {}
500 void raise(
typename M::EdgeHandle& _eh,
state_t _target_state);
513 COMPOSITE_RULE(
EdEc, M );
520 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
CompositeTraits::state_t state_t
scalar_t coeff() const
Get coefficient - ignored by non-parameterized rules.