29 lines
9.5 KiB
HTML
29 lines
9.5 KiB
HTML
<!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="This trait should be used instead of the `Node` trait when making a render node that runs on a view."><title>ViewNode in bevy_render::render_graph - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-42caa33d.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="bevy_render" data-themes="" data-resource-suffix="" data-rustdoc-version="1.84.0 (9fc6b4312 2025-01-07)" data-channel="1.84.0" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../../static.files/storage-59e33391.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-893ab5e7.css"></noscript><link rel="icon" href="https://bevyengine.org/assets/icon.png"></head><body class="rustdoc trait"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button><a class="logo-container" href="../../bevy_render/index.html"><img src="https://bevyengine.org/assets/icon.png" alt=""></a></nav><nav class="sidebar"><div class="sidebar-crate"><a class="logo-container" href="../../bevy_render/index.html"><img src="https://bevyengine.org/assets/icon.png" alt="logo"></a><h2><a href="../../bevy_render/index.html">bevy_<wbr>render</a><span class="version">0.15.1</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">View<wbr>Node</a></h2><h3><a href="#required-associated-types">Required Associated Types</a></h3><ul class="block"><li><a href="#associatedtype.ViewQuery" title="ViewQuery">ViewQuery</a></li></ul><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.run" title="run">run</a></li></ul><h3><a href="#provided-methods">Provided Methods</a></h3><ul class="block"><li><a href="#method.update" title="update">update</a></li></ul><h3><a href="#implementors">Implementors</a></h3></section><div id="rustdoc-modnav"><h2><a href="index.html">In bevy_<wbr>render::<wbr>render_<wbr>graph</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="../index.html">bevy_render</a>::<wbr><a href="index.html">render_graph</a></span><h1>Trait <span class="trait">ViewNode</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/bevy_render/render_graph/node.rs.html#351-369">Source</a> </span></div><pre class="rust item-decl"><code>pub trait ViewNode {
|
||
type <a href="#associatedtype.ViewQuery" class="associatedtype">ViewQuery</a>: <a class="trait" href="../../bevy_ecs/query/fetch/trait.ReadOnlyQueryData.html" title="trait bevy_ecs::query::fetch::ReadOnlyQueryData">ReadOnlyQueryData</a>;
|
||
|
||
// Required method
|
||
fn <a href="#tymethod.run" class="fn">run</a><'w>(
|
||
&self,
|
||
graph: &mut <a class="struct" href="struct.RenderGraphContext.html" title="struct bevy_render::render_graph::RenderGraphContext">RenderGraphContext</a><'_>,
|
||
render_context: &mut <a class="struct" href="../renderer/struct.RenderContext.html" title="struct bevy_render::renderer::RenderContext">RenderContext</a><'w>,
|
||
view_query: <a class="type" href="../../bevy_ecs/query/fetch/type.QueryItem.html" title="type bevy_ecs::query::fetch::QueryItem">QueryItem</a><'w, Self::<a class="associatedtype" href="trait.ViewNode.html#associatedtype.ViewQuery" title="type bevy_render::render_graph::ViewNode::ViewQuery">ViewQuery</a>>,
|
||
world: &'w <a class="struct" href="../../bevy_ecs/world/struct.World.html" title="struct bevy_ecs::world::World">World</a>,
|
||
) -> <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.unit.html">()</a>, <a class="enum" href="enum.NodeRunError.html" title="enum bevy_render::render_graph::NodeRunError">NodeRunError</a>>;
|
||
|
||
// Provided method
|
||
fn <a href="#method.update" class="fn">update</a>(&mut self, _world: &mut <a class="struct" href="../../bevy_ecs/world/struct.World.html" title="struct bevy_ecs::world::World">World</a>) { ... }
|
||
}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>This trait should be used instead of the <a href="trait.Node.html" title="trait bevy_render::render_graph::Node"><code>Node</code></a> trait when making a render node that runs on a view.</p>
|
||
<p>It is intended to be used with <a href="struct.ViewNodeRunner.html" title="struct bevy_render::render_graph::ViewNodeRunner"><code>ViewNodeRunner</code></a></p>
|
||
</div></details><h2 id="required-associated-types" class="section-header">Required Associated Types<a href="#required-associated-types" class="anchor">§</a></h2><div class="methods"><details class="toggle" open><summary><section id="associatedtype.ViewQuery" class="method"><a class="src rightside" href="../../src/bevy_render/render_graph/node.rs.html#354">Source</a><h4 class="code-header">type <a href="#associatedtype.ViewQuery" class="associatedtype">ViewQuery</a>: <a class="trait" href="../../bevy_ecs/query/fetch/trait.ReadOnlyQueryData.html" title="trait bevy_ecs::query::fetch::ReadOnlyQueryData">ReadOnlyQueryData</a></h4></section></summary><div class="docblock"><p>The query that will be used on the view entity.
|
||
It is guaranteed to run on the view entity, so there’s no need for a filter</p>
|
||
</div></details></div><h2 id="required-methods" class="section-header">Required Methods<a href="#required-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="tymethod.run" class="method"><a class="src rightside" href="../../src/bevy_render/render_graph/node.rs.html#362-368">Source</a><h4 class="code-header">fn <a href="#tymethod.run" class="fn">run</a><'w>(
|
||
&self,
|
||
graph: &mut <a class="struct" href="struct.RenderGraphContext.html" title="struct bevy_render::render_graph::RenderGraphContext">RenderGraphContext</a><'_>,
|
||
render_context: &mut <a class="struct" href="../renderer/struct.RenderContext.html" title="struct bevy_render::renderer::RenderContext">RenderContext</a><'w>,
|
||
view_query: <a class="type" href="../../bevy_ecs/query/fetch/type.QueryItem.html" title="type bevy_ecs::query::fetch::QueryItem">QueryItem</a><'w, Self::<a class="associatedtype" href="trait.ViewNode.html#associatedtype.ViewQuery" title="type bevy_render::render_graph::ViewNode::ViewQuery">ViewQuery</a>>,
|
||
world: &'w <a class="struct" href="../../bevy_ecs/world/struct.World.html" title="struct bevy_ecs::world::World">World</a>,
|
||
) -> <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.unit.html">()</a>, <a class="enum" href="enum.NodeRunError.html" title="enum bevy_render::render_graph::NodeRunError">NodeRunError</a>></h4></section></summary><div class="docblock"><p>Runs the graph node logic, issues draw calls, updates the output slots and
|
||
optionally queues up subgraphs for execution. The graph data, input and output values are
|
||
passed via the <a href="struct.RenderGraphContext.html" title="struct bevy_render::render_graph::RenderGraphContext"><code>RenderGraphContext</code></a>.</p>
|
||
</div></details></div><h2 id="provided-methods" class="section-header">Provided Methods<a href="#provided-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="method.update" class="method"><a class="src rightside" href="../../src/bevy_render/render_graph/node.rs.html#357">Source</a><h4 class="code-header">fn <a href="#method.update" class="fn">update</a>(&mut self, _world: &mut <a class="struct" href="../../bevy_ecs/world/struct.World.html" title="struct bevy_ecs::world::World">World</a>)</h4></section></summary><div class="docblock"><p>Updates internal node state using the current render <a href="../../bevy_ecs/world/struct.World.html" title="struct bevy_ecs::world::World"><code>World</code></a> prior to the run method.</p>
|
||
</div></details></div><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"></div><script src="../../trait.impl/bevy_render/render_graph/node/trait.ViewNode.js" async></script></section></div></main></body></html> |