MeshKernel
|
A class describing land boundaries. These are used to visualise the land-water interface. More...
#include <LandBoundaries.hpp>
Public Types | |
enum | ProjectToLandBoundaryOption { DoNotProjectToLandBoundary = 0, ToOriginalNetBoundary = 1, OuterMeshBoundaryToLandBoundary = 2, InnerAndOuterMeshBoundaryToLandBoundary = 3, WholeMesh = 4 } |
Enumerator describing the options how to project to the land boundary. | |
Public Member Functions | |
LandBoundaries ()=default | |
Default constructor. | |
LandBoundaries (const std::vector< Point > &landBoundary, Mesh2D &mesh, const Polygons &polygons) | |
Default constructor. More... | |
void | Administrate () |
The portion of the boundary segments close enough to the mesh boundary are flagged (admin_landboundary_segments) More... | |
void | FindNearestMeshBoundary (ProjectToLandBoundaryOption projectToLandBoundaryOption) |
Find the mesh boundary line closest to the land boundary (find_nearest_meshline). More... | |
std::unique_ptr< UndoAction > | SnapMeshToLandBoundaries () const |
Snap the mesh nodes to land boundaries (snap_to_landboundary) | |
auto | GetNumNodes () const |
Gets the number of land boundary nodes. More... | |
Public Attributes | |
std::vector< UInt > | m_meshNodesLandBoundarySegments |
Mesh nodes to land boundary mapping (lanseg_map) | |
A class describing land boundaries. These are used to visualise the land-water interface.
The main responsibility of this class is to store the land boundary polygons, categorize them based on their proximity to a mesh and provide the functionality to assign each mesh node to the appropriate land boundary polyline.
meshkernel::LandBoundaries::LandBoundaries | ( | const std::vector< Point > & | landBoundary, |
Mesh2D & | mesh, | ||
const Polygons & | polygons | ||
) |
Default constructor.
[in] | landBoundary | A vector of points defining the land boundary. |
[in] | mesh | The current 2d mesh. |
[in] | polygons | A polygon for selecting part of the land boundaries. |
void meshkernel::LandBoundaries::Administrate | ( | ) |
The portion of the boundary segments close enough to the mesh boundary are flagged (admin_landboundary_segments)
This method uses a Point vector member variable and identifies the start-end points of each land boundary polyline with the requirement that all polyline nodes are close enough to the mesh boundary and are inside the polygon.
void meshkernel::LandBoundaries::FindNearestMeshBoundary | ( | ProjectToLandBoundaryOption | projectToLandBoundaryOption | ) |
Find the mesh boundary line closest to the land boundary (find_nearest_meshline).
[in] | projectToLandBoundaryOption | The option describing the projection to the land boundary. |
|
inline |
Gets the number of land boundary nodes.