Struct View

Source
pub struct View {}
Expand description

A struct that provides access to the 3D graphic view.

Implementations§

Source§

impl View

Source

pub fn get_size() -> Size

Gets the size of the view in pixels.

Source

pub fn get_standard_distance() -> f32

Gets the standard distance of the view from the origin.

Source

pub fn get_aspect_ratio() -> f32

Gets the aspect ratio of the view.

Source

pub fn set_near_plane_distance(val: f32)

Sets the distance to the near clipping plane.

Source

pub fn get_near_plane_distance() -> f32

Gets the distance to the near clipping plane.

Source

pub fn set_far_plane_distance(val: f32)

Sets the distance to the far clipping plane.

Source

pub fn get_far_plane_distance() -> f32

Gets the distance to the far clipping plane.

Source

pub fn set_field_of_view(val: f32)

Sets the field of view of the view in degrees.

Source

pub fn get_field_of_view() -> f32

Gets the field of view of the view in degrees.

Source

pub fn set_scale(val: f32)

Sets the scale factor of the view.

Source

pub fn get_scale() -> f32

Gets the scale factor of the view.

Source

pub fn set_post_effect(val: &SpriteEffect)

Sets the post effect applied to the view.

Source

pub fn get_post_effect() -> Option<SpriteEffect>

Gets the post effect applied to the view.

Source

pub fn set_post_effect_null()

Removes the post effect applied to the view.

Source

pub fn set_vsync(val: bool)

Sets whether or not vertical sync is enabled.

Source

pub fn is_vsync() -> bool

Gets whether or not vertical sync is enabled.

Auto Trait Implementations§

§

impl Freeze for View

§

impl RefUnwindSafe for View

§

impl Send for View

§

impl Sync for View

§

impl Unpin for View

§

impl UnwindSafe for View

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.