pub trait CameraFrameAnim {
// Required method
fn orbit(&mut self, target: DVec3, total_angle: f64) -> Orbit;
}Expand description
The methods to create animations for CameraFrame.
Required Methods§
Sourcefn orbit(&mut self, target: DVec3, total_angle: f64) -> Orbit
fn orbit(&mut self, target: DVec3, total_angle: f64) -> Orbit
Create an orbit animation that rotates the camera around target
by total_angle radians in the XY plane (Z-up).
The camera’s current position is used to derive the spherical coordinates (distance, elevation) which are kept constant during the orbit.
§Example
ⓘ
use std::f64::consts::TAU;
let mut cam = CameraFrame::from_spherical(phi, theta, distance);
r.play(
cam.orbit(DVec3::ZERO, TAU)
.with_duration(8.0)
.with_rate_func(linear),
);Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".