This commit is contained in:
dabreegster 2020-12-26 21:46:32 +00:00
parent 88e34a7baa
commit c903635bdf
19 changed files with 136 additions and 112 deletions

View File

@ -3,4 +3,4 @@
<link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../fifteen_min/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><p class='location'>Crate fifteen_min</p><div class='block version'><p>Version 0.1.0</p></div><a id='all-types' href='index.html'><p>Back to index</p></a></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><span class="help-button">?</span> <link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../fifteen_min/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><p class='location'>Crate fifteen_min</p><div class='block version'><p>Version 0.1.0</p></div><a id='all-types' href='index.html'><p>Back to index</p></a></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><span class="help-button">?</span>
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span> <a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span>
</span> </span>
<span class='in-band'>List of all items</span></h1><h3 id='Structs'>Structs</h3><ul class='structs docblock'><li><a href='isochrone/struct.Isochrone.html'>isochrone::Isochrone</a></li><li><a href='viewer/struct.Entry.html'>viewer::Entry</a></li><li><a href='viewer/struct.ExploreAmenities.html'>viewer::ExploreAmenities</a></li><li><a href='viewer/struct.HoverOnBuilding.html'>viewer::HoverOnBuilding</a></li><li><a href='viewer/struct.Viewer.html'>viewer::Viewer</a></li></ul><h3 id='Enums'>Enums</h3><ul class='enums docblock'><li><a href='isochrone/enum.Options.html'>isochrone::Options</a></li></ul><h3 id='Functions'>Functions</h3><ul class='functions docblock'><li><a href='isochrone/fn.draw_isochrone.html'>isochrone::draw_isochrone</a></li><li><a href='fn.main.html'>main</a></li><li><a href='viewer/fn.build_panel.html'>viewer::build_panel</a></li><li><a href='viewer/fn.draw_star.html'>viewer::draw_star</a></li><li><a href='viewer/fn.options_from_controls.html'>viewer::options_from_controls</a></li><li><a href='viewer/fn.options_to_controls.html'>viewer::options_to_controls</a></li></ul><h3 id='Typedefs'>Typedefs</h3><ul class='typedefs docblock'><li><a href='type.App.html'>App</a></li><li><a href='viewer/type.HoverKey.html'>viewer::HoverKey</a></li></ul></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../";window.currentCrate = "fifteen_min";</script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html> <span class='in-band'>List of all items</span></h1><h3 id='Structs'>Structs</h3><ul class='structs docblock'><li><a href='isochrone/struct.Isochrone.html'>isochrone::Isochrone</a></li><li><a href='viewer/struct.Entry.html'>viewer::Entry</a></li><li><a href='viewer/struct.ExploreAmenities.html'>viewer::ExploreAmenities</a></li><li><a href='viewer/struct.HoverOnBuilding.html'>viewer::HoverOnBuilding</a></li><li><a href='viewer/struct.Viewer.html'>viewer::Viewer</a></li></ul><h3 id='Enums'>Enums</h3><ul class='enums docblock'><li><a href='isochrone/enum.Options.html'>isochrone::Options</a></li></ul><h3 id='Functions'>Functions</h3><ul class='functions docblock'><li><a href='fn.main.html'>main</a></li><li><a href='viewer/fn.build_panel.html'>viewer::build_panel</a></li><li><a href='viewer/fn.draw_star.html'>viewer::draw_star</a></li><li><a href='viewer/fn.options_from_controls.html'>viewer::options_from_controls</a></li><li><a href='viewer/fn.options_to_controls.html'>viewer::options_to_controls</a></li></ul><h3 id='Typedefs'>Typedefs</h3><ul class='typedefs docblock'><li><a href='type.App.html'>App</a></li><li><a href='viewer/type.HoverKey.html'>viewer::HoverKey</a></li></ul></section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../";window.currentCrate = "fifteen_min";</script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html>

View File

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

View File

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

View File

@ -1 +1 @@
initSidebarItems({"enum":[["Options","The constraints on how we're moving."]],"fn":[["draw_isochrone",""]],"struct":[["Isochrone","Represents the area reachable from a single building."]]}); initSidebarItems({"enum":[["Options","The constraints on how we're moving."]],"struct":[["Isochrone","Represents the area reachable from a single building."]]});

File diff suppressed because one or more lines are too long

View File

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

View File

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

View File

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

View File

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

View File

@ -1,7 +1,7 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `viewer` mod in crate `fifteen_min`."><meta name="keywords" content="rust, rustlang, rust-lang, viewer"><title>fifteen_min::viewer - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg"> <!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `viewer` mod in crate `fifteen_min`."><meta name="keywords" content="rust, rustlang, rust-lang, viewer"><title>fifteen_min::viewer - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"> <link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../fifteen_min/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class='location'>Module viewer</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li><li><a href="#functions">Functions</a></li><li><a href="#types">Type Definitions</a></li></ul></div><p class='location'><a href='../index.html'>fifteen_min</a></p><script>window.sidebarCurrent = {name: 'viewer', ty: 'mod', relpath: '../'};</script><script defer src="../sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><span class="help-button">?</span> <link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../fifteen_min/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class='location'>Module viewer</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li><li><a href="#functions">Functions</a></li><li><a href="#types">Type Definitions</a></li></ul></div><p class='location'><a href='../index.html'>fifteen_min</a></p><script>window.sidebarCurrent = {name: 'viewer', ty: 'mod', relpath: '../'};</script><script defer src="../sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><span class="help-button">?</span>
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../src/fifteen_min/viewer.rs.html#1-473' title='goto source code'>[src]</a></span><span class='in-band'>Module <a href='../index.html'>fifteen_min</a>::<wbr><a class="mod" href=''>viewer</a></span></h1><div class='docblock'><p>This is a tool to experiment with the concept of 15-minute neighborhoods. Can you access your <a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../src/fifteen_min/viewer.rs.html#1-486' title='goto source code'>[src]</a></span><span class='in-band'>Module <a href='../index.html'>fifteen_min</a>::<wbr><a class="mod" href=''>viewer</a></span></h1><div class='docblock'><p>This is a tool to experiment with the concept of 15-minute neighborhoods. Can you access your
daily needs (like groceries, a cafe, a library) within a 15-minute walk, bike ride, or public daily needs (like groceries, a cafe, a library) within a 15-minute walk, bike ride, or public
transit ride of your home?</p> transit ride of your home?</p>
<p>See https://github.com/dabreegster/abstreet/issues/393 for more context.</p> <p>See https://github.com/dabreegster/abstreet/issues/393 for more context.</p>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -9,8 +9,8 @@
}</pre></div><div class='docblock'><p>This is the UI state for exploring the isochrone/walkshed from a single building.</p> }</pre></div><div class='docblock'><p>This is the UI state for exploring the isochrone/walkshed from a single building.</p>
</div><h2 id='fields' class='fields small-section-header'> </div><h2 id='fields' class='fields small-section-header'>
Fields<a href='#fields' class='anchor'></a></h2><span id="structfield.panel" class="structfield small-section-header"><a href="#structfield.panel" class="anchor field"></a><code>panel: Panel</code></span><span id="structfield.highlight_start" class="structfield small-section-header"><a href="#structfield.highlight_start" class="anchor field"></a><code>highlight_start: Drawable</code></span><span id="structfield.isochrone" class="structfield small-section-header"><a href="#structfield.isochrone" class="anchor field"></a><code>isochrone: <a class="struct" href="../../fifteen_min/isochrone/struct.Isochrone.html" title="struct fifteen_min::isochrone::Isochrone">Isochrone</a></code></span><span id="structfield.hovering_on_bldg" class="structfield small-section-header"><a href="#structfield.hovering_on_bldg" class="anchor field"></a><code>hovering_on_bldg: <a class="struct" href="../../map_gui/simple_app/struct.Cached.html" title="struct map_gui::simple_app::Cached">Cached</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="struct" href="../../map_model/objects/building/struct.BuildingID.html" title="struct map_model::objects::building::BuildingID">BuildingID</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>, <a class="struct" href="../../fifteen_min/viewer/struct.HoverOnBuilding.html" title="struct fifteen_min::viewer::HoverOnBuilding">HoverOnBuilding</a>&gt;</code></span><h2 id='implementations' class='small-section-header'>Implementations<a href='#implementations' class='anchor'></a></h2><h3 id='impl' class='impl'><code class='in-band'>impl <a class="struct" href="../../fifteen_min/viewer/struct.Viewer.html" title="struct fifteen_min::viewer::Viewer">Viewer</a></code><a href='#impl' class='anchor'></a><a class='srclink' href='../../src/fifteen_min/viewer.rs.html#34-56' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.random_start' class="method"><code>pub fn <a href='#method.random_start' class='fnname'>random_start</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut EventCtx&lt;'_&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;app: &amp;<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>&gt;<br>) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;dyn State&lt;<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>&gt;&gt;&gt;</code><a class='srclink' href='../../src/fifteen_min/viewer.rs.html#36-40' title='goto source code'>[src]</a></h4><div class='docblock'><p>Start with a random building</p> Fields<a href='#fields' class='anchor'></a></h2><span id="structfield.panel" class="structfield small-section-header"><a href="#structfield.panel" class="anchor field"></a><code>panel: Panel</code></span><span id="structfield.highlight_start" class="structfield small-section-header"><a href="#structfield.highlight_start" class="anchor field"></a><code>highlight_start: Drawable</code></span><span id="structfield.isochrone" class="structfield small-section-header"><a href="#structfield.isochrone" class="anchor field"></a><code>isochrone: <a class="struct" href="../../fifteen_min/isochrone/struct.Isochrone.html" title="struct fifteen_min::isochrone::Isochrone">Isochrone</a></code></span><span id="structfield.hovering_on_bldg" class="structfield small-section-header"><a href="#structfield.hovering_on_bldg" class="anchor field"></a><code>hovering_on_bldg: <a class="struct" href="../../map_gui/simple_app/struct.Cached.html" title="struct map_gui::simple_app::Cached">Cached</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="struct" href="../../map_model/objects/building/struct.BuildingID.html" title="struct map_model::objects::building::BuildingID">BuildingID</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>, <a class="struct" href="../../fifteen_min/viewer/struct.HoverOnBuilding.html" title="struct fifteen_min::viewer::HoverOnBuilding">HoverOnBuilding</a>&gt;</code></span><h2 id='implementations' class='small-section-header'>Implementations<a href='#implementations' class='anchor'></a></h2><h3 id='impl' class='impl'><code class='in-band'>impl <a class="struct" href="../../fifteen_min/viewer/struct.Viewer.html" title="struct fifteen_min::viewer::Viewer">Viewer</a></code><a href='#impl' class='anchor'></a><a class='srclink' href='../../src/fifteen_min/viewer.rs.html#34-56' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.random_start' class="method"><code>pub fn <a href='#method.random_start' class='fnname'>random_start</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut EventCtx&lt;'_&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;app: &amp;<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>&gt;<br>) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;dyn State&lt;<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>&gt;&gt;&gt;</code><a class='srclink' href='../../src/fifteen_min/viewer.rs.html#36-40' title='goto source code'>[src]</a></h4><div class='docblock'><p>Start with a random building</p>
</div><h4 id='method.new' class="method"><code>pub fn <a href='#method.new' class='fnname'>new</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut EventCtx&lt;'_&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;app: &amp;<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;start: <a class="struct" href="../../map_model/objects/building/struct.BuildingID.html" title="struct map_model::objects::building::BuildingID">BuildingID</a><br>) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;dyn State&lt;<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>&gt;&gt;&gt;</code><a class='srclink' href='../../src/fifteen_min/viewer.rs.html#42-55' title='goto source code'>[src]</a></h4></div><h2 id='trait-implementations' class='small-section-header'>Trait Implementations<a href='#trait-implementations' class='anchor'></a></h2><div id='trait-implementations-list'><h3 id='impl-State%3CSimpleApp%3C()%3E%3E' class='impl'><code class='in-band'>impl State&lt;<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>&gt;&gt; for <a class="struct" href="../../fifteen_min/viewer/struct.Viewer.html" title="struct fifteen_min::viewer::Viewer">Viewer</a></code><a href='#impl-State%3CSimpleApp%3C()%3E%3E' class='anchor'></a><a class='srclink' href='../../src/fifteen_min/viewer.rs.html#58-161' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.event' class="method hidden"><code>fn <a href='#method.event' class='fnname'>event</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut EventCtx&lt;'_&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;app: &amp;mut <a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>&gt;<br>) -&gt; Transition&lt;<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>&gt;&gt;</code><a class='srclink' href='../../src/fifteen_min/viewer.rs.html#59-150' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Respond to a UI event, such as input or time passing.</p> </div><h4 id='method.new' class="method"><code>pub fn <a href='#method.new' class='fnname'>new</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut EventCtx&lt;'_&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;app: &amp;<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;start: <a class="struct" href="../../map_model/objects/building/struct.BuildingID.html" title="struct map_model::objects::building::BuildingID">BuildingID</a><br>) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;dyn State&lt;<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>&gt;&gt;&gt;</code><a class='srclink' href='../../src/fifteen_min/viewer.rs.html#42-55' title='goto source code'>[src]</a></h4></div><h2 id='trait-implementations' class='small-section-header'>Trait Implementations<a href='#trait-implementations' class='anchor'></a></h2><div id='trait-implementations-list'><h3 id='impl-State%3CSimpleApp%3C()%3E%3E' class='impl'><code class='in-band'>impl State&lt;<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>&gt;&gt; for <a class="struct" href="../../fifteen_min/viewer/struct.Viewer.html" title="struct fifteen_min::viewer::Viewer">Viewer</a></code><a href='#impl-State%3CSimpleApp%3C()%3E%3E' class='anchor'></a><a class='srclink' href='../../src/fifteen_min/viewer.rs.html#58-162' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.event' class="method hidden"><code>fn <a href='#method.event' class='fnname'>event</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self, <br>&nbsp;&nbsp;&nbsp;&nbsp;ctx: &amp;mut EventCtx&lt;'_&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;app: &amp;mut <a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>&gt;<br>) -&gt; Transition&lt;<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>&gt;&gt;</code><a class='srclink' href='../../src/fifteen_min/viewer.rs.html#59-151' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Respond to a UI event, such as input or time passing.</p>
</div><h4 id='method.draw' class="method hidden"><code>fn <a href='#method.draw' class='fnname'>draw</a>(&amp;self, g: &amp;mut GfxCtx&lt;'_&gt;, _: &amp;<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>&gt;)</code><a class='srclink' href='../../src/fifteen_min/viewer.rs.html#152-160' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Draw</p> </div><h4 id='method.draw' class="method hidden"><code>fn <a href='#method.draw' class='fnname'>draw</a>(&amp;self, g: &amp;mut GfxCtx&lt;'_&gt;, _: &amp;<a class="struct" href="../../map_gui/simple_app/struct.SimpleApp.html" title="struct map_gui::simple_app::SimpleApp">SimpleApp</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>&gt;)</code><a class='srclink' href='../../src/fifteen_min/viewer.rs.html#153-161' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Draw</p>
</div><h4 id='method.draw_baselayer' class="method hidden"><code>fn <a href='#method.draw_baselayer' class='fnname'>draw_baselayer</a>(&amp;self) -&gt; DrawBaselayer</code></h4><div class='docblock hidden'><p>Specifies what to draw before draw()</p> </div><h4 id='method.draw_baselayer' class="method hidden"><code>fn <a href='#method.draw_baselayer' class='fnname'>draw_baselayer</a>(&amp;self) -&gt; DrawBaselayer</code></h4><div class='docblock hidden'><p>Specifies what to draw before draw()</p>
</div><h4 id='method.on_destroy' class="method hidden"><code>fn <a href='#method.on_destroy' class='fnname'>on_destroy</a>(&amp;mut self, &amp;mut EventCtx&lt;'_&gt;, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>A)</code></h4><div class='docblock hidden'><p>Before this state is popped or replaced, call this.</p> </div><h4 id='method.on_destroy' class="method hidden"><code>fn <a href='#method.on_destroy' class='fnname'>on_destroy</a>(&amp;mut self, &amp;mut EventCtx&lt;'_&gt;, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>A)</code></h4><div class='docblock hidden'><p>Before this state is popped or replaced, call this.</p>
</div></div></div><h2 id='synthetic-implementations' class='small-section-header'>Auto Trait Implementations<a href='#synthetic-implementations' class='anchor'></a></h2><div id='synthetic-implementations-list'><h3 id='impl-RefUnwindSafe' class='impl'><code class='in-band'>impl !<a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="../../fifteen_min/viewer/struct.Viewer.html" title="struct fifteen_min::viewer::Viewer">Viewer</a></code><a href='#impl-RefUnwindSafe' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Send' class='impl'><code class='in-band'>impl !<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="../../fifteen_min/viewer/struct.Viewer.html" title="struct fifteen_min::viewer::Viewer">Viewer</a></code><a href='#impl-Send' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Sync' class='impl'><code class='in-band'>impl !<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="../../fifteen_min/viewer/struct.Viewer.html" title="struct fifteen_min::viewer::Viewer">Viewer</a></code><a href='#impl-Sync' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Unpin' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="../../fifteen_min/viewer/struct.Viewer.html" title="struct fifteen_min::viewer::Viewer">Viewer</a></code><a href='#impl-Unpin' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-UnwindSafe' class='impl'><code class='in-band'>impl !<a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="../../fifteen_min/viewer/struct.Viewer.html" title="struct fifteen_min::viewer::Viewer">Viewer</a></code><a href='#impl-UnwindSafe' class='anchor'></a></h3><div class='impl-items'></div></div><h2 id='blanket-implementations' class='small-section-header'>Blanket Implementations<a href='#blanket-implementations' class='anchor'></a></h2><div id='blanket-implementations-list'><h3 id='impl-Any' class='impl'><code class='in-band'>impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href='#impl-Any' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#108-112' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.type_id' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id' class='fnname'>type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#109-111' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p> </div></div></div><h2 id='synthetic-implementations' class='small-section-header'>Auto Trait Implementations<a href='#synthetic-implementations' class='anchor'></a></h2><div id='synthetic-implementations-list'><h3 id='impl-RefUnwindSafe' class='impl'><code class='in-band'>impl !<a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="../../fifteen_min/viewer/struct.Viewer.html" title="struct fifteen_min::viewer::Viewer">Viewer</a></code><a href='#impl-RefUnwindSafe' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Send' class='impl'><code class='in-band'>impl !<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="../../fifteen_min/viewer/struct.Viewer.html" title="struct fifteen_min::viewer::Viewer">Viewer</a></code><a href='#impl-Send' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Sync' class='impl'><code class='in-band'>impl !<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="../../fifteen_min/viewer/struct.Viewer.html" title="struct fifteen_min::viewer::Viewer">Viewer</a></code><a href='#impl-Sync' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-Unpin' class='impl'><code class='in-band'>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="../../fifteen_min/viewer/struct.Viewer.html" title="struct fifteen_min::viewer::Viewer">Viewer</a></code><a href='#impl-Unpin' class='anchor'></a></h3><div class='impl-items'></div><h3 id='impl-UnwindSafe' class='impl'><code class='in-band'>impl !<a class="trait" href="https://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="../../fifteen_min/viewer/struct.Viewer.html" title="struct fifteen_min::viewer::Viewer">Viewer</a></code><a href='#impl-UnwindSafe' class='anchor'></a></h3><div class='impl-items'></div></div><h2 id='blanket-implementations' class='small-section-header'>Blanket Implementations<a href='#blanket-implementations' class='anchor'></a></h2><div id='blanket-implementations-list'><h3 id='impl-Any' class='impl'><code class='in-band'>impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></code><a href='#impl-Any' class='anchor'></a><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#108-112' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.type_id' class="method hidden"><code>fn <a href='https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id' class='fnname'>type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></code><a class='srclink' href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#109-111' title='goto source code'>[src]</a></h4><div class='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>

View File

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

View File

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

File diff suppressed because one or more lines are too long

View File

@ -180,6 +180,7 @@
<span id="177">177</span> <span id="177">177</span>
<span id="178">178</span> <span id="178">178</span>
<span id="179">179</span> <span id="179">179</span>
<span id="180">180</span>
</pre><div class="example-wrap"><pre class="rust "> </pre><div class="example-wrap"><pre class="rust ">
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">collections</span>::{<span class="ident">HashMap</span>, <span class="ident">HashSet</span>}; <span class="kw">use</span> <span class="ident">std</span>::<span class="ident">collections</span>::{<span class="ident">HashMap</span>, <span class="ident">HashSet</span>};
@ -232,7 +233,6 @@
<span class="ident">PathConstraints</span>::<span class="ident">Bike</span>, <span class="ident">PathConstraints</span>::<span class="ident">Bike</span>,
), ),
}; };
<span class="kw">let</span> <span class="ident">draw</span> <span class="op">=</span> <span class="ident">draw_isochrone</span>(<span class="ident">app</span>, <span class="kw-2">&amp;</span><span class="ident">time_to_reach_building</span>).<span class="ident">upload</span>(<span class="ident">ctx</span>);
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">amenities_reachable</span> <span class="op">=</span> <span class="ident">MultiMap</span>::<span class="ident">new</span>(); <span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">amenities_reachable</span> <span class="op">=</span> <span class="ident">MultiMap</span>::<span class="ident">new</span>();
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">population</span> <span class="op">=</span> <span class="number">0</span>; <span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">population</span> <span class="op">=</span> <span class="number">0</span>;
@ -264,15 +264,17 @@
} }
} }
<span class="ident">Isochrone</span> { <span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">i</span> <span class="op">=</span> <span class="ident">Isochrone</span> {
<span class="ident">start</span>, <span class="ident">start</span>,
<span class="ident">options</span>, <span class="ident">options</span>,
<span class="ident">draw</span>, <span class="ident">draw</span>: <span class="ident">Drawable</span>::<span class="ident">empty</span>(<span class="ident">ctx</span>),
<span class="ident">time_to_reach_building</span>, <span class="ident">time_to_reach_building</span>,
<span class="ident">amenities_reachable</span>, <span class="ident">amenities_reachable</span>,
<span class="ident">population</span>, <span class="ident">population</span>,
<span class="ident">onstreet_parking_spots</span>, <span class="ident">onstreet_parking_spots</span>,
} };
<span class="ident">i</span>.<span class="ident">draw</span> <span class="op">=</span> <span class="ident">i</span>.<span class="ident">draw_isochrone</span>(<span class="ident">app</span>).<span class="ident">upload</span>(<span class="ident">ctx</span>);
<span class="ident">i</span>
} }
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">path_to</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">map</span>: <span class="kw-2">&amp;</span><span class="ident">Map</span>, <span class="ident">to</span>: <span class="ident">BuildingID</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="prelude-ty">Option</span><span class="op">&lt;</span><span class="ident">Path</span><span class="op">&gt;</span> { <span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">path_to</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">map</span>: <span class="kw-2">&amp;</span><span class="ident">Map</span>, <span class="ident">to</span>: <span class="ident">BuildingID</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="prelude-ty">Option</span><span class="op">&lt;</span><span class="ident">Path</span><span class="op">&gt;</span> {
@ -292,73 +294,73 @@
)<span class="question-mark">?</span>; )<span class="question-mark">?</span>;
<span class="ident">map</span>.<span class="ident">pathfind</span>(<span class="ident">req</span>).<span class="ident">ok</span>() <span class="ident">map</span>.<span class="ident">pathfind</span>(<span class="ident">req</span>).<span class="ident">ok</span>()
} }
}
<span class="kw">fn</span> <span class="ident">draw_isochrone</span>(<span class="ident">app</span>: <span class="kw-2">&amp;</span><span class="ident">App</span>, <span class="ident">time_to_reach_building</span>: <span class="kw-2">&amp;</span><span class="ident">HashMap</span><span class="op">&lt;</span><span class="ident">BuildingID</span>, <span class="ident">Duration</span><span class="op">&gt;</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">GeomBatch</span> { <span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">draw_isochrone</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">app</span>: <span class="kw-2">&amp;</span><span class="ident">App</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">GeomBatch</span> {
<span class="comment">// To generate the polygons covering areas between 0-5 mins, 5-10 mins, etc, we have to feed</span> <span class="comment">// To generate the polygons covering areas between 0-5 mins, 5-10 mins, etc, we have to feed</span>
<span class="comment">// in a 2D grid of costs. Use a 100x100 meter resolution.</span> <span class="comment">// in a 2D grid of costs. Use a 100x100 meter resolution.</span>
<span class="kw">let</span> <span class="ident">bounds</span> <span class="op">=</span> <span class="ident">app</span>.<span class="ident">map</span>.<span class="ident">get_bounds</span>(); <span class="kw">let</span> <span class="ident">bounds</span> <span class="op">=</span> <span class="ident">app</span>.<span class="ident">map</span>.<span class="ident">get_bounds</span>();
<span class="kw">let</span> <span class="ident">resolution_m</span> <span class="op">=</span> <span class="number">100.0</span>; <span class="kw">let</span> <span class="ident">resolution_m</span> <span class="op">=</span> <span class="number">100.0</span>;
<span class="comment">// The costs we&#39;re storing are currenly durations, but the contour crate needs f64, so</span> <span class="comment">// The costs we&#39;re storing are currenly durations, but the contour crate needs f64, so</span>
<span class="comment">// just store the number of seconds.</span> <span class="comment">// just store the number of seconds.</span>
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">grid</span>: <span class="ident">Grid</span><span class="op">&lt;</span><span class="ident">f64</span><span class="op">&gt;</span> <span class="op">=</span> <span class="ident">Grid</span>::<span class="ident">new</span>( <span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">grid</span>: <span class="ident">Grid</span><span class="op">&lt;</span><span class="ident">f64</span><span class="op">&gt;</span> <span class="op">=</span> <span class="ident">Grid</span>::<span class="ident">new</span>(
(<span class="ident">bounds</span>.<span class="ident">width</span>() <span class="op">/</span> <span class="ident">resolution_m</span>).<span class="ident">ceil</span>() <span class="kw">as</span> <span class="ident">usize</span>, (<span class="ident">bounds</span>.<span class="ident">width</span>() <span class="op">/</span> <span class="ident">resolution_m</span>).<span class="ident">ceil</span>() <span class="kw">as</span> <span class="ident">usize</span>,
(<span class="ident">bounds</span>.<span class="ident">height</span>() <span class="op">/</span> <span class="ident">resolution_m</span>).<span class="ident">ceil</span>() <span class="kw">as</span> <span class="ident">usize</span>, (<span class="ident">bounds</span>.<span class="ident">height</span>() <span class="op">/</span> <span class="ident">resolution_m</span>).<span class="ident">ceil</span>() <span class="kw">as</span> <span class="ident">usize</span>,
<span class="number">0.0</span>, <span class="number">0.0</span>,
);
<span class="comment">// Calculate the cost from the start building to every other building in the map</span>
<span class="kw">for</span> (<span class="ident">b</span>, <span class="ident">cost</span>) <span class="kw">in</span> <span class="ident">time_to_reach_building</span> {
<span class="comment">// What grid cell does the building belong to?</span>
<span class="kw">let</span> <span class="ident">pt</span> <span class="op">=</span> <span class="ident">app</span>.<span class="ident">map</span>.<span class="ident">get_b</span>(<span class="kw-2">*</span><span class="ident">b</span>).<span class="ident">polygon</span>.<span class="ident">center</span>();
<span class="kw">let</span> <span class="ident">idx</span> <span class="op">=</span> <span class="ident">grid</span>.<span class="ident">idx</span>(
((<span class="ident">pt</span>.<span class="ident">x</span>() <span class="op">-</span> <span class="ident">bounds</span>.<span class="ident">min_x</span>) <span class="op">/</span> <span class="ident">resolution_m</span>) <span class="kw">as</span> <span class="ident">usize</span>,
((<span class="ident">pt</span>.<span class="ident">y</span>() <span class="op">-</span> <span class="ident">bounds</span>.<span class="ident">min_y</span>) <span class="op">/</span> <span class="ident">resolution_m</span>) <span class="kw">as</span> <span class="ident">usize</span>,
); );
<span class="comment">// Don&#39;t add! If two buildings map to the same cell, we should pick a finer resolution.</span>
<span class="ident">grid</span>.<span class="ident">data</span>[<span class="ident">idx</span>] <span class="op">=</span> <span class="ident">cost</span>.<span class="ident">inner_seconds</span>();
}
<span class="comment">// Generate polygons covering the contour line where the cost in the grid crosses these</span> <span class="comment">// Calculate the cost from the start building to every other building in the map</span>
<span class="comment">// threshold values.</span> <span class="kw">for</span> (<span class="ident">b</span>, <span class="ident">cost</span>) <span class="kw">in</span> <span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">time_to_reach_building</span> {
<span class="kw">let</span> <span class="ident">thresholds</span> <span class="op">=</span> <span class="macro">vec</span><span class="macro">!</span>[ <span class="comment">// What grid cell does the building belong to?</span>
<span class="number">0.1</span>, <span class="kw">let</span> <span class="ident">pt</span> <span class="op">=</span> <span class="ident">app</span>.<span class="ident">map</span>.<span class="ident">get_b</span>(<span class="kw-2">*</span><span class="ident">b</span>).<span class="ident">polygon</span>.<span class="ident">center</span>();
<span class="ident">Duration</span>::<span class="ident">minutes</span>(<span class="number">5</span>).<span class="ident">inner_seconds</span>(), <span class="kw">let</span> <span class="ident">idx</span> <span class="op">=</span> <span class="ident">grid</span>.<span class="ident">idx</span>(
<span class="ident">Duration</span>::<span class="ident">minutes</span>(<span class="number">10</span>).<span class="ident">inner_seconds</span>(), ((<span class="ident">pt</span>.<span class="ident">x</span>() <span class="op">-</span> <span class="ident">bounds</span>.<span class="ident">min_x</span>) <span class="op">/</span> <span class="ident">resolution_m</span>) <span class="kw">as</span> <span class="ident">usize</span>,
<span class="ident">Duration</span>::<span class="ident">minutes</span>(<span class="number">15</span>).<span class="ident">inner_seconds</span>(), ((<span class="ident">pt</span>.<span class="ident">y</span>() <span class="op">-</span> <span class="ident">bounds</span>.<span class="ident">min_y</span>) <span class="op">/</span> <span class="ident">resolution_m</span>) <span class="kw">as</span> <span class="ident">usize</span>,
]; );
<span class="comment">// And color the polygon for each threshold</span> <span class="comment">// Don&#39;t add! If two buildings map to the same cell, we should pick a finer resolution.</span>
<span class="kw">let</span> <span class="ident">colors</span> <span class="op">=</span> <span class="macro">vec</span><span class="macro">!</span>[ <span class="ident">grid</span>.<span class="ident">data</span>[<span class="ident">idx</span>] <span class="op">=</span> <span class="ident">cost</span>.<span class="ident">inner_seconds</span>();
<span class="ident">Color</span>::<span class="ident">GREEN</span>.<span class="ident">alpha</span>(<span class="number">0.5</span>),
<span class="ident">Color</span>::<span class="ident">ORANGE</span>.<span class="ident">alpha</span>(<span class="number">0.5</span>),
<span class="ident">Color</span>::<span class="ident">RED</span>.<span class="ident">alpha</span>(<span class="number">0.5</span>),
];
<span class="kw">let</span> <span class="ident">smooth</span> <span class="op">=</span> <span class="bool-val">false</span>;
<span class="kw">let</span> <span class="ident">c</span> <span class="op">=</span> <span class="ident">contour</span>::<span class="ident">ContourBuilder</span>::<span class="ident">new</span>(<span class="ident">grid</span>.<span class="ident">width</span> <span class="kw">as</span> <span class="ident">u32</span>, <span class="ident">grid</span>.<span class="ident">height</span> <span class="kw">as</span> <span class="ident">u32</span>, <span class="ident">smooth</span>);
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">batch</span> <span class="op">=</span> <span class="ident">GeomBatch</span>::<span class="ident">new</span>();
<span class="comment">// The last feature returned will be larger than the last threshold value. We don&#39;t want to</span>
<span class="comment">// display that at all. zip() will omit this last pair, since colors.len() ==</span>
<span class="comment">// thresholds.len() - 1.</span>
<span class="comment">//</span>
<span class="comment">// TODO Actually, this still isn&#39;t working. I think each polygon is everything &gt; the</span>
<span class="comment">// threshold, not everything between two thresholds?</span>
<span class="kw">for</span> (<span class="ident">feature</span>, <span class="ident">color</span>) <span class="kw">in</span> <span class="ident">c</span>
.<span class="ident">contours</span>(<span class="kw-2">&amp;</span><span class="ident">grid</span>.<span class="ident">data</span>, <span class="kw-2">&amp;</span><span class="ident">thresholds</span>)
.<span class="ident">unwrap</span>()
.<span class="ident">into_iter</span>()
.<span class="ident">zip</span>(<span class="ident">colors</span>)
{
<span class="kw">match</span> <span class="ident">feature</span>.<span class="ident">geometry</span>.<span class="ident">unwrap</span>().<span class="ident">value</span> {
<span class="ident">geojson</span>::<span class="ident">Value</span>::<span class="ident">MultiPolygon</span>(<span class="ident">polygons</span>) <span class="op">=</span><span class="op">&gt;</span> {
<span class="kw">for</span> <span class="ident">p</span> <span class="kw">in</span> <span class="ident">polygons</span> {
<span class="ident">batch</span>.<span class="ident">push</span>(<span class="ident">color</span>, <span class="ident">Polygon</span>::<span class="ident">from_geojson</span>(<span class="kw-2">&amp;</span><span class="ident">p</span>).<span class="ident">scale</span>(<span class="ident">resolution_m</span>));
}
}
<span class="kw">_</span> <span class="op">=</span><span class="op">&gt;</span> <span class="macro">unreachable</span><span class="macro">!</span>(),
} }
}
<span class="ident">batch</span> <span class="comment">// Generate polygons covering the contour line where the cost in the grid crosses these</span>
<span class="comment">// threshold values.</span>
<span class="kw">let</span> <span class="ident">thresholds</span> <span class="op">=</span> <span class="macro">vec</span><span class="macro">!</span>[
<span class="number">0.1</span>,
<span class="ident">Duration</span>::<span class="ident">minutes</span>(<span class="number">5</span>).<span class="ident">inner_seconds</span>(),
<span class="ident">Duration</span>::<span class="ident">minutes</span>(<span class="number">10</span>).<span class="ident">inner_seconds</span>(),
<span class="ident">Duration</span>::<span class="ident">minutes</span>(<span class="number">15</span>).<span class="ident">inner_seconds</span>(),
];
<span class="comment">// And color the polygon for each threshold</span>
<span class="kw">let</span> <span class="ident">colors</span> <span class="op">=</span> <span class="macro">vec</span><span class="macro">!</span>[
<span class="ident">Color</span>::<span class="ident">GREEN</span>.<span class="ident">alpha</span>(<span class="number">0.5</span>),
<span class="ident">Color</span>::<span class="ident">ORANGE</span>.<span class="ident">alpha</span>(<span class="number">0.5</span>),
<span class="ident">Color</span>::<span class="ident">RED</span>.<span class="ident">alpha</span>(<span class="number">0.5</span>),
];
<span class="kw">let</span> <span class="ident">smooth</span> <span class="op">=</span> <span class="bool-val">false</span>;
<span class="kw">let</span> <span class="ident">c</span> <span class="op">=</span> <span class="ident">contour</span>::<span class="ident">ContourBuilder</span>::<span class="ident">new</span>(<span class="ident">grid</span>.<span class="ident">width</span> <span class="kw">as</span> <span class="ident">u32</span>, <span class="ident">grid</span>.<span class="ident">height</span> <span class="kw">as</span> <span class="ident">u32</span>, <span class="ident">smooth</span>);
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">batch</span> <span class="op">=</span> <span class="ident">GeomBatch</span>::<span class="ident">new</span>();
<span class="comment">// The last feature returned will be larger than the last threshold value. We don&#39;t want to</span>
<span class="comment">// display that at all. zip() will omit this last pair, since colors.len() ==</span>
<span class="comment">// thresholds.len() - 1.</span>
<span class="comment">//</span>
<span class="comment">// TODO Actually, this still isn&#39;t working. I think each polygon is everything &gt; the</span>
<span class="comment">// threshold, not everything between two thresholds?</span>
<span class="kw">for</span> (<span class="ident">feature</span>, <span class="ident">color</span>) <span class="kw">in</span> <span class="ident">c</span>
.<span class="ident">contours</span>(<span class="kw-2">&amp;</span><span class="ident">grid</span>.<span class="ident">data</span>, <span class="kw-2">&amp;</span><span class="ident">thresholds</span>)
.<span class="ident">unwrap</span>()
.<span class="ident">into_iter</span>()
.<span class="ident">zip</span>(<span class="ident">colors</span>)
{
<span class="kw">match</span> <span class="ident">feature</span>.<span class="ident">geometry</span>.<span class="ident">unwrap</span>().<span class="ident">value</span> {
<span class="ident">geojson</span>::<span class="ident">Value</span>::<span class="ident">MultiPolygon</span>(<span class="ident">polygons</span>) <span class="op">=</span><span class="op">&gt;</span> {
<span class="kw">for</span> <span class="ident">p</span> <span class="kw">in</span> <span class="ident">polygons</span> {
<span class="ident">batch</span>.<span class="ident">push</span>(<span class="ident">color</span>, <span class="ident">Polygon</span>::<span class="ident">from_geojson</span>(<span class="kw-2">&amp;</span><span class="ident">p</span>).<span class="ident">scale</span>(<span class="ident">resolution_m</span>));
}
}
<span class="kw">_</span> <span class="op">=</span><span class="op">&gt;</span> <span class="macro">unreachable</span><span class="macro">!</span>(),
}
}
<span class="ident">batch</span>
}
} }
</pre></div> </pre></div>
</section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "fifteen_min";</script><script src="../../main.js"></script><script src="../../source-script.js"></script><script src="../../source-files.js"></script><script defer src="../../search-index.js"></script></body></html> </section><section id="search" class="content hidden"></section><section class="footer"></section><script>window.rootPath = "../../";window.currentCrate = "fifteen_min";</script><script src="../../main.js"></script><script src="../../source-script.js"></script><script src="../../source-files.js"></script><script defer src="../../search-index.js"></script></body></html>

View File

@ -474,6 +474,19 @@
<span id="471">471</span> <span id="471">471</span>
<span id="472">472</span> <span id="472">472</span>
<span id="473">473</span> <span id="473">473</span>
<span id="474">474</span>
<span id="475">475</span>
<span id="476">476</span>
<span id="477">477</span>
<span id="478">478</span>
<span id="479">479</span>
<span id="480">480</span>
<span id="481">481</span>
<span id="482">482</span>
<span id="483">483</span>
<span id="484">484</span>
<span id="485">485</span>
<span id="486">486</span>
</pre><div class="example-wrap"><pre class="rust "> </pre><div class="example-wrap"><pre class="rust ">
<span class="doccomment">//! This is a tool to experiment with the concept of 15-minute neighborhoods. Can you access your</span> <span class="doccomment">//! This is a tool to experiment with the concept of 15-minute neighborhoods. Can you access your</span>
<span class="doccomment">//! daily needs (like groceries, a cafe, a library) within a 15-minute walk, bike ride, or public</span> <span class="doccomment">//! daily needs (like groceries, a cafe, a library) within a 15-minute walk, bike ride, or public</span>
@ -482,7 +495,7 @@
<span class="doccomment">//! See https://github.com/dabreegster/abstreet/issues/393 for more context.</span> <span class="doccomment">//! See https://github.com/dabreegster/abstreet/issues/393 for more context.</span>
<span class="kw">use</span> <span class="ident">abstutil</span>::<span class="ident">prettyprint_usize</span>; <span class="kw">use</span> <span class="ident">abstutil</span>::<span class="ident">prettyprint_usize</span>;
<span class="kw">use</span> <span class="ident">geom</span>::{<span class="ident">Distance</span>, <span class="ident">Duration</span>, <span class="ident">Pt2D</span>}; <span class="kw">use</span> <span class="ident">geom</span>::{<span class="ident">Distance</span>, <span class="ident">Duration</span>};
<span class="kw">use</span> <span class="ident">map_gui</span>::<span class="ident">tools</span>::{ <span class="kw">use</span> <span class="ident">map_gui</span>::<span class="ident">tools</span>::{
<span class="ident">amenity_type</span>, <span class="ident">nice_map_name</span>, <span class="ident">open_browser</span>, <span class="ident">CityPicker</span>, <span class="ident">ColorLegend</span>, <span class="ident">PopupMsg</span>, <span class="ident">amenity_type</span>, <span class="ident">nice_map_name</span>, <span class="ident">open_browser</span>, <span class="ident">CityPicker</span>, <span class="ident">ColorLegend</span>, <span class="ident">PopupMsg</span>,
}; };
@ -491,7 +504,7 @@
<span class="kw">use</span> <span class="ident">map_model</span>::{<span class="ident">Building</span>, <span class="ident">BuildingID</span>}; <span class="kw">use</span> <span class="ident">map_model</span>::{<span class="ident">Building</span>, <span class="ident">BuildingID</span>};
<span class="kw">use</span> <span class="ident">widgetry</span>::<span class="ident">table</span>::{<span class="ident">Col</span>, <span class="ident">Filter</span>, <span class="ident">Table</span>}; <span class="kw">use</span> <span class="ident">widgetry</span>::<span class="ident">table</span>::{<span class="ident">Col</span>, <span class="ident">Filter</span>, <span class="ident">Table</span>};
<span class="kw">use</span> <span class="ident">widgetry</span>::{ <span class="kw">use</span> <span class="ident">widgetry</span>::{
<span class="ident">lctrl</span>, <span class="ident">Btn</span>, <span class="ident">Checkbox</span>, <span class="ident">Choice</span>, <span class="ident">Color</span>, <span class="ident">DrawBaselayer</span>, <span class="ident">Drawable</span>, <span class="ident">EventCtx</span>, <span class="ident">GeomBatch</span>, <span class="ident">GfxCtx</span>, <span class="ident">lctrl</span>, <span class="ident">Btn</span>, <span class="ident">Checkbox</span>, <span class="ident">Choice</span>, <span class="ident">Color</span>, <span class="ident">Drawable</span>, <span class="ident">EventCtx</span>, <span class="ident">GeomBatch</span>, <span class="ident">GfxCtx</span>,
<span class="ident">HorizontalAlignment</span>, <span class="ident">Key</span>, <span class="ident">Line</span>, <span class="ident">Outcome</span>, <span class="ident">Panel</span>, <span class="ident">RewriteColor</span>, <span class="ident">State</span>, <span class="ident">Text</span>, <span class="ident">TextExt</span>, <span class="ident">Transition</span>, <span class="ident">HorizontalAlignment</span>, <span class="ident">Key</span>, <span class="ident">Line</span>, <span class="ident">Outcome</span>, <span class="ident">Panel</span>, <span class="ident">RewriteColor</span>, <span class="ident">State</span>, <span class="ident">Text</span>, <span class="ident">TextExt</span>, <span class="ident">Transition</span>,
<span class="ident">VerticalAlignment</span>, <span class="ident">Widget</span>, <span class="ident">VerticalAlignment</span>, <span class="ident">Widget</span>,
}; };
@ -520,12 +533,12 @@
<span class="kw">let</span> <span class="ident">options</span> <span class="op">=</span> <span class="ident">Options</span>::<span class="ident">Walking</span>(<span class="ident">WalkingOptions</span>::<span class="ident">default</span>()); <span class="kw">let</span> <span class="ident">options</span> <span class="op">=</span> <span class="ident">Options</span>::<span class="ident">Walking</span>(<span class="ident">WalkingOptions</span>::<span class="ident">default</span>());
<span class="kw">let</span> <span class="ident">start</span> <span class="op">=</span> <span class="ident">app</span>.<span class="ident">map</span>.<span class="ident">get_b</span>(<span class="ident">start</span>); <span class="kw">let</span> <span class="ident">start</span> <span class="op">=</span> <span class="ident">app</span>.<span class="ident">map</span>.<span class="ident">get_b</span>(<span class="ident">start</span>);
<span class="kw">let</span> <span class="ident">isochrone</span> <span class="op">=</span> <span class="ident">Isochrone</span>::<span class="ident">new</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="ident">start</span>.<span class="ident">id</span>, <span class="ident">options</span>); <span class="kw">let</span> <span class="ident">isochrone</span> <span class="op">=</span> <span class="ident">Isochrone</span>::<span class="ident">new</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="ident">start</span>.<span class="ident">id</span>, <span class="ident">options</span>);
<span class="kw">let</span> <span class="ident">highlight_start</span> <span class="op">=</span> <span class="ident">draw_star</span>(<span class="ident">ctx</span>, <span class="ident">start</span>.<span class="ident">polygon</span>.<span class="ident">center</span>()); <span class="kw">let</span> <span class="ident">highlight_start</span> <span class="op">=</span> <span class="ident">draw_star</span>(<span class="ident">ctx</span>, <span class="ident">start</span>);
<span class="kw">let</span> <span class="ident">panel</span> <span class="op">=</span> <span class="ident">build_panel</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="ident">start</span>, <span class="kw-2">&amp;</span><span class="ident">isochrone</span>); <span class="kw">let</span> <span class="ident">panel</span> <span class="op">=</span> <span class="ident">build_panel</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="ident">start</span>, <span class="kw-2">&amp;</span><span class="ident">isochrone</span>);
<span class="ident">Box</span>::<span class="ident">new</span>(<span class="ident">Viewer</span> { <span class="ident">Box</span>::<span class="ident">new</span>(<span class="ident">Viewer</span> {
<span class="ident">panel</span>, <span class="ident">panel</span>,
<span class="ident">highlight_start</span>: <span class="ident">highlight_start</span>, <span class="ident">highlight_start</span>: <span class="ident">ctx</span>.<span class="ident">upload</span>(<span class="ident">highlight_start</span>),
<span class="ident">isochrone</span>, <span class="ident">isochrone</span>,
<span class="ident">hovering_on_bldg</span>: <span class="ident">Cached</span>::<span class="ident">new</span>(), <span class="ident">hovering_on_bldg</span>: <span class="ident">Cached</span>::<span class="ident">new</span>(),
}) })
@ -554,7 +567,8 @@
<span class="kw">if</span> <span class="ident">ctx</span>.<span class="ident">normal_left_click</span>() { <span class="kw">if</span> <span class="ident">ctx</span>.<span class="ident">normal_left_click</span>() {
<span class="kw">let</span> <span class="ident">start</span> <span class="op">=</span> <span class="ident">app</span>.<span class="ident">map</span>.<span class="ident">get_b</span>(<span class="ident">hover_id</span>); <span class="kw">let</span> <span class="ident">start</span> <span class="op">=</span> <span class="ident">app</span>.<span class="ident">map</span>.<span class="ident">get_b</span>(<span class="ident">hover_id</span>);
<span class="self">self</span>.<span class="ident">isochrone</span> <span class="op">=</span> <span class="ident">Isochrone</span>::<span class="ident">new</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="ident">start</span>.<span class="ident">id</span>, <span class="self">self</span>.<span class="ident">isochrone</span>.<span class="ident">options</span>.<span class="ident">clone</span>()); <span class="self">self</span>.<span class="ident">isochrone</span> <span class="op">=</span> <span class="ident">Isochrone</span>::<span class="ident">new</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="ident">start</span>.<span class="ident">id</span>, <span class="self">self</span>.<span class="ident">isochrone</span>.<span class="ident">options</span>.<span class="ident">clone</span>());
<span class="self">self</span>.<span class="ident">highlight_start</span> <span class="op">=</span> <span class="ident">draw_star</span>(<span class="ident">ctx</span>, <span class="ident">start</span>.<span class="ident">polygon</span>.<span class="ident">center</span>()); <span class="kw">let</span> <span class="ident">star</span> <span class="op">=</span> <span class="ident">draw_star</span>(<span class="ident">ctx</span>, <span class="ident">start</span>);
<span class="self">self</span>.<span class="ident">highlight_start</span> <span class="op">=</span> <span class="ident">ctx</span>.<span class="ident">upload</span>(<span class="ident">star</span>);
<span class="self">self</span>.<span class="ident">panel</span> <span class="op">=</span> <span class="ident">build_panel</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="ident">start</span>, <span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">isochrone</span>); <span class="self">self</span>.<span class="ident">panel</span> <span class="op">=</span> <span class="ident">build_panel</span>(<span class="ident">ctx</span>, <span class="ident">app</span>, <span class="ident">start</span>, <span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">isochrone</span>);
<span class="comment">// Any previous hover is from the perspective of the old `highlight_start`.</span> <span class="comment">// Any previous hover is from the perspective of the old `highlight_start`.</span>
<span class="comment">// Remove it so we don&#39;t have a dotted line to the previous isochrone&#39;s origin</span> <span class="comment">// Remove it so we don&#39;t have a dotted line to the previous isochrone&#39;s origin</span>
@ -687,12 +701,10 @@
} }
} }
<span class="kw">fn</span> <span class="ident">draw_star</span>(<span class="ident">ctx</span>: <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">EventCtx</span>, <span class="ident">center</span>: <span class="ident">Pt2D</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">Drawable</span> { <span class="kw">fn</span> <span class="ident">draw_star</span>(<span class="ident">ctx</span>: <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">EventCtx</span>, <span class="ident">b</span>: <span class="kw-2">&amp;</span><span class="ident">Building</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">GeomBatch</span> {
<span class="ident">ctx</span>.<span class="ident">upload</span>( <span class="ident">GeomBatch</span>::<span class="ident">load_svg</span>(<span class="ident">ctx</span>, <span class="string">&quot;system/assets/tools/star.svg&quot;</span>)
<span class="ident">GeomBatch</span>::<span class="ident">load_svg</span>(<span class="ident">ctx</span>, <span class="string">&quot;system/assets/tools/star.svg&quot;</span>) .<span class="ident">centered_on</span>(<span class="ident">b</span>.<span class="ident">polygon</span>.<span class="ident">center</span>())
.<span class="ident">centered_on</span>(<span class="ident">center</span>) .<span class="ident">color</span>(<span class="ident">RewriteColor</span>::<span class="ident">ChangeAll</span>(<span class="ident">Color</span>::<span class="ident">BLACK</span>))
.<span class="ident">color</span>(<span class="ident">RewriteColor</span>::<span class="ident">ChangeAll</span>(<span class="ident">Color</span>::<span class="ident">BLACK</span>)),
)
} }
<span class="kw">fn</span> <span class="ident">build_panel</span>(<span class="ident">ctx</span>: <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">EventCtx</span>, <span class="ident">app</span>: <span class="kw-2">&amp;</span><span class="ident">App</span>, <span class="ident">start</span>: <span class="kw-2">&amp;</span><span class="ident">Building</span>, <span class="ident">isochrone</span>: <span class="kw-2">&amp;</span><span class="ident">Isochrone</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">Panel</span> { <span class="kw">fn</span> <span class="ident">build_panel</span>(<span class="ident">ctx</span>: <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">EventCtx</span>, <span class="ident">app</span>: <span class="kw-2">&amp;</span><span class="ident">App</span>, <span class="ident">start</span>: <span class="kw-2">&amp;</span><span class="ident">Building</span>, <span class="ident">isochrone</span>: <span class="kw-2">&amp;</span><span class="ident">Isochrone</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">Panel</span> {
@ -823,6 +835,7 @@
<span class="ident">category</span>: <span class="ident">String</span>, <span class="ident">category</span>: <span class="ident">String</span>,
<span class="ident">table</span>: <span class="ident">Table</span><span class="op">&lt;</span><span class="ident">App</span>, <span class="ident">Entry</span>, ()<span class="op">&gt;</span>, <span class="ident">table</span>: <span class="ident">Table</span><span class="op">&lt;</span><span class="ident">App</span>, <span class="ident">Entry</span>, ()<span class="op">&gt;</span>,
<span class="ident">panel</span>: <span class="ident">Panel</span>, <span class="ident">panel</span>: <span class="ident">Panel</span>,
<span class="ident">draw</span>: <span class="ident">Drawable</span>,
} }
<span class="kw">struct</span> <span class="ident">Entry</span> { <span class="kw">struct</span> <span class="ident">Entry</span> {
@ -840,6 +853,9 @@
<span class="ident">isochrone</span>: <span class="kw-2">&amp;</span><span class="ident">Isochrone</span>, <span class="ident">isochrone</span>: <span class="kw-2">&amp;</span><span class="ident">Isochrone</span>,
<span class="ident">category</span>: <span class="kw-2">&amp;</span><span class="ident">str</span>, <span class="ident">category</span>: <span class="kw-2">&amp;</span><span class="ident">str</span>,
) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">Box</span><span class="op">&lt;</span><span class="ident">dyn</span> <span class="ident">State</span><span class="op">&lt;</span><span class="ident">App</span><span class="op">&gt;</span><span class="op">&gt;</span> { ) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">Box</span><span class="op">&lt;</span><span class="ident">dyn</span> <span class="ident">State</span><span class="op">&lt;</span><span class="ident">App</span><span class="op">&gt;</span><span class="op">&gt;</span> {
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">batch</span> <span class="op">=</span> <span class="ident">isochrone</span>.<span class="ident">draw_isochrone</span>(<span class="ident">app</span>);
<span class="ident">batch</span>.<span class="ident">append</span>(<span class="ident">draw_star</span>(<span class="ident">ctx</span>, <span class="ident">app</span>.<span class="ident">map</span>.<span class="ident">get_b</span>(<span class="ident">isochrone</span>.<span class="ident">start</span>)));
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">entries</span> <span class="op">=</span> <span class="ident">Vec</span>::<span class="ident">new</span>(); <span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">entries</span> <span class="op">=</span> <span class="ident">Vec</span>::<span class="ident">new</span>();
<span class="kw">for</span> <span class="ident">b</span> <span class="kw">in</span> <span class="ident">isochrone</span>.<span class="ident">amenities_reachable</span>.<span class="ident">get</span>(<span class="ident">category</span>) { <span class="kw">for</span> <span class="ident">b</span> <span class="kw">in</span> <span class="ident">isochrone</span>.<span class="ident">amenities_reachable</span>.<span class="ident">get</span>(<span class="ident">category</span>) {
<span class="kw">let</span> <span class="ident">bldg</span> <span class="op">=</span> <span class="ident">app</span>.<span class="ident">map</span>.<span class="ident">get_b</span>(<span class="kw-2">*</span><span class="ident">b</span>); <span class="kw">let</span> <span class="ident">bldg</span> <span class="op">=</span> <span class="ident">app</span>.<span class="ident">map</span>.<span class="ident">get_b</span>(<span class="kw-2">*</span><span class="ident">b</span>);
@ -852,6 +868,8 @@
<span class="ident">address</span>: <span class="ident">bldg</span>.<span class="ident">address</span>.<span class="ident">clone</span>(), <span class="ident">address</span>: <span class="ident">bldg</span>.<span class="ident">address</span>.<span class="ident">clone</span>(),
<span class="ident">duration_away</span>: <span class="ident">isochrone</span>.<span class="ident">time_to_reach_building</span>[<span class="kw-2">&amp;</span><span class="ident">bldg</span>.<span class="ident">id</span>], <span class="ident">duration_away</span>: <span class="ident">isochrone</span>.<span class="ident">time_to_reach_building</span>[<span class="kw-2">&amp;</span><span class="ident">bldg</span>.<span class="ident">id</span>],
}); });
<span class="comment">// Highlight the matching buildings</span>
<span class="ident">batch</span>.<span class="ident">push</span>(<span class="ident">Color</span>::<span class="ident">RED</span>, <span class="ident">bldg</span>.<span class="ident">polygon</span>.<span class="ident">clone</span>());
} }
} }
} }
@ -887,12 +905,14 @@
]), ]),
<span class="ident">table</span>.<span class="ident">render</span>(<span class="ident">ctx</span>, <span class="ident">app</span>), <span class="ident">table</span>.<span class="ident">render</span>(<span class="ident">ctx</span>, <span class="ident">app</span>),
])) ]))
.<span class="ident">aligned</span>(<span class="ident">HorizontalAlignment</span>::<span class="ident">Center</span>, <span class="ident">VerticalAlignment</span>::<span class="ident">TopInset</span>)
.<span class="ident">build</span>(<span class="ident">ctx</span>); .<span class="ident">build</span>(<span class="ident">ctx</span>);
<span class="ident">Box</span>::<span class="ident">new</span>(<span class="ident">ExploreAmenities</span> { <span class="ident">Box</span>::<span class="ident">new</span>(<span class="ident">ExploreAmenities</span> {
<span class="ident">category</span>: <span class="ident">category</span>.<span class="ident">to_string</span>(), <span class="ident">category</span>: <span class="ident">category</span>.<span class="ident">to_string</span>(),
<span class="ident">table</span>, <span class="ident">table</span>,
<span class="ident">panel</span>, <span class="ident">panel</span>,
<span class="ident">draw</span>: <span class="ident">ctx</span>.<span class="ident">upload</span>(<span class="ident">batch</span>),
}) })
} }
@ -906,6 +926,7 @@
]), ]),
<span class="self">self</span>.<span class="ident">table</span>.<span class="ident">render</span>(<span class="ident">ctx</span>, <span class="ident">app</span>), <span class="self">self</span>.<span class="ident">table</span>.<span class="ident">render</span>(<span class="ident">ctx</span>, <span class="ident">app</span>),
])) ]))
.<span class="ident">aligned</span>(<span class="ident">HorizontalAlignment</span>::<span class="ident">Center</span>, <span class="ident">VerticalAlignment</span>::<span class="ident">TopInset</span>)
.<span class="ident">build</span>(<span class="ident">ctx</span>); .<span class="ident">build</span>(<span class="ident">ctx</span>);
<span class="ident">new</span>.<span class="ident">restore</span>(<span class="ident">ctx</span>, <span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">panel</span>); <span class="ident">new</span>.<span class="ident">restore</span>(<span class="ident">ctx</span>, <span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">panel</span>);
<span class="self">self</span>.<span class="ident">panel</span> <span class="op">=</span> <span class="ident">new</span>; <span class="self">self</span>.<span class="ident">panel</span> <span class="op">=</span> <span class="ident">new</span>;
@ -940,12 +961,17 @@
<span class="ident">Transition</span>::<span class="ident">Keep</span> <span class="ident">Transition</span>::<span class="ident">Keep</span>
} }
<span class="kw">fn</span> <span class="ident">draw_baselayer</span>(<span class="kw-2">&amp;</span><span class="self">self</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">DrawBaselayer</span> { <span class="kw">fn</span> <span class="ident">draw</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">g</span>: <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">GfxCtx</span>, <span class="ident">app</span>: <span class="kw-2">&amp;</span><span class="ident">App</span>) {
<span class="ident">DrawBaselayer</span>::<span class="ident">PreviousState</span> <span class="ident">g</span>.<span class="ident">redraw</span>(<span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">draw</span>);
}
<span class="kw">fn</span> <span class="ident">draw</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">g</span>: <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">GfxCtx</span>, <span class="kw">_</span>: <span class="kw-2">&amp;</span><span class="ident">App</span>) {
<span class="self">self</span>.<span class="ident">panel</span>.<span class="ident">draw</span>(<span class="ident">g</span>); <span class="self">self</span>.<span class="ident">panel</span>.<span class="ident">draw</span>(<span class="ident">g</span>);
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">x</span>) <span class="op">=</span> <span class="self">self</span>
.<span class="ident">panel</span>
.<span class="ident">currently_hovering</span>()
.<span class="ident">and_then</span>(<span class="op">|</span><span class="ident">x</span><span class="op">|</span> <span class="ident">x</span>.<span class="ident">split</span>(<span class="string">&quot;:&quot;</span>).<span class="ident">next</span>())
.<span class="ident">and_then</span>(<span class="op">|</span><span class="ident">x</span><span class="op">|</span> <span class="ident">x</span>.<span class="ident">parse</span>::<span class="op">&lt;</span><span class="ident">usize</span><span class="op">&gt;</span>().<span class="ident">ok</span>())
{
<span class="ident">g</span>.<span class="ident">draw_polygon</span>(<span class="ident">Color</span>::<span class="ident">CYAN</span>, <span class="ident">app</span>.<span class="ident">map</span>.<span class="ident">get_b</span>(<span class="ident">BuildingID</span>(<span class="ident">x</span>)).<span class="ident">polygon</span>.<span class="ident">clone</span>());
}
} }
} }
</pre></div> </pre></div>

View File

@ -122,7 +122,7 @@
<span class="doccomment">/// The output of `rustdoc -V`</span> <span class="doccomment">/// The output of `rustdoc -V`</span>
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">RUSTDOC_VERSION</span>: <span class="kw-2">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="string">&quot;rustdoc 1.48.0 (7eac88abb 2020-11-16)&quot;</span>; <span class="kw">pub</span> <span class="kw">const</span> <span class="ident">RUSTDOC_VERSION</span>: <span class="kw-2">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="string">&quot;rustdoc 1.48.0 (7eac88abb 2020-11-16)&quot;</span>;
<span class="doccomment">/// The built-time in RFC2822, UTC</span> <span class="doccomment">/// The built-time in RFC2822, UTC</span>
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">BUILT_TIME_UTC</span>: <span class="kw-2">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="string">&quot;Fri, 25 Dec 2020 00:51:39 +0000&quot;</span>; <span class="kw">pub</span> <span class="kw">const</span> <span class="ident">BUILT_TIME_UTC</span>: <span class="kw-2">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="string">&quot;Sat, 26 Dec 2020 21:44:23 +0000&quot;</span>;
<span class="doccomment">/// The target architecture, given by `cfg!(target_arch)`.</span> <span class="doccomment">/// The target architecture, given by `cfg!(target_arch)`.</span>
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">CFG_TARGET_ARCH</span>: <span class="kw-2">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="string">&quot;x86_64&quot;</span>; <span class="kw">pub</span> <span class="kw">const</span> <span class="ident">CFG_TARGET_ARCH</span>: <span class="kw-2">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="string">&quot;x86_64&quot;</span>;
<span class="doccomment">/// The endianness, given by `cfg!(target_endian)`.</span> <span class="doccomment">/// The endianness, given by `cfg!(target_endian)`.</span>