12#ifndef EBGeometry_Polygon2D
13#define EBGeometry_Polygon2D
135 std::vector<Vec2> m_points;
161 computeWindingNumber(
const Vec2&
P)
const noexcept;
169 computeCrossingNumber(
const Vec2&
P)
const noexcept;
177 computeSubtendedAngle(
const Vec2&
P)
const noexcept;
182#include "EBGeometry_Polygon2DImplem.hpp"
Declaration of 2D and 3D point/vector classes with templated precision. Used with DCEL tools.
Class for embedding a polygon face into 2D.
Definition EBGeometry_Polygon2D.hpp:43
bool isPointInsidePolygonSubtend(const Vec3 &a_point) const noexcept
Check if a point is inside a 2D polygon, using the subtended angles.
InsideOutsideAlgorithm
Supported algorithms for performing inside/outside tests when checking if a point projects to the ins...
Definition EBGeometry_Polygon2D.hpp:50
bool isPointInside(const Vec3 &a_point, const InsideOutsideAlgorithm a_algorithm) const noexcept
Check if a point is inside or outside the 2D polygon.
Polygon2D()=delete
Disallowed constructor, use the one with the normal vector and points.
bool isPointInsidePolygonWindingNumber(const Vec3 &a_point) const noexcept
Check if a point is inside a 2D polygon, using the winding number algorithm.
~Polygon2D()=default
Destructor (does nothing.
Polygon2D(const Vec3 &a_normal, const std::vector< Vec3 > &a_points)
Full constructor.
bool isPointInsidePolygonCrossingNumber(const Vec3 &a_point) const noexcept
Check if a point is inside a 2D polygon, by computing the number of times a ray crosses the polygon e...
Three-dimensional vector class with arithmetic operators.
Definition EBGeometry_Vec.hpp:218