Struct citro3d::math::StereoDisplacement
source · pub struct StereoDisplacement {
pub displacement: f32,
pub screen_depth: f32,
}
Expand description
Configuration for calculating stereoscopic projections.
Fields§
§displacement: f32
The horizontal offset of the eye from center. Negative values correspond to the left eye, and positive values to the right eye.
screen_depth: f32
The 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 copy 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 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