33#if defined(Hull2DHelpers_RECURSES)
34#error Recursive header files inclusion detected in Hull2DHelpers.h
37#define Hull2DHelpers_RECURSES
39#if !defined Hull2DHelpers_h
41#define Hull2DHelpers_h
48#include "boost/utility.hpp"
50#include "DGtal/base/Common.h"
51#include "DGtal/base/IteratorCirculatorTraits.h"
52#include "DGtal/base/FrontInsertionSequenceToStackAdapter.h"
53#include "DGtal/base/BackInsertionSequenceToStackAdapter.h"
54#include "DGtal/base/CStack.h"
55#include "DGtal/geometry/tools/CPolarPointComparator2D.h"
56#include "DGtal/geometry/tools/PolarPointComparatorBy2x2DetComputer.h"
57#include "DGtal/geometry/tools/determinant/COrientationFunctor2.h"
58#include "DGtal/geometry/tools/determinant/PredicateFromOrientationFunctor2.h"
59#include "DGtal/geometry/tools/determinant/AvnaimEtAl2x2DetSignComputer.h"
60#include "DGtal/geometry/tools/determinant/Simple2x2DetComputer.h"
98 template <
typename Stack,
102 const Point& aNewPoint,
103 const Predicate& aPredicate);
120 template <
typename Stack,
124 const Point& aNewPoint,
125 const Predicate& aPredicate);
144 template <
typename Stack,
145 typename ForwardIterator,
148 const ForwardIterator& itb,
149 const ForwardIterator& ite,
150 const Predicate& aPredicate);
170 template <
typename Stack,
171 typename ForwardIterator,
174 const ForwardIterator& itb,
175 const ForwardIterator& ite,
176 const Predicate& aPredicate);
192 template <
typename ForwardIterator,
193 typename OutputIterator,
196 const ForwardIterator& ite,
198 const Predicate& aPredicate);
217 template <
typename ForwardIterator,
218 typename OutputIterator,
221 const ForwardIterator& ite,
223 const Predicate& aPredicate);
242 template <
typename ForwardIterator,
243 typename OutputIterator,
246 const ForwardIterator& ite,
248 const Predicate& aPredicate);
281 template <
typename ForwardIterator,
282 typename OutputIterator,
284 typename PolarComparator >
286 const ForwardIterator& ite,
288 const Predicate& aPredicate,
289 PolarComparator& aPolarComparator);
319 template <
typename ForwardIterator,
320 typename OutputIterator,
322 typename PolarComparator >
324 const ForwardIterator& ite,
326 const Predicate& aPredicate);
352 template <
typename ForwardIterator,
353 typename OutputIterator,
356 const ForwardIterator& ite,
358 const Predicate& aPredicate );
390 template <
typename ForwardIterator >
392 const ForwardIterator& ite,
428 template <
typename ForwardIterator,
429 typename TInputPoint >
431 const ForwardIterator& ite,
433 TInputPoint& antipodalEdgeP,
434 TInputPoint& antipodalEdgeQ,
435 TInputPoint& antipodalVertexR);
446 template<
typename TInputPo
int>
448 double getAngle(
const TInputPoint& a,
const TInputPoint& b,
const TInputPoint& c,
const TInputPoint& d);
459 template<
typename TInputPo
int>
462 const TInputPoint& c,
const TInputPoint& d );
485 template<
typename TInputPo
int>
499 template<
typename TInputPo
int>
514 template<
typename TInputPo
int>
528 template<
typename TInputPo
int>
542#include "DGtal/geometry/tools/MelkmanConvexHull.h"
546#include "DGtal/geometry/tools/Hull2DHelpers.ih"
553#undef Hull2DHelpers_RECURSES
double computeHProjDistance(const TInputPoint &a, const TInputPoint &b, const TInputPoint &c, bool &isInside)
void buildHullWithStack(Stack &aStack, const ForwardIterator &itb, const ForwardIterator &ite, const Predicate &aPredicate)
Procedure that retrieves the vertices of the convex hull of a weakly externally visible polygon (WEVP...
void andrewConvexHullAlgorithm(const ForwardIterator &itb, const ForwardIterator &ite, OutputIterator res, const Predicate &aPredicate)
Procedure that retrieves the vertices of the hull of a set of 2D points given by the range [ itb ,...
double computeEuclideanDistance(const TInputPoint &a, const TInputPoint &b, const TInputPoint &c, bool &isInside)
void closedGrahamScanFromAnyPoint(const ForwardIterator &itb, const ForwardIterator &ite, OutputIterator res, const Predicate &aPredicate)
Procedure that retrieves the vertices of the convex hull of a weakly externally visible polygon (WEVP...
double computeVProjDistance(const TInputPoint &a, const TInputPoint &b, const TInputPoint &c, bool &isInside)
double getAngle(const TInputPoint &a, const TInputPoint &b, const TInputPoint &c, const TInputPoint &d)
void buildHullWithAdaptedStack(Stack aStack, const ForwardIterator &itb, const ForwardIterator &ite, const Predicate &aPredicate)
Procedure that calls Hull2D::buildHullWithStack on a copy of the stack object used to retrieved the h...
void openGrahamScan(const ForwardIterator &itb, const ForwardIterator &ite, OutputIterator res, const Predicate &aPredicate)
Procedure that retrieves the vertices of the convex hull of a weakly externally visible polygon (WEVP...
double getThicknessAntipodalPair(const TInputPoint &p, const TInputPoint &q, const TInputPoint &r, const ThicknessDefinition &def)
double computeHullThickness(const ForwardIterator &itb, const ForwardIterator &ite, const ThicknessDefinition &def)
Procedure to compute the convex hull thickness given from different definitions (Horizontal/vertical ...
void updateHullWithAdaptedStack(Stack aStack, const Point &aNewPoint, const Predicate &aPredicate)
Procedure that calls Hull2D::updateHullWithStack on a copy of the stack object used to retrieved the ...
void updateHullWithStack(Stack &aStack, const Point &aNewPoint, const Predicate &aPredicate)
Procedure that updates the hull when an extra point aNewPoint is considered: while the last three con...
ThicknessDefinition
The 2 thickness definitions.
@ HorizontalVerticalThickness
constexpr double angleTolerance
void grahamConvexHullAlgorithm(const ForwardIterator &itb, const ForwardIterator &ite, OutputIterator res, const Predicate &aPredicate, PolarComparator &aPolarComparator)
Procedure that retrieves the vertices of the convex hull of a set of 2D points given by the range [ i...
bool isCoLinearOpp(const TInputPoint &a, const TInputPoint &b, const TInputPoint &c, const TInputPoint &d)
void closedGrahamScanFromVertex(const ForwardIterator &itb, const ForwardIterator &ite, OutputIterator res, const Predicate &aPredicate)
Procedure that retrieves the vertices of the convex hull of a weakly externally visible polygon (WEVP...
DGtal is the top-level namespace which contains all DGtal functions and types.