54 #ifndef OPENMESH_SUBDIVIDER_UNIFORM_COMPOSITE_HH 55 #define OPENMESH_SUBDIVIDER_UNIFORM_COMPOSITE_HH 68 namespace Subdivider {
88 template <
typename MeshType,
typename RealType=
float >
93 typedef RealType real_t;
94 typedef MeshType mesh_t;
99 CompositeT(
void) : parent_t(), p_mesh_(NULL) {}
100 explicit CompositeT(MeshType& _mesh) : parent_t(_mesh), p_mesh_(NULL) {};
105 virtual const char *
name(
void )
const = 0;
111 bool subdivide( MeshType& _m,
size_t _n,
const bool _update_points =
true )
113 assert( p_mesh_ == &_m );
130 assert( p_mesh_ == &_m );
147 typename MeshType::VertexIter v_it;
149 for (v_it=_m.vertices_begin(); v_it != _m.vertices_end(); ++v_it)
150 _m.set_point(*v_it, _m.data(*v_it).position());
160 virtual double operator() (
size_t _valence) = 0;
166 typedef typename MeshType::Scalar scalar_t;
167 typedef typename MeshType::VertexHandle VertexHandle;
168 typedef typename MeshType::FaceHandle FaceHandle;
169 typedef typename MeshType::EdgeHandle EdgeHandle;
170 typedef typename MeshType::HalfedgeHandle HalfedgeHandle;
182 void FFc(scalar_t _c);
186 void FVc(scalar_t _c);
192 void VFa(scalar_t _alpha);
196 void VVc(scalar_t _c);
202 void VdEc(scalar_t _c);
209 void VdEg(scalar_t _gamma);
215 void EVc(scalar_t _c);
218 void EdEc(scalar_t _c);
239 #if defined(OM_INCLUDE_TEMPLATES) && !defined(OPENMESH_SUBDIVIDER_UNIFORM_COMPOSITE_CC) 240 #define OPENMESH_SUBDIVIDER_TEMPLATES 241 #include "CompositeT_impl.hh" 244 #endif // COMPOSITET_HH defined bool prepare(MeshType &_m)
Prepare mesh, e.g. add properties.
void EV()
Edge to vertex averaging.
void VdE()
Vertex to edge averaging, using diamond of edges.
void FE()
Face to edge averaging.
void VV()
Vertex to vertex averaging.
void VdEc(scalar_t _c)
Weighted vertex to edge averaging, using diamond of edges.
void corner_cutting(HalfedgeHandle _heh)
Corner Cutting.
void FFc(Coeff &_coeff)
Weighted face to face averaging.
void Tfv()
Split Face, using Face Information.
void VVc(Coeff &_coeff)
Vertex to vertex averaging, weighted.
void FF()
Face to face averaging.
bool cleanup(MeshType &_m)
Cleanup mesh after usage, e.g. remove added properties.
void EVc(Coeff &_coeff)
Weighted edge 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.
void Tvv4()
Split Face, using Vertex information (1-4 split)
void VF()
Vertex to Face Averaging.
bool subdivide(MeshType &_m, size_t _n, const bool _update_points=true)
Subdivide mesh _m _n times.
void FV()
Face to vertex averaging.
VertexHandle split_edge(HalfedgeHandle _heh)
Split Edge.
void Tvv3()
Split Face, using Vertex information (1-3 split)
void EF()
Edge to face averaging.
void VE()
VE Step (Vertex to Edge Averaging)
Abstract base class for coefficient functions.
void commit(MeshType &_m)
virtual const char * name(void) const =0
Return name of subdivision algorithm.
virtual void apply_rules(void)=0
void VFa(Coeff &_coeff)
Vertex to Face Averaging, weighted.
void FVc(Coeff &_coeff)
Weighted face to vertex Averaging with flaps.