pub struct OrbitCameraController {
pub rotate_sensitivity: f32,
pub pan_sensitivity: f32,
pub zoom_sensitivity: f32,
}Expand description
Applies orbit-camera updates from input deltas to a CameraState.
- Left mouse drag → rotate (yaw + pitch)
- Right mouse drag → pan (translate target in the view plane)
- Scroll wheel → zoom (move along the look-at vector)
Fields§
§rotate_sensitivity: f32Rotation sensitivity multiplier (radians per pixel).
pan_sensitivity: f32Pan sensitivity multiplier (world units per pixel).
zoom_sensitivity: f32Zoom sensitivity multiplier (world units per scroll tick).
Implementations§
Source§impl OrbitCameraController
impl OrbitCameraController
Sourcepub fn apply(
&self,
camera: &mut CameraState,
dx: f64,
dy: f64,
scroll: f32,
left_down: bool,
right_down: bool,
)
pub fn apply( &self, camera: &mut CameraState, dx: f64, dy: f64, scroll: f32, left_down: bool, right_down: bool, )
Apply mouse-drag and scroll deltas to camera.
dx,dyare cursor pixel deltas.scrollis the scroll wheel delta (positive = zoom in).left_down/right_downindicate which button is held.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for OrbitCameraController
impl RefUnwindSafe for OrbitCameraController
impl Send for OrbitCameraController
impl Sync for OrbitCameraController
impl Unpin for OrbitCameraController
impl UnsafeUnpin for OrbitCameraController
impl UnwindSafe for OrbitCameraController
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> 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