...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
Class segment: small class containing two (templatized) point references.
From Wikipedia: In geometry, a line segment is a part of a line that is bounded by two distinct end points, and contains every point on the line between its end points.
template<typename ConstOrNonConstPoint> class model::referring_segment { // ... };
Parameter |
Description |
---|---|
typename ConstOrNonConstPoint |
point type of the segment, maybe a point or a const point |
Function |
Description |
Parameters |
---|---|---|
referring_segment(point_type & p1, point_type & p2)
|
Constructor taking the first and the second point. |
point_type &: p1: point_type &: p2: |
Either
#include <boost/geometry/geometries/geometries.hpp>
Or
#include <boost/geometry/geometries/segment.hpp>