Graphite
Version 3
An experimental 3D geometry processing program
|
Base class for mesh elements. More...
#include <geogram/mesh/mesh.h>
Public Member Functions | |
virtual void | delete_elements (vector< index_t > &to_delete, bool remove_isolated_vertices=true)=0 |
Deletes a set of elements. More... | |
virtual void | permute_elements (vector< index_t > &permutation)=0 |
Applies a permutation to the elements and their attributes. More... | |
virtual void | clear (bool keep_attributes=true, bool keep_memory=false)=0 |
Removes all the elements and attributes. More... | |
virtual void | pop ()=0 |
Removes the last element. | |
Static Protected Member Functions | |
static bool | has_non_zero (const GEO::vector< index_t > &I) |
Tests whether a vector contains a non-zero value. More... | |
Base class for mesh elements.
Mesh elements can be created / manipulated independantly, in contrast with sub-elements that cannot. Mesh elements are vertices, facets and cells.
|
pure virtual |
Removes all the elements and attributes.
[in] | keep_attributes | if true, then all the existing attribute names / bindings are kept (but they are cleared). If false, they are destroyed. |
[in] | keep_memory | if true, then memory is kept and can be reused by subsequent mesh element creations. |
Implemented in GEO::MeshCells, GEO::MeshFacets, GEO::MeshEdges, and GEO::MeshVertices.
|
pure virtual |
Deletes a set of elements.
[in] | to_delete | a vector of size nb(). If to_delete[e] is different from 0, then element e will be destroyed, else it will be kept. On exit, to_delete is modified (it is used for internal bookkeeping). |
[in] | remove_isolated_vertices | if true, then the vertices that are no longer incident to any element are deleted. |
Implemented in GEO::MeshCells, GEO::MeshFacets, GEO::MeshEdges, and GEO::MeshVertices.
|
inlinestaticprotected |
Tests whether a vector contains a non-zero value.
This function is used internally by delete_elements()
[in] | I | a vector of signed integers |
true | if I contains at least a non-zero value |
false | otherwise |
Applies a permutation to the elements and their attributes.
On exit, permutation is modified (used for internal bookkeeping). Applying a permutation permutation
is equivalent to:
Implemented in GEO::MeshCells, GEO::MeshFacets, GEO::MeshEdges, and GEO::MeshVertices.