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. A layer drawn on several meshes is found by its owner’s index, through whichever of its meshes is nearest.

Implementations§

Source§

impl ScenePick

Source

pub fn of( layer: LayerRef<'_>, to_window: ProjectiveTransform, holds: Option<&SurfaceHolds>, ) -> 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. The gestures on them keep the meshes they hold in holds, or in the pick’s own store when holds is None.

Source

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

The node of the scene the window shows.

Source

pub fn holds_scene(&self, layer: LayerRef<'_>) -> 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: LayerRef<'_>) -> bool

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

Source

pub fn index_of(&self, layer: LayerRef<'_>) -> Option<usize>

The index among the scene’s surfaces of the surface layer layer: of its owner mesh, the first of its meshes.

Source

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

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

Source

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

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

Source

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

The content point of the layer of owner index under the window point for a gesture the layer holds: where the ray meets the mesh the gesture started on, or past its edge, where the ray meets the plane of the triangle it last met there.

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 the layer of owner index shows in the window, on its owner mesh, 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> ErasedDestructor for T
where T: 'static,

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.