RINGMesh  Version 5.0.0
A programming library for geological model meshes
RINGMesh::GeogramLineMeshBuilder< DIMENSION > Class Template Reference

#include <geogram_mesh_builder.h>

Inheritance diagram for RINGMesh::GeogramLineMeshBuilder< DIMENSION >:
RINGMesh::LineMeshBuilder< DIMENSION > RINGMesh::MeshBaseBuilder< DIMENSION >

Public Member Functions

 GeogramLineMeshBuilder (LineMesh< DIMENSION > &mesh)
 
void do_create_edge (index_t v1_id, index_t v2_id) override
 Create a new edge. More...
 
index_t do_create_edges (index_t nb_edges) override
 Creates a contiguous chunk of edges. More...
 
void do_set_edge_vertex (const EdgeLocalVertex &edge_local_vertex, index_t vertex_id) override
 Sets a vertex of a edge by local vertex index. More...
 
void do_delete_edges (const std::vector< bool > &to_delete) override
 Deletes a set of edges. More...
 
void do_clear_edges (bool keep_attributes, bool keep_memory) override
 Removes all the edges and attributes. More...
 
void do_permute_edges (const std::vector< index_t > &permutation) override
 
- Public Member Functions inherited from RINGMesh::LineMeshBuilder< DIMENSION >
void create_edge (index_t v1_id, index_t v2_id)
 Create a new edge. More...
 
index_t create_edges (index_t nb_edges)
 Creates a contiguous chunk of edges. More...
 
void set_edge_vertex (const EdgeLocalVertex &edge_local_vertex, index_t vertex_id)
 Sets a vertex of a edge by local vertex index. More...
 
void delete_edges (const std::vector< bool > &to_delete, bool remove_isolated_vertices)
 Deletes a set of edges. More...
 
void clear_edges (bool keep_attributes, bool keep_memory)
 Removes all the edges and attributes. More...
 
void permute_edges (const std::vector< index_t > &permutation)
 
void remove_isolated_vertices ()
 Remove vertices not connected to any mesh element. More...
 
- Public Member Functions inherited from RINGMesh::MeshBaseBuilder< DIMENSION >
virtual ~MeshBaseBuilder ()=default
 
template<>
std::unique_ptr< MeshBaseBuilder< 2 > > RINGMESH_API create_builder (MeshBase< 2 > &mesh)
 
template<>
std::unique_ptr< MeshBaseBuilder< 3 > > RINGMESH_API create_builder (MeshBase< 3 > &mesh)
 
void copy (const MeshBase< DIMENSION > &rhs, bool copy_attributes)
 Copy a mesh into this one. More...
 
virtual void load_mesh (const std::string &filename)=0
 
void clear (bool keep_attributes, bool keep_memory)
 Removes all the entities and attributes of this mesh. More...
 
void repair (GEO::MeshRepairMode mode, double colocate_epsilon)
 Fixes some defaults in a mesh. More...
 
void set_vertex (index_t v_id, const vecn< DIMENSION > &vertex)
 Sets a point. More...
 
index_t create_vertex ()
 Creates a new vertex. More...
 
index_t create_vertex (const vecn< DIMENSION > &vertex)
 Creates a new vertex. More...
 
index_t create_vertices (index_t nb)
 Creates a contiguous chunk of vertices. More...
 
void assign_vertices (const std::vector< double > &point_coordinates)
 set vertex coordinates from a std::vector of coordinates More...
 
void delete_vertices (const std::vector< bool > &to_delete)
 Deletes a set of vertices. More...
 
void clear_vertices (bool keep_attributes, bool keep_memory)
 Removes all the vertices and attributes. More...
 
void permute_vertices (const std::vector< index_t > &permutation)
 

Private Member Functions

 COMMON_GEOGRAM_MESH_BUILDER_IMPLEMENTATION (GeogramLineMesh)
 
 ringmesh_template_assert_2d_or_3d (DIMENSION)
 

Additional Inherited Members

- Static Public Member Functions inherited from RINGMesh::LineMeshBuilder< DIMENSION >
static std::unique_ptr< LineMeshBuildercreate_builder (LineMesh< DIMENSION > &mesh)
 
- Static Public Member Functions inherited from RINGMesh::MeshBaseBuilder< DIMENSION >
static std::unique_ptr< MeshBaseBuilder< DIMENSION > > create_builder (MeshBase< DIMENSION > &mesh)
 
- Protected Member Functions inherited from RINGMesh::LineMeshBuilder< DIMENSION >
 LineMeshBuilder (LineMesh< DIMENSION > &mesh)
 
- Protected Member Functions inherited from RINGMesh::MeshBaseBuilder< DIMENSION >
 MeshBaseBuilder (MeshBase< DIMENSION > &mesh)
 
void delete_vertex_nn_search ()
 
- Protected Attributes inherited from RINGMesh::LineMeshBuilder< DIMENSION >
LineMesh< DIMENSION > & line_mesh_
 
- Protected Attributes inherited from RINGMesh::MeshBaseBuilder< DIMENSION >
MeshBase< DIMENSION > & mesh_base_
 

Detailed Description

template<index_t DIMENSION>
class RINGMesh::GeogramLineMeshBuilder< DIMENSION >

Definition at line 135 of file geogram_mesh_builder.h.

Constructor & Destructor Documentation

◆ GeogramLineMeshBuilder()

template<index_t DIMENSION>
RINGMesh::GeogramLineMeshBuilder< DIMENSION >::GeogramLineMeshBuilder ( LineMesh< DIMENSION > &  mesh)
inlineexplicit

Definition at line 141 of file geogram_mesh_builder.h.

Member Function Documentation

◆ COMMON_GEOGRAM_MESH_BUILDER_IMPLEMENTATION()

template<index_t DIMENSION>
RINGMesh::GeogramLineMeshBuilder< DIMENSION >::COMMON_GEOGRAM_MESH_BUILDER_IMPLEMENTATION ( GeogramLineMesh  )
private

◆ do_clear_edges()

template<index_t DIMENSION>
void RINGMesh::GeogramLineMeshBuilder< DIMENSION >::do_clear_edges ( bool  keep_attributes,
bool  keep_memory 
)
inlineoverridevirtual

Removes all the edges 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 entity creations.

Implements RINGMesh::LineMeshBuilder< DIMENSION >.

Definition at line 171 of file geogram_mesh_builder.h.

◆ do_create_edge()

template<index_t DIMENSION>
void RINGMesh::GeogramLineMeshBuilder< DIMENSION >::do_create_edge ( index_t  v1_id,
index_t  v2_id 
)
inlineoverridevirtual

Create a new edge.

Parameters
[in]v1_idindex of the starting vertex.
[in]v2_idindex of the ending vertex.

Implements RINGMesh::LineMeshBuilder< DIMENSION >.

Definition at line 147 of file geogram_mesh_builder.h.

◆ do_create_edges()

template<index_t DIMENSION>
index_t RINGMesh::GeogramLineMeshBuilder< DIMENSION >::do_create_edges ( index_t  nb_edges)
inlineoverridevirtual

Creates a contiguous chunk of edges.

Parameters
[in]nb_edgesnumber of edges to create
Returns
the index of the first edge

Implements RINGMesh::LineMeshBuilder< DIMENSION >.

Definition at line 152 of file geogram_mesh_builder.h.

◆ do_delete_edges()

template<index_t DIMENSION>
void RINGMesh::GeogramLineMeshBuilder< DIMENSION >::do_delete_edges ( const std::vector< bool > &  to_delete)
inlineoverridevirtual

Deletes a set of edges.

Parameters
[in]to_deletea vector of size nb(). If to_delete[e] is true, then entity e will be destroyed, else it will be kept.

Implements RINGMesh::LineMeshBuilder< DIMENSION >.

Definition at line 164 of file geogram_mesh_builder.h.

◆ do_permute_edges()

template<index_t DIMENSION>
void RINGMesh::GeogramLineMeshBuilder< DIMENSION >::do_permute_edges ( const std::vector< index_t > &  permutation)
inlineoverridevirtual

Implements RINGMesh::LineMeshBuilder< DIMENSION >.

Definition at line 176 of file geogram_mesh_builder.h.

◆ do_set_edge_vertex()

template<index_t DIMENSION>
void RINGMesh::GeogramLineMeshBuilder< DIMENSION >::do_set_edge_vertex ( const EdgeLocalVertex edge_local_vertex,
index_t  vertex_id 
)
inlineoverridevirtual

Sets a vertex of a edge by local vertex index.

Parameters
[in]edge_local_vertexindex of the edge and local index of the vertex in the edge. Local index between 0 and nb_vertices(cell_id) - 1.
[in]vertex_idspecifies the vertex
local_vertex_idof edge
edge_id.Index between 0 and nb() - 1.

Implements RINGMesh::LineMeshBuilder< DIMENSION >.

Definition at line 157 of file geogram_mesh_builder.h.

◆ ringmesh_template_assert_2d_or_3d()

template<index_t DIMENSION>
RINGMesh::GeogramLineMeshBuilder< DIMENSION >::ringmesh_template_assert_2d_or_3d ( DIMENSION  )
private

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