OpenSWMM Engine  6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
FootprintGeometry.hpp File Reference

Geometry and overlap calculations for source footprints. More...

#include <algorithm>
#include <functional>
#include <cmath>
#include <numeric>
#include <limits>
#include <string>
#include <vector>
Include dependency graph for FootprintGeometry.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  openswmm::twoD::footprint::Point
 

Namespaces

namespace  openswmm
 
namespace  openswmm::twoD
 
namespace  openswmm::twoD::footprint
 

Typedefs

using openswmm::twoD::footprint::Ring = std::vector<Point>
 

Functions

double openswmm::twoD::footprint::cross (Point a, Point b, Point c)
 Compute the oriented twice-area of a triangle in planar coordinates.
 
double openswmm::twoD::footprint::signedArea (const Ring &p)
 Sum a polygon ring's signed triangle-fan area.
 
double openswmm::twoD::footprint::tolerance (const Ring &p)
 Derive a scale-relative tolerance for ring cross products and areas.
 
bool openswmm::twoD::footprint::between (Point a, Point b, Point p, double eps)
 Test whether a point lies on a closed segment within a cross-product tolerance.
 
bool openswmm::twoD::footprint::intersects (Point a, Point b, Point c, Point d, double eps)
 Test closed planar segments for proper crossing or endpoint/collinear contact.
 
std::string openswmm::twoD::footprint::triangulate (Ring &p, std::vector< Ring > &triangles, const std::function< bool()> &running={})
 Validate a simple ring and triangulate it by counterclockwise ear clipping.
 
double openswmm::twoD::footprint::intersectionArea (Ring subject, const Ring &clip)
 Clip a polygon against a counterclockwise convex ring and return its area.
 

Detailed Description

Geometry and overlap calculations for source footprints.

Author
Caleb Buahin caleb.nosp@m..bua.nosp@m.hin@g.nosp@m.mail.nosp@m..com
License
Apache-2.0