boost::geometry::model::referring_segment< ConstOrNonConstPoint > Class Template Reference
geometries: geometries provided by default

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

List of all members.

## Public Member Functions

| referring_segment (point_type &p1, point_type &p2)
| Constructor taking the first and the second point.

## Public Attributes

point_type & | first
point_type & | second

## Detailed Description

### template<typename ConstOrNonConstPoint>
class boost::geometry::model::referring_segment< ConstOrNonConstPoint >

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.

Note:
  The structure is like std::pair, and can often be used interchangeable. Difference is that it refers to points, does not have points.
  Like std::pair, points are public available.
  type is const or non const, so geometry::segment<P> or geometry::segment<P const>
  We cannot derive from std::pair<P&, P&> because of reference assignments.

Template Parameters:

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

## Constructor & Destructor Documentation

template<typename ConstOrNonConstPoint >

boost::geometry::model::referring_segment< ConstOrNonConstPoint >::referring_segment | ( | point_type & | p1,
|  | point_type & | p2
| ) |  |

Constructor taking the first and the second point.

## Member Data Documentation

template<typename ConstOrNonConstPoint >

point_type& boost::geometry::model::referring_segment< ConstOrNonConstPoint >::first

template<typename ConstOrNonConstPoint >

point_type& boost::geometry::model::referring_segment< ConstOrNonConstPoint >::second

April 2, 2011 | Copyright © 2007-2011 Barend Gehrels, Amsterdam, the Netherlands Copyright © 2008-2011 Bruno Lalande, Paris, France Copyright © 2009-2010 Mateusz Loskot, London, UK