28 lines
643 B
Rust
28 lines
643 B
Rust
|
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: 8.0 * (pt.x - 2047.0),
|
||
|
y: 8.0 * (pt.y - 2047.0),
|
||
|
..*pt
|
||
|
}
|
||
|
}).collect();
|
||
|
// debug!("list etherdream {:?}", out);
|
||
|
out
|
||
|
}
|
||
|
}
|
||
|
|