Boost.Geometry    Boost C++ Libraries
Classes | Public Member Functions
boost::geometry::strategy::distance::projected_point< CalculationType, Strategy > Class Template Reference

Strategy for distance point to segment. More...

List of all members.

Classes

struct  calculation_type

Public Member Functions

template<typename Point , typename PointOfSegment >
calculation_type< Point,
PointOfSegment >::type 
apply (Point const &p, PointOfSegment const &p1, PointOfSegment const &p2) const

Detailed Description

template<typename CalculationType = void, typename Strategy = pythagoras<CalculationType>>
class boost::geometry::strategy::distance::projected_point< CalculationType, Strategy >

Strategy for distance point to segment.

Calculates distance using projected-point method, and (optionally) Pythagoras

Author:
Adapted from: http://geometryalgorithms.com/Archive/algorithm_0102/algorithm_0102.htm
Template Parameters:
CalculationTypenumeric type for calculation (e.g. high precision); if [*void] then it is extracted automatically from the coordinate type and (if necessary) promoted to floating point
Strategyunderlying point-point distance strategy
Concepts for Strategy:
  • cartesian_distance operator(Point,Point)
Note:
If the Strategy is a "comparable::pythagoras", this strategy automatically is a comparable projected_point strategy (so without sqrt)

Member Function Documentation

template<typename CalculationType = void, typename Strategy = pythagoras<CalculationType>>
template<typename Point , typename PointOfSegment >
calculation_type<Point, PointOfSegment>::type boost::geometry::strategy::distance::projected_point< CalculationType, Strategy >::apply ( Point const &  p,
PointOfSegment const &  p1,
PointOfSegment const &  p2 
) const

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
Documentation is generated by Doxygen