Enum three::camera::Projection
source · pub enum Projection {
Orthographic(Orthographic),
Perspective(Perspective),
}
Expand description
A camera’s projection.
Variants
Orthographic(Orthographic)
An orthographic projection.
Perspective(Perspective)
A perspective projection.
Implementations
sourceimpl Projection
impl Projection
sourcepub fn orthographic<P>(center: P, extent_y: f32, range: Range<f32>) -> Selfwhere
P: Into<Point2<f32>>,
pub fn orthographic<P>(center: P, extent_y: f32, range: Range<f32>) -> Selfwhere
P: Into<Point2<f32>>,
Constructs an orthographic projection.
sourcepub fn perspective<R>(fov_y: f32, range: R) -> Selfwhere
R: Into<ZRange>,
pub fn perspective<R>(fov_y: f32, range: R) -> Selfwhere
R: Into<ZRange>,
Constructs a perspective projection.
sourcepub fn matrix(&self, aspect_ratio: f32) -> ColumnMatrix4<f32>
pub fn matrix(&self, aspect_ratio: f32) -> ColumnMatrix4<f32>
Computes the projection matrix representing the camera’s projection.
Trait Implementations
sourceimpl Clone for Projection
impl Clone for Projection
sourcefn clone(&self) -> Projection
fn clone(&self) -> Projection
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for Projection
impl Debug for Projection
sourceimpl PartialEq<Projection> for Projection
impl PartialEq<Projection> for Projection
sourcefn eq(&self, other: &Projection) -> bool
fn eq(&self, other: &Projection) -> bool
impl StructuralPartialEq for Projection
Auto Trait Implementations
impl RefUnwindSafe for Projection
impl Send for Projection
impl Sync for Projection
impl Unpin for Projection
impl UnwindSafe for Projection
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Pointable for T
impl<T> Pointable for T
impl<T> SetParameter for T
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Resultwhere
T: Parameter<Self>,
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Resultwhere
T: Parameter<Self>,
Sets
value
as a parameter of self
.