RINGMesh
Version 5.0.0
A programming library for geological model meshes
|
#include <geogram_mesh_builder.h>
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_ |
Definition at line 188 of file geogram_mesh_builder.h.
|
inlineexplicit |
Definition at line 194 of file geogram_mesh_builder.h.
|
private |
|
inlineoverridevirtual |
Removes all the polygons and attributes.
[in] | keep_attributes | if true, then all the existing attribute names / bindings are kept (but they are cleared). If false, they are destroyed. |
[in] | keep_memory | if 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.
|
inlineoverridevirtual |
Creates a polygon.
[in] | vertices | a const reference to a vector that contains the vertices |
Implements RINGMesh::SurfaceMeshBuilder< DIMENSION >.
Definition at line 235 of file geogram_mesh_builder.h.
|
inlineoverridevirtual |
brief create polygons
[in] | polygons | is the vector of vertex index for each polygon |
[in] | polygon_ptr | is the vector addressing the first polygon vertex for each polygon. |
Implements RINGMesh::SurfaceMeshBuilder< DIMENSION >.
Definition at line 222 of file geogram_mesh_builder.h.
|
inlineoverridevirtual |
Creates a contiguous chunk of quads.
[in] | nb_quads | number of quads to create |
Implements RINGMesh::SurfaceMeshBuilder< DIMENSION >.
Definition at line 248 of file geogram_mesh_builder.h.
|
inlineoverridevirtual |
Creates a contiguous chunk of triangles.
[in] | nb_triangles | number of triangles to create |
Implements RINGMesh::SurfaceMeshBuilder< DIMENSION >.
Definition at line 243 of file geogram_mesh_builder.h.
|
inlineoverridevirtual |
Deletes a set of polygons.
[in] | to_delete | a 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.
|
inlineoverridevirtual |
Implements RINGMesh::SurfaceMeshBuilder< DIMENSION >.
Definition at line 275 of file geogram_mesh_builder.h.
|
inlineoverridevirtual |
Sets an adjacent polygon by both its polygon.
polygon_id | and its local edge index | |
edge_id. | ||
[in] | polygon_local_edge | the polygon index and the local index of an edge. |
[in] | specifies | the polygon adjacent to |
polygon_id | along edge | |
edge_id | or GEO::NO_FACET if the parameter | |
edge_id | is on the border. |
Implements RINGMesh::SurfaceMeshBuilder< DIMENSION >.
Definition at line 261 of file geogram_mesh_builder.h.
|
inlineoverridevirtual |
Sets a vertex of a polygon by local vertex index.
[in] | polygon_local_edge | the polygon index and the local index of an edge. Local index between 0 and nb_vertices(cell_id) - 1. |
[in] | vertex_id | specifies the vertex |
local_vertex_id | of the polygon | |
polygon_id. | Index between 0 and nb() - 1. |
Implements RINGMesh::SurfaceMeshBuilder< DIMENSION >.
Definition at line 253 of file geogram_mesh_builder.h.
|
inlineoverridevirtual |
Removes the connected components that have an area smaller than a given threshold.
[in] | min_area | the connected components with an area smaller than this threshold are removed |
[in] | min_polygons | the connected components with less than |
min_polygons | polygons are removed |
Implements RINGMesh::SurfaceMeshBuilder< DIMENSION >.
Definition at line 200 of file geogram_mesh_builder.h.
|
private |
|
inlineoverridevirtual |
Implements RINGMesh::SurfaceMeshBuilder< DIMENSION >.
Definition at line 207 of file geogram_mesh_builder.h.