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 EF()
Edge to face averaging.
Definition: CompositeT.cc:928
void VdE()
Vertex to edge averaging, using diamond of edges.
Definition: CompositeT.cc:651
VertexHandle split_edge(HalfedgeHandle _heh)
Split Edge.
Definition: CompositeT.cc:1237
void VdEc(scalar_t _c)
Weighted vertex to edge averaging, using diamond of edges.
Definition: CompositeT.cc:687
void Tvv4()
Split Face, using Vertex information (1-4 split)
Definition: CompositeT.cc:161
void FV()
Face to vertex averaging.
Definition: CompositeT.cc:539
void FVc(Coeff &_coeff)
Weighted face to vertex Averaging with flaps.
Definition: CompositeT.cc:564
void VFa(Coeff &_coeff)
Vertex to Face Averaging, weighted.
Definition: CompositeT.cc:316
virtual const char * name(void) const =0
Return name of subdivision algorithm.
void FE()
Face to edge averaging.
Definition: CompositeT.cc:952
Abstract base class for uniform subdivision algorithms.
Definition: SubdividerT.hh:94
void EdEc(scalar_t _c)
Weighted edge to edge averaging w/ flap rule.
Definition: CompositeT.cc:1145
void VVc(Coeff &_coeff)
Vertex to vertex averaging, weighted.
Definition: CompositeT.cc:1032
bool subdivide(MeshType &_m, size_t _n, const bool _update_points=true)
Subdivide mesh _m _n times.
Definition: CompositeT.hh:116
void VdEg(Coeff &_coeff)
Weigthed vertex to edge averaging, using diamond of edges for irregular vertices. ...
Definition: CompositeT.cc:778
virtual void apply_rules(void)=0
Assemble here the rule sequence, by calling the constructor of the wanted rules.
void EVc(Coeff &_coeff)
Weighted edge to vertex averaging.
Definition: CompositeT.cc:866
void FFc(Coeff &_coeff)
Weighted face to face averaging.
Definition: CompositeT.cc:464
void VE()
VE Step (Vertex to Edge Averaging)
Definition: CompositeT.cc:980
void commit(MeshType &_m)
Move vertices to new positions after the rules have been applied to the mesh (called by subdivide())...
Definition: CompositeT.hh:150
void VV()
Vertex to vertex averaging.
Definition: CompositeT.cc:998
void Tvv3()
Split Face, using Vertex information (1-3 split)
Definition: CompositeT.cc:97
bool prepare(MeshType &_m)
Prepare mesh, e.g. add properties.
Definition: CompositeT.cc:81
void EdE()
Edge to edge averaging w/ flap rule.
Definition: CompositeT.cc:1104
Abstract base class for coefficient functions.
Definition: CompositeT.hh:162
void EV()
Edge to vertex averaging.
Definition: CompositeT.cc:840
void corner_cutting(HalfedgeHandle _heh)
Corner Cutting.
Definition: CompositeT.cc:1188
bool cleanup(MeshType &_m)
Cleanup mesh after usage, e.g. remove added properties.
Definition: CompositeT.hh:132
void FF()
Face to face averaging.
Definition: CompositeT.cc:428
This class provides the composite subdivision rules for the uniform case.
Definition: CompositeT.hh:94
Contains all the mesh ingredients like the polygonal mesh, the triangle mesh, different mesh kernels ...
Definition: MeshItems.hh:64
void VF()
Vertex to Face Averaging.
Definition: CompositeT.cc:292
void Tfv()
Split Face, using Face Information.
Definition: CompositeT.cc:216