This commit is contained in:
dabreegster 2022-01-12 14:03:37 +00:00
parent 0fb1f55074
commit d284a48d66
32 changed files with 523 additions and 487 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,3 @@
<!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_zoomed_planters` fn in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, draw_zoomed_planters"><title>draw_zoomed_planters in game::ltn::filters - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script id="default-settings" ></script><script src="../../../storage.js"></script><script src="../../../crates.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../../favicon.svg"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#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"><h2 class="location">Other items in<br><a href="../../index.html">game</a>::<wbr><a href="../index.html">ltn</a>::<wbr><a href="index.html">filters</a></h2><div id="sidebar-vars" data-name="draw_zoomed_planters" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><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><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../../index.html">game</a>::<wbr><a href="../index.html">ltn</a>::<wbr><a href="index.html">filters</a>::<wbr><a class="fn" href="#">draw_zoomed_planters</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><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/ltn/filters.rs.html#206-222" title="goto source code">[src]</a></span></h1><pre class="rust fn"><code>fn draw_zoomed_planters(ctx: &amp;EventCtx&lt;'_&gt;, batch: &amp;mut GeomBatch, line: <a class="struct" href="../../../geom/line/struct.Line.html" title="struct geom::line::Line">Line</a>)</code></pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="game" data-search-index-js="../../../search-index.js" data-search-js="../../../search.js"></div>
<script src="../../../main.js"></script>
</body></html>

View File

@ -0,0 +1,10 @@
<!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 `filters` mod in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, filters"><title>game::ltn::filters - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script id="default-settings" ></script><script src="../../../storage.js"></script><script src="../../../crates.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../../favicon.svg"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../../../game/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a><h2 class="location">Module filters</h2><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li><li><a href="#functions">Functions</a></li></ul></div><div id="sidebar-vars" data-name="filters" data-ty="mod" data-relpath="./"></div><script defer src="./sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><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><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../../index.html">game</a>::<wbr><a href="../index.html">ltn</a>::<wbr><a class="mod" href="#">filters</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><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/ltn/filters.rs.html#1-222" title="goto source code">[src]</a></span></h1><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2>
<div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.DiagonalFilter.html" title="game::ltn::filters::DiagonalFilter struct">DiagonalFilter</a></div><div class="item-right docblock-short"><p>A diagonal filter exists in an intersection. Its defined by two roads (the order is
arbitrary). When all of the intersections roads are sorted in clockwise order, this pair of
roads splits the ordering into two groups. Turns in each group are still possible, but not
across groups.</p>
</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.ModalFilters.html" title="game::ltn::filters::ModalFilters struct">ModalFilters</a></div><div class="item-right docblock-short"><p>Stored in App session state</p>
</div></div></div><h2 id="functions" class="section-header"><a href="#functions">Functions</a></h2>
<div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.draw_zoomed_planters.html" title="game::ltn::filters::draw_zoomed_planters fn">draw_zoomed_planters</a></div><div class="item-right docblock-short"></div></div></div></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="game" data-search-index-js="../../../search-index.js" data-search-js="../../../search.js"></div>
<script src="../../../main.js"></script>
</body></html>

View File

@ -0,0 +1 @@
initSidebarItems({"fn":[["draw_zoomed_planters",""]],"struct":[["DiagonalFilter","A diagonal filter exists in an intersection. Its defined by two roads (the order is arbitrary). When all of the intersections roads are sorted in clockwise order, this pair of roads splits the ordering into two groups. Turns in each group are still possible, but not across groups."],["ModalFilters","Stored in App session state"]]});

View File

@ -1,3 +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_zoomed_planters` fn in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, draw_zoomed_planters"><title>draw_zoomed_planters in game::ltn - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings" ></script><script src="../../storage.js"></script><script src="../../crates.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../favicon.svg"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#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"><h2 class="location">Other items in<br><a href="../index.html">game</a>::<wbr><a href="index.html">ltn</a></h2><div id="sidebar-vars" data-name="draw_zoomed_planters" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><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><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">game</a>::<wbr><a href="index.html">ltn</a>::<wbr><a class="fn" href="#">draw_zoomed_planters</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><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/ltn/mod.rs.html#253-269" title="goto source code">[src]</a></span></h1><pre class="rust fn"><code>fn draw_zoomed_planters(ctx: &amp;EventCtx&lt;'_&gt;, batch: &amp;mut GeomBatch, line: <a class="struct" href="../../geom/line/struct.Line.html" title="struct geom::line::Line">Line</a>)</code></pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="game" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div>
<script src="../../main.js"></script>
</body></html>

View File

@ -1,3 +1,3 @@
<!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 `find_cells` fn in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, find_cells"><title>find_cells in game::ltn - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings" ></script><script src="../../storage.js"></script><script src="../../crates.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../favicon.svg"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#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"><h2 class="location">Other items in<br><a href="../index.html">game</a>::<wbr><a href="index.html">ltn</a></h2><div id="sidebar-vars" data-name="find_cells" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><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><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">game</a>::<wbr><a href="index.html">ltn</a>::<wbr><a class="fn" href="#">find_cells</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><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/ltn/mod.rs.html#273-361" title="goto source code">[src]</a></span></h1><pre class="rust fn"><code>fn find_cells(<br>&nbsp;&nbsp;&nbsp;&nbsp;map: &amp;<a class="struct" href="../../map_model/struct.Map.html" title="struct map_model::Map">Map</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;perimeter: &amp;<a class="struct" href="../../map_model/objects/block/struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;borders: &amp;<a class="struct" href="https://doc.rust-lang.org/1.57.0/alloc/collections/btree/set/struct.BTreeSet.html" title="struct alloc::collections::btree::set::BTreeSet">BTreeSet</a>&lt;<a class="struct" href="../../map_model/objects/intersection/struct.IntersectionID.html" title="struct map_model::objects::intersection::IntersectionID">IntersectionID</a>&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;modal_filters: &amp;<a class="struct" href="struct.ModalFilters.html" title="struct game::ltn::ModalFilters">ModalFilters</a><br>) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.57.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="struct.Cell.html" title="struct game::ltn::Cell">Cell</a>&gt;</code></pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="game" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div>
<!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 `find_cells` fn in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, find_cells"><title>find_cells in game::ltn - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings" ></script><script src="../../storage.js"></script><script src="../../crates.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../favicon.svg"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#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"><h2 class="location">Other items in<br><a href="../index.html">game</a>::<wbr><a href="index.html">ltn</a></h2><div id="sidebar-vars" data-name="find_cells" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><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><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">game</a>::<wbr><a href="index.html">ltn</a>::<wbr><a class="fn" href="#">find_cells</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><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/ltn/mod.rs.html#146-234" title="goto source code">[src]</a></span></h1><pre class="rust fn"><code>fn find_cells(<br>&nbsp;&nbsp;&nbsp;&nbsp;map: &amp;<a class="struct" href="../../map_model/struct.Map.html" title="struct map_model::Map">Map</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;perimeter: &amp;<a class="struct" href="../../map_model/objects/block/struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;borders: &amp;<a class="struct" href="https://doc.rust-lang.org/1.57.0/alloc/collections/btree/set/struct.BTreeSet.html" title="struct alloc::collections::btree::set::BTreeSet">BTreeSet</a>&lt;<a class="struct" href="../../map_model/objects/intersection/struct.IntersectionID.html" title="struct map_model::objects::intersection::IntersectionID">IntersectionID</a>&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;modal_filters: &amp;<a class="struct" href="filters/struct.ModalFilters.html" title="struct game::ltn::filters::ModalFilters">ModalFilters</a><br>) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.57.0/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;<a class="struct" href="struct.Cell.html" title="struct game::ltn::Cell">Cell</a>&gt;</code></pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="game" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div>
<script src="../../main.js"></script>
</body></html>

View File

@ -1,3 +1,3 @@
<!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 `floodfill` fn in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, floodfill"><title>floodfill in game::ltn - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings" ></script><script src="../../storage.js"></script><script src="../../crates.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../favicon.svg"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#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"><h2 class="location">Other items in<br><a href="../index.html">game</a>::<wbr><a href="index.html">ltn</a></h2><div id="sidebar-vars" data-name="floodfill" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><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><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">game</a>::<wbr><a href="index.html">ltn</a>::<wbr><a class="fn" href="#">floodfill</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><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/ltn/mod.rs.html#363-451" title="goto source code">[src]</a></span></h1><pre class="rust fn"><code>fn floodfill(<br>&nbsp;&nbsp;&nbsp;&nbsp;map: &amp;<a class="struct" href="../../map_model/struct.Map.html" title="struct map_model::Map">Map</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;start: <a class="struct" href="../../map_model/objects/road/struct.RoadID.html" title="struct map_model::objects::road::RoadID">RoadID</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;perimeter: &amp;<a class="struct" href="../../map_model/objects/block/struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;neighborhood_borders: &amp;<a class="struct" href="https://doc.rust-lang.org/1.57.0/alloc/collections/btree/set/struct.BTreeSet.html" title="struct alloc::collections::btree::set::BTreeSet">BTreeSet</a>&lt;<a class="struct" href="../../map_model/objects/intersection/struct.IntersectionID.html" title="struct map_model::objects::intersection::IntersectionID">IntersectionID</a>&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;modal_filters: &amp;<a class="struct" href="struct.ModalFilters.html" title="struct game::ltn::ModalFilters">ModalFilters</a><br>) -&gt; <a class="struct" href="struct.Cell.html" title="struct game::ltn::Cell">Cell</a></code></pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="game" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div>
<!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 `floodfill` fn in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, floodfill"><title>floodfill in game::ltn - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings" ></script><script src="../../storage.js"></script><script src="../../crates.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../favicon.svg"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#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"><h2 class="location">Other items in<br><a href="../index.html">game</a>::<wbr><a href="index.html">ltn</a></h2><div id="sidebar-vars" data-name="floodfill" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><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><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">game</a>::<wbr><a href="index.html">ltn</a>::<wbr><a class="fn" href="#">floodfill</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><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/ltn/mod.rs.html#236-324" title="goto source code">[src]</a></span></h1><pre class="rust fn"><code>fn floodfill(<br>&nbsp;&nbsp;&nbsp;&nbsp;map: &amp;<a class="struct" href="../../map_model/struct.Map.html" title="struct map_model::Map">Map</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;start: <a class="struct" href="../../map_model/objects/road/struct.RoadID.html" title="struct map_model::objects::road::RoadID">RoadID</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;perimeter: &amp;<a class="struct" href="../../map_model/objects/block/struct.Perimeter.html" title="struct map_model::objects::block::Perimeter">Perimeter</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;neighborhood_borders: &amp;<a class="struct" href="https://doc.rust-lang.org/1.57.0/alloc/collections/btree/set/struct.BTreeSet.html" title="struct alloc::collections::btree::set::BTreeSet">BTreeSet</a>&lt;<a class="struct" href="../../map_model/objects/intersection/struct.IntersectionID.html" title="struct map_model::objects::intersection::IntersectionID">IntersectionID</a>&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;modal_filters: &amp;<a class="struct" href="filters/struct.ModalFilters.html" title="struct game::ltn::filters::ModalFilters">ModalFilters</a><br>) -&gt; <a class="struct" href="struct.Cell.html" title="struct game::ltn::Cell">Cell</a></code></pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="game" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div>
<script src="../../main.js"></script>
</body></html>

View File

@ -1,14 +1,10 @@
<!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 `ltn` mod in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, ltn"><title>game::ltn - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings" ></script><script src="../../storage.js"></script><script src="../../crates.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../favicon.svg"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../../game/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><h2 class="location">Module ltn</h2><div class="sidebar-elems"><div class="block items"><ul><li><a href="#modules">Modules</a></li><li><a href="#structs">Structs</a></li><li><a href="#functions">Functions</a></li></ul></div><div id="sidebar-vars" data-name="ltn" data-ty="mod" data-relpath="./"></div><script defer src="./sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><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><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../index.html">game</a>::<wbr><a class="mod" href="#">ltn</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><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/ltn/mod.rs.html#1-534" title="goto source code">[src]</a></span></h1><h2 id="reexports" class="section-header"><a href="#reexports">Re-exports</a></h2>
<div class="item-table"><div class="item-row"><div class="item-left import-item"><code>pub use browse::<a class="struct" href="browse/struct.BrowseNeighborhoods.html" title="struct game::ltn::browse::BrowseNeighborhoods">BrowseNeighborhoods</a>;</code></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left import-item"><code>pub use partition::<a class="struct" href="partition/struct.Partitioning.html" title="struct game::ltn::partition::Partitioning">Partitioning</a>;</code></div><div class="item-right docblock-short"></div></div></div><h2 id="modules" class="section-header"><a href="#modules">Modules</a></h2>
<!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 `ltn` mod in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, ltn"><title>game::ltn - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings" ></script><script src="../../storage.js"></script><script src="../../crates.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../favicon.svg"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../../game/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><h2 class="location">Module ltn</h2><div class="sidebar-elems"><div class="block items"><ul><li><a href="#modules">Modules</a></li><li><a href="#structs">Structs</a></li><li><a href="#functions">Functions</a></li></ul></div><div id="sidebar-vars" data-name="ltn" data-ty="mod" data-relpath="./"></div><script defer src="./sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><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><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../index.html">game</a>::<wbr><a class="mod" href="#">ltn</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><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/ltn/mod.rs.html#1-324" title="goto source code">[src]</a></span></h1><h2 id="reexports" class="section-header"><a href="#reexports">Re-exports</a></h2>
<div class="item-table"><div class="item-row"><div class="item-left import-item"><code>pub use browse::<a class="struct" href="browse/struct.BrowseNeighborhoods.html" title="struct game::ltn::browse::BrowseNeighborhoods">BrowseNeighborhoods</a>;</code></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left import-item"><code>pub use filters::<a class="struct" href="filters/struct.DiagonalFilter.html" title="struct game::ltn::filters::DiagonalFilter">DiagonalFilter</a>;</code></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left import-item"><code>pub use filters::<a class="struct" href="filters/struct.ModalFilters.html" title="struct game::ltn::filters::ModalFilters">ModalFilters</a>;</code></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left import-item"><code>pub use partition::<a class="struct" href="partition/struct.Partitioning.html" title="struct game::ltn::partition::Partitioning">Partitioning</a>;</code></div><div class="item-right docblock-short"></div></div></div><h2 id="modules" class="section-header"><a href="#modules">Modules</a></h2>
<div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="mod" href="auto/index.html" title="game::ltn::auto mod">auto</a></div><div class="item-right docblock-short"><p>Experiments to make a neighborhood be low-traffic by automatically placing filters to prevent all rat runs.</p>
</div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="browse/index.html" title="game::ltn::browse mod">browse</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="connectivity/index.html" title="game::ltn::connectivity mod">connectivity</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="draw_cells/index.html" title="game::ltn::draw_cells mod">draw_cells</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="partition/index.html" title="game::ltn::partition mod">partition</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="pathfinding/index.html" title="game::ltn::pathfinding mod">pathfinding</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="per_neighborhood/index.html" title="game::ltn::per_neighborhood mod">per_neighborhood</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="rat_run_viewer/index.html" title="game::ltn::rat_run_viewer mod">rat_run_viewer</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="rat_runs/index.html" title="game::ltn::rat_runs mod">rat_runs</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="select_boundary/index.html" title="game::ltn::select_boundary mod">select_boundary</a></div><div class="item-right docblock-short"></div></div></div><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2>
</div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="browse/index.html" title="game::ltn::browse mod">browse</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="connectivity/index.html" title="game::ltn::connectivity mod">connectivity</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="draw_cells/index.html" title="game::ltn::draw_cells mod">draw_cells</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="filters/index.html" title="game::ltn::filters mod">filters</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="partition/index.html" title="game::ltn::partition mod">partition</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="pathfinding/index.html" title="game::ltn::pathfinding mod">pathfinding</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="per_neighborhood/index.html" title="game::ltn::per_neighborhood mod">per_neighborhood</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="rat_run_viewer/index.html" title="game::ltn::rat_run_viewer mod">rat_run_viewer</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="rat_runs/index.html" title="game::ltn::rat_runs mod">rat_runs</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="select_boundary/index.html" title="game::ltn::select_boundary mod">select_boundary</a></div><div class="item-right docblock-short"></div></div></div><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2>
<div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Cell.html" title="game::ltn::Cell struct">Cell</a></div><div class="item-right docblock-short"><p>A partitioning of the interior of a neighborhood based on driving connectivity</p>
</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.DiagonalFilter.html" title="game::ltn::DiagonalFilter struct">DiagonalFilter</a></div><div class="item-right docblock-short"><p>A diagonal filter exists in an intersection. Its defined by two roads (the order is
arbitrary). When all of the intersections roads are sorted in clockwise order, this pair of
roads splits the ordering into two groups. Turns in each group are still possible, but not
across groups.</p>
</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.DistanceInterval.html" title="game::ltn::DistanceInterval struct">DistanceInterval</a></div><div class="item-right docblock-short"><p>An interval along a roads length, with start &lt; end.</p>
</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.ModalFilters.html" title="game::ltn::ModalFilters struct">ModalFilters</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Neighborhood.html" title="game::ltn::Neighborhood struct">Neighborhood</a></div><div class="item-right docblock-short"></div></div></div><h2 id="functions" class="section-header"><a href="#functions">Functions</a></h2>
<div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.draw_zoomed_planters.html" title="game::ltn::draw_zoomed_planters fn">draw_zoomed_planters</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.find_cells.html" title="game::ltn::find_cells fn">find_cells</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.floodfill.html" title="game::ltn::floodfill fn">floodfill</a></div><div class="item-right docblock-short"></div></div></div></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="game" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div>
</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Neighborhood.html" title="game::ltn::Neighborhood struct">Neighborhood</a></div><div class="item-right docblock-short"></div></div></div><h2 id="functions" class="section-header"><a href="#functions">Functions</a></h2>
<div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.find_cells.html" title="game::ltn::find_cells fn">find_cells</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.floodfill.html" title="game::ltn::floodfill fn">floodfill</a></div><div class="item-right docblock-short"></div></div></div></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="game" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div>
<script src="../../main.js"></script>
</body></html>

View File

@ -1,3 +1,3 @@
<!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 `find_rat_runs` fn in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, find_rat_runs"><title>find_rat_runs in game::ltn::rat_runs - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script id="default-settings" ></script><script src="../../../storage.js"></script><script src="../../../crates.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../../favicon.svg"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#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"><h2 class="location">Other items in<br><a href="../../index.html">game</a>::<wbr><a href="../index.html">ltn</a>::<wbr><a href="index.html">rat_runs</a></h2><div id="sidebar-vars" data-name="find_rat_runs" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><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><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../../index.html">game</a>::<wbr><a href="../index.html">ltn</a>::<wbr><a href="index.html">rat_runs</a>::<wbr><a class="fn" href="#">find_rat_runs</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><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/ltn/rat_runs.rs.html#17-106" title="goto source code">[src]</a></span></h1><pre class="rust fn"><code>pub fn find_rat_runs(<br>&nbsp;&nbsp;&nbsp;&nbsp;map: &amp;<a class="struct" href="../../../map_model/struct.Map.html" title="struct map_model::Map">Map</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;neighborhood: &amp;<a class="struct" href="../struct.Neighborhood.html" title="struct game::ltn::Neighborhood">Neighborhood</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;modal_filters: &amp;<a class="struct" href="../struct.ModalFilters.html" title="struct game::ltn::ModalFilters">ModalFilters</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;timer: &amp;mut <a class="struct" href="../../../abstutil/time/struct.Timer.html" title="struct abstutil::time::Timer">Timer</a>&lt;'_&gt;<br>) -&gt; <a class="struct" href="struct.RatRuns.html" title="struct game::ltn::rat_runs::RatRuns">RatRuns</a></code></pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="game" data-search-index-js="../../../search-index.js" data-search-js="../../../search.js"></div>
<!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 `find_rat_runs` fn in crate `game`."><meta name="keywords" content="rust, rustlang, rust-lang, find_rat_runs"><title>find_rat_runs in game::ltn::rat_runs - Rust</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script id="default-settings" ></script><script src="../../../storage.js"></script><script src="../../../crates.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../../favicon.svg"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#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"><h2 class="location">Other items in<br><a href="../../index.html">game</a>::<wbr><a href="../index.html">ltn</a>::<wbr><a href="index.html">rat_runs</a></h2><div id="sidebar-vars" data-name="find_rat_runs" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><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><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../../index.html">game</a>::<wbr><a href="../index.html">ltn</a>::<wbr><a href="index.html">rat_runs</a>::<wbr><a class="fn" href="#">find_rat_runs</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><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/ltn/rat_runs.rs.html#17-106" title="goto source code">[src]</a></span></h1><pre class="rust fn"><code>pub fn find_rat_runs(<br>&nbsp;&nbsp;&nbsp;&nbsp;map: &amp;<a class="struct" href="../../../map_model/struct.Map.html" title="struct map_model::Map">Map</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;neighborhood: &amp;<a class="struct" href="../struct.Neighborhood.html" title="struct game::ltn::Neighborhood">Neighborhood</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;modal_filters: &amp;<a class="struct" href="../filters/struct.ModalFilters.html" title="struct game::ltn::filters::ModalFilters">ModalFilters</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;timer: &amp;mut <a class="struct" href="../../../abstutil/time/struct.Timer.html" title="struct abstutil::time::Timer">Timer</a>&lt;'_&gt;<br>) -&gt; <a class="struct" href="struct.RatRuns.html" title="struct game::ltn::rat_runs::RatRuns">RatRuns</a></code></pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="game" data-search-index-js="../../../search-index.js" data-search-js="../../../search.js"></div>
<script src="../../../main.js"></script>
</body></html>

View File

@ -1 +1 @@
initSidebarItems({"fn":[["draw_zoomed_planters",""],["find_cells",""],["floodfill",""]],"mod":[["auto","Experiments to make a neighborhood be low-traffic by automatically placing filters to prevent all rat runs."],["browse",""],["connectivity",""],["draw_cells",""],["partition",""],["pathfinding",""],["per_neighborhood",""],["rat_run_viewer",""],["rat_runs",""],["select_boundary",""]],"struct":[["Cell","A partitioning of the interior of a neighborhood based on driving connectivity"],["DiagonalFilter","A diagonal filter exists in an intersection. Its defined by two roads (the order is arbitrary). When all of the intersections roads are sorted in clockwise order, this pair of roads splits the ordering into two groups. Turns in each group are still possible, but not across groups."],["DistanceInterval","An interval along a roads length, with start < end."],["ModalFilters",""],["Neighborhood",""]]});
initSidebarItems({"fn":[["find_cells",""],["floodfill",""]],"mod":[["auto","Experiments to make a neighborhood be low-traffic by automatically placing filters to prevent all rat runs."],["browse",""],["connectivity",""],["draw_cells",""],["filters",""],["partition",""],["pathfinding",""],["per_neighborhood",""],["rat_run_viewer",""],["rat_runs",""],["select_boundary",""]],"struct":[["Cell","A partitioning of the interior of a neighborhood based on driving connectivity"],["DistanceInterval","An interval along a roads length, with start < end."],["Neighborhood",""]]});

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="A partitioning of the interior of a neighborhood based on driving connectivity"><meta name="keywords" content="rust, rustlang, rust-lang, Cell"><title>Cell in game::ltn - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings" ></script><script src="../../storage.js"></script><script src="../../crates.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../favicon.svg"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../../game/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><h2 class="location">Struct Cell</h2><div class="sidebar-elems"><div class="block items"><h3 class="sidebar-title"><a href="#fields">Fields</a></h3><div class="sidebar-links"><a href="#structfield.borders">borders</a><a href="#structfield.car_free">car_free</a><a href="#structfield.roads">roads</a></div><h3 class="sidebar-title"><a href="#implementations">Methods</a></h3><div class="sidebar-links"><a href="#method.is_disconnected">is_disconnected</a></div><h3 class="sidebar-title"><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><h3 class="sidebar-title"><a href="#blanket-implementations">Blanket Implementations</a></h3><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-Downcast">Downcast</a><a href="#impl-DowncastSync">DowncastSync</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Instrument">Instrument</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-Same%3CT%3E">Same&lt;T&gt;</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a><a href="#impl-VZip%3CV%3E">VZip&lt;V&gt;</a></div></div><h2 class="location">Other items in<br><a href="../index.html">game</a>::<wbr><a href="index.html">ltn</a></h2><div id="sidebar-vars" data-name="Cell" data-ty="struct" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><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><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Struct <a href="../index.html">game</a>::<wbr><a href="index.html">ltn</a>::<wbr><a class="struct" href="#">Cell</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><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/ltn/mod.rs.html#153-162" title="goto source code">[src]</a></span></h1><div class="docblock type-decl"><pre class="rust struct"><code>pub struct Cell {
<!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="A partitioning of the interior of a neighborhood based on driving connectivity"><meta name="keywords" content="rust, rustlang, rust-lang, Cell"><title>Cell in game::ltn - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings" ></script><script src="../../storage.js"></script><script src="../../crates.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../favicon.svg"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../../game/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><h2 class="location">Struct Cell</h2><div class="sidebar-elems"><div class="block items"><h3 class="sidebar-title"><a href="#fields">Fields</a></h3><div class="sidebar-links"><a href="#structfield.borders">borders</a><a href="#structfield.car_free">car_free</a><a href="#structfield.roads">roads</a></div><h3 class="sidebar-title"><a href="#implementations">Methods</a></h3><div class="sidebar-links"><a href="#method.is_disconnected">is_disconnected</a></div><h3 class="sidebar-title"><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><h3 class="sidebar-title"><a href="#blanket-implementations">Blanket Implementations</a></h3><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-Downcast">Downcast</a><a href="#impl-DowncastSync">DowncastSync</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Instrument">Instrument</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-Same%3CT%3E">Same&lt;T&gt;</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a><a href="#impl-VZip%3CV%3E">VZip&lt;V&gt;</a></div></div><h2 class="location">Other items in<br><a href="../index.html">game</a>::<wbr><a href="index.html">ltn</a></h2><div id="sidebar-vars" data-name="Cell" data-ty="struct" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><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><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Struct <a href="../index.html">game</a>::<wbr><a href="index.html">ltn</a>::<wbr><a class="struct" href="#">Cell</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><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/ltn/mod.rs.html#46-55" title="goto source code">[src]</a></span></h1><div class="docblock type-decl"><pre class="rust struct"><code>pub struct Cell {
pub roads: <a class="struct" href="https://doc.rust-lang.org/1.57.0/alloc/collections/btree/map/struct.BTreeMap.html" title="struct alloc::collections::btree::map::BTreeMap">BTreeMap</a>&lt;<a class="struct" href="../../map_model/objects/road/struct.RoadID.html" title="struct map_model::objects::road::RoadID">RoadID</a>, <a class="struct" href="struct.DistanceInterval.html" title="struct game::ltn::DistanceInterval">DistanceInterval</a>&gt;,
pub borders: <a class="struct" href="https://doc.rust-lang.org/1.57.0/alloc/collections/btree/set/struct.BTreeSet.html" title="struct alloc::collections::btree::set::BTreeSet">BTreeSet</a>&lt;<a class="struct" href="../../map_model/objects/intersection/struct.IntersectionID.html" title="struct map_model::objects::intersection::IntersectionID">IntersectionID</a>&gt;,
pub car_free: <a class="primitive" href="https://doc.rust-lang.org/1.57.0/std/primitive.bool.html">bool</a>,
@ -8,7 +8,7 @@ between two cells, and the DistanceInterval indicates the split. The distances a
roads center line length.</p>
</div><span id="structfield.borders" class="structfield small-section-header"><a href="#structfield.borders" class="anchor field"></a><code>borders: <a class="struct" href="https://doc.rust-lang.org/1.57.0/alloc/collections/btree/set/struct.BTreeSet.html" title="struct alloc::collections::btree::set::BTreeSet">BTreeSet</a>&lt;<a class="struct" href="../../map_model/objects/intersection/struct.IntersectionID.html" title="struct map_model::objects::intersection::IntersectionID">IntersectionID</a>&gt;</code></span><div class="docblock"><p>Intersections where this cell touches the boundary of the neighborhood.</p>
</div><span id="structfield.car_free" class="structfield small-section-header"><a href="#structfield.car_free" class="anchor field"></a><code>car_free: <a class="primitive" href="https://doc.rust-lang.org/1.57.0/std/primitive.bool.html">bool</a></code></span><div class="docblock"><p>This cell only contains roads that ban cars.</p>
</div><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/game/ltn/mod.rs.html#164-170" title="goto source code">[src]</a></div><a href="#impl" class="anchor"></a><h3 class="code-header in-band">impl <a class="struct" href="struct.Cell.html" title="struct game::ltn::Cell">Cell</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.is_disconnected" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../src/game/ltn/mod.rs.html#167-169" title="goto source code">[src]</a></div><a href="#method.is_disconnected" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.is_disconnected" class="fnname">is_disconnected</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.57.0/std/primitive.bool.html">bool</a></h4></div></summary><div class="docblock"><p>A cell is disconnected if its not connected to a perimeter road. (The exception is cells
</div><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/game/ltn/mod.rs.html#57-63" title="goto source code">[src]</a></div><a href="#impl" class="anchor"></a><h3 class="code-header in-band">impl <a class="struct" href="struct.Cell.html" title="struct game::ltn::Cell">Cell</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.is_disconnected" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../src/game/ltn/mod.rs.html#60-62" title="goto source code">[src]</a></div><a href="#method.is_disconnected" class="anchor"></a><h4 class="code-header">pub fn <a href="#method.is_disconnected" class="fnname">is_disconnected</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.57.0/std/primitive.bool.html">bool</a></h4></div></summary><div class="docblock"><p>A cell is disconnected if its not connected to a perimeter road. (The exception is cells
containing roads that by their OSM classification already ban cars.)</p>
</div></details></div></details><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><div id="impl-RefUnwindSafe" class="impl has-srclink"><div class="rightside"></div><a href="#impl-RefUnwindSafe" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.57.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.Cell.html" title="struct game::ltn::Cell">Cell</a></h3></div><div id="impl-Send" class="impl has-srclink"><div class="rightside"></div><a href="#impl-Send" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.57.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.Cell.html" title="struct game::ltn::Cell">Cell</a></h3></div><div id="impl-Sync" class="impl has-srclink"><div class="rightside"></div><a href="#impl-Sync" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.57.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.Cell.html" title="struct game::ltn::Cell">Cell</a></h3></div><div id="impl-Unpin" class="impl has-srclink"><div class="rightside"></div><a href="#impl-Unpin" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.57.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.Cell.html" title="struct game::ltn::Cell">Cell</a></h3></div><div id="impl-UnwindSafe" class="impl has-srclink"><div class="rightside"></div><a href="#impl-UnwindSafe" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/1.57.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.Cell.html" title="struct game::ltn::Cell">Cell</a></h3></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"><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Any" class="impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.57.0/src/core/any.rs.html#132-136" title="goto source code">[src]</a></div><a href="#impl-Any" class="anchor"></a><h3 class="code-header in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.57.0/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/1.57.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.type_id" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.57.0/src/core/any.rs.html#133" title="goto source code">[src]</a></div><a href="#method.type_id" class="anchor"></a><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.57.0/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/1.57.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></div></summary><div class='docblock'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.57.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Borrow%3CT%3E" class="impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.57.0/src/core/borrow.rs.html#208-213" title="goto source code">[src]</a></div><a href="#impl-Borrow%3CT%3E" class="anchor"></a><h3 class="code-header in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/1.57.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/1.57.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.borrow" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/1.57.0/src/core/borrow.rs.html#210" title="goto source code">[src]</a></div><a href="#method.borrow" class="anchor"></a><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/1.57.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.57.0/std/primitive.reference.html">&amp;</a>T</h4></div></summary><div class='docblock'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.57.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>

View File

@ -1,4 +1,4 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="An interval along a roads length, with start &lt; end."><meta name="keywords" content="rust, rustlang, rust-lang, DistanceInterval"><title>DistanceInterval in game::ltn - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings" ></script><script src="../../storage.js"></script><script src="../../crates.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../favicon.svg"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../../game/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><h2 class="location">Struct DistanceInterval</h2><div class="sidebar-elems"><div class="block items"><h3 class="sidebar-title"><a href="#fields">Fields</a></h3><div class="sidebar-links"><a href="#structfield.end">end</a><a href="#structfield.start">start</a></div><h3 class="sidebar-title"><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><h3 class="sidebar-title"><a href="#blanket-implementations">Blanket Implementations</a></h3><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-Downcast">Downcast</a><a href="#impl-DowncastSync">DowncastSync</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Instrument">Instrument</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-Same%3CT%3E">Same&lt;T&gt;</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a><a href="#impl-VZip%3CV%3E">VZip&lt;V&gt;</a></div></div><h2 class="location">Other items in<br><a href="../index.html">game</a>::<wbr><a href="index.html">ltn</a></h2><div id="sidebar-vars" data-name="DistanceInterval" data-ty="struct" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><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><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Struct <a href="../index.html">game</a>::<wbr><a href="index.html">ltn</a>::<wbr><a class="struct" href="#">DistanceInterval</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><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/ltn/mod.rs.html#173-176" title="goto source code">[src]</a></span></h1><div class="docblock type-decl"><pre class="rust struct"><code>pub struct DistanceInterval {
<!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="An interval along a roads length, with start &lt; end."><meta name="keywords" content="rust, rustlang, rust-lang, DistanceInterval"><title>DistanceInterval in game::ltn - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings" ></script><script src="../../storage.js"></script><script src="../../crates.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../favicon.svg"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../../game/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><h2 class="location">Struct DistanceInterval</h2><div class="sidebar-elems"><div class="block items"><h3 class="sidebar-title"><a href="#fields">Fields</a></h3><div class="sidebar-links"><a href="#structfield.end">end</a><a href="#structfield.start">start</a></div><h3 class="sidebar-title"><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><h3 class="sidebar-title"><a href="#blanket-implementations">Blanket Implementations</a></h3><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-Downcast">Downcast</a><a href="#impl-DowncastSync">DowncastSync</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Instrument">Instrument</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-Same%3CT%3E">Same&lt;T&gt;</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a><a href="#impl-VZip%3CV%3E">VZip&lt;V&gt;</a></div></div><h2 class="location">Other items in<br><a href="../index.html">game</a>::<wbr><a href="index.html">ltn</a></h2><div id="sidebar-vars" data-name="DistanceInterval" data-ty="struct" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><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><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Struct <a href="../index.html">game</a>::<wbr><a href="index.html">ltn</a>::<wbr><a class="struct" href="#">DistanceInterval</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><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/ltn/mod.rs.html#66-69" title="goto source code">[src]</a></span></h1><div class="docblock type-decl"><pre class="rust struct"><code>pub struct DistanceInterval {
pub start: <a class="struct" href="../../geom/distance/struct.Distance.html" title="struct geom::distance::Distance">Distance</a>,
pub end: <a class="struct" href="../../geom/distance/struct.Distance.html" title="struct geom::distance::Distance">Distance</a>,
}</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>An interval along a roads length, with start &lt; end.</p>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
(function() {var implementors = {};
implementors["abstutil"] = [{"text":"impl&lt;K, V&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/1.57.0/core/default/trait.Default.html\" title=\"trait core::default::Default\">Default</a> for <a class=\"struct\" href=\"abstutil/collections/struct.MultiMap.html\" title=\"struct abstutil::collections::MultiMap\">MultiMap</a>&lt;K, V&gt; <span class=\"where fmt-newline\">where<br>&nbsp;&nbsp;&nbsp;&nbsp;K: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.57.0/core/cmp/trait.Ord.html\" title=\"trait core::cmp::Ord\">Ord</a> + <a class=\"trait\" href=\"https://doc.rust-lang.org/1.57.0/core/cmp/trait.PartialEq.html\" title=\"trait core::cmp::PartialEq\">PartialEq</a> + <a class=\"trait\" href=\"https://doc.rust-lang.org/1.57.0/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;V: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.57.0/core/cmp/trait.Ord.html\" title=\"trait core::cmp::Ord\">Ord</a> + <a class=\"trait\" href=\"https://doc.rust-lang.org/1.57.0/core/cmp/trait.PartialEq.html\" title=\"trait core::cmp::PartialEq\">PartialEq</a> + <a class=\"trait\" href=\"https://doc.rust-lang.org/1.57.0/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a>,&nbsp;</span>","synthetic":false,"types":["abstutil::collections::MultiMap"]},{"text":"impl&lt;T:&nbsp;<a class=\"trait\" href=\"https://doc.rust-lang.org/1.57.0/core/cmp/trait.Ord.html\" title=\"trait core::cmp::Ord\">Ord</a> + <a class=\"trait\" href=\"https://doc.rust-lang.org/1.57.0/core/cmp/trait.PartialEq.html\" title=\"trait core::cmp::PartialEq\">PartialEq</a> + <a class=\"trait\" href=\"https://doc.rust-lang.org/1.57.0/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a>&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/1.57.0/core/default/trait.Default.html\" title=\"trait core::default::Default\">Default</a> for <a class=\"struct\" href=\"abstutil/collections/struct.Counter.html\" title=\"struct abstutil::collections::Counter\">Counter</a>&lt;T&gt;","synthetic":false,"types":["abstutil::collections::Counter"]},{"text":"impl&lt;K:&nbsp;<a class=\"trait\" href=\"https://doc.rust-lang.org/1.57.0/core/clone/trait.Clone.html\" title=\"trait core::clone::Clone\">Clone</a> + <a class=\"trait\" href=\"https://doc.rust-lang.org/1.57.0/core/cmp/trait.PartialEq.html\" title=\"trait core::cmp::PartialEq\">PartialEq</a>, V&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/1.57.0/core/default/trait.Default.html\" title=\"trait core::default::Default\">Default</a> for <a class=\"struct\" href=\"abstutil/collections/struct.VecMap.html\" title=\"struct abstutil::collections::VecMap\">VecMap</a>&lt;K, V&gt;","synthetic":false,"types":["abstutil::collections::VecMap"]},{"text":"impl&lt;K:&nbsp;<a class=\"trait\" href=\"abstutil/collections/trait.IndexableKey.html\" title=\"trait abstutil::collections::IndexableKey\">IndexableKey</a>, V&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/1.57.0/core/default/trait.Default.html\" title=\"trait core::default::Default\">Default</a> for <a class=\"struct\" href=\"abstutil/collections/struct.FixedMap.html\" title=\"struct abstutil::collections::FixedMap\">FixedMap</a>&lt;K, V&gt;","synthetic":false,"types":["abstutil::collections::FixedMap"]}];
implementors["game"] = [{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.57.0/core/default/trait.Default.html\" title=\"trait core::default::Default\">Default</a> for <a class=\"struct\" href=\"game/ltn/struct.ModalFilters.html\" title=\"struct game::ltn::ModalFilters\">ModalFilters</a>","synthetic":false,"types":["game::ltn::ModalFilters"]}];
implementors["game"] = [{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.57.0/core/default/trait.Default.html\" title=\"trait core::default::Default\">Default</a> for <a class=\"struct\" href=\"game/ltn/filters/struct.ModalFilters.html\" title=\"struct game::ltn::filters::ModalFilters\">ModalFilters</a>","synthetic":false,"types":["game::ltn::filters::ModalFilters"]}];
implementors["geom"] = [{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.57.0/core/default/trait.Default.html\" title=\"trait core::default::Default\">Default</a> for <a class=\"struct\" href=\"geom/distance/struct.Distance.html\" title=\"struct geom::distance::Distance\">Distance</a>","synthetic":false,"types":["geom::distance::Distance"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.57.0/core/default/trait.Default.html\" title=\"trait core::default::Default\">Default</a> for <a class=\"struct\" href=\"geom/duration/struct.Duration.html\" title=\"struct geom::duration::Duration\">Duration</a>","synthetic":false,"types":["geom::duration::Duration"]},{"text":"impl&lt;T:&nbsp;<a class=\"trait\" href=\"geom/stats/trait.HgramValue.html\" title=\"trait geom::stats::HgramValue\">HgramValue</a>&lt;T&gt;&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/1.57.0/core/default/trait.Default.html\" title=\"trait core::default::Default\">Default</a> for <a class=\"struct\" href=\"geom/stats/struct.Histogram.html\" title=\"struct geom::stats::Histogram\">Histogram</a>&lt;T&gt;","synthetic":false,"types":["geom::stats::Histogram"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.57.0/core/default/trait.Default.html\" title=\"trait core::default::Default\">Default</a> for <a class=\"struct\" href=\"geom/time/struct.Time.html\" title=\"struct geom::time::Time\">Time</a>","synthetic":false,"types":["geom::time::Time"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.57.0/core/default/trait.Default.html\" title=\"trait core::default::Default\">Default</a> for <a class=\"struct\" href=\"geom/struct.CornerRadii.html\" title=\"struct geom::CornerRadii\">CornerRadii</a>","synthetic":false,"types":["geom::CornerRadii"]}];
implementors["importer"] = [{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.57.0/core/default/trait.Default.html\" title=\"trait core::default::Default\">Default</a> for <a class=\"struct\" href=\"importer/configuration/struct.ImporterConfiguration.html\" title=\"struct importer::configuration::ImporterConfiguration\">ImporterConfiguration</a>","synthetic":false,"types":["importer::configuration::ImporterConfiguration"]}];
implementors["map_model"] = [{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.57.0/core/default/trait.Default.html\" title=\"trait core::default::Default\">Default</a> for <a class=\"struct\" href=\"map_model/edits/struct.MapEdits.html\" title=\"struct map_model::edits::MapEdits\">MapEdits</a>","synthetic":false,"types":["map_model::edits::MapEdits"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.57.0/core/default/trait.Default.html\" title=\"trait core::default::Default\">Default</a> for <a class=\"struct\" href=\"map_model/make/struct.RawToMapOptions.html\" title=\"struct map_model::make::RawToMapOptions\">RawToMapOptions</a>","synthetic":false,"types":["map_model::make::RawToMapOptions"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.57.0/core/default/trait.Default.html\" title=\"trait core::default::Default\">Default</a> for <a class=\"struct\" href=\"map_model/pathfind/struct.RoutingParams.html\" title=\"struct map_model::pathfind::RoutingParams\">RoutingParams</a>","synthetic":false,"types":["map_model::pathfind::RoutingParams"]}];

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

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="The build time in RFC2822, UTC."><meta name="keywords" content="rust, rustlang, rust-lang, BUILT_TIME_UTC"><title>BUILT_TIME_UTC in map_gui::tools::title_screen::built_info - Rust</title><link rel="stylesheet" type="text/css" href="../../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../../ayu.css" disabled ><script id="default-settings" ></script><script src="../../../../storage.js"></script><script src="../../../../crates.js"></script><noscript><link rel="stylesheet" href="../../../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../../../favicon.svg"><style type="text/css">#crate-search{background-image:url("../../../../down-arrow.svg");}</style></head><body class="rustdoc constant"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../../../../map_gui/index.html'><div class='logo-container rust-logo'><img src='../../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="../../../index.html">map_gui</a>::<wbr><a href="../../index.html">tools</a>::<wbr><a href="../index.html">title_screen</a>::<wbr><a href="index.html">built_info</a></h2><div id="sidebar-vars" data-name="BUILT_TIME_UTC" data-ty="constant" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><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><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Constant <a href="../../../index.html">map_gui</a>::<wbr><a href="../../index.html">tools</a>::<wbr><a href="../index.html">title_screen</a>::<wbr><a href="index.html">built_info</a>::<wbr><a class="constant" href="#">BUILT_TIME_UTC</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><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/map_gui/home/runner/work/abstreet/abstreet/target/debug/build/map_gui-5b11ba30aa99b1f3/out/built.rs.html#78" title="goto source code">[src]</a></span></h1><pre class="rust const"><code>pub const BUILT_TIME_UTC: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.57.0/std/primitive.str.html">str</a> = r&quot;Wed, 12 Jan 2022 13:56:14 +0000&quot;;</code></pre><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The build time in RFC2822, UTC.</p>
<!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="The build time in RFC2822, UTC."><meta name="keywords" content="rust, rustlang, rust-lang, BUILT_TIME_UTC"><title>BUILT_TIME_UTC in map_gui::tools::title_screen::built_info - Rust</title><link rel="stylesheet" type="text/css" href="../../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../../ayu.css" disabled ><script id="default-settings" ></script><script src="../../../../storage.js"></script><script src="../../../../crates.js"></script><noscript><link rel="stylesheet" href="../../../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../../../favicon.svg"><style type="text/css">#crate-search{background-image:url("../../../../down-arrow.svg");}</style></head><body class="rustdoc constant"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../../../../map_gui/index.html'><div class='logo-container rust-logo'><img src='../../../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="../../../index.html">map_gui</a>::<wbr><a href="../../index.html">tools</a>::<wbr><a href="../index.html">title_screen</a>::<wbr><a href="index.html">built_info</a></h2><div id="sidebar-vars" data-name="BUILT_TIME_UTC" data-ty="constant" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><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><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Constant <a href="../../../index.html">map_gui</a>::<wbr><a href="../../index.html">tools</a>::<wbr><a href="../index.html">title_screen</a>::<wbr><a href="index.html">built_info</a>::<wbr><a class="constant" href="#">BUILT_TIME_UTC</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><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/map_gui/home/runner/work/abstreet/abstreet/target/debug/build/map_gui-5b11ba30aa99b1f3/out/built.rs.html#78" title="goto source code">[src]</a></span></h1><pre class="rust const"><code>pub const BUILT_TIME_UTC: &amp;<a class="primitive" href="https://doc.rust-lang.org/1.57.0/std/primitive.str.html">str</a> = r&quot;Wed, 12 Jan 2022 14:02:39 +0000&quot;;</code></pre><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The build time in RFC2822, UTC.</p>
</div></details></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../../../" data-current-crate="map_gui" data-search-index-js="../../../../search-index.js" data-search-js="../../../../search.js"></div>
<script src="../../../../main.js"></script>
</body></html>

File diff suppressed because one or more lines are too long

View File

@ -5,7 +5,7 @@ sourcesIndex["cli"] = {"name":"","files":["augment_scenario.rs","clip_osm.rs","g
sourcesIndex["collisions"] = {"name":"","files":["lib.rs"]};
sourcesIndex["convert_osm"] = {"name":"","files":["clip.rs","elevation.rs","extract.rs","gtfs.rs","lib.rs","osm_geom.rs","parking.rs","reader.rs","split_ways.rs"]};
sourcesIndex["fifteen_min"] = {"name":"","files":["find_amenities.rs","find_home.rs","isochrone.rs","lib.rs","viewer.rs"]};
sourcesIndex["game"] = {"name":"","dirs":[{"name":"challenges","files":["cutscene.rs","mod.rs","prebake.rs"]},{"name":"common","files":["mod.rs","route_sketcher.rs","select.rs","share.rs","warp.rs","waypoints.rs"]},{"name":"debug","files":["blocked_by.rs","blockfinder.rs","floodfill.rs","mod.rs","objects.rs","path_counter.rs","polygons.rs","routes.rs","select_roads.rs","shared_row.rs","streetmix.rs","uber_turns.rs"]},{"name":"devtools","files":["collisions.rs","destinations.rs","kml.rs","mod.rs","polygon.rs","scenario.rs","story.rs"]},{"name":"edit","dirs":[{"name":"traffic_signals","files":["edits.rs","gmns.rs","mod.rs","offsets.rs","picker.rs","preview.rs"]}],"files":["heuristics.rs","mod.rs","multiple_roads.rs","roads.rs","routes.rs","stop_signs.rs","validate.rs","zones.rs"]},{"name":"info","files":["building.rs","debug.rs","intersection.rs","lane.rs","mod.rs","parking_lot.rs","person.rs","transit.rs","trip.rs"]},{"name":"layer","files":["elevation.rs","favorites.rs","map.rs","mod.rs","pandemic.rs","parking.rs","population.rs","problems.rs","traffic.rs","transit.rs"]},{"name":"ltn","files":["auto.rs","browse.rs","connectivity.rs","draw_cells.rs","mod.rs","partition.rs","pathfinding.rs","per_neighborhood.rs","rat_run_viewer.rs","rat_runs.rs","select_boundary.rs"]},{"name":"pregame","files":["mod.rs","proposals.rs"]},{"name":"sandbox","dirs":[{"name":"dashboards","files":["commuter.rs","generic_trip_table.rs","misc.rs","mod.rs","mode_shift.rs","parking_overhead.rs","risks.rs","selector.rs","traffic_signals.rs","travel_times.rs","trip_problems.rs","trip_table.rs"]},{"name":"gameplay","dirs":[{"name":"freeform","files":["area_spawner.rs","importers.rs","mod.rs","spawner.rs"]}],"files":["actdev.rs","commute.rs","fix_traffic_signals.rs","mod.rs","play_scenario.rs","tutorial.rs"]}],"files":["minimap.rs","misc_tools.rs","mod.rs","speed.rs","time_warp.rs"]},{"name":"ungap","dirs":[{"name":"trip","files":["files.rs","mod.rs","results.rs"]}],"files":["bike_network.rs","explore.rs","layers.rs","mod.rs","predict.rs","quick_sketch.rs"]}],"files":["app.rs","lib.rs"]};
sourcesIndex["game"] = {"name":"","dirs":[{"name":"challenges","files":["cutscene.rs","mod.rs","prebake.rs"]},{"name":"common","files":["mod.rs","route_sketcher.rs","select.rs","share.rs","warp.rs","waypoints.rs"]},{"name":"debug","files":["blocked_by.rs","blockfinder.rs","floodfill.rs","mod.rs","objects.rs","path_counter.rs","polygons.rs","routes.rs","select_roads.rs","shared_row.rs","streetmix.rs","uber_turns.rs"]},{"name":"devtools","files":["collisions.rs","destinations.rs","kml.rs","mod.rs","polygon.rs","scenario.rs","story.rs"]},{"name":"edit","dirs":[{"name":"traffic_signals","files":["edits.rs","gmns.rs","mod.rs","offsets.rs","picker.rs","preview.rs"]}],"files":["heuristics.rs","mod.rs","multiple_roads.rs","roads.rs","routes.rs","stop_signs.rs","validate.rs","zones.rs"]},{"name":"info","files":["building.rs","debug.rs","intersection.rs","lane.rs","mod.rs","parking_lot.rs","person.rs","transit.rs","trip.rs"]},{"name":"layer","files":["elevation.rs","favorites.rs","map.rs","mod.rs","pandemic.rs","parking.rs","population.rs","problems.rs","traffic.rs","transit.rs"]},{"name":"ltn","files":["auto.rs","browse.rs","connectivity.rs","draw_cells.rs","filters.rs","mod.rs","partition.rs","pathfinding.rs","per_neighborhood.rs","rat_run_viewer.rs","rat_runs.rs","select_boundary.rs"]},{"name":"pregame","files":["mod.rs","proposals.rs"]},{"name":"sandbox","dirs":[{"name":"dashboards","files":["commuter.rs","generic_trip_table.rs","misc.rs","mod.rs","mode_shift.rs","parking_overhead.rs","risks.rs","selector.rs","traffic_signals.rs","travel_times.rs","trip_problems.rs","trip_table.rs"]},{"name":"gameplay","dirs":[{"name":"freeform","files":["area_spawner.rs","importers.rs","mod.rs","spawner.rs"]}],"files":["actdev.rs","commute.rs","fix_traffic_signals.rs","mod.rs","play_scenario.rs","tutorial.rs"]}],"files":["minimap.rs","misc_tools.rs","mod.rs","speed.rs","time_warp.rs"]},{"name":"ungap","dirs":[{"name":"trip","files":["files.rs","mod.rs","results.rs"]}],"files":["bike_network.rs","explore.rs","layers.rs","mod.rs","predict.rs","quick_sketch.rs"]}],"files":["app.rs","lib.rs"]};
sourcesIndex["geom"] = {"name":"","files":["angle.rs","bounds.rs","circle.rs","conversions.rs","distance.rs","duration.rs","find_closest.rs","gps.rs","lib.rs","line.rs","percent.rs","polygon.rs","polyline.rs","pt.rs","ring.rs","speed.rs","stats.rs","time.rs"]};
sourcesIndex["headless"] = {"name":"","files":["main.rs"]};
sourcesIndex["importer"] = {"name":"","dirs":[{"name":"soundcast","files":["mod.rs","popdat.rs","trips.rs"]}],"files":["berlin.rs","configuration.rs","lib.rs","map_config.rs","pick_geofabrik.rs","seattle.rs","uk.rs","utils.rs"]};

View File

@ -0,0 +1,448 @@
<!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="Source of the Rust file `game&#x2F;src&#x2F;ltn&#x2F;filters.rs`."><meta name="keywords" content="rust, rustlang, rust-lang"><title>filters.rs - source</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script id="default-settings" ></script><script src="../../../storage.js"></script><script src="../../../crates.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../../favicon.svg"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc source"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../../../game/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><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><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../../wheel.svg"></a></div></form></nav><section id="main" class="content"><div class="example-wrap"><pre class="line-numbers"><span id="1"> 1</span>
<span id="2"> 2</span>
<span id="3"> 3</span>
<span id="4"> 4</span>
<span id="5"> 5</span>
<span id="6"> 6</span>
<span id="7"> 7</span>
<span id="8"> 8</span>
<span id="9"> 9</span>
<span id="10"> 10</span>
<span id="11"> 11</span>
<span id="12"> 12</span>
<span id="13"> 13</span>
<span id="14"> 14</span>
<span id="15"> 15</span>
<span id="16"> 16</span>
<span id="17"> 17</span>
<span id="18"> 18</span>
<span id="19"> 19</span>
<span id="20"> 20</span>
<span id="21"> 21</span>
<span id="22"> 22</span>
<span id="23"> 23</span>
<span id="24"> 24</span>
<span id="25"> 25</span>
<span id="26"> 26</span>
<span id="27"> 27</span>
<span id="28"> 28</span>
<span id="29"> 29</span>
<span id="30"> 30</span>
<span id="31"> 31</span>
<span id="32"> 32</span>
<span id="33"> 33</span>
<span id="34"> 34</span>
<span id="35"> 35</span>
<span id="36"> 36</span>
<span id="37"> 37</span>
<span id="38"> 38</span>
<span id="39"> 39</span>
<span id="40"> 40</span>
<span id="41"> 41</span>
<span id="42"> 42</span>
<span id="43"> 43</span>
<span id="44"> 44</span>
<span id="45"> 45</span>
<span id="46"> 46</span>
<span id="47"> 47</span>
<span id="48"> 48</span>
<span id="49"> 49</span>
<span id="50"> 50</span>
<span id="51"> 51</span>
<span id="52"> 52</span>
<span id="53"> 53</span>
<span id="54"> 54</span>
<span id="55"> 55</span>
<span id="56"> 56</span>
<span id="57"> 57</span>
<span id="58"> 58</span>
<span id="59"> 59</span>
<span id="60"> 60</span>
<span id="61"> 61</span>
<span id="62"> 62</span>
<span id="63"> 63</span>
<span id="64"> 64</span>
<span id="65"> 65</span>
<span id="66"> 66</span>
<span id="67"> 67</span>
<span id="68"> 68</span>
<span id="69"> 69</span>
<span id="70"> 70</span>
<span id="71"> 71</span>
<span id="72"> 72</span>
<span id="73"> 73</span>
<span id="74"> 74</span>
<span id="75"> 75</span>
<span id="76"> 76</span>
<span id="77"> 77</span>
<span id="78"> 78</span>
<span id="79"> 79</span>
<span id="80"> 80</span>
<span id="81"> 81</span>
<span id="82"> 82</span>
<span id="83"> 83</span>
<span id="84"> 84</span>
<span id="85"> 85</span>
<span id="86"> 86</span>
<span id="87"> 87</span>
<span id="88"> 88</span>
<span id="89"> 89</span>
<span id="90"> 90</span>
<span id="91"> 91</span>
<span id="92"> 92</span>
<span id="93"> 93</span>
<span id="94"> 94</span>
<span id="95"> 95</span>
<span id="96"> 96</span>
<span id="97"> 97</span>
<span id="98"> 98</span>
<span id="99"> 99</span>
<span id="100">100</span>
<span id="101">101</span>
<span id="102">102</span>
<span id="103">103</span>
<span id="104">104</span>
<span id="105">105</span>
<span id="106">106</span>
<span id="107">107</span>
<span id="108">108</span>
<span id="109">109</span>
<span id="110">110</span>
<span id="111">111</span>
<span id="112">112</span>
<span id="113">113</span>
<span id="114">114</span>
<span id="115">115</span>
<span id="116">116</span>
<span id="117">117</span>
<span id="118">118</span>
<span id="119">119</span>
<span id="120">120</span>
<span id="121">121</span>
<span id="122">122</span>
<span id="123">123</span>
<span id="124">124</span>
<span id="125">125</span>
<span id="126">126</span>
<span id="127">127</span>
<span id="128">128</span>
<span id="129">129</span>
<span id="130">130</span>
<span id="131">131</span>
<span id="132">132</span>
<span id="133">133</span>
<span id="134">134</span>
<span id="135">135</span>
<span id="136">136</span>
<span id="137">137</span>
<span id="138">138</span>
<span id="139">139</span>
<span id="140">140</span>
<span id="141">141</span>
<span id="142">142</span>
<span id="143">143</span>
<span id="144">144</span>
<span id="145">145</span>
<span id="146">146</span>
<span id="147">147</span>
<span id="148">148</span>
<span id="149">149</span>
<span id="150">150</span>
<span id="151">151</span>
<span id="152">152</span>
<span id="153">153</span>
<span id="154">154</span>
<span id="155">155</span>
<span id="156">156</span>
<span id="157">157</span>
<span id="158">158</span>
<span id="159">159</span>
<span id="160">160</span>
<span id="161">161</span>
<span id="162">162</span>
<span id="163">163</span>
<span id="164">164</span>
<span id="165">165</span>
<span id="166">166</span>
<span id="167">167</span>
<span id="168">168</span>
<span id="169">169</span>
<span id="170">170</span>
<span id="171">171</span>
<span id="172">172</span>
<span id="173">173</span>
<span id="174">174</span>
<span id="175">175</span>
<span id="176">176</span>
<span id="177">177</span>
<span id="178">178</span>
<span id="179">179</span>
<span id="180">180</span>
<span id="181">181</span>
<span id="182">182</span>
<span id="183">183</span>
<span id="184">184</span>
<span id="185">185</span>
<span id="186">186</span>
<span id="187">187</span>
<span id="188">188</span>
<span id="189">189</span>
<span id="190">190</span>
<span id="191">191</span>
<span id="192">192</span>
<span id="193">193</span>
<span id="194">194</span>
<span id="195">195</span>
<span id="196">196</span>
<span id="197">197</span>
<span id="198">198</span>
<span id="199">199</span>
<span id="200">200</span>
<span id="201">201</span>
<span id="202">202</span>
<span id="203">203</span>
<span id="204">204</span>
<span id="205">205</span>
<span id="206">206</span>
<span id="207">207</span>
<span id="208">208</span>
<span id="209">209</span>
<span id="210">210</span>
<span id="211">211</span>
<span id="212">212</span>
<span id="213">213</span>
<span id="214">214</span>
<span id="215">215</span>
<span id="216">216</span>
<span id="217">217</span>
<span id="218">218</span>
<span id="219">219</span>
<span id="220">220</span>
<span id="221">221</span>
<span id="222">222</span>
</pre><pre class="rust"><code><span class="kw">use</span> <span class="ident">std::collections</span>::{<span class="ident">BTreeMap</span>, <span class="ident">BTreeSet</span>};
<span class="kw">use</span> <span class="ident">geom</span>::{<span class="ident">Circle</span>, <span class="ident">Distance</span>, <span class="ident">Line</span>};
<span class="kw">use</span> <span class="ident">map_model</span>::{<span class="ident">IntersectionID</span>, <span class="ident">Map</span>, <span class="ident">RoadID</span>, <span class="ident">RoutingParams</span>, <span class="ident">TurnID</span>};
<span class="kw">use</span> <span class="ident">widgetry::mapspace::ToggleZoomed</span>;
<span class="kw">use</span> <span class="ident">widgetry</span>::{<span class="ident">Color</span>, <span class="ident">EventCtx</span>, <span class="ident">GeomBatch</span>};
<span class="kw">use</span> <span class="ident"><span class="kw">super</span>::Neighborhood</span>;
<span class="kw">use</span> <span class="ident"><span class="kw">crate</span>::app::App</span>;
<span class="doccomment">/// Stored in App session state</span>
<span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Default</span>)]</span>
<span class="kw">pub</span> <span class="kw">struct</span> <span class="ident">ModalFilters</span> {
<span class="doccomment">/// For filters placed along a road, where is the filter located?</span>
<span class="kw">pub</span> <span class="ident">roads</span>: <span class="ident">BTreeMap</span><span class="op">&lt;</span><span class="ident">RoadID</span>, <span class="ident">Distance</span><span class="op">&gt;</span>,
<span class="kw">pub</span> <span class="ident">intersections</span>: <span class="ident">BTreeMap</span><span class="op">&lt;</span><span class="ident">IntersectionID</span>, <span class="ident">DiagonalFilter</span><span class="op">&gt;</span>,
}
<span class="doccomment">/// A diagonal filter exists in an intersection. It&#39;s defined by two roads (the order is</span>
<span class="doccomment">/// arbitrary). When all of the intersection&#39;s roads are sorted in clockwise order, this pair of</span>
<span class="doccomment">/// roads splits the ordering into two groups. Turns in each group are still possible, but not</span>
<span class="doccomment">/// across groups.</span>
<span class="doccomment">///</span>
<span class="doccomment">/// TODO Be careful with PartialEq! At a 4-way intersection, the same filter can be expressed as a</span>
<span class="doccomment">/// different pair of two roads. And the (r1, r2) ordering is also arbitrary.</span>
<span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Clone</span>, <span class="ident">PartialEq</span>)]</span>
<span class="kw">pub</span> <span class="kw">struct</span> <span class="ident">DiagonalFilter</span> {
<span class="ident">r1</span>: <span class="ident">RoadID</span>,
<span class="ident">r2</span>: <span class="ident">RoadID</span>,
<span class="ident">i</span>: <span class="ident">IntersectionID</span>,
<span class="ident">group1</span>: <span class="ident">BTreeSet</span><span class="op">&lt;</span><span class="ident">RoadID</span><span class="op">&gt;</span>,
<span class="ident">group2</span>: <span class="ident">BTreeSet</span><span class="op">&lt;</span><span class="ident">RoadID</span><span class="op">&gt;</span>,
}
<span class="kw">impl</span> <span class="ident">ModalFilters</span> {
<span class="doccomment">/// Modify RoutingParams to respect these modal filters</span>
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">update_routing_params</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">params</span>: <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">RoutingParams</span>) {
<span class="ident">params</span>.<span class="ident">avoid_roads</span>.<span class="ident">extend</span>(<span class="self">self</span>.<span class="ident">roads</span>.<span class="ident">keys</span>().<span class="ident">cloned</span>());
<span class="kw">for</span> <span class="ident">filter</span> <span class="kw">in</span> <span class="self">self</span>.<span class="ident">intersections</span>.<span class="ident">values</span>() {
<span class="ident">params</span>
.<span class="ident">avoid_movements_between</span>
.<span class="ident">extend</span>(<span class="ident">filter</span>.<span class="ident">avoid_movements_between_roads</span>());
}
}
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">allows_turn</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">t</span>: <span class="ident">TurnID</span>) -&gt; <span class="ident">bool</span> {
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">filter</span>) <span class="op">=</span> <span class="self">self</span>.<span class="ident">intersections</span>.<span class="ident">get</span>(<span class="kw-2">&amp;</span><span class="ident">t</span>.<span class="ident">parent</span>) {
<span class="kw">return</span> <span class="ident">filter</span>.<span class="ident">allows_turn</span>(<span class="ident">t</span>.<span class="ident">src</span>.<span class="ident">road</span>, <span class="ident">t</span>.<span class="ident">dst</span>.<span class="ident">road</span>);
}
<span class="bool-val">true</span>
}
<span class="doccomment">/// Draw all modal filters. If `only_neighborhood` is specified, only draw filters belonging to</span>
<span class="doccomment">/// one area.</span>
<span class="kw">pub</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">ctx</span>: <span class="kw-2">&amp;</span><span class="ident">EventCtx</span>,
<span class="ident">map</span>: <span class="kw-2">&amp;</span><span class="ident">Map</span>,
<span class="ident">only_neighborhood</span>: <span class="prelude-ty">Option</span><span class="op">&lt;</span><span class="kw-2">&amp;</span><span class="ident">Neighborhood</span><span class="op">&gt;</span>,
) -&gt; <span class="ident">ToggleZoomed</span> {
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">batch</span> <span class="op">=</span> <span class="ident">ToggleZoomed::builder</span>();
<span class="kw">for</span> (<span class="ident">r</span>, <span class="ident">dist</span>) <span class="kw">in</span> <span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">roads</span> {
<span class="kw">if</span> <span class="ident">only_neighborhood</span>
.<span class="ident">map</span>(<span class="op">|</span><span class="ident">n</span><span class="op">|</span> <span class="op">!</span><span class="ident">n</span>.<span class="ident">orig_perimeter</span>.<span class="ident">interior</span>.<span class="ident">contains</span>(<span class="ident">r</span>))
.<span class="ident">unwrap_or</span>(<span class="bool-val">false</span>)
{
<span class="kw">continue</span>;
}
<span class="kw">let</span> <span class="ident">road</span> <span class="op">=</span> <span class="ident">map</span>.<span class="ident">get_r</span>(<span class="kw-2">*</span><span class="ident">r</span>);
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Ok</span>((<span class="ident">pt</span>, <span class="ident">angle</span>)) <span class="op">=</span> <span class="ident">road</span>.<span class="ident">center_pts</span>.<span class="ident">dist_along</span>(<span class="kw-2">*</span><span class="ident">dist</span>) {
<span class="kw">let</span> <span class="ident">road_width</span> <span class="op">=</span> <span class="ident">road</span>.<span class="ident">get_width</span>();
<span class="ident">batch</span>
.<span class="ident">unzoomed</span>
.<span class="ident">push</span>(<span class="ident">Color::RED</span>, <span class="ident">Circle::new</span>(<span class="ident">pt</span>, <span class="ident">road_width</span>).<span class="ident">to_polygon</span>());
<span class="ident">batch</span>.<span class="ident">unzoomed</span>.<span class="ident">push</span>(
<span class="ident">Color::WHITE</span>,
<span class="ident">Line::must_new</span>(
<span class="ident">pt</span>.<span class="ident">project_away</span>(<span class="number">0.8</span> <span class="op">*</span> <span class="ident">road_width</span>, <span class="ident">angle</span>.<span class="ident">rotate_degs</span>(<span class="number">90.0</span>)),
<span class="ident">pt</span>.<span class="ident">project_away</span>(<span class="number">0.8</span> <span class="op">*</span> <span class="ident">road_width</span>, <span class="ident">angle</span>.<span class="ident">rotate_degs</span>(<span class="op">-</span><span class="number">90.0</span>)),
)
.<span class="ident">make_polygons</span>(<span class="ident">Distance::meters</span>(<span class="number">7.0</span>)),
);
<span class="comment">// TODO Only cover the driving/parking lanes (and center appropriately)</span>
<span class="ident">draw_zoomed_planters</span>(
<span class="ident">ctx</span>,
<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">batch</span>.<span class="ident">zoomed</span>,
<span class="ident">Line::must_new</span>(
<span class="ident">pt</span>.<span class="ident">project_away</span>(<span class="number">0.3</span> <span class="op">*</span> <span class="ident">road_width</span>, <span class="ident">angle</span>.<span class="ident">rotate_degs</span>(<span class="number">90.0</span>)),
<span class="ident">pt</span>.<span class="ident">project_away</span>(<span class="number">0.3</span> <span class="op">*</span> <span class="ident">road_width</span>, <span class="ident">angle</span>.<span class="ident">rotate_degs</span>(<span class="op">-</span><span class="number">90.0</span>)),
),
);
}
}
<span class="kw">for</span> (<span class="ident">i</span>, <span class="ident">filter</span>) <span class="kw">in</span> <span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">intersections</span> {
<span class="kw">if</span> <span class="ident">only_neighborhood</span>
.<span class="ident">map</span>(<span class="op">|</span><span class="ident">n</span><span class="op">|</span> <span class="op">!</span><span class="ident">n</span>.<span class="ident">interior_intersections</span>.<span class="ident">contains</span>(<span class="ident">i</span>))
.<span class="ident">unwrap_or</span>(<span class="bool-val">false</span>)
{
<span class="kw">continue</span>;
}
<span class="kw">let</span> <span class="ident">line</span> <span class="op">=</span> <span class="ident">filter</span>.<span class="ident">geometry</span>(<span class="ident">map</span>);
<span class="ident">batch</span>
.<span class="ident">unzoomed</span>
.<span class="ident">push</span>(<span class="ident">Color::RED</span>, <span class="ident">line</span>.<span class="ident">make_polygons</span>(<span class="ident">Distance::meters</span>(<span class="number">3.0</span>)));
<span class="ident">draw_zoomed_planters</span>(
<span class="ident">ctx</span>,
<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">batch</span>.<span class="ident">zoomed</span>,
<span class="ident">line</span>.<span class="ident">percent_slice</span>(<span class="number">0.3</span>, <span class="number">0.7</span>).<span class="ident">unwrap_or</span>(<span class="ident">line</span>),
);
}
<span class="ident">batch</span>.<span class="ident">build</span>(<span class="ident">ctx</span>)
}
}
<span class="kw">impl</span> <span class="ident">DiagonalFilter</span> {
<span class="doccomment">/// Find all possible diagonal filters at an intersection</span>
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">filters_for</span>(<span class="ident">app</span>: <span class="kw-2">&amp;</span><span class="ident">App</span>, <span class="ident">i</span>: <span class="ident">IntersectionID</span>) -&gt; <span class="ident">Vec</span><span class="op">&lt;</span><span class="ident">DiagonalFilter</span><span class="op">&gt;</span> {
<span class="kw">let</span> <span class="ident">map</span> <span class="op">=</span> <span class="kw-2">&amp;</span><span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">map</span>;
<span class="kw">let</span> <span class="ident">roads</span> <span class="op">=</span> <span class="ident">map</span>.<span class="ident">get_i</span>(<span class="ident">i</span>).<span class="ident">get_roads_sorted_by_incoming_angle</span>(<span class="ident">map</span>);
<span class="comment">// TODO Handle &gt;4-ways</span>
<span class="kw">if</span> <span class="ident">roads</span>.<span class="ident">len</span>() <span class="op">!</span><span class="op">=</span> <span class="number">4</span> {
<span class="kw">return</span> <span class="ident">Vec::new</span>();
}
<span class="macro">vec!</span>[
<span class="ident">DiagonalFilter::new</span>(<span class="ident">map</span>, <span class="ident">i</span>, <span class="ident">roads</span>[<span class="number">0</span>], <span class="ident">roads</span>[<span class="number">1</span>]),
<span class="ident">DiagonalFilter::new</span>(<span class="ident">map</span>, <span class="ident">i</span>, <span class="ident">roads</span>[<span class="number">1</span>], <span class="ident">roads</span>[<span class="number">2</span>]),
]
}
<span class="kw">fn</span> <span class="ident">new</span>(<span class="ident">map</span>: <span class="kw-2">&amp;</span><span class="ident">Map</span>, <span class="ident">i</span>: <span class="ident">IntersectionID</span>, <span class="ident">r1</span>: <span class="ident">RoadID</span>, <span class="ident">r2</span>: <span class="ident">RoadID</span>) -&gt; <span class="ident">DiagonalFilter</span> {
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">roads</span> <span class="op">=</span> <span class="ident">map</span>.<span class="ident">get_i</span>(<span class="ident">i</span>).<span class="ident">get_roads_sorted_by_incoming_angle</span>(<span class="ident">map</span>);
<span class="comment">// Make self.r1 be the first entry</span>
<span class="kw">while</span> <span class="ident">roads</span>[<span class="number">0</span>] <span class="op">!</span><span class="op">=</span> <span class="ident">r1</span> {
<span class="ident">roads</span>.<span class="ident">rotate_right</span>(<span class="number">1</span>);
}
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">group1</span> <span class="op">=</span> <span class="ident">BTreeSet::new</span>();
<span class="ident">group1</span>.<span class="ident">insert</span>(<span class="ident">roads</span>.<span class="ident">remove</span>(<span class="number">0</span>));
<span class="kw">loop</span> {
<span class="kw">let</span> <span class="ident">next</span> <span class="op">=</span> <span class="ident">roads</span>.<span class="ident">remove</span>(<span class="number">0</span>);
<span class="ident">group1</span>.<span class="ident">insert</span>(<span class="ident">next</span>);
<span class="kw">if</span> <span class="ident">next</span> <span class="op">==</span> <span class="ident">r2</span> {
<span class="kw">break</span>;
}
}
<span class="comment">// This is only true for 4-ways...</span>
<span class="macro">assert_eq!</span>(<span class="ident">group1</span>.<span class="ident">len</span>(), <span class="number">2</span>);
<span class="macro">assert_eq!</span>(<span class="ident">roads</span>.<span class="ident">len</span>(), <span class="number">2</span>);
<span class="ident">DiagonalFilter</span> {
<span class="ident">r1</span>,
<span class="ident">r2</span>,
<span class="ident">i</span>,
<span class="ident">group1</span>,
<span class="ident">group2</span>: <span class="ident">roads</span>.<span class="ident">into_iter</span>().<span class="ident">collect</span>(),
}
}
<span class="doccomment">/// Physically where is the filter placed?</span>
<span class="kw">fn</span> <span class="ident">geometry</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>) -&gt; <span class="ident">Line</span> {
<span class="kw">let</span> <span class="ident">r1</span> <span class="op">=</span> <span class="ident">map</span>.<span class="ident">get_r</span>(<span class="self">self</span>.<span class="ident">r1</span>);
<span class="kw">let</span> <span class="ident">r2</span> <span class="op">=</span> <span class="ident">map</span>.<span class="ident">get_r</span>(<span class="self">self</span>.<span class="ident">r2</span>);
<span class="comment">// Orient the road to face the intersection</span>
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">pl1</span> <span class="op">=</span> <span class="ident">r1</span>.<span class="ident">center_pts</span>.<span class="ident">clone</span>();
<span class="kw">if</span> <span class="ident">r1</span>.<span class="ident">src_i</span> <span class="op">==</span> <span class="self">self</span>.<span class="ident">i</span> {
<span class="ident">pl1</span> <span class="op">=</span> <span class="ident">pl1</span>.<span class="ident">reversed</span>();
}
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">pl2</span> <span class="op">=</span> <span class="ident">r2</span>.<span class="ident">center_pts</span>.<span class="ident">clone</span>();
<span class="kw">if</span> <span class="ident">r2</span>.<span class="ident">src_i</span> <span class="op">==</span> <span class="self">self</span>.<span class="ident">i</span> {
<span class="ident">pl2</span> <span class="op">=</span> <span class="ident">pl2</span>.<span class="ident">reversed</span>();
}
<span class="comment">// The other combinations of left/right here would produce points or a line across just one</span>
<span class="comment">// road</span>
<span class="kw">let</span> <span class="ident">pt1</span> <span class="op">=</span> <span class="ident">pl1</span>.<span class="ident">must_shift_right</span>(<span class="ident">r1</span>.<span class="ident">get_half_width</span>()).<span class="ident">last_pt</span>();
<span class="kw">let</span> <span class="ident">pt2</span> <span class="op">=</span> <span class="ident">pl2</span>.<span class="ident">must_shift_left</span>(<span class="ident">r2</span>.<span class="ident">get_half_width</span>()).<span class="ident">last_pt</span>();
<span class="ident">Line::must_new</span>(<span class="ident">pt1</span>, <span class="ident">pt2</span>)
}
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">allows_turn</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">from</span>: <span class="ident">RoadID</span>, <span class="ident">to</span>: <span class="ident">RoadID</span>) -&gt; <span class="ident">bool</span> {
<span class="self">self</span>.<span class="ident">group1</span>.<span class="ident">contains</span>(<span class="kw-2">&amp;</span><span class="ident">from</span>) <span class="op">==</span> <span class="self">self</span>.<span class="ident">group1</span>.<span class="ident">contains</span>(<span class="kw-2">&amp;</span><span class="ident">to</span>)
}
<span class="kw">fn</span> <span class="ident">avoid_movements_between_roads</span>(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; <span class="ident">Vec</span><span class="op">&lt;</span>(<span class="ident">RoadID</span>, <span class="ident">RoadID</span>)<span class="op">&gt;</span> {
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">pairs</span> <span class="op">=</span> <span class="ident">Vec::new</span>();
<span class="kw">for</span> <span class="ident">from</span> <span class="kw">in</span> <span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">group1</span> {
<span class="kw">for</span> <span class="ident">to</span> <span class="kw">in</span> <span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">group2</span> {
<span class="ident">pairs</span>.<span class="ident">push</span>((<span class="kw-2">*</span><span class="ident">from</span>, <span class="kw-2">*</span><span class="ident">to</span>));
<span class="ident">pairs</span>.<span class="ident">push</span>((<span class="kw-2">*</span><span class="ident">to</span>, <span class="kw-2">*</span><span class="ident">from</span>));
}
}
<span class="ident">pairs</span>
}
}
<span class="comment">// Draw two planters on each end of a line. They&#39;ll be offset so that they don&#39;t exceed the</span>
<span class="comment">// endpoints.</span>
<span class="kw">fn</span> <span class="ident">draw_zoomed_planters</span>(<span class="ident">ctx</span>: <span class="kw-2">&amp;</span><span class="ident">EventCtx</span>, <span class="ident">batch</span>: <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">GeomBatch</span>, <span class="ident">line</span>: <span class="ident">Line</span>) {
<span class="kw">let</span> <span class="ident">planter</span> <span class="op">=</span> <span class="ident">GeomBatch::load_svg</span>(<span class="ident">ctx</span>, <span class="string">&quot;system/assets/map/planter.svg&quot;</span>);
<span class="kw">let</span> <span class="ident">planter_width</span> <span class="op">=</span> <span class="ident">planter</span>.<span class="ident">get_dims</span>().<span class="ident">width</span>;
<span class="kw">let</span> <span class="ident">scaled_planter</span> <span class="op">=</span> <span class="ident">planter</span>.<span class="ident">scale</span>(<span class="number">0.3</span> <span class="op">*</span> <span class="ident">line</span>.<span class="ident">length</span>().<span class="ident">inner_meters</span>() <span class="op">/</span> <span class="ident">planter_width</span>);
<span class="ident">batch</span>.<span class="ident">append</span>(
<span class="ident">scaled_planter</span>
.<span class="ident">clone</span>()
.<span class="ident">centered_on</span>(<span class="ident">line</span>.<span class="ident">must_dist_along</span>(<span class="number">0.15</span> <span class="op">*</span> <span class="ident">line</span>.<span class="ident">length</span>()))
.<span class="ident">rotate</span>(<span class="ident">line</span>.<span class="ident">angle</span>()),
);
<span class="ident">batch</span>.<span class="ident">append</span>(
<span class="ident">scaled_planter</span>
.<span class="ident">centered_on</span>(<span class="ident">line</span>.<span class="ident">must_dist_along</span>(<span class="number">0.85</span> <span class="op">*</span> <span class="ident">line</span>.<span class="ident">length</span>()))
.<span class="ident">rotate</span>(<span class="ident">line</span>.<span class="ident">angle</span>()),
);
}
</code></pre></div>
</section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="game" data-search-index-js="../../../search-index.js" data-search-js="../../../search.js"></div>
<script src="../../../main.js"></script><script src="../../../source-script.js"></script><script src="../../../source-files.js"></script>
</body></html>

View File

@ -322,235 +322,27 @@
<span id="322">322</span>
<span id="323">323</span>
<span id="324">324</span>
<span id="325">325</span>
<span id="326">326</span>
<span id="327">327</span>
<span id="328">328</span>
<span id="329">329</span>
<span id="330">330</span>
<span id="331">331</span>
<span id="332">332</span>
<span id="333">333</span>
<span id="334">334</span>
<span id="335">335</span>
<span id="336">336</span>
<span id="337">337</span>
<span id="338">338</span>
<span id="339">339</span>
<span id="340">340</span>
<span id="341">341</span>
<span id="342">342</span>
<span id="343">343</span>
<span id="344">344</span>
<span id="345">345</span>
<span id="346">346</span>
<span id="347">347</span>
<span id="348">348</span>
<span id="349">349</span>
<span id="350">350</span>
<span id="351">351</span>
<span id="352">352</span>
<span id="353">353</span>
<span id="354">354</span>
<span id="355">355</span>
<span id="356">356</span>
<span id="357">357</span>
<span id="358">358</span>
<span id="359">359</span>
<span id="360">360</span>
<span id="361">361</span>
<span id="362">362</span>
<span id="363">363</span>
<span id="364">364</span>
<span id="365">365</span>
<span id="366">366</span>
<span id="367">367</span>
<span id="368">368</span>
<span id="369">369</span>
<span id="370">370</span>
<span id="371">371</span>
<span id="372">372</span>
<span id="373">373</span>
<span id="374">374</span>
<span id="375">375</span>
<span id="376">376</span>
<span id="377">377</span>
<span id="378">378</span>
<span id="379">379</span>
<span id="380">380</span>
<span id="381">381</span>
<span id="382">382</span>
<span id="383">383</span>
<span id="384">384</span>
<span id="385">385</span>
<span id="386">386</span>
<span id="387">387</span>
<span id="388">388</span>
<span id="389">389</span>
<span id="390">390</span>
<span id="391">391</span>
<span id="392">392</span>
<span id="393">393</span>
<span id="394">394</span>
<span id="395">395</span>
<span id="396">396</span>
<span id="397">397</span>
<span id="398">398</span>
<span id="399">399</span>
<span id="400">400</span>
<span id="401">401</span>
<span id="402">402</span>
<span id="403">403</span>
<span id="404">404</span>
<span id="405">405</span>
<span id="406">406</span>
<span id="407">407</span>
<span id="408">408</span>
<span id="409">409</span>
<span id="410">410</span>
<span id="411">411</span>
<span id="412">412</span>
<span id="413">413</span>
<span id="414">414</span>
<span id="415">415</span>
<span id="416">416</span>
<span id="417">417</span>
<span id="418">418</span>
<span id="419">419</span>
<span id="420">420</span>
<span id="421">421</span>
<span id="422">422</span>
<span id="423">423</span>
<span id="424">424</span>
<span id="425">425</span>
<span id="426">426</span>
<span id="427">427</span>
<span id="428">428</span>
<span id="429">429</span>
<span id="430">430</span>
<span id="431">431</span>
<span id="432">432</span>
<span id="433">433</span>
<span id="434">434</span>
<span id="435">435</span>
<span id="436">436</span>
<span id="437">437</span>
<span id="438">438</span>
<span id="439">439</span>
<span id="440">440</span>
<span id="441">441</span>
<span id="442">442</span>
<span id="443">443</span>
<span id="444">444</span>
<span id="445">445</span>
<span id="446">446</span>
<span id="447">447</span>
<span id="448">448</span>
<span id="449">449</span>
<span id="450">450</span>
<span id="451">451</span>
<span id="452">452</span>
<span id="453">453</span>
<span id="454">454</span>
<span id="455">455</span>
<span id="456">456</span>
<span id="457">457</span>
<span id="458">458</span>
<span id="459">459</span>
<span id="460">460</span>
<span id="461">461</span>
<span id="462">462</span>
<span id="463">463</span>
<span id="464">464</span>
<span id="465">465</span>
<span id="466">466</span>
<span id="467">467</span>
<span id="468">468</span>
<span id="469">469</span>
<span id="470">470</span>
<span id="471">471</span>
<span id="472">472</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>
<span id="487">487</span>
<span id="488">488</span>
<span id="489">489</span>
<span id="490">490</span>
<span id="491">491</span>
<span id="492">492</span>
<span id="493">493</span>
<span id="494">494</span>
<span id="495">495</span>
<span id="496">496</span>
<span id="497">497</span>
<span id="498">498</span>
<span id="499">499</span>
<span id="500">500</span>
<span id="501">501</span>
<span id="502">502</span>
<span id="503">503</span>
<span id="504">504</span>
<span id="505">505</span>
<span id="506">506</span>
<span id="507">507</span>
<span id="508">508</span>
<span id="509">509</span>
<span id="510">510</span>
<span id="511">511</span>
<span id="512">512</span>
<span id="513">513</span>
<span id="514">514</span>
<span id="515">515</span>
<span id="516">516</span>
<span id="517">517</span>
<span id="518">518</span>
<span id="519">519</span>
<span id="520">520</span>
<span id="521">521</span>
<span id="522">522</span>
<span id="523">523</span>
<span id="524">524</span>
<span id="525">525</span>
<span id="526">526</span>
<span id="527">527</span>
<span id="528">528</span>
<span id="529">529</span>
<span id="530">530</span>
<span id="531">531</span>
<span id="532">532</span>
<span id="533">533</span>
<span id="534">534</span>
</pre><pre class="rust"><code><span class="kw">use</span> <span class="ident">std::collections</span>::{<span class="ident">BTreeMap</span>, <span class="ident">BTreeSet</span>};
<span class="kw">use</span> <span class="ident">maplit::btreeset</span>;
<span class="kw">use</span> <span class="ident">geom</span>::{<span class="ident">Circle</span>, <span class="ident">Distance</span>, <span class="ident">Line</span>, <span class="ident">Polygon</span>};
<span class="kw">use</span> <span class="ident">geom</span>::{<span class="ident">Distance</span>, <span class="ident">Polygon</span>};
<span class="kw">use</span> <span class="ident">map_gui::tools::DrawRoadLabels</span>;
<span class="kw">use</span> <span class="ident">map_model</span>::{<span class="ident">IntersectionID</span>, <span class="ident">Map</span>, <span class="ident">PathConstraints</span>, <span class="ident">Perimeter</span>, <span class="ident">RoadID</span>, <span class="ident">RoutingParams</span>, <span class="ident">TurnID</span>};
<span class="kw">use</span> <span class="ident">map_model</span>::{<span class="ident">IntersectionID</span>, <span class="ident">Map</span>, <span class="ident">PathConstraints</span>, <span class="ident">Perimeter</span>, <span class="ident">RoadID</span>};
<span class="kw">use</span> <span class="ident">widgetry::mapspace::ToggleZoomed</span>;
<span class="kw">use</span> <span class="ident">widgetry</span>::{<span class="ident">Color</span>, <span class="ident">Drawable</span>, <span class="ident">EventCtx</span>, <span class="ident">GeomBatch</span>};
<span class="kw">use</span> <span class="ident">widgetry</span>::{<span class="ident">Drawable</span>, <span class="ident">EventCtx</span>, <span class="ident">GeomBatch</span>};
<span class="kw">use</span> <span class="ident"><span class="kw">crate</span>::app::App</span>;
<span class="kw">pub</span> <span class="kw">use</span> <span class="ident">browse::BrowseNeighborhoods</span>;
<span class="kw">pub</span> <span class="kw">use</span> <span class="ident">filters</span>::{<span class="ident">DiagonalFilter</span>, <span class="ident">ModalFilters</span>};
<span class="kw">pub</span> <span class="kw">use</span> <span class="ident">partition::Partitioning</span>;
<span class="kw">mod</span> <span class="ident">auto</span>;
<span class="kw">mod</span> <span class="ident">browse</span>;
<span class="kw">mod</span> <span class="ident">connectivity</span>;
<span class="kw">mod</span> <span class="ident">draw_cells</span>;
<span class="kw">mod</span> <span class="ident">filters</span>;
<span class="kw">mod</span> <span class="ident">partition</span>;
<span class="kw">mod</span> <span class="ident">pathfinding</span>;
<span class="kw">mod</span> <span class="ident">per_neighborhood</span>;
@ -574,115 +366,6 @@
<span class="ident">labels</span>: <span class="ident">DrawRoadLabels</span>,
}
<span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Default</span>)]</span>
<span class="kw">pub</span> <span class="kw">struct</span> <span class="ident">ModalFilters</span> {
<span class="doccomment">/// For filters placed along a road, where is the filter located?</span>
<span class="kw">pub</span> <span class="ident">roads</span>: <span class="ident">BTreeMap</span><span class="op">&lt;</span><span class="ident">RoadID</span>, <span class="ident">Distance</span><span class="op">&gt;</span>,
<span class="kw">pub</span> <span class="ident">intersections</span>: <span class="ident">BTreeMap</span><span class="op">&lt;</span><span class="ident">IntersectionID</span>, <span class="ident">DiagonalFilter</span><span class="op">&gt;</span>,
}
<span class="kw">impl</span> <span class="ident">ModalFilters</span> {
<span class="doccomment">/// Modify RoutingParams to respect these modal filters</span>
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">update_routing_params</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">params</span>: <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">RoutingParams</span>) {
<span class="ident">params</span>.<span class="ident">avoid_roads</span>.<span class="ident">extend</span>(<span class="self">self</span>.<span class="ident">roads</span>.<span class="ident">keys</span>().<span class="ident">cloned</span>());
<span class="kw">for</span> <span class="ident">filter</span> <span class="kw">in</span> <span class="self">self</span>.<span class="ident">intersections</span>.<span class="ident">values</span>() {
<span class="ident">params</span>
.<span class="ident">avoid_movements_between</span>
.<span class="ident">extend</span>(<span class="ident">filter</span>.<span class="ident">avoid_movements_between_roads</span>());
}
}
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">allows_turn</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">t</span>: <span class="ident">TurnID</span>) -&gt; <span class="ident">bool</span> {
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">filter</span>) <span class="op">=</span> <span class="self">self</span>.<span class="ident">intersections</span>.<span class="ident">get</span>(<span class="kw-2">&amp;</span><span class="ident">t</span>.<span class="ident">parent</span>) {
<span class="kw">return</span> <span class="ident">filter</span>.<span class="ident">allows_turn</span>(<span class="ident">t</span>.<span class="ident">src</span>.<span class="ident">road</span>, <span class="ident">t</span>.<span class="ident">dst</span>.<span class="ident">road</span>);
}
<span class="bool-val">true</span>
}
<span class="doccomment">/// Draw all modal filters. If `only_neighborhood` is specified, only draw filters belonging to</span>
<span class="doccomment">/// one area.</span>
<span class="kw">pub</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">ctx</span>: <span class="kw-2">&amp;</span><span class="ident">EventCtx</span>,
<span class="ident">map</span>: <span class="kw-2">&amp;</span><span class="ident">Map</span>,
<span class="ident">only_neighborhood</span>: <span class="prelude-ty">Option</span><span class="op">&lt;</span><span class="kw-2">&amp;</span><span class="ident">Neighborhood</span><span class="op">&gt;</span>,
) -&gt; <span class="ident">ToggleZoomed</span> {
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">batch</span> <span class="op">=</span> <span class="ident">ToggleZoomed::builder</span>();
<span class="kw">for</span> (<span class="ident">r</span>, <span class="ident">dist</span>) <span class="kw">in</span> <span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">roads</span> {
<span class="kw">if</span> <span class="ident">only_neighborhood</span>
.<span class="ident">map</span>(<span class="op">|</span><span class="ident">n</span><span class="op">|</span> <span class="op">!</span><span class="ident">n</span>.<span class="ident">orig_perimeter</span>.<span class="ident">interior</span>.<span class="ident">contains</span>(<span class="ident">r</span>))
.<span class="ident">unwrap_or</span>(<span class="bool-val">false</span>)
{
<span class="kw">continue</span>;
}
<span class="kw">let</span> <span class="ident">road</span> <span class="op">=</span> <span class="ident">map</span>.<span class="ident">get_r</span>(<span class="kw-2">*</span><span class="ident">r</span>);
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Ok</span>((<span class="ident">pt</span>, <span class="ident">angle</span>)) <span class="op">=</span> <span class="ident">road</span>.<span class="ident">center_pts</span>.<span class="ident">dist_along</span>(<span class="kw-2">*</span><span class="ident">dist</span>) {
<span class="kw">let</span> <span class="ident">road_width</span> <span class="op">=</span> <span class="ident">road</span>.<span class="ident">get_width</span>();
<span class="ident">batch</span>
.<span class="ident">unzoomed</span>
.<span class="ident">push</span>(<span class="ident">Color::RED</span>, <span class="ident">Circle::new</span>(<span class="ident">pt</span>, <span class="ident">road_width</span>).<span class="ident">to_polygon</span>());
<span class="ident">batch</span>.<span class="ident">unzoomed</span>.<span class="ident">push</span>(
<span class="ident">Color::WHITE</span>,
<span class="ident">Line::must_new</span>(
<span class="ident">pt</span>.<span class="ident">project_away</span>(<span class="number">0.8</span> <span class="op">*</span> <span class="ident">road_width</span>, <span class="ident">angle</span>.<span class="ident">rotate_degs</span>(<span class="number">90.0</span>)),
<span class="ident">pt</span>.<span class="ident">project_away</span>(<span class="number">0.8</span> <span class="op">*</span> <span class="ident">road_width</span>, <span class="ident">angle</span>.<span class="ident">rotate_degs</span>(<span class="op">-</span><span class="number">90.0</span>)),
)
.<span class="ident">make_polygons</span>(<span class="ident">Distance::meters</span>(<span class="number">7.0</span>)),
);
<span class="comment">// TODO Only cover the driving/parking lanes (and center appropriately)</span>
<span class="ident">draw_zoomed_planters</span>(
<span class="ident">ctx</span>,
<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">batch</span>.<span class="ident">zoomed</span>,
<span class="ident">Line::must_new</span>(
<span class="ident">pt</span>.<span class="ident">project_away</span>(<span class="number">0.3</span> <span class="op">*</span> <span class="ident">road_width</span>, <span class="ident">angle</span>.<span class="ident">rotate_degs</span>(<span class="number">90.0</span>)),
<span class="ident">pt</span>.<span class="ident">project_away</span>(<span class="number">0.3</span> <span class="op">*</span> <span class="ident">road_width</span>, <span class="ident">angle</span>.<span class="ident">rotate_degs</span>(<span class="op">-</span><span class="number">90.0</span>)),
),
);
}
}
<span class="kw">for</span> (<span class="ident">i</span>, <span class="ident">filter</span>) <span class="kw">in</span> <span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">intersections</span> {
<span class="kw">if</span> <span class="ident">only_neighborhood</span>
.<span class="ident">map</span>(<span class="op">|</span><span class="ident">n</span><span class="op">|</span> <span class="op">!</span><span class="ident">n</span>.<span class="ident">interior_intersections</span>.<span class="ident">contains</span>(<span class="ident">i</span>))
.<span class="ident">unwrap_or</span>(<span class="bool-val">false</span>)
{
<span class="kw">continue</span>;
}
<span class="kw">let</span> <span class="ident">line</span> <span class="op">=</span> <span class="ident">filter</span>.<span class="ident">geometry</span>(<span class="ident">map</span>);
<span class="ident">batch</span>
.<span class="ident">unzoomed</span>
.<span class="ident">push</span>(<span class="ident">Color::RED</span>, <span class="ident">line</span>.<span class="ident">make_polygons</span>(<span class="ident">Distance::meters</span>(<span class="number">3.0</span>)));
<span class="ident">draw_zoomed_planters</span>(
<span class="ident">ctx</span>,
<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">batch</span>.<span class="ident">zoomed</span>,
<span class="ident">line</span>.<span class="ident">percent_slice</span>(<span class="number">0.3</span>, <span class="number">0.7</span>).<span class="ident">unwrap_or</span>(<span class="ident">line</span>),
);
}
<span class="ident">batch</span>.<span class="ident">build</span>(<span class="ident">ctx</span>)
}
}
<span class="doccomment">/// A diagonal filter exists in an intersection. It&#39;s defined by two roads (the order is</span>
<span class="doccomment">/// arbitrary). When all of the intersection&#39;s roads are sorted in clockwise order, this pair of</span>
<span class="doccomment">/// roads splits the ordering into two groups. Turns in each group are still possible, but not</span>
<span class="doccomment">/// across groups.</span>
<span class="doccomment">///</span>
<span class="doccomment">/// TODO Be careful with PartialEq! At a 4-way intersection, the same filter can be expressed as a</span>
<span class="doccomment">/// different pair of two roads. And the (r1, r2) ordering is also arbitrary.</span>
<span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Clone</span>, <span class="ident">PartialEq</span>)]</span>
<span class="kw">pub</span> <span class="kw">struct</span> <span class="ident">DiagonalFilter</span> {
<span class="ident">r1</span>: <span class="ident">RoadID</span>,
<span class="ident">r2</span>: <span class="ident">RoadID</span>,
<span class="ident">i</span>: <span class="ident">IntersectionID</span>,
<span class="ident">group1</span>: <span class="ident">BTreeSet</span><span class="op">&lt;</span><span class="ident">RoadID</span><span class="op">&gt;</span>,
<span class="ident">group2</span>: <span class="ident">BTreeSet</span><span class="op">&lt;</span><span class="ident">RoadID</span><span class="op">&gt;</span>,
}
<span class="doccomment">/// A partitioning of the interior of a neighborhood based on driving connectivity</span>
<span class="kw">pub</span> <span class="kw">struct</span> <span class="ident">Cell</span> {
<span class="doccomment">/// Most roads are fully in one cell. Roads with modal filters on them are sometimes split</span>
@ -782,26 +465,6 @@
}
}
<span class="comment">// Draw two planters on each end of a line. They&#39;ll be offset so that they don&#39;t exceed the</span>
<span class="comment">// endpoints.</span>
<span class="kw">fn</span> <span class="ident">draw_zoomed_planters</span>(<span class="ident">ctx</span>: <span class="kw-2">&amp;</span><span class="ident">EventCtx</span>, <span class="ident">batch</span>: <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">GeomBatch</span>, <span class="ident">line</span>: <span class="ident">Line</span>) {
<span class="kw">let</span> <span class="ident">planter</span> <span class="op">=</span> <span class="ident">GeomBatch::load_svg</span>(<span class="ident">ctx</span>, <span class="string">&quot;system/assets/map/planter.svg&quot;</span>);
<span class="kw">let</span> <span class="ident">planter_width</span> <span class="op">=</span> <span class="ident">planter</span>.<span class="ident">get_dims</span>().<span class="ident">width</span>;
<span class="kw">let</span> <span class="ident">scaled_planter</span> <span class="op">=</span> <span class="ident">planter</span>.<span class="ident">scale</span>(<span class="number">0.3</span> <span class="op">*</span> <span class="ident">line</span>.<span class="ident">length</span>().<span class="ident">inner_meters</span>() <span class="op">/</span> <span class="ident">planter_width</span>);
<span class="ident">batch</span>.<span class="ident">append</span>(
<span class="ident">scaled_planter</span>
.<span class="ident">clone</span>()
.<span class="ident">centered_on</span>(<span class="ident">line</span>.<span class="ident">must_dist_along</span>(<span class="number">0.15</span> <span class="op">*</span> <span class="ident">line</span>.<span class="ident">length</span>()))
.<span class="ident">rotate</span>(<span class="ident">line</span>.<span class="ident">angle</span>()),
);
<span class="ident">batch</span>.<span class="ident">append</span>(
<span class="ident">scaled_planter</span>
.<span class="ident">centered_on</span>(<span class="ident">line</span>.<span class="ident">must_dist_along</span>(<span class="number">0.85</span> <span class="op">*</span> <span class="ident">line</span>.<span class="ident">length</span>()))
.<span class="ident">rotate</span>(<span class="ident">line</span>.<span class="ident">angle</span>()),
);
}
<span class="comment">// Find all of the disconnected &quot;cells&quot; of reachable areas, bounded by a perimeter. This is with</span>
<span class="comment">// respect to driving.</span>
<span class="kw">fn</span> <span class="ident">find_cells</span>(
@ -983,89 +646,6 @@
<span class="ident">car_free</span>: <span class="bool-val">false</span>,
}
}
<span class="kw">impl</span> <span class="ident">DiagonalFilter</span> {
<span class="doccomment">/// Find all possible diagonal filters at an intersection</span>
<span class="kw">fn</span> <span class="ident">filters_for</span>(<span class="ident">app</span>: <span class="kw-2">&amp;</span><span class="ident">App</span>, <span class="ident">i</span>: <span class="ident">IntersectionID</span>) -&gt; <span class="ident">Vec</span><span class="op">&lt;</span><span class="ident">DiagonalFilter</span><span class="op">&gt;</span> {
<span class="kw">let</span> <span class="ident">map</span> <span class="op">=</span> <span class="kw-2">&amp;</span><span class="ident">app</span>.<span class="ident">primary</span>.<span class="ident">map</span>;
<span class="kw">let</span> <span class="ident">roads</span> <span class="op">=</span> <span class="ident">map</span>.<span class="ident">get_i</span>(<span class="ident">i</span>).<span class="ident">get_roads_sorted_by_incoming_angle</span>(<span class="ident">map</span>);
<span class="comment">// TODO Handle &gt;4-ways</span>
<span class="kw">if</span> <span class="ident">roads</span>.<span class="ident">len</span>() <span class="op">!</span><span class="op">=</span> <span class="number">4</span> {
<span class="kw">return</span> <span class="ident">Vec::new</span>();
}
<span class="macro">vec!</span>[
<span class="ident">DiagonalFilter::new</span>(<span class="ident">map</span>, <span class="ident">i</span>, <span class="ident">roads</span>[<span class="number">0</span>], <span class="ident">roads</span>[<span class="number">1</span>]),
<span class="ident">DiagonalFilter::new</span>(<span class="ident">map</span>, <span class="ident">i</span>, <span class="ident">roads</span>[<span class="number">1</span>], <span class="ident">roads</span>[<span class="number">2</span>]),
]
}
<span class="kw">fn</span> <span class="ident">new</span>(<span class="ident">map</span>: <span class="kw-2">&amp;</span><span class="ident">Map</span>, <span class="ident">i</span>: <span class="ident">IntersectionID</span>, <span class="ident">r1</span>: <span class="ident">RoadID</span>, <span class="ident">r2</span>: <span class="ident">RoadID</span>) -&gt; <span class="ident">DiagonalFilter</span> {
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">roads</span> <span class="op">=</span> <span class="ident">map</span>.<span class="ident">get_i</span>(<span class="ident">i</span>).<span class="ident">get_roads_sorted_by_incoming_angle</span>(<span class="ident">map</span>);
<span class="comment">// Make self.r1 be the first entry</span>
<span class="kw">while</span> <span class="ident">roads</span>[<span class="number">0</span>] <span class="op">!</span><span class="op">=</span> <span class="ident">r1</span> {
<span class="ident">roads</span>.<span class="ident">rotate_right</span>(<span class="number">1</span>);
}
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">group1</span> <span class="op">=</span> <span class="ident">BTreeSet::new</span>();
<span class="ident">group1</span>.<span class="ident">insert</span>(<span class="ident">roads</span>.<span class="ident">remove</span>(<span class="number">0</span>));
<span class="kw">loop</span> {
<span class="kw">let</span> <span class="ident">next</span> <span class="op">=</span> <span class="ident">roads</span>.<span class="ident">remove</span>(<span class="number">0</span>);
<span class="ident">group1</span>.<span class="ident">insert</span>(<span class="ident">next</span>);
<span class="kw">if</span> <span class="ident">next</span> <span class="op">==</span> <span class="ident">r2</span> {
<span class="kw">break</span>;
}
}
<span class="comment">// This is only true for 4-ways...</span>
<span class="macro">assert_eq!</span>(<span class="ident">group1</span>.<span class="ident">len</span>(), <span class="number">2</span>);
<span class="macro">assert_eq!</span>(<span class="ident">roads</span>.<span class="ident">len</span>(), <span class="number">2</span>);
<span class="ident">DiagonalFilter</span> {
<span class="ident">r1</span>,
<span class="ident">r2</span>,
<span class="ident">i</span>,
<span class="ident">group1</span>,
<span class="ident">group2</span>: <span class="ident">roads</span>.<span class="ident">into_iter</span>().<span class="ident">collect</span>(),
}
}
<span class="doccomment">/// Physically where is the filter placed?</span>
<span class="kw">fn</span> <span class="ident">geometry</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>) -&gt; <span class="ident">Line</span> {
<span class="kw">let</span> <span class="ident">r1</span> <span class="op">=</span> <span class="ident">map</span>.<span class="ident">get_r</span>(<span class="self">self</span>.<span class="ident">r1</span>);
<span class="kw">let</span> <span class="ident">r2</span> <span class="op">=</span> <span class="ident">map</span>.<span class="ident">get_r</span>(<span class="self">self</span>.<span class="ident">r2</span>);
<span class="comment">// Orient the road to face the intersection</span>
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">pl1</span> <span class="op">=</span> <span class="ident">r1</span>.<span class="ident">center_pts</span>.<span class="ident">clone</span>();
<span class="kw">if</span> <span class="ident">r1</span>.<span class="ident">src_i</span> <span class="op">==</span> <span class="self">self</span>.<span class="ident">i</span> {
<span class="ident">pl1</span> <span class="op">=</span> <span class="ident">pl1</span>.<span class="ident">reversed</span>();
}
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">pl2</span> <span class="op">=</span> <span class="ident">r2</span>.<span class="ident">center_pts</span>.<span class="ident">clone</span>();
<span class="kw">if</span> <span class="ident">r2</span>.<span class="ident">src_i</span> <span class="op">==</span> <span class="self">self</span>.<span class="ident">i</span> {
<span class="ident">pl2</span> <span class="op">=</span> <span class="ident">pl2</span>.<span class="ident">reversed</span>();
}
<span class="comment">// The other combinations of left/right here would produce points or a line across just one</span>
<span class="comment">// road</span>
<span class="kw">let</span> <span class="ident">pt1</span> <span class="op">=</span> <span class="ident">pl1</span>.<span class="ident">must_shift_right</span>(<span class="ident">r1</span>.<span class="ident">get_half_width</span>()).<span class="ident">last_pt</span>();
<span class="kw">let</span> <span class="ident">pt2</span> <span class="op">=</span> <span class="ident">pl2</span>.<span class="ident">must_shift_left</span>(<span class="ident">r2</span>.<span class="ident">get_half_width</span>()).<span class="ident">last_pt</span>();
<span class="ident">Line::must_new</span>(<span class="ident">pt1</span>, <span class="ident">pt2</span>)
}
<span class="kw">fn</span> <span class="ident">allows_turn</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">from</span>: <span class="ident">RoadID</span>, <span class="ident">to</span>: <span class="ident">RoadID</span>) -&gt; <span class="ident">bool</span> {
<span class="self">self</span>.<span class="ident">group1</span>.<span class="ident">contains</span>(<span class="kw-2">&amp;</span><span class="ident">from</span>) <span class="op">==</span> <span class="self">self</span>.<span class="ident">group1</span>.<span class="ident">contains</span>(<span class="kw-2">&amp;</span><span class="ident">to</span>)
}
<span class="kw">fn</span> <span class="ident">avoid_movements_between_roads</span>(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; <span class="ident">Vec</span><span class="op">&lt;</span>(<span class="ident">RoadID</span>, <span class="ident">RoadID</span>)<span class="op">&gt;</span> {
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">pairs</span> <span class="op">=</span> <span class="ident">Vec::new</span>();
<span class="kw">for</span> <span class="ident">from</span> <span class="kw">in</span> <span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">group1</span> {
<span class="kw">for</span> <span class="ident">to</span> <span class="kw">in</span> <span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">group2</span> {
<span class="ident">pairs</span>.<span class="ident">push</span>((<span class="kw-2">*</span><span class="ident">from</span>, <span class="kw-2">*</span><span class="ident">to</span>));
<span class="ident">pairs</span>.<span class="ident">push</span>((<span class="kw-2">*</span><span class="ident">to</span>, <span class="kw-2">*</span><span class="ident">from</span>));
}
}
<span class="ident">pairs</span>
}
}
</code></pre></div>
</section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="game" data-search-index-js="../../../search-index.js" data-search-js="../../../search.js"></div>
<script src="../../../main.js"></script><script src="../../../source-script.js"></script><script src="../../../source-files.js"></script>

View File

@ -174,7 +174,7 @@
<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">r&quot;rustdoc 1.57.0 (f1edd0429 2021-11-29)&quot;</span>;
<span class="attribute">#[<span class="ident">doc</span><span class="op">=</span><span class="string">r#&quot;The build time in RFC2822, UTC.&quot;#</span>]</span>
<span class="attribute">#[<span class="ident">allow</span>(<span class="ident">dead_code</span>)]</span>
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">BUILT_TIME_UTC</span>: <span class="kw-2">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="string">r&quot;Wed, 12 Jan 2022 13:56:14 +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">r&quot;Wed, 12 Jan 2022 14:02:39 +0000&quot;</span>;
<span class="attribute">#[<span class="ident">doc</span><span class="op">=</span><span class="string">r#&quot;The target architecture, given by `CARGO_CFG_TARGET_ARCH`.&quot;#</span>]</span>
<span class="attribute">#[<span class="ident">allow</span>(<span class="ident">dead_code</span>)]</span>
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">CFG_TARGET_ARCH</span>: <span class="kw-2">&amp;</span><span class="ident">str</span> <span class="op">=</span> <span class="string">r&quot;x86_64&quot;</span>;