Graphite  Version 3
An experimental 3D geometry processing program
GEO::MeshFacetCornersStore Class Reference

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

#include <geogram/mesh/mesh.h>

Inheritance diagram for GEO::MeshFacetCornersStore:
GEO::MeshSubElementsStore

Public Member Functions

 MeshFacetCornersStore (Mesh &mesh)
 
index_t vertex (index_t c) const
 Gets the vertex that a corner is incident to. More...
 
index_t adjacent_facet (index_t c) const
 Gets the facet that a corner is adjacent to. More...
 
const index_tadjacent_facet_ptr (index_t c) const
 Gets a pointer to the the facet index that a corner is adjacent to. More...
 
index_tadjacent_facet_ptr (index_t c)
 Gets a pointer to the the facet index that a corner is adjacent to. More...
 
void set_vertex (index_t c, index_t v)
 Sets the vertex that a corner is incident to. More...
 
void set_vertex_no_check (index_t c, index_t v)
 Sets the vertex that a corner is incident to. More...
 
void set_adjacent_facet (index_t c, index_t f)
 Sets the facet that a corner is adjacent 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 f=NO_FACET)
 
index_t create_sub_elements (index_t nb)
 
void copy (const MeshFacetCornersStore &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_
 
MeshFacetsStorefacets_
 
vector< index_tcorner_vertex_
 
vector< index_tcorner_adjacent_facet_
 
- Protected Attributes inherited from GEO::MeshSubElementsStore
Meshmesh_
 
AttributesManager attributes_
 
index_t nb_
 

Friends

class MeshFacets
 
class Mesh
 
class GeogramIOHandler
 

Detailed Description

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

Definition at line 867 of file mesh.h.

Member Function Documentation

◆ adjacent_facet()

index_t GEO::MeshFacetCornersStore::adjacent_facet ( index_t  c) const
inline

Gets the facet that a corner is adjacent to.

Parameters
[in]cthe corner
Returns
the facet that corner is adjacent to or NO_FACET if c is on the border

Definition at line 887 of file mesh.h.

◆ adjacent_facet_ptr() [1/2]

index_t* GEO::MeshFacetCornersStore::adjacent_facet_ptr ( index_t  c)
inline

Gets a pointer to the the facet index that a corner is adjacent to.

Parameters
[in]cthe corner
Returns
a pointer to the the facet index that corner is adjacent to.

Definition at line 912 of file mesh.h.

◆ adjacent_facet_ptr() [2/2]

const index_t* GEO::MeshFacetCornersStore::adjacent_facet_ptr ( index_t  c) const
inline

Gets a pointer to the the facet index that a corner is adjacent to.

Parameters
[in]cthe corner
Returns
a pointer to the the facet index that corner is adjacent to.

Definition at line 899 of file mesh.h.

◆ clear_store()

void GEO::MeshFacetCornersStore::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::MeshFacetCornersStore::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_facet()

void GEO::MeshFacetCornersStore::set_adjacent_facet ( index_t  c,
index_t  f 
)
inline

Sets the facet that a corner is adjacent to.

Parameters
[in]cthe corner
[in]fthe facet that corner is adjacent to or NO_FACET if c is on the border

Definition at line 950 of file mesh.h.

◆ set_vertex()

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

Sets the vertex that a corner is incident to.

Parameters
[in]cthe corner
[in]vthe vertex that corner c is incident to
Precondition
v < mesh.vertices.nb()

Definition at line 923 of file mesh.h.

◆ set_vertex_no_check()

void GEO::MeshFacetCornersStore::set_vertex_no_check ( index_t  c,
index_t  v 
)
inline

Sets the vertex that a corner is incident to.

Does not check whether v is a valid vertex index. This function is useful for some algorithms that need to create/update the facets before creating the vertices.

Parameters
[in]cthe corner
[in]vthe vertex that corner c is incident to
Note
Normal uses do not call this function

Definition at line 939 of file mesh.h.

◆ vertex()

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

Gets the vertex that a corner is incident to.

Parameters
[in]cthe corner
Returns
the vertex that corner c is incident to

Definition at line 876 of file mesh.h.

◆ vertex_index_ptr() [1/2]

index_t* GEO::MeshFacetCornersStore::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 963 of file mesh.h.

◆ vertex_index_ptr() [2/2]

const index_t* GEO::MeshFacetCornersStore::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 pointer to the index of the vertex that this corner is incident to
Note
Normal uses do not call this function

Definition at line 975 of file mesh.h.


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