28 COUNTERCLOCKWISE = 0x04,
34 constexpr OrientationInterval operator|(OrientationInterval a, OrientationInterval b)
35 {
return static_cast<OrientationInterval
>(
static_cast<int>(a) |
static_cast<int>(b)); }
46 if(x == OrientationInterval::EMPTY)
48 else if(x == OrientationInterval::COLINEAR)
50 else if(x == OrientationInterval::CLOCKWISE)
52 else if(x == OrientationInterval::COUNTERCLOCKWISE)
54 else if(x == (OrientationInterval::COLINEAR | OrientationInterval::CLOCKWISE))
56 else if(x == (OrientationInterval::COLINEAR | OrientationInterval::COUNTERCLOCKWISE))
59 os <<
"[ col, cw, ccw ]";
106 std::vector<IntervalVector>
convex_hull(std::vector<IntervalVector> pts);
std::ostream & operator<<(std::ostream &os, const BoolInterval &x)
Streams out a BoolInterval.
Definition codac2_BoolInterval.h:45
BoolInterval
Enumeration representing a boolean interval.
Definition codac2_BoolInterval.h:23
@ UNKNOWN
Definition codac2_BoolInterval.h:29
@ EMPTY
Definition codac2_BoolInterval.h:27
OrientationInterval
Enumeration representing feasible orientations. Can be used to assess an oriented angle,...
Definition codac2_geometry.h:25
@ UNKNOWN
Definition codac2_geometry.h:31
BoolInterval aligned(const IntervalVector &p1, const IntervalVector &p2, const IntervalVector &p3)
Checks whether three 2D points are aligned (colinear).
std::vector< IntervalVector > convex_hull(std::vector< IntervalVector > pts)
Computes the convex hull of a set of 2d points.
OrientationInterval orientation(const IntervalVector &p1, const IntervalVector &p2, const IntervalVector &p3)
Computes the orientation of an ordered triplet of 2D points.