52 #ifndef OPENMESH_SUBDIVIDER_UNIFORM_COMPOSITE_HH
53 #define OPENMESH_SUBDIVIDER_UNIFORM_COMPOSITE_HH
66 namespace Subdivider {
86 template <
typename MeshType,
typename RealType=
float >
91 typedef RealType real_t;
92 typedef MeshType mesh_t;
97 CompositeT(
void) : parent_t(), p_mesh_(NULL) {}
98 CompositeT(MeshType& _mesh) : parent_t(_mesh), p_mesh_(NULL) {};
103 virtual const char *
name(
void )
const = 0;
109 bool subdivide( MeshType& _m,
size_t _n,
const bool _update_points =
true )
111 assert( p_mesh_ == &_m );
128 assert( p_mesh_ == &_m );
145 typename MeshType::VertexIter v_it;
147 for (v_it=_m.vertices_begin(); v_it != _m.vertices_end(); ++v_it)
148 _m.set_point(*v_it, _m.data(*v_it).position());
158 virtual double operator() (
size_t _valence) = 0;
164 typedef typename MeshType::Scalar scalar_t;
165 typedef typename MeshType::VertexHandle VertexHandle;
166 typedef typename MeshType::FaceHandle FaceHandle;
167 typedef typename MeshType::EdgeHandle EdgeHandle;
168 typedef typename MeshType::HalfedgeHandle HalfedgeHandle;
180 void FFc(scalar_t _c);
184 void FVc(scalar_t _c);
190 void VFa(scalar_t _alpha);
194 void VVc(scalar_t _c);
200 void VdEc(scalar_t _c);
207 void VdEg(scalar_t _gamma);
213 void EVc(scalar_t _c);
216 void EdEc(scalar_t _c);
237 #if defined(OM_INCLUDE_TEMPLATES) && !defined(OPENMESH_SUBDIVIDER_UNIFORM_COMPOSITE_CC)
238 #define OPENMESH_SUBDIVIDER_TEMPLATES
239 #include "CompositeT.cc"
242 #endif // COMPOSITET_HH defined
void VVc(Coeff &_coeff)
Vertex to vertex averaging, weighted.
Definition: CompositeT.cc:1025
void FE()
Face to edge averaging.
Definition: CompositeT.cc:945
void FF()
Face to face averaging.
Definition: CompositeT.cc:421
void corner_cutting(HalfedgeHandle _heh)
Corner Cutting.
Definition: CompositeT.cc:1181
void VdEc(scalar_t _c)
Weighted vertex to edge averaging, using diamond of edges.
Definition: CompositeT.cc:680
void FV()
Face to vertex averaging.
Definition: CompositeT.cc:532
This class provides the composite subdivision rules for the uniform case.
Definition: CompositeT.hh:87
void EdE()
Edge to edge averaging w/ flap rule.
Definition: CompositeT.cc:1097
VertexHandle split_edge(HalfedgeHandle _heh)
Split Edge.
Definition: CompositeT.cc:1230
virtual void apply_rules(void)=0
Assemble here the rule sequence, by calling the constructor of the wanted rules.
void VF()
Vertex to Face Averaging.
Definition: CompositeT.cc:285
void VFa(Coeff &_coeff)
Vertex to Face Averaging, weighted.
Definition: CompositeT.cc:309
void VdEg(Coeff &_coeff)
Weigthed vertex to edge averaging, using diamond of edges for irregular vertices. ...
Definition: CompositeT.cc:771
void EdEc(scalar_t _c)
Weighted edge to edge averaging w/ flap rule.
Definition: CompositeT.cc:1138
Contains all the mesh ingredients like the polygonal mesh, the triangle mesh, different mesh kernels ...
Definition: MeshItems.hh:56
bool prepare(MeshType &_m)
Prepare mesh, e.g. add properties.
Definition: CompositeT.cc:74
void VV()
Vertex to vertex averaging.
Definition: CompositeT.cc:991
void EF()
Edge to face averaging.
Definition: CompositeT.cc:921
void Tvv3()
Split Face, using Vertex information (1-3 split)
Definition: CompositeT.cc:90
void EV()
Edge to vertex averaging.
Definition: CompositeT.cc:833
bool subdivide(MeshType &_m, size_t _n, const bool _update_points=true)
Subdivide mesh _m _n times.
Definition: CompositeT.hh:109
void Tfv()
Split Face, using Face Information.
Definition: CompositeT.cc:209
void EVc(Coeff &_coeff)
Weighted edge to vertex averaging.
Definition: CompositeT.cc:859
Abstract base class for uniform subdivision algorithms.
Definition: SubdividerT.hh:87
void commit(MeshType &_m)
Move vertices to new positions after the rules have been applied to the mesh (called by subdivide())...
Definition: CompositeT.hh:143
void VE()
VE Step (Vertex to Edge Averaging)
Definition: CompositeT.cc:973
virtual const char * name(void) const =0
Return name of subdivision algorithm.
void FVc(Coeff &_coeff)
Weighted face to vertex Averaging with flaps.
Definition: CompositeT.cc:557
bool cleanup(MeshType &_m)
Cleanup mesh after usage, e.g. remove added properties.
Definition: CompositeT.hh:125
void VdE()
Vertex to edge averaging, using diamond of edges.
Definition: CompositeT.cc:644
void FFc(Coeff &_coeff)
Weighted face to face averaging.
Definition: CompositeT.cc:457
void Tvv4()
Split Face, using Vertex information (1-4 split)
Definition: CompositeT.cc:154
Abstract base class for coefficient functions.
Definition: CompositeT.hh:155