lj_rust/src/transformer/helios_to_etherdream.rs

27 lines
642 B
Rust
Raw Permalink Normal View History

use crate::transformer::Transformers;
use crate::point::Point;
use crate::worldstate::WorldState;
use serde::{Serialize, Deserialize};
/// Converts helios Geometry to Helios
#[allow(dead_code)]
#[derive(Serialize, Deserialize, Debug, Clone, Copy)]
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: 50.0 * (320.0 - pt.x),
y: 40.0 * (240.0 - pt.y),
..*pt
}
}).collect();
// debug!("list etherdream {:?}", out);
out
}
}