pulse_pixelstream_types/camera_home.rs
1use myko::prelude::*;
2use myko_macros::myko_item;
3
4/// Durable Home camera configuration for one Pixel Streaming stream.
5///
6/// This is intentionally separate from the operator's global control preferences:
7/// Home is part of a stream's authored camera configuration and must not leak from
8/// one previs instance to another. Updating it changes only the saved reset target;
9/// it never moves the live camera until the operator explicitly invokes Home.
10#[myko_item]
11pub struct CameraHome {
12 pub stream_id: String,
13 pub location_x: f32,
14 pub location_y: f32,
15 pub location_z: f32,
16 pub rotation_pitch: f32,
17 pub rotation_yaw: f32,
18 pub rotation_roll: f32,
19 pub focal_length: f32,
20}
21
22impl CameraHome {
23 pub fn row_id(stream_id: &str) -> CameraHomeId {
24 stream_id.to_owned().into()
25 }
26}