Struct FlyCamera
pub struct FlyCamera {
pub position: [f64; 3],
pub velocity: [f64; 3],
pub yaw_rad: f64,
pub pitch_rad: f64,
pub move_speed: f64,
pub drag: f64,
}Expand description
6-DOF Free-flight camera with velocity damping for editor, debug, and free inspection.
Fields§
§position: [f64; 3]§velocity: [f64; 3]§yaw_rad: f64§pitch_rad: f64§move_speed: f64§drag: f64Implementations§
§impl FlyCamera
impl FlyCamera
pub fn orientation_basis(&self) -> ([f64; 3], [f64; 3], [f64; 3])
pub fn orientation_basis(&self) -> ([f64; 3], [f64; 3], [f64; 3])
Computes unit forward, right, and up vectors from current orientation.
pub fn update(&mut self, wish_dir: [f64; 3], dt: f64)
pub fn update(&mut self, wish_dir: [f64; 3], dt: f64)
Advances flycam position with smooth drag.
wish_dir: Local input direction [forward/back, right/left, up/down].
Trait Implementations§
impl Copy for FlyCamera
impl StructuralPartialEq for FlyCamera
Auto Trait Implementations§
impl Freeze for FlyCamera
impl RefUnwindSafe for FlyCamera
impl Send for FlyCamera
impl Sync for FlyCamera
impl Unpin for FlyCamera
impl UnsafeUnpin for FlyCamera
impl UnwindSafe for FlyCamera
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
§fn null_value() -> T
fn null_value() -> T
The none-equivalent value.