pub struct MultiCameraManager { /* private fields */ }Expand description
Multi-camera manager
Implementations§
Source§impl MultiCameraManager
impl MultiCameraManager
Sourcepub fn new(config: MultiCameraConfig) -> Result<Self>
pub fn new(config: MultiCameraConfig) -> Result<Self>
Create new multi-camera manager
Sourcepub fn with_auto_switch(
config: MultiCameraConfig,
auto_switch_config: AutoSwitchConfig,
) -> Result<Self>
pub fn with_auto_switch( config: MultiCameraConfig, auto_switch_config: AutoSwitchConfig, ) -> Result<Self>
Create with auto-switch configuration.
Sourcepub fn update_camera(&mut self, camera_id: CameraId, pose: CameraPose)
pub fn update_camera(&mut self, camera_id: CameraId, pose: CameraPose)
Update camera pose
Sourcepub fn set_active_camera(&mut self, camera_id: CameraId)
pub fn set_active_camera(&mut self, camera_id: CameraId)
Set active camera
Sourcepub fn active_camera(&self) -> CameraId
pub fn active_camera(&self) -> CameraId
Get active camera
Sourcepub fn active_pose(&self) -> Option<&CameraPose>
pub fn active_pose(&self) -> Option<&CameraPose>
Get active camera pose
Sourcepub fn all_poses(&self) -> &[(CameraId, CameraPose)]
pub fn all_poses(&self) -> &[(CameraId, CameraPose)]
Get all camera poses
Sourcepub fn config(&self) -> &MultiCameraConfig
pub fn config(&self) -> &MultiCameraConfig
Get configuration
Sourcepub fn auto_switch_config(&self) -> &AutoSwitchConfig
pub fn auto_switch_config(&self) -> &AutoSwitchConfig
Get the auto-switch configuration.
Sourcepub fn set_auto_switch_config(&mut self, config: AutoSwitchConfig)
pub fn set_auto_switch_config(&mut self, config: AutoSwitchConfig)
Set the auto-switch configuration.
Sourcepub fn evaluate_cameras(
&self,
talent_position: &Point3<f64>,
) -> Vec<CameraScore>
pub fn evaluate_cameras( &self, talent_position: &Point3<f64>, ) -> Vec<CameraScore>
Evaluate all cameras and score them for a given talent position.
Returns scores sorted best-first (lowest score first).
Sourcepub fn auto_select(
&mut self,
talent_position: &Point3<f64>,
current_timestamp_ns: u64,
) -> Option<CameraId>
pub fn auto_select( &mut self, talent_position: &Point3<f64>, current_timestamp_ns: u64, ) -> Option<CameraId>
Automatically select the best camera for the given talent position.
Applies hysteresis to avoid rapid switching. Returns Some(CameraId)
if a switch is recommended, None if the current camera is still best
(or the switch interval hasn’t elapsed).
Sourcepub fn switch_history(&self) -> &[SwitchEvent]
pub fn switch_history(&self) -> &[SwitchEvent]
Get the switch history.
Sourcepub fn clear_switch_history(&mut self)
pub fn clear_switch_history(&mut self)
Clear switch history.
Auto Trait Implementations§
impl Freeze for MultiCameraManager
impl RefUnwindSafe for MultiCameraManager
impl Send for MultiCameraManager
impl Sync for MultiCameraManager
impl Unpin for MultiCameraManager
impl UnsafeUnpin for MultiCameraManager
impl UnwindSafe for MultiCameraManager
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