pub struct Eye { /* private fields */ }Expand description
The eye of a window’s 3D scene.
Read in a scene3d closure through
Eye::scene, it moves the scene’s camera without recomposition. The
scene tells the renderer where the eye stands among the spaces behind its
doorways, and the renderer leaves the eye what it can bump into there
each time it places the scene, which Eye::walk reads.
Implementations§
Source§impl Eye
impl Eye
Sourcepub fn new(pose: EyePose, radius: f32) -> Self
pub fn new(pose: EyePose, radius: f32) -> Self
An eye at pose: a ball of radius, in the units of the space it
stands in, that stops short of solid surfaces.
Sourcepub fn scene(&self, focal_length: f32, light: Option<Light>) -> Scene3d
pub fn scene(&self, focal_length: f32, light: Option<Light>) -> Scene3d
The scene seen through the eye: its camera, with focal_length, in
the space it stands in, and light.
Sourcepub fn walk(&self, step: Vec3)
pub fn walk(&self, step: Vec3)
Walks the eye step, in the coordinates of the space it stands in:
through the doorways the step passes, and pushed back from the solid
surfaces of the space it walks into, along which it slides.
Sourcepub fn turn(&self, yaw: f32, pitch: f32)
pub fn turn(&self, yaw: f32, pitch: f32)
Turns the eye yaw radians to the right and pitch up (see
EyePose::turn).
Sourcepub fn place(&self, pose: EyePose)
pub fn place(&self, pose: EyePose)
Puts the eye at pose, through no doorway and stopped by nothing.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Eye
impl RefUnwindSafe for Eye
impl Send for Eye
impl Sync for Eye
impl Unpin for Eye
impl UnsafeUnpin for Eye
impl UnwindSafe for Eye
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more