Files
phy/rapier3d/pipeline/trait.DebugRenderBackend.html
Orion Kindel 0ce894e6b0 doc
2025-03-18 10:30:23 -05:00

63 lines
13 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="Trait implemented by graphics backends responsible for rendering the physics scene."><title>DebugRenderBackend in rapier3d::pipeline - 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="rapier3d" 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="alternate icon" type="image/png" href="../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></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></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../rapier3d/index.html">rapier3d</a><span class="version">0.23.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Debug<wbr>Render<wbr>Backend</a></h2><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.draw_line" title="draw_line">draw_line</a></li></ul><h3><a href="#provided-methods">Provided Methods</a></h3><ul class="block"><li><a href="#method.draw_line_strip" title="draw_line_strip">draw_line_strip</a></li><li><a href="#method.draw_polyline" title="draw_polyline">draw_polyline</a></li><li><a href="#method.filter_object" title="filter_object">filter_object</a></li></ul><h3><a href="#implementors">Implementors</a></h3></section><div id="rustdoc-modnav"><h2><a href="index.html">In rapier3d::<wbr>pipeline</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">rapier3d</a>::<wbr><a href="index.html">pipeline</a></span><h1>Trait <span class="trait">DebugRenderBackend</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/rapier3d/pipeline/debug_render_pipeline/debug_render_backend.rs.html#32-88">Source</a> </span></div><pre class="rust item-decl"><code>pub trait DebugRenderBackend {
// Required method
fn <a href="#tymethod.draw_line" class="fn">draw_line</a>(
&amp;mut self,
object: <a class="enum" href="enum.DebugRenderObject.html" title="enum rapier3d::pipeline::DebugRenderObject">DebugRenderObject</a>&lt;'_&gt;,
a: <a class="type" href="../math/type.Point.html" title="type rapier3d::math::Point">Point</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html">f32</a>&gt;,
b: <a class="type" href="../math/type.Point.html" title="type rapier3d::math::Point">Point</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html">f32</a>&gt;,
color: [<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html">f32</a>; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.array.html">4</a>],
);
// Provided methods
fn <a href="#method.filter_object" class="fn">filter_object</a>(&amp;self, _object: <a class="enum" href="enum.DebugRenderObject.html" title="enum rapier3d::pipeline::DebugRenderObject">DebugRenderObject</a>&lt;'_&gt;) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a> { ... }
<span class="item-spacer"></span> fn <a href="#method.draw_polyline" class="fn">draw_polyline</a>(
&amp;mut self,
object: <a class="enum" href="enum.DebugRenderObject.html" title="enum rapier3d::pipeline::DebugRenderObject">DebugRenderObject</a>&lt;'_&gt;,
vertices: &amp;[<a class="type" href="../math/type.Point.html" title="type rapier3d::math::Point">Point</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html">f32</a>&gt;],
indices: &amp;[[<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u32.html">u32</a>; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.array.html">2</a>]],
transform: &amp;<a class="type" href="../math/type.Isometry.html" title="type rapier3d::math::Isometry">Isometry</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html">f32</a>&gt;,
scale: &amp;<a class="type" href="../math/type.Vector.html" title="type rapier3d::math::Vector">Vector</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html">f32</a>&gt;,
color: [<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html">f32</a>; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.array.html">4</a>],
) { ... }
<span class="item-spacer"></span> fn <a href="#method.draw_line_strip" class="fn">draw_line_strip</a>(
&amp;mut self,
object: <a class="enum" href="enum.DebugRenderObject.html" title="enum rapier3d::pipeline::DebugRenderObject">DebugRenderObject</a>&lt;'_&gt;,
vertices: &amp;[<a class="type" href="../math/type.Point.html" title="type rapier3d::math::Point">Point</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html">f32</a>&gt;],
transform: &amp;<a class="type" href="../math/type.Isometry.html" title="type rapier3d::math::Isometry">Isometry</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html">f32</a>&gt;,
scale: &amp;<a class="type" href="../math/type.Vector.html" title="type rapier3d::math::Vector">Vector</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html">f32</a>&gt;,
color: [<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html">f32</a>; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.array.html">4</a>],
closed: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a>,
) { ... }
}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Trait implemented by graphics backends responsible for rendering the physics scene.</p>
<p>The only thing that is required from the graphics backend is to be able to render
a colored line. Note that the color is only a suggestion and is computed from the
<code>DebugRenderStyle</code>. The backend is free to apply its own style, for example based on
the <code>object</code> being rendered.</p>
</div></details><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.draw_line" class="method"><a class="src rightside" href="../../src/rapier3d/pipeline/debug_render_pipeline/debug_render_backend.rs.html#41-47">Source</a><h4 class="code-header">fn <a href="#tymethod.draw_line" class="fn">draw_line</a>(
&amp;mut self,
object: <a class="enum" href="enum.DebugRenderObject.html" title="enum rapier3d::pipeline::DebugRenderObject">DebugRenderObject</a>&lt;'_&gt;,
a: <a class="type" href="../math/type.Point.html" title="type rapier3d::math::Point">Point</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html">f32</a>&gt;,
b: <a class="type" href="../math/type.Point.html" title="type rapier3d::math::Point">Point</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html">f32</a>&gt;,
color: [<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html">f32</a>; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.array.html">4</a>],
)</h4></section></summary><div class="docblock"><p>Draws a colored line.</p>
<p>Note that this method can be called multiple time for the same <code>object</code>.</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.filter_object" class="method"><a class="src rightside" href="../../src/rapier3d/pipeline/debug_render_pipeline/debug_render_backend.rs.html#34-36">Source</a><h4 class="code-header">fn <a href="#method.filter_object" class="fn">filter_object</a>(&amp;self, _object: <a class="enum" href="enum.DebugRenderObject.html" title="enum rapier3d::pipeline::DebugRenderObject">DebugRenderObject</a>&lt;'_&gt;) -&gt; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Predicate to filter-out some objects from the debug-rendering.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.draw_polyline" class="method"><a class="src rightside" href="../../src/rapier3d/pipeline/debug_render_pipeline/debug_render_backend.rs.html#50-64">Source</a><h4 class="code-header">fn <a href="#method.draw_polyline" class="fn">draw_polyline</a>(
&amp;mut self,
object: <a class="enum" href="enum.DebugRenderObject.html" title="enum rapier3d::pipeline::DebugRenderObject">DebugRenderObject</a>&lt;'_&gt;,
vertices: &amp;[<a class="type" href="../math/type.Point.html" title="type rapier3d::math::Point">Point</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html">f32</a>&gt;],
indices: &amp;[[<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u32.html">u32</a>; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.array.html">2</a>]],
transform: &amp;<a class="type" href="../math/type.Isometry.html" title="type rapier3d::math::Isometry">Isometry</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html">f32</a>&gt;,
scale: &amp;<a class="type" href="../math/type.Vector.html" title="type rapier3d::math::Vector">Vector</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html">f32</a>&gt;,
color: [<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html">f32</a>; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.array.html">4</a>],
)</h4></section></summary><div class="docblock"><p>Draws a set of lines.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.draw_line_strip" class="method"><a class="src rightside" href="../../src/rapier3d/pipeline/debug_render_pipeline/debug_render_backend.rs.html#67-87">Source</a><h4 class="code-header">fn <a href="#method.draw_line_strip" class="fn">draw_line_strip</a>(
&amp;mut self,
object: <a class="enum" href="enum.DebugRenderObject.html" title="enum rapier3d::pipeline::DebugRenderObject">DebugRenderObject</a>&lt;'_&gt;,
vertices: &amp;[<a class="type" href="../math/type.Point.html" title="type rapier3d::math::Point">Point</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html">f32</a>&gt;],
transform: &amp;<a class="type" href="../math/type.Isometry.html" title="type rapier3d::math::Isometry">Isometry</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html">f32</a>&gt;,
scale: &amp;<a class="type" href="../math/type.Vector.html" title="type rapier3d::math::Vector">Vector</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html">f32</a>&gt;,
color: [<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html">f32</a>; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.array.html">4</a>],
closed: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a>,
)</h4></section></summary><div class="docblock"><p>Draws a chain of lines.</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/rapier3d/pipeline/debug_render_pipeline/debug_render_backend/trait.DebugRenderBackend.js" async></script></section></div></main></body></html>