pub struct Camera {
pub index: usize,
pub name: Option<String>,
pub projection_matrix: Matrix4,
pub znear: f32,
pub zfar: Option<f32>,
pub fovy: Deg<f32>,
pub xmag: Option<f32>,
pub ymag: Option<f32>,
/* private fields */
}
Fields§
§index: usize
§name: Option<String>
§projection_matrix: Matrix4
§znear: f32
§zfar: Option<f32>
§fovy: Deg<f32>
§xmag: Option<f32>
§ymag: Option<f32>
Implementations§
Source§impl Camera
impl Camera
pub fn from_gltf(g_camera: &Camera<'_>) -> Self
pub fn update_aspect_ratio(&mut self, aspect_ratio: f32)
pub fn aspect_ratio(&self) -> f32
pub fn update_projection_matrix(&mut self)
pub fn is_perspective(&self) -> bool
pub fn description(&self) -> String
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Camera
impl RefUnwindSafe for Camera
impl Send for Camera
impl Sync for Camera
impl Unpin for Camera
impl UnwindSafe for Camera
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<Trait>
(where Trait: Downcast
) to Box<Any>
. Box<Any>
can then be
further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.