Pangolin
Header-only C++20 plane computational geometry library
Loading...
Searching...
No Matches
sortpoints.hpp File Reference

Angular sorting of points around a center. More...

#include "algorithm/xysweep.hpp"
#include <algorithm>
#include <type_traits>
#include <vector>

Go to the source code of this file.

Namespaces

namespace  pgl

Functions

template<class Number, class Label, class CenterNumber, class CenterLabel>
void pgl::sortAround (std::vector< Point< Number, Label > > &points, const Point< CenterNumber, CenterLabel > &p)
 Sorts points counterclockwise around a center point.
template<class Number, class Label>
void pgl::hilbertSort (std::vector< Point< Number, Label > > &points)
 Sorts points along a Hilbert space-filling curve.

Detailed Description

Angular sorting of points around a center.

Algorithm headers sit above the shape API and express reusable geometry procedures in terms of the public primitives.