Geogram  Version 1.9.1
A programming library of geometric algorithms
GEO::MeshCellFacetsStore Class Reference

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

#include <geogram/mesh/mesh.h>

Inheritance diagram for GEO::MeshCellFacetsStore:
GEO::MeshSubElementsStore

Public Member Functions

 MeshCellFacetsStore (Mesh &mesh)
 MeshCellFacetsStore constructor. More...
 
index_t adjacent_cell (index_t f) const
 Gets a cell adjacent to a facet. More...
 
void set_adjacent_cell (index_t f, index_t c)
 Sets a cell adjacent to a facet. More...
 
const index_tadjacent_cell_ptr (index_t f) const
 Gets a const pointer to a cell adjacent to a facet. More...
 
index_tadjacent_cell_ptr (index_t f)
 Gets a pointer to a cell adjacent to a facet. 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 c=NO_CELL)
 
index_t create_sub_elements (index_t nb)
 
void copy (const MeshCellFacetsStore &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_
 
MeshCellsStorecells_
 
vector< index_tadjacent_cell_
 
- Protected Attributes inherited from GEO::MeshSubElementsStore
Meshmesh_
 
AttributesManager attributes_
 
index_t nb_
 

Friends

class MeshCells
 
class Mesh
 
class GeogramIOHandler
 

Detailed Description

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

Definition at line 1839 of file mesh.h.

Constructor & Destructor Documentation

◆ MeshCellFacetsStore()

GEO::MeshCellFacetsStore::MeshCellFacetsStore ( Mesh mesh)

MeshCellFacetsStore constructor.

Parameters
[in]meshthe mesh that this MeshCellFacetsStore is attached to

Member Function Documentation

◆ adjacent_cell()

index_t GEO::MeshCellFacetsStore::adjacent_cell ( index_t  f) const
inline

Gets a cell adjacent to a facet.

Parameters
[in]fthe facet, in 0..nb()-1
Returns
the cell adjacent to facet f, or NO_FACET if f is on the border

Definition at line 1853 of file mesh.h.

◆ adjacent_cell_ptr() [1/2]

index_t* GEO::MeshCellFacetsStore::adjacent_cell_ptr ( index_t  f)
inline

Gets a pointer to a cell adjacent to a facet.

Parameters
[in]fthe facet, in 0..nb()-1
Returns
a pointer to the cell adjacent to facet f, or NO_FACET if f is on the border

Definition at line 1888 of file mesh.h.

◆ adjacent_cell_ptr() [2/2]

const index_t* GEO::MeshCellFacetsStore::adjacent_cell_ptr ( index_t  f) const
inline

Gets a const pointer to a cell adjacent to a facet.

Parameters
[in]fthe facet, in 0..nb()-1
Returns
a const pointer to the cell adjacent to facet f, or NO_FACET if f is on the border

Definition at line 1877 of file mesh.h.

◆ clear_store()

void GEO::MeshCellFacetsStore::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::MeshCellFacetsStore::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_adjacent_cell()

void GEO::MeshCellFacetsStore::set_adjacent_cell ( index_t  f,
index_t  c 
)
inline

Sets a cell adjacent to a facet.

Parameters
[in]fthe facet, in 0..nb()-1
[in]cspecifies the cell adjacent to facet f, or is set to NO_FACET if f is on the border

Definition at line 1865 of file mesh.h.


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