Struct amethyst_renderer::Camera [−][src]
pub struct Camera { pub proj: Matrix4<f32>, }
Camera struct.
Fields
proj: Matrix4<f32>
Graphical projection of the camera.
Methods
impl Camera
[src]
impl Camera
pub fn standard_2d() -> Self
[src]
pub fn standard_2d() -> Self
Create a normalized camera for 2D.
Will use an orthographic projection with lower left corner being (-1., -1.) and upper right (1., 1.). View transformation will be multiplicative identity.
pub fn standard_3d(width: f32, height: f32) -> Self
[src]
pub fn standard_3d(width: f32, height: f32) -> Self
Create a standard camera for 3D.
Will use a perspective projection with aspect from the given screen dimensions and a field of view of 60 degrees. View transformation will be multiplicative identity.
Trait Implementations
impl From<Projection> for Camera
[src]
impl From<Projection> for Camera
fn from(proj: Projection) -> Self
[src]
fn from(proj: Projection) -> Self
Performs the conversion.
impl Clone for Camera
[src]
impl Clone for Camera
fn clone(&self) -> Camera
[src]
fn clone(&self) -> Camera
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Debug for Camera
[src]
impl Debug for Camera
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl PartialEq for Camera
[src]
impl PartialEq for Camera
fn eq(&self, other: &Camera) -> bool
[src]
fn eq(&self, other: &Camera) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Camera) -> bool
[src]
fn ne(&self, other: &Camera) -> bool
This method tests for !=
.
impl Component for Camera
[src]
impl Component for Camera
type Storage = HashMapStorage<Self>
Associated storage type for this component.