GeomProcess
The GeMA Geometry Process Plugin
Loading...
Searching...
No Matches
convexHull.cpp File Reference

Implementation of the ConvexHull2D helper function. More...

#include "convexHull.h"
#include <gmValueAccessor.h>
#include <gmTrace.h>
Include dependency graph for convexHull.cpp:

Functions

static bool ccw2D (const GmValueAccessor *nodeAccessor, int ia, int ib, int ic)
 Returns true if the three points make a counter-clockwise turn.
 
static bool ccw2D_incl (const GmValueAccessor *nodeAccessor, int ia, int ib, int ic, double relTol)
 Returns true if the three points make a counter-clockwise turn.
 
static void primMST (const GmValueAccessor *nodeAccessor, const QVector< int > &nodeIds, QVector< int > &mst)
 
static void primMST (const GmMatrix &graph, QVector< int > &mst)
 
static int minKey (const QVector< int > &key, const QVector< int > &mstSet)
 
bool ConvexHull2D (const GmValueAccessor *nodeAccessor, QVector< int > &nodeIds, bool inclusive)
 Returns the convex hull of a list of nodes. The returned list of node ids is CCW ordered. If 'inclusive' option is true, the returned list will contain the potential collinear nodes. Based on https://www.algorithmist.com/index.php/Monotone_Chain_Convex_Hull.cpp.
 

Detailed Description

Implementation of the ConvexHull2D helper function.

Author
Erwan Yann Renaut
Date
may, 2019