wip: dirty state for debugging etherdream

This commit is contained in:
alban 2023-08-05 19:11:33 +02:00
parent 2c0d5cd13f
commit 650a3ed521
8 changed files with 176 additions and 170 deletions

View file

@ -7,16 +7,15 @@ use serde::{Serialize, Deserialize};
/// Converts helios Geometry to Helios
#[allow(dead_code)]
#[derive(Serialize, Deserialize, Debug, Clone, Copy)]
pub struct HeliosToEtherdream {
}
pub struct HeliosToEtherdream {}
impl Transformers for HeliosToEtherdream {
fn apply(&self, point_list: &[Point], _ws: &WorldState) -> Vec<Point> {
// debug!("list helios {:?}", point_list);
let out = point_list.iter().map(|pt| {
Point {
x: 8.0 * (pt.x - 2047.0),
y: 8.0 * (pt.y - 2047.0),
x: 50.0 * (320.0 - pt.x),
y: 40.0 * (240.0 - pt.y),
..*pt
}
}).collect();

View file

@ -8,20 +8,18 @@ use serde::{Serialize, Deserialize};
/// Converts helios Geometry to Helios
#[allow(dead_code)]
#[derive(Serialize, Deserialize, Debug, Clone, Copy)]
pub struct Intensity {
}
pub struct Intensity {}
impl Transformers for Intensity {
fn apply(&self, point_list: &[Point], ws: &WorldState) -> Vec<Point> {
// debug!("list helios {:?}", point_list);
let out = point_list.iter().map(|pt| {
Point {
x: pt.x,
y: pt.y,
color: pt.color * ws.intensity
}
}).collect();
debug!("list intensity {:?}", out);
color: pt.color * ws.intensity,
..*pt
}
}).collect();
// debug!("list intensity {:?}", out);
out
}
}