This commit is contained in:
dabreegster 2021-02-07 20:04:15 +00:00
parent 25e3a748e3
commit 5c1339e1ca
24 changed files with 269 additions and 145 deletions

View File

@ -31,11 +31,11 @@ minimap. <a href="../../map_gui/tools/minimap/trait.MinimapControls.html#method.
</div><h4 id="method.draw_default" class="method hidden"><code>fn <a href="#method.draw_default" class="fnname">draw_default</a>(&amp;self, g: &amp;mut GfxCtx&lt;'_&gt;)</code><a class="srclink" href="../../src/game/app.rs.html#790-792" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>When DrawBaselayer::DefaultDraw is called, run this.</p>
</div><h4 id="method.dump_before_abort" class="method hidden"><code>fn <a href="#method.dump_before_abort" class="fnname">dump_before_abort</a>(&amp;self, canvas: &amp;Canvas)</code><a class="srclink" href="../../src/game/app.rs.html#794-835" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Will be called if <code>State::event</code> or <code>State::draw</code> panics.</p>
</div><h4 id="method.before_quit" class="method hidden"><code>fn <a href="#method.before_quit" class="fnname">before_quit</a>(&amp;self, canvas: &amp;Canvas)</code><a class="srclink" href="../../src/game/app.rs.html#837-839" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Called before a normal exit, like window close</p>
</div></div><h3 id="impl-SimpleState%3CApp%3E" class="impl"><code class="in-band">impl SimpleState&lt;<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>&gt; for <a class="struct" href="../../game/debug/building_procgen/struct.BuildingProceduralGenerator.html" title="struct game::debug::building_procgen::BuildingProceduralGenerator">BuildingProceduralGenerator</a></code><a href="#impl-SimpleState%3CApp%3E" class="anchor"></a><a class="srclink" href="../../src/game/debug/building_procgen.rs.html#47-63" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.on_click" class="method hidden"><code>fn <a href="#method.on_click" class="fnname">on_click</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;_: &amp;mut EventCtx&lt;'_&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;_: &amp;mut <a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;x: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;_: &amp;Panel<br>) -&gt; Transition&lt;<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>&gt;</code><a class="srclink" href="../../src/game/debug/building_procgen.rs.html#48-53" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Called when something on the panel has been clicked. Since the action is just a string,
</div></div><h3 id="impl-SimpleState%3CApp%3E" class="impl"><code class="in-band">impl SimpleState&lt;<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>&gt; for <a class="struct" href="../../game/debug/building_procgen/struct.BuildingProceduralGenerator.html" title="struct game::debug::building_procgen::BuildingProceduralGenerator">BuildingProceduralGenerator</a></code><a href="#impl-SimpleState%3CApp%3E" class="anchor"></a><a class="srclink" href="../../src/game/debug/building_procgen.rs.html#74-90" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.on_click" class="method hidden"><code>fn <a href="#method.on_click" class="fnname">on_click</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;_: &amp;mut EventCtx&lt;'_&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;_: &amp;mut <a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;x: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;_: &amp;Panel<br>) -&gt; Transition&lt;<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>&gt;</code><a class="srclink" href="../../src/game/debug/building_procgen.rs.html#75-80" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Called when something on the panel has been clicked. Since the action is just a string,
the fallback case can just use <code>unreachable!()</code>. <a href="#tymethod.on_click">Read more</a></p>
</div><h4 id="method.other_event" class="method hidden"><code>fn <a href="#method.other_event" class="fnname">other_event</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut EventCtx&lt;'_&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;_: &amp;mut <a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a><br>) -&gt; Transition&lt;<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>&gt;</code><a class="srclink" href="../../src/game/debug/building_procgen.rs.html#55-58" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>If a panel <code>on_click</code> event didn't occur and <code>panel_changed</code> didn't return transition, then
</div><h4 id="method.other_event" class="method hidden"><code>fn <a href="#method.other_event" class="fnname">other_event</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut EventCtx&lt;'_&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;_: &amp;mut <a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a><br>) -&gt; Transition&lt;<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>&gt;</code><a class="srclink" href="../../src/game/debug/building_procgen.rs.html#82-85" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>If a panel <code>on_click</code> event didn't occur and <code>panel_changed</code> didn't return transition, then
call this to handle all other events. <a href="#method.other_event">Read more</a></p>
</div><h4 id="method.draw-55" class="method hidden"><code>fn <a href="#method.draw" class="fnname">draw</a>(&amp;self, g: &amp;mut GfxCtx&lt;'_&gt;, _: &amp;<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>)</code><a class="srclink" href="../../src/game/debug/building_procgen.rs.html#60-62" title="goto source code">[src]</a></h4><h4 id="method.panel_changed-1" class="method hidden"><code>fn <a href="#method.panel_changed" class="fnname">panel_changed</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut EventCtx&lt;'_&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>A, <br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;Panel<br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;Transition&lt;A&gt;&gt;</code></h4><div class='docblock hidden'><p>Called when something on the panel has changed. If a transition is returned, stop handling
</div><h4 id="method.draw-55" class="method hidden"><code>fn <a href="#method.draw" class="fnname">draw</a>(&amp;self, g: &amp;mut GfxCtx&lt;'_&gt;, _: &amp;<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>)</code><a class="srclink" href="../../src/game/debug/building_procgen.rs.html#87-89" title="goto source code">[src]</a></h4><h4 id="method.panel_changed-1" class="method hidden"><code>fn <a href="#method.panel_changed" class="fnname">panel_changed</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut EventCtx&lt;'_&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>A, <br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;Panel<br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;Transition&lt;A&gt;&gt;</code></h4><div class='docblock hidden'><p>Called when something on the panel has changed. If a transition is returned, stop handling
the event and immediately apply the transition. <a href="#method.panel_changed">Read more</a></p>
</div><h4 id="method.on_mouseover" class="method hidden"><code>fn <a href="#method.on_mouseover" class="fnname">on_mouseover</a>(&amp;mut self, &amp;mut EventCtx&lt;'_&gt;, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>A)</code></h4><div class='docblock hidden'><p>Called when the mouse has moved.</p>
</div><h4 id="method.draw_baselayer-54" class="method hidden"><code>fn <a href="#method.draw_baselayer" class="fnname">draw_baselayer</a>(&amp;self) -&gt; DrawBaselayer</code></h4></div><h3 id="impl-SimpleState%3CApp%3E-1" class="impl"><code class="in-band">impl SimpleState&lt;<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>&gt; for <a class="struct" href="../../game/edit/lanes/struct.LaneEditor.html" title="struct game::edit::lanes::LaneEditor">LaneEditor</a></code><a href="#impl-SimpleState%3CApp%3E-1" class="anchor"></a><a class="srclink" href="../../src/game/edit/lanes.rs.html#114-221" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.on_click-1" class="method hidden"><code>fn <a href="#method.on_click" class="fnname">on_click</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut EventCtx&lt;'_&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;app: &amp;mut <a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;x: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;_: &amp;Panel<br>) -&gt; Transition&lt;<a class="struct" href="../../game/app/struct.App.html" title="struct game::app::App">App</a>&gt;</code><a class="srclink" href="../../src/game/edit/lanes.rs.html#115-159" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Called when something on the panel has been clicked. Since the action is just a string,

View File

@ -1,4 +1,4 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `generate_buildings_on_empty_residential_roads` fn in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, generate_buildings_on_empty_residential_roads"><title>game::debug::building_procgen::generate_buildings_on_empty_residential_roads - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script id="default-settings"></script><script src="../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../../game/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../../index.html">game</a>::<wbr><a href="../index.html">debug</a>::<wbr><a href="index.html">building_procgen</a></p><script>window.sidebarCurrent = {name: "generate_buildings_on_empty_residential_roads", ty: "fn", relpath: ""};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><span class="help-button">?</span>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/game/debug/building_procgen.rs.html#65-137" title="goto source code">[src]</a></span><span class="in-band">Function <a href="../../index.html">game</a>::<wbr><a href="../index.html">debug</a>::<wbr><a href="index.html">building_procgen</a>::<wbr><a class="fn" href="">generate_buildings_on_empty_residential_roads</a></span></h1><pre class="rust fn">fn generate_buildings_on_empty_residential_roads(<br>&nbsp;&nbsp;&nbsp;&nbsp;app: &amp;<a class="struct" href="../../../game/app/struct.App.html" title="struct game::app::App">App</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;rng: &amp;mut <a class="struct" href="https://docs.rs/rand_xorshift/0.3.0/rand_xorshift/struct.XorShiftRng.html" title="struct rand_xorshift::XorShiftRng">XorShiftRng</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;timer: &amp;mut <a class="struct" href="../../../abstutil/time/struct.Timer.html" title="struct abstutil::time::Timer">Timer</a>&lt;'_&gt;<br>) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="../../../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a>&gt;</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "game";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/game/debug/building_procgen.rs.html#92-183" title="goto source code">[src]</a></span><span class="in-band">Function <a href="../../index.html">game</a>::<wbr><a href="../index.html">debug</a>::<wbr><a href="index.html">building_procgen</a>::<wbr><a class="fn" href="">generate_buildings_on_empty_residential_roads</a></span></h1><pre class="rust fn">fn generate_buildings_on_empty_residential_roads(<br>&nbsp;&nbsp;&nbsp;&nbsp;app: &amp;<a class="struct" href="../../../game/app/struct.App.html" title="struct game::app::App">App</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;rng: &amp;mut <a class="struct" href="https://docs.rs/rand_xorshift/0.3.0/rand_xorshift/struct.XorShiftRng.html" title="struct rand_xorshift::XorShiftRng">XorShiftRng</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;timer: &amp;mut <a class="struct" href="../../../abstutil/time/struct.Timer.html" title="struct abstutil::time::Timer">Timer</a>&lt;'_&gt;<br>) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="../../../geom/polygon/struct.Polygon.html" title="struct geom::polygon::Polygon">Polygon</a>&gt;</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "game";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>

View File

@ -1,4 +1,4 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `rand_dist` fn in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, rand_dist"><title>game::debug::building_procgen::rand_dist - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script id="default-settings"></script><script src="../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../../game/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../../index.html">game</a>::<wbr><a href="../index.html">debug</a>::<wbr><a href="index.html">building_procgen</a></p><script>window.sidebarCurrent = {name: "rand_dist", ty: "fn", relpath: ""};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><span class="help-button">?</span>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/game/debug/building_procgen.rs.html#139-142" title="goto source code">[src]</a></span><span class="in-band">Function <a href="../../index.html">game</a>::<wbr><a href="../index.html">debug</a>::<wbr><a href="index.html">building_procgen</a>::<wbr><a class="fn" href="">rand_dist</a></span></h1><pre class="rust fn">fn rand_dist(rng: &amp;mut <a class="struct" href="https://docs.rs/rand_xorshift/0.3.0/rand_xorshift/struct.XorShiftRng.html" title="struct rand_xorshift::XorShiftRng">XorShiftRng</a>, low: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>, high: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>) -&gt; <a class="struct" href="../../../geom/distance/struct.Distance.html" title="struct geom::distance::Distance">Distance</a></pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "game";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/game/debug/building_procgen.rs.html#185-188" title="goto source code">[src]</a></span><span class="in-band">Function <a href="../../index.html">game</a>::<wbr><a href="../index.html">debug</a>::<wbr><a href="index.html">building_procgen</a>::<wbr><a class="fn" href="">rand_dist</a></span></h1><pre class="rust fn">fn rand_dist(rng: &amp;mut <a class="struct" href="https://docs.rs/rand_xorshift/0.3.0/rand_xorshift/struct.XorShiftRng.html" title="struct rand_xorshift::XorShiftRng">XorShiftRng</a>, low: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>, high: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>) -&gt; <a class="struct" href="../../../geom/distance/struct.Distance.html" title="struct geom::distance::Distance">Distance</a></pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "game";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>

View File

@ -1,6 +1,6 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `building_procgen` mod in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, building_procgen"><title>game::debug::building_procgen - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script id="default-settings"></script><script src="../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../../game/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><p class="location">Module building_procgen</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li><li><a href="#functions">Functions</a></li></ul></div><p class="location"><a href="../../index.html">game</a>::<wbr><a href="../index.html">debug</a></p><script>window.sidebarCurrent = {name: "building_procgen", ty: "mod", relpath: "../"};</script><script defer src="../sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><span class="help-button">?</span>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/game/debug/building_procgen.rs.html#1-142" title="goto source code">[src]</a></span><span class="in-band">Module <a href="../../index.html">game</a>::<wbr><a href="../index.html">debug</a>::<wbr><a class="mod" href="">building_procgen</a></span></h1><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/game/debug/building_procgen.rs.html#1-188" title="goto source code">[src]</a></span><span class="in-band">Module <a href="../../index.html">game</a>::<wbr><a href="../index.html">debug</a>::<wbr><a class="mod" href="">building_procgen</a></span></h1><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2>
<table><tr class="module-item"><td><a class="struct" href="struct.BuildingProceduralGenerator.html" title="game::debug::building_procgen::BuildingProceduralGenerator struct">BuildingProceduralGenerator</a></td><td class="docblock-short"></td></tr></table><h2 id="functions" class="section-header"><a href="#functions">Functions</a></h2>
<table><tr class="module-item"><td><a class="fn" href="fn.generate_buildings_on_empty_residential_roads.html" title="game::debug::building_procgen::generate_buildings_on_empty_residential_roads fn">generate_buildings_on_empty_residential_roads</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="fn" href="fn.rand_dist.html" title="game::debug::building_procgen::rand_dist fn">rand_dist</a></td><td class="docblock-short"></td></tr></table></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "game";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>

View File

@ -1,14 +1,14 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `BuildingProceduralGenerator` struct in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, BuildingProceduralGenerator"><title>game::debug::building_procgen::BuildingProceduralGenerator - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script id="default-settings"></script><script src="../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../../game/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><p class="location">Struct BuildingProceduralGenerator</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#fields">Fields</a><div class="sidebar-links"><a href="#structfield.houses">houses</a></div><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.new">new</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-SimpleState%3CApp%3E">SimpleState&lt;App&gt;</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">!RefUnwindSafe</a><a href="#impl-Send">!Send</a><a href="#impl-Sync">!Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-Downcast">Downcast</a><a href="#impl-DowncastSync">DowncastSync</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Instrument">Instrument</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-Same%3CT%3E">Same&lt;T&gt;</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a><a href="#impl-VZip%3CV%3E">VZip&lt;V&gt;</a></div></div><p class="location"><a href="../../index.html">game</a>::<wbr><a href="../index.html">debug</a>::<wbr><a href="index.html">building_procgen</a></p><script>window.sidebarCurrent = {name: "BuildingProceduralGenerator", ty: "struct", relpath: ""};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><span class="help-button">?</span>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/game/debug/building_procgen.rs.html#16-18" title="goto source code">[src]</a></span><span class="in-band">Struct <a href="../../index.html">game</a>::<wbr><a href="../index.html">debug</a>::<wbr><a href="index.html">building_procgen</a>::<wbr><a class="struct" href="">BuildingProceduralGenerator</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust struct">pub struct BuildingProceduralGenerator {
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/game/debug/building_procgen.rs.html#18-20" title="goto source code">[src]</a></span><span class="in-band">Struct <a href="../../index.html">game</a>::<wbr><a href="../index.html">debug</a>::<wbr><a href="index.html">building_procgen</a>::<wbr><a class="struct" href="">BuildingProceduralGenerator</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust struct">pub struct BuildingProceduralGenerator {
houses: Drawable,
}</pre></div><h2 id="fields" class="fields small-section-header">
Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.houses" class="structfield small-section-header"><a href="#structfield.houses" class="anchor field"></a><code>houses: Drawable</code></span><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><h3 id="impl" class="impl"><code class="in-band">impl <a class="struct" href="../../../game/debug/building_procgen/struct.BuildingProceduralGenerator.html" title="struct game::debug::building_procgen::BuildingProceduralGenerator">BuildingProceduralGenerator</a></code><a href="#impl" class="anchor"></a><a class="srclink" href="../../../src/game/debug/building_procgen.rs.html#20-45" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.new" class="method"><code>pub fn <a href="#method.new" class="fnname">new</a>(ctx: &amp;mut EventCtx&lt;'_&gt;, app: &amp;<a class="struct" href="../../../game/app/struct.App.html" title="struct game::app::App">App</a>) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;dyn State&lt;<a class="struct" href="../../../game/app/struct.App.html" title="struct game::app::App">App</a>&gt;&gt;</code><a class="srclink" href="../../../src/game/debug/building_procgen.rs.html#21-44" title="goto source code">[src]</a></h4></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-SimpleState%3CApp%3E" class="impl"><code class="in-band">impl SimpleState&lt;<a class="struct" href="../../../game/app/struct.App.html" title="struct game::app::App">App</a>&gt; for <a class="struct" href="../../../game/debug/building_procgen/struct.BuildingProceduralGenerator.html" title="struct game::debug::building_procgen::BuildingProceduralGenerator">BuildingProceduralGenerator</a></code><a href="#impl-SimpleState%3CApp%3E" class="anchor"></a><a class="srclink" href="../../../src/game/debug/building_procgen.rs.html#47-63" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.on_click" class="method hidden"><code>fn <a href="#method.on_click" class="fnname">on_click</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;_: &amp;mut EventCtx&lt;'_&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;_: &amp;mut <a class="struct" href="../../../game/app/struct.App.html" title="struct game::app::App">App</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;x: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;_: &amp;Panel<br>) -&gt; Transition&lt;<a class="struct" href="../../../game/app/struct.App.html" title="struct game::app::App">App</a>&gt;</code><a class="srclink" href="../../../src/game/debug/building_procgen.rs.html#48-53" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Called when something on the panel has been clicked. Since the action is just a string,
Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.houses" class="structfield small-section-header"><a href="#structfield.houses" class="anchor field"></a><code>houses: Drawable</code></span><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><h3 id="impl" class="impl"><code class="in-band">impl <a class="struct" href="../../../game/debug/building_procgen/struct.BuildingProceduralGenerator.html" title="struct game::debug::building_procgen::BuildingProceduralGenerator">BuildingProceduralGenerator</a></code><a href="#impl" class="anchor"></a><a class="srclink" href="../../../src/game/debug/building_procgen.rs.html#22-72" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.new" class="method"><code>pub fn <a href="#method.new" class="fnname">new</a>(ctx: &amp;mut EventCtx&lt;'_&gt;, app: &amp;<a class="struct" href="../../../game/app/struct.App.html" title="struct game::app::App">App</a>) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;dyn State&lt;<a class="struct" href="../../../game/app/struct.App.html" title="struct game::app::App">App</a>&gt;&gt;</code><a class="srclink" href="../../../src/game/debug/building_procgen.rs.html#23-71" title="goto source code">[src]</a></h4></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-SimpleState%3CApp%3E" class="impl"><code class="in-band">impl SimpleState&lt;<a class="struct" href="../../../game/app/struct.App.html" title="struct game::app::App">App</a>&gt; for <a class="struct" href="../../../game/debug/building_procgen/struct.BuildingProceduralGenerator.html" title="struct game::debug::building_procgen::BuildingProceduralGenerator">BuildingProceduralGenerator</a></code><a href="#impl-SimpleState%3CApp%3E" class="anchor"></a><a class="srclink" href="../../../src/game/debug/building_procgen.rs.html#74-90" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.on_click" class="method hidden"><code>fn <a href="#method.on_click" class="fnname">on_click</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;_: &amp;mut EventCtx&lt;'_&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;_: &amp;mut <a class="struct" href="../../../game/app/struct.App.html" title="struct game::app::App">App</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;x: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;_: &amp;Panel<br>) -&gt; Transition&lt;<a class="struct" href="../../../game/app/struct.App.html" title="struct game::app::App">App</a>&gt;</code><a class="srclink" href="../../../src/game/debug/building_procgen.rs.html#75-80" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Called when something on the panel has been clicked. Since the action is just a string,
the fallback case can just use <code>unreachable!()</code>. <a href="#tymethod.on_click">Read more</a></p>
</div><h4 id="method.other_event" class="method hidden"><code>fn <a href="#method.other_event" class="fnname">other_event</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut EventCtx&lt;'_&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;_: &amp;mut <a class="struct" href="../../../game/app/struct.App.html" title="struct game::app::App">App</a><br>) -&gt; Transition&lt;<a class="struct" href="../../../game/app/struct.App.html" title="struct game::app::App">App</a>&gt;</code><a class="srclink" href="../../../src/game/debug/building_procgen.rs.html#55-58" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>If a panel <code>on_click</code> event didn't occur and <code>panel_changed</code> didn't return transition, then
</div><h4 id="method.other_event" class="method hidden"><code>fn <a href="#method.other_event" class="fnname">other_event</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut EventCtx&lt;'_&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;_: &amp;mut <a class="struct" href="../../../game/app/struct.App.html" title="struct game::app::App">App</a><br>) -&gt; Transition&lt;<a class="struct" href="../../../game/app/struct.App.html" title="struct game::app::App">App</a>&gt;</code><a class="srclink" href="../../../src/game/debug/building_procgen.rs.html#82-85" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>If a panel <code>on_click</code> event didn't occur and <code>panel_changed</code> didn't return transition, then
call this to handle all other events. <a href="#method.other_event">Read more</a></p>
</div><h4 id="method.draw" class="method hidden"><code>fn <a href="#method.draw" class="fnname">draw</a>(&amp;self, g: &amp;mut GfxCtx&lt;'_&gt;, _: &amp;<a class="struct" href="../../../game/app/struct.App.html" title="struct game::app::App">App</a>)</code><a class="srclink" href="../../../src/game/debug/building_procgen.rs.html#60-62" title="goto source code">[src]</a></h4><h4 id="method.panel_changed" class="method hidden"><code>fn <a href="#method.panel_changed" class="fnname">panel_changed</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut EventCtx&lt;'_&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>A, <br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;Panel<br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;Transition&lt;A&gt;&gt;</code></h4><div class='docblock hidden'><p>Called when something on the panel has changed. If a transition is returned, stop handling
</div><h4 id="method.draw" class="method hidden"><code>fn <a href="#method.draw" class="fnname">draw</a>(&amp;self, g: &amp;mut GfxCtx&lt;'_&gt;, _: &amp;<a class="struct" href="../../../game/app/struct.App.html" title="struct game::app::App">App</a>)</code><a class="srclink" href="../../../src/game/debug/building_procgen.rs.html#87-89" title="goto source code">[src]</a></h4><h4 id="method.panel_changed" class="method hidden"><code>fn <a href="#method.panel_changed" class="fnname">panel_changed</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut EventCtx&lt;'_&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>A, <br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;Panel<br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;Transition&lt;A&gt;&gt;</code></h4><div class='docblock hidden'><p>Called when something on the panel has changed. If a transition is returned, stop handling
the event and immediately apply the transition. <a href="#method.panel_changed">Read more</a></p>
</div><h4 id="method.on_mouseover" class="method hidden"><code>fn <a href="#method.on_mouseover" class="fnname">on_mouseover</a>(&amp;mut self, &amp;mut EventCtx&lt;'_&gt;, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>A)</code></h4><div class='docblock hidden'><p>Called when the mouse has moved.</p>
</div><h4 id="method.draw_baselayer" class="method hidden"><code>fn <a href="#method.draw_baselayer" class="fnname">draw_baselayer</a>(&amp;self) -&gt; DrawBaselayer</code></h4></div></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><h3 id="impl-RefUnwindSafe" class="impl"><code class="in-band">impl !<a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="../../../game/debug/building_procgen/struct.BuildingProceduralGenerator.html" title="struct game::debug::building_procgen::BuildingProceduralGenerator">BuildingProceduralGenerator</a></code><a href="#impl-RefUnwindSafe" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-Send" class="impl"><code class="in-band">impl !<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="../../../game/debug/building_procgen/struct.BuildingProceduralGenerator.html" title="struct game::debug::building_procgen::BuildingProceduralGenerator">BuildingProceduralGenerator</a></code><a href="#impl-Send" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-Sync" class="impl"><code class="in-band">impl !<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="../../../game/debug/building_procgen/struct.BuildingProceduralGenerator.html" title="struct game::debug::building_procgen::BuildingProceduralGenerator">BuildingProceduralGenerator</a></code><a href="#impl-Sync" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-Unpin" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="../../../game/debug/building_procgen/struct.BuildingProceduralGenerator.html" title="struct game::debug::building_procgen::BuildingProceduralGenerator">BuildingProceduralGenerator</a></code><a href="#impl-Unpin" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-UnwindSafe" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="../../../game/debug/building_procgen/struct.BuildingProceduralGenerator.html" title="struct game::debug::building_procgen::BuildingProceduralGenerator">BuildingProceduralGenerator</a></code><a href="#impl-UnwindSafe" class="anchor"></a></h3><div class="impl-items"></div></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><h3 id="impl-Any" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#108-112" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.type_id" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#109-111" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>

View File

@ -1,5 +1,5 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `BUILT_TIME_UTC` constant in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, BUILT_TIME_UTC"><title>game::pregame::built_info::BUILT_TIME_UTC - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script id="default-settings"></script><script src="../../../storage.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc constant"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../../game/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../../index.html">game</a>::<wbr><a href="../index.html">pregame</a>::<wbr><a href="index.html">built_info</a></p><script>window.sidebarCurrent = {name: "BUILT_TIME_UTC", ty: "constant", relpath: ""};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><span class="help-button">?</span>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/game/home/runner/work/abstreet/abstreet/target/debug/build/game-00b039a36f4c038f/out/built.rs.html#53" title="goto source code">[src]</a></span><span class="in-band">Constant <a href="../../index.html">game</a>::<wbr><a href="../index.html">pregame</a>::<wbr><a href="index.html">built_info</a>::<wbr><a class="constant" href="">BUILT_TIME_UTC</a></span></h1><pre class="rust const">pub const BUILT_TIME_UTC: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a> = &quot;Sun, 07 Feb 2021 19:38:01 +0000&quot;;</pre><div class="docblock"><p>The built-time in RFC2822, UTC</p>
<a id="settings-menu" href="../../../settings.html"><img src="../../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../../src/game/home/runner/work/abstreet/abstreet/target/debug/build/game-00b039a36f4c038f/out/built.rs.html#53" title="goto source code">[src]</a></span><span class="in-band">Constant <a href="../../index.html">game</a>::<wbr><a href="../index.html">pregame</a>::<wbr><a href="index.html">built_info</a>::<wbr><a class="constant" href="">BUILT_TIME_UTC</a></span></h1><pre class="rust const">pub const BUILT_TIME_UTC: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a> = &quot;Sun, 07 Feb 2021 20:01:46 +0000&quot;;</pre><div class="docblock"><p>The built-time in RFC2822, UTC</p>
</div></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../../";window.currentCrate = "game";</script><script src="../../../main.js"></script><script defer src="../../../search-index.js"></script></body></html>

View File

@ -1,7 +1,7 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `bounds` mod in crate `geom`."><meta name="keywords" content="rust, rustlang, rust-lang, bounds"><title>geom::bounds - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../geom/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class="location">Module bounds</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li></ul></div><p class="location"><a href="../index.html">geom</a></p><script>window.sidebarCurrent = {name: "bounds", ty: "mod", relpath: "../"};</script><script defer src="../sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><span class="help-button">?</span>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/geom/bounds.rs.html#1-197" title="goto source code">[src]</a></span><span class="in-band">Module <a href="../index.html">geom</a>::<wbr><a class="mod" href="">bounds</a></span></h1><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/geom/bounds.rs.html#1-205" title="goto source code">[src]</a></span><span class="in-band">Module <a href="../index.html">geom</a>::<wbr><a class="mod" href="">bounds</a></span></h1><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2>
<table><tr class="module-item"><td><a class="struct" href="struct.Bounds.html" title="geom::bounds::Bounds struct">Bounds</a></td><td class="docblock-short"><p>Represents a rectangular boundary of <code>Pt2D</code> points.</p>
</td></tr><tr class="module-item"><td><a class="struct" href="struct.GPSBounds.html" title="geom::bounds::GPSBounds struct">GPSBounds</a></td><td class="docblock-short"><p>Represents a rectangular boundary of <code>LonLat</code> points. After building one of these, <code>LonLat</code>s
can be transformed into <code>Pt2D</code>s, treating the top-left of the boundary as (0, 0), and growing

View File

@ -1,6 +1,6 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `Bounds` struct in crate `geom`."><meta name="keywords" content="rust, rustlang, rust-lang, Bounds"><title>geom::bounds::Bounds - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../geom/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class="location">Struct Bounds</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#fields">Fields</a><div class="sidebar-links"><a href="#structfield.max_x">max_x</a><a href="#structfield.max_y">max_y</a><a href="#structfield.min_x">min_x</a><a href="#structfield.min_y">min_y</a></div><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.as_bbox">as_bbox</a><a href="#method.center">center</a><a href="#method.contains">contains</a><a href="#method.from">from</a><a href="#method.get_rectangle">get_rectangle</a><a href="#method.height">height</a><a href="#method.new">new</a><a href="#method.union">union</a><a href="#method.update">update</a><a href="#method.width">width</a><a href="#method.zero">zero</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Clone">Clone</a><a href="#impl-Debug">Debug</a><a href="#impl-Deserialize%3C%27de%3E">Deserialize&lt;&#39;de&gt;</a><a href="#impl-PartialEq%3CBounds%3E">PartialEq&lt;Bounds&gt;</a><a href="#impl-Serialize">Serialize</a><a href="#impl-StructuralPartialEq">StructuralPartialEq</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-DeserializeOwned">DeserializeOwned</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-Same%3CT%3E">Same&lt;T&gt;</a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a></div></div><p class="location"><a href="../index.html">geom</a>::<wbr><a href="index.html">bounds</a></p><script>window.sidebarCurrent = {name: "Bounds", ty: "struct", relpath: ""};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><span class="help-button">?</span>
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../geom/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class="location">Struct Bounds</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#fields">Fields</a><div class="sidebar-links"><a href="#structfield.max_x">max_x</a><a href="#structfield.max_y">max_y</a><a href="#structfield.min_x">min_x</a><a href="#structfield.min_y">min_y</a></div><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.add_buffer">add_buffer</a><a href="#method.as_bbox">as_bbox</a><a href="#method.center">center</a><a href="#method.contains">contains</a><a href="#method.from">from</a><a href="#method.get_rectangle">get_rectangle</a><a href="#method.height">height</a><a href="#method.new">new</a><a href="#method.union">union</a><a href="#method.update">update</a><a href="#method.width">width</a><a href="#method.zero">zero</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Clone">Clone</a><a href="#impl-Debug">Debug</a><a href="#impl-Deserialize%3C%27de%3E">Deserialize&lt;&#39;de&gt;</a><a href="#impl-PartialEq%3CBounds%3E">PartialEq&lt;Bounds&gt;</a><a href="#impl-Serialize">Serialize</a><a href="#impl-StructuralPartialEq">StructuralPartialEq</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-DeserializeOwned">DeserializeOwned</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-Same%3CT%3E">Same&lt;T&gt;</a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a></div></div><p class="location"><a href="../index.html">geom</a>::<wbr><a href="index.html">bounds</a></p><script>window.sidebarCurrent = {name: "Bounds", ty: "struct", relpath: ""};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><span class="help-button">?</span>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/geom/bounds.rs.html#9-14" title="goto source code">[src]</a></span><span class="in-band">Struct <a href="../index.html">geom</a>::<wbr><a href="index.html">bounds</a>::<wbr><a class="struct" href="">Bounds</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust struct">pub struct Bounds {
pub min_x: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>,
pub min_y: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>,
@ -8,16 +8,17 @@
pub max_y: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>,
}</pre></div><div class="docblock"><p>Represents a rectangular boundary of <code>Pt2D</code> points.</p>
</div><h2 id="fields" class="fields small-section-header">
Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.min_x" class="structfield small-section-header"><a href="#structfield.min_x" class="anchor field"></a><code>min_x: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a></code></span><span id="structfield.min_y" class="structfield small-section-header"><a href="#structfield.min_y" class="anchor field"></a><code>min_y: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a></code></span><span id="structfield.max_x" class="structfield small-section-header"><a href="#structfield.max_x" class="anchor field"></a><code>max_x: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a></code></span><span id="structfield.max_y" class="structfield small-section-header"><a href="#structfield.max_y" class="anchor field"></a><code>max_y: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a></code></span><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><h3 id="impl" class="impl"><code class="in-band">impl <a class="struct" href="../../geom/struct.Bounds.html" title="struct geom::Bounds">Bounds</a></code><a href="#impl" class="anchor"></a><a class="srclink" href="../../src/geom/bounds.rs.html#16-108" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.new" class="method"><code>pub fn <a href="#method.new" class="fnname">new</a>() -&gt; <a class="struct" href="../../geom/struct.Bounds.html" title="struct geom::Bounds">Bounds</a></code><a class="srclink" href="../../src/geom/bounds.rs.html#18-25" title="goto source code">[src]</a></h4><div class="docblock"><p>A boundary including no points.</p>
Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.min_x" class="structfield small-section-header"><a href="#structfield.min_x" class="anchor field"></a><code>min_x: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a></code></span><span id="structfield.min_y" class="structfield small-section-header"><a href="#structfield.min_y" class="anchor field"></a><code>min_y: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a></code></span><span id="structfield.max_x" class="structfield small-section-header"><a href="#structfield.max_x" class="anchor field"></a><code>max_x: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a></code></span><span id="structfield.max_y" class="structfield small-section-header"><a href="#structfield.max_y" class="anchor field"></a><code>max_y: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a></code></span><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><h3 id="impl" class="impl"><code class="in-band">impl <a class="struct" href="../../geom/struct.Bounds.html" title="struct geom::Bounds">Bounds</a></code><a href="#impl" class="anchor"></a><a class="srclink" href="../../src/geom/bounds.rs.html#16-116" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.new" class="method"><code>pub fn <a href="#method.new" class="fnname">new</a>() -&gt; <a class="struct" href="../../geom/struct.Bounds.html" title="struct geom::Bounds">Bounds</a></code><a class="srclink" href="../../src/geom/bounds.rs.html#18-25" title="goto source code">[src]</a></h4><div class="docblock"><p>A boundary including no points.</p>
</div><h4 id="method.zero" class="method"><code>pub fn <a href="#method.zero" class="fnname">zero</a>() -&gt; Self</code><a class="srclink" href="../../src/geom/bounds.rs.html#27-34" title="goto source code">[src]</a></h4><h4 id="method.from" class="method"><code>pub fn <a href="#method.from" class="fnname">from</a>(pts: &amp;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="../../geom/struct.Pt2D.html" title="struct geom::Pt2D">Pt2D</a>&gt;) -&gt; <a class="struct" href="../../geom/struct.Bounds.html" title="struct geom::Bounds">Bounds</a></code><a class="srclink" href="../../src/geom/bounds.rs.html#37-43" title="goto source code">[src]</a></h4><div class="docblock"><p>Create a boundary covering some points.</p>
</div><h4 id="method.update" class="method"><code>pub fn <a href="#method.update" class="fnname">update</a>(&amp;mut self, pt: <a class="struct" href="../../geom/struct.Pt2D.html" title="struct geom::Pt2D">Pt2D</a>)</code><a class="srclink" href="../../src/geom/bounds.rs.html#46-51" title="goto source code">[src]</a></h4><div class="docblock"><p>Update the boundary to include this point.</p>
</div><h4 id="method.union" class="method"><code>pub fn <a href="#method.union" class="fnname">union</a>(&amp;mut self, other: <a class="struct" href="../../geom/struct.Bounds.html" title="struct geom::Bounds">Bounds</a>)</code><a class="srclink" href="../../src/geom/bounds.rs.html#54-57" title="goto source code">[src]</a></h4><div class="docblock"><p>Unions two boundaries.</p>
</div><h4 id="method.contains" class="method"><code>pub fn <a href="#method.contains" class="fnname">contains</a>(&amp;self, pt: <a class="struct" href="../../geom/struct.Pt2D.html" title="struct geom::Pt2D">Pt2D</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class="srclink" href="../../src/geom/bounds.rs.html#60-62" title="goto source code">[src]</a></h4><div class="docblock"><p>True if the point is within the boundary.</p>
</div><h4 id="method.as_bbox" class="method"><code>pub fn <a href="#method.as_bbox" class="fnname">as_bbox</a>(&amp;self) -&gt; Rect</code><a class="srclink" href="../../src/geom/bounds.rs.html#65-76" title="goto source code">[src]</a></h4><div class="docblock"><p>Converts the boundary to the format used by <code>aabb_quadtree</code>.</p>
</div><h4 id="method.get_rectangle" class="method"><code>pub fn <a href="#method.get_rectangle" class="fnname">get_rectangle</a>(&amp;self) -&gt; <a class="struct" href="../../geom/struct.Polygon.html" title="struct geom::Polygon">Polygon</a></code><a class="srclink" href="../../src/geom/bounds.rs.html#79-88" title="goto source code">[src]</a></h4><div class="docblock"><p>Creates a rectangle covering this boundary.</p>
</div><h4 id="method.width" class="method"><code>pub fn <a href="#method.width" class="fnname">width</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a></code><a class="srclink" href="../../src/geom/bounds.rs.html#92-94" title="goto source code">[src]</a></h4><div class="docblock"><p>The width of this boundary.</p>
</div><h4 id="method.height" class="method"><code>pub fn <a href="#method.height" class="fnname">height</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a></code><a class="srclink" href="../../src/geom/bounds.rs.html#97-99" title="goto source code">[src]</a></h4><div class="docblock"><p>The height of this boundary.</p>
</div><h4 id="method.center" class="method"><code>pub fn <a href="#method.center" class="fnname">center</a>(&amp;self) -&gt; <a class="struct" href="../../geom/struct.Pt2D.html" title="struct geom::Pt2D">Pt2D</a></code><a class="srclink" href="../../src/geom/bounds.rs.html#102-107" title="goto source code">[src]</a></h4><div class="docblock"><p>The center point of this boundary.</p>
</div><h4 id="method.add_buffer" class="method"><code>pub fn <a href="#method.add_buffer" class="fnname">add_buffer</a>(&amp;mut self, sides: <a class="struct" href="../../geom/struct.Distance.html" title="struct geom::Distance">Distance</a>)</code><a class="srclink" href="../../src/geom/bounds.rs.html#60-65" title="goto source code">[src]</a></h4><div class="docblock"><p>Expand the existing boundary by some distance evenly on all sides.</p>
</div><h4 id="method.contains" class="method"><code>pub fn <a href="#method.contains" class="fnname">contains</a>(&amp;self, pt: <a class="struct" href="../../geom/struct.Pt2D.html" title="struct geom::Pt2D">Pt2D</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class="srclink" href="../../src/geom/bounds.rs.html#68-70" title="goto source code">[src]</a></h4><div class="docblock"><p>True if the point is within the boundary.</p>
</div><h4 id="method.as_bbox" class="method"><code>pub fn <a href="#method.as_bbox" class="fnname">as_bbox</a>(&amp;self) -&gt; Rect</code><a class="srclink" href="../../src/geom/bounds.rs.html#73-84" title="goto source code">[src]</a></h4><div class="docblock"><p>Converts the boundary to the format used by <code>aabb_quadtree</code>.</p>
</div><h4 id="method.get_rectangle" class="method"><code>pub fn <a href="#method.get_rectangle" class="fnname">get_rectangle</a>(&amp;self) -&gt; <a class="struct" href="../../geom/struct.Polygon.html" title="struct geom::Polygon">Polygon</a></code><a class="srclink" href="../../src/geom/bounds.rs.html#87-96" title="goto source code">[src]</a></h4><div class="docblock"><p>Creates a rectangle covering this boundary.</p>
</div><h4 id="method.width" class="method"><code>pub fn <a href="#method.width" class="fnname">width</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a></code><a class="srclink" href="../../src/geom/bounds.rs.html#100-102" title="goto source code">[src]</a></h4><div class="docblock"><p>The width of this boundary.</p>
</div><h4 id="method.height" class="method"><code>pub fn <a href="#method.height" class="fnname">height</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a></code><a class="srclink" href="../../src/geom/bounds.rs.html#105-107" title="goto source code">[src]</a></h4><div class="docblock"><p>The height of this boundary.</p>
</div><h4 id="method.center" class="method"><code>pub fn <a href="#method.center" class="fnname">center</a>(&amp;self) -&gt; <a class="struct" href="../../geom/struct.Pt2D.html" title="struct geom::Pt2D">Pt2D</a></code><a class="srclink" href="../../src/geom/bounds.rs.html#110-115" title="goto source code">[src]</a></h4><div class="docblock"><p>The center point of this boundary.</p>
</div></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-Clone" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="../../geom/struct.Bounds.html" title="struct geom::Bounds">Bounds</a></code><a href="#impl-Clone" class="anchor"></a><a class="srclink" href="../../src/geom/bounds.rs.html#8" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.clone" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&amp;self) -&gt; <a class="struct" href="../../geom/struct.Bounds.html" title="struct geom::Bounds">Bounds</a></code><a class="srclink" href="../../src/geom/bounds.rs.html#8" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
</div><h4 id="method.clone_from" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from" class="fnname">clone_from</a>(&amp;mut self, source: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self)</code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/clone.rs.html#128-130" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
</div></div><h3 id="impl-Debug" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="../../geom/struct.Bounds.html" title="struct geom::Bounds">Bounds</a></code><a href="#impl-Debug" class="anchor"></a><a class="srclink" href="../../src/geom/bounds.rs.html#8" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.fmt" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>&lt;'_&gt;) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class="srclink" href="../../src/geom/bounds.rs.html#8" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>

View File

@ -1,7 +1,7 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `GPSBounds` struct in crate `geom`."><meta name="keywords" content="rust, rustlang, rust-lang, GPSBounds"><title>geom::bounds::GPSBounds - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../geom/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class="location">Struct GPSBounds</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#fields">Fields</a><div class="sidebar-links"><a href="#structfield.max_lat">max_lat</a><a href="#structfield.max_lon">max_lon</a><a href="#structfield.min_lat">min_lat</a><a href="#structfield.min_lon">min_lon</a></div><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.contains">contains</a><a href="#method.convert">convert</a><a href="#method.convert_back">convert_back</a><a href="#method.from">from</a><a href="#method.get_max_world_pt">get_max_world_pt</a><a href="#method.new">new</a><a href="#method.to_bounds">to_bounds</a><a href="#method.try_convert">try_convert</a><a href="#method.update">update</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Clone">Clone</a><a href="#impl-Debug">Debug</a><a href="#impl-Deserialize%3C%27de%3E">Deserialize&lt;&#39;de&gt;</a><a href="#impl-PartialEq%3CGPSBounds%3E">PartialEq&lt;GPSBounds&gt;</a><a href="#impl-Serialize">Serialize</a><a href="#impl-StructuralPartialEq">StructuralPartialEq</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-DeserializeOwned">DeserializeOwned</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-Same%3CT%3E">Same&lt;T&gt;</a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a></div></div><p class="location"><a href="../index.html">geom</a>::<wbr><a href="index.html">bounds</a></p><script>window.sidebarCurrent = {name: "GPSBounds", ty: "struct", relpath: ""};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><span class="help-button">?</span>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/geom/bounds.rs.html#114-119" title="goto source code">[src]</a></span><span class="in-band">Struct <a href="../index.html">geom</a>::<wbr><a href="index.html">bounds</a>::<wbr><a class="struct" href="">GPSBounds</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust struct">pub struct GPSBounds {
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/geom/bounds.rs.html#122-127" title="goto source code">[src]</a></span><span class="in-band">Struct <a href="../index.html">geom</a>::<wbr><a href="index.html">bounds</a>::<wbr><a class="struct" href="">GPSBounds</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust struct">pub struct GPSBounds {
pub min_lon: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>,
pub min_lat: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>,
pub max_lon: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>,
@ -10,25 +10,25 @@
can be transformed into <code>Pt2D</code>s, treating the top-left of the boundary as (0, 0), and growing
to the right and down (screen-drawing order, not Cartesian) in meters.</p>
</div><h2 id="fields" class="fields small-section-header">
Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.min_lon" class="structfield small-section-header"><a href="#structfield.min_lon" class="anchor field"></a><code>min_lon: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a></code></span><span id="structfield.min_lat" class="structfield small-section-header"><a href="#structfield.min_lat" class="anchor field"></a><code>min_lat: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a></code></span><span id="structfield.max_lon" class="structfield small-section-header"><a href="#structfield.max_lon" class="anchor field"></a><code>max_lon: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a></code></span><span id="structfield.max_lat" class="structfield small-section-header"><a href="#structfield.max_lat" class="anchor field"></a><code>max_lat: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a></code></span><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><h3 id="impl" class="impl"><code class="in-band">impl <a class="struct" href="../../geom/struct.GPSBounds.html" title="struct geom::GPSBounds">GPSBounds</a></code><a href="#impl" class="anchor"></a><a class="srclink" href="../../src/geom/bounds.rs.html#121-197" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.new" class="method"><code>pub fn <a href="#method.new" class="fnname">new</a>() -&gt; <a class="struct" href="../../geom/struct.GPSBounds.html" title="struct geom::GPSBounds">GPSBounds</a></code><a class="srclink" href="../../src/geom/bounds.rs.html#123-130" title="goto source code">[src]</a></h4><div class="docblock"><p>A boundary including no points.</p>
</div><h4 id="method.from" class="method"><code>pub fn <a href="#method.from" class="fnname">from</a>(pts: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="../../geom/struct.LonLat.html" title="struct geom::LonLat">LonLat</a>&gt;) -&gt; <a class="struct" href="../../geom/struct.GPSBounds.html" title="struct geom::GPSBounds">GPSBounds</a></code><a class="srclink" href="../../src/geom/bounds.rs.html#133-139" title="goto source code">[src]</a></h4><div class="docblock"><p>Create a boundary covering some points.</p>
</div><h4 id="method.update" class="method"><code>pub fn <a href="#method.update" class="fnname">update</a>(&amp;mut self, pt: <a class="struct" href="../../geom/struct.LonLat.html" title="struct geom::LonLat">LonLat</a>)</code><a class="srclink" href="../../src/geom/bounds.rs.html#142-147" title="goto source code">[src]</a></h4><div class="docblock"><p>Update the boundary to include this point.</p>
</div><h4 id="method.contains" class="method"><code>pub fn <a href="#method.contains" class="fnname">contains</a>(&amp;self, pt: <a class="struct" href="../../geom/struct.LonLat.html" title="struct geom::LonLat">LonLat</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class="srclink" href="../../src/geom/bounds.rs.html#150-155" title="goto source code">[src]</a></h4><div class="docblock"><p>True if the point is within the boundary.</p>
</div><h4 id="method.get_max_world_pt" class="method"><code>pub fn <a href="#method.get_max_world_pt" class="fnname">get_max_world_pt</a>(&amp;self) -&gt; <a class="struct" href="../../geom/struct.Pt2D.html" title="struct geom::Pt2D">Pt2D</a></code><a class="srclink" href="../../src/geom/bounds.rs.html#159-165" title="goto source code">[src]</a></h4><div class="docblock"><p>The bottom-right corner of the boundary, in map-space.</p>
</div><h4 id="method.to_bounds" class="method"><code>pub fn <a href="#method.to_bounds" class="fnname">to_bounds</a>(&amp;self) -&gt; <a class="struct" href="../../geom/struct.Bounds.html" title="struct geom::Bounds">Bounds</a></code><a class="srclink" href="../../src/geom/bounds.rs.html#168-173" title="goto source code">[src]</a></h4><div class="docblock"><p>Converts the boundary to map-space.</p>
</div><h4 id="method.try_convert" class="method"><code>pub fn <a href="#method.try_convert" class="fnname">try_convert</a>(&amp;self, pts: &amp;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="../../geom/struct.LonLat.html" title="struct geom::LonLat">LonLat</a>&gt;) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="../../geom/struct.Pt2D.html" title="struct geom::Pt2D">Pt2D</a>&gt;&gt;</code><a class="srclink" href="../../src/geom/bounds.rs.html#176-185" title="goto source code">[src]</a></h4><div class="docblock"><p>Convert all points to map-space, failing if any points are outside this boundary.</p>
</div><h4 id="method.convert" class="method"><code>pub fn <a href="#method.convert" class="fnname">convert</a>(&amp;self, pts: &amp;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="../../geom/struct.LonLat.html" title="struct geom::LonLat">LonLat</a>&gt;) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="../../geom/struct.Pt2D.html" title="struct geom::Pt2D">Pt2D</a>&gt;</code><a class="srclink" href="../../src/geom/bounds.rs.html#188-190" title="goto source code">[src]</a></h4><div class="docblock"><p>Convert all points to map-space. The points may be outside this boundary.</p>
</div><h4 id="method.convert_back" class="method"><code>pub fn <a href="#method.convert_back" class="fnname">convert_back</a>(&amp;self, pts: &amp;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="../../geom/struct.Pt2D.html" title="struct geom::Pt2D">Pt2D</a>&gt;) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="../../geom/struct.LonLat.html" title="struct geom::LonLat">LonLat</a>&gt;</code><a class="srclink" href="../../src/geom/bounds.rs.html#194-196" title="goto source code">[src]</a></h4><div class="docblock"><p>Convert map-space points back to <code>LonLat</code>s. This is only valid if the <code>GPSBounds</code> used
Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.min_lon" class="structfield small-section-header"><a href="#structfield.min_lon" class="anchor field"></a><code>min_lon: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a></code></span><span id="structfield.min_lat" class="structfield small-section-header"><a href="#structfield.min_lat" class="anchor field"></a><code>min_lat: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a></code></span><span id="structfield.max_lon" class="structfield small-section-header"><a href="#structfield.max_lon" class="anchor field"></a><code>max_lon: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a></code></span><span id="structfield.max_lat" class="structfield small-section-header"><a href="#structfield.max_lat" class="anchor field"></a><code>max_lat: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a></code></span><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><h3 id="impl" class="impl"><code class="in-band">impl <a class="struct" href="../../geom/struct.GPSBounds.html" title="struct geom::GPSBounds">GPSBounds</a></code><a href="#impl" class="anchor"></a><a class="srclink" href="../../src/geom/bounds.rs.html#129-205" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.new" class="method"><code>pub fn <a href="#method.new" class="fnname">new</a>() -&gt; <a class="struct" href="../../geom/struct.GPSBounds.html" title="struct geom::GPSBounds">GPSBounds</a></code><a class="srclink" href="../../src/geom/bounds.rs.html#131-138" title="goto source code">[src]</a></h4><div class="docblock"><p>A boundary including no points.</p>
</div><h4 id="method.from" class="method"><code>pub fn <a href="#method.from" class="fnname">from</a>(pts: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="../../geom/struct.LonLat.html" title="struct geom::LonLat">LonLat</a>&gt;) -&gt; <a class="struct" href="../../geom/struct.GPSBounds.html" title="struct geom::GPSBounds">GPSBounds</a></code><a class="srclink" href="../../src/geom/bounds.rs.html#141-147" title="goto source code">[src]</a></h4><div class="docblock"><p>Create a boundary covering some points.</p>
</div><h4 id="method.update" class="method"><code>pub fn <a href="#method.update" class="fnname">update</a>(&amp;mut self, pt: <a class="struct" href="../../geom/struct.LonLat.html" title="struct geom::LonLat">LonLat</a>)</code><a class="srclink" href="../../src/geom/bounds.rs.html#150-155" title="goto source code">[src]</a></h4><div class="docblock"><p>Update the boundary to include this point.</p>
</div><h4 id="method.contains" class="method"><code>pub fn <a href="#method.contains" class="fnname">contains</a>(&amp;self, pt: <a class="struct" href="../../geom/struct.LonLat.html" title="struct geom::LonLat">LonLat</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class="srclink" href="../../src/geom/bounds.rs.html#158-163" title="goto source code">[src]</a></h4><div class="docblock"><p>True if the point is within the boundary.</p>
</div><h4 id="method.get_max_world_pt" class="method"><code>pub fn <a href="#method.get_max_world_pt" class="fnname">get_max_world_pt</a>(&amp;self) -&gt; <a class="struct" href="../../geom/struct.Pt2D.html" title="struct geom::Pt2D">Pt2D</a></code><a class="srclink" href="../../src/geom/bounds.rs.html#167-173" title="goto source code">[src]</a></h4><div class="docblock"><p>The bottom-right corner of the boundary, in map-space.</p>
</div><h4 id="method.to_bounds" class="method"><code>pub fn <a href="#method.to_bounds" class="fnname">to_bounds</a>(&amp;self) -&gt; <a class="struct" href="../../geom/struct.Bounds.html" title="struct geom::Bounds">Bounds</a></code><a class="srclink" href="../../src/geom/bounds.rs.html#176-181" title="goto source code">[src]</a></h4><div class="docblock"><p>Converts the boundary to map-space.</p>
</div><h4 id="method.try_convert" class="method"><code>pub fn <a href="#method.try_convert" class="fnname">try_convert</a>(&amp;self, pts: &amp;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="../../geom/struct.LonLat.html" title="struct geom::LonLat">LonLat</a>&gt;) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="../../geom/struct.Pt2D.html" title="struct geom::Pt2D">Pt2D</a>&gt;&gt;</code><a class="srclink" href="../../src/geom/bounds.rs.html#184-193" title="goto source code">[src]</a></h4><div class="docblock"><p>Convert all points to map-space, failing if any points are outside this boundary.</p>
</div><h4 id="method.convert" class="method"><code>pub fn <a href="#method.convert" class="fnname">convert</a>(&amp;self, pts: &amp;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="../../geom/struct.LonLat.html" title="struct geom::LonLat">LonLat</a>&gt;) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="../../geom/struct.Pt2D.html" title="struct geom::Pt2D">Pt2D</a>&gt;</code><a class="srclink" href="../../src/geom/bounds.rs.html#196-198" title="goto source code">[src]</a></h4><div class="docblock"><p>Convert all points to map-space. The points may be outside this boundary.</p>
</div><h4 id="method.convert_back" class="method"><code>pub fn <a href="#method.convert_back" class="fnname">convert_back</a>(&amp;self, pts: &amp;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="../../geom/struct.Pt2D.html" title="struct geom::Pt2D">Pt2D</a>&gt;) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="../../geom/struct.LonLat.html" title="struct geom::LonLat">LonLat</a>&gt;</code><a class="srclink" href="../../src/geom/bounds.rs.html#202-204" title="goto source code">[src]</a></h4><div class="docblock"><p>Convert map-space points back to <code>LonLat</code>s. This is only valid if the <code>GPSBounds</code> used
is the same as the one used to originally produce the <code>Pt2D</code>s.</p>
</div></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-Clone" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="../../geom/struct.GPSBounds.html" title="struct geom::GPSBounds">GPSBounds</a></code><a href="#impl-Clone" class="anchor"></a><a class="srclink" href="../../src/geom/bounds.rs.html#113" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.clone" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&amp;self) -&gt; <a class="struct" href="../../geom/struct.GPSBounds.html" title="struct geom::GPSBounds">GPSBounds</a></code><a class="srclink" href="../../src/geom/bounds.rs.html#113" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
</div></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-Clone" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="../../geom/struct.GPSBounds.html" title="struct geom::GPSBounds">GPSBounds</a></code><a href="#impl-Clone" class="anchor"></a><a class="srclink" href="../../src/geom/bounds.rs.html#121" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.clone" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&amp;self) -&gt; <a class="struct" href="../../geom/struct.GPSBounds.html" title="struct geom::GPSBounds">GPSBounds</a></code><a class="srclink" href="../../src/geom/bounds.rs.html#121" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
</div><h4 id="method.clone_from" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from" class="fnname">clone_from</a>(&amp;mut self, source: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self)</code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/clone.rs.html#128-130" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
</div></div><h3 id="impl-Debug" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="../../geom/struct.GPSBounds.html" title="struct geom::GPSBounds">GPSBounds</a></code><a href="#impl-Debug" class="anchor"></a><a class="srclink" href="../../src/geom/bounds.rs.html#113" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.fmt" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>&lt;'_&gt;) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class="srclink" href="../../src/geom/bounds.rs.html#113" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
</div></div><h3 id="impl-Deserialize%3C%27de%3E" class="impl"><code class="in-band">impl&lt;'de&gt; <a class="trait" href="https://docs.rs/serde/1.0.123/serde/de/trait.Deserialize.html" title="trait serde::de::Deserialize">Deserialize</a>&lt;'de&gt; for <a class="struct" href="../../geom/struct.GPSBounds.html" title="struct geom::GPSBounds">GPSBounds</a></code><a href="#impl-Deserialize%3C%27de%3E" class="anchor"></a><a class="srclink" href="../../src/geom/bounds.rs.html#113" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.deserialize" class="method hidden"><code>fn <a href="https://docs.rs/serde/1.0.123/serde/de/trait.Deserialize.html#tymethod.deserialize" class="fnname">deserialize</a>&lt;__D&gt;(__deserializer: __D) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self, __D::<a class="type" href="https://docs.rs/serde/1.0.123/serde/de/trait.Deserializer.html#associatedtype.Error" title="type serde::de::Deserializer::Error">Error</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;__D: <a class="trait" href="https://docs.rs/serde/1.0.123/serde/de/trait.Deserializer.html" title="trait serde::de::Deserializer">Deserializer</a>&lt;'de&gt;,&nbsp;</span></code><a class="srclink" href="../../src/geom/bounds.rs.html#113" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Deserialize this value from the given Serde deserializer. <a href="https://docs.rs/serde/1.0.123/serde/de/trait.Deserialize.html#tymethod.deserialize">Read more</a></p>
</div></div><h3 id="impl-PartialEq%3CGPSBounds%3E" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>&lt;<a class="struct" href="../../geom/struct.GPSBounds.html" title="struct geom::GPSBounds">GPSBounds</a>&gt; for <a class="struct" href="../../geom/struct.GPSBounds.html" title="struct geom::GPSBounds">GPSBounds</a></code><a href="#impl-PartialEq%3CGPSBounds%3E" class="anchor"></a><a class="srclink" href="../../src/geom/bounds.rs.html#113" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.eq" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq" class="fnname">eq</a>(&amp;self, other: &amp;<a class="struct" href="../../geom/struct.GPSBounds.html" title="struct geom::GPSBounds">GPSBounds</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class="srclink" href="../../src/geom/bounds.rs.html#113" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used
</div></div><h3 id="impl-Debug" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="../../geom/struct.GPSBounds.html" title="struct geom::GPSBounds">GPSBounds</a></code><a href="#impl-Debug" class="anchor"></a><a class="srclink" href="../../src/geom/bounds.rs.html#121" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.fmt" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>&lt;'_&gt;) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class="srclink" href="../../src/geom/bounds.rs.html#121" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
</div></div><h3 id="impl-Deserialize%3C%27de%3E" class="impl"><code class="in-band">impl&lt;'de&gt; <a class="trait" href="https://docs.rs/serde/1.0.123/serde/de/trait.Deserialize.html" title="trait serde::de::Deserialize">Deserialize</a>&lt;'de&gt; for <a class="struct" href="../../geom/struct.GPSBounds.html" title="struct geom::GPSBounds">GPSBounds</a></code><a href="#impl-Deserialize%3C%27de%3E" class="anchor"></a><a class="srclink" href="../../src/geom/bounds.rs.html#121" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.deserialize" class="method hidden"><code>fn <a href="https://docs.rs/serde/1.0.123/serde/de/trait.Deserialize.html#tymethod.deserialize" class="fnname">deserialize</a>&lt;__D&gt;(__deserializer: __D) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self, __D::<a class="type" href="https://docs.rs/serde/1.0.123/serde/de/trait.Deserializer.html#associatedtype.Error" title="type serde::de::Deserializer::Error">Error</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;__D: <a class="trait" href="https://docs.rs/serde/1.0.123/serde/de/trait.Deserializer.html" title="trait serde::de::Deserializer">Deserializer</a>&lt;'de&gt;,&nbsp;</span></code><a class="srclink" href="../../src/geom/bounds.rs.html#121" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Deserialize this value from the given Serde deserializer. <a href="https://docs.rs/serde/1.0.123/serde/de/trait.Deserialize.html#tymethod.deserialize">Read more</a></p>
</div></div><h3 id="impl-PartialEq%3CGPSBounds%3E" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>&lt;<a class="struct" href="../../geom/struct.GPSBounds.html" title="struct geom::GPSBounds">GPSBounds</a>&gt; for <a class="struct" href="../../geom/struct.GPSBounds.html" title="struct geom::GPSBounds">GPSBounds</a></code><a href="#impl-PartialEq%3CGPSBounds%3E" class="anchor"></a><a class="srclink" href="../../src/geom/bounds.rs.html#121" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.eq" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq" class="fnname">eq</a>(&amp;self, other: &amp;<a class="struct" href="../../geom/struct.GPSBounds.html" title="struct geom::GPSBounds">GPSBounds</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class="srclink" href="../../src/geom/bounds.rs.html#121" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used
by <code>==</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p>
</div><h4 id="method.ne" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne" class="fnname">ne</a>(&amp;self, other: &amp;<a class="struct" href="../../geom/struct.GPSBounds.html" title="struct geom::GPSBounds">GPSBounds</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class="srclink" href="../../src/geom/bounds.rs.html#113" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>!=</code>.</p>
</div></div><h3 id="impl-Serialize" class="impl"><code class="in-band">impl <a class="trait" href="https://docs.rs/serde/1.0.123/serde/ser/trait.Serialize.html" title="trait serde::ser::Serialize">Serialize</a> for <a class="struct" href="../../geom/struct.GPSBounds.html" title="struct geom::GPSBounds">GPSBounds</a></code><a href="#impl-Serialize" class="anchor"></a><a class="srclink" href="../../src/geom/bounds.rs.html#113" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.serialize" class="method hidden"><code>fn <a href="https://docs.rs/serde/1.0.123/serde/ser/trait.Serialize.html#tymethod.serialize" class="fnname">serialize</a>&lt;__S&gt;(&amp;self, __serializer: __S) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;__S::<a class="type" href="https://docs.rs/serde/1.0.123/serde/ser/trait.Serializer.html#associatedtype.Ok" title="type serde::ser::Serializer::Ok">Ok</a>, __S::<a class="type" href="https://docs.rs/serde/1.0.123/serde/ser/trait.Serializer.html#associatedtype.Error" title="type serde::ser::Serializer::Error">Error</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;__S: <a class="trait" href="https://docs.rs/serde/1.0.123/serde/ser/trait.Serializer.html" title="trait serde::ser::Serializer">Serializer</a>,&nbsp;</span></code><a class="srclink" href="../../src/geom/bounds.rs.html#113" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Serialize this value into the given Serde serializer. <a href="https://docs.rs/serde/1.0.123/serde/ser/trait.Serialize.html#tymethod.serialize">Read more</a></p>
</div></div><h3 id="impl-StructuralPartialEq" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.StructuralPartialEq.html" title="trait core::marker::StructuralPartialEq">StructuralPartialEq</a> for <a class="struct" href="../../geom/struct.GPSBounds.html" title="struct geom::GPSBounds">GPSBounds</a></code><a href="#impl-StructuralPartialEq" class="anchor"></a><a class="srclink" href="../../src/geom/bounds.rs.html#113" title="goto source code">[src]</a></h3><div class="impl-items"></div></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><h3 id="impl-RefUnwindSafe" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="../../geom/struct.GPSBounds.html" title="struct geom::GPSBounds">GPSBounds</a></code><a href="#impl-RefUnwindSafe" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-Send" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="../../geom/struct.GPSBounds.html" title="struct geom::GPSBounds">GPSBounds</a></code><a href="#impl-Send" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-Sync" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="../../geom/struct.GPSBounds.html" title="struct geom::GPSBounds">GPSBounds</a></code><a href="#impl-Sync" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-Unpin" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="../../geom/struct.GPSBounds.html" title="struct geom::GPSBounds">GPSBounds</a></code><a href="#impl-Unpin" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-UnwindSafe" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="../../geom/struct.GPSBounds.html" title="struct geom::GPSBounds">GPSBounds</a></code><a href="#impl-UnwindSafe" class="anchor"></a></h3><div class="impl-items"></div></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><h3 id="impl-Any" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#108-112" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.type_id" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#109-111" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
</div><h4 id="method.ne" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne" class="fnname">ne</a>(&amp;self, other: &amp;<a class="struct" href="../../geom/struct.GPSBounds.html" title="struct geom::GPSBounds">GPSBounds</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class="srclink" href="../../src/geom/bounds.rs.html#121" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>!=</code>.</p>
</div></div><h3 id="impl-Serialize" class="impl"><code class="in-band">impl <a class="trait" href="https://docs.rs/serde/1.0.123/serde/ser/trait.Serialize.html" title="trait serde::ser::Serialize">Serialize</a> for <a class="struct" href="../../geom/struct.GPSBounds.html" title="struct geom::GPSBounds">GPSBounds</a></code><a href="#impl-Serialize" class="anchor"></a><a class="srclink" href="../../src/geom/bounds.rs.html#121" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.serialize" class="method hidden"><code>fn <a href="https://docs.rs/serde/1.0.123/serde/ser/trait.Serialize.html#tymethod.serialize" class="fnname">serialize</a>&lt;__S&gt;(&amp;self, __serializer: __S) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;__S::<a class="type" href="https://docs.rs/serde/1.0.123/serde/ser/trait.Serializer.html#associatedtype.Ok" title="type serde::ser::Serializer::Ok">Ok</a>, __S::<a class="type" href="https://docs.rs/serde/1.0.123/serde/ser/trait.Serializer.html#associatedtype.Error" title="type serde::ser::Serializer::Error">Error</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;__S: <a class="trait" href="https://docs.rs/serde/1.0.123/serde/ser/trait.Serializer.html" title="trait serde::ser::Serializer">Serializer</a>,&nbsp;</span></code><a class="srclink" href="../../src/geom/bounds.rs.html#121" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Serialize this value into the given Serde serializer. <a href="https://docs.rs/serde/1.0.123/serde/ser/trait.Serialize.html#tymethod.serialize">Read more</a></p>
</div></div><h3 id="impl-StructuralPartialEq" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.StructuralPartialEq.html" title="trait core::marker::StructuralPartialEq">StructuralPartialEq</a> for <a class="struct" href="../../geom/struct.GPSBounds.html" title="struct geom::GPSBounds">GPSBounds</a></code><a href="#impl-StructuralPartialEq" class="anchor"></a><a class="srclink" href="../../src/geom/bounds.rs.html#121" title="goto source code">[src]</a></h3><div class="impl-items"></div></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><h3 id="impl-RefUnwindSafe" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="../../geom/struct.GPSBounds.html" title="struct geom::GPSBounds">GPSBounds</a></code><a href="#impl-RefUnwindSafe" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-Send" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="../../geom/struct.GPSBounds.html" title="struct geom::GPSBounds">GPSBounds</a></code><a href="#impl-Send" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-Sync" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="../../geom/struct.GPSBounds.html" title="struct geom::GPSBounds">GPSBounds</a></code><a href="#impl-Sync" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-Unpin" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="../../geom/struct.GPSBounds.html" title="struct geom::GPSBounds">GPSBounds</a></code><a href="#impl-Unpin" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-UnwindSafe" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="../../geom/struct.GPSBounds.html" title="struct geom::GPSBounds">GPSBounds</a></code><a href="#impl-UnwindSafe" class="anchor"></a></h3><div class="impl-items"></div></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><h3 id="impl-Any" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#108-112" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.type_id" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#109-111" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
</div></div><h3 id="impl-Borrow%3CT%3E" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href="#impl-Borrow%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#210-214" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#211-213" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
</div></div><h3 id="impl-BorrowMut%3CT%3E" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href="#impl-BorrowMut%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#217-221" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow_mut" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#218-220" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>
</div></div><h3 id="impl-DeserializeOwned" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="https://docs.rs/serde/1.0.123/serde/de/trait.DeserializeOwned.html" title="trait serde::de::DeserializeOwned">DeserializeOwned</a> for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: for&lt;'de&gt; <a class="trait" href="https://docs.rs/serde/1.0.123/serde/de/trait.Deserialize.html" title="trait serde::de::Deserialize">Deserialize</a>&lt;'de&gt;,&nbsp;</span></code><a href="#impl-DeserializeOwned" class="anchor"></a><a class="srclink" href="https://docs.rs/serde/1.0.123/src/serde/de/mod.rs.html#603" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-From%3CT%3E" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt; for T</code><a href="#impl-From%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#552-556" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.from-1" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(t: T) -&gt; T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#553-555" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>

View File

@ -1,4 +1,4 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `downsize` fn in crate `geom`."><meta name="keywords" content="rust, rustlang, rust-lang, downsize"><title>geom::polygon::downsize - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../geom/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../index.html">geom</a>::<wbr><a href="index.html">polygon</a></p><script>window.sidebarCurrent = {name: "downsize", ty: "fn", relpath: ""};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><span class="help-button">?</span>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/geom/polygon.rs.html#585-595" title="goto source code">[src]</a></span><span class="in-band">Function <a href="../index.html">geom</a>::<wbr><a href="index.html">polygon</a>::<wbr><a class="fn" href="">downsize</a></span></h1><pre class="rust fn">fn downsize(input: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a>&gt;</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "geom";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/geom/polygon.rs.html#591-601" title="goto source code">[src]</a></span><span class="in-band">Function <a href="../index.html">geom</a>::<wbr><a href="index.html">polygon</a>::<wbr><a class="fn" href="">downsize</a></span></h1><pre class="rust fn">fn downsize(input: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>&gt;) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a>&gt;</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "geom";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>

View File

@ -1,4 +1,4 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `from_multi` fn in crate `geom`."><meta name="keywords" content="rust, rustlang, rust-lang, from_multi"><title>geom::polygon::from_multi - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../geom/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../index.html">geom</a>::<wbr><a href="index.html">polygon</a></p><script>window.sidebarCurrent = {name: "from_multi", ty: "fn", relpath: ""};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><span class="help-button">?</span>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/geom/polygon.rs.html#567-583" title="goto source code">[src]</a></span><span class="in-band">Function <a href="../index.html">geom</a>::<wbr><a href="index.html">polygon</a>::<wbr><a class="fn" href="">from_multi</a></span></h1><pre class="rust fn">fn from_multi(multi: MultiPolygon&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>&gt;) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="../../geom/struct.Polygon.html" title="struct geom::Polygon">Polygon</a>&gt;</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "geom";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/geom/polygon.rs.html#573-589" title="goto source code">[src]</a></span><span class="in-band">Function <a href="../index.html">geom</a>::<wbr><a href="index.html">polygon</a>::<wbr><a class="fn" href="">from_multi</a></span></h1><pre class="rust fn">fn from_multi(multi: MultiPolygon&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>&gt;) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="../../geom/struct.Polygon.html" title="struct geom::Polygon">Polygon</a>&gt;</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "geom";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>

View File

@ -1,4 +1,4 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `to_geo` fn in crate `geom`."><meta name="keywords" content="rust, rustlang, rust-lang, to_geo"><title>geom::polygon::to_geo - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../geom/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="../index.html">geom</a>::<wbr><a href="index.html">polygon</a></p><script>window.sidebarCurrent = {name: "to_geo", ty: "fn", relpath: ""};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><span class="help-button">?</span>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/geom/polygon.rs.html#527-536" title="goto source code">[src]</a></span><span class="in-band">Function <a href="../index.html">geom</a>::<wbr><a href="index.html">polygon</a>::<wbr><a class="fn" href="">to_geo</a></span></h1><pre class="rust fn">fn to_geo(pts: &amp;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="../../geom/struct.Pt2D.html" title="struct geom::Pt2D">Pt2D</a>&gt;) -&gt; Polygon&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>&gt;</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "geom";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/geom/polygon.rs.html#533-542" title="goto source code">[src]</a></span><span class="in-band">Function <a href="../index.html">geom</a>::<wbr><a href="index.html">polygon</a>::<wbr><a class="fn" href="">to_geo</a></span></h1><pre class="rust fn">fn to_geo(pts: &amp;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="../../geom/struct.Pt2D.html" title="struct geom::Pt2D">Pt2D</a>&gt;) -&gt; Polygon&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>&gt;</pre></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "geom";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>

View File

@ -1,6 +1,6 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `polygon` mod in crate `geom`."><meta name="keywords" content="rust, rustlang, rust-lang, polygon"><title>geom::polygon - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../geom/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class="location">Module polygon</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li><li><a href="#functions">Functions</a></li></ul></div><p class="location"><a href="../index.html">geom</a></p><script>window.sidebarCurrent = {name: "polygon", ty: "mod", relpath: "../"};</script><script defer src="../sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><span class="help-button">?</span>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/geom/polygon.rs.html#1-595" title="goto source code">[src]</a></span><span class="in-band">Module <a href="../index.html">geom</a>::<wbr><a class="mod" href="">polygon</a></span></h1><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/geom/polygon.rs.html#1-601" title="goto source code">[src]</a></span><span class="in-band">Module <a href="../index.html">geom</a>::<wbr><a class="mod" href="">polygon</a></span></h1><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2>
<table><tr class="module-item"><td><a class="struct" href="struct.Polygon.html" title="geom::polygon::Polygon struct">Polygon</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="struct" href="struct.Triangle.html" title="geom::polygon::Triangle struct">Triangle</a></td><td class="docblock-short"></td></tr></table><h2 id="functions" class="section-header"><a href="#functions">Functions</a></h2>
<table><tr class="module-item"><td><a class="fn" href="fn.downsize.html" title="geom::polygon::downsize fn">downsize</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="fn" href="fn.from_multi.html" title="geom::polygon::from_multi fn">from_multi</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="fn" href="fn.to_geo.html" title="geom::polygon::to_geo fn">to_geo</a></td><td class="docblock-short"></td></tr></table></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "geom";</script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>

File diff suppressed because one or more lines are too long

View File

@ -1,14 +1,14 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `Triangle` struct in crate `geom`."><meta name="keywords" content="rust, rustlang, rust-lang, Triangle"><title>geom::polygon::Triangle - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../geom/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class="location">Struct Triangle</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#fields">Fields</a><div class="sidebar-links"><a href="#structfield.pt1">pt1</a><a href="#structfield.pt2">pt2</a><a href="#structfield.pt3">pt3</a></div><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.contains_pt">contains_pt</a><a href="#method.new">new</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Clone">Clone</a><a href="#impl-Debug">Debug</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-Same%3CT%3E">Same&lt;T&gt;</a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a></div></div><p class="location"><a href="../index.html">geom</a>::<wbr><a href="index.html">polygon</a></p><script>window.sidebarCurrent = {name: "Triangle", ty: "struct", relpath: ""};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><span class="help-button">?</span>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/geom/polygon.rs.html#488-492" title="goto source code">[src]</a></span><span class="in-band">Struct <a href="../index.html">geom</a>::<wbr><a href="index.html">polygon</a>::<wbr><a class="struct" href="">Triangle</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust struct">pub struct Triangle {
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/geom/polygon.rs.html#494-498" title="goto source code">[src]</a></span><span class="in-band">Struct <a href="../index.html">geom</a>::<wbr><a href="index.html">polygon</a>::<wbr><a class="struct" href="">Triangle</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust struct">pub struct Triangle {
pub pt1: <a class="struct" href="../../geom/struct.Pt2D.html" title="struct geom::Pt2D">Pt2D</a>,
pub pt2: <a class="struct" href="../../geom/struct.Pt2D.html" title="struct geom::Pt2D">Pt2D</a>,
pub pt3: <a class="struct" href="../../geom/struct.Pt2D.html" title="struct geom::Pt2D">Pt2D</a>,
}</pre></div><h2 id="fields" class="fields small-section-header">
Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.pt1" class="structfield small-section-header"><a href="#structfield.pt1" class="anchor field"></a><code>pt1: <a class="struct" href="../../geom/struct.Pt2D.html" title="struct geom::Pt2D">Pt2D</a></code></span><span id="structfield.pt2" class="structfield small-section-header"><a href="#structfield.pt2" class="anchor field"></a><code>pt2: <a class="struct" href="../../geom/struct.Pt2D.html" title="struct geom::Pt2D">Pt2D</a></code></span><span id="structfield.pt3" class="structfield small-section-header"><a href="#structfield.pt3" class="anchor field"></a><code>pt3: <a class="struct" href="../../geom/struct.Pt2D.html" title="struct geom::Pt2D">Pt2D</a></code></span><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><h3 id="impl" class="impl"><code class="in-band">impl <a class="struct" href="../../geom/struct.Triangle.html" title="struct geom::Triangle">Triangle</a></code><a href="#impl" class="anchor"></a><a class="srclink" href="../../src/geom/polygon.rs.html#494-525" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.new" class="method"><code>pub(crate) fn <a href="#method.new" class="fnname">new</a>(pt1: <a class="struct" href="../../geom/struct.Pt2D.html" title="struct geom::Pt2D">Pt2D</a>, pt2: <a class="struct" href="../../geom/struct.Pt2D.html" title="struct geom::Pt2D">Pt2D</a>, pt3: <a class="struct" href="../../geom/struct.Pt2D.html" title="struct geom::Pt2D">Pt2D</a>) -&gt; <a class="struct" href="../../geom/struct.Triangle.html" title="struct geom::Triangle">Triangle</a></code><a class="srclink" href="../../src/geom/polygon.rs.html#495-497" title="goto source code">[src]</a></h4><h4 id="method.contains_pt" class="method"><code>fn <a href="#method.contains_pt" class="fnname">contains_pt</a>(&amp;self, pt: <a class="struct" href="../../geom/struct.Pt2D.html" title="struct geom::Pt2D">Pt2D</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class="srclink" href="../../src/geom/polygon.rs.html#499-524" title="goto source code">[src]</a></h4></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-Clone" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="../../geom/struct.Triangle.html" title="struct geom::Triangle">Triangle</a></code><a href="#impl-Clone" class="anchor"></a><a class="srclink" href="../../src/geom/polygon.rs.html#487" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.clone" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&amp;self) -&gt; <a class="struct" href="../../geom/struct.Triangle.html" title="struct geom::Triangle">Triangle</a></code><a class="srclink" href="../../src/geom/polygon.rs.html#487" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.pt1" class="structfield small-section-header"><a href="#structfield.pt1" class="anchor field"></a><code>pt1: <a class="struct" href="../../geom/struct.Pt2D.html" title="struct geom::Pt2D">Pt2D</a></code></span><span id="structfield.pt2" class="structfield small-section-header"><a href="#structfield.pt2" class="anchor field"></a><code>pt2: <a class="struct" href="../../geom/struct.Pt2D.html" title="struct geom::Pt2D">Pt2D</a></code></span><span id="structfield.pt3" class="structfield small-section-header"><a href="#structfield.pt3" class="anchor field"></a><code>pt3: <a class="struct" href="../../geom/struct.Pt2D.html" title="struct geom::Pt2D">Pt2D</a></code></span><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><h3 id="impl" class="impl"><code class="in-band">impl <a class="struct" href="../../geom/struct.Triangle.html" title="struct geom::Triangle">Triangle</a></code><a href="#impl" class="anchor"></a><a class="srclink" href="../../src/geom/polygon.rs.html#500-531" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.new" class="method"><code>pub(crate) fn <a href="#method.new" class="fnname">new</a>(pt1: <a class="struct" href="../../geom/struct.Pt2D.html" title="struct geom::Pt2D">Pt2D</a>, pt2: <a class="struct" href="../../geom/struct.Pt2D.html" title="struct geom::Pt2D">Pt2D</a>, pt3: <a class="struct" href="../../geom/struct.Pt2D.html" title="struct geom::Pt2D">Pt2D</a>) -&gt; <a class="struct" href="../../geom/struct.Triangle.html" title="struct geom::Triangle">Triangle</a></code><a class="srclink" href="../../src/geom/polygon.rs.html#501-503" title="goto source code">[src]</a></h4><h4 id="method.contains_pt" class="method"><code>fn <a href="#method.contains_pt" class="fnname">contains_pt</a>(&amp;self, pt: <a class="struct" href="../../geom/struct.Pt2D.html" title="struct geom::Pt2D">Pt2D</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class="srclink" href="../../src/geom/polygon.rs.html#505-530" title="goto source code">[src]</a></h4></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-Clone" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="../../geom/struct.Triangle.html" title="struct geom::Triangle">Triangle</a></code><a href="#impl-Clone" class="anchor"></a><a class="srclink" href="../../src/geom/polygon.rs.html#493" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.clone" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&amp;self) -&gt; <a class="struct" href="../../geom/struct.Triangle.html" title="struct geom::Triangle">Triangle</a></code><a class="srclink" href="../../src/geom/polygon.rs.html#493" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
</div><h4 id="method.clone_from" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from" class="fnname">clone_from</a>(&amp;mut self, source: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self)</code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/clone.rs.html#128-130" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
</div></div><h3 id="impl-Debug" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="../../geom/struct.Triangle.html" title="struct geom::Triangle">Triangle</a></code><a href="#impl-Debug" class="anchor"></a><a class="srclink" href="../../src/geom/polygon.rs.html#487" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.fmt" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>&lt;'_&gt;) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class="srclink" href="../../src/geom/polygon.rs.html#487" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
</div></div><h3 id="impl-Debug" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="../../geom/struct.Triangle.html" title="struct geom::Triangle">Triangle</a></code><a href="#impl-Debug" class="anchor"></a><a class="srclink" href="../../src/geom/polygon.rs.html#493" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.fmt" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>&lt;'_&gt;) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class="srclink" href="../../src/geom/polygon.rs.html#493" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
</div></div></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><h3 id="impl-RefUnwindSafe" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="../../geom/struct.Triangle.html" title="struct geom::Triangle">Triangle</a></code><a href="#impl-RefUnwindSafe" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-Send" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="../../geom/struct.Triangle.html" title="struct geom::Triangle">Triangle</a></code><a href="#impl-Send" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-Sync" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="../../geom/struct.Triangle.html" title="struct geom::Triangle">Triangle</a></code><a href="#impl-Sync" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-Unpin" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="../../geom/struct.Triangle.html" title="struct geom::Triangle">Triangle</a></code><a href="#impl-Unpin" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-UnwindSafe" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="../../geom/struct.Triangle.html" title="struct geom::Triangle">Triangle</a></code><a href="#impl-UnwindSafe" class="anchor"></a></h3><div class="impl-items"></div></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><h3 id="impl-Any" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#108-112" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.type_id" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#109-111" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
</div></div><h3 id="impl-Borrow%3CT%3E" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href="#impl-Borrow%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#210-214" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#211-213" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
</div></div><h3 id="impl-BorrowMut%3CT%3E" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href="#impl-BorrowMut%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#217-221" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow_mut" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#218-220" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>

View File

@ -1,6 +1,6 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `Bounds` struct in crate `geom`."><meta name="keywords" content="rust, rustlang, rust-lang, Bounds"><title>geom::Bounds - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../ayu.css" disabled ><script id="default-settings"></script><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../favicon.svg">
<link rel="alternate icon" type="image/png" href="../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../geom/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><p class="location">Struct Bounds</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#fields">Fields</a><div class="sidebar-links"><a href="#structfield.max_x">max_x</a><a href="#structfield.max_y">max_y</a><a href="#structfield.min_x">min_x</a><a href="#structfield.min_y">min_y</a></div><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.as_bbox">as_bbox</a><a href="#method.center">center</a><a href="#method.contains">contains</a><a href="#method.from">from</a><a href="#method.get_rectangle">get_rectangle</a><a href="#method.height">height</a><a href="#method.new">new</a><a href="#method.union">union</a><a href="#method.update">update</a><a href="#method.width">width</a><a href="#method.zero">zero</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Clone">Clone</a><a href="#impl-Debug">Debug</a><a href="#impl-Deserialize%3C%27de%3E">Deserialize&lt;&#39;de&gt;</a><a href="#impl-PartialEq%3CBounds%3E">PartialEq&lt;Bounds&gt;</a><a href="#impl-Serialize">Serialize</a><a href="#impl-StructuralPartialEq">StructuralPartialEq</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-DeserializeOwned">DeserializeOwned</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-Same%3CT%3E">Same&lt;T&gt;</a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a></div></div><p class="location"><a href="index.html">geom</a></p><script>window.sidebarCurrent = {name: "Bounds", ty: "struct", relpath: ""};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><span class="help-button">?</span>
<link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../geom/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><p class="location">Struct Bounds</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#fields">Fields</a><div class="sidebar-links"><a href="#structfield.max_x">max_x</a><a href="#structfield.max_y">max_y</a><a href="#structfield.min_x">min_x</a><a href="#structfield.min_y">min_y</a></div><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.add_buffer">add_buffer</a><a href="#method.as_bbox">as_bbox</a><a href="#method.center">center</a><a href="#method.contains">contains</a><a href="#method.from">from</a><a href="#method.get_rectangle">get_rectangle</a><a href="#method.height">height</a><a href="#method.new">new</a><a href="#method.union">union</a><a href="#method.update">update</a><a href="#method.width">width</a><a href="#method.zero">zero</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Clone">Clone</a><a href="#impl-Debug">Debug</a><a href="#impl-Deserialize%3C%27de%3E">Deserialize&lt;&#39;de&gt;</a><a href="#impl-PartialEq%3CBounds%3E">PartialEq&lt;Bounds&gt;</a><a href="#impl-Serialize">Serialize</a><a href="#impl-StructuralPartialEq">StructuralPartialEq</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-DeserializeOwned">DeserializeOwned</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-Same%3CT%3E">Same&lt;T&gt;</a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a></div></div><p class="location"><a href="index.html">geom</a></p><script>window.sidebarCurrent = {name: "Bounds", ty: "struct", relpath: ""};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><span class="help-button">?</span>
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../src/geom/bounds.rs.html#9-14" title="goto source code">[src]</a></span><span class="in-band">Struct <a href="index.html">geom</a>::<wbr><a class="struct" href="">Bounds</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust struct">pub struct Bounds {
pub min_x: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>,
pub min_y: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>,
@ -8,16 +8,17 @@
pub max_y: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>,
}</pre></div><div class="docblock"><p>Represents a rectangular boundary of <code>Pt2D</code> points.</p>
</div><h2 id="fields" class="fields small-section-header">
Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.min_x" class="structfield small-section-header"><a href="#structfield.min_x" class="anchor field"></a><code>min_x: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a></code></span><span id="structfield.min_y" class="structfield small-section-header"><a href="#structfield.min_y" class="anchor field"></a><code>min_y: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a></code></span><span id="structfield.max_x" class="structfield small-section-header"><a href="#structfield.max_x" class="anchor field"></a><code>max_x: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a></code></span><span id="structfield.max_y" class="structfield small-section-header"><a href="#structfield.max_y" class="anchor field"></a><code>max_y: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a></code></span><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><h3 id="impl" class="impl"><code class="in-band">impl <a class="struct" href="../geom/struct.Bounds.html" title="struct geom::Bounds">Bounds</a></code><a href="#impl" class="anchor"></a><a class="srclink" href="../src/geom/bounds.rs.html#16-108" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.new" class="method"><code>pub fn <a href="#method.new" class="fnname">new</a>() -&gt; <a class="struct" href="../geom/struct.Bounds.html" title="struct geom::Bounds">Bounds</a></code><a class="srclink" href="../src/geom/bounds.rs.html#18-25" title="goto source code">[src]</a></h4><div class="docblock"><p>A boundary including no points.</p>
Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.min_x" class="structfield small-section-header"><a href="#structfield.min_x" class="anchor field"></a><code>min_x: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a></code></span><span id="structfield.min_y" class="structfield small-section-header"><a href="#structfield.min_y" class="anchor field"></a><code>min_y: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a></code></span><span id="structfield.max_x" class="structfield small-section-header"><a href="#structfield.max_x" class="anchor field"></a><code>max_x: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a></code></span><span id="structfield.max_y" class="structfield small-section-header"><a href="#structfield.max_y" class="anchor field"></a><code>max_y: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a></code></span><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><h3 id="impl" class="impl"><code class="in-band">impl <a class="struct" href="../geom/struct.Bounds.html" title="struct geom::Bounds">Bounds</a></code><a href="#impl" class="anchor"></a><a class="srclink" href="../src/geom/bounds.rs.html#16-116" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.new" class="method"><code>pub fn <a href="#method.new" class="fnname">new</a>() -&gt; <a class="struct" href="../geom/struct.Bounds.html" title="struct geom::Bounds">Bounds</a></code><a class="srclink" href="../src/geom/bounds.rs.html#18-25" title="goto source code">[src]</a></h4><div class="docblock"><p>A boundary including no points.</p>
</div><h4 id="method.zero" class="method"><code>pub fn <a href="#method.zero" class="fnname">zero</a>() -&gt; Self</code><a class="srclink" href="../src/geom/bounds.rs.html#27-34" title="goto source code">[src]</a></h4><h4 id="method.from" class="method"><code>pub fn <a href="#method.from" class="fnname">from</a>(pts: &amp;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="../geom/struct.Pt2D.html" title="struct geom::Pt2D">Pt2D</a>&gt;) -&gt; <a class="struct" href="../geom/struct.Bounds.html" title="struct geom::Bounds">Bounds</a></code><a class="srclink" href="../src/geom/bounds.rs.html#37-43" title="goto source code">[src]</a></h4><div class="docblock"><p>Create a boundary covering some points.</p>
</div><h4 id="method.update" class="method"><code>pub fn <a href="#method.update" class="fnname">update</a>(&amp;mut self, pt: <a class="struct" href="../geom/struct.Pt2D.html" title="struct geom::Pt2D">Pt2D</a>)</code><a class="srclink" href="../src/geom/bounds.rs.html#46-51" title="goto source code">[src]</a></h4><div class="docblock"><p>Update the boundary to include this point.</p>
</div><h4 id="method.union" class="method"><code>pub fn <a href="#method.union" class="fnname">union</a>(&amp;mut self, other: <a class="struct" href="../geom/struct.Bounds.html" title="struct geom::Bounds">Bounds</a>)</code><a class="srclink" href="../src/geom/bounds.rs.html#54-57" title="goto source code">[src]</a></h4><div class="docblock"><p>Unions two boundaries.</p>
</div><h4 id="method.contains" class="method"><code>pub fn <a href="#method.contains" class="fnname">contains</a>(&amp;self, pt: <a class="struct" href="../geom/struct.Pt2D.html" title="struct geom::Pt2D">Pt2D</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class="srclink" href="../src/geom/bounds.rs.html#60-62" title="goto source code">[src]</a></h4><div class="docblock"><p>True if the point is within the boundary.</p>
</div><h4 id="method.as_bbox" class="method"><code>pub fn <a href="#method.as_bbox" class="fnname">as_bbox</a>(&amp;self) -&gt; Rect</code><a class="srclink" href="../src/geom/bounds.rs.html#65-76" title="goto source code">[src]</a></h4><div class="docblock"><p>Converts the boundary to the format used by <code>aabb_quadtree</code>.</p>
</div><h4 id="method.get_rectangle" class="method"><code>pub fn <a href="#method.get_rectangle" class="fnname">get_rectangle</a>(&amp;self) -&gt; <a class="struct" href="../geom/struct.Polygon.html" title="struct geom::Polygon">Polygon</a></code><a class="srclink" href="../src/geom/bounds.rs.html#79-88" title="goto source code">[src]</a></h4><div class="docblock"><p>Creates a rectangle covering this boundary.</p>
</div><h4 id="method.width" class="method"><code>pub fn <a href="#method.width" class="fnname">width</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a></code><a class="srclink" href="../src/geom/bounds.rs.html#92-94" title="goto source code">[src]</a></h4><div class="docblock"><p>The width of this boundary.</p>
</div><h4 id="method.height" class="method"><code>pub fn <a href="#method.height" class="fnname">height</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a></code><a class="srclink" href="../src/geom/bounds.rs.html#97-99" title="goto source code">[src]</a></h4><div class="docblock"><p>The height of this boundary.</p>
</div><h4 id="method.center" class="method"><code>pub fn <a href="#method.center" class="fnname">center</a>(&amp;self) -&gt; <a class="struct" href="../geom/struct.Pt2D.html" title="struct geom::Pt2D">Pt2D</a></code><a class="srclink" href="../src/geom/bounds.rs.html#102-107" title="goto source code">[src]</a></h4><div class="docblock"><p>The center point of this boundary.</p>
</div><h4 id="method.add_buffer" class="method"><code>pub fn <a href="#method.add_buffer" class="fnname">add_buffer</a>(&amp;mut self, sides: <a class="struct" href="../geom/struct.Distance.html" title="struct geom::Distance">Distance</a>)</code><a class="srclink" href="../src/geom/bounds.rs.html#60-65" title="goto source code">[src]</a></h4><div class="docblock"><p>Expand the existing boundary by some distance evenly on all sides.</p>
</div><h4 id="method.contains" class="method"><code>pub fn <a href="#method.contains" class="fnname">contains</a>(&amp;self, pt: <a class="struct" href="../geom/struct.Pt2D.html" title="struct geom::Pt2D">Pt2D</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class="srclink" href="../src/geom/bounds.rs.html#68-70" title="goto source code">[src]</a></h4><div class="docblock"><p>True if the point is within the boundary.</p>
</div><h4 id="method.as_bbox" class="method"><code>pub fn <a href="#method.as_bbox" class="fnname">as_bbox</a>(&amp;self) -&gt; Rect</code><a class="srclink" href="../src/geom/bounds.rs.html#73-84" title="goto source code">[src]</a></h4><div class="docblock"><p>Converts the boundary to the format used by <code>aabb_quadtree</code>.</p>
</div><h4 id="method.get_rectangle" class="method"><code>pub fn <a href="#method.get_rectangle" class="fnname">get_rectangle</a>(&amp;self) -&gt; <a class="struct" href="../geom/struct.Polygon.html" title="struct geom::Polygon">Polygon</a></code><a class="srclink" href="../src/geom/bounds.rs.html#87-96" title="goto source code">[src]</a></h4><div class="docblock"><p>Creates a rectangle covering this boundary.</p>
</div><h4 id="method.width" class="method"><code>pub fn <a href="#method.width" class="fnname">width</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a></code><a class="srclink" href="../src/geom/bounds.rs.html#100-102" title="goto source code">[src]</a></h4><div class="docblock"><p>The width of this boundary.</p>
</div><h4 id="method.height" class="method"><code>pub fn <a href="#method.height" class="fnname">height</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a></code><a class="srclink" href="../src/geom/bounds.rs.html#105-107" title="goto source code">[src]</a></h4><div class="docblock"><p>The height of this boundary.</p>
</div><h4 id="method.center" class="method"><code>pub fn <a href="#method.center" class="fnname">center</a>(&amp;self) -&gt; <a class="struct" href="../geom/struct.Pt2D.html" title="struct geom::Pt2D">Pt2D</a></code><a class="srclink" href="../src/geom/bounds.rs.html#110-115" title="goto source code">[src]</a></h4><div class="docblock"><p>The center point of this boundary.</p>
</div></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-Clone" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="../geom/struct.Bounds.html" title="struct geom::Bounds">Bounds</a></code><a href="#impl-Clone" class="anchor"></a><a class="srclink" href="../src/geom/bounds.rs.html#8" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.clone" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&amp;self) -&gt; <a class="struct" href="../geom/struct.Bounds.html" title="struct geom::Bounds">Bounds</a></code><a class="srclink" href="../src/geom/bounds.rs.html#8" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
</div><h4 id="method.clone_from" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from" class="fnname">clone_from</a>(&amp;mut self, source: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self)</code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/clone.rs.html#128-130" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
</div></div><h3 id="impl-Debug" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="../geom/struct.Bounds.html" title="struct geom::Bounds">Bounds</a></code><a href="#impl-Debug" class="anchor"></a><a class="srclink" href="../src/geom/bounds.rs.html#8" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.fmt" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>&lt;'_&gt;) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class="srclink" href="../src/geom/bounds.rs.html#8" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>

View File

@ -1,7 +1,7 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `GPSBounds` struct in crate `geom`."><meta name="keywords" content="rust, rustlang, rust-lang, GPSBounds"><title>geom::GPSBounds - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../ayu.css" disabled ><script id="default-settings"></script><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../favicon.svg">
<link rel="alternate icon" type="image/png" href="../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../geom/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><p class="location">Struct GPSBounds</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#fields">Fields</a><div class="sidebar-links"><a href="#structfield.max_lat">max_lat</a><a href="#structfield.max_lon">max_lon</a><a href="#structfield.min_lat">min_lat</a><a href="#structfield.min_lon">min_lon</a></div><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.contains">contains</a><a href="#method.convert">convert</a><a href="#method.convert_back">convert_back</a><a href="#method.from">from</a><a href="#method.get_max_world_pt">get_max_world_pt</a><a href="#method.new">new</a><a href="#method.to_bounds">to_bounds</a><a href="#method.try_convert">try_convert</a><a href="#method.update">update</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Clone">Clone</a><a href="#impl-Debug">Debug</a><a href="#impl-Deserialize%3C%27de%3E">Deserialize&lt;&#39;de&gt;</a><a href="#impl-PartialEq%3CGPSBounds%3E">PartialEq&lt;GPSBounds&gt;</a><a href="#impl-Serialize">Serialize</a><a href="#impl-StructuralPartialEq">StructuralPartialEq</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-DeserializeOwned">DeserializeOwned</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-Same%3CT%3E">Same&lt;T&gt;</a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a></div></div><p class="location"><a href="index.html">geom</a></p><script>window.sidebarCurrent = {name: "GPSBounds", ty: "struct", relpath: ""};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><span class="help-button">?</span>
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../src/geom/bounds.rs.html#114-119" title="goto source code">[src]</a></span><span class="in-band">Struct <a href="index.html">geom</a>::<wbr><a class="struct" href="">GPSBounds</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust struct">pub struct GPSBounds {
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../src/geom/bounds.rs.html#122-127" title="goto source code">[src]</a></span><span class="in-band">Struct <a href="index.html">geom</a>::<wbr><a class="struct" href="">GPSBounds</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust struct">pub struct GPSBounds {
pub min_lon: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>,
pub min_lat: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>,
pub max_lon: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>,
@ -10,25 +10,25 @@
can be transformed into <code>Pt2D</code>s, treating the top-left of the boundary as (0, 0), and growing
to the right and down (screen-drawing order, not Cartesian) in meters.</p>
</div><h2 id="fields" class="fields small-section-header">
Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.min_lon" class="structfield small-section-header"><a href="#structfield.min_lon" class="anchor field"></a><code>min_lon: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a></code></span><span id="structfield.min_lat" class="structfield small-section-header"><a href="#structfield.min_lat" class="anchor field"></a><code>min_lat: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a></code></span><span id="structfield.max_lon" class="structfield small-section-header"><a href="#structfield.max_lon" class="anchor field"></a><code>max_lon: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a></code></span><span id="structfield.max_lat" class="structfield small-section-header"><a href="#structfield.max_lat" class="anchor field"></a><code>max_lat: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a></code></span><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><h3 id="impl" class="impl"><code class="in-band">impl <a class="struct" href="../geom/struct.GPSBounds.html" title="struct geom::GPSBounds">GPSBounds</a></code><a href="#impl" class="anchor"></a><a class="srclink" href="../src/geom/bounds.rs.html#121-197" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.new" class="method"><code>pub fn <a href="#method.new" class="fnname">new</a>() -&gt; <a class="struct" href="../geom/struct.GPSBounds.html" title="struct geom::GPSBounds">GPSBounds</a></code><a class="srclink" href="../src/geom/bounds.rs.html#123-130" title="goto source code">[src]</a></h4><div class="docblock"><p>A boundary including no points.</p>
</div><h4 id="method.from" class="method"><code>pub fn <a href="#method.from" class="fnname">from</a>(pts: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="../geom/struct.LonLat.html" title="struct geom::LonLat">LonLat</a>&gt;) -&gt; <a class="struct" href="../geom/struct.GPSBounds.html" title="struct geom::GPSBounds">GPSBounds</a></code><a class="srclink" href="../src/geom/bounds.rs.html#133-139" title="goto source code">[src]</a></h4><div class="docblock"><p>Create a boundary covering some points.</p>
</div><h4 id="method.update" class="method"><code>pub fn <a href="#method.update" class="fnname">update</a>(&amp;mut self, pt: <a class="struct" href="../geom/struct.LonLat.html" title="struct geom::LonLat">LonLat</a>)</code><a class="srclink" href="../src/geom/bounds.rs.html#142-147" title="goto source code">[src]</a></h4><div class="docblock"><p>Update the boundary to include this point.</p>
</div><h4 id="method.contains" class="method"><code>pub fn <a href="#method.contains" class="fnname">contains</a>(&amp;self, pt: <a class="struct" href="../geom/struct.LonLat.html" title="struct geom::LonLat">LonLat</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class="srclink" href="../src/geom/bounds.rs.html#150-155" title="goto source code">[src]</a></h4><div class="docblock"><p>True if the point is within the boundary.</p>
</div><h4 id="method.get_max_world_pt" class="method"><code>pub fn <a href="#method.get_max_world_pt" class="fnname">get_max_world_pt</a>(&amp;self) -&gt; <a class="struct" href="../geom/struct.Pt2D.html" title="struct geom::Pt2D">Pt2D</a></code><a class="srclink" href="../src/geom/bounds.rs.html#159-165" title="goto source code">[src]</a></h4><div class="docblock"><p>The bottom-right corner of the boundary, in map-space.</p>
</div><h4 id="method.to_bounds" class="method"><code>pub fn <a href="#method.to_bounds" class="fnname">to_bounds</a>(&amp;self) -&gt; <a class="struct" href="../geom/struct.Bounds.html" title="struct geom::Bounds">Bounds</a></code><a class="srclink" href="../src/geom/bounds.rs.html#168-173" title="goto source code">[src]</a></h4><div class="docblock"><p>Converts the boundary to map-space.</p>
</div><h4 id="method.try_convert" class="method"><code>pub fn <a href="#method.try_convert" class="fnname">try_convert</a>(&amp;self, pts: &amp;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="../geom/struct.LonLat.html" title="struct geom::LonLat">LonLat</a>&gt;) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="../geom/struct.Pt2D.html" title="struct geom::Pt2D">Pt2D</a>&gt;&gt;</code><a class="srclink" href="../src/geom/bounds.rs.html#176-185" title="goto source code">[src]</a></h4><div class="docblock"><p>Convert all points to map-space, failing if any points are outside this boundary.</p>
</div><h4 id="method.convert" class="method"><code>pub fn <a href="#method.convert" class="fnname">convert</a>(&amp;self, pts: &amp;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="../geom/struct.LonLat.html" title="struct geom::LonLat">LonLat</a>&gt;) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="../geom/struct.Pt2D.html" title="struct geom::Pt2D">Pt2D</a>&gt;</code><a class="srclink" href="../src/geom/bounds.rs.html#188-190" title="goto source code">[src]</a></h4><div class="docblock"><p>Convert all points to map-space. The points may be outside this boundary.</p>
</div><h4 id="method.convert_back" class="method"><code>pub fn <a href="#method.convert_back" class="fnname">convert_back</a>(&amp;self, pts: &amp;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="../geom/struct.Pt2D.html" title="struct geom::Pt2D">Pt2D</a>&gt;) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="../geom/struct.LonLat.html" title="struct geom::LonLat">LonLat</a>&gt;</code><a class="srclink" href="../src/geom/bounds.rs.html#194-196" title="goto source code">[src]</a></h4><div class="docblock"><p>Convert map-space points back to <code>LonLat</code>s. This is only valid if the <code>GPSBounds</code> used
Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.min_lon" class="structfield small-section-header"><a href="#structfield.min_lon" class="anchor field"></a><code>min_lon: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a></code></span><span id="structfield.min_lat" class="structfield small-section-header"><a href="#structfield.min_lat" class="anchor field"></a><code>min_lat: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a></code></span><span id="structfield.max_lon" class="structfield small-section-header"><a href="#structfield.max_lon" class="anchor field"></a><code>max_lon: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a></code></span><span id="structfield.max_lat" class="structfield small-section-header"><a href="#structfield.max_lat" class="anchor field"></a><code>max_lat: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a></code></span><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><h3 id="impl" class="impl"><code class="in-band">impl <a class="struct" href="../geom/struct.GPSBounds.html" title="struct geom::GPSBounds">GPSBounds</a></code><a href="#impl" class="anchor"></a><a class="srclink" href="../src/geom/bounds.rs.html#129-205" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.new" class="method"><code>pub fn <a href="#method.new" class="fnname">new</a>() -&gt; <a class="struct" href="../geom/struct.GPSBounds.html" title="struct geom::GPSBounds">GPSBounds</a></code><a class="srclink" href="../src/geom/bounds.rs.html#131-138" title="goto source code">[src]</a></h4><div class="docblock"><p>A boundary including no points.</p>
</div><h4 id="method.from" class="method"><code>pub fn <a href="#method.from" class="fnname">from</a>(pts: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="../geom/struct.LonLat.html" title="struct geom::LonLat">LonLat</a>&gt;) -&gt; <a class="struct" href="../geom/struct.GPSBounds.html" title="struct geom::GPSBounds">GPSBounds</a></code><a class="srclink" href="../src/geom/bounds.rs.html#141-147" title="goto source code">[src]</a></h4><div class="docblock"><p>Create a boundary covering some points.</p>
</div><h4 id="method.update" class="method"><code>pub fn <a href="#method.update" class="fnname">update</a>(&amp;mut self, pt: <a class="struct" href="../geom/struct.LonLat.html" title="struct geom::LonLat">LonLat</a>)</code><a class="srclink" href="../src/geom/bounds.rs.html#150-155" title="goto source code">[src]</a></h4><div class="docblock"><p>Update the boundary to include this point.</p>
</div><h4 id="method.contains" class="method"><code>pub fn <a href="#method.contains" class="fnname">contains</a>(&amp;self, pt: <a class="struct" href="../geom/struct.LonLat.html" title="struct geom::LonLat">LonLat</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class="srclink" href="../src/geom/bounds.rs.html#158-163" title="goto source code">[src]</a></h4><div class="docblock"><p>True if the point is within the boundary.</p>
</div><h4 id="method.get_max_world_pt" class="method"><code>pub fn <a href="#method.get_max_world_pt" class="fnname">get_max_world_pt</a>(&amp;self) -&gt; <a class="struct" href="../geom/struct.Pt2D.html" title="struct geom::Pt2D">Pt2D</a></code><a class="srclink" href="../src/geom/bounds.rs.html#167-173" title="goto source code">[src]</a></h4><div class="docblock"><p>The bottom-right corner of the boundary, in map-space.</p>
</div><h4 id="method.to_bounds" class="method"><code>pub fn <a href="#method.to_bounds" class="fnname">to_bounds</a>(&amp;self) -&gt; <a class="struct" href="../geom/struct.Bounds.html" title="struct geom::Bounds">Bounds</a></code><a class="srclink" href="../src/geom/bounds.rs.html#176-181" title="goto source code">[src]</a></h4><div class="docblock"><p>Converts the boundary to map-space.</p>
</div><h4 id="method.try_convert" class="method"><code>pub fn <a href="#method.try_convert" class="fnname">try_convert</a>(&amp;self, pts: &amp;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="../geom/struct.LonLat.html" title="struct geom::LonLat">LonLat</a>&gt;) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="../geom/struct.Pt2D.html" title="struct geom::Pt2D">Pt2D</a>&gt;&gt;</code><a class="srclink" href="../src/geom/bounds.rs.html#184-193" title="goto source code">[src]</a></h4><div class="docblock"><p>Convert all points to map-space, failing if any points are outside this boundary.</p>
</div><h4 id="method.convert" class="method"><code>pub fn <a href="#method.convert" class="fnname">convert</a>(&amp;self, pts: &amp;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="../geom/struct.LonLat.html" title="struct geom::LonLat">LonLat</a>&gt;) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="../geom/struct.Pt2D.html" title="struct geom::Pt2D">Pt2D</a>&gt;</code><a class="srclink" href="../src/geom/bounds.rs.html#196-198" title="goto source code">[src]</a></h4><div class="docblock"><p>Convert all points to map-space. The points may be outside this boundary.</p>
</div><h4 id="method.convert_back" class="method"><code>pub fn <a href="#method.convert_back" class="fnname">convert_back</a>(&amp;self, pts: &amp;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="../geom/struct.Pt2D.html" title="struct geom::Pt2D">Pt2D</a>&gt;) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="../geom/struct.LonLat.html" title="struct geom::LonLat">LonLat</a>&gt;</code><a class="srclink" href="../src/geom/bounds.rs.html#202-204" title="goto source code">[src]</a></h4><div class="docblock"><p>Convert map-space points back to <code>LonLat</code>s. This is only valid if the <code>GPSBounds</code> used
is the same as the one used to originally produce the <code>Pt2D</code>s.</p>
</div></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-Clone" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="../geom/struct.GPSBounds.html" title="struct geom::GPSBounds">GPSBounds</a></code><a href="#impl-Clone" class="anchor"></a><a class="srclink" href="../src/geom/bounds.rs.html#113" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.clone" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&amp;self) -&gt; <a class="struct" href="../geom/struct.GPSBounds.html" title="struct geom::GPSBounds">GPSBounds</a></code><a class="srclink" href="../src/geom/bounds.rs.html#113" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
</div></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-Clone" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="../geom/struct.GPSBounds.html" title="struct geom::GPSBounds">GPSBounds</a></code><a href="#impl-Clone" class="anchor"></a><a class="srclink" href="../src/geom/bounds.rs.html#121" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.clone" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&amp;self) -&gt; <a class="struct" href="../geom/struct.GPSBounds.html" title="struct geom::GPSBounds">GPSBounds</a></code><a class="srclink" href="../src/geom/bounds.rs.html#121" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
</div><h4 id="method.clone_from" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from" class="fnname">clone_from</a>(&amp;mut self, source: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self)</code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/clone.rs.html#128-130" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
</div></div><h3 id="impl-Debug" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="../geom/struct.GPSBounds.html" title="struct geom::GPSBounds">GPSBounds</a></code><a href="#impl-Debug" class="anchor"></a><a class="srclink" href="../src/geom/bounds.rs.html#113" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.fmt" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>&lt;'_&gt;) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class="srclink" href="../src/geom/bounds.rs.html#113" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
</div></div><h3 id="impl-Deserialize%3C%27de%3E" class="impl"><code class="in-band">impl&lt;'de&gt; <a class="trait" href="https://docs.rs/serde/1.0.123/serde/de/trait.Deserialize.html" title="trait serde::de::Deserialize">Deserialize</a>&lt;'de&gt; for <a class="struct" href="../geom/struct.GPSBounds.html" title="struct geom::GPSBounds">GPSBounds</a></code><a href="#impl-Deserialize%3C%27de%3E" class="anchor"></a><a class="srclink" href="../src/geom/bounds.rs.html#113" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.deserialize" class="method hidden"><code>fn <a href="https://docs.rs/serde/1.0.123/serde/de/trait.Deserialize.html#tymethod.deserialize" class="fnname">deserialize</a>&lt;__D&gt;(__deserializer: __D) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self, __D::<a class="type" href="https://docs.rs/serde/1.0.123/serde/de/trait.Deserializer.html#associatedtype.Error" title="type serde::de::Deserializer::Error">Error</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;__D: <a class="trait" href="https://docs.rs/serde/1.0.123/serde/de/trait.Deserializer.html" title="trait serde::de::Deserializer">Deserializer</a>&lt;'de&gt;,&nbsp;</span></code><a class="srclink" href="../src/geom/bounds.rs.html#113" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Deserialize this value from the given Serde deserializer. <a href="https://docs.rs/serde/1.0.123/serde/de/trait.Deserialize.html#tymethod.deserialize">Read more</a></p>
</div></div><h3 id="impl-PartialEq%3CGPSBounds%3E" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>&lt;<a class="struct" href="../geom/struct.GPSBounds.html" title="struct geom::GPSBounds">GPSBounds</a>&gt; for <a class="struct" href="../geom/struct.GPSBounds.html" title="struct geom::GPSBounds">GPSBounds</a></code><a href="#impl-PartialEq%3CGPSBounds%3E" class="anchor"></a><a class="srclink" href="../src/geom/bounds.rs.html#113" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.eq" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq" class="fnname">eq</a>(&amp;self, other: &amp;<a class="struct" href="../geom/struct.GPSBounds.html" title="struct geom::GPSBounds">GPSBounds</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class="srclink" href="../src/geom/bounds.rs.html#113" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used
</div></div><h3 id="impl-Debug" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="../geom/struct.GPSBounds.html" title="struct geom::GPSBounds">GPSBounds</a></code><a href="#impl-Debug" class="anchor"></a><a class="srclink" href="../src/geom/bounds.rs.html#121" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.fmt" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>&lt;'_&gt;) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class="srclink" href="../src/geom/bounds.rs.html#121" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
</div></div><h3 id="impl-Deserialize%3C%27de%3E" class="impl"><code class="in-band">impl&lt;'de&gt; <a class="trait" href="https://docs.rs/serde/1.0.123/serde/de/trait.Deserialize.html" title="trait serde::de::Deserialize">Deserialize</a>&lt;'de&gt; for <a class="struct" href="../geom/struct.GPSBounds.html" title="struct geom::GPSBounds">GPSBounds</a></code><a href="#impl-Deserialize%3C%27de%3E" class="anchor"></a><a class="srclink" href="../src/geom/bounds.rs.html#121" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.deserialize" class="method hidden"><code>fn <a href="https://docs.rs/serde/1.0.123/serde/de/trait.Deserialize.html#tymethod.deserialize" class="fnname">deserialize</a>&lt;__D&gt;(__deserializer: __D) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;Self, __D::<a class="type" href="https://docs.rs/serde/1.0.123/serde/de/trait.Deserializer.html#associatedtype.Error" title="type serde::de::Deserializer::Error">Error</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;__D: <a class="trait" href="https://docs.rs/serde/1.0.123/serde/de/trait.Deserializer.html" title="trait serde::de::Deserializer">Deserializer</a>&lt;'de&gt;,&nbsp;</span></code><a class="srclink" href="../src/geom/bounds.rs.html#121" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Deserialize this value from the given Serde deserializer. <a href="https://docs.rs/serde/1.0.123/serde/de/trait.Deserialize.html#tymethod.deserialize">Read more</a></p>
</div></div><h3 id="impl-PartialEq%3CGPSBounds%3E" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>&lt;<a class="struct" href="../geom/struct.GPSBounds.html" title="struct geom::GPSBounds">GPSBounds</a>&gt; for <a class="struct" href="../geom/struct.GPSBounds.html" title="struct geom::GPSBounds">GPSBounds</a></code><a href="#impl-PartialEq%3CGPSBounds%3E" class="anchor"></a><a class="srclink" href="../src/geom/bounds.rs.html#121" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.eq" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq" class="fnname">eq</a>(&amp;self, other: &amp;<a class="struct" href="../geom/struct.GPSBounds.html" title="struct geom::GPSBounds">GPSBounds</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class="srclink" href="../src/geom/bounds.rs.html#121" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used
by <code>==</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p>
</div><h4 id="method.ne" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne" class="fnname">ne</a>(&amp;self, other: &amp;<a class="struct" href="../geom/struct.GPSBounds.html" title="struct geom::GPSBounds">GPSBounds</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class="srclink" href="../src/geom/bounds.rs.html#113" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>!=</code>.</p>
</div></div><h3 id="impl-Serialize" class="impl"><code class="in-band">impl <a class="trait" href="https://docs.rs/serde/1.0.123/serde/ser/trait.Serialize.html" title="trait serde::ser::Serialize">Serialize</a> for <a class="struct" href="../geom/struct.GPSBounds.html" title="struct geom::GPSBounds">GPSBounds</a></code><a href="#impl-Serialize" class="anchor"></a><a class="srclink" href="../src/geom/bounds.rs.html#113" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.serialize" class="method hidden"><code>fn <a href="https://docs.rs/serde/1.0.123/serde/ser/trait.Serialize.html#tymethod.serialize" class="fnname">serialize</a>&lt;__S&gt;(&amp;self, __serializer: __S) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;__S::<a class="type" href="https://docs.rs/serde/1.0.123/serde/ser/trait.Serializer.html#associatedtype.Ok" title="type serde::ser::Serializer::Ok">Ok</a>, __S::<a class="type" href="https://docs.rs/serde/1.0.123/serde/ser/trait.Serializer.html#associatedtype.Error" title="type serde::ser::Serializer::Error">Error</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;__S: <a class="trait" href="https://docs.rs/serde/1.0.123/serde/ser/trait.Serializer.html" title="trait serde::ser::Serializer">Serializer</a>,&nbsp;</span></code><a class="srclink" href="../src/geom/bounds.rs.html#113" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Serialize this value into the given Serde serializer. <a href="https://docs.rs/serde/1.0.123/serde/ser/trait.Serialize.html#tymethod.serialize">Read more</a></p>
</div></div><h3 id="impl-StructuralPartialEq" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.StructuralPartialEq.html" title="trait core::marker::StructuralPartialEq">StructuralPartialEq</a> for <a class="struct" href="../geom/struct.GPSBounds.html" title="struct geom::GPSBounds">GPSBounds</a></code><a href="#impl-StructuralPartialEq" class="anchor"></a><a class="srclink" href="../src/geom/bounds.rs.html#113" title="goto source code">[src]</a></h3><div class="impl-items"></div></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><h3 id="impl-RefUnwindSafe" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="../geom/struct.GPSBounds.html" title="struct geom::GPSBounds">GPSBounds</a></code><a href="#impl-RefUnwindSafe" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-Send" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="../geom/struct.GPSBounds.html" title="struct geom::GPSBounds">GPSBounds</a></code><a href="#impl-Send" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-Sync" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="../geom/struct.GPSBounds.html" title="struct geom::GPSBounds">GPSBounds</a></code><a href="#impl-Sync" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-Unpin" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="../geom/struct.GPSBounds.html" title="struct geom::GPSBounds">GPSBounds</a></code><a href="#impl-Unpin" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-UnwindSafe" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="../geom/struct.GPSBounds.html" title="struct geom::GPSBounds">GPSBounds</a></code><a href="#impl-UnwindSafe" class="anchor"></a></h3><div class="impl-items"></div></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><h3 id="impl-Any" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#108-112" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.type_id" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#109-111" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
</div><h4 id="method.ne" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne" class="fnname">ne</a>(&amp;self, other: &amp;<a class="struct" href="../geom/struct.GPSBounds.html" title="struct geom::GPSBounds">GPSBounds</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class="srclink" href="../src/geom/bounds.rs.html#121" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>This method tests for <code>!=</code>.</p>
</div></div><h3 id="impl-Serialize" class="impl"><code class="in-band">impl <a class="trait" href="https://docs.rs/serde/1.0.123/serde/ser/trait.Serialize.html" title="trait serde::ser::Serialize">Serialize</a> for <a class="struct" href="../geom/struct.GPSBounds.html" title="struct geom::GPSBounds">GPSBounds</a></code><a href="#impl-Serialize" class="anchor"></a><a class="srclink" href="../src/geom/bounds.rs.html#121" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.serialize" class="method hidden"><code>fn <a href="https://docs.rs/serde/1.0.123/serde/ser/trait.Serialize.html#tymethod.serialize" class="fnname">serialize</a>&lt;__S&gt;(&amp;self, __serializer: __S) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;__S::<a class="type" href="https://docs.rs/serde/1.0.123/serde/ser/trait.Serializer.html#associatedtype.Ok" title="type serde::ser::Serializer::Ok">Ok</a>, __S::<a class="type" href="https://docs.rs/serde/1.0.123/serde/ser/trait.Serializer.html#associatedtype.Error" title="type serde::ser::Serializer::Error">Error</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;__S: <a class="trait" href="https://docs.rs/serde/1.0.123/serde/ser/trait.Serializer.html" title="trait serde::ser::Serializer">Serializer</a>,&nbsp;</span></code><a class="srclink" href="../src/geom/bounds.rs.html#121" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Serialize this value into the given Serde serializer. <a href="https://docs.rs/serde/1.0.123/serde/ser/trait.Serialize.html#tymethod.serialize">Read more</a></p>
</div></div><h3 id="impl-StructuralPartialEq" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.StructuralPartialEq.html" title="trait core::marker::StructuralPartialEq">StructuralPartialEq</a> for <a class="struct" href="../geom/struct.GPSBounds.html" title="struct geom::GPSBounds">GPSBounds</a></code><a href="#impl-StructuralPartialEq" class="anchor"></a><a class="srclink" href="../src/geom/bounds.rs.html#121" title="goto source code">[src]</a></h3><div class="impl-items"></div></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><h3 id="impl-RefUnwindSafe" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="../geom/struct.GPSBounds.html" title="struct geom::GPSBounds">GPSBounds</a></code><a href="#impl-RefUnwindSafe" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-Send" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="../geom/struct.GPSBounds.html" title="struct geom::GPSBounds">GPSBounds</a></code><a href="#impl-Send" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-Sync" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="../geom/struct.GPSBounds.html" title="struct geom::GPSBounds">GPSBounds</a></code><a href="#impl-Sync" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-Unpin" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="../geom/struct.GPSBounds.html" title="struct geom::GPSBounds">GPSBounds</a></code><a href="#impl-Unpin" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-UnwindSafe" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="../geom/struct.GPSBounds.html" title="struct geom::GPSBounds">GPSBounds</a></code><a href="#impl-UnwindSafe" class="anchor"></a></h3><div class="impl-items"></div></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><h3 id="impl-Any" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#108-112" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.type_id" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#109-111" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
</div></div><h3 id="impl-Borrow%3CT%3E" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href="#impl-Borrow%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#210-214" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#211-213" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
</div></div><h3 id="impl-BorrowMut%3CT%3E" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href="#impl-BorrowMut%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#217-221" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow_mut" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#218-220" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>
</div></div><h3 id="impl-DeserializeOwned" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="https://docs.rs/serde/1.0.123/serde/de/trait.DeserializeOwned.html" title="trait serde::de::DeserializeOwned">DeserializeOwned</a> for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: for&lt;'de&gt; <a class="trait" href="https://docs.rs/serde/1.0.123/serde/de/trait.Deserialize.html" title="trait serde::de::Deserialize">Deserialize</a>&lt;'de&gt;,&nbsp;</span></code><a href="#impl-DeserializeOwned" class="anchor"></a><a class="srclink" href="https://docs.rs/serde/1.0.123/src/serde/de/mod.rs.html#603" title="goto source code">[src]</a></h3><div class="impl-items"></div><h3 id="impl-From%3CT%3E" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt; for T</code><a href="#impl-From%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#552-556" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.from-1" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(t: T) -&gt; T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#553-555" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs the conversion.</p>

File diff suppressed because one or more lines are too long

View File

@ -1,14 +1,14 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `Triangle` struct in crate `geom`."><meta name="keywords" content="rust, rustlang, rust-lang, Triangle"><title>geom::Triangle - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../ayu.css" disabled ><script id="default-settings"></script><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../favicon.svg">
<link rel="alternate icon" type="image/png" href="../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../geom/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><p class="location">Struct Triangle</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#fields">Fields</a><div class="sidebar-links"><a href="#structfield.pt1">pt1</a><a href="#structfield.pt2">pt2</a><a href="#structfield.pt3">pt3</a></div><a class="sidebar-title" href="#implementations">Methods</a><div class="sidebar-links"><a href="#method.contains_pt">contains_pt</a><a href="#method.new">new</a></div><a class="sidebar-title" href="#trait-implementations">Trait Implementations</a><div class="sidebar-links"><a href="#impl-Clone">Clone</a><a href="#impl-Debug">Debug</a></div><a class="sidebar-title" href="#synthetic-implementations">Auto Trait Implementations</a><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><a class="sidebar-title" href="#blanket-implementations">Blanket Implementations</a><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-Same%3CT%3E">Same&lt;T&gt;</a><a href="#impl-ToOwned">ToOwned</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a></div></div><p class="location"><a href="index.html">geom</a></p><script>window.sidebarCurrent = {name: "Triangle", ty: "struct", relpath: ""};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><span class="help-button">?</span>
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../src/geom/polygon.rs.html#488-492" title="goto source code">[src]</a></span><span class="in-band">Struct <a href="index.html">geom</a>::<wbr><a class="struct" href="">Triangle</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust struct">pub struct Triangle {
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../src/geom/polygon.rs.html#494-498" title="goto source code">[src]</a></span><span class="in-band">Struct <a href="index.html">geom</a>::<wbr><a class="struct" href="">Triangle</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust struct">pub struct Triangle {
pub pt1: <a class="struct" href="../geom/struct.Pt2D.html" title="struct geom::Pt2D">Pt2D</a>,
pub pt2: <a class="struct" href="../geom/struct.Pt2D.html" title="struct geom::Pt2D">Pt2D</a>,
pub pt3: <a class="struct" href="../geom/struct.Pt2D.html" title="struct geom::Pt2D">Pt2D</a>,
}</pre></div><h2 id="fields" class="fields small-section-header">
Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.pt1" class="structfield small-section-header"><a href="#structfield.pt1" class="anchor field"></a><code>pt1: <a class="struct" href="../geom/struct.Pt2D.html" title="struct geom::Pt2D">Pt2D</a></code></span><span id="structfield.pt2" class="structfield small-section-header"><a href="#structfield.pt2" class="anchor field"></a><code>pt2: <a class="struct" href="../geom/struct.Pt2D.html" title="struct geom::Pt2D">Pt2D</a></code></span><span id="structfield.pt3" class="structfield small-section-header"><a href="#structfield.pt3" class="anchor field"></a><code>pt3: <a class="struct" href="../geom/struct.Pt2D.html" title="struct geom::Pt2D">Pt2D</a></code></span><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><h3 id="impl" class="impl"><code class="in-band">impl <a class="struct" href="../geom/struct.Triangle.html" title="struct geom::Triangle">Triangle</a></code><a href="#impl" class="anchor"></a><a class="srclink" href="../src/geom/polygon.rs.html#494-525" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.new" class="method"><code>pub(crate) fn <a href="#method.new" class="fnname">new</a>(pt1: <a class="struct" href="../geom/struct.Pt2D.html" title="struct geom::Pt2D">Pt2D</a>, pt2: <a class="struct" href="../geom/struct.Pt2D.html" title="struct geom::Pt2D">Pt2D</a>, pt3: <a class="struct" href="../geom/struct.Pt2D.html" title="struct geom::Pt2D">Pt2D</a>) -&gt; <a class="struct" href="../geom/struct.Triangle.html" title="struct geom::Triangle">Triangle</a></code><a class="srclink" href="../src/geom/polygon.rs.html#495-497" title="goto source code">[src]</a></h4><h4 id="method.contains_pt" class="method"><code>fn <a href="#method.contains_pt" class="fnname">contains_pt</a>(&amp;self, pt: <a class="struct" href="../geom/struct.Pt2D.html" title="struct geom::Pt2D">Pt2D</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class="srclink" href="../src/geom/polygon.rs.html#499-524" title="goto source code">[src]</a></h4></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-Clone" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="../geom/struct.Triangle.html" title="struct geom::Triangle">Triangle</a></code><a href="#impl-Clone" class="anchor"></a><a class="srclink" href="../src/geom/polygon.rs.html#487" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.clone" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&amp;self) -&gt; <a class="struct" href="../geom/struct.Triangle.html" title="struct geom::Triangle">Triangle</a></code><a class="srclink" href="../src/geom/polygon.rs.html#487" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.pt1" class="structfield small-section-header"><a href="#structfield.pt1" class="anchor field"></a><code>pt1: <a class="struct" href="../geom/struct.Pt2D.html" title="struct geom::Pt2D">Pt2D</a></code></span><span id="structfield.pt2" class="structfield small-section-header"><a href="#structfield.pt2" class="anchor field"></a><code>pt2: <a class="struct" href="../geom/struct.Pt2D.html" title="struct geom::Pt2D">Pt2D</a></code></span><span id="structfield.pt3" class="structfield small-section-header"><a href="#structfield.pt3" class="anchor field"></a><code>pt3: <a class="struct" href="../geom/struct.Pt2D.html" title="struct geom::Pt2D">Pt2D</a></code></span><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><h3 id="impl" class="impl"><code class="in-band">impl <a class="struct" href="../geom/struct.Triangle.html" title="struct geom::Triangle">Triangle</a></code><a href="#impl" class="anchor"></a><a class="srclink" href="../src/geom/polygon.rs.html#500-531" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.new" class="method"><code>pub(crate) fn <a href="#method.new" class="fnname">new</a>(pt1: <a class="struct" href="../geom/struct.Pt2D.html" title="struct geom::Pt2D">Pt2D</a>, pt2: <a class="struct" href="../geom/struct.Pt2D.html" title="struct geom::Pt2D">Pt2D</a>, pt3: <a class="struct" href="../geom/struct.Pt2D.html" title="struct geom::Pt2D">Pt2D</a>) -&gt; <a class="struct" href="../geom/struct.Triangle.html" title="struct geom::Triangle">Triangle</a></code><a class="srclink" href="../src/geom/polygon.rs.html#501-503" title="goto source code">[src]</a></h4><h4 id="method.contains_pt" class="method"><code>fn <a href="#method.contains_pt" class="fnname">contains_pt</a>(&amp;self, pt: <a class="struct" href="../geom/struct.Pt2D.html" title="struct geom::Pt2D">Pt2D</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class="srclink" href="../src/geom/polygon.rs.html#505-530" title="goto source code">[src]</a></h4></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><h3 id="impl-Clone" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="../geom/struct.Triangle.html" title="struct geom::Triangle">Triangle</a></code><a href="#impl-Clone" class="anchor"></a><a class="srclink" href="../src/geom/polygon.rs.html#493" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.clone" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&amp;self) -&gt; <a class="struct" href="../geom/struct.Triangle.html" title="struct geom::Triangle">Triangle</a></code><a class="srclink" href="../src/geom/polygon.rs.html#493" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
</div><h4 id="method.clone_from" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from" class="fnname">clone_from</a>(&amp;mut self, source: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self)</code><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/clone.rs.html#128-130" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
</div></div><h3 id="impl-Debug" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="../geom/struct.Triangle.html" title="struct geom::Triangle">Triangle</a></code><a href="#impl-Debug" class="anchor"></a><a class="srclink" href="../src/geom/polygon.rs.html#487" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.fmt" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>&lt;'_&gt;) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class="srclink" href="../src/geom/polygon.rs.html#487" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
</div></div><h3 id="impl-Debug" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="../geom/struct.Triangle.html" title="struct geom::Triangle">Triangle</a></code><a href="#impl-Debug" class="anchor"></a><a class="srclink" href="../src/geom/polygon.rs.html#493" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.fmt" class="method hidden"><code>fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>&lt;'_&gt;) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class="srclink" href="../src/geom/polygon.rs.html#493" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
</div></div></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><h3 id="impl-RefUnwindSafe" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="../geom/struct.Triangle.html" title="struct geom::Triangle">Triangle</a></code><a href="#impl-RefUnwindSafe" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-Send" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="../geom/struct.Triangle.html" title="struct geom::Triangle">Triangle</a></code><a href="#impl-Send" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-Sync" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="../geom/struct.Triangle.html" title="struct geom::Triangle">Triangle</a></code><a href="#impl-Sync" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-Unpin" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="../geom/struct.Triangle.html" title="struct geom::Triangle">Triangle</a></code><a href="#impl-Unpin" class="anchor"></a></h3><div class="impl-items"></div><h3 id="impl-UnwindSafe" class="impl"><code class="in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="../geom/struct.Triangle.html" title="struct geom::Triangle">Triangle</a></code><a href="#impl-UnwindSafe" class="anchor"></a></h3><div class="impl-items"></div></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><h3 id="impl-Any" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href="#impl-Any" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#108-112" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.type_id" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#109-111" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
</div></div><h3 id="impl-Borrow%3CT%3E" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href="#impl-Borrow%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#210-214" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#211-213" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
</div></div><h3 id="impl-BorrowMut%3CT%3E" class="impl"><code class="in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href="#impl-BorrowMut%3CT%3E" class="anchor"></a><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#217-221" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="method.borrow_mut" class="method hidden"><code>pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>T</code><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#218-220" title="goto source code">[src]</a></h4><div class='docblock hidden'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>

File diff suppressed because one or more lines are too long

View File

@ -143,9 +143,57 @@
<span id="140">140</span>
<span id="141">141</span>
<span id="142">142</span>
<span id="143">143</span>
<span id="144">144</span>
<span id="145">145</span>
<span id="146">146</span>
<span id="147">147</span>
<span id="148">148</span>
<span id="149">149</span>
<span id="150">150</span>
<span id="151">151</span>
<span id="152">152</span>
<span id="153">153</span>
<span id="154">154</span>
<span id="155">155</span>
<span id="156">156</span>
<span id="157">157</span>
<span id="158">158</span>
<span id="159">159</span>
<span id="160">160</span>
<span id="161">161</span>
<span id="162">162</span>
<span id="163">163</span>
<span id="164">164</span>
<span id="165">165</span>
<span id="166">166</span>
<span id="167">167</span>
<span id="168">168</span>
<span id="169">169</span>
<span id="170">170</span>
<span id="171">171</span>
<span id="172">172</span>
<span id="173">173</span>
<span id="174">174</span>
<span id="175">175</span>
<span id="176">176</span>
<span id="177">177</span>
<span id="178">178</span>
<span id="179">179</span>
<span id="180">180</span>
<span id="181">181</span>
<span id="182">182</span>
<span id="183">183</span>
<span id="184">184</span>
<span id="185">185</span>
<span id="186">186</span>
<span id="187">187</span>
<span id="188">188</span>
</pre><div class="example-wrap"><pre class="rust ">
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">collections</span>::<span class="ident">HashSet</span>;
<span class="kw">use</span> <span class="ident">aabb_quadtree</span>::<span class="ident">QuadTree</span>;
<span class="kw">use</span> <span class="ident">geojson</span>::{<span class="ident">Feature</span>, <span class="ident">FeatureCollection</span>, <span class="ident">GeoJson</span>};
<span class="kw">use</span> <span class="ident">rand</span>::<span class="ident">Rng</span>;
<span class="kw">use</span> <span class="ident">rand_xorshift</span>::<span class="ident">XorShiftRng</span>;
@ -154,7 +202,7 @@
<span class="kw">use</span> <span class="ident">map_model</span>::<span class="ident">osm</span>;
<span class="kw">use</span> <span class="ident">widgetry</span>::{
<span class="ident">Color</span>, <span class="ident">Drawable</span>, <span class="ident">EventCtx</span>, <span class="ident">GeomBatch</span>, <span class="ident">GfxCtx</span>, <span class="ident">HorizontalAlignment</span>, <span class="ident">Line</span>, <span class="ident">Panel</span>, <span class="ident">SimpleState</span>,
<span class="ident">State</span>, <span class="ident">StyledButtons</span>, <span class="ident">VerticalAlignment</span>, <span class="ident">Widget</span>,
<span class="ident">State</span>, <span class="ident">StyledButtons</span>, <span class="ident">TextExt</span>, <span class="ident">VerticalAlignment</span>, <span class="ident">Widget</span>,
};
<span class="kw">use</span> <span class="kw">crate</span>::<span class="ident">app</span>::{<span class="ident">App</span>, <span class="ident">Transition</span>};
@ -167,17 +215,42 @@
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">new</span>(<span class="ident">ctx</span>: <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">EventCtx</span>, <span class="ident">app</span>: <span class="kw-2">&amp;</span><span class="ident">App</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">Box</span><span class="op">&lt;</span><span class="ident">dyn</span> <span class="ident">State</span><span class="op">&lt;</span><span class="ident">App</span><span class="op">&gt;</span><span class="op">&gt;</span> {
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">batch</span> <span class="op">=</span> <span class="ident">GeomBatch</span>::<span class="ident">new</span>();
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">rng</span> <span class="op">=</span> <span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">current_flags</span>.<span class="ident">sim_flags</span>.<span class="ident">make_rng</span>();
<span class="ident">ctx</span>.<span class="ident">loading_screen</span>(<span class="string">&quot;generate buildings&quot;</span>, <span class="op">|</span><span class="kw">_</span>, <span class="kw-2">mut</span> <span class="ident">timer</span><span class="op">|</span> {
<span class="kw">for</span> <span class="ident">b</span> <span class="kw">in</span> <span class="ident">generate_buildings_on_empty_residential_roads</span>(<span class="ident">app</span>, <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">rng</span>, <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">timer</span>) {
<span class="ident">batch</span>.<span class="ident">push</span>(<span class="ident">Color</span>::<span class="ident">RED</span>, <span class="ident">b</span>);
}
<span class="kw">let</span> <span class="ident">houses</span> <span class="op">=</span> <span class="ident">ctx</span>.<span class="ident">loading_screen</span>(<span class="string">&quot;generate buildings&quot;</span>, <span class="op">|</span><span class="kw">_</span>, <span class="kw-2">mut</span> <span class="ident">timer</span><span class="op">|</span> {
<span class="ident">generate_buildings_on_empty_residential_roads</span>(<span class="ident">app</span>, <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">rng</span>, <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">timer</span>)
});
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">features</span> <span class="op">=</span> <span class="ident">Vec</span>::<span class="ident">new</span>();
<span class="kw">for</span> <span class="ident">poly</span> <span class="kw">in</span> <span class="ident">houses</span> {
<span class="ident">features</span>.<span class="ident">push</span>(<span class="ident">Feature</span> {
<span class="ident">bbox</span>: <span class="prelude-val">None</span>,
<span class="ident">geometry</span>: <span class="prelude-val">Some</span>(<span class="ident">poly</span>.<span class="ident">to_geojson</span>(<span class="prelude-val">Some</span>(<span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">map</span>.<span class="ident">get_gps_bounds</span>()))),
<span class="ident">id</span>: <span class="prelude-val">None</span>,
<span class="ident">properties</span>: <span class="prelude-val">None</span>,
<span class="ident">foreign_members</span>: <span class="prelude-val">None</span>,
});
<span class="kw">let</span> <span class="ident">panel</span> <span class="op">=</span> <span class="ident">Panel</span>::<span class="ident">new</span>(<span class="ident">Widget</span>::<span class="ident">row</span>(<span class="macro">vec</span><span class="macro">!</span>[
<span class="ident">Line</span>(<span class="string">&quot;Procedurally generated buildings&quot;</span>)
.<span class="ident">small_heading</span>()
.<span class="ident">draw</span>(<span class="ident">ctx</span>),
<span class="ident">ctx</span>.<span class="ident">style</span>().<span class="ident">btn_close_widget</span>(<span class="ident">ctx</span>),
<span class="ident">batch</span>.<span class="ident">push</span>(<span class="ident">Color</span>::<span class="ident">RED</span>, <span class="ident">poly</span>);
}
<span class="kw">let</span> <span class="ident">num_houses</span> <span class="op">=</span> <span class="ident">features</span>.<span class="ident">len</span>();
<span class="kw">let</span> <span class="ident">geojson</span> <span class="op">=</span> <span class="ident">GeoJson</span>::<span class="ident">from</span>(<span class="ident">FeatureCollection</span> {
<span class="ident">bbox</span>: <span class="prelude-val">None</span>,
<span class="ident">features</span>,
<span class="ident">foreign_members</span>: <span class="prelude-val">None</span>,
});
<span class="ident">abstio</span>::<span class="ident">write_json</span>(<span class="string">&quot;procgen_houses.json&quot;</span>.<span class="ident">to_string</span>(), <span class="kw-2">&amp;</span><span class="ident">geojson</span>);
<span class="kw">let</span> <span class="ident">panel</span> <span class="op">=</span> <span class="ident">Panel</span>::<span class="ident">new</span>(<span class="ident">Widget</span>::<span class="ident">col</span>(<span class="macro">vec</span><span class="macro">!</span>[
<span class="ident">Widget</span>::<span class="ident">row</span>(<span class="macro">vec</span><span class="macro">!</span>[
<span class="ident">Line</span>(<span class="string">&quot;Procedurally generated buildings&quot;</span>)
.<span class="ident">small_heading</span>()
.<span class="ident">draw</span>(<span class="ident">ctx</span>),
<span class="ident">ctx</span>.<span class="ident">style</span>().<span class="ident">btn_close_widget</span>(<span class="ident">ctx</span>),
]),
<span class="macro">format</span><span class="macro">!</span>(
<span class="string">&quot;Generated {} houses&quot;</span>,
<span class="ident">abstutil</span>::<span class="ident">prettyprint_usize</span>(<span class="ident">num_houses</span>)
)
.<span class="ident">draw_text</span>(<span class="ident">ctx</span>),
<span class="string">&quot;Wrote results to procgen_houses.json&quot;</span>.<span class="ident">draw_text</span>(<span class="ident">ctx</span>),
]))
.<span class="ident">aligned</span>(<span class="ident">HorizontalAlignment</span>::<span class="ident">Center</span>, <span class="ident">VerticalAlignment</span>::<span class="ident">Top</span>)
.<span class="ident">build</span>(<span class="ident">ctx</span>);
@ -256,13 +329,32 @@
}
<span class="ident">timer</span>.<span class="ident">stop</span>(<span class="string">&quot;initially place buildings&quot;</span>);
<span class="comment">// TODO Remove buildings that hit each other</span>
<span class="comment">// Remove buildings that hit each other. Build up the quadtree of finalized houses as we go,</span>
<span class="comment">// using index as the ID.</span>
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">non_overlapping</span> <span class="op">=</span> <span class="ident">Vec</span>::<span class="ident">new</span>();
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">quadtree</span> <span class="op">=</span> <span class="ident">QuadTree</span>::<span class="ident">default</span>(<span class="ident">map</span>.<span class="ident">get_bounds</span>().<span class="ident">as_bbox</span>());
<span class="ident">timer</span>.<span class="ident">start_iter</span>(<span class="string">&quot;prune buildings overlapping each other&quot;</span>, <span class="ident">houses</span>.<span class="ident">len</span>());
<span class="lifetime">&#39;HOUSE</span>: <span class="kw">for</span> <span class="ident">poly</span> <span class="kw">in</span> <span class="ident">houses</span> {
<span class="ident">timer</span>.<span class="ident">next</span>();
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">search</span> <span class="op">=</span> <span class="ident">poly</span>.<span class="ident">get_bounds</span>();
<span class="ident">search</span>.<span class="ident">add_buffer</span>(<span class="ident">Distance</span>::<span class="ident">meters</span>(<span class="number">1.0</span>));
<span class="kw">for</span> (<span class="ident">idx</span>, <span class="kw">_</span>, <span class="kw">_</span>) <span class="kw">in</span> <span class="ident">quadtree</span>.<span class="ident">query</span>(<span class="ident">search</span>.<span class="ident">as_bbox</span>()) {
<span class="kw">if</span> <span class="ident">poly</span>.<span class="ident">intersects</span>(<span class="kw-2">&amp;</span><span class="ident">non_overlapping</span>[<span class="kw-2">*</span><span class="ident">idx</span>]) {
<span class="kw">continue</span> <span class="lifetime">&#39;HOUSE</span>;
}
}
<span class="ident">quadtree</span>.<span class="ident">insert_with_box</span>(<span class="ident">non_overlapping</span>.<span class="ident">len</span>(), <span class="ident">poly</span>.<span class="ident">get_bounds</span>().<span class="ident">as_bbox</span>());
<span class="ident">non_overlapping</span>.<span class="ident">push</span>(<span class="ident">poly</span>);
}
<span class="comment">// Remove buildings that hit existing things on the map -- namely roads and park/water areas.</span>
<span class="comment">// TODO Can&#39;t parallelize here, because draw_map has a bunch of non-Send GPU things.</span>
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">survivors</span> <span class="op">=</span> <span class="ident">Vec</span>::<span class="ident">new</span>();
<span class="ident">timer</span>.<span class="ident">start_iter</span>(<span class="string">&quot;prune buildings overlapping the basemap&quot;</span>, <span class="ident">houses</span>.<span class="ident">len</span>());
<span class="kw">for</span> <span class="ident">poly</span> <span class="kw">in</span> <span class="ident">houses</span> {
<span class="ident">timer</span>.<span class="ident">start_iter</span>(
<span class="string">&quot;prune buildings overlapping the basemap&quot;</span>,
<span class="ident">non_overlapping</span>.<span class="ident">len</span>(),
);
<span class="kw">for</span> <span class="ident">poly</span> <span class="kw">in</span> <span class="ident">non_overlapping</span> {
<span class="ident">timer</span>.<span class="ident">next</span>();
<span class="kw">let</span> <span class="ident">possible_hits</span> <span class="op">=</span> <span class="ident">app</span>
.<span class="ident">primary</span>

View File

@ -122,7 +122,7 @@
<span class="doccomment">/// The output of `rustdoc -V`</span>
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">RUSTDOC_VERSION</span>: <span class="kw-2">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="string">&quot;rustdoc 1.49.0 (e1884a8e3 2020-12-29)&quot;</span>;
<span class="doccomment">/// The built-time in RFC2822, UTC</span>
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">BUILT_TIME_UTC</span>: <span class="kw-2">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="string">&quot;Sun, 07 Feb 2021 19:38:01 +0000&quot;</span>;
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">BUILT_TIME_UTC</span>: <span class="kw-2">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="string">&quot;Sun, 07 Feb 2021 20:01:46 +0000&quot;</span>;
<span class="doccomment">/// The target architecture, given by `cfg!(target_arch)`.</span>
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">CFG_TARGET_ARCH</span>: <span class="kw-2">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="string">&quot;x86_64&quot;</span>;
<span class="doccomment">/// The endianness, given by `cfg!(target_endian)`.</span>

View File

@ -198,12 +198,20 @@
<span id="195">195</span>
<span id="196">196</span>
<span id="197">197</span>
<span id="198">198</span>
<span id="199">199</span>
<span id="200">200</span>
<span id="201">201</span>
<span id="202">202</span>
<span id="203">203</span>
<span id="204">204</span>
<span id="205">205</span>
</pre><div class="example-wrap"><pre class="rust ">
<span class="kw">use</span> <span class="ident">serde</span>::{<span class="ident">Deserialize</span>, <span class="ident">Serialize</span>};
<span class="kw">use</span> <span class="ident">aabb_quadtree</span>::<span class="ident">geom</span>::{<span class="ident">Point</span>, <span class="ident">Rect</span>};
<span class="kw">use</span> <span class="kw">crate</span>::{<span class="ident">LonLat</span>, <span class="ident">Polygon</span>, <span class="ident">Pt2D</span>, <span class="ident">Ring</span>};
<span class="kw">use</span> <span class="kw">crate</span>::{<span class="ident">Distance</span>, <span class="ident">LonLat</span>, <span class="ident">Polygon</span>, <span class="ident">Pt2D</span>, <span class="ident">Ring</span>};
<span class="doccomment">/// Represents a rectangular boundary of `Pt2D` points.</span>
<span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Clone</span>, <span class="ident">Debug</span>, <span class="ident">PartialEq</span>, <span class="ident">Serialize</span>, <span class="ident">Deserialize</span>)]</span>
@ -257,6 +265,14 @@
<span class="self">self</span>.<span class="ident">update</span>(<span class="ident">Pt2D</span>::<span class="ident">new</span>(<span class="ident">other</span>.<span class="ident">max_x</span>, <span class="ident">other</span>.<span class="ident">max_y</span>));
}
<span class="doccomment">/// Expand the existing boundary by some distance evenly on all sides.</span>
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">add_buffer</span>(<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="self">self</span>, <span class="ident">sides</span>: <span class="ident">Distance</span>) {
<span class="self">self</span>.<span class="ident">min_x</span> <span class="op">-</span><span class="op">=</span> <span class="ident">sides</span>.<span class="ident">inner_meters</span>();
<span class="self">self</span>.<span class="ident">max_x</span> <span class="op">+</span><span class="op">=</span> <span class="ident">sides</span>.<span class="ident">inner_meters</span>();
<span class="self">self</span>.<span class="ident">min_y</span> <span class="op">-</span><span class="op">=</span> <span class="ident">sides</span>.<span class="ident">inner_meters</span>();
<span class="self">self</span>.<span class="ident">max_y</span> <span class="op">+</span><span class="op">=</span> <span class="ident">sides</span>.<span class="ident">inner_meters</span>();
}
<span class="doccomment">/// True if the point is within the boundary.</span>
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">contains</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">pt</span>: <span class="ident">Pt2D</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">bool</span> {
<span class="ident">pt</span>.<span class="ident">x</span>() <span class="op">&gt;</span><span class="op">=</span> <span class="self">self</span>.<span class="ident">min_x</span> <span class="op">&amp;&amp;</span> <span class="ident">pt</span>.<span class="ident">x</span>() <span class="op">&lt;</span><span class="op">=</span> <span class="self">self</span>.<span class="ident">max_x</span> <span class="op">&amp;&amp;</span> <span class="ident">pt</span>.<span class="ident">y</span>() <span class="op">&gt;</span><span class="op">=</span> <span class="self">self</span>.<span class="ident">min_y</span> <span class="op">&amp;&amp;</span> <span class="ident">pt</span>.<span class="ident">y</span>() <span class="op">&lt;</span><span class="op">=</span> <span class="self">self</span>.<span class="ident">max_y</span>

View File

@ -596,6 +596,12 @@
<span id="593">593</span>
<span id="594">594</span>
<span id="595">595</span>
<span id="596">596</span>
<span id="597">597</span>
<span id="598">598</span>
<span id="599">599</span>
<span id="600">600</span>
<span id="601">601</span>
</pre><div class="example-wrap"><pre class="rust ">
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">convert</span>::<span class="ident">TryFrom</span>;
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">fmt</span>;
@ -604,6 +610,7 @@
<span class="kw">use</span> <span class="ident">geo</span>::<span class="ident">algorithm</span>::<span class="ident">area</span>::<span class="ident">Area</span>;
<span class="kw">use</span> <span class="ident">geo</span>::<span class="ident">algorithm</span>::<span class="ident">concave_hull</span>::<span class="ident">ConcaveHull</span>;
<span class="kw">use</span> <span class="ident">geo</span>::<span class="ident">algorithm</span>::<span class="ident">convex_hull</span>::<span class="ident">ConvexHull</span>;
<span class="kw">use</span> <span class="ident">geo</span>::<span class="ident">algorithm</span>::<span class="ident">intersects</span>::<span class="ident">Intersects</span>;
<span class="kw">use</span> <span class="ident">geo_booleanop</span>::<span class="ident">boolean</span>::<span class="ident">BooleanOp</span>;
<span class="kw">use</span> <span class="ident">serde</span>::{<span class="ident">Deserialize</span>, <span class="ident">Serialize</span>};
@ -943,6 +950,11 @@
<span class="ident">Pt2D</span>::<span class="ident">new</span>(<span class="ident">pt</span>.<span class="ident">x</span>(), <span class="ident">pt</span>.<span class="ident">y</span>())
}
<span class="doccomment">/// Do two polygons intersect at all?</span>
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">intersects</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">other</span>: <span class="kw-2">&amp;</span><span class="ident">Polygon</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">bool</span> {
<span class="ident">to_geo</span>(<span class="self">self</span>.<span class="ident">points</span>()).<span class="ident">intersects</span>(<span class="kw-2">&amp;</span><span class="ident">to_geo</span>(<span class="ident">other</span>.<span class="ident">points</span>()))
}
<span class="doccomment">/// Creates the outline around the polygon, with the thickness half straddling the polygon and</span>
<span class="doccomment">/// half of it just outside. Only works for polygons that&#39;re formed from rings. Those made from</span>
<span class="doccomment">/// PolyLines won&#39;t work, for example.</span>