59 #ifndef OPENMESH_SUBDIVIDER_UNIFORM_COMPOSITE_HH
60 #define OPENMESH_SUBDIVIDER_UNIFORM_COMPOSITE_HH
73 namespace Subdivider {
93 template <
typename MeshType,
typename RealType=
float >
98 typedef RealType real_t;
99 typedef MeshType mesh_t;
104 CompositeT(
void) : parent_t(), p_mesh_(NULL) {}
105 CompositeT(MeshType& _mesh) : parent_t(_mesh), p_mesh_(NULL) {};
110 virtual const char *
name(
void )
const = 0;
116 bool subdivide( MeshType& _m,
size_t _n,
const bool _update_points =
true )
118 assert( p_mesh_ == &_m );
135 assert( p_mesh_ == &_m );
152 typename MeshType::VertexIter v_it;
154 for (v_it=_m.vertices_begin(); v_it != _m.vertices_end(); ++v_it)
155 _m.set_point(*v_it, _m.data(*v_it).position());
165 virtual double operator() (
size_t _valence) = 0;
171 typedef typename MeshType::Scalar scalar_t;
172 typedef typename MeshType::VertexHandle VertexHandle;
173 typedef typename MeshType::FaceHandle FaceHandle;
174 typedef typename MeshType::EdgeHandle EdgeHandle;
175 typedef typename MeshType::HalfedgeHandle HalfedgeHandle;
187 void FFc(scalar_t _c);
191 void FVc(scalar_t _c);
197 void VFa(scalar_t _alpha);
201 void VVc(scalar_t _c);
207 void VdEc(scalar_t _c);
214 void VdEg(scalar_t _gamma);
220 void EVc(scalar_t _c);
223 void EdEc(scalar_t _c);
244 #if defined(OM_INCLUDE_TEMPLATES) && !defined(OPENMESH_SUBDIVIDER_UNIFORM_COMPOSITE_CC)
245 #define OPENMESH_SUBDIVIDER_TEMPLATES
246 #include "CompositeT.cc"
249 #endif // COMPOSITET_HH defined
void VVc(Coeff &_coeff)
Vertex to vertex averaging, weighted.
void FVc(Coeff &_coeff)
Weighted face to vertex Averaging with flaps.
void FF()
Face to face averaging.
void VFa(Coeff &_coeff)
Vertex to Face Averaging, weighted.
void EF()
Edge to face averaging.
void Tfv()
Split Face, using Face Information.
void Tvv3()
Split Face, using Vertex information (1-3 split)
void VdE()
Vertex to edge averaging, using diamond of edges.
void VdEc(scalar_t _c)
Weighted vertex to edge averaging, using diamond of edges.
VertexHandle split_edge(HalfedgeHandle _heh)
Split Edge.
bool cleanup(MeshType &_m)
Cleanup mesh after usage, e.g. remove added properties.
void EVc(Coeff &_coeff)
Weighted edge to vertex averaging.
void VE()
VE Step (Vertex to Edge Averaging)
virtual const char * name(void) const =0
Return name of subdivision algorithm.
bool prepare(MeshType &_m)
Prepare mesh, e.g. add properties.
void FV()
Face to vertex averaging.
void EdEc(scalar_t _c)
Weighted edge to edge averaging w/ flap rule.
void EdE()
Edge to edge averaging w/ flap rule.
virtual void apply_rules(void)=0
void Tvv4()
Split Face, using Vertex information (1-4 split)
void FFc(Coeff &_coeff)
Weighted face to face averaging.
void EV()
Edge to vertex averaging.
void VV()
Vertex to vertex averaging.
void VF()
Vertex to Face Averaging.
void corner_cutting(HalfedgeHandle _heh)
Corner Cutting.
Abstract base class for coefficient functions.
void commit(MeshType &_m)
bool subdivide(MeshType &_m, size_t _n, const bool _update_points=true)
Subdivide mesh _m _n times.
void FE()
Face to edge averaging.