RINGMesh
Version 5.0.0
A programming library for geological model meshes
|
#include <mesh.h>
Public Member Functions | |
virtual index_t | polygon_vertex (const ElementLocalVertex &polygon_local_vertex) const =0 |
Gets the vertex index by polygon index and local vertex index. More... | |
virtual index_t | nb_polygons () const =0 |
Gets the number of all polygons in the whole Mesh. More... | |
virtual index_t | nb_polygon_vertices (index_t polygon_id) const =0 |
Gets the number of vertices in the polygon. More... | |
ElementLocalVertex | next_polygon_vertex (const ElementLocalVertex &polygon_local_vertex) const |
Gets the next vertex index in the polygon vertex. More... | |
PolygonLocalEdge | next_on_border (const PolygonLocalEdge &polygon_local_edge) const |
Get the next edge on the border. More... | |
ElementLocalVertex | prev_polygon_vertex (const ElementLocalVertex &polygon_local_vertex) const |
Gets the previous vertex index in the polygon. More... | |
PolygonLocalEdge | prev_on_border (const PolygonLocalEdge &polygon_local_edge) const |
Get the previous edge on the border. More... | |
index_t | vertex_index_in_polygon (index_t polygon_index, index_t vertex_id) const |
Get the vertex index in a polygon. More... | |
index_t | closest_vertex_in_polygon (index_t polygon_index, const vecn< DIMENSION > &query_point) const |
Compute closest vertex in a polygon to a point. More... | |
index_t | polygon_from_vertex_ids (index_t in0, index_t in1) const |
Get the first polygon of the surface that has an edge linking the two vertices (ids in the surface) More... | |
std::vector< index_t > | polygons_around_vertex (index_t vertex_id, bool border_only, index_t first_polygon) const |
Determines the polygons around a vertex. More... | |
virtual index_t | polygon_adjacent (const PolygonLocalEdge &polygon_local_edge) const =0 |
Gets an adjacent polygon index by polygon index and local edge index. More... | |
virtual GEO::AttributesManager & | polygon_attribute_manager () const =0 |
virtual bool | polygons_are_simplicies () const =0 |
Tests whether all the polygons are triangles. when all the polygons are triangles, storage and access is optimized. More... | |
bool | is_triangle (index_t polygon_id) const |
PolygonType | polygone_type (index_t polygon_id) const |
bool | is_edge_on_border (const PolygonLocalEdge &polygon_local_edge) const |
bool | is_polygon_on_border (index_t polygon_index) const |
double | polygon_edge_length (const PolygonLocalEdge &polygon_local_edge) const |
Gets the length of the edge starting at a given vertex. More... | |
vecn< DIMENSION > | polygon_edge_barycenter (const PolygonLocalEdge &polygon_local_edge) const |
Gets the barycenter of the edge starting at a given vertex. More... | |
index_t | polygon_edge_vertex (const PolygonLocalEdge &polygon_local_edge, index_t vertex_id) const |
Gets the vertex index on the polygon edge. More... | |
vecn< DIMENSION > | polygon_barycenter (index_t polygon_id) const |
virtual double | polygon_area (index_t polygon_id) const =0 |
const NNSearch< DIMENSION > & | polygon_nn_search () const |
return the NNSearch at polygons More... | |
const SurfaceAABBTree< DIMENSION > & | polygon_aabb () const |
Creates an AABB tree for a Mesh polygons. More... | |
bool | is_mesh_valid () const override |
std::tuple< index_t, std::vector< index_t > > | connected_components () const final |
Public Member Functions inherited from RINGMesh::MeshBase< DIMENSION > | |
virtual | ~MeshBase ()=default |
virtual void | save_mesh (const std::string &filename) const =0 |
virtual void | print_mesh_bounded_attributes () const =0 |
virtual const vecn< DIMENSION > & | vertex (index_t v_id) const =0 |
Gets a point. More... | |
virtual index_t | nb_vertices () const =0 |
virtual GEO::AttributesManager & | vertex_attribute_manager () const =0 |
const NNSearch< DIMENSION > & | vertex_nn_search () const |
return the NNSearch at vertices More... | |
virtual MeshType | type_name () const =0 |
virtual std::string | default_extension () const =0 |
Static Public Member Functions | |
static std::unique_ptr< SurfaceMesh< DIMENSION > > | create_mesh (const MeshType type="") |
Protected Member Functions | |
SurfaceMeshBase ()=default | |
Protected Member Functions inherited from RINGMesh::MeshBase< DIMENSION > | |
MeshBase ()=default | |
Protected Attributes | |
std::unique_ptr< NNSearch< DIMENSION > > | nn_search_ {} |
std::unique_ptr< SurfaceAABBTree< DIMENSION > > | polygon_aabb_ {} |
Protected Attributes inherited from RINGMesh::MeshBase< DIMENSION > | |
std::unique_ptr< NNSearch< DIMENSION > > | vertex_nn_search_ {} |
Friends | |
class | SurfaceMeshBuilder< DIMENSION > |
class for encapsulating surface mesh component
|
protecteddefault |
index_t RINGMesh::SurfaceMeshBase< DIMENSION >::closest_vertex_in_polygon | ( | index_t | polygon_index, |
const vecn< DIMENSION > & | query_point | ||
) | const |
|
finalvirtual |
Implements RINGMesh::MeshBase< DIMENSION >.
|
static |
|
inline |
|
inlineoverridevirtual |
Implements RINGMesh::MeshBase< DIMENSION >.
|
inline |
|
inline |
|
pure virtual |
Gets the number of vertices in the polygon.
polygon_id. | ||
[in] | polygon_id | polygon index |
Implemented in RINGMesh::GeogramSurfaceMesh< DIMENSION >.
|
pure virtual |
Gets the number of all polygons in the whole Mesh.
Implemented in RINGMesh::GeogramSurfaceMesh< DIMENSION >.
PolygonLocalEdge RINGMesh::SurfaceMeshBase< DIMENSION >::next_on_border | ( | const PolygonLocalEdge & | polygon_local_edge | ) | const |
Get the next edge on the border.
The returned border edge is the next in the way of polygon edges orientation.
[in] | polygon_local_edge | input polygon index and its local edge index in the polygon |
|
inline |
|
inline |
|
pure virtual |
Gets an adjacent polygon index by polygon index and local edge index.
[in] | polygon_id | the polygon index. |
[in] | edge_id | the local edge index in |
polygon_id. |
edge_id | of the polygon |
polygon_id. | |
edge_id | < number of edge of the polygon |
polygon_id | . |
Implemented in RINGMesh::GeogramSurfaceMesh< DIMENSION >.
|
pure virtual |
Computes the Mesh polygon area
[in] | polygon_id | the polygon index |
Implemented in RINGMesh::SurfaceMesh< 2 >, and RINGMesh::SurfaceMesh< 3 >.
|
pure virtual |
Implemented in RINGMesh::GeogramSurfaceMesh< DIMENSION >.
|
inline |
|
inline |
|
inline |
|
inline |
index_t RINGMesh::SurfaceMeshBase< DIMENSION >::polygon_from_vertex_ids | ( | index_t | in0, |
index_t | in1 | ||
) | const |
|
inline |
|
pure virtual |
Gets the vertex index by polygon index and local vertex index.
[in] | polygon_local_vertex | the polygon index and the local edge index in the polygon. |
Implemented in RINGMesh::GeogramSurfaceMesh< DIMENSION >.
|
inline |
|
pure virtual |
Tests whether all the polygons are triangles. when all the polygons are triangles, storage and access is optimized.
Implemented in RINGMesh::GeogramSurfaceMesh< DIMENSION >.
std::vector< index_t > RINGMesh::SurfaceMeshBase< DIMENSION >::polygons_around_vertex | ( | index_t | vertex_id, |
bool | border_only, | ||
index_t | first_polygon | ||
) | const |
Determines the polygons around a vertex.
[in] | vertex_id | Index of the vertex in the surface |
[in] | border_only | If true only polygons on the border are considered |
[in] | first_polygon | (Optional) Index of one polygon containing the vertex |
P |
P |
first_polygon. | [PA] |
PolygonLocalEdge RINGMesh::SurfaceMeshBase< DIMENSION >::prev_on_border | ( | const PolygonLocalEdge & | polygon_local_edge | ) | const |
Get the previous edge on the border.
The returned border edge is the previous in the way of polygon edges orientation.
[in] | p | Input polygon index |
[in] | e | Edge index in the polygon |
|
inline |
index_t RINGMesh::SurfaceMeshBase< DIMENSION >::vertex_index_in_polygon | ( | index_t | polygon_index, |
index_t | vertex_id | ||
) | const |
Get the vertex index in a polygon.
polygon_index | from its global index in the SurfaceMesh |
vertex_id |
|
friend |
|
mutableprotected |
|
mutableprotected |