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