#[non_exhaustive]pub enum Delta {
Frame,
First {
pitch: f32,
yaw: f32,
yaw_axis: Vec3,
},
Track {
vector: Vec3,
},
Orbit {
rotation: Quat,
point: Vec3,
},
Slide {
vector: Vec3,
},
Scale {
ratio: f32,
point: Vec3,
},
}Expand description
Delta transform from initial to final Frame.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Frame
Yields frame as identity transform (default).
First
Orbits target around eye by pitch and yaw preserving roll attitude aka first person view.
See Frame::look_around().
Track
Tracks target which slides by vector in world space.
Preserves eye position inclusive its roll attitude.
Orbit
Orbits eye by rotation in camera space around point in camera space.
Slide
Slides camera eye and target by vector in camera space.
See Frame::local_slide().
Scale
Scales distance between eye and point in camera space by ratio preserving target position.
Implementations§
Source§impl Delta
impl Delta
Sourcepub fn inverse(&self) -> Self
pub fn inverse(&self) -> Self
Inverses delta transform.
Effectively swaps initial with final frame.
Sourcepub fn lerp_slerp(&self, t: f32) -> Self
pub fn lerp_slerp(&self, t: f32) -> Self
Interpolates delta transform to a fraction using linear interpolation for the translation part, and spherical linear interpolation for the rotation part.
§Arguments
self: The delta transform to interpolate from.t: The interpolation parameter between 0 and 1.