52 #ifndef OPENMESH_SUBDIVIDER_UNIFORM_CATMULLCLARKT_HH
53 #define OPENMESH_SUBDIVIDER_UNIFORM_CATMULLCLARKT_HH
61 #if defined(OM_CC_MIPS)
72 namespace Subdivider {
84 template <
typename MeshType,
typename RealType =
double>
89 typedef typename MeshType::FaceHandle FaceHandle;
90 typedef typename MeshType::VertexHandle VertexHandle;
91 typedef typename MeshType::EdgeHandle EdgeHandle;
92 typedef typename MeshType::HalfedgeHandle HalfedgeHandle;
94 typedef typename MeshType::Point Point;
96 typedef typename MeshType::FaceIter FaceIter;
97 typedef typename MeshType::EdgeIter EdgeIter;
98 typedef typename MeshType::VertexIter VertexIter;
100 typedef typename MeshType::VertexEdgeIter VertexEdgeIter;
101 typedef typename MeshType::VertexFaceIter VertexFaceIter;
103 typedef typename MeshType::VOHIter VOHIter;
117 const char *
name()
const override {
return "Uniform CatmullClark"; }
122 virtual bool prepare( MeshType& _m )
override;
125 virtual bool cleanup( MeshType& _m )
override;
134 virtual bool subdivide( MeshType& _m,
size_t _n ,
const bool _update_points =
true)
override;
143 void split_edge( MeshType& _m,
const EdgeHandle& _eh);
145 void split_face( MeshType& _m,
const FaceHandle& _fh);
147 void compute_midpoint( MeshType& _m,
const EdgeHandle& _eh,
const bool _update_points);
149 void update_vertex(MeshType& _m,
const VertexHandle& _vh);
168 #if defined(OM_INCLUDE_TEMPLATES) && !defined(OPENMESH_SUBDIVIDER_UNIFORM_CATMULLCLARK_CC)
169 # define OPENMESH_SUBDIVIDER_TEMPLATES
170 # include "CatmullClarkT_impl.hh"
Contains all the mesh ingredients like the polygonal mesh, the triangle mesh, different mesh kernels ...
Definition: MeshItems.hh:59
@ Normal
Add normals to mesh item (vertices/faces)
Definition: Attributes.hh:82
Handle for a vertex entity.
Definition: Handles.hh:121
Handle for a edge entity.
Definition: Handles.hh:135
Handle for a face entity.
Definition: Handles.hh:142
Based on code from Leon Kos, CAD lab, Mech.Eng., University of Ljubljana, Slovenia (http://www....
Definition: CatmullClarkT.hh:86
virtual bool subdivide(MeshType &_m, size_t _n, const bool _update_points=true) override
Execute n subdivision steps.
Definition: CatmullClarkT_impl.hh:96
CatmullClarkT(MeshType &_m)
Constructor.
Definition: CatmullClarkT.hh:111
virtual bool prepare(MeshType &_m) override
Initialize properties and weights.
Definition: CatmullClarkT_impl.hh:65
virtual bool cleanup(MeshType &_m) override
Remove properties and weights.
Definition: CatmullClarkT_impl.hh:83
const char * name() const override
Return name of subdivision algorithm.
Definition: CatmullClarkT.hh:117
CatmullClarkT()
Constructor.
Definition: CatmullClarkT.hh:108
Abstract base class for uniform subdivision algorithms.
Definition: SubdividerT.hh:89