pub struct MonitorConfiguration {
pub dimensions: MonitorDimensions,
pub distance: Length,
}
Expand description
Measurements of the monitor dimensions and position.
Fields§
§dimensions: MonitorDimensions
The dimensions of the monitor. Those contain the width and height, diagonal length and aspect ratio of the monitor.
distance: Length
The distance at which the viewer is said to be located from the monitor’s surface.
Implementations§
Source§impl MonitorConfiguration
impl MonitorConfiguration
Sourcepub fn fov(self) -> Angle
pub fn fov(self) -> Angle
Calculates the viewing angle from the viewpoint towards the monitor.
More exactly, this is the angle at the viewpoint vertex of a triangle constructed from the screen width as a line segment and two line segments between two verticies of the screen width line segment and the viewpoint vertex.
Sourcepub fn monitor_fov_for_distance(
self,
distance: Length,
relative_to_monitor: bool,
) -> Angle
pub fn monitor_fov_for_distance( self, distance: Length, relative_to_monitor: bool, ) -> Angle
Calculates an FOV for the monitor as the starting point such that a given distance (either relative to the eye or the monitor) will be represented with accurate scale.
Trait Implementations§
Source§impl Clone for MonitorConfiguration
impl Clone for MonitorConfiguration
Source§fn clone(&self) -> MonitorConfiguration
fn clone(&self) -> MonitorConfiguration
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for MonitorConfiguration
impl Debug for MonitorConfiguration
impl Copy for MonitorConfiguration
Auto Trait Implementations§
impl Freeze for MonitorConfiguration
impl RefUnwindSafe for MonitorConfiguration
impl Send for MonitorConfiguration
impl Sync for MonitorConfiguration
impl Unpin for MonitorConfiguration
impl UnwindSafe for MonitorConfiguration
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
Mutably borrows from an owned value. Read more