pub struct ViewPickingConfiguration {
pub picking_rect: RectInt,
pub readback_identifier: GpuReadbackIdentifier,
pub show_debug_view: bool,
}Expand description
Configures the readback of a rectangle from the picking layer.
The picking result will still be valid if the rectangle is partially or fully outside of bounds. Areas that are not overlapping with the primary target will be filled as-if the view’s target was bigger, i.e. all values are valid picking IDs, it is up to the user to discard anything that is out of bounds.
Data from the picking rect needs to be retrieved via crate::PickingLayerProcessor::readback_result.
To do so, you need to pass the exact same identifier and type of user data.
Received data that isn’t retrieved for more than a frame will be automatically discarded.
Fields§
§picking_rect: RectIntThe rectangle to read back from the picking layer.
readback_identifier: GpuReadbackIdentifierIdentifier to be passed to the readback result.
show_debug_view: boolWhether to draw a debug view of the picking layer when compositing the final view.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ViewPickingConfiguration
impl RefUnwindSafe for ViewPickingConfiguration
impl Send for ViewPickingConfiguration
impl Sync for ViewPickingConfiguration
impl Unpin for ViewPickingConfiguration
impl UnsafeUnpin for ViewPickingConfiguration
impl UnwindSafe for ViewPickingConfiguration
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> ⓘ
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> ⓘ
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