Struct OrbitCamera
pub struct OrbitCamera {
pub target: [f64; 3],
pub distance: f64,
pub yaw_rad: f64,
pub pitch_rad: f64,
pub min_distance: f64,
pub max_distance: f64,
}Expand description
Orbit inspection camera around a central pivot point.
Fields§
§target: [f64; 3]§distance: f64§yaw_rad: f64§pitch_rad: f64§min_distance: f64§max_distance: f64Implementations§
§impl OrbitCamera
impl OrbitCamera
pub fn eye_position(&self) -> [f64; 3]
pub fn eye_position(&self) -> [f64; 3]
Computes eye position in 3D world space.
pub fn rotate(&mut self, delta_yaw: f64, delta_pitch: f64)
pub fn rotate(&mut self, delta_yaw: f64, delta_pitch: f64)
Applies angular delta rotation (yaw and pitch in radians).
pub fn to_camera_state(&self) -> CameraState
pub fn to_camera_state(&self) -> CameraState
Converts orbit parameters to a CameraState compatible with the GPU uniform pipeline.
pub fn view_projection(&self, aspect: f32) -> [[f32; 4]; 4]
pub fn view_projection(&self, aspect: f32) -> [[f32; 4]; 4]
Computes column-major view-projection matrix for this orbit configuration.
pub fn to_pga_motor(&self) -> Motor
pub fn to_pga_motor(&self) -> Motor
Constructs a PGA Motor representing the camera’s world-space pose.
Trait Implementations§
§impl Clone for OrbitCamera
impl Clone for OrbitCamera
§fn clone(&self) -> OrbitCamera
fn clone(&self) -> OrbitCamera
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for OrbitCamera
§impl Debug for OrbitCamera
impl Debug for OrbitCamera
§impl Default for OrbitCamera
impl Default for OrbitCamera
§fn default() -> OrbitCamera
fn default() -> OrbitCamera
Returns the “default value” for a type. Read more
§impl PartialEq for OrbitCamera
impl PartialEq for OrbitCamera
impl StructuralPartialEq for OrbitCamera
Auto Trait Implementations§
impl Freeze for OrbitCamera
impl RefUnwindSafe for OrbitCamera
impl Send for OrbitCamera
impl Sync for OrbitCamera
impl Unpin for OrbitCamera
impl UnsafeUnpin for OrbitCamera
impl UnwindSafe for OrbitCamera
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