Boost.Geometry    Boost C++ Libraries
Public Types | Public Member Functions | List of all members
boost::geometry::model::polygon< Point, ClockWise, Closed, PointList, RingList, PointAlloc, RingAlloc > Class Template Reference

The polygon contains an outer ring and zero or more inner rings. More...

Public Types

typedef RingList< ring_type,
RingAlloc< ring_type > > 
inner_container_type
 
typedef Point point_type
 
typedef ring< Point, ClockWise,
Closed, PointList, PointAlloc > 
ring_type
 

Public Member Functions

void clear ()
 Utility method, clears outer and inner rings. More...
 
inner_container_type const & inners () const
 
inner_container_typeinners ()
 
ring_type const & outer () const
 
ring_typeouter ()
 
 polygon ()
 Default constructor, creating an empty polygon. More...
 
 polygon (std::initializer_list< ring_type > l)
 Constructor taking std::initializer_list, filling the polygon. More...
 

Detailed Description

template<typename Point, bool ClockWise = true, bool Closed = true, template< typename, typename > class PointList = std::vector, template< typename, typename > class RingList = std::vector, template< typename > class PointAlloc = std::allocator, template< typename > class RingAlloc = std::allocator>
class boost::geometry::model::polygon< Point, ClockWise, Closed, PointList, RingList, PointAlloc, RingAlloc >

The polygon contains an outer ring and zero or more inner rings.

Template Parameters
Pointpoint type
ClockWisetrue for clockwise direction, false for CounterClockWise direction
Closedtrue for closed polygons (last point == first point), false open points
PointListcontainer type for points, for example std::vector, std::list, std::deque
RingListcontainer type for inner rings, for example std::vector, std::list, std::deque
PointAlloccontainer-allocator-type, for the points
RingAlloccontainer-allocator-type, for the rings
Note
The container collecting the points in the rings can be different from the container collecting the inner rings. They all default to vector.
Examples:
02_linestring_example.cpp, 03_polygon_example.cpp, 06_a_transformation_example.cpp, and 06_b_transformation_example.cpp.

Member Typedef Documentation

template<typename Point, bool ClockWise = true, bool Closed = true, template< typename, typename > class PointList = std::vector, template< typename, typename > class RingList = std::vector, template< typename > class PointAlloc = std::allocator, template< typename > class RingAlloc = std::allocator>
typedef Point boost::geometry::model::polygon< Point, ClockWise, Closed, PointList, RingList, PointAlloc, RingAlloc >::point_type
template<typename Point, bool ClockWise = true, bool Closed = true, template< typename, typename > class PointList = std::vector, template< typename, typename > class RingList = std::vector, template< typename > class PointAlloc = std::allocator, template< typename > class RingAlloc = std::allocator>
typedef ring<Point, ClockWise, Closed, PointList, PointAlloc> boost::geometry::model::polygon< Point, ClockWise, Closed, PointList, RingList, PointAlloc, RingAlloc >::ring_type
template<typename Point, bool ClockWise = true, bool Closed = true, template< typename, typename > class PointList = std::vector, template< typename, typename > class RingList = std::vector, template< typename > class PointAlloc = std::allocator, template< typename > class RingAlloc = std::allocator>
typedef RingList<ring_type , RingAlloc<ring_type > > boost::geometry::model::polygon< Point, ClockWise, Closed, PointList, RingList, PointAlloc, RingAlloc >::inner_container_type

Constructor & Destructor Documentation

template<typename Point, bool ClockWise = true, bool Closed = true, template< typename, typename > class PointList = std::vector, template< typename, typename > class RingList = std::vector, template< typename > class PointAlloc = std::allocator, template< typename > class RingAlloc = std::allocator>
boost::geometry::model::polygon< Point, ClockWise, Closed, PointList, RingList, PointAlloc, RingAlloc >::polygon ( )

Default constructor, creating an empty polygon.

template<typename Point, bool ClockWise = true, bool Closed = true, template< typename, typename > class PointList = std::vector, template< typename, typename > class RingList = std::vector, template< typename > class PointAlloc = std::allocator, template< typename > class RingAlloc = std::allocator>
boost::geometry::model::polygon< Point, ClockWise, Closed, PointList, RingList, PointAlloc, RingAlloc >::polygon ( std::initializer_list< ring_type l)

Constructor taking std::initializer_list, filling the polygon.

Member Function Documentation

template<typename Point, bool ClockWise = true, bool Closed = true, template< typename, typename > class PointList = std::vector, template< typename, typename > class RingList = std::vector, template< typename > class PointAlloc = std::allocator, template< typename > class RingAlloc = std::allocator>
ring_type const& boost::geometry::model::polygon< Point, ClockWise, Closed, PointList, RingList, PointAlloc, RingAlloc >::outer ( ) const
template<typename Point, bool ClockWise = true, bool Closed = true, template< typename, typename > class PointList = std::vector, template< typename, typename > class RingList = std::vector, template< typename > class PointAlloc = std::allocator, template< typename > class RingAlloc = std::allocator>
inner_container_type const& boost::geometry::model::polygon< Point, ClockWise, Closed, PointList, RingList, PointAlloc, RingAlloc >::inners ( ) const
template<typename Point, bool ClockWise = true, bool Closed = true, template< typename, typename > class PointList = std::vector, template< typename, typename > class RingList = std::vector, template< typename > class PointAlloc = std::allocator, template< typename > class RingAlloc = std::allocator>
ring_type& boost::geometry::model::polygon< Point, ClockWise, Closed, PointList, RingList, PointAlloc, RingAlloc >::outer ( )
template<typename Point, bool ClockWise = true, bool Closed = true, template< typename, typename > class PointList = std::vector, template< typename, typename > class RingList = std::vector, template< typename > class PointAlloc = std::allocator, template< typename > class RingAlloc = std::allocator>
inner_container_type& boost::geometry::model::polygon< Point, ClockWise, Closed, PointList, RingList, PointAlloc, RingAlloc >::inners ( )
template<typename Point, bool ClockWise = true, bool Closed = true, template< typename, typename > class PointList = std::vector, template< typename, typename > class RingList = std::vector, template< typename > class PointAlloc = std::allocator, template< typename > class RingAlloc = std::allocator>
void boost::geometry::model::polygon< Point, ClockWise, Closed, PointList, RingList, PointAlloc, RingAlloc >::clear ( )

Utility method, clears outer and inner rings.


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