50 lines
29 KiB
HTML
50 lines
29 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="Exposes methods to uniformly sample a variety of primitive shapes."><title>ShapeSample in bevy_math::sampling::shape_sampling - 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_math" 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_math/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_math/index.html"><img src="https://bevyengine.org/assets/icon.png" alt="logo"></a><h2><a href="../../../bevy_math/index.html">bevy_<wbr>math</a><span class="version">0.15.1</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Shape<wbr>Sample</a></h2><h3><a href="#required-associated-types">Required Associated Types</a></h3><ul class="block"><li><a href="#associatedtype.Output" title="Output">Output</a></li></ul><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.sample_boundary" title="sample_boundary">sample_boundary</a></li><li><a href="#tymethod.sample_interior" title="sample_interior">sample_interior</a></li></ul><h3><a href="#provided-methods">Provided Methods</a></h3><ul class="block"><li><a href="#method.boundary_dist" title="boundary_dist">boundary_dist</a></li><li><a href="#method.interior_dist" title="interior_dist">interior_dist</a></li></ul><h3><a href="#dyn-compatibility">Dyn Compatibility</a></h3><h3><a href="#implementors">Implementors</a></h3></section><div id="rustdoc-modnav"><h2><a href="index.html">In bevy_<wbr>math::<wbr>sampling::<wbr>shape_<wbr>sampling</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_math</a>::<wbr><a href="../index.html">sampling</a>::<wbr><a href="index.html">shape_sampling</a></span><h1>Trait <span class="trait">ShapeSample</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_math/sampling/shape_sampling.rs.html#50-126">Source</a> </span></div><pre class="rust item-decl"><code>pub trait ShapeSample {
|
||
type <a href="#associatedtype.Output" class="associatedtype">Output</a>;
|
||
|
||
// Required methods
|
||
fn <a href="#tymethod.sample_interior" class="fn">sample_interior</a><R: <a class="trait" href="../../../rand/rng/trait.Rng.html" title="trait rand::rng::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.84.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, rng: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.reference.html">&mut R</a>) -> Self::<a class="associatedtype" href="trait.ShapeSample.html#associatedtype.Output" title="type bevy_math::sampling::shape_sampling::ShapeSample::Output">Output</a>;
|
||
<span class="item-spacer"></span> fn <a href="#tymethod.sample_boundary" class="fn">sample_boundary</a><R: <a class="trait" href="../../../rand/rng/trait.Rng.html" title="trait rand::rng::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.84.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, rng: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.reference.html">&mut R</a>) -> Self::<a class="associatedtype" href="trait.ShapeSample.html#associatedtype.Output" title="type bevy_math::sampling::shape_sampling::ShapeSample::Output">Output</a>;
|
||
|
||
// Provided methods
|
||
fn <a href="#method.interior_dist" class="fn">interior_dist</a>(self) -> impl <a class="trait" href="../../../rand/distributions/distribution/trait.Distribution.html" title="trait rand::distributions::distribution::Distribution">Distribution</a><Self::<a class="associatedtype" href="trait.ShapeSample.html#associatedtype.Output" title="type bevy_math::sampling::shape_sampling::ShapeSample::Output">Output</a>>
|
||
<span class="where">where Self: <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span> { ... }
|
||
<span class="item-spacer"></span> fn <a href="#method.boundary_dist" class="fn">boundary_dist</a>(self) -> impl <a class="trait" href="../../../rand/distributions/distribution/trait.Distribution.html" title="trait rand::distributions::distribution::Distribution">Distribution</a><Self::<a class="associatedtype" href="trait.ShapeSample.html#associatedtype.Output" title="type bevy_math::sampling::shape_sampling::ShapeSample::Output">Output</a>>
|
||
<span class="where">where Self: <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span> { ... }
|
||
}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Exposes methods to uniformly sample a variety of primitive shapes.</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.Output" class="method"><a class="src rightside" href="../../../src/bevy_math/sampling/shape_sampling.rs.html#52">Source</a><h4 class="code-header">type <a href="#associatedtype.Output" class="associatedtype">Output</a></h4></section></summary><div class="docblock"><p>The type of vector returned by the sample methods, <a href="../../struct.Vec2.html" title="struct bevy_math::Vec2"><code>Vec2</code></a> for 2D shapes and <a href="../../struct.Vec3.html" title="struct bevy_math::Vec3"><code>Vec3</code></a> for 3D shapes.</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.sample_interior" class="method"><a class="src rightside" href="../../../src/bevy_math/sampling/shape_sampling.rs.html#66">Source</a><h4 class="code-header">fn <a href="#tymethod.sample_interior" class="fn">sample_interior</a><R: <a class="trait" href="../../../rand/rng/trait.Rng.html" title="trait rand::rng::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.84.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, rng: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.reference.html">&mut R</a>) -> Self::<a class="associatedtype" href="trait.ShapeSample.html#associatedtype.Output" title="type bevy_math::sampling::shape_sampling::ShapeSample::Output">Output</a></h4></section></summary><div class="docblock"><p>Uniformly sample a point from inside the area/volume of this shape, centered on 0.</p>
|
||
<p>Shapes like <a href="../../primitives/struct.Cylinder.html" title="struct bevy_math::primitives::Cylinder"><code>Cylinder</code></a>, <a href="../../primitives/struct.Capsule2d.html" title="struct bevy_math::primitives::Capsule2d"><code>Capsule2d</code></a> and <a href="../../primitives/struct.Capsule3d.html" title="struct bevy_math::primitives::Capsule3d"><code>Capsule3d</code></a> are oriented along the y-axis.</p>
|
||
<h5 id="example"><a class="doc-anchor" href="#example">§</a>Example</h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>square = Rectangle::new(<span class="number">2.0</span>, <span class="number">2.0</span>);
|
||
|
||
<span class="comment">// Returns a Vec2 with both x and y between -1 and 1.
|
||
</span><span class="macro">println!</span>(<span class="string">"{:?}"</span>, square.sample_interior(<span class="kw-2">&mut </span>rand::thread_rng()));</code></pre></div>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.sample_boundary" class="method"><a class="src rightside" href="../../../src/bevy_math/sampling/shape_sampling.rs.html#81">Source</a><h4 class="code-header">fn <a href="#tymethod.sample_boundary" class="fn">sample_boundary</a><R: <a class="trait" href="../../../rand/rng/trait.Rng.html" title="trait rand::rng::Rng">Rng</a> + ?<a class="trait" href="https://doc.rust-lang.org/1.84.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>>(&self, rng: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.reference.html">&mut R</a>) -> Self::<a class="associatedtype" href="trait.ShapeSample.html#associatedtype.Output" title="type bevy_math::sampling::shape_sampling::ShapeSample::Output">Output</a></h4></section></summary><div class="docblock"><p>Uniformly sample a point from the surface of this shape, centered on 0.</p>
|
||
<p>Shapes like <a href="../../primitives/struct.Cylinder.html" title="struct bevy_math::primitives::Cylinder"><code>Cylinder</code></a>, <a href="../../primitives/struct.Capsule2d.html" title="struct bevy_math::primitives::Capsule2d"><code>Capsule2d</code></a> and <a href="../../primitives/struct.Capsule3d.html" title="struct bevy_math::primitives::Capsule3d"><code>Capsule3d</code></a> are oriented along the y-axis.</p>
|
||
<h5 id="example-1"><a class="doc-anchor" href="#example-1">§</a>Example</h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>square = Rectangle::new(<span class="number">2.0</span>, <span class="number">2.0</span>);
|
||
|
||
<span class="comment">// Returns a Vec2 where one of the coordinates is at ±1,
|
||
// and the other is somewhere between -1 and 1.
|
||
</span><span class="macro">println!</span>(<span class="string">"{:?}"</span>, square.sample_boundary(<span class="kw-2">&mut </span>rand::thread_rng()));</code></pre></div>
|
||
</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.interior_dist" class="method"><a class="src rightside" href="../../../src/bevy_math/sampling/shape_sampling.rs.html#98-103">Source</a><h4 class="code-header">fn <a href="#method.interior_dist" class="fn">interior_dist</a>(self) -> impl <a class="trait" href="../../../rand/distributions/distribution/trait.Distribution.html" title="trait rand::distributions::distribution::Distribution">Distribution</a><Self::<a class="associatedtype" href="trait.ShapeSample.html#associatedtype.Output" title="type bevy_math::sampling::shape_sampling::ShapeSample::Output">Output</a>><div class="where">where
|
||
Self: <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class="docblock"><p>Extract a <a href="../../../rand/distributions/distribution/trait.Distribution.html" title="trait rand::distributions::distribution::Distribution"><code>Distribution</code></a> whose samples are points of this shape’s interior, taken uniformly.</p>
|
||
<h5 id="example-2"><a class="doc-anchor" href="#example-2">§</a>Example</h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>square = Rectangle::new(<span class="number">2.0</span>, <span class="number">2.0</span>);
|
||
<span class="kw">let </span>rng = rand::thread_rng();
|
||
|
||
<span class="comment">// Iterate over points randomly drawn from `square`'s interior:
|
||
</span><span class="kw">for </span>random_val <span class="kw">in </span>square.interior_dist().sample_iter(rng).take(<span class="number">5</span>) {
|
||
<span class="macro">println!</span>(<span class="string">"{:?}"</span>, random_val);
|
||
}</code></pre></div>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.boundary_dist" class="method"><a class="src rightside" href="../../../src/bevy_math/sampling/shape_sampling.rs.html#120-125">Source</a><h4 class="code-header">fn <a href="#method.boundary_dist" class="fn">boundary_dist</a>(self) -> impl <a class="trait" href="../../../rand/distributions/distribution/trait.Distribution.html" title="trait rand::distributions::distribution::Distribution">Distribution</a><Self::<a class="associatedtype" href="trait.ShapeSample.html#associatedtype.Output" title="type bevy_math::sampling::shape_sampling::ShapeSample::Output">Output</a>><div class="where">where
|
||
Self: <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class="docblock"><p>Extract a <a href="../../../rand/distributions/distribution/trait.Distribution.html" title="trait rand::distributions::distribution::Distribution"><code>Distribution</code></a> whose samples are points of this shape’s boundary, taken uniformly.</p>
|
||
<h5 id="example-3"><a class="doc-anchor" href="#example-3">§</a>Example</h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">let </span>square = Rectangle::new(<span class="number">2.0</span>, <span class="number">2.0</span>);
|
||
<span class="kw">let </span>rng = rand::thread_rng();
|
||
|
||
<span class="comment">// Iterate over points randomly drawn from `square`'s boundary:
|
||
</span><span class="kw">for </span>random_val <span class="kw">in </span>square.boundary_dist().sample_iter(rng).take(<span class="number">5</span>) {
|
||
<span class="macro">println!</span>(<span class="string">"{:?}"</span>, random_val);
|
||
}</code></pre></div>
|
||
</div></details></div><h2 id="dyn-compatibility" class="section-header">Dyn Compatibility<a href="#dyn-compatibility" class="anchor">§</a></h2><div class="dyn-compatibility-info"><p>This trait is <b>not</b> <a href="https://doc.rust-lang.org/1.84.0/reference/items/traits.html#object-safety">dyn compatible</a>.</p><p><i>In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.</i></p></div><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"><details class="toggle implementors-toggle"><summary><section id="impl-ShapeSample-for-Annulus" class="impl"><a class="src rightside" href="../../../src/bevy_math/sampling/shape_sampling.rs.html#196-224">Source</a><a href="#impl-ShapeSample-for-Annulus" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.ShapeSample.html" title="trait bevy_math::sampling::shape_sampling::ShapeSample">ShapeSample</a> for <a class="struct" href="../../primitives/struct.Annulus.html" title="struct bevy_math::primitives::Annulus">Annulus</a></h3></section></summary><div class="impl-items"><section id="associatedtype.Output-1" class="associatedtype trait-impl"><a class="src rightside" href="../../../src/bevy_math/sampling/shape_sampling.rs.html#197">Source</a><a href="#associatedtype.Output-1" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Output" class="associatedtype">Output</a> = <a class="struct" href="../../struct.Vec2.html" title="struct bevy_math::Vec2">Vec2</a></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ShapeSample-for-Capsule2d" class="impl"><a class="src rightside" href="../../../src/bevy_math/sampling/shape_sampling.rs.html#444-495">Source</a><a href="#impl-ShapeSample-for-Capsule2d" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.ShapeSample.html" title="trait bevy_math::sampling::shape_sampling::ShapeSample">ShapeSample</a> for <a class="struct" href="../../primitives/struct.Capsule2d.html" title="struct bevy_math::primitives::Capsule2d">Capsule2d</a></h3></section></summary><div class="impl-items"><section id="associatedtype.Output-2" class="associatedtype trait-impl"><a class="src rightside" href="../../../src/bevy_math/sampling/shape_sampling.rs.html#445">Source</a><a href="#associatedtype.Output-2" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Output" class="associatedtype">Output</a> = <a class="struct" href="../../struct.Vec2.html" title="struct bevy_math::Vec2">Vec2</a></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ShapeSample-for-Capsule3d" class="impl"><a class="src rightside" href="../../../src/bevy_math/sampling/shape_sampling.rs.html#497-545">Source</a><a href="#impl-ShapeSample-for-Capsule3d" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.ShapeSample.html" title="trait bevy_math::sampling::shape_sampling::ShapeSample">ShapeSample</a> for <a class="struct" href="../../primitives/struct.Capsule3d.html" title="struct bevy_math::primitives::Capsule3d">Capsule3d</a></h3></section></summary><div class="impl-items"><section id="associatedtype.Output-3" class="associatedtype trait-impl"><a class="src rightside" href="../../../src/bevy_math/sampling/shape_sampling.rs.html#498">Source</a><a href="#associatedtype.Output-3" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Output" class="associatedtype">Output</a> = <a class="struct" href="../../struct.Vec3.html" title="struct bevy_math::Vec3">Vec3</a></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ShapeSample-for-Circle" class="impl"><a class="src rightside" href="../../../src/bevy_math/sampling/shape_sampling.rs.html#150-167">Source</a><a href="#impl-ShapeSample-for-Circle" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.ShapeSample.html" title="trait bevy_math::sampling::shape_sampling::ShapeSample">ShapeSample</a> for <a class="struct" href="../../primitives/struct.Circle.html" title="struct bevy_math::primitives::Circle">Circle</a></h3></section></summary><div class="impl-items"><section id="associatedtype.Output-4" class="associatedtype trait-impl"><a class="src rightside" href="../../../src/bevy_math/sampling/shape_sampling.rs.html#151">Source</a><a href="#associatedtype.Output-4" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Output" class="associatedtype">Output</a> = <a class="struct" href="../../struct.Vec2.html" title="struct bevy_math::Vec2">Vec2</a></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ShapeSample-for-Cuboid" class="impl"><a class="src rightside" href="../../../src/bevy_math/sampling/shape_sampling.rs.html#251-281">Source</a><a href="#impl-ShapeSample-for-Cuboid" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.ShapeSample.html" title="trait bevy_math::sampling::shape_sampling::ShapeSample">ShapeSample</a> for <a class="struct" href="../../primitives/struct.Cuboid.html" title="struct bevy_math::primitives::Cuboid">Cuboid</a></h3></section></summary><div class="impl-items"><section id="associatedtype.Output-5" class="associatedtype trait-impl"><a class="src rightside" href="../../../src/bevy_math/sampling/shape_sampling.rs.html#252">Source</a><a href="#associatedtype.Output-5" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Output" class="associatedtype">Output</a> = <a class="struct" href="../../struct.Vec3.html" title="struct bevy_math::Vec3">Vec3</a></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ShapeSample-for-Cylinder" class="impl"><a class="src rightside" href="../../../src/bevy_math/sampling/shape_sampling.rs.html#413-442">Source</a><a href="#impl-ShapeSample-for-Cylinder" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.ShapeSample.html" title="trait bevy_math::sampling::shape_sampling::ShapeSample">ShapeSample</a> for <a class="struct" href="../../primitives/struct.Cylinder.html" title="struct bevy_math::primitives::Cylinder">Cylinder</a></h3></section></summary><div class="impl-items"><section id="associatedtype.Output-6" class="associatedtype trait-impl"><a class="src rightside" href="../../../src/bevy_math/sampling/shape_sampling.rs.html#414">Source</a><a href="#associatedtype.Output-6" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Output" class="associatedtype">Output</a> = <a class="struct" href="../../struct.Vec3.html" title="struct bevy_math::Vec3">Vec3</a></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ShapeSample-for-Rectangle" class="impl"><a class="src rightside" href="../../../src/bevy_math/sampling/shape_sampling.rs.html#226-249">Source</a><a href="#impl-ShapeSample-for-Rectangle" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.ShapeSample.html" title="trait bevy_math::sampling::shape_sampling::ShapeSample">ShapeSample</a> for <a class="struct" href="../../primitives/struct.Rectangle.html" title="struct bevy_math::primitives::Rectangle">Rectangle</a></h3></section></summary><div class="impl-items"><section id="associatedtype.Output-7" class="associatedtype trait-impl"><a class="src rightside" href="../../../src/bevy_math/sampling/shape_sampling.rs.html#227">Source</a><a href="#associatedtype.Output-7" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Output" class="associatedtype">Output</a> = <a class="struct" href="../../struct.Vec2.html" title="struct bevy_math::Vec2">Vec2</a></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ShapeSample-for-Sphere" class="impl"><a class="src rightside" href="../../../src/bevy_math/sampling/shape_sampling.rs.html#181-194">Source</a><a href="#impl-ShapeSample-for-Sphere" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.ShapeSample.html" title="trait bevy_math::sampling::shape_sampling::ShapeSample">ShapeSample</a> for <a class="struct" href="../../primitives/struct.Sphere.html" title="struct bevy_math::primitives::Sphere">Sphere</a></h3></section></summary><div class="impl-items"><section id="associatedtype.Output-8" class="associatedtype trait-impl"><a class="src rightside" href="../../../src/bevy_math/sampling/shape_sampling.rs.html#182">Source</a><a href="#associatedtype.Output-8" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Output" class="associatedtype">Output</a> = <a class="struct" href="../../struct.Vec3.html" title="struct bevy_math::Vec3">Vec3</a></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ShapeSample-for-Tetrahedron" class="impl"><a class="src rightside" href="../../../src/bevy_math/sampling/shape_sampling.rs.html#356-411">Source</a><a href="#impl-ShapeSample-for-Tetrahedron" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.ShapeSample.html" title="trait bevy_math::sampling::shape_sampling::ShapeSample">ShapeSample</a> for <a class="struct" href="../../primitives/struct.Tetrahedron.html" title="struct bevy_math::primitives::Tetrahedron">Tetrahedron</a></h3></section></summary><div class="impl-items"><section id="associatedtype.Output-9" class="associatedtype trait-impl"><a class="src rightside" href="../../../src/bevy_math/sampling/shape_sampling.rs.html#357">Source</a><a href="#associatedtype.Output-9" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Output" class="associatedtype">Output</a> = <a class="struct" href="../../struct.Vec3.html" title="struct bevy_math::Vec3">Vec3</a></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ShapeSample-for-Triangle2d" class="impl"><a class="src rightside" href="../../../src/bevy_math/sampling/shape_sampling.rs.html#332-342">Source</a><a href="#impl-ShapeSample-for-Triangle2d" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.ShapeSample.html" title="trait bevy_math::sampling::shape_sampling::ShapeSample">ShapeSample</a> for <a class="struct" href="../../primitives/struct.Triangle2d.html" title="struct bevy_math::primitives::Triangle2d">Triangle2d</a></h3></section></summary><div class="impl-items"><section id="associatedtype.Output-10" class="associatedtype trait-impl"><a class="src rightside" href="../../../src/bevy_math/sampling/shape_sampling.rs.html#333">Source</a><a href="#associatedtype.Output-10" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Output" class="associatedtype">Output</a> = <a class="struct" href="../../struct.Vec2.html" title="struct bevy_math::Vec2">Vec2</a></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ShapeSample-for-Triangle3d" class="impl"><a class="src rightside" href="../../../src/bevy_math/sampling/shape_sampling.rs.html#344-354">Source</a><a href="#impl-ShapeSample-for-Triangle3d" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.ShapeSample.html" title="trait bevy_math::sampling::shape_sampling::ShapeSample">ShapeSample</a> for <a class="struct" href="../../primitives/struct.Triangle3d.html" title="struct bevy_math::primitives::Triangle3d">Triangle3d</a></h3></section></summary><div class="impl-items"><section id="associatedtype.Output-11" class="associatedtype trait-impl"><a class="src rightside" href="../../../src/bevy_math/sampling/shape_sampling.rs.html#345">Source</a><a href="#associatedtype.Output-11" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Output" class="associatedtype">Output</a> = <a class="struct" href="../../struct.Vec3.html" title="struct bevy_math::Vec3">Vec3</a></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ShapeSample-for-Extrusion%3CP%3E" class="impl"><a class="src rightside" href="../../../src/bevy_math/sampling/shape_sampling.rs.html#547-573">Source</a><a href="#impl-ShapeSample-for-Extrusion%3CP%3E" class="anchor">§</a><h3 class="code-header">impl<P: <a class="trait" href="../../primitives/trait.Primitive2d.html" title="trait bevy_math::primitives::Primitive2d">Primitive2d</a> + <a class="trait" href="../../primitives/trait.Measured2d.html" title="trait bevy_math::primitives::Measured2d">Measured2d</a> + <a class="trait" href="trait.ShapeSample.html" title="trait bevy_math::sampling::shape_sampling::ShapeSample">ShapeSample</a><Output = <a class="struct" href="../../struct.Vec2.html" title="struct bevy_math::Vec2">Vec2</a>>> <a class="trait" href="trait.ShapeSample.html" title="trait bevy_math::sampling::shape_sampling::ShapeSample">ShapeSample</a> for <a class="struct" href="../../primitives/struct.Extrusion.html" title="struct bevy_math::primitives::Extrusion">Extrusion</a><P></h3></section></summary><div class="impl-items"><section id="associatedtype.Output-12" class="associatedtype trait-impl"><a class="src rightside" href="../../../src/bevy_math/sampling/shape_sampling.rs.html#548">Source</a><a href="#associatedtype.Output-12" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Output" class="associatedtype">Output</a> = <a class="struct" href="../../struct.Vec3.html" title="struct bevy_math::Vec3">Vec3</a></h4></section></div></details></div><script src="../../../trait.impl/bevy_math/sampling/shape_sampling/trait.ShapeSample.js" async></script></section></div></main></body></html> |