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 Camerapub fn standard_2d() -> Self[src]
pub fn standard_2d() -> SelfCreate 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) -> SelfCreate 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 Camerafn from(proj: Projection) -> Self[src]
fn from(proj: Projection) -> SelfPerforms the conversion.
impl Clone for Camera[src]
impl Clone for Camerafn clone(&self) -> Camera[src]
fn clone(&self) -> CameraReturns 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 Camerafn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl PartialEq for Camera[src]
impl PartialEq for Camerafn eq(&self, other: &Camera) -> bool[src]
fn eq(&self, other: &Camera) -> boolThis 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) -> boolThis method tests for !=.
impl Component for Camera[src]
impl Component for Cameratype Storage = HashMapStorage<Self>
Associated storage type for this component.