pub enum ProjectionType {
Perspective {
fov_y_radians: f32,
},
Orthographic {
width: f32,
height: f32,
},
}Expand description
Defines the type of camera projection.
Variants§
Perspective
Perspective projection with field of view.
Orthographic
Orthographic projection with view bounds.
Trait Implementations§
Source§impl<'__de, __Context> BorrowDecode<'__de, __Context> for ProjectionType
impl<'__de, __Context> BorrowDecode<'__de, __Context> for ProjectionType
Source§fn borrow_decode<__D: BorrowDecoder<'__de, Context = __Context>>(
decoder: &mut __D,
) -> Result<Self, DecodeError>
fn borrow_decode<__D: BorrowDecoder<'__de, Context = __Context>>( decoder: &mut __D, ) -> Result<Self, DecodeError>
Attempt to decode this type with the given BorrowDecode.
Source§impl Clone for ProjectionType
impl Clone for ProjectionType
Source§fn clone(&self) -> ProjectionType
fn clone(&self) -> ProjectionType
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ProjectionType
impl Debug for ProjectionType
Source§impl<__Context> Decode<__Context> for ProjectionType
impl<__Context> Decode<__Context> for ProjectionType
Source§impl<'de> Deserialize<'de> for ProjectionType
impl<'de> Deserialize<'de> for ProjectionType
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Encode for ProjectionType
impl Encode for ProjectionType
Source§impl PartialEq for ProjectionType
impl PartialEq for ProjectionType
Source§fn eq(&self, other: &ProjectionType) -> bool
fn eq(&self, other: &ProjectionType) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ProjectionType
impl Serialize for ProjectionType
impl Copy for ProjectionType
impl StructuralPartialEq for ProjectionType
Auto Trait Implementations§
impl Freeze for ProjectionType
impl RefUnwindSafe for ProjectionType
impl Send for ProjectionType
impl Sync for ProjectionType
impl Unpin for ProjectionType
impl UnsafeUnpin for ProjectionType
impl UnwindSafe for ProjectionType
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more