mirror of
https://github.com/a-b-street/abstreet.git
synced 2024-11-24 09:24:26 +03:00
deploy: e17e48a764
This commit is contained in:
parent
c8e516b080
commit
506aeba57e
@ -243,8 +243,8 @@ call this to handle all other events. <a href="#method.other_event">Read more</a
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.draw-35" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/game/ltn/browse.rs.html#74-77" title="goto source code">[src]</a></div><a href="#method.draw-35" class="anchor"></a><h4 class="code-header">fn <a class="fnname">draw</a>(&self, g: &mut GfxCtx<'_>, _: &<a class="struct" href="struct.App.html" title="struct game::app::App">App</a>)</h4></div></summary><div class='docblock'><p>Draw</p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.draw_baselayer-34" class="method trait-impl has-srclink"><div class="rightside"></div><a href="#method.draw_baselayer-34" class="anchor"></a><h4 class="code-header">fn <a href="#method.draw_baselayer" class="fnname">draw_baselayer</a>(&self) -> DrawBaselayer</h4></div></summary><div class='docblock'><p>Specifies what to draw before draw()</p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.on_destroy-34" class="method trait-impl has-srclink"><div class="rightside"></div><a href="#method.on_destroy-34" class="anchor"></a><h4 class="code-header">fn <a href="#method.on_destroy" class="fnname">on_destroy</a>(&mut self, &mut EventCtx<'_>, <a class="primitive" href="https://doc.rust-lang.org/1.55.0/std/primitive.reference.html">&mut </a>A)</h4></div></summary><div class='docblock'><p>Before this state is popped or replaced, call this.</p>
|
||||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-State%3CApp%3E-35" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/game/ltn/mod.rs.html#159-227" title="goto source code">[src]</a></div><a href="#impl-State%3CApp%3E-35" class="anchor"></a><h3 class="code-header in-band">impl State<<a class="struct" href="struct.App.html" title="struct game::app::App">App</a>> for <a class="struct" href="../ltn/struct.Viewer.html" title="struct game::ltn::Viewer">Viewer</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.event-35" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/game/ltn/mod.rs.html#160-208" title="goto source code">[src]</a></div><a href="#method.event-35" class="anchor"></a><h4 class="code-header">fn <a class="fnname">event</a>(&mut self, ctx: &mut EventCtx<'_>, app: &mut <a class="struct" href="struct.App.html" title="struct game::app::App">App</a>) -> Transition<<a class="struct" href="struct.App.html" title="struct game::app::App">App</a>></h4></div></summary><div class='docblock'><p>Respond to a UI event, such as input or time passing.</p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.draw-36" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/game/ltn/mod.rs.html#210-226" title="goto source code">[src]</a></div><a href="#method.draw-36" class="anchor"></a><h4 class="code-header">fn <a class="fnname">draw</a>(&self, g: &mut GfxCtx<'_>, app: &<a class="struct" href="struct.App.html" title="struct game::app::App">App</a>)</h4></div></summary><div class='docblock'><p>Draw</p>
|
||||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-State%3CApp%3E-35" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/game/ltn/mod.rs.html#166-234" title="goto source code">[src]</a></div><a href="#impl-State%3CApp%3E-35" class="anchor"></a><h3 class="code-header in-band">impl State<<a class="struct" href="struct.App.html" title="struct game::app::App">App</a>> for <a class="struct" href="../ltn/struct.Viewer.html" title="struct game::ltn::Viewer">Viewer</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.event-35" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/game/ltn/mod.rs.html#167-215" title="goto source code">[src]</a></div><a href="#method.event-35" class="anchor"></a><h4 class="code-header">fn <a class="fnname">event</a>(&mut self, ctx: &mut EventCtx<'_>, app: &mut <a class="struct" href="struct.App.html" title="struct game::app::App">App</a>) -> Transition<<a class="struct" href="struct.App.html" title="struct game::app::App">App</a>></h4></div></summary><div class='docblock'><p>Respond to a UI event, such as input or time passing.</p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.draw-36" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/game/ltn/mod.rs.html#217-233" title="goto source code">[src]</a></div><a href="#method.draw-36" class="anchor"></a><h4 class="code-header">fn <a class="fnname">draw</a>(&self, g: &mut GfxCtx<'_>, app: &<a class="struct" href="struct.App.html" title="struct game::app::App">App</a>)</h4></div></summary><div class='docblock'><p>Draw</p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.draw_baselayer-35" class="method trait-impl has-srclink"><div class="rightside"></div><a href="#method.draw_baselayer-35" class="anchor"></a><h4 class="code-header">fn <a href="#method.draw_baselayer" class="fnname">draw_baselayer</a>(&self) -> DrawBaselayer</h4></div></summary><div class='docblock'><p>Specifies what to draw before draw()</p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.on_destroy-35" class="method trait-impl has-srclink"><div class="rightside"></div><a href="#method.on_destroy-35" class="anchor"></a><h4 class="code-header">fn <a href="#method.on_destroy" class="fnname">on_destroy</a>(&mut self, &mut EventCtx<'_>, <a class="primitive" href="https://doc.rust-lang.org/1.55.0/std/primitive.reference.html">&mut </a>A)</h4></div></summary><div class='docblock'><p>Before this state is popped or replaced, call this.</p>
|
||||
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-State%3CApp%3E-36" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/game/pregame/proposals.rs.html#129-172" title="goto source code">[src]</a></div><a href="#impl-State%3CApp%3E-36" class="anchor"></a><h3 class="code-header in-band">impl State<<a class="struct" href="struct.App.html" title="struct game::app::App">App</a>> for <a class="struct" href="../pregame/proposals/struct.Proposals.html" title="struct game::pregame::proposals::Proposals">Proposals</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.event-36" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/game/pregame/proposals.rs.html#130-162" title="goto source code">[src]</a></div><a href="#method.event-36" class="anchor"></a><h4 class="code-header">fn <a class="fnname">event</a>(&mut self, ctx: &mut EventCtx<'_>, app: &mut <a class="struct" href="struct.App.html" title="struct game::app::App">App</a>) -> Transition<<a class="struct" href="struct.App.html" title="struct game::app::App">App</a>></h4></div></summary><div class='docblock'><p>Respond to a UI event, such as input or time passing.</p>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `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="icon" type="image/svg+xml" href="../../favicon.svg"><link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 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">☰</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></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 path"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></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">−</span>]</a></span><a class="srclink" href="../../src/game/ltn/mod.rs.html#1-265" title="goto source code">[src]</a></span></h1><h2 id="reexports" class="section-header"><a href="#reexports">Re-exports</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="icon" type="image/svg+xml" href="../../favicon.svg"><link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 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">☰</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></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 path"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></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">−</span>]</a></span><a class="srclink" href="../../src/game/ltn/mod.rs.html#1-272" 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-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><h2 id="modules" class="section-header"><a href="#modules">Modules</a></h2>
|
||||
<div class="item-table"><div class="item-left module-item"><a class="mod" href="algorithms/index.html" title="game::ltn::algorithms mod">algorithms</a></div><div class="item-right docblock-short"></div><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><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2>
|
||||
<div class="item-table"><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 class="item-left module-item"><a class="struct" href="struct.RatRun.html" title="game::ltn::RatRun struct">RatRun</a></div><div class="item-right docblock-short"></div><div class="item-left module-item"><a class="struct" href="struct.Viewer.html" title="game::ltn::Viewer struct">Viewer</a></div><div class="item-right docblock-short"></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>
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -4,8 +4,8 @@
|
||||
draw_neighborhood: <a class="struct" href="../../map_gui/tools/draw/struct.ToggleZoomed.html" title="struct map_gui::tools::draw::ToggleZoomed">ToggleZoomed</a>,
|
||||
draw_dynamic_stuff: Drawable,
|
||||
current_rat_run_idx: <a class="primitive" href="https://doc.rust-lang.org/1.55.0/std/primitive.usize.html">usize</a>,
|
||||
}</pre></div><h2 id="fields" class="fields small-section-header">Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.panel" class="structfield small-section-header"><a href="#structfield.panel" class="anchor field"></a><code>panel: Panel</code></span><span id="structfield.neighborhood" class="structfield small-section-header"><a href="#structfield.neighborhood" class="anchor field"></a><code>neighborhood: <a class="struct" href="struct.Neighborhood.html" title="struct game::ltn::Neighborhood">Neighborhood</a></code></span><span id="structfield.draw_neighborhood" class="structfield small-section-header"><a href="#structfield.draw_neighborhood" class="anchor field"></a><code>draw_neighborhood: <a class="struct" href="../../map_gui/tools/draw/struct.ToggleZoomed.html" title="struct map_gui::tools::draw::ToggleZoomed">ToggleZoomed</a></code></span><span id="structfield.draw_dynamic_stuff" class="structfield small-section-header"><a href="#structfield.draw_dynamic_stuff" class="anchor field"></a><code>draw_dynamic_stuff: Drawable</code></span><span id="structfield.current_rat_run_idx" class="structfield small-section-header"><a href="#structfield.current_rat_run_idx" class="anchor field"></a><code>current_rat_run_idx: <a class="primitive" href="https://doc.rust-lang.org/1.55.0/std/primitive.usize.html">usize</a></code></span><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#46-157" 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.Viewer.html" title="struct game::ltn::Viewer">Viewer</a></h3></div></summary><div class="impl-items"><div id="method.start_from_road" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../src/game/ltn/mod.rs.html#47-78" title="goto source code">[src]</a></div><a href="#method.start_from_road" class="anchor"></a><h4 class="code-header">fn <a href="#method.start_from_road" class="fnname">start_from_road</a>(<br> ctx: &mut EventCtx<'_>, <br> app: &<a class="struct" href="../app/struct.App.html" title="struct game::app::App">App</a>, <br> start: <a class="struct" href="../../map_model/objects/road/struct.RoadID.html" title="struct map_model::objects::road::RoadID">RoadID</a><br>) -> <a class="struct" href="https://doc.rust-lang.org/1.55.0/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><dyn State<<a class="struct" href="../app/struct.App.html" title="struct game::app::App">App</a>>></h4></div><div id="method.recalculate" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../src/game/ltn/mod.rs.html#80-156" title="goto source code">[src]</a></div><a href="#method.recalculate" class="anchor"></a><h4 class="code-header">fn <a href="#method.recalculate" class="fnname">recalculate</a>(&mut self, ctx: &mut EventCtx<'_>, app: &<a class="struct" href="../app/struct.App.html" title="struct game::app::App">App</a>)</h4></div></div></details><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-State%3CApp%3E" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/game/ltn/mod.rs.html#159-227" title="goto source code">[src]</a></div><a href="#impl-State%3CApp%3E" class="anchor"></a><h3 class="code-header in-band">impl State<<a class="struct" href="../app/struct.App.html" title="struct game::app::App">App</a>> for <a class="struct" href="struct.Viewer.html" title="struct game::ltn::Viewer">Viewer</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.event" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/game/ltn/mod.rs.html#160-208" title="goto source code">[src]</a></div><a href="#method.event" class="anchor"></a><h4 class="code-header">fn <a class="fnname">event</a>(&mut self, ctx: &mut EventCtx<'_>, app: &mut <a class="struct" href="../app/struct.App.html" title="struct game::app::App">App</a>) -> Transition<<a class="struct" href="../app/struct.App.html" title="struct game::app::App">App</a>></h4></div></summary><div class='docblock'><p>Respond to a UI event, such as input or time passing.</p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.draw" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/game/ltn/mod.rs.html#210-226" title="goto source code">[src]</a></div><a href="#method.draw" class="anchor"></a><h4 class="code-header">fn <a class="fnname">draw</a>(&self, g: &mut GfxCtx<'_>, app: &<a class="struct" href="../app/struct.App.html" title="struct game::app::App">App</a>)</h4></div></summary><div class='docblock'><p>Draw</p>
|
||||
}</pre></div><h2 id="fields" class="fields small-section-header">Fields<a href="#fields" class="anchor"></a></h2><span id="structfield.panel" class="structfield small-section-header"><a href="#structfield.panel" class="anchor field"></a><code>panel: Panel</code></span><span id="structfield.neighborhood" class="structfield small-section-header"><a href="#structfield.neighborhood" class="anchor field"></a><code>neighborhood: <a class="struct" href="struct.Neighborhood.html" title="struct game::ltn::Neighborhood">Neighborhood</a></code></span><span id="structfield.draw_neighborhood" class="structfield small-section-header"><a href="#structfield.draw_neighborhood" class="anchor field"></a><code>draw_neighborhood: <a class="struct" href="../../map_gui/tools/draw/struct.ToggleZoomed.html" title="struct map_gui::tools::draw::ToggleZoomed">ToggleZoomed</a></code></span><span id="structfield.draw_dynamic_stuff" class="structfield small-section-header"><a href="#structfield.draw_dynamic_stuff" class="anchor field"></a><code>draw_dynamic_stuff: Drawable</code></span><span id="structfield.current_rat_run_idx" class="structfield small-section-header"><a href="#structfield.current_rat_run_idx" class="anchor field"></a><code>current_rat_run_idx: <a class="primitive" href="https://doc.rust-lang.org/1.55.0/std/primitive.usize.html">usize</a></code></span><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#46-164" 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.Viewer.html" title="struct game::ltn::Viewer">Viewer</a></h3></div></summary><div class="impl-items"><div id="method.start_from_road" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../src/game/ltn/mod.rs.html#47-78" title="goto source code">[src]</a></div><a href="#method.start_from_road" class="anchor"></a><h4 class="code-header">fn <a href="#method.start_from_road" class="fnname">start_from_road</a>(<br> ctx: &mut EventCtx<'_>, <br> app: &<a class="struct" href="../app/struct.App.html" title="struct game::app::App">App</a>, <br> start: <a class="struct" href="../../map_model/objects/road/struct.RoadID.html" title="struct map_model::objects::road::RoadID">RoadID</a><br>) -> <a class="struct" href="https://doc.rust-lang.org/1.55.0/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><dyn State<<a class="struct" href="../app/struct.App.html" title="struct game::app::App">App</a>>></h4></div><div id="method.recalculate" class="method has-srclink"><div class="rightside"><a class="srclink" href="../../src/game/ltn/mod.rs.html#80-163" title="goto source code">[src]</a></div><a href="#method.recalculate" class="anchor"></a><h4 class="code-header">fn <a href="#method.recalculate" class="fnname">recalculate</a>(&mut self, ctx: &mut EventCtx<'_>, app: &<a class="struct" href="../app/struct.App.html" title="struct game::app::App">App</a>)</h4></div></div></details><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-State%3CApp%3E" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/game/ltn/mod.rs.html#166-234" title="goto source code">[src]</a></div><a href="#impl-State%3CApp%3E" class="anchor"></a><h3 class="code-header in-band">impl State<<a class="struct" href="../app/struct.App.html" title="struct game::app::App">App</a>> for <a class="struct" href="struct.Viewer.html" title="struct game::ltn::Viewer">Viewer</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.event" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/game/ltn/mod.rs.html#167-215" title="goto source code">[src]</a></div><a href="#method.event" class="anchor"></a><h4 class="code-header">fn <a class="fnname">event</a>(&mut self, ctx: &mut EventCtx<'_>, app: &mut <a class="struct" href="../app/struct.App.html" title="struct game::app::App">App</a>) -> Transition<<a class="struct" href="../app/struct.App.html" title="struct game::app::App">App</a>></h4></div></summary><div class='docblock'><p>Respond to a UI event, such as input or time passing.</p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.draw" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/game/ltn/mod.rs.html#217-233" title="goto source code">[src]</a></div><a href="#method.draw" class="anchor"></a><h4 class="code-header">fn <a class="fnname">draw</a>(&self, g: &mut GfxCtx<'_>, app: &<a class="struct" href="../app/struct.App.html" title="struct game::app::App">App</a>)</h4></div></summary><div class='docblock'><p>Draw</p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.draw_baselayer" class="method trait-impl has-srclink"><div class="rightside"></div><a href="#method.draw_baselayer" class="anchor"></a><h4 class="code-header">fn <a href="#method.draw_baselayer" class="fnname">draw_baselayer</a>(&self) -> DrawBaselayer</h4></div></summary><div class='docblock'><p>Specifies what to draw before draw()</p>
|
||||
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.on_destroy" class="method trait-impl has-srclink"><div class="rightside"></div><a href="#method.on_destroy" class="anchor"></a><h4 class="code-header">fn <a href="#method.on_destroy" class="fnname">on_destroy</a>(&mut self, &mut EventCtx<'_>, <a class="primitive" href="https://doc.rust-lang.org/1.55.0/std/primitive.reference.html">&mut </a>A)</h4></div></summary><div class='docblock'><p>Before this state is popped or replaced, call this.</p>
|
||||
</div></details></div></details></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><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.55.0/std/panic/trait.RefUnwindSafe.html" title="trait std::panic::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.Viewer.html" title="struct game::ltn::Viewer">Viewer</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.55.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.Viewer.html" title="struct game::ltn::Viewer">Viewer</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.55.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.Viewer.html" title="struct game::ltn::Viewer">Viewer</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.55.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.Viewer.html" title="struct game::ltn::Viewer">Viewer</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.55.0/std/panic/trait.UnwindSafe.html" title="trait std::panic::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.Viewer.html" title="struct game::ltn::Viewer">Viewer</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.55.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<T> <a class="trait" href="https://doc.rust-lang.org/1.55.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br> T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.55.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>, </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.55.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.55.0/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.55.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.55.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
|
||||
|
@ -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 game::pregame::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="icon" type="image/svg+xml" href="../../../favicon.svg"><link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc constant"><!--[if lte IE 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">☰</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">pregame</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">game</a>::<wbr><a href="../index.html">pregame</a>::<wbr><a href="index.html">built_info</a>::<wbr><a class="constant" href="#">BUILT_TIME_UTC</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></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">−</span>]</a></span><a class="srclink" href="../../../src/game/home/runner/work/abstreet/abstreet/target/debug/build/game-0716a03cc01a18cb/out/built.rs.html#78" title="goto source code">[src]</a></span></h1><pre class="rust const">pub const BUILT_TIME_UTC: &<a class="primitive" href="https://doc.rust-lang.org/1.55.0/std/primitive.str.html">str</a> = r"Thu, 30 Sep 2021 21:59:25 +0000";</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 game::pregame::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="icon" type="image/svg+xml" href="../../../favicon.svg"><link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc constant"><!--[if lte IE 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">☰</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">pregame</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">game</a>::<wbr><a href="../index.html">pregame</a>::<wbr><a href="index.html">built_info</a>::<wbr><a class="constant" href="#">BUILT_TIME_UTC</a><button id="copy-path" onclick="copy_path(this)" title="copy path"><img src="../../../clipboard.svg" width="19" height="18" alt="Copy item import" title="Copy item import to clipboard"></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">−</span>]</a></span><a class="srclink" href="../../../src/game/home/runner/work/abstreet/abstreet/target/debug/build/game-0716a03cc01a18cb/out/built.rs.html#78" title="goto source code">[src]</a></span></h1><pre class="rust const">pub const BUILT_TIME_UTC: &<a class="primitive" href="https://doc.rust-lang.org/1.55.0/std/primitive.str.html">str</a> = r"Sat, 02 Oct 2021 17:31:58 +0000";</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="game" 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
@ -175,7 +175,7 @@
|
||||
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">RUSTDOC_VERSION</span>: <span class="kw-2">&</span><span class="ident">str</span> <span class="op">=</span> <span class="string">r"rustdoc 1.55.0 (c8dfcfe04 2021-09-06)"</span>;
|
||||
<span class="attribute">#[<span class="ident">doc</span><span class="op">=</span><span class="string">r#"The build time in RFC2822, UTC."#</span>]</span>
|
||||
<span class="attribute">#[<span class="ident">allow</span>(<span class="ident">dead_code</span>)]</span>
|
||||
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">BUILT_TIME_UTC</span>: <span class="kw-2">&</span><span class="ident">str</span> <span class="op">=</span> <span class="string">r"Thu, 30 Sep 2021 21:59:25 +0000"</span>;
|
||||
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">BUILT_TIME_UTC</span>: <span class="kw-2">&</span><span class="ident">str</span> <span class="op">=</span> <span class="string">r"Sat, 02 Oct 2021 17:31:58 +0000"</span>;
|
||||
<span class="attribute">#[<span class="ident">doc</span><span class="op">=</span><span class="string">r#"The target architecture, given by `CARGO_CFG_TARGET_ARCH`."#</span>]</span>
|
||||
<span class="attribute">#[<span class="ident">allow</span>(<span class="ident">dead_code</span>)]</span>
|
||||
<span class="kw">pub</span> <span class="kw">const</span> <span class="ident">CFG_TARGET_ARCH</span>: <span class="kw-2">&</span><span class="ident">str</span> <span class="op">=</span> <span class="string">r"x86_64"</span>;
|
||||
|
@ -263,6 +263,13 @@
|
||||
<span id="263">263</span>
|
||||
<span id="264">264</span>
|
||||
<span id="265">265</span>
|
||||
<span id="266">266</span>
|
||||
<span id="267">267</span>
|
||||
<span id="268">268</span>
|
||||
<span id="269">269</span>
|
||||
<span id="270">270</span>
|
||||
<span id="271">271</span>
|
||||
<span id="272">272</span>
|
||||
</pre><pre class="rust">
|
||||
<span class="kw">use</span> <span class="ident">std::collections::BTreeSet</span>;
|
||||
|
||||
@ -401,9 +408,16 @@
|
||||
);
|
||||
<span class="kw">for</span> <span class="ident">r</span> <span class="kw">in</span> <span class="kw-2">&</span><span class="self">self</span>.<span class="ident">neighborhood</span>.<span class="ident">modal_filters</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="comment">// TODO If these roads touch a border, probably place it closer to the border. If it's</span>
|
||||
<span class="comment">// an inner neighborhood split, maybe in the middle is more reasonable.</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="ident">road</span>.<span class="ident">length</span>() <span class="op">/</span> <span class="number">2.0</span>) {
|
||||
<span class="comment">// If this road touches a border, place it closer to that intersection. If it's an</span>
|
||||
<span class="comment">// inner neighborhood split, then stick to the middle of that road.</span>
|
||||
<span class="kw">let</span> <span class="ident">pct_along</span> <span class="op">=</span> <span class="kw">if</span> <span class="self">self</span>.<span class="ident">neighborhood</span>.<span class="ident">borders</span>.<span class="ident">contains</span>(<span class="kw-2">&</span><span class="ident">road</span>.<span class="ident">src_i</span>) {
|
||||
<span class="number">0.1</span>
|
||||
} <span class="kw">else</span> <span class="kw">if</span> <span class="self">self</span>.<span class="ident">neighborhood</span>.<span class="ident">borders</span>.<span class="ident">contains</span>(<span class="kw-2">&</span><span class="ident">road</span>.<span class="ident">dst_i</span>) {
|
||||
<span class="number">0.9</span>
|
||||
} <span class="kw">else</span> {
|
||||
<span class="number">0.5</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="ident">pct_along</span> <span class="op">*</span> <span class="ident">road</span>.<span class="ident">length</span>()) {
|
||||
<span class="kw">let</span> <span class="ident">filter_len</span> <span class="op">=</span> <span class="ident">road</span>.<span class="ident">get_width</span>();
|
||||
<span class="kw">let</span> <span class="ident">barrier</span> <span class="op">=</span> <span class="ident">Line::must_new</span>(
|
||||
<span class="ident">pt</span>.<span class="ident">project_away</span>(<span class="ident">filter_len</span>, <span class="ident">angle</span>.<span class="ident">rotate_degs</span>(<span class="number">90.0</span>)),
|
||||
|
Loading…
Reference in New Issue
Block a user