SWMMVis  6.0.0-alpha.4
Qt6/C++ GIS-based graphical user interface for the SWMMVis engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
OpenSWMM::Contour::detail Namespace Reference

Functions

void clipHalfplane (const std::vector< QPointF > &inPts, const std::vector< double > &inVals, double L, bool keepAbove, std::vector< QPointF > &outPts, std::vector< double > &outVals)
 Sutherland-Hodgman clip of a convex polygon against the half-plane defined by value >= L (when keepAbove) or value <= L (else).
 

Function Documentation

◆ clipHalfplane()

void OpenSWMM::Contour::detail::clipHalfplane ( const std::vector< QPointF > &  inPts,
const std::vector< double > &  inVals,
double  L,
bool  keepAbove,
std::vector< QPointF > &  outPts,
std::vector< double > &  outVals 
)
inline

Sutherland-Hodgman clip of a convex polygon against the half-plane defined by value >= L (when keepAbove) or value <= L (else).

Input polygon vertices/values are read from inPts / inVals. Output is written to outPts / outVals (cleared on entry). Vertex values are tracked alongside vertices so chained clips against multiple levels stay numerically consistent. New vertices introduced by edge intersections receive value = L exactly.

Here is the caller graph for this function: