Geogram  Version 1.9.1-rc
A programming library of geometric algorithms
GEO::MeshCellCornersStore Class Reference

Stores the cell corners of a mesh (low-level store) More...

#include <geogram/mesh/mesh.h>

Inheritance diagram for GEO::MeshCellCornersStore:
GEO::MeshSubElementsStore

Public Member Functions

 MeshCellCornersStore (Mesh &mesh)
 
index_t vertex (index_t c) const
 Gets the vertex that a corner is incident to. More...
 
void set_vertex (index_t c, index_t v)
 Sets the vertex that a corner is incident to. More...
 
index_tvertex_index_ptr (index_t c)
 Gets a pointer to the vertex that a corner is incident to. More...
 
const index_tvertex_index_ptr (index_t c) const
 Gets a pointer to the vertex that a corner is incident to. More...
 
- Public Member Functions inherited from GEO::MeshSubElementsStore
 MeshSubElementsStore (Mesh &mesh)
 Constructs a new MeshSubElementStore. More...
 
virtual ~MeshSubElementsStore ()
 MeshElementStore destructor.
 
index_t nb () const
 Gets the number of (sub-)elements. More...
 
AttributesManagerattributes () const
 Gets the attributes manager. More...
 
index_as_iterator begin () const
 Used by range-based for. More...
 
index_as_iterator end () const
 Used by range-based for. More...
 

Protected Member Functions

void clear_store (bool keep_attributes, bool keep_memory=false) override
 Removes all the elements and attributes. More...
 
void resize_store (index_t new_size) override
 Resizes this MeshSubElementsStore. More...
 
index_t create_sub_element (index_t v)
 
index_t create_sub_elements (index_t nb)
 
void copy (const MeshCellCornersStore &rhs, bool copy_attributes=true)
 
- Protected Member Functions inherited from GEO::MeshSubElementsStore
void reserve_store (index_t nb_to_reserve)
 Reserves space for new elements. More...
 
index_t create_sub_elements (index_t nb)
 Creates a contiguous chunk of attributes for sub-elements. More...
 
index_t create_sub_element ()
 Creates attributes for a sub-element. More...
 
void adjust_store ()
 Makes the size of the store tightly match the number of the elements. More...
 
void copy (const MeshSubElementsStore &rhs, bool copy_attributes=true)
 Copies a MeshSubElementsStore into this one. More...
 

Protected Attributes

MeshVerticesvertices_
 
vector< index_tcorner_vertex_
 
- Protected Attributes inherited from GEO::MeshSubElementsStore
Meshmesh_
 
AttributesManager attributes_
 
index_t nb_
 

Friends

class MeshCells
 
class Mesh
 
class GeogramIOHandler
 

Detailed Description

Stores the cell corners of a mesh (low-level store)

Definition at line 1741 of file mesh.h.

Member Function Documentation

◆ clear_store()

void GEO::MeshCellCornersStore::clear_store ( bool  keep_attributes,
bool  keep_memory = false 
)
overrideprotectedvirtual

Removes all the elements and attributes.

Parameters
[in]keep_attributesif true, then all the existing attribute names / bindings are kept (but they are cleared). If false, they are destroyed.
[in]keep_memoryif true, then memory is kept and can be reused by subsequent mesh element creations.

Reimplemented from GEO::MeshSubElementsStore.

◆ resize_store()

void GEO::MeshCellCornersStore::resize_store ( index_t  new_size)
overrideprotectedvirtual

Resizes this MeshSubElementsStore.

On exit, nb() == new_size, elements are created or destroyed if needed.

Parameters
[in]new_sizethe desired size

Reimplemented from GEO::MeshSubElementsStore.

◆ set_vertex()

void GEO::MeshCellCornersStore::set_vertex ( index_t  c,
index_t  v 
)
inline

Sets the vertex that a corner is incident to.

Parameters
[in]cthe corner, in 0..nb()-1
[in]vspecifies the vertex that corner c is incident to

Definition at line 1760 of file mesh.h.

◆ vertex()

index_t GEO::MeshCellCornersStore::vertex ( index_t  c) const
inline

Gets the vertex that a corner is incident to.

Parameters
[in]cthe corner, in 0..nb()-1
Returns
the vertex that corner c is incident to

Definition at line 1750 of file mesh.h.

◆ vertex_index_ptr() [1/2]

index_t* GEO::MeshCellCornersStore::vertex_index_ptr ( index_t  c)
inline

Gets a pointer to the vertex that a corner is incident to.

Parameters
[in]cthe corner
Returns
a pointer to the index of the vertex that this corner is incident to
Note
Normal uses do not call this function

Definition at line 1773 of file mesh.h.

◆ vertex_index_ptr() [2/2]

const index_t* GEO::MeshCellCornersStore::vertex_index_ptr ( index_t  c) const
inline

Gets a pointer to the vertex that a corner is incident to.

Parameters
[in]cthe corner
Returns
a const pointer to the index of the vertex that this corner is incident to
Note
Normal uses do not call this function

Definition at line 1785 of file mesh.h.


The documentation for this class was generated from the following file: