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 {
102 explicit Tvv3(M& _mesh) : Inherited(_mesh) { Base::set_subdiv_type(3); };
104 void raise(
typename M::FaceHandle& _fh,
state_t _target_state);
105 void raise(
typename M::VertexHandle& _vh,
state_t _target_state);
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);
130 void raise(
typename M::VertexHandle& _vh,
state_t _target_state);
131 void raise(
typename M::EdgeHandle& _eh,
state_t _target_state);
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);
170 COMPOSITE_RULE(
FF, M );
177 explicit FF(M& _mesh) : Inherited(_mesh) {}
179 void raise(
typename M::FaceHandle& _fh,
state_t _target_state);
199 explicit FFc(M& _mesh) : Inherited(_mesh) {}
201 void raise(
typename M::FaceHandle& _fh,
state_t _target_state);
214 COMPOSITE_RULE(
FV, M );
221 explicit FV(M& _mesh) : Inherited(_mesh) {}
223 void raise(
typename M::VertexHandle& _vh,
state_t _target_state);
243 explicit FVc(M& _mesh) : Inherited(_mesh) { init_coeffs(50); }
245 void raise(
typename M::VertexHandle& _vh,
state_t _target_state);
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);
302 explicit VVc(M& _mesh) : Inherited(_mesh) {}
304 void raise(
typename M::VertexHandle& _vh,
state_t _target_state);
317 COMPOSITE_RULE(
VE, M );
324 explicit VE(M& _mesh) : Inherited(_mesh) {}
326 void raise(
typename M::EdgeHandle& _eh,
state_t _target_state);
346 explicit VdE(M& _mesh) : Inherited(_mesh) {}
348 void raise(
typename M::EdgeHandle& _eh,
state_t _target_state);
368 explicit VdEc(M& _mesh) : Inherited(_mesh) {}
370 void raise(
typename M::EdgeHandle& _eh,
state_t _target_state);
383 COMPOSITE_RULE(
EV, M );
390 explicit EV(M& _mesh) : Inherited(_mesh) {}
392 void raise(
typename M::VertexHandle& _vh,
state_t _target_state);
413 explicit EVc(M& _mesh) : Inherited(_mesh) { init_coeffs(50); }
415 void raise(
typename M::VertexHandle& _vh,
state_t _target_state);
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);
464 COMPOSITE_RULE(
FE, M );
471 explicit FE(M& _mesh) : Inherited(_mesh) {}
473 void raise(
typename M::EdgeHandle& _eh,
state_t _target_state);
493 explicit EdE(M& _mesh) : Inherited(_mesh) {}
495 void raise(
typename M::EdgeHandle& _eh,
state_t _target_state);
515 explicit EdEc(M& _mesh) : Inherited(_mesh) {}
517 void raise(
typename M::EdgeHandle& _eh,
state_t _target_state);
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 Base class for adaptive composite subdivision rules.
Definition: CompositeT.hh:79
Composite rule FFc.
Definition: RulesT.hh:190
Topological composite rule Tvv,4 doing a 1-4 split of a face.
Definition: RulesT.hh:115
Composite rule FF.
Definition: RulesT.hh:168
Composite rule FV.
Definition: RulesT.hh:212
Composite rule VdE.
Definition: RulesT.hh:337
scalar_t coeff() const
Get coefficient - ignored by non-parameterized rules.
Definition: RuleInterfaceT.hh:351
Composite rule FE.
Definition: RulesT.hh:462
Composite rule VV.
Definition: RulesT.hh:270
Contains all the mesh ingredients like the polygonal mesh, the triangle mesh, different mesh kernels ...
Definition: MeshItems.hh:59
Composite rule EV.
Definition: RulesT.hh:381
Adaptive Composite Subdivision framework.
Definition: RulesT.hh:92
Composite rule VE.
Definition: RulesT.hh:315
Composite rule FVc.
Definition: RulesT.hh:234
Composite rule EdEc.
Definition: RulesT.hh:506
Composite rule EF.
Definition: RulesT.hh:440
Composite rule VdEc.
Definition: RulesT.hh:359
Composite rule VVc.
Definition: RulesT.hh:293
Composite rule EdE.
Definition: RulesT.hh:484
Composite rule EVc.
Definition: RulesT.hh:403
CompositeTraits::state_t state_t
Adaptive Composite Subdivision framework.
Definition: CompositeTraits.hh:250
Composite rule VF.
Definition: RulesT.hh:146