...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 points.
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 Point> class model::segment : public std::pair< Point, Point > { // ... };
Parameter |
Description |
---|---|
typename Point |
Function |
Description |
Parameters |
---|---|---|
segment()
|
||
segment(Point const & p1, Point const & p2)
|
Point const &: p1: Point const &: p2: |
Either
#include <boost/geometry/geometries/geometries.hpp>
Or
#include <boost/geometry/geometries/segment.hpp>