1[/============================================================================ 2 Boost.Geometry (aka GGL, Generic Geometry Library) 3 4 Copyright (c) 2007-2013 Barend Gehrels, Amsterdam, the Netherlands. 5 Copyright (c) 2008-2013 Bruno Lalande, Paris, France. 6 Copyright (c) 2009-2013 Mateusz Loskot, London, UK. 7 8 Use, modification and distribution is subject to the Boost Software License, 9 Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 10 http://www.boost.org/LICENSE_1_0.txt) 11=============================================================================/] 12 13 14[/ Generated by doxygen_xml2qbk 1.1.1, don't change, will be overwritten automatically] 15[/ Generated from doxy/doxygen_output/xml/group__within.xml] 16[section:within_2 within] 17 18'''<indexterm><primary>within</primary></indexterm>''' 19Checks if the first geometry is completely inside the second geometry. 20 21[heading Description] 22The free function within checks if the first geometry is completely inside the second geometry. 23 24[heading Synopsis] 25``template<typename Geometry1, typename Geometry2> 26bool within(Geometry1 const & geometry1, Geometry2 const & geometry2)`` 27 28[heading Parameters] 29 30[table 31[[Type] [Concept] [Name] [Description] ] 32[[Geometry1 const &] [Any type fulfilling a Geometry Concept ] [geometry1] [A model of the specified concept which might be within the second geometry ]] 33[[Geometry2 const &] [Any type fulfilling a Geometry Concept ] [geometry2] [A model of the specified concept which might contain the first geometry ]] 34] 35 36 37[heading Returns] 38true if geometry1 is completely contained within geometry2, else false 39 40[heading Header] 41Either 42 43`#include <boost/geometry.hpp>` 44 45 46Or 47 48`#include <boost/geometry/algorithms/within.hpp>` 49 50[include reference/algorithms/within.qbk] 51[heading Example] 52[within] 53[within_output] 54 55 56[endsect] 57 58[section:within_3_with_strategy within (with strategy)] 59 60'''<indexterm><primary>within</primary></indexterm>''' 61Checks if the first geometry is completely inside the second geometry using the specified strategy. 62 63[heading Description] 64The free function within checks if the first geometry is completely inside the second geometry, using the specified strategy. Reasons to specify a strategy include: use another coordinate system for calculations; construct the strategy beforehand (e.g. with the radius of the Earth); select a strategy when there are more than one available for a calculation. 65 66[heading Synopsis] 67``template<typename Geometry1, typename Geometry2, typename Strategy> 68bool within(Geometry1 const & geometry1, Geometry2 const & geometry2, Strategy const & strategy)`` 69 70[heading Parameters] 71 72[table 73[[Type] [Concept] [Name] [Description] ] 74[[Geometry1 const &] [Any type fulfilling a Geometry Concept ] [geometry1] [A model of the specified concept which might be within the second geometry ]] 75[[Geometry2 const &] [Any type fulfilling a Geometry Concept ] [geometry2] [A model of the specified concept which might contain the first geometry ]] 76[[Strategy const &] [] [strategy] [strategy to be used ]] 77] 78 79 80[heading Returns] 81true if geometry1 is completely contained within geometry2, else false 82 83[heading Header] 84Either 85 86`#include <boost/geometry.hpp>` 87 88 89Or 90 91`#include <boost/geometry/algorithms/within.hpp>` 92 93[include reference/algorithms/within.qbk] 94[heading Available Strategies] 95* [link geometry.reference.strategies.strategy_within_winding Winding (coordinate system agnostic)] 96* [link geometry.reference.strategies.strategy_within_franklin Franklin (cartesian)] 97* [link geometry.reference.strategies.strategy_within_crossings_multiply Crossings Multiply (cartesian)] 98 99[heading Example] 100[within_strategy] 101[within_strategy_output] 102 103 104[endsect] 105 106