Boost.Geometry    Boost C++ Libraries
Public Member Functions | List of all members
boost::geometry::model::point< CoordinateType, DimensionCount, CoordinateSystem > Class Template Reference

Basic point class, having coordinates defined in a neutral way. More...

Public Member Functions

template<std::size_t K>
CoordinateType const & get () const
 Get a coordinate. More...
 
 point ()=default
 Default constructor, no initialization. More...
 
 point (CoordinateType const &v0)
 Constructor to set one value. More...
 
 point (CoordinateType const &v0, CoordinateType const &v1)
 Constructor to set two values. More...
 
 point (CoordinateType const &v0, CoordinateType const &v1, CoordinateType const &v2)
 Constructor to set three values. More...
 
template<std::size_t K>
void set (CoordinateType const &value)
 Set a coordinate. More...
 

Detailed Description

template<typename CoordinateType, std::size_t DimensionCount, typename CoordinateSystem>
class boost::geometry::model::point< CoordinateType, DimensionCount, CoordinateSystem >

Basic point class, having coordinates defined in a neutral way.

Defines a neutral point class, fulfilling the Point Concept. Library users can use this point class, or use their own point classes. This point class is used in most of the samples and tests of Boost.Geometry This point class is used occasionally within the library, where a temporary point class is necessary.

Template Parameters
CoordinateTypenumerical type (int, double, ttmath, ...)
DimensionCountnumber of coordinates, usually 2 or 3
CoordinateSystemcoordinate system, for example cs::cartesian
Examples:
01_point_example.cpp, 02_linestring_example.cpp, 07_a_graph_route_example.cpp, 07_b_graph_route_example.cpp, and x03_b_soci_example.cpp.

Constructor & Destructor Documentation

template<typename CoordinateType, std::size_t DimensionCount, typename CoordinateSystem>
boost::geometry::model::point< CoordinateType, DimensionCount, CoordinateSystem >::point ( )
default

Default constructor, no initialization.

template<typename CoordinateType, std::size_t DimensionCount, typename CoordinateSystem>
boost::geometry::model::point< CoordinateType, DimensionCount, CoordinateSystem >::point ( CoordinateType const &  v0)
explicit

Constructor to set one value.

template<typename CoordinateType, std::size_t DimensionCount, typename CoordinateSystem>
boost::geometry::model::point< CoordinateType, DimensionCount, CoordinateSystem >::point ( CoordinateType const &  v0,
CoordinateType const &  v1 
)

Constructor to set two values.

template<typename CoordinateType, std::size_t DimensionCount, typename CoordinateSystem>
boost::geometry::model::point< CoordinateType, DimensionCount, CoordinateSystem >::point ( CoordinateType const &  v0,
CoordinateType const &  v1,
CoordinateType const &  v2 
)

Constructor to set three values.

Member Function Documentation

template<typename CoordinateType, std::size_t DimensionCount, typename CoordinateSystem>
template<std::size_t K>
CoordinateType const& boost::geometry::model::point< CoordinateType, DimensionCount, CoordinateSystem >::get ( ) const

Get a coordinate.

Template Parameters
Kcoordinate to get
Returns
the coordinate
template<typename CoordinateType, std::size_t DimensionCount, typename CoordinateSystem>
template<std::size_t K>
void boost::geometry::model::point< CoordinateType, DimensionCount, CoordinateSystem >::set ( CoordinateType const &  value)

Set a coordinate.

Template Parameters
Kcoordinate to set
Parameters
valuevalue to set

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