pub struct StereoDisplacement {
pub displacement: f32,
pub screen_depth: f32,
}Expand description
Configuration for calculating stereoscopic projections.
Fields§
§displacement: f32The horizontal offset of the eye from center. Negative values correspond to the left eye, and positive values to the right eye.
screen_depth: f32The position of the screen, which determines the focal length. Objects closer than this depth will appear to pop out of the screen, and objects further than this will appear inside the screen.
Implementations§
Source§impl StereoDisplacement
impl StereoDisplacement
Sourcepub fn new(interocular_distance: f32, screen_depth: f32) -> (Self, Self)
pub fn new(interocular_distance: f32, screen_depth: f32) -> (Self, Self)
Construct displacement for the left and right eyes simulataneously.
The given interocular_distance describes the distance between the two
rendered “eyes”. A negative value will be treated the same as a positive
value of the same magnitude.
See struct documentation for details about the
screen_depth parameter.
Trait Implementations§
Source§impl Clone for StereoDisplacement
impl Clone for StereoDisplacement
Source§fn clone(&self) -> StereoDisplacement
fn clone(&self) -> StereoDisplacement
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for StereoDisplacement
impl Debug for StereoDisplacement
impl Copy for StereoDisplacement
Auto Trait Implementations§
impl Freeze for StereoDisplacement
impl RefUnwindSafe for StereoDisplacement
impl Send for StereoDisplacement
impl Sync for StereoDisplacement
impl Unpin for StereoDisplacement
impl UnwindSafe for StereoDisplacement
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)