Using boost geometry to check if two lines have an intersection
问题 Is it possible to use boost::geometry to check whether two line segments (each given by two points in 2D) intersect each other? If this is possible, does boost::geometry allow to check also for special cases such as that only one point is (numerically) on the other line, or that both lines are equal? 回答1: If you are talking specifically about Boost.Geometry API to it is, of course, possible. Your code should look roughly like this #include <boost/geometry/geometries/segment.hpp> #include