#[non_exhaustive]pub struct OrbitCamera {
pub target: [f64; 3],
pub yaw: f64,
pub pitch: f64,
pub distance: f64,
pub vertical_fov: f64,
}Expand description
A perspective camera orbiting target, with +Z up.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.target: [f64; 3]Point looked at, in model units.
yaw: f64Azimuth of the eye around +Z, radians counter-clockwise from +X.
pitch: f64Elevation of the eye, radians; must stay inside (-pi/2, pi/2).
distance: f64Eye distance from the target, in model units.
vertical_fov: f64Vertical field of view, radians, within (0.01, 3).
Implementations§
Source§impl OrbitCamera
impl OrbitCamera
Sourcepub fn new(
target: [f64; 3],
yaw: f64,
pitch: f64,
distance: f64,
vertical_fov: f64,
) -> Self
pub fn new( target: [f64; 3], yaw: f64, pitch: f64, distance: f64, vertical_fov: f64, ) -> Self
A camera at distance from target, looking from azimuth yaw and elevation pitch.
Trait Implementations§
Source§impl Clone for OrbitCamera
impl Clone for OrbitCamera
impl Copy for OrbitCamera
Source§impl Debug for OrbitCamera
impl Debug for OrbitCamera
Source§impl PartialEq for OrbitCamera
impl PartialEq for OrbitCamera
impl StructuralPartialEq for OrbitCamera
Auto Trait Implementations§
impl Freeze for OrbitCamera
impl RefUnwindSafe for OrbitCamera
impl Send for OrbitCamera
impl Sync for OrbitCamera
impl Unpin for OrbitCamera
impl UnsafeUnpin for OrbitCamera
impl UnwindSafe for OrbitCamera
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