40 #ifndef GEOGRAM_MESH_MESH_SUBDIVISION
41 #define GEOGRAM_MESH_MESH_SUBDIVISION
A set of callbacks that specify how vertices attributes should be interpolated by subdivision functio...
MeshSplitCallbacks(Mesh *mesh)
MeshSplitCallbacks constructor.
virtual void scale_vertex(index_t v, double s)
Scales a vertex (v *= s).
virtual void zero_vertex(index_t v)
Zeroes all attributes of a vertex.
virtual ~MeshSplitCallbacks()
MeshSplitCallbacks destructor.
virtual void madd_vertex(index_t v1, double s, index_t v2)
Adds a scaled vertex to another one (v1 += s*v2).
virtual index_t create_vertex()
Creates a new vertex.
Common include file, providing basic definitions. Should be included before anything else by all head...
Types and functions for memory manipulation.
Global Vorpaline namespace.
void mesh_triangulate_center_vertex(Mesh &M, index_t facets_begin=0, index_t facets_end=index_t(-1), MeshSplitCallbacks *cb=nullptr)
Splits each n-sided facet of a surface into n triangles by inserting a vertex in the center.
void mesh_split_triangles(Mesh &M, index_t facets_begin=0, index_t facets_end=index_t(-1), MeshSplitCallbacks *cb=nullptr)
Splits each triangle of a surface mesh into four.
void mesh_split_catmull_clark(Mesh &M, MeshSplitCallbacks *cb=nullptr)
Splits a mesh using Catmull-Clark subdivision rule.
geo_index_t index_t
The type for storing and manipulating indices.
void mesh_split_quads(Mesh &M, index_t facets_begin=0, index_t facets_end=index_t(-1), MeshSplitCallbacks *cb=nullptr)
Splits each facet of a surface mesh into quads.
Types and functions for numbers manipulation.