pub struct RenderHealth {
pub center_pixel: Option<[u32; 2]>,
pub center_depth: Option<f64>,
pub center_foreground: bool,
pub foreground_pixel_count: usize,
pub foreground_coverage: f64,
pub center_5x5_foreground_count: usize,
pub nearest_foreground_pixel: Option<[u32; 2]>,
pub nearest_foreground_depth: Option<f64>,
pub nearest_foreground_distance_px: Option<f64>,
}Expand description
Cheap diagnostics derived from a rendered depth buffer.
Fields§
§center_pixel: Option<[u32; 2]>Center pixel selected from camera intrinsics, clamped to image bounds.
center_depth: Option<f64>Raw depth at the center pixel, including far-plane/background values.
center_foreground: boolWhether the center pixel has a finite positive depth before the far plane.
foreground_pixel_count: usizeNumber of foreground pixels in the full depth buffer.
foreground_coverage: f64Foreground fraction in [0, 1] over the declared image size.
center_5x5_foreground_count: usizeNumber of foreground pixels in the 5x5 window centered on center_pixel.
nearest_foreground_pixel: Option<[u32; 2]>Foreground pixel nearest to center_pixel, if any foreground exists.
nearest_foreground_depth: Option<f64>Depth at nearest_foreground_pixel.
nearest_foreground_distance_px: Option<f64>Euclidean pixel distance from center_pixel to nearest_foreground_pixel.
Trait Implementations§
Source§impl Clone for RenderHealth
impl Clone for RenderHealth
Source§fn clone(&self) -> RenderHealth
fn clone(&self) -> RenderHealth
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RenderHealth
impl Debug for RenderHealth
Source§impl<'de> Deserialize<'de> for RenderHealth
impl<'de> Deserialize<'de> for RenderHealth
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for RenderHealth
impl PartialEq for RenderHealth
Source§fn eq(&self, other: &RenderHealth) -> bool
fn eq(&self, other: &RenderHealth) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for RenderHealth
impl Serialize for RenderHealth
impl StructuralPartialEq for RenderHealth
Auto Trait Implementations§
impl Freeze for RenderHealth
impl RefUnwindSafe for RenderHealth
impl Send for RenderHealth
impl Sync for RenderHealth
impl Unpin for RenderHealth
impl UnsafeUnpin for RenderHealth
impl UnwindSafe for RenderHealth
Blanket Implementations§
Source§impl<T, U> AsBindGroupShaderType<U> for T
impl<T, U> AsBindGroupShaderType<U> for T
Source§fn as_bind_group_shader_type(&self, _images: &RenderAssets<GpuImage>) -> U
fn as_bind_group_shader_type(&self, _images: &RenderAssets<GpuImage>) -> U
Return the
T ShaderType for self. When used in AsBindGroup
derives, it is safe to assume that all images in self exist.Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ConditionalSend for Twhere
T: Send,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
Source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more