pub struct First { /* private fields */ }Expand description
First person view induced by displacement on screen.
Implements Default and can be created with First::default().
All methods except Self::enabled() must be invoked on matching events fired by your 3D
graphics library of choice.
Implementations§
Source§impl First
impl First
Sourcepub const fn capture(&mut self, yaw_axis: Vec3)
pub const fn capture(&mut self, yaw_axis: Vec3)
Captures current yaw axis when entering first person view.
Sourcepub fn compute(&self, vec: Vec2, max: Vec2) -> Option<(f32, f32, Vec3)>
pub fn compute(&self, vec: Vec2, max: Vec2) -> Option<(f32, f32, Vec3)>
Computes pitch and yaw from cursor/finger displacement vector in screen space.
Carries cursor/finger displacements to arcs of the same length on great circles of an
eye-centered trackball with the radius of the target-centered trackball of
crate::Orbit, that is maximum of the screen’s width and height divided by π.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for First
impl RefUnwindSafe for First
impl Send for First
impl Sync for First
impl Unpin for First
impl UnsafeUnpin for First
impl UnwindSafe for First
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