diff --git a/libs/MeshKernel/include/MeshKernel/Mesh.hpp b/libs/MeshKernel/include/MeshKernel/Mesh.hpp index e35396370..5bdedc70a 100644 --- a/libs/MeshKernel/include/MeshKernel/Mesh.hpp +++ b/libs/MeshKernel/include/MeshKernel/Mesh.hpp @@ -306,10 +306,10 @@ namespace meshkernel [[nodiscard]] std::vector ComputeLocations(Location location) const; /// @brief Computes if a location is in polygon. - /// @param[in] index The closest neighbor index (index 0 corresponds to the closest). - /// @param[in] meshLocation The mesh location (e.g. nodes, edge centers or face circumcenters). + /// @param[in] polygon The input polygon. + /// @param[in] location The mesh location (e.g. nodes, edge centers or face circumcenters). /// @return The index of the closest location. - [[nodiscard]] std::vector ComputeLocationInPolygon(const Polygons& polygon, Location location) const; + [[nodiscard]] std::vector IsLocationInPolygon(const Polygons& polygon, Location location) const; /// @brief Add meshes: result is a mesh composed of the additions /// firstMesh += secondmesh results in the second mesh being added to firstMesh diff --git a/libs/MeshKernel/src/Mesh.cpp b/libs/MeshKernel/src/Mesh.cpp index 2f83deaf3..7e37223c6 100644 --- a/libs/MeshKernel/src/Mesh.cpp +++ b/libs/MeshKernel/src/Mesh.cpp @@ -276,7 +276,7 @@ void Mesh::MergeNodesInPolygon(const Polygons& polygon, double mergingDistance) // first filter the nodes in polygon std::vector filteredNodes(GetNumNodes()); std::vector originalNodeIndices(GetNumNodes(), constants::missing::uintValue); - const auto isNodeInPolygon = ComputeLocationInPolygon(polygon, Location::Nodes); + const auto isNodeInPolygon = IsLocationInPolygon(polygon, Location::Nodes); UInt index = 0; for (UInt i = 0; i < GetNumNodes(); ++i) @@ -401,7 +401,7 @@ double Mesh::ComputeMinEdgeLength(const Polygons& polygon) const auto const numEdges = GetNumEdges(); auto result = std::numeric_limits::max(); - const auto isNodeInPolygon = ComputeLocationInPolygon(polygon, Location::Nodes); + const auto isNodeInPolygon = IsLocationInPolygon(polygon, Location::Nodes); for (UInt e = 0; e < numEdges; e++) { const auto& [firstNode, secondNode] = m_edges[e]; @@ -897,7 +897,7 @@ std::vector Mesh::ComputeLocations(Location location) const return result; } -std::vector Mesh::ComputeLocationInPolygon(const Polygons& polygon, Location location) const +std::vector Mesh::IsLocationInPolygon(const Polygons& polygon, Location location) const { const auto locations = ComputeLocations(location); std::vector result(locations.size());