pub struct ViewState {
pub epoch: ViewEpoch,
pub version: ViewVersion,
pub motion: CameraMotionState,
pub motion_source: MotionSource,
pub transition: TransitionPhase,
pub ptz: Option<PtzTelemetry>,
pub global_transform: Option<GlobalTransformEstimate>,
pub validity: ContextValidity,
pub stability_score: f32,
}Expand description
The current best estimate of the camera’s view.
Updated every frame by the view system. Stages and output consumers
receive a ViewSnapshot (read-only, Arc-wrapped) rather than
ViewState directly.
Fields§
§epoch: ViewEpochCurrent epoch — incremented on significant view discontinuities.
version: ViewVersionCurrent version — incremented on every view-state update.
motion: CameraMotionStateWhether the camera is stable, moving, or unknown.
motion_source: MotionSourceHow the current motion state was determined.
transition: TransitionPhasePosition in the motion transition state machine.
ptz: Option<PtzTelemetry>PTZ telemetry, if available.
global_transform: Option<GlobalTransformEstimate>Global transform estimate (frame-to-reference), if available.
validity: ContextValidityWhether temporal state is valid under the current view.
stability_score: f32Stability score in [0.0, 1.0] — 1.0 = fully stable.
Implementations§
Source§impl ViewState
impl ViewState
Sourcepub fn fixed_initial() -> Self
pub fn fixed_initial() -> Self
Create the default initial view state for a fixed camera.
Sourcepub fn observed_initial() -> Self
pub fn observed_initial() -> Self
Create the default initial view state for an observed camera.
Starts with CameraMotionState::Unknown and ContextValidity::Degraded
because no motion data has been received yet. The view system will
upgrade to Valid once a provider delivers stable motion data.