Skip to main content

SurfaceTarget

Struct SurfaceTarget 

Source
pub struct SurfaceTarget {
    pub pick: Rc<ScenePick>,
    pub index: usize,
    pub outer_clip_bounds: Option<Rect>,
    pub outer_clips: Vec<HitClip>,
}
Expand description

A mesh surface of a scene, as the hit targets on its content see it: the scene’s pick, which surface it is, and the clips above it.

Fields§

§pick: Rc<ScenePick>

Finds the surface and content point a window point shows.

§index: usize

The surface’s index in pick.

§outer_clip_bounds: Option<Rect>

Axis-aligned bounds of the clips above the surface, in window space.

§outer_clips: Vec<HitClip>

The clips above the surface, as quads in window space.

Implementations§

Source§

impl SurfaceTarget

Source

pub fn window_bounds( &self, content_to_local: &ProjectiveTransform, local: Rect, ) -> Option<Rect>

Where local, a rect of a target’s own space into which content_to_local maps the surface’s content, shows in the window: the bounds of a grid of its points in front of the eye; None when none is.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.