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

#include <mesh.h>

Inheritance diagram for RINGMesh::SurfaceMesh< 3 >:
RINGMesh::SurfaceMeshBase< 3 > RINGMesh::MeshBase< DIMENSION >

Public Member Functions

double polygon_area (index_t polygon_id) const
 
vec3 polygon_normal (index_t polygon_id) const
 
vec3 normal_at_vertex (index_t vertex_id, index_t p0=NO_ID) const
 Computes the normal of the Mesh2D at the vertex location it computes the average value of polygon normal neighbors. More...
 
- Public Member Functions inherited from RINGMesh::SurfaceMeshBase< 3 >
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
 
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
 

Additional Inherited Members

- Static Public Member Functions inherited from RINGMesh::SurfaceMeshBase< 3 >
static std::unique_ptr< SurfaceMesh< DIMENSION > > create_mesh (const MeshType type="")
 
- Protected Member Functions inherited from RINGMesh::SurfaceMeshBase< 3 >
 SurfaceMeshBase ()=default
 
- Protected Member Functions inherited from RINGMesh::MeshBase< DIMENSION >
 MeshBase ()=default
 
- Protected Attributes inherited from RINGMesh::SurfaceMeshBase< 3 >
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_ {}
 

Detailed Description

template<>
class RINGMesh::SurfaceMesh< 3 >

Definition at line 751 of file mesh.h.

Member Function Documentation

◆ normal_at_vertex()

vec3 RINGMesh::SurfaceMesh< 3 >::normal_at_vertex ( index_t  vertex_id,
index_t  p0 = NO_ID 
) const
inline

Computes the normal of the Mesh2D at the vertex location it computes the average value of polygon normal neighbors.

Parameters
[in]vertex_idthe vertex index
[in]p0index of a polygon that contain the vertex
vertex_id
Returns
the normal at the given vertex

Definition at line 786 of file mesh.h.

◆ polygon_area()

double RINGMesh::SurfaceMesh< 3 >::polygon_area ( index_t  polygon_id) const
virtual

Computes the Mesh polygon area

Parameters
[in]polygon_idthe polygon index
Returns
the polygon area

Implements RINGMesh::SurfaceMeshBase< 3 >.

Definition at line 523 of file mesh.cpp.

◆ polygon_normal()

vec3 RINGMesh::SurfaceMesh< 3 >::polygon_normal ( index_t  polygon_id) const
inline

Computes the Mesh polygon normal

Parameters
[in]polygon_idthe polygon index
Returns
the polygon normal

Definition at line 766 of file mesh.h.


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