MeshKernel
Loading...
Searching...
No Matches
MeshFaceCenters.hpp
1//---- GPL ---------------------------------------------------------------------
2//
3// Copyright (C) Stichting Deltares, 2011-2025.
4//
5// This program is free software: you can redistribute it and/or modify
6// it under the terms of the GNU General Public License as published by
7// the Free Software Foundation version 3.
8//
9// This program is distributed in the hope that it will be useful,
10// but WITHOUT ANY WARRANTY; without even the implied warranty of
11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12// GNU General Public License for more details.
13//
14// You should have received a copy of the GNU General Public License
15// along with this program. If not, see <http://www.gnu.org/licenses/>.
16//
17// contact: delft3d.support@deltares.nl
18// Stichting Deltares
19// P.O. Box 177
20// 2600 MH Delft, The Netherlands
21//
22// All indications and logos of, and references to, "Delft3D" and "Deltares"
23// are registered trademarks of Stichting Deltares, and remain the property of
24// Stichting Deltares. All rights reserved.
25//
26//------------------------------------------------------------------------------
27
28#pragma once
29
30#include <array>
31#include <span>
32#include <vector>
33
34#include "MeshKernel/Definitions.hpp"
35#include "MeshKernel/Mesh.hpp"
36#include "MeshKernel/Point.hpp"
37
38namespace meshkernel::algo
39{
41 std::vector<Point> ComputeFaceCircumcenters(const Mesh& mesh);
42
44 void ComputeFaceCircumcenters(const Mesh& mesh, std::span<Point> faceCenters);
45
47 Point CircumcenterOfTriangle(const Point& firstNode, const Point& secondNode, const Point& thirdNode, const Projection projection);
48
50 Point ComputeFaceCircumenter(std::vector<Point>& polygon,
51 const std::vector<UInt>& edgesNumFaces,
52 const Projection projection);
53
55 Point ComputeCircumCenter(const Point& centerOfMass,
56 const UInt pointCount,
57 const std::array<Point, constants::geometric::maximumNumberOfNodesPerFace>& middlePoints,
58 const std::array<Point, constants::geometric::maximumNumberOfNodesPerFace>& normals,
59 const Projection projection);
60
61} // namespace meshkernel::algo
Projection
Enumerator describing the supported projections.
Definition Definitions.hpp:43
std::uint32_t UInt
Integer type used when indexing mesh graph entities.
Definition Definitions.hpp:39