mirror of
https://github.com/a-b-street/abstreet.git
synced 2024-11-27 15:03:20 +03:00
deploy: 7b77b070a8
This commit is contained in:
parent
a9885bdacf
commit
68b667f5e7
@ -3,7 +3,7 @@
|
||||
</a><h2 class="location"></h2>
|
||||
</nav>
|
||||
<nav class="sidebar"><a class="sidebar-logo" href="../../../game/index.html"><div class="logo-container"><img class="rust-logo" src="../../../rust-logo.svg" alt="logo"></div>
|
||||
</a><h2 class="location"><a href="#">RouteSketcher</a></h2><div class="sidebar-elems"><section><div class="block"><h3 class="sidebar-title"><a href="#fields">Fields</a></h3><ul><li><a href="#structfield.mode">mode</a></li><li><a href="#structfield.preview">preview</a></li><li><a href="#structfield.route">route</a></li><li><a href="#structfield.snap_to_intersections">snap_to_intersections</a></li></ul></div><div class="block"><h3 class="sidebar-title"><a href="#implementations">Methods</a></h3><ul><li><a href="#method.all_roads">all_roads</a></li><li><a href="#method.draw">draw</a></li><li><a href="#method.event">event</a></li><li><a href="#method.get_widget_to_describe">get_widget_to_describe</a></li><li><a href="#method.is_route_started">is_route_started</a></li><li><a href="#method.is_route_valid">is_route_valid</a></li><li><a href="#method.mouseover_i">mouseover_i</a></li><li><a href="#method.new">new</a></li><li><a href="#method.on_click">on_click</a></li><li><a href="#method.update_mode">update_mode</a></li><li><a href="#method.update_preview">update_preview</a></li></ul></div><div class="block"><h3 class="sidebar-title"><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul><li><a href="#impl-RefUnwindSafe">!RefUnwindSafe</a></li><li><a href="#impl-Send">!Send</a></li><li><a href="#impl-Sync">!Sync</a></li><li><a href="#impl-Unpin">Unpin</a></li><li><a href="#impl-UnwindSafe">UnwindSafe</a></li></ul></div><div class="block"><h3 class="sidebar-title"><a href="#blanket-implementations">Blanket Implementations</a></h3><ul><li><a href="#impl-Any">Any</a></li><li><a href="#impl-Borrow%3CT%3E">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a></li><li><a href="#impl-Downcast">Downcast</a></li><li><a href="#impl-DowncastSync">DowncastSync</a></li><li><a href="#impl-From%3CT%3E">From<T></a></li><li><a href="#impl-Instrument">Instrument</a></li><li><a href="#impl-Into%3CU%3E">Into<U></a></li><li><a href="#impl-Same%3CT%3E">Same<T></a></li><li><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E">TryInto<U></a></li><li><a href="#impl-VZip%3CV%3E">VZip<V></a></li></ul></div></section><h2 class="location"><a href="index.html">In game::common::route_sketcher</a></h2><div id="sidebar-vars" data-name="RouteSketcher" data-ty="struct" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../../../game/index.html"><img class="rust-logo" src="../../../rust-logo.svg" alt="logo"></a><nav class="sub"><div class="theme-picker hidden"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="22" height="22" alt="Pick another theme!" src="../../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><form class="search-form"><div class="search-container"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../../wheel.svg"></a></div></form></nav></div><section id="main-content" class="content"><div class="main-heading">
|
||||
</a><h2 class="location"><a href="#">RouteSketcher</a></h2><div class="sidebar-elems"><section><div class="block"><h3 class="sidebar-title"><a href="#fields">Fields</a></h3><ul><li><a href="#structfield.mode">mode</a></li><li><a href="#structfield.preview">preview</a></li><li><a href="#structfield.route">route</a></li><li><a href="#structfield.snap_to_intersections">snap_to_intersections</a></li></ul></div><div class="block"><h3 class="sidebar-title"><a href="#implementations">Methods</a></h3><ul><li><a href="#method.all_roads">all_roads</a></li><li><a href="#method.draw">draw</a></li><li><a href="#method.event">event</a></li><li><a href="#method.get_widget_to_describe">get_widget_to_describe</a></li><li><a href="#method.is_route_started">is_route_started</a></li><li><a href="#method.is_route_valid">is_route_valid</a></li><li><a href="#method.mouseover_i">mouseover_i</a></li><li><a href="#method.new">new</a></li><li><a href="#method.on_click">on_click</a></li><li><a href="#method.update_mode">update_mode</a></li><li><a href="#method.update_preview">update_preview</a></li></ul></div><div class="block"><h3 class="sidebar-title"><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul><li><a href="#impl-RefUnwindSafe">!RefUnwindSafe</a></li><li><a href="#impl-Send">!Send</a></li><li><a href="#impl-Sync">!Sync</a></li><li><a href="#impl-Unpin">Unpin</a></li><li><a href="#impl-UnwindSafe">!UnwindSafe</a></li></ul></div><div class="block"><h3 class="sidebar-title"><a href="#blanket-implementations">Blanket Implementations</a></h3><ul><li><a href="#impl-Any">Any</a></li><li><a href="#impl-Borrow%3CT%3E">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E">BorrowMut<T></a></li><li><a href="#impl-Downcast">Downcast</a></li><li><a href="#impl-From%3CT%3E">From<T></a></li><li><a href="#impl-Instrument">Instrument</a></li><li><a href="#impl-Into%3CU%3E">Into<U></a></li><li><a href="#impl-Same%3CT%3E">Same<T></a></li><li><a href="#impl-TryFrom%3CU%3E">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E">TryInto<U></a></li><li><a href="#impl-VZip%3CV%3E">VZip<V></a></li></ul></div></section><h2 class="location"><a href="index.html">In game::common::route_sketcher</a></h2><div id="sidebar-vars" data-name="RouteSketcher" data-ty="struct" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../../../game/index.html"><img class="rust-logo" src="../../../rust-logo.svg" alt="logo"></a><nav class="sub"><div class="theme-picker hidden"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="22" height="22" alt="Pick another theme!" src="../../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><form class="search-form"><div class="search-container"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../../wheel.svg"></a></div></form></nav></div><section id="main-content" class="content"><div class="main-heading">
|
||||
<h1 class="fqn"><span class="in-band">Struct <a href="../../index.html">game</a>::<wbr><a href="../index.html">common</a>::<wbr><a href="index.html">route_sketcher</a>::<wbr><a class="struct" href="#">RouteSketcher</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span></h1><span class="out-of-band"><a class="srclink" href="../../../src/game/common/route_sketcher.rs.html#11-16">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="docblock item-decl"><pre class="rust struct"><code>pub struct RouteSketcher {
|
||||
snap_to_intersections: <a class="struct" href="../../../geom/find_closest/struct.FindClosest.html" title="struct geom::find_closest::FindClosest">FindClosest</a><<a class="struct" href="../../../map_model/objects/intersection/struct.IntersectionID.html" title="struct map_model::objects::intersection::IntersectionID">IntersectionID</a>>,
|
||||
route: <a class="struct" href="struct.Route.html" title="struct game::common::route_sketcher::Route">Route</a>,
|
||||
@ -13,7 +13,7 @@
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.on_click" class="method has-srclink"><span class="rightside"><a class="srclink" href="../../../src/game/common/route_sketcher.rs.html#208-216">source</a></span><a href="#method.on_click" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.on_click" class="fnname">on_click</a>(&mut self, x: &<a class="primitive" href="https://doc.rust-lang.org/1.60.0/std/primitive.str.html">str</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.60.0/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>True if something changed. False if this component doesn’t even handle that kind of click.</p>
|
||||
</div></details><section id="method.draw" class="method has-srclink"><span class="rightside"><a class="srclink" href="../../../src/game/common/route_sketcher.rs.html#218-228">source</a></span><a href="#method.draw" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.draw" class="fnname">draw</a>(&self, g: &mut GfxCtx<'_>)</h4></section><section id="method.all_roads" class="method has-srclink"><span class="rightside"><a class="srclink" href="../../../src/game/common/route_sketcher.rs.html#230-237">source</a></span><a href="#method.all_roads" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.all_roads" class="fnname">all_roads</a>(&self, app: &<a class="struct" href="../../app/struct.App.html" title="struct game::app::App">App</a>) -> <a class="struct" href="https://doc.rust-lang.org/1.60.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="struct" href="../../../map_model/objects/road/struct.RoadID.html" title="struct map_model::objects::road::RoadID">RoadID</a>><span class="notable-traits"><span class="notable-traits-tooltip">ⓘ<span class="notable-traits-tooltiptext"><span class="docblock"><span class="notable">Notable traits for <a class="struct" href="https://doc.rust-lang.org/1.60.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/1.60.0/std/primitive.u8.html">u8</a>, A></span><code class="content"><span class="where fmt-newline">impl<A> <a class="trait" href="https://doc.rust-lang.org/1.60.0/std/io/trait.Write.html" title="trait std::io::Write">Write</a> for <a class="struct" href="https://doc.rust-lang.org/1.60.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/1.60.0/std/primitive.u8.html">u8</a>, A> <span class="where fmt-newline">where<br> A: <a class="trait" href="https://doc.rust-lang.org/1.60.0/core/alloc/trait.Allocator.html" title="trait core::alloc::Allocator">Allocator</a>, </span></span></code></span></span></span></span></h4></section><details class="rustdoc-toggle method-toggle" open><summary><section id="method.is_route_started" class="method has-srclink"><span class="rightside"><a class="srclink" href="../../../src/game/common/route_sketcher.rs.html#240-242">source</a></span><a href="#method.is_route_started" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.is_route_started" class="fnname">is_route_started</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.60.0/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Has the user even picked a start point?</p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.is_route_valid" class="method has-srclink"><span class="rightside"><a class="srclink" href="../../../src/game/common/route_sketcher.rs.html#245-247">source</a></span><a href="#method.is_route_valid" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.is_route_valid" class="fnname">is_route_valid</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.60.0/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Has the user specified a full route?</p>
|
||||
</div></details></div></details><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe" class="impl has-srclink"><a href="#impl-RefUnwindSafe" class="anchor"></a><h3 class="code-header in-band">impl !<a class="trait" href="https://doc.rust-lang.org/1.60.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.RouteSketcher.html" title="struct game::common::route_sketcher::RouteSketcher">RouteSketcher</a></h3></section><section id="impl-Send" class="impl has-srclink"><a href="#impl-Send" class="anchor"></a><h3 class="code-header in-band">impl !<a class="trait" href="https://doc.rust-lang.org/1.60.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.RouteSketcher.html" title="struct game::common::route_sketcher::RouteSketcher">RouteSketcher</a></h3></section><section id="impl-Sync" class="impl has-srclink"><a href="#impl-Sync" class="anchor"></a><h3 class="code-header in-band">impl !<a class="trait" href="https://doc.rust-lang.org/1.60.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.RouteSketcher.html" title="struct game::common::route_sketcher::RouteSketcher">RouteSketcher</a></h3></section><section id="impl-Unpin" class="impl has-srclink"><a href="#impl-Unpin" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.60.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.RouteSketcher.html" title="struct game::common::route_sketcher::RouteSketcher">RouteSketcher</a></h3></section><section id="impl-UnwindSafe" class="impl has-srclink"><a href="#impl-UnwindSafe" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.60.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.RouteSketcher.html" title="struct game::common::route_sketcher::RouteSketcher">RouteSketcher</a></h3></section></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Any" class="impl has-srclink"><span class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.60.0/src/core/any.rs.html#132-136">source</a></span><a href="#impl-Any" class="anchor"></a><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.60.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.60.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.60.0/src/core/any.rs.html#133">source</a></span><a href="#method.type_id" class="anchor"></a><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.60.0/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.60.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.60.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
|
||||
</div></details></div></details><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe" class="impl has-srclink"><a href="#impl-RefUnwindSafe" class="anchor"></a><h3 class="code-header in-band">impl !<a class="trait" href="https://doc.rust-lang.org/1.60.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.RouteSketcher.html" title="struct game::common::route_sketcher::RouteSketcher">RouteSketcher</a></h3></section><section id="impl-Send" class="impl has-srclink"><a href="#impl-Send" class="anchor"></a><h3 class="code-header in-band">impl !<a class="trait" href="https://doc.rust-lang.org/1.60.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.RouteSketcher.html" title="struct game::common::route_sketcher::RouteSketcher">RouteSketcher</a></h3></section><section id="impl-Sync" class="impl has-srclink"><a href="#impl-Sync" class="anchor"></a><h3 class="code-header in-band">impl !<a class="trait" href="https://doc.rust-lang.org/1.60.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.RouteSketcher.html" title="struct game::common::route_sketcher::RouteSketcher">RouteSketcher</a></h3></section><section id="impl-Unpin" class="impl has-srclink"><a href="#impl-Unpin" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.60.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.RouteSketcher.html" title="struct game::common::route_sketcher::RouteSketcher">RouteSketcher</a></h3></section><section id="impl-UnwindSafe" class="impl has-srclink"><a href="#impl-UnwindSafe" class="anchor"></a><h3 class="code-header in-band">impl !<a class="trait" href="https://doc.rust-lang.org/1.60.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.RouteSketcher.html" title="struct game::common::route_sketcher::RouteSketcher">RouteSketcher</a></h3></section></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Any" class="impl has-srclink"><span class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.60.0/src/core/any.rs.html#132-136">source</a></span><a href="#impl-Any" class="anchor"></a><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.60.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.60.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.60.0/src/core/any.rs.html#133">source</a></span><a href="#method.type_id" class="anchor"></a><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.60.0/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.60.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.60.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
|
||||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Borrow%3CT%3E" class="impl has-srclink"><span class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.60.0/src/core/borrow.rs.html#209-214">source</a></span><a href="#impl-Borrow%3CT%3E" class="anchor"></a><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.60.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/1.60.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/91522" title="Tracking issue for const_borrow">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.60.0/src/core/borrow.rs.html#211">source</a></span><a href="#method.borrow" class="anchor"></a><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.60.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.60.0/std/primitive.reference.html">&</a>T</h4></section></summary><div class='docblock'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.60.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
|
||||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-BorrowMut%3CT%3E" class="impl has-srclink"><span class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.60.0/src/core/borrow.rs.html#218-222">source</a></span><a href="#impl-BorrowMut%3CT%3E" class="anchor"></a><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.60.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T <span class="where fmt-newline">where<br> T: ?<a class="trait" href="https://doc.rust-lang.org/1.60.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/91522" title="Tracking issue for const_borrow">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.60.0/src/core/borrow.rs.html#219">source</a></span><a href="#method.borrow_mut" class="anchor"></a><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.60.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.60.0/std/primitive.reference.html">&mut </a>T</h4></section></summary><div class='docblock'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.60.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>
|
||||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Downcast" class="impl has-srclink"><a href="#impl-Downcast" class="anchor"></a><h3 class="code-header in-band">impl<T> Downcast for T <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/1.60.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a>, </span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.into_any" class="method trait-impl has-srclink"><a href="#method.into_any" class="anchor"></a><h4 class="code-header">pub fn <a class="fnname">into_any</a>(self: <a class="struct" href="https://doc.rust-lang.org/1.60.0/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><T, <a class="struct" href="https://doc.rust-lang.org/1.60.0/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</a>>) -> <a class="struct" href="https://doc.rust-lang.org/1.60.0/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><dyn <a class="trait" href="https://doc.rust-lang.org/1.60.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> + 'static, <a class="struct" href="https://doc.rust-lang.org/1.60.0/alloc/alloc/struct.Global.html" title="struct alloc::alloc::Global">Global</a>></h4></section></summary><div class='docblock'><p>Convert <code>Box<dyn Trait></code> (where <code>Trait: Downcast</code>) to <code>Box<dyn Any></code>. <code>Box<dyn Any></code> can
|
||||
@ -24,8 +24,6 @@ further <code>downcast</code> into <code>Rc<ConcreteType></code> where <co
|
||||
generate <code>&Any</code>’s vtable from <code>&Trait</code>’s. <a href="#tymethod.as_any">Read more</a></p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.as_any_mut" class="method trait-impl has-srclink"><a href="#method.as_any_mut" class="anchor"></a><h4 class="code-header">pub fn <a class="fnname">as_any_mut</a>(&mut self) -> &mut (dyn <a class="trait" href="https://doc.rust-lang.org/1.60.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> + 'static)</h4></section></summary><div class='docblock'><p>Convert <code>&mut Trait</code> (where <code>Trait: Downcast</code>) to <code>&Any</code>. This is needed since Rust cannot
|
||||
generate <code>&mut Any</code>’s vtable from <code>&mut Trait</code>’s. <a href="#tymethod.as_any_mut">Read more</a></p>
|
||||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-DowncastSync" class="impl has-srclink"><a href="#impl-DowncastSync" class="anchor"></a><h3 class="code-header in-band">impl<T> DowncastSync for T <span class="where fmt-newline">where<br> T: <a class="trait" href="https://doc.rust-lang.org/1.60.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> + <a class="trait" href="https://doc.rust-lang.org/1.60.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/1.60.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>, </span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.into_any_arc" class="method trait-impl has-srclink"><a href="#method.into_any_arc" class="anchor"></a><h4 class="code-header">pub fn <a class="fnname">into_any_arc</a>(self: <a class="struct" href="https://doc.rust-lang.org/1.60.0/alloc/sync/struct.Arc.html" title="struct alloc::sync::Arc">Arc</a><T>) -> <a class="struct" href="https://doc.rust-lang.org/1.60.0/alloc/sync/struct.Arc.html" title="struct alloc::sync::Arc">Arc</a><dyn <a class="trait" href="https://doc.rust-lang.org/1.60.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> + <a class="trait" href="https://doc.rust-lang.org/1.60.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/1.60.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> + 'static></h4></section></summary><div class='docblock'><p>Convert <code>Arc<Trait></code> (where <code>Trait: Downcast</code>) to <code>Arc<Any></code>. <code>Arc<Any></code> can then be
|
||||
further <code>downcast</code> into <code>Arc<ConcreteType></code> where <code>ConcreteType</code> implements <code>Trait</code>. <a href="#tymethod.into_any_arc">Read more</a></p>
|
||||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-From%3CT%3E" class="impl has-srclink"><span class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.60.0/src/core/convert/mod.rs.html#553-558">source</a></span><a href="#impl-From%3CT%3E" class="anchor"></a><h3 class="code-header in-band">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.60.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/1.60.0/src/core/convert/mod.rs.html#555">source</a></span><a href="#method.from" class="anchor"></a><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.60.0/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(t: T) -> T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p>
|
||||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Instrument" class="impl has-srclink"><span class="rightside"><a class="srclink" href="https://docs.rs/tracing/0.1.26/src/tracing/instrument.rs.html#155">source</a></span><a href="#impl-Instrument" class="anchor"></a><h3 class="code-header in-band">impl<T> <a class="trait" href="https://docs.rs/tracing/0.1.26/tracing/instrument/trait.Instrument.html" title="trait tracing::instrument::Instrument">Instrument</a> for T</h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.instrument" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="https://docs.rs/tracing/0.1.26/src/tracing/instrument.rs.html#38">source</a></span><a href="#method.instrument" class="anchor"></a><h4 class="code-header">fn <a href="https://docs.rs/tracing/0.1.26/tracing/instrument/trait.Instrument.html#method.instrument" class="fnname">instrument</a>(self, span: <a class="struct" href="https://docs.rs/tracing/0.1.26/tracing/span/struct.Span.html" title="struct tracing::span::Span">Span</a>) -> <a class="struct" href="https://docs.rs/tracing/0.1.26/tracing/instrument/struct.Instrumented.html" title="struct tracing::instrument::Instrumented">Instrumented</a><Self></h4></section></summary><div class='docblock'><p>Instruments this type with the provided <code>Span</code>, returning an
|
||||
<code>Instrumented</code> wrapper. <a href="https://docs.rs/tracing/0.1.26/tracing/instrument/trait.Instrument.html#method.instrument">Read more</a></p>
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -4,5 +4,5 @@
|
||||
</nav>
|
||||
<nav class="sidebar"><a class="sidebar-logo" href="../../ltn/index.html"><div class="logo-container"><img class="rust-logo" src="../../rust-logo.svg" alt="logo"></div>
|
||||
</a><div class="sidebar-elems"><h2 class="location"><a href="index.html">In ltn::filters</a></h2><div id="sidebar-vars" data-name="draw_zoomed_planters" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../../ltn/index.html"><img class="rust-logo" src="../../rust-logo.svg" alt="logo"></a><nav class="sub"><div class="theme-picker hidden"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="22" height="22" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><form class="search-form"><div class="search-container"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../wheel.svg"></a></div></form></nav></div><section id="main-content" class="content"><div class="main-heading">
|
||||
<h1 class="fqn"><span class="in-band">Function <a href="../index.html">ltn</a>::<wbr><a href="index.html">filters</a>::<wbr><a class="fn" href="#">draw_zoomed_planters</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span></h1><span class="out-of-band"><a class="srclink" href="../../src/ltn/filters/mod.rs.html#284-300">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="docblock item-decl"><pre class="rust fn"><code>fn draw_zoomed_planters(ctx: &EventCtx<'_>, batch: &mut GeomBatch, line: <a class="struct" href="../../geom/line/struct.Line.html" title="struct geom::line::Line">Line</a>)</code></pre></div></section><section id="search" class="content hidden"></section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="ltn" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.60.0 (7737e0b5c 2022-04-04)" ></div>
|
||||
<h1 class="fqn"><span class="in-band">Function <a href="../index.html">ltn</a>::<wbr><a href="index.html">filters</a>::<wbr><a class="fn" href="#">draw_zoomed_planters</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span></h1><span class="out-of-band"><a class="srclink" href="../../src/ltn/filters/mod.rs.html#312-328">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="docblock item-decl"><pre class="rust fn"><code>fn draw_zoomed_planters(ctx: &EventCtx<'_>, batch: &mut GeomBatch, line: <a class="struct" href="../../geom/line/struct.Line.html" title="struct geom::line::Line">Line</a>)</code></pre></div></section><section id="search" class="content hidden"></section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="ltn" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.60.0 (7737e0b5c 2022-04-04)" ></div>
|
||||
</body></html>
|
@ -4,7 +4,7 @@
|
||||
</nav>
|
||||
<nav class="sidebar"><a class="sidebar-logo" href="../../ltn/index.html"><div class="logo-container"><img class="rust-logo" src="../../rust-logo.svg" alt="logo"></div>
|
||||
</a><h2 class="location"><a href="#">Module filters</a></h2><div class="sidebar-elems"><section><div class="block"><ul><li><a href="#modules">Modules</a></li><li><a href="#structs">Structs</a></li><li><a href="#functions">Functions</a></li></ul></div></section><div id="sidebar-vars" data-name="filters" data-ty="mod" data-relpath="./"></div><script defer src="./sidebar-items.js"></script></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../../ltn/index.html"><img class="rust-logo" src="../../rust-logo.svg" alt="logo"></a><nav class="sub"><div class="theme-picker hidden"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="22" height="22" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><form class="search-form"><div class="search-container"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../wheel.svg"></a></div></form></nav></div><section id="main-content" class="content"><div class="main-heading">
|
||||
<h1 class="fqn"><span class="in-band">Module <a href="../index.html">ltn</a>::<wbr><a class="mod" href="#">filters</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span></h1><span class="out-of-band"><a class="srclink" href="../../src/ltn/filters/mod.rs.html#1-324">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><h2 id="reexports" class="small-section-header"><a href="#reexports">Re-exports</a></h2>
|
||||
<h1 class="fqn"><span class="in-band">Module <a href="../index.html">ltn</a>::<wbr><a class="mod" href="#">filters</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span></h1><span class="out-of-band"><a class="srclink" href="../../src/ltn/filters/mod.rs.html#1-352">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><h2 id="reexports" class="small-section-header"><a href="#reexports">Re-exports</a></h2>
|
||||
<div class="item-table"><div class="item-row"><div class="item-left import-item"><code>pub use self::existing::<a class="fn" href="existing/fn.transform_existing_filters.html" title="fn ltn::filters::existing::transform_existing_filters">transform_existing_filters</a>;</code></div><div class="item-right docblock-short"></div></div></div><h2 id="modules" class="small-section-header"><a href="#modules">Modules</a></h2>
|
||||
<div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="mod" href="auto/index.html" title="ltn::filters::auto mod">auto</a></div><div class="item-right docblock-short"><p>Experiments to make a neighborhood be low-traffic by automatically placing filters to prevent all rat runs.</p>
|
||||
</div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="existing/index.html" title="ltn::filters::existing mod">existing</a></div><div class="item-right docblock-short"></div></div></div><h2 id="structs" class="small-section-header"><a href="#structs">Structs</a></h2>
|
||||
|
File diff suppressed because one or more lines are too long
@ -11,12 +11,12 @@
|
||||
}</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Stored in App session state. Before making any changes, call <code>before_edit</code>.</p>
|
||||
</div></details><h2 id="fields" class="fields small-section-header">Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.roads" class="structfield small-section-header"><a href="#structfield.roads" class="anchor field"></a><code>roads: <a class="struct" href="https://doc.rust-lang.org/1.60.0/alloc/collections/btree/map/struct.BTreeMap.html" title="struct alloc::collections::btree::map::BTreeMap">BTreeMap</a><<a class="struct" href="../../map_model/objects/road/struct.RoadID.html" title="struct map_model::objects::road::RoadID">RoadID</a>, <a class="struct" href="../../geom/distance/struct.Distance.html" title="struct geom::distance::Distance">Distance</a>></code></span><div class="docblock"><p>For filters placed along a road, where is the filter located?</p>
|
||||
</div><span id="structfield.intersections" class="structfield small-section-header"><a href="#structfield.intersections" class="anchor field"></a><code>intersections: <a class="struct" href="https://doc.rust-lang.org/1.60.0/alloc/collections/btree/map/struct.BTreeMap.html" title="struct alloc::collections::btree::map::BTreeMap">BTreeMap</a><<a class="struct" href="../../map_model/objects/intersection/struct.IntersectionID.html" title="struct map_model::objects::intersection::IntersectionID">IntersectionID</a>, <a class="struct" href="struct.DiagonalFilter.html" title="struct ltn::filters::DiagonalFilter">DiagonalFilter</a>></code></span><span id="structfield.previous_version" class="structfield small-section-header"><a href="#structfield.previous_version" class="anchor field"></a><code>previous_version: <a class="struct" href="https://doc.rust-lang.org/1.60.0/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><<a class="enum" href="https://doc.rust-lang.org/1.60.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="struct.ModalFilters.html" title="struct ltn::filters::ModalFilters">ModalFilters</a>>></code></span><div class="docblock"><p>Edit history is preserved recursively</p>
|
||||
</div><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl" class="impl has-srclink"><span class="rightside"><a class="srclink" href="../../src/ltn/filters/mod.rs.html#52-159">source</a></span><a href="#impl" class="anchor"></a><h3 class="code-header in-band">impl <a class="struct" href="struct.ModalFilters.html" title="struct ltn::filters::ModalFilters">ModalFilters</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.before_edit" class="method has-srclink"><span class="rightside"><a class="srclink" href="../../src/ltn/filters/mod.rs.html#54-57">source</a></span><a href="#method.before_edit" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.before_edit" class="fnname">before_edit</a>(&mut self)</h4></section></summary><div class="docblock"><p>Call before making any changes to preserve edit history</p>
|
||||
</div><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl" class="impl has-srclink"><span class="rightside"><a class="srclink" href="../../src/ltn/filters/mod.rs.html#52-187">source</a></span><a href="#impl" class="anchor"></a><h3 class="code-header in-band">impl <a class="struct" href="struct.ModalFilters.html" title="struct ltn::filters::ModalFilters">ModalFilters</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.before_edit" class="method has-srclink"><span class="rightside"><a class="srclink" href="../../src/ltn/filters/mod.rs.html#54-57">source</a></span><a href="#method.before_edit" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.before_edit" class="fnname">before_edit</a>(&mut self)</h4></section></summary><div class="docblock"><p>Call before making any changes to preserve edit history</p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.cancel_empty_edit" class="method has-srclink"><span class="rightside"><a class="srclink" href="../../src/ltn/filters/mod.rs.html#61-72">source</a></span><a href="#method.cancel_empty_edit" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.cancel_empty_edit" class="fnname">cancel_empty_edit</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.60.0/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>If it’s possible no edits were made, undo the previous call to <code>before_edit</code> and collapse
|
||||
the redundant piece of history. Returns true if the edit was indeed empty.</p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.update_routing_params" class="method has-srclink"><span class="rightside"><a class="srclink" href="../../src/ltn/filters/mod.rs.html#75-82">source</a></span><a href="#method.update_routing_params" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.update_routing_params" class="fnname">update_routing_params</a>(&self, params: &mut <a class="struct" href="../../map_model/pathfind/struct.RoutingParams.html" title="struct map_model::pathfind::RoutingParams">RoutingParams</a>)</h4></section></summary><div class="docblock"><p>Modify RoutingParams to respect these modal filters</p>
|
||||
</div></details><section id="method.allows_turn" class="method has-srclink"><span class="rightside"><a class="srclink" href="../../src/ltn/filters/mod.rs.html#84-89">source</a></span><a href="#method.allows_turn" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.allows_turn" class="fnname">allows_turn</a>(&self, t: <a class="struct" href="../../map_model/objects/turn/struct.TurnID.html" title="struct map_model::objects::turn::TurnID">TurnID</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.60.0/std/primitive.bool.html">bool</a></h4></section><details class="rustdoc-toggle method-toggle" open><summary><section id="method.draw" class="method has-srclink"><span class="rightside"><a class="srclink" href="../../src/ltn/filters/mod.rs.html#92-151">source</a></span><a href="#method.draw" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.draw" class="fnname">draw</a>(&self, ctx: &EventCtx<'_>, map: &<a class="struct" href="../../map_model/struct.Map.html" title="struct map_model::Map">Map</a>) -> <a class="struct" href="struct.Toggle3Zoomed.html" title="struct ltn::filters::Toggle3Zoomed">Toggle3Zoomed</a></h4></section></summary><div class="docblock"><p>Draw all modal filters</p>
|
||||
</div></details><section id="method.get_change_key" class="method has-srclink"><span class="rightside"><a class="srclink" href="../../src/ltn/filters/mod.rs.html#153-158">source</a></span><a href="#method.get_change_key" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.get_change_key" class="fnname">get_change_key</a>(&self) -> <a class="struct" href="struct.ChangeKey.html" title="struct ltn::filters::ChangeKey">ChangeKey</a></h4></section></div></details><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Clone" class="impl has-srclink"><span class="rightside"><a class="srclink" href="../../src/ltn/filters/mod.rs.html#17">source</a></span><a href="#impl-Clone" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.60.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="struct.ModalFilters.html" title="struct ltn::filters::ModalFilters">ModalFilters</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.clone" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../../src/ltn/filters/mod.rs.html#17">source</a></span><a href="#method.clone" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.60.0/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&self) -> <a class="struct" href="struct.ModalFilters.html" title="struct ltn::filters::ModalFilters">ModalFilters</a></h4></section></summary><div class='docblock'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/1.60.0/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
|
||||
</div></details><section id="method.allows_turn" class="method has-srclink"><span class="rightside"><a class="srclink" href="../../src/ltn/filters/mod.rs.html#84-89">source</a></span><a href="#method.allows_turn" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.allows_turn" class="fnname">allows_turn</a>(&self, t: <a class="struct" href="../../map_model/objects/turn/struct.TurnID.html" title="struct map_model::objects::turn::TurnID">TurnID</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.60.0/std/primitive.bool.html">bool</a></h4></section><details class="rustdoc-toggle method-toggle" open><summary><section id="method.draw" class="method has-srclink"><span class="rightside"><a class="srclink" href="../../src/ltn/filters/mod.rs.html#92-179">source</a></span><a href="#method.draw" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.draw" class="fnname">draw</a>(&self, ctx: &EventCtx<'_>, map: &<a class="struct" href="../../map_model/struct.Map.html" title="struct map_model::Map">Map</a>) -> <a class="struct" href="struct.Toggle3Zoomed.html" title="struct ltn::filters::Toggle3Zoomed">Toggle3Zoomed</a></h4></section></summary><div class="docblock"><p>Draw all modal filters</p>
|
||||
</div></details><section id="method.get_change_key" class="method has-srclink"><span class="rightside"><a class="srclink" href="../../src/ltn/filters/mod.rs.html#181-186">source</a></span><a href="#method.get_change_key" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.get_change_key" class="fnname">get_change_key</a>(&self) -> <a class="struct" href="struct.ChangeKey.html" title="struct ltn::filters::ChangeKey">ChangeKey</a></h4></section></div></details><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Clone" class="impl has-srclink"><span class="rightside"><a class="srclink" href="../../src/ltn/filters/mod.rs.html#17">source</a></span><a href="#impl-Clone" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.60.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="struct.ModalFilters.html" title="struct ltn::filters::ModalFilters">ModalFilters</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.clone" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../../src/ltn/filters/mod.rs.html#17">source</a></span><a href="#method.clone" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.60.0/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&self) -> <a class="struct" href="struct.ModalFilters.html" title="struct ltn::filters::ModalFilters">ModalFilters</a></h4></section></summary><div class='docblock'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/1.60.0/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.clone_from" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.60.0/src/core/clone.rs.html#130">source</a></span><a href="#method.clone_from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.60.0/core/clone/trait.Clone.html#method.clone_from" class="fnname">clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/1.60.0/std/primitive.reference.html">&</a>Self)</h4></section></summary><div class='docblock'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/1.60.0/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
|
||||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Default" class="impl has-srclink"><span class="rightside"><a class="srclink" href="../../src/ltn/filters/mod.rs.html#17">source</a></span><a href="#impl-Default" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.60.0/core/default/trait.Default.html" title="trait core::default::Default">Default</a> for <a class="struct" href="struct.ModalFilters.html" title="struct ltn::filters::ModalFilters">ModalFilters</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.default" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../../src/ltn/filters/mod.rs.html#17">source</a></span><a href="#method.default" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.60.0/core/default/trait.Default.html#tymethod.default" class="fnname">default</a>() -> <a class="struct" href="struct.ModalFilters.html" title="struct ltn::filters::ModalFilters">ModalFilters</a></h4></section></summary><div class='docblock'><p>Returns the “default value” for a type. <a href="https://doc.rust-lang.org/1.60.0/core/default/trait.Default.html#tymethod.default">Read more</a></p>
|
||||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Deserialize%3C%27de%3E" class="impl has-srclink"><span class="rightside"><a class="srclink" href="../../src/ltn/filters/mod.rs.html#17">source</a></span><a href="#impl-Deserialize%3C%27de%3E" class="anchor"></a><h3 class="code-header in-band">impl<'de> <a class="trait" href="https://docs.rs/serde/1.0.126/serde/de/trait.Deserialize.html" title="trait serde::de::Deserialize">Deserialize</a><'de> for <a class="struct" href="struct.ModalFilters.html" title="struct ltn::filters::ModalFilters">ModalFilters</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.deserialize" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../../src/ltn/filters/mod.rs.html#17">source</a></span><a href="#method.deserialize" class="anchor"></a><h4 class="code-header">fn <a href="https://docs.rs/serde/1.0.126/serde/de/trait.Deserialize.html#tymethod.deserialize" class="fnname">deserialize</a><__D>(__deserializer: __D) -> <a class="enum" href="https://doc.rust-lang.org/1.60.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self, __D::<a class="associatedtype" href="https://docs.rs/serde/1.0.126/serde/de/trait.Deserializer.html#associatedtype.Error" title="type serde::de::Deserializer::Error">Error</a>> <span class="where fmt-newline">where<br> __D: <a class="trait" href="https://docs.rs/serde/1.0.126/serde/de/trait.Deserializer.html" title="trait serde::de::Deserializer">Deserializer</a><'de>, </span></h4></section></summary><div class='docblock'><p>Deserialize this value from the given Serde deserializer. <a href="https://docs.rs/serde/1.0.126/serde/de/trait.Deserialize.html#tymethod.deserialize">Read more</a></p>
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -11,12 +11,12 @@
|
||||
}</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Stored in App session state. Before making any changes, call <code>before_edit</code>.</p>
|
||||
</div></details><h2 id="fields" class="fields small-section-header">Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.roads" class="structfield small-section-header"><a href="#structfield.roads" class="anchor field"></a><code>roads: <a class="struct" href="https://doc.rust-lang.org/1.60.0/alloc/collections/btree/map/struct.BTreeMap.html" title="struct alloc::collections::btree::map::BTreeMap">BTreeMap</a><<a class="struct" href="../map_model/objects/road/struct.RoadID.html" title="struct map_model::objects::road::RoadID">RoadID</a>, <a class="struct" href="../geom/distance/struct.Distance.html" title="struct geom::distance::Distance">Distance</a>></code></span><div class="docblock"><p>For filters placed along a road, where is the filter located?</p>
|
||||
</div><span id="structfield.intersections" class="structfield small-section-header"><a href="#structfield.intersections" class="anchor field"></a><code>intersections: <a class="struct" href="https://doc.rust-lang.org/1.60.0/alloc/collections/btree/map/struct.BTreeMap.html" title="struct alloc::collections::btree::map::BTreeMap">BTreeMap</a><<a class="struct" href="../map_model/objects/intersection/struct.IntersectionID.html" title="struct map_model::objects::intersection::IntersectionID">IntersectionID</a>, <a class="struct" href="filters/struct.DiagonalFilter.html" title="struct ltn::filters::DiagonalFilter">DiagonalFilter</a>></code></span><span id="structfield.previous_version" class="structfield small-section-header"><a href="#structfield.previous_version" class="anchor field"></a><code>previous_version: <a class="struct" href="https://doc.rust-lang.org/1.60.0/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><<a class="enum" href="https://doc.rust-lang.org/1.60.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="filters/struct.ModalFilters.html" title="struct ltn::filters::ModalFilters">ModalFilters</a>>></code></span><div class="docblock"><p>Edit history is preserved recursively</p>
|
||||
</div><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl" class="impl has-srclink"><span class="rightside"><a class="srclink" href="../src/ltn/filters/mod.rs.html#52-159">source</a></span><a href="#impl" class="anchor"></a><h3 class="code-header in-band">impl <a class="struct" href="filters/struct.ModalFilters.html" title="struct ltn::filters::ModalFilters">ModalFilters</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.before_edit" class="method has-srclink"><span class="rightside"><a class="srclink" href="../src/ltn/filters/mod.rs.html#54-57">source</a></span><a href="#method.before_edit" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.before_edit" class="fnname">before_edit</a>(&mut self)</h4></section></summary><div class="docblock"><p>Call before making any changes to preserve edit history</p>
|
||||
</div><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl" class="impl has-srclink"><span class="rightside"><a class="srclink" href="../src/ltn/filters/mod.rs.html#52-187">source</a></span><a href="#impl" class="anchor"></a><h3 class="code-header in-band">impl <a class="struct" href="filters/struct.ModalFilters.html" title="struct ltn::filters::ModalFilters">ModalFilters</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.before_edit" class="method has-srclink"><span class="rightside"><a class="srclink" href="../src/ltn/filters/mod.rs.html#54-57">source</a></span><a href="#method.before_edit" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.before_edit" class="fnname">before_edit</a>(&mut self)</h4></section></summary><div class="docblock"><p>Call before making any changes to preserve edit history</p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.cancel_empty_edit" class="method has-srclink"><span class="rightside"><a class="srclink" href="../src/ltn/filters/mod.rs.html#61-72">source</a></span><a href="#method.cancel_empty_edit" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.cancel_empty_edit" class="fnname">cancel_empty_edit</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.60.0/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>If it’s possible no edits were made, undo the previous call to <code>before_edit</code> and collapse
|
||||
the redundant piece of history. Returns true if the edit was indeed empty.</p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.update_routing_params" class="method has-srclink"><span class="rightside"><a class="srclink" href="../src/ltn/filters/mod.rs.html#75-82">source</a></span><a href="#method.update_routing_params" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.update_routing_params" class="fnname">update_routing_params</a>(&self, params: &mut <a class="struct" href="../map_model/pathfind/struct.RoutingParams.html" title="struct map_model::pathfind::RoutingParams">RoutingParams</a>)</h4></section></summary><div class="docblock"><p>Modify RoutingParams to respect these modal filters</p>
|
||||
</div></details><section id="method.allows_turn" class="method has-srclink"><span class="rightside"><a class="srclink" href="../src/ltn/filters/mod.rs.html#84-89">source</a></span><a href="#method.allows_turn" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.allows_turn" class="fnname">allows_turn</a>(&self, t: <a class="struct" href="../map_model/objects/turn/struct.TurnID.html" title="struct map_model::objects::turn::TurnID">TurnID</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.60.0/std/primitive.bool.html">bool</a></h4></section><details class="rustdoc-toggle method-toggle" open><summary><section id="method.draw" class="method has-srclink"><span class="rightside"><a class="srclink" href="../src/ltn/filters/mod.rs.html#92-151">source</a></span><a href="#method.draw" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.draw" class="fnname">draw</a>(&self, ctx: &EventCtx<'_>, map: &<a class="struct" href="../map_model/struct.Map.html" title="struct map_model::Map">Map</a>) -> <a class="struct" href="filters/struct.Toggle3Zoomed.html" title="struct ltn::filters::Toggle3Zoomed">Toggle3Zoomed</a></h4></section></summary><div class="docblock"><p>Draw all modal filters</p>
|
||||
</div></details><section id="method.get_change_key" class="method has-srclink"><span class="rightside"><a class="srclink" href="../src/ltn/filters/mod.rs.html#153-158">source</a></span><a href="#method.get_change_key" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.get_change_key" class="fnname">get_change_key</a>(&self) -> <a class="struct" href="filters/struct.ChangeKey.html" title="struct ltn::filters::ChangeKey">ChangeKey</a></h4></section></div></details><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Clone" class="impl has-srclink"><span class="rightside"><a class="srclink" href="../src/ltn/filters/mod.rs.html#17">source</a></span><a href="#impl-Clone" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.60.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="filters/struct.ModalFilters.html" title="struct ltn::filters::ModalFilters">ModalFilters</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.clone" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../src/ltn/filters/mod.rs.html#17">source</a></span><a href="#method.clone" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.60.0/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&self) -> <a class="struct" href="filters/struct.ModalFilters.html" title="struct ltn::filters::ModalFilters">ModalFilters</a></h4></section></summary><div class='docblock'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/1.60.0/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
|
||||
</div></details><section id="method.allows_turn" class="method has-srclink"><span class="rightside"><a class="srclink" href="../src/ltn/filters/mod.rs.html#84-89">source</a></span><a href="#method.allows_turn" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.allows_turn" class="fnname">allows_turn</a>(&self, t: <a class="struct" href="../map_model/objects/turn/struct.TurnID.html" title="struct map_model::objects::turn::TurnID">TurnID</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.60.0/std/primitive.bool.html">bool</a></h4></section><details class="rustdoc-toggle method-toggle" open><summary><section id="method.draw" class="method has-srclink"><span class="rightside"><a class="srclink" href="../src/ltn/filters/mod.rs.html#92-179">source</a></span><a href="#method.draw" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.draw" class="fnname">draw</a>(&self, ctx: &EventCtx<'_>, map: &<a class="struct" href="../map_model/struct.Map.html" title="struct map_model::Map">Map</a>) -> <a class="struct" href="filters/struct.Toggle3Zoomed.html" title="struct ltn::filters::Toggle3Zoomed">Toggle3Zoomed</a></h4></section></summary><div class="docblock"><p>Draw all modal filters</p>
|
||||
</div></details><section id="method.get_change_key" class="method has-srclink"><span class="rightside"><a class="srclink" href="../src/ltn/filters/mod.rs.html#181-186">source</a></span><a href="#method.get_change_key" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.get_change_key" class="fnname">get_change_key</a>(&self) -> <a class="struct" href="filters/struct.ChangeKey.html" title="struct ltn::filters::ChangeKey">ChangeKey</a></h4></section></div></details><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Clone" class="impl has-srclink"><span class="rightside"><a class="srclink" href="../src/ltn/filters/mod.rs.html#17">source</a></span><a href="#impl-Clone" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.60.0/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> for <a class="struct" href="filters/struct.ModalFilters.html" title="struct ltn::filters::ModalFilters">ModalFilters</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.clone" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../src/ltn/filters/mod.rs.html#17">source</a></span><a href="#method.clone" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.60.0/core/clone/trait.Clone.html#tymethod.clone" class="fnname">clone</a>(&self) -> <a class="struct" href="filters/struct.ModalFilters.html" title="struct ltn::filters::ModalFilters">ModalFilters</a></h4></section></summary><div class='docblock'><p>Returns a copy of the value. <a href="https://doc.rust-lang.org/1.60.0/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.clone_from" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span> · <a class="srclink" href="https://doc.rust-lang.org/1.60.0/src/core/clone.rs.html#130">source</a></span><a href="#method.clone_from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.60.0/core/clone/trait.Clone.html#method.clone_from" class="fnname">clone_from</a>(&mut self, source: <a class="primitive" href="https://doc.rust-lang.org/1.60.0/std/primitive.reference.html">&</a>Self)</h4></section></summary><div class='docblock'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/1.60.0/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
|
||||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Default" class="impl has-srclink"><span class="rightside"><a class="srclink" href="../src/ltn/filters/mod.rs.html#17">source</a></span><a href="#impl-Default" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.60.0/core/default/trait.Default.html" title="trait core::default::Default">Default</a> for <a class="struct" href="filters/struct.ModalFilters.html" title="struct ltn::filters::ModalFilters">ModalFilters</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.default" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../src/ltn/filters/mod.rs.html#17">source</a></span><a href="#method.default" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.60.0/core/default/trait.Default.html#tymethod.default" class="fnname">default</a>() -> <a class="struct" href="filters/struct.ModalFilters.html" title="struct ltn::filters::ModalFilters">ModalFilters</a></h4></section></summary><div class='docblock'><p>Returns the “default value” for a type. <a href="https://doc.rust-lang.org/1.60.0/core/default/trait.Default.html#tymethod.default">Read more</a></p>
|
||||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Deserialize%3C%27de%3E" class="impl has-srclink"><span class="rightside"><a class="srclink" href="../src/ltn/filters/mod.rs.html#17">source</a></span><a href="#impl-Deserialize%3C%27de%3E" class="anchor"></a><h3 class="code-header in-band">impl<'de> <a class="trait" href="https://docs.rs/serde/1.0.126/serde/de/trait.Deserialize.html" title="trait serde::de::Deserialize">Deserialize</a><'de> for <a class="struct" href="filters/struct.ModalFilters.html" title="struct ltn::filters::ModalFilters">ModalFilters</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.deserialize" class="method trait-impl has-srclink"><span class="rightside"><a class="srclink" href="../src/ltn/filters/mod.rs.html#17">source</a></span><a href="#method.deserialize" class="anchor"></a><h4 class="code-header">fn <a href="https://docs.rs/serde/1.0.126/serde/de/trait.Deserialize.html#tymethod.deserialize" class="fnname">deserialize</a><__D>(__deserializer: __D) -> <a class="enum" href="https://doc.rust-lang.org/1.60.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self, __D::<a class="associatedtype" href="https://docs.rs/serde/1.0.126/serde/de/trait.Deserializer.html#associatedtype.Error" title="type serde::de::Deserializer::Error">Error</a>> <span class="where fmt-newline">where<br> __D: <a class="trait" href="https://docs.rs/serde/1.0.126/serde/de/trait.Deserializer.html" title="trait serde::de::Deserializer">Deserializer</a><'de>, </span></h4></section></summary><div class='docblock'><p>Deserialize this value from the given Serde deserializer. <a href="https://docs.rs/serde/1.0.126/serde/de/trait.Deserialize.html#tymethod.deserialize">Read more</a></p>
|
||||
|
File diff suppressed because one or more lines are too long
@ -4,6 +4,6 @@
|
||||
</nav>
|
||||
<nav class="sidebar"><a class="sidebar-logo" href="../../../../map_gui/index.html"><div class="logo-container"><img class="rust-logo" src="../../../../rust-logo.svg" alt="logo"></div>
|
||||
</a><div class="sidebar-elems"><h2 class="location"><a href="index.html">In map_gui::tools::title_screen::built_info</a></h2><div id="sidebar-vars" data-name="BUILT_TIME_UTC" data-ty="constant" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../../../../map_gui/index.html"><img class="rust-logo" src="../../../../rust-logo.svg" alt="logo"></a><nav class="sub"><div class="theme-picker hidden"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="22" height="22" alt="Pick another theme!" src="../../../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><form class="search-form"><div class="search-container"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../../../wheel.svg"></a></div></form></nav></div><section id="main-content" class="content"><div class="main-heading">
|
||||
<h1 class="fqn"><span class="in-band">Constant <a href="../../../index.html">map_gui</a>::<wbr><a href="../../index.html">tools</a>::<wbr><a href="../index.html">title_screen</a>::<wbr><a href="index.html">built_info</a>::<wbr><a class="constant" href="#">BUILT_TIME_UTC</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span></h1><span class="out-of-band"><a class="srclink" href="../../../../src/map_gui/home/runner/work/abstreet/abstreet/target/debug/build/map_gui-f69e066278ff4726/out/built.rs.html#78">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="docblock item-decl"><pre class="rust const"><code>pub const BUILT_TIME_UTC: &<a class="primitive" href="https://doc.rust-lang.org/1.60.0/std/primitive.str.html">str</a> = r"Sun, 17 Apr 2022 16:21:54 +0000";</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The build time in RFC2822, UTC.</p>
|
||||
<h1 class="fqn"><span class="in-band">Constant <a href="../../../index.html">map_gui</a>::<wbr><a href="../../index.html">tools</a>::<wbr><a href="../index.html">title_screen</a>::<wbr><a href="index.html">built_info</a>::<wbr><a class="constant" href="#">BUILT_TIME_UTC</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span></h1><span class="out-of-band"><a class="srclink" href="../../../../src/map_gui/home/runner/work/abstreet/abstreet/target/debug/build/map_gui-f69e066278ff4726/out/built.rs.html#78">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="docblock item-decl"><pre class="rust const"><code>pub const BUILT_TIME_UTC: &<a class="primitive" href="https://doc.rust-lang.org/1.60.0/std/primitive.str.html">str</a> = r"Sun, 17 Apr 2022 16:26:36 +0000";</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The build time in RFC2822, UTC.</p>
|
||||
</div></details></section><section id="search" class="content hidden"></section></div></main><div id="rustdoc-vars" data-root-path="../../../../" data-current-crate="map_gui" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.60.0 (7737e0b5c 2022-04-04)" ></div>
|
||||
</body></html>
|
File diff suppressed because one or more lines are too long
@ -327,6 +327,34 @@
|
||||
<span id="322">322</span>
|
||||
<span id="323">323</span>
|
||||
<span id="324">324</span>
|
||||
<span id="325">325</span>
|
||||
<span id="326">326</span>
|
||||
<span id="327">327</span>
|
||||
<span id="328">328</span>
|
||||
<span id="329">329</span>
|
||||
<span id="330">330</span>
|
||||
<span id="331">331</span>
|
||||
<span id="332">332</span>
|
||||
<span id="333">333</span>
|
||||
<span id="334">334</span>
|
||||
<span id="335">335</span>
|
||||
<span id="336">336</span>
|
||||
<span id="337">337</span>
|
||||
<span id="338">338</span>
|
||||
<span id="339">339</span>
|
||||
<span id="340">340</span>
|
||||
<span id="341">341</span>
|
||||
<span id="342">342</span>
|
||||
<span id="343">343</span>
|
||||
<span id="344">344</span>
|
||||
<span id="345">345</span>
|
||||
<span id="346">346</span>
|
||||
<span id="347">347</span>
|
||||
<span id="348">348</span>
|
||||
<span id="349">349</span>
|
||||
<span id="350">350</span>
|
||||
<span id="351">351</span>
|
||||
<span id="352">352</span>
|
||||
</pre><pre class="rust"><code><span class="kw">pub</span> <span class="kw">mod</span> <span class="ident">auto</span>;
|
||||
<span class="kw">mod</span> <span class="ident">existing</span>;
|
||||
|
||||
@ -422,16 +450,30 @@
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">batch</span> <span class="op">=</span> <span class="ident">ToggleZoomed::builder</span>();
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">low_zoom</span> <span class="op">=</span> <span class="ident">DrawUnzoomedShapes::builder</span>();
|
||||
|
||||
<span class="kw">let</span> <span class="ident">line_thickness</span> <span class="op">=</span> <span class="ident">Distance::meters</span>(<span class="number">7.0</span>);
|
||||
|
||||
<span class="kw">for</span> (<span class="ident">r</span>, <span class="ident">dist</span>) <span class="kw">in</span> <span class="kw-2">&</span><span class="self">self</span>.<span class="ident">roads</span> {
|
||||
<span class="kw">let</span> <span class="ident">road</span> <span class="op">=</span> <span class="ident">map</span>.<span class="ident">get_r</span>(<span class="kw-2">*</span><span class="ident">r</span>);
|
||||
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Ok</span>((<span class="ident">pt</span>, <span class="ident">angle</span>)) <span class="op">=</span> <span class="ident">road</span>.<span class="ident">center_pts</span>.<span class="ident">dist_along</span>(<span class="kw-2">*</span><span class="ident">dist</span>) {
|
||||
<span class="kw">let</span> <span class="ident">road_width</span> <span class="op">=</span> <span class="ident">road</span>.<span class="ident">get_width</span>();
|
||||
|
||||
<span class="comment">// TODO DrawUnzoomedShapes can do lines, but they don't stretch as the radius does,</span>
|
||||
<span class="comment">// so it looks weird</span>
|
||||
<span class="ident">low_zoom</span>.<span class="ident">add_circle</span>(<span class="ident">pt</span>, <span class="ident">Distance::meters</span>(<span class="number">8.0</span>), <span class="kw-2">*</span><span class="ident">colors::FILTER_OUTER</span>);
|
||||
<span class="ident">low_zoom</span>.<span class="ident">add_circle</span>(<span class="ident">pt</span>, <span class="ident">Distance::meters</span>(<span class="number">6.0</span>), <span class="kw-2">*</span><span class="ident">colors::FILTER_INNER</span>);
|
||||
<span class="ident">low_zoom</span>.<span class="ident">add_circle</span>(<span class="ident">pt</span>, <span class="ident">road_width</span>, <span class="kw-2">*</span><span class="ident">colors::FILTER_OUTER</span>);
|
||||
<span class="comment">// Unzoomed lines aren't sufficient; they only vary the width. We need to stretch</span>
|
||||
<span class="comment">// the line to cover the growing circle.</span>
|
||||
<span class="ident">low_zoom</span>.<span class="ident">add_custom</span>(<span class="ident">Box::new</span>(<span class="kw">move</span> <span class="op">|</span><span class="ident">batch</span>, <span class="ident">thickness</span><span class="op">|</span> {
|
||||
<span class="ident">batch</span>.<span class="ident">push</span>(
|
||||
<span class="kw-2">*</span><span class="ident">colors::FILTER_INNER</span>,
|
||||
<span class="ident">Line::must_new</span>(
|
||||
<span class="ident">pt</span>.<span class="ident">project_away</span>(<span class="number">0.8</span> <span class="op">*</span> <span class="ident">thickness</span> <span class="op">*</span> <span class="ident">road_width</span>, <span class="ident">angle</span>.<span class="ident">rotate_degs</span>(<span class="number">90.0</span>)),
|
||||
<span class="ident">pt</span>.<span class="ident">project_away</span>(<span class="number">0.8</span> <span class="op">*</span> <span class="ident">thickness</span> <span class="op">*</span> <span class="ident">road_width</span>, <span class="ident">angle</span>.<span class="ident">rotate_degs</span>(<span class="op">-</span><span class="number">90.0</span>)),
|
||||
)
|
||||
.<span class="ident">to_polyline</span>()
|
||||
.<span class="ident">make_polygons</span>(<span class="ident">thickness</span> <span class="op">*</span> <span class="ident">line_thickness</span>),
|
||||
);
|
||||
}));
|
||||
|
||||
<span class="comment">// TODO Ideally we get rid of Toggle3Zoomed and make DrawUnzoomedShapes handle this</span>
|
||||
<span class="comment">// medium-zoom case.</span>
|
||||
<span class="ident">batch</span>.<span class="ident">unzoomed</span>.<span class="ident">push</span>(
|
||||
<span class="kw-2">*</span><span class="ident">colors::FILTER_OUTER</span>,
|
||||
<span class="ident">Circle::new</span>(<span class="ident">pt</span>, <span class="ident">road_width</span>).<span class="ident">to_polygon</span>(),
|
||||
@ -442,7 +484,7 @@
|
||||
<span class="ident">pt</span>.<span class="ident">project_away</span>(<span class="number">0.8</span> <span class="op">*</span> <span class="ident">road_width</span>, <span class="ident">angle</span>.<span class="ident">rotate_degs</span>(<span class="number">90.0</span>)),
|
||||
<span class="ident">pt</span>.<span class="ident">project_away</span>(<span class="number">0.8</span> <span class="op">*</span> <span class="ident">road_width</span>, <span class="ident">angle</span>.<span class="ident">rotate_degs</span>(<span class="op">-</span><span class="number">90.0</span>)),
|
||||
)
|
||||
.<span class="ident">make_polygons</span>(<span class="ident">Distance::meters</span>(<span class="number">7.0</span>)),
|
||||
.<span class="ident">make_polygons</span>(<span class="ident">line_thickness</span>),
|
||||
);
|
||||
|
||||
<span class="comment">// TODO Only cover the driving/parking lanes (and center appropriately)</span>
|
||||
@ -456,19 +498,33 @@
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
<span class="kw">for</span> (<span class="kw">_</span>, <span class="ident">filter</span>) <span class="kw">in</span> <span class="kw-2">&</span><span class="self">self</span>.<span class="ident">intersections</span> {
|
||||
<span class="kw">let</span> <span class="ident">line</span> <span class="op">=</span> <span class="ident">filter</span>.<span class="ident">geometry</span>(<span class="ident">map</span>);
|
||||
|
||||
<span class="comment">// It's really hard to see a tiny squished line thickened, so use the same circle</span>
|
||||
<span class="comment">// symbology at really low zooms</span>
|
||||
<span class="kw">let</span> <span class="ident">length</span> <span class="op">=</span> <span class="ident">line</span>.<span class="ident">length</span>();
|
||||
<span class="kw">let</span> <span class="ident">angle</span> <span class="op">=</span> <span class="ident">line</span>.<span class="ident">angle</span>();
|
||||
<span class="kw">let</span> <span class="ident">pt</span> <span class="op">=</span> <span class="ident">line</span>.<span class="ident">middle</span>().<span class="ident">unwrap</span>();
|
||||
<span class="ident">low_zoom</span>.<span class="ident">add_circle</span>(<span class="ident">pt</span>, <span class="ident">Distance::meters</span>(<span class="number">8.0</span>), <span class="kw-2">*</span><span class="ident">colors::FILTER_OUTER</span>);
|
||||
<span class="ident">low_zoom</span>.<span class="ident">add_circle</span>(<span class="ident">pt</span>, <span class="ident">Distance::meters</span>(<span class="number">6.0</span>), <span class="kw-2">*</span><span class="ident">colors::FILTER_INNER</span>);
|
||||
<span class="ident">low_zoom</span>.<span class="ident">add_circle</span>(<span class="ident">pt</span>, <span class="number">0.7</span> <span class="op">*</span> <span class="ident">length</span>, <span class="kw-2">*</span><span class="ident">colors::FILTER_OUTER</span>);
|
||||
<span class="ident">low_zoom</span>.<span class="ident">add_custom</span>(<span class="ident">Box::new</span>(<span class="kw">move</span> <span class="op">|</span><span class="ident">batch</span>, <span class="ident">thickness</span><span class="op">|</span> {
|
||||
<span class="ident">batch</span>.<span class="ident">push</span>(
|
||||
<span class="kw-2">*</span><span class="ident">colors::FILTER_INNER</span>,
|
||||
<span class="ident">Line::must_new</span>(
|
||||
<span class="ident">pt</span>.<span class="ident">project_away</span>(<span class="ident">thickness</span> <span class="op">*</span> <span class="ident">length</span> <span class="op">/</span> <span class="number">2.0</span>, <span class="ident">angle</span>),
|
||||
<span class="ident">pt</span>.<span class="ident">project_away</span>(<span class="ident">thickness</span> <span class="op">*</span> <span class="ident">length</span> <span class="op">/</span> <span class="number">2.0</span>, <span class="ident">angle</span>.<span class="ident">opposite</span>()),
|
||||
)
|
||||
.<span class="ident">to_polyline</span>()
|
||||
.<span class="ident">make_polygons</span>(<span class="ident">thickness</span> <span class="op">*</span> <span class="ident">line_thickness</span>),
|
||||
);
|
||||
}));
|
||||
|
||||
<span class="ident">batch</span>.<span class="ident">unzoomed</span>.<span class="ident">push</span>(
|
||||
<span class="kw-2">*</span><span class="ident">colors::FILTER_OUTER</span>,
|
||||
<span class="ident">line</span>.<span class="ident">make_polygons</span>(<span class="ident">Distance::meters</span>(<span class="number">3.0</span>)),
|
||||
<span class="ident">Circle::new</span>(<span class="ident">pt</span>, <span class="number">0.7</span> <span class="op">*</span> <span class="ident">length</span>).<span class="ident">to_polygon</span>(),
|
||||
);
|
||||
<span class="ident">batch</span>
|
||||
.<span class="ident">unzoomed</span>
|
||||
.<span class="ident">push</span>(<span class="kw-2">*</span><span class="ident">colors::FILTER_INNER</span>, <span class="ident">line</span>.<span class="ident">make_polygons</span>(<span class="ident">line_thickness</span>));
|
||||
|
||||
<span class="ident">draw_zoomed_planters</span>(
|
||||
<span class="ident">ctx</span>,
|
||||
|
@ -179,7 +179,7 @@
|
||||
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">RUSTDOC_VERSION</span>: <span class="kw-2">&</span><span class="ident">str</span> <span class="op">=</span> <span class="string">r"rustdoc 1.60.0 (7737e0b5c 2022-04-04)"</span>;
|
||||
<span class="attribute">#[<span class="ident">doc</span><span class="op">=</span><span class="string">r#"The build time in RFC2822, UTC."#</span>]</span>
|
||||
<span class="attribute">#[<span class="ident">allow</span>(<span class="ident">dead_code</span>)]</span>
|
||||
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">BUILT_TIME_UTC</span>: <span class="kw-2">&</span><span class="ident">str</span> <span class="op">=</span> <span class="string">r"Sun, 17 Apr 2022 16:21:54 +0000"</span>;
|
||||
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">BUILT_TIME_UTC</span>: <span class="kw-2">&</span><span class="ident">str</span> <span class="op">=</span> <span class="string">r"Sun, 17 Apr 2022 16:26:36 +0000"</span>;
|
||||
<span class="attribute">#[<span class="ident">doc</span><span class="op">=</span><span class="string">r#"The target architecture, given by `CARGO_CFG_TARGET_ARCH`."#</span>]</span>
|
||||
<span class="attribute">#[<span class="ident">allow</span>(<span class="ident">dead_code</span>)]</span>
|
||||
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">CFG_TARGET_ARCH</span>: <span class="kw-2">&</span><span class="ident">str</span> <span class="op">=</span> <span class="string">r"x86_64"</span>;
|
||||
|
@ -132,6 +132,14 @@
|
||||
<span id="127">127</span>
|
||||
<span id="128">128</span>
|
||||
<span id="129">129</span>
|
||||
<span id="130">130</span>
|
||||
<span id="131">131</span>
|
||||
<span id="132">132</span>
|
||||
<span id="133">133</span>
|
||||
<span id="134">134</span>
|
||||
<span id="135">135</span>
|
||||
<span id="136">136</span>
|
||||
<span id="137">137</span>
|
||||
</pre><pre class="rust"><code><span class="kw">use</span> <span class="ident">std::cell::RefCell</span>;
|
||||
|
||||
<span class="kw">use</span> <span class="ident">geom</span>::{<span class="ident">Circle</span>, <span class="ident">Distance</span>, <span class="ident">PolyLine</span>, <span class="ident">Pt2D</span>};
|
||||
@ -158,6 +166,7 @@
|
||||
<span class="ident">radius</span>: <span class="ident">Distance</span>,
|
||||
<span class="ident">color</span>: <span class="ident">Color</span>,
|
||||
},
|
||||
<span class="ident">Custom</span>(<span class="ident">Box</span><span class="op"><</span><span class="kw">dyn</span> <span class="ident">Fn</span>(<span class="kw-2">&mut</span> <span class="ident">GeomBatch</span>, <span class="ident">f64</span>)<span class="op">></span>),
|
||||
}
|
||||
|
||||
<span class="kw">impl</span> <span class="ident">Shape</span> {
|
||||
@ -183,6 +192,7 @@
|
||||
<span class="ident">Circle::new</span>(<span class="kw-2">*</span><span class="ident">center</span>, <span class="ident">thickness</span> <span class="op">*</span> <span class="kw-2">*</span><span class="ident">radius</span>).<span class="ident">to_polygon</span>(),
|
||||
);
|
||||
}
|
||||
<span class="ident">Shape::Custom</span>(<span class="ident">f</span>) => <span class="ident">f</span>(<span class="ident">batch</span>, <span class="ident">thickness</span>),
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -240,6 +250,12 @@
|
||||
});
|
||||
}
|
||||
|
||||
<span class="doccomment">/// Custom drawing code can add anything it wants to a batch, using a specified thickness in</span>
|
||||
<span class="doccomment">/// the [1.0, 5.0] range</span>
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">add_custom</span>(<span class="kw-2">&mut</span> <span class="self">self</span>, <span class="ident">f</span>: <span class="ident">Box</span><span class="op"><</span><span class="kw">dyn</span> <span class="ident">Fn</span>(<span class="kw-2">&mut</span> <span class="ident">GeomBatch</span>, <span class="ident">f64</span>)<span class="op">></span>) {
|
||||
<span class="self">self</span>.<span class="ident">shapes</span>.<span class="ident">push</span>(<span class="ident">Shape::Custom</span>(<span class="ident">f</span>));
|
||||
}
|
||||
|
||||
<span class="comment">// TODO We might take EventCtx here to upload something to the GPU.</span>
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">build</span>(<span class="self">self</span>) -> <span class="ident">DrawUnzoomedShapes</span> {
|
||||
<span class="ident">DrawUnzoomedShapes</span> {
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -4,5 +4,5 @@
|
||||
</nav>
|
||||
<nav class="sidebar"><a class="sidebar-logo" href="../../../widgetry/index.html"><div class="logo-container"><img class="rust-logo" src="../../../rust-logo.svg" alt="logo"></div>
|
||||
</a><div class="sidebar-elems"><h2 class="location"><a href="index.html">In widgetry::mapspace::unzoomed</a></h2><div id="sidebar-vars" data-name="discretize_zoom" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../../../widgetry/index.html"><img class="rust-logo" src="../../../rust-logo.svg" alt="logo"></a><nav class="sub"><div class="theme-picker hidden"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="22" height="22" alt="Pick another theme!" src="../../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><form class="search-form"><div class="search-container"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../../wheel.svg"></a></div></form></nav></div><section id="main-content" class="content"><div class="main-heading">
|
||||
<h1 class="fqn"><span class="in-band">Function <a href="../../index.html">widgetry</a>::<wbr><a href="../index.html">mapspace</a>::<wbr><a href="index.html">unzoomed</a>::<wbr><a class="fn" href="#">discretize_zoom</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span></h1><span class="out-of-band"><a class="srclink" href="../../../src/widgetry/mapspace/unzoomed.rs.html#122-129">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="docblock item-decl"><pre class="rust fn"><code>fn discretize_zoom(zoom: <a class="primitive" href="https://doc.rust-lang.org/1.60.0/std/primitive.f64.html">f64</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.60.0/std/primitive.tuple.html">(</a><a class="primitive" href="https://doc.rust-lang.org/1.60.0/std/primitive.f64.html">f64</a>, <a class="primitive" href="https://doc.rust-lang.org/1.60.0/std/primitive.usize.html">usize</a><a class="primitive" href="https://doc.rust-lang.org/1.60.0/std/primitive.tuple.html">)</a></code></pre></div></section><section id="search" class="content hidden"></section></div></main><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="widgetry" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.60.0 (7737e0b5c 2022-04-04)" ></div>
|
||||
<h1 class="fqn"><span class="in-band">Function <a href="../../index.html">widgetry</a>::<wbr><a href="../index.html">mapspace</a>::<wbr><a href="index.html">unzoomed</a>::<wbr><a class="fn" href="#">discretize_zoom</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span></h1><span class="out-of-band"><a class="srclink" href="../../../src/widgetry/mapspace/unzoomed.rs.html#130-137">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><div class="docblock item-decl"><pre class="rust fn"><code>fn discretize_zoom(zoom: <a class="primitive" href="https://doc.rust-lang.org/1.60.0/std/primitive.f64.html">f64</a>) -> <a class="primitive" href="https://doc.rust-lang.org/1.60.0/std/primitive.tuple.html">(</a><a class="primitive" href="https://doc.rust-lang.org/1.60.0/std/primitive.f64.html">f64</a>, <a class="primitive" href="https://doc.rust-lang.org/1.60.0/std/primitive.usize.html">usize</a><a class="primitive" href="https://doc.rust-lang.org/1.60.0/std/primitive.tuple.html">)</a></code></pre></div></section><section id="search" class="content hidden"></section></div></main><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="widgetry" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.60.0 (7737e0b5c 2022-04-04)" ></div>
|
||||
</body></html>
|
@ -4,7 +4,7 @@
|
||||
</nav>
|
||||
<nav class="sidebar"><a class="sidebar-logo" href="../../../widgetry/index.html"><div class="logo-container"><img class="rust-logo" src="../../../rust-logo.svg" alt="logo"></div>
|
||||
</a><h2 class="location"><a href="#">Module unzoomed</a></h2><div class="sidebar-elems"><section><div class="block"><ul><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li><li><a href="#functions">Functions</a></li></ul></div></section><div id="sidebar-vars" data-name="unzoomed" data-ty="mod" data-relpath="./"></div><script defer src="./sidebar-items.js"></script></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../../../widgetry/index.html"><img class="rust-logo" src="../../../rust-logo.svg" alt="logo"></a><nav class="sub"><div class="theme-picker hidden"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="22" height="22" alt="Pick another theme!" src="../../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><form class="search-form"><div class="search-container"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../../wheel.svg"></a></div></form></nav></div><section id="main-content" class="content"><div class="main-heading">
|
||||
<h1 class="fqn"><span class="in-band">Module <a href="../../index.html">widgetry</a>::<wbr><a href="../index.html">mapspace</a>::<wbr><a class="mod" href="#">unzoomed</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span></h1><span class="out-of-band"><a class="srclink" href="../../../src/widgetry/mapspace/unzoomed.rs.html#1-129">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><h2 id="structs" class="small-section-header"><a href="#structs">Structs</a></h2>
|
||||
<h1 class="fqn"><span class="in-band">Module <a href="../../index.html">widgetry</a>::<wbr><a href="../index.html">mapspace</a>::<wbr><a class="mod" href="#">unzoomed</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span></h1><span class="out-of-band"><a class="srclink" href="../../../src/widgetry/mapspace/unzoomed.rs.html#1-137">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span></div><h2 id="structs" class="small-section-header"><a href="#structs">Structs</a></h2>
|
||||
<div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.DrawUnzoomedShapes.html" title="widgetry::mapspace::unzoomed::DrawUnzoomedShapes struct">DrawUnzoomedShapes</a></div><div class="item-right docblock-short"><p>Draw <code>Circles</code> and <code>PolyLines</code> in map-space that scale their size as the canvas is zoomed. The
|
||||
goal is to appear with roughly constant screen-space size, but for the moment, this is
|
||||
approximated by discretizing into 10 buckets. The scaling only happens when the canvas is
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user