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;
105 virtual const char *
name(
void )
const override = 0;
109 bool prepare( MeshType& _m )
override;
111 bool subdivide( MeshType& _m,
size_t _n,
const bool _update_points =
true )
override
113 assert( p_mesh_ == &_m );
125 bool cleanup( MeshType& )
override
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"
Contains all the mesh ingredients like the polygonal mesh, the triangle mesh, different mesh kernels ...
Definition: MeshItems.hh:59
This class provides the composite subdivision rules for the uniform case.
Definition: CompositeT.hh:90
virtual const char * name(void) const override=0
Return name of subdivision algorithm.
void corner_cutting(HalfedgeHandle _heh)
Corner Cutting.
Definition: CompositeT_impl.hh:1184
void Tvv3()
Split Face, using Vertex information (1-3 split)
Definition: CompositeT_impl.hh:92
bool cleanup(MeshType &_m) override
Cleanup mesh after usage, e.g. remove added properties.
Definition: CompositeT.hh:127
void EF()
Edge to face averaging.
Definition: CompositeT_impl.hh:924
void VVc(Coeff &_coeff)
Vertex to vertex averaging, weighted.
Definition: CompositeT_impl.hh:1028
void VF()
Vertex to Face Averaging.
Definition: CompositeT_impl.hh:287
void FV()
Face to vertex averaging.
Definition: CompositeT_impl.hh:534
void VFa(Coeff &_coeff)
Vertex to Face Averaging, weighted.
Definition: CompositeT_impl.hh:311
void FVc(Coeff &_coeff)
Weighted face to vertex Averaging with flaps.
Definition: CompositeT_impl.hh:559
bool prepare(MeshType &_m) override
Prepare mesh, e.g. add properties.
Definition: CompositeT_impl.hh:76
void EVc(Coeff &_coeff)
Weighted edge to vertex averaging.
Definition: CompositeT_impl.hh:861
void VdEg(Coeff &_coeff)
Weigthed vertex to edge averaging, using diamond of edges for irregular vertices.
Definition: CompositeT_impl.hh:773
void VdEc(scalar_t _c)
Weighted vertex to edge averaging, using diamond of edges.
Definition: CompositeT_impl.hh:682
void FE()
Face to edge averaging.
Definition: CompositeT_impl.hh:948
virtual void apply_rules(void)=0
Assemble here the rule sequence, by calling the constructor of the wanted rules.
void FF()
Face to face averaging.
Definition: CompositeT_impl.hh:423
void EV()
Edge to vertex averaging.
Definition: CompositeT_impl.hh:835
void commit(MeshType &_m)
Move vertices to new positions after the rules have been applied to the mesh (called by subdivide()).
Definition: CompositeT.hh:145
VertexHandle split_edge(HalfedgeHandle _heh)
Split Edge.
Definition: CompositeT_impl.hh:1233
void FFc(Coeff &_coeff)
Weighted face to face averaging.
Definition: CompositeT_impl.hh:459
void EdEc(scalar_t _c)
Weighted edge to edge averaging w/ flap rule.
Definition: CompositeT_impl.hh:1141
void VE()
VE Step (Vertex to Edge Averaging)
Definition: CompositeT_impl.hh:976
void Tvv4()
Split Face, using Vertex information (1-4 split)
Definition: CompositeT_impl.hh:156
void VdE()
Vertex to edge averaging, using diamond of edges.
Definition: CompositeT_impl.hh:646
void Tfv()
Split Face, using Face Information.
Definition: CompositeT_impl.hh:211
void VV()
Vertex to vertex averaging.
Definition: CompositeT_impl.hh:994
void EdE()
Edge to edge averaging w/ flap rule.
Definition: CompositeT_impl.hh:1100
bool subdivide(MeshType &_m, size_t _n, const bool _update_points=true) override
Subdivide mesh _m _n times.
Definition: CompositeT.hh:111
Abstract base class for coefficient functions.
Definition: CompositeT.hh:158
Abstract base class for uniform subdivision algorithms.
Definition: SubdividerT.hh:89