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

Segment Concept
PrevUpHomeNext
Description

The Segment Concept describes the requirements for a segment type. All algorithms in Boost.Geometry will check any geometry arguments against the concept requirements.

Concept Definition
  • there must be a specialization of traits::tag defining segment_tag as type
  • there must be a specialization of traits::point_type to define the underlying point type (even if it does not consist of points, it should define this type, to indicate the points it can work with)
  • there must be a specialization of traits::indexed_access, per index and per dimension, with two functions:
    • get to get a coordinate value
    • set to set a coordinate value (this one is not checked for ConstSegment)
[Note] Note

The segment concept is similar to the box concept, defining using another tag. However, the box concept assumes the index as min_corner, max_corner, while for the segment concept, there is no assumption.

Available Models

PrevUpHomeNext