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

#include <geogram_mesh_builder.h>

Inheritance diagram for RINGMesh::GeogramSurfaceMeshBuilder< DIMENSION >:
RINGMesh::SurfaceMeshBuilder< DIMENSION > RINGMesh::MeshBaseBuilder< DIMENSION >

Public Member Functions

 GeogramSurfaceMeshBuilder (SurfaceMesh< DIMENSION > &mesh)
 
void remove_small_connected_components (double min_area, index_t min_polygons) override
 Removes the connected components that have an area smaller than a given threshold. More...
 
void triangulate (const SurfaceMeshBase< DIMENSION > &surface_in) override
 
void do_create_polygons (const std::vector< index_t > &polygons, const std::vector< index_t > &polygon_ptr) override
 
index_t do_create_polygon (const std::vector< index_t > &vertices) override
 Creates a polygon. More...
 
index_t do_create_triangles (index_t nb_triangles) override
 Creates a contiguous chunk of triangles. More...
 
index_t do_create_quads (index_t nb_quads) override
 Creates a contiguous chunk of quads. More...
 
void do_set_polygon_vertex (const RINGMesh::PolygonLocalEdge &polygon_local_edge, index_t vertex_id) override
 Sets a vertex of a polygon by local vertex index. More...
 
void do_set_polygon_adjacent (const RINGMesh::PolygonLocalEdge &polygon_local_edge, index_t specifies) override
 Sets an adjacent polygon by both its polygon. More...
 
void do_clear_polygons (bool keep_attributes, bool keep_memory) override
 Removes all the polygons and attributes. More...
 
void do_permute_polygons (const std::vector< index_t > &permutation) override
 
void do_delete_polygons (const std::vector< bool > &to_delete) override
 Deletes a set of polygons. More...
 
- Public Member Functions inherited from RINGMesh::SurfaceMeshBuilder< DIMENSION >
void remove_isolated_vertices ()
 Remove vertices not connected to any mesh element. More...
 
void create_polygons (const std::vector< index_t > &polygons, const std::vector< index_t > &polygon_ptr)
 
index_t create_polygon (const std::vector< index_t > &vertices)
 Creates a polygon. More...
 
index_t create_triangles (index_t nb_triangles)
 Creates a contiguous chunk of triangles. More...
 
index_t create_quads (index_t nb_quads)
 Creates a contiguous chunk of quads. More...
 
void set_polygon_vertex (const PolygonLocalEdge &polygon_local_edge, index_t vertex_id)
 Sets a vertex of a polygon by local vertex index. More...
 
void set_polygon_adjacent (const PolygonLocalEdge &polygon_local_edge, index_t specifies)
 Sets an adjacent polygon by both its polygon. More...
 
void clear_polygons (bool keep_attributes, bool keep_memory)
 Removes all the polygons and attributes. More...
 
void connect_polygons ()
 Retrieve the adjacencies of polygons. More...
 
void connect_polygons (const std::vector< index_t > &polygons_to_connect)
 
void permute_polygons (const std::vector< index_t > &permutation)
 
void delete_polygons (const std::vector< bool > &to_delete, bool remove_isolated_vertices)
 Deletes a set of polygons. 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 (GeogramSurfaceMesh)
 
 ringmesh_template_assert_2d_or_3d (DIMENSION)
 

Additional Inherited Members

- Static Public Member Functions inherited from RINGMesh::SurfaceMeshBuilder< DIMENSION >
static std::unique_ptr< SurfaceMeshBuilder< DIMENSION > > create_builder (SurfaceMesh< 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::SurfaceMeshBuilder< DIMENSION >
 SurfaceMeshBuilder (SurfaceMeshBase< DIMENSION > &mesh)
 
- Protected Member Functions inherited from RINGMesh::MeshBaseBuilder< DIMENSION >
 MeshBaseBuilder (MeshBase< DIMENSION > &mesh)
 
void delete_vertex_nn_search ()
 
- Protected Attributes inherited from RINGMesh::SurfaceMeshBuilder< DIMENSION >
SurfaceMeshBase< DIMENSION > & surface_mesh_
 
- Protected Attributes inherited from RINGMesh::MeshBaseBuilder< DIMENSION >
MeshBase< DIMENSION > & mesh_base_
 

Detailed Description

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

Definition at line 188 of file geogram_mesh_builder.h.

Constructor & Destructor Documentation

◆ GeogramSurfaceMeshBuilder()

template<index_t DIMENSION>
RINGMesh::GeogramSurfaceMeshBuilder< DIMENSION >::GeogramSurfaceMeshBuilder ( SurfaceMesh< DIMENSION > &  mesh)
inlineexplicit

Definition at line 194 of file geogram_mesh_builder.h.

Member Function Documentation

◆ COMMON_GEOGRAM_MESH_BUILDER_IMPLEMENTATION()

template<index_t DIMENSION>
RINGMesh::GeogramSurfaceMeshBuilder< DIMENSION >::COMMON_GEOGRAM_MESH_BUILDER_IMPLEMENTATION ( GeogramSurfaceMesh  )
private

◆ do_clear_polygons()

template<index_t DIMENSION>
void RINGMesh::GeogramSurfaceMeshBuilder< DIMENSION >::do_clear_polygons ( bool  keep_attributes,
bool  keep_memory 
)
inlineoverridevirtual

Removes all the polygons 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::SurfaceMeshBuilder< DIMENSION >.

Definition at line 269 of file geogram_mesh_builder.h.

◆ do_create_polygon()

template<index_t DIMENSION>
index_t RINGMesh::GeogramSurfaceMeshBuilder< DIMENSION >::do_create_polygon ( const std::vector< index_t > &  vertices)
inlineoverridevirtual

Creates a polygon.

Parameters
[in]verticesa const reference to a vector that contains the vertices
Returns
the index of the created polygon

Implements RINGMesh::SurfaceMeshBuilder< DIMENSION >.

Definition at line 235 of file geogram_mesh_builder.h.

◆ do_create_polygons()

template<index_t DIMENSION>
void RINGMesh::GeogramSurfaceMeshBuilder< DIMENSION >::do_create_polygons ( const std::vector< index_t > &  polygons,
const std::vector< index_t > &  polygon_ptr 
)
inlineoverridevirtual

brief create polygons

Parameters
[in]polygonsis the vector of vertex index for each polygon
[in]polygon_ptris the vector addressing the first polygon vertex for each polygon.

Implements RINGMesh::SurfaceMeshBuilder< DIMENSION >.

Definition at line 222 of file geogram_mesh_builder.h.

◆ do_create_quads()

template<index_t DIMENSION>
index_t RINGMesh::GeogramSurfaceMeshBuilder< DIMENSION >::do_create_quads ( index_t  nb_quads)
inlineoverridevirtual

Creates a contiguous chunk of quads.

Parameters
[in]nb_quadsnumber of quads to create
Returns
the index of the first quad

Implements RINGMesh::SurfaceMeshBuilder< DIMENSION >.

Definition at line 248 of file geogram_mesh_builder.h.

◆ do_create_triangles()

template<index_t DIMENSION>
index_t RINGMesh::GeogramSurfaceMeshBuilder< DIMENSION >::do_create_triangles ( index_t  nb_triangles)
inlineoverridevirtual

Creates a contiguous chunk of triangles.

Parameters
[in]nb_trianglesnumber of triangles to create
Returns
the index of the first triangle

Implements RINGMesh::SurfaceMeshBuilder< DIMENSION >.

Definition at line 243 of file geogram_mesh_builder.h.

◆ do_delete_polygons()

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

Deletes a set of polygons.

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::SurfaceMeshBuilder< DIMENSION >.

Definition at line 283 of file geogram_mesh_builder.h.

◆ do_permute_polygons()

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

Implements RINGMesh::SurfaceMeshBuilder< DIMENSION >.

Definition at line 275 of file geogram_mesh_builder.h.

◆ do_set_polygon_adjacent()

template<index_t DIMENSION>
void RINGMesh::GeogramSurfaceMeshBuilder< DIMENSION >::do_set_polygon_adjacent ( const RINGMesh::PolygonLocalEdge polygon_local_edge,
index_t  specifies 
)
inlineoverridevirtual

Sets an adjacent polygon by both its polygon.

Parameters
polygon_idand its local edge index
edge_id.
[in]polygon_local_edgethe polygon index and the local index of an edge.
[in]specifiesthe polygon adjacent to
polygon_idalong edge
edge_idor GEO::NO_FACET if the parameter
edge_idis on the border.

Implements RINGMesh::SurfaceMeshBuilder< DIMENSION >.

Definition at line 261 of file geogram_mesh_builder.h.

◆ do_set_polygon_vertex()

template<index_t DIMENSION>
void RINGMesh::GeogramSurfaceMeshBuilder< DIMENSION >::do_set_polygon_vertex ( const RINGMesh::PolygonLocalEdge polygon_local_edge,
index_t  vertex_id 
)
inlineoverridevirtual

Sets a vertex of a polygon by local vertex index.

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

Implements RINGMesh::SurfaceMeshBuilder< DIMENSION >.

Definition at line 253 of file geogram_mesh_builder.h.

◆ remove_small_connected_components()

template<index_t DIMENSION>
void RINGMesh::GeogramSurfaceMeshBuilder< DIMENSION >::remove_small_connected_components ( double  min_area,
index_t  min_polygons 
)
inlineoverridevirtual

Removes the connected components that have an area smaller than a given threshold.

Parameters
[in]min_areathe connected components with an area smaller than this threshold are removed
[in]min_polygonsthe connected components with less than
min_polygonspolygons are removed

Implements RINGMesh::SurfaceMeshBuilder< DIMENSION >.

Definition at line 200 of file geogram_mesh_builder.h.

◆ ringmesh_template_assert_2d_or_3d()

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

◆ triangulate()

template<index_t DIMENSION>
void RINGMesh::GeogramSurfaceMeshBuilder< DIMENSION >::triangulate ( const SurfaceMeshBase< DIMENSION > &  surface_in)
inlineoverridevirtual

Implements RINGMesh::SurfaceMeshBuilder< DIMENSION >.

Definition at line 207 of file geogram_mesh_builder.h.


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