Skip to main content

ScenePick

Struct ScenePick 

Source
pub struct ScenePick { /* private fields */ }
Expand description

Finds which mesh surface of a scene a window point, or any ray, shows, and the point of the surface’s content there: the nearest surface along the ray in the space the window’s eye stands in, or behind a doorway the ray meets first, in the spaces the eye sees.

Implementations§

Source§

impl ScenePick

Source

pub fn of(layer: &LayerNode, to_window: ProjectiveTransform) -> Option<Self>

The pick of the scene that layer shows, with to_window mapping the layer to the window; None when the layer shows no scene. Its surfaces are those the window’s eye sees.

Source

pub fn scene(&self) -> Option<NodeId>

The node of the scene the window shows.

Source

pub fn holds_scene(&self, layer: &LayerNode) -> bool

Whether layer shows one of this scene’s spaces, a scene behind one of its doorways, whose surfaces this pick finds.

Source

pub fn sees_scene(&self, layer: &LayerNode) -> bool

Whether the eye sees the space of the scene layer shows, through the doorways before it.

Source

pub fn index_of(&self, layer: &LayerNode) -> Option<usize>

The index among the scene’s surfaces of the surface layer layer.

Source

pub fn content_point(&self, window: Point, index: usize) -> Option<Point>

The content point of surface index that the window point shows, when that surface is the nearest one there.

Source

pub fn nearest_along(&self, ray: Ray) -> Option<(usize, SurfaceHit)>

The surface ray, in the space the window’s eye stands in, meets first, by its index, and where.

Source

pub fn drag_point(&self, window: Point, index: usize) -> Option<Point>

The content point of surface index under the window point for a gesture that surface holds: where the ray meets it, or past its edge, where the ray meets the plane of the triangle it last met.

Source

pub fn drag_point_along(&self, ray: Ray, index: usize) -> Option<Point>

Self::drag_point for a ray in the space the window’s eye stands in.

Source

pub fn window_point(&self, index: usize, content: Point) -> Option<Point>

Where the content point content of surface index shows in the window, also for a surface behind a doorway; None when it lies nearer than the camera’s near plane or behind the eye.

Source

pub fn window_point_of(&self, point: Vec3) -> Option<Point>

Where point, in the space the window’s eye stands in, shows in the window; None behind the eye.

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.