Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

PrevUpHomeNext

model::referring_segment

Class segment: small class containing two (templatized) point references.

Description

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.

Synopsis

template<typename ConstOrNonConstPoint>
class model::referring_segment
{
  // ...
};

Template parameter(s)

Parameter

Description

typename ConstOrNonConstPoint

point type of the segment, maybe a point or a const point

Constructor(s)

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:

Header

Either

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

Or

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


PrevUpHomeNext