Skip to main content

Camera

Struct Camera 

Source
pub struct Camera<F: Float> { /* private fields */ }

Implementations§

Source§

impl<F: Float> Camera<F>

Source

pub fn new( position: Point3<F>, rotation: Quaternion<F>, fov: F, aspect: F, near: F, far: F, ) -> Camera<F>

Source

pub fn position(&self) -> &Point3<F>

Source

pub fn update_position(&mut self, position: Point3<F>)

Source

pub fn rotation(&self) -> &Quaternion<F>

Source

pub fn update_rotation(&mut self, rotation: Quaternion<F>)

Source

pub fn fov(&self) -> &F

Source

pub fn update_fov(&mut self, fov: F)

Source

pub fn aspect(&self) -> &F

Source

pub fn update_aspect(&mut self, aspect: F)

Source

pub fn near(&self) -> &F

Source

pub fn update_near(&mut self, near: F)

Source

pub fn far(&self) -> &F

Source

pub fn update_far(&mut self, far: F)

Source

pub fn view(&self) -> Matrix4<F>

Source

pub fn projection(&self) -> Matrix4<F>

Auto Trait Implementations§

§

impl<F> Freeze for Camera<F>
where Point3<F>: Freeze, Quaternion<F>: Freeze, F: Freeze,

§

impl<F> RefUnwindSafe for Camera<F>

§

impl<F> Send for Camera<F>
where Point3<F>: Send, Quaternion<F>: Send, F: Send,

§

impl<F> Sync for Camera<F>
where Point3<F>: Sync, Quaternion<F>: Sync, F: Sync,

§

impl<F> Unpin for Camera<F>
where Point3<F>: Unpin, Quaternion<F>: Unpin, F: Unpin,

§

impl<F> UnsafeUnpin for Camera<F>

§

impl<F> UnwindSafe for Camera<F>

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 = !

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

fn try_from(value: U) -> Result<T, !>

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.