MeshKernel
Public Member Functions | Static Public Member Functions | List of all members
meshkernel::Mesh2DIntersections Class Referencefinal

Compute the intersections of polygon inner and outer perimeters. More...

#include <Mesh2DIntersections.hpp>

Public Member Functions

 Mesh2DIntersections (Mesh2D &mesh)
 Constructor.
 
void Compute (const Polygons &polygon)
 Compute intersection with a polygon, possibly containing multiple polylines. More...
 
void Compute (const std::vector< Point > &polyLine)
 Compute intersection with a single polyline. More...
 
const auto & EdgeIntersections () const
 Gets the edge intersections. More...
 
const auto & FaceIntersections () const
 Gets the face intersections. More...
 

Static Public Member Functions

template<typename T >
static void sortAndEraseIntersections (std::vector< T > &intersections)
 Sort intersections by polyline distance and erase entries with no intersections. More...
 

Detailed Description

Compute the intersections of polygon inner and outer perimeters.

Note
Uses a breadth first algorithm to reduce runtime complexity

Member Function Documentation

◆ Compute() [1/2]

void meshkernel::Mesh2DIntersections::Compute ( const Polygons polygon)

Compute intersection with a polygon, possibly containing multiple polylines.

Parameters
[in]polygonAn input polygon

◆ Compute() [2/2]

void meshkernel::Mesh2DIntersections::Compute ( const std::vector< Point > &  polyLine)

Compute intersection with a single polyline.

Parameters
[in]polyLineAn input polyline

◆ EdgeIntersections()

const auto& meshkernel::Mesh2DIntersections::EdgeIntersections ( ) const
inline

Gets the edge intersections.

Returns
The edges intersections

◆ FaceIntersections()

const auto& meshkernel::Mesh2DIntersections::FaceIntersections ( ) const
inline

Gets the face intersections.

Returns
The faces intersections

◆ sortAndEraseIntersections()

template<typename T >
static void meshkernel::Mesh2DIntersections::sortAndEraseIntersections ( std::vector< T > &  intersections)
inlinestatic

Sort intersections by polyline distance and erase entries with no intersections.

Template Parameters
TAn intersection type, EdgeMeshPolyLineIntersection or FaceMeshPolyLineIntersection
Parameters
intersectionsa vector containing the intersections

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