Hi Jeremy,

Jeremy Murphy Via Geometry wrote:
I do have the code on GitHub now if you have time and inclination to take a look: https://github.com/jeremy-murphy/concave_hull

The most simple solution I found for now is to place forward declarations of hemisphere and your intersects() overloads before #include<boost/geometry.hpp>, so:

#include <boost/geometry/geometries/box.hpp>

namespace boost { namespace geometry {
namespace model {
    template <typename Point>
    struct hemisphere;
    template <typename Point, typename HemispherePoint>
    inline bool intersects(Point const& p, model::hemisphere<HemispherePoint> const& hs);

    template <typename Point, typename HemispherePoint>
    inline bool intersects(model::box<Point> const& b, model::hemisphere<HemispherePoint> const& hs);

#include <boost/geometry.hpp>

// the rest as it is in the file hemisphere.hpp

Note that hemisphere doesn't have to be defined in the bg::model namespace and that traits are not needed.


P.S. you have a bug here: https://github.com/jeremy-murphy/concave_hull/blob/master/hemisphere.hpp#L48
You're passing a point to a 2-argument set() function which is used for segments and boxes. Either remove the first argument or pass segment instead of a point.