pub struct VisualState {
pub id: VisualStateId,
pub source: NodeId,
pub timestamp: StateTime,
pub face: Option<FaceState>,
pub pose: Option<PoseState>,
pub scene: Option<SceneState>,
pub degradation: DegradationLevel,
pub is_keyframe: bool,
pub keyframe_ref: Option<VisualStateId>,
pub sequence: u64,
}Expand description
The complete visual state of a node
This captures WHAT is visually happening, not HOW it looks pixel-by-pixel. The renderer reconstructs visuals from this state.
Fields§
§id: VisualStateIdUnique identifier for this visual state
source: NodeIdThe node this visual state belongs to
timestamp: StateTimeTimestamp of this state
face: Option<FaceState>Face state (expression, gaze, landmarks)
pose: Option<PoseState>Body pose state (skeleton, gestures)
scene: Option<SceneState>Scene/environment state
degradation: DegradationLevelCurrent degradation level
is_keyframe: boolIs this a keyframe (full state) or delta (changes only)?
keyframe_ref: Option<VisualStateId>Reference to previous keyframe if this is a delta
sequence: u64Sequence number for ordering
Implementations§
Source§impl VisualState
impl VisualState
Sourcepub fn keyframe(source: NodeId, timestamp: StateTime, sequence: u64) -> Self
pub fn keyframe(source: NodeId, timestamp: StateTime, sequence: u64) -> Self
Create a new keyframe visual state
Sourcepub fn delta(
source: NodeId,
timestamp: StateTime,
sequence: u64,
keyframe: VisualStateId,
) -> Self
pub fn delta( source: NodeId, timestamp: StateTime, sequence: u64, keyframe: VisualStateId, ) -> Self
Create a delta state referencing a keyframe
Sourcepub fn with_scene(self, scene: SceneState) -> Self
pub fn with_scene(self, scene: SceneState) -> Self
Set scene state
Sourcepub fn with_degradation(self, level: DegradationLevel) -> Self
pub fn with_degradation(self, level: DegradationLevel) -> Self
Set degradation level
Sourcepub fn complexity(&self) -> f32
pub fn complexity(&self) -> f32
Get the visual complexity score (0.0 - 1.0) Higher = more data to transmit
Sourcepub fn degrade(&self, target: DegradationLevel) -> VisualState
pub fn degrade(&self, target: DegradationLevel) -> VisualState
Degrade this visual state to a lower level Returns a simplified version appropriate for the degradation level
Trait Implementations§
Source§impl Clone for VisualState
impl Clone for VisualState
Source§fn clone(&self) -> VisualState
fn clone(&self) -> VisualState
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more