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
impl ScenePick
Sourcepub fn of(
layer: LayerRef<'_>,
to_window: ProjectiveTransform,
holds: Option<&SurfaceHolds>,
) -> Option<Self>
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.
Sourcepub fn holds_scene(&self, layer: LayerRef<'_>) -> bool
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.
Sourcepub fn sees_scene(&self, layer: LayerRef<'_>) -> bool
pub fn sees_scene(&self, layer: LayerRef<'_>) -> bool
Whether the eye sees the space of the scene layer shows, through
the doorways before it.
Sourcepub fn index_of(&self, layer: LayerRef<'_>) -> Option<usize>
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.
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 the layer of owner index that the window
point shows, when one of its meshes is the nearest surface there.
Sourcepub fn content_point_along(&self, ray: Ray, index: usize) -> Option<Point>
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.
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 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.
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 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.
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.