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
impl ScenePick
Sourcepub fn of(layer: &LayerNode, to_window: ProjectiveTransform) -> Option<Self>
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.
Sourcepub fn holds_scene(&self, layer: &LayerNode) -> bool
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.
Sourcepub fn sees_scene(&self, layer: &LayerNode) -> bool
pub fn sees_scene(&self, layer: &LayerNode) -> bool
Whether the eye sees the space of the scene layer shows, through
the doorways before it.
Sourcepub fn index_of(&self, layer: &LayerNode) -> Option<usize>
pub fn index_of(&self, layer: &LayerNode) -> Option<usize>
The index among the scene’s surfaces of the surface layer layer.
Sourcepub fn content_point(&self, window: Point, index: usize) -> Option<Point>
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.
Sourcepub fn nearest_along(&self, ray: Ray) -> Option<(usize, SurfaceHit)>
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.
Sourcepub fn drag_point(&self, window: Point, index: usize) -> Option<Point>
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.
Sourcepub fn drag_point_along(&self, ray: Ray, index: usize) -> Option<Point>
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.
Sourcepub fn window_point(&self, index: usize, content: Point) -> Option<Point>
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.
Sourcepub fn window_point_of(&self, point: Vec3) -> Option<Point>
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.