pub struct FreeOrbitControl {
pub target: Vec3,
pub min_distance: f32,
pub max_distance: f32,
}
Expand description
A control that makes the camera orbit around a target, with no fixed up direction.
Fields§
§target: Vec3
The target point to orbit around.
min_distance: f32
The minimum distance to the target point.
max_distance: f32
The maximum distance to the target point.
Implementations§
Source§impl FreeOrbitControl
impl FreeOrbitControl
Sourcepub fn new(target: Vec3, min_distance: f32, max_distance: f32) -> Self
pub fn new(target: Vec3, min_distance: f32, max_distance: f32) -> Self
Creates a new free orbit control with the given target and minimum and maximum distance to the target.
Sourcepub fn handle_events(
&mut self,
camera: &mut Camera,
events: &mut [Event],
) -> bool
pub fn handle_events( &mut self, camera: &mut Camera, events: &mut [Event], ) -> bool
Handles the events. Must be called each frame.
Trait Implementations§
Source§impl Clone for FreeOrbitControl
impl Clone for FreeOrbitControl
Source§fn clone(&self) -> FreeOrbitControl
fn clone(&self) -> FreeOrbitControl
Returns a copy of the value. Read more
1.0.0 · 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 FreeOrbitControl
impl Debug for FreeOrbitControl
impl Copy for FreeOrbitControl
Auto Trait Implementations§
impl Freeze for FreeOrbitControl
impl RefUnwindSafe for FreeOrbitControl
impl Send for FreeOrbitControl
impl Sync for FreeOrbitControl
impl Unpin for FreeOrbitControl
impl UnwindSafe for FreeOrbitControl
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