[][src]Trait screen_13::camera::Camera

pub trait Camera {
    pub fn depth(&self) -> &Range<f32>;
pub fn overlaps_cone(&self, cone: Cone) -> bool;
pub fn overlaps_point(&self, p: Vec3) -> bool;
pub fn overlaps_sphere(&self, sphere: Sphere) -> bool;
pub fn eye(&self) -> Vec3;
pub fn project_point(&self, p: Vec3) -> Vec3;
pub fn projection(&self) -> Mat4;
pub fn unproject_point(&self, p: Vec3) -> Vec3;
pub fn view(&self) -> Mat4;
pub fn view_inv(&self) -> Mat4; pub fn corners(&self) -> [Vec3; 8] { ... } }

A photographic lens type.

Required methods

pub fn depth(&self) -> &Range<f32>[src]

Returns the camera z-depth range.

pub fn overlaps_cone(&self, cone: Cone) -> bool[src]

Returns true if the given cone can possibly be seen by this camera. Note that this function may be conservative as implementations are not required do use fully accurate geometric tests.

pub fn overlaps_point(&self, p: Vec3) -> bool[src]

Returns true if the given point can possibly be seen by this camera.

pub fn overlaps_sphere(&self, sphere: Sphere) -> bool[src]

Returns true if the given sphere can possibly be seen by this camera.

pub fn eye(&self) -> Vec3[src]

Gets the camera viewpoint position.

pub fn project_point(&self, p: Vec3) -> Vec3[src]

TODO: Maybe remove?

pub fn projection(&self) -> Mat4[src]

Gets the pre-calculated projection matrix.

pub fn unproject_point(&self, p: Vec3) -> Vec3[src]

TODO: Maybe remove?

pub fn view(&self) -> Mat4[src]

Gets the pre-calculated view matrix.

pub fn view_inv(&self) -> Mat4[src]

Gets the pre-calculated inverse view matrix.

Loading content...

Provided methods

pub fn corners(&self) -> [Vec3; 8][src]

Gets the world-space corner positions of the viewing frustum

Loading content...

Implementors

impl Camera for Orthographic[src]

impl Camera for Perspective[src]

Loading content...