[/============================================================================
  Boost.Geometry (aka GGL, Generic Geometry Library)

  Copyright (c) 2007-2013 Barend Gehrels, Amsterdam, the Netherlands.
  Copyright (c) 2008-2013 Bruno Lalande, Paris, France.
  Copyright (c) 2009-2013 Mateusz Loskot, London, UK.

  Use, modification and distribution is subject to the Boost Software License,
  Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
  http://www.boost.org/LICENSE_1_0.txt)
=============================================================================/]


[/ Generated by doxygen_xml2qbk 1.1.1, don't change, will be overwritten automatically]
[/ Generated from doxy/doxygen_output/xml/classboost_1_1geometry_1_1model_1_1polygon.xml]
[section:model_polygon model::polygon]

'''<indexterm><primary>model</primary></indexterm><indexterm><primary>polygon</primary></indexterm>'''
The polygon contains an outer ring and zero or more inner rings. 

[heading Model of]
[link geometry.reference.concepts.concept_polygon Polygon Concept]

[heading Synopsis]
``template<typename Point, bool ClockWise, bool Closed, template< typename, typename > class PointList,
         template< typename, typename > class RingList, template< typename > class PointAlloc, template< typename > class RingAlloc>
class model::polygon
{
  // ...
};
``

[heading Template parameter(s)]
[table
[[Parameter] [Default] [Description]]
[[typename Point] [] [point type ]]
[[bool ClockWise] [true] [true for clockwise direction, false for CounterClockWise direction ]]
[[bool Closed] [true] [true for closed polygons (last point == first point), false open points ]]
[[template< typename, typename > class PointList] [std::vector] [container type for points, for example std::vector, std::deque ]]
[[template< typename, typename > class RingList] [std::vector] [container type for inner rings, for example std::vector, std::deque ]]
[[template< typename > class PointAlloc] [std::allocator] [container-allocator-type, for the points ]]
[[template< typename > class RingAlloc] [std::allocator] [container-allocator-type, for the rings ]]
]

[heading Constructor(s)]
[table
[[Function] [Description] [Parameters] ]
[[``polygon()``

] [Default constructor, creating an empty polygon. ] [

]]
[[``polygon(std::initializer_list< ring_type > l)``

] [Constructor taking std::initializer_list, filling the polygon. ] [[* std::initializer_list< ring_type >]: ['l]:  



]]
]

[heading Member Function(s)]
[table
[[Function] [Description] [Parameters]  [Returns]]
[[``ring_type const & outer()``

] [] [

][

]
]
[[``inner_container_type const & inners()``

] [] [

][

]
]
[[``ring_type & outer()``

] [] [

][

]
]
[[``inner_container_type & inners()``

] [] [

][

]
]
[[``void clear()``

] [Utility method, clears outer and inner rings. ] [

][

]
]
]

[heading Header]
Either

`#include <boost/geometry/geometries/geometries.hpp>`


Or

`#include <boost/geometry/geometries/polygon.hpp>`

[include reference/geometries/polygon.qbk]

[endsect]