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

Click here to view the latest version of this page.
PrevUpHomeNext

model::segment

Class segment: small class containing two points.

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 Point>
class model::segment
{
  // ...
};

Template parameter(s)

Parameter

Description

typename Point

Constructor(s)

Function

Description

Parameters

segment()

segment(Point const & p1, Point const & p2)

Point const &: p1:

Point const &: p2:

Header

Either

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

Or

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


PrevUpHomeNext