32 lines
579 B
Rust
32 lines
579 B
Rust
use crate::point::Color;
|
|
use nalgebra::base::Matrix3;
|
|
use crate::errors::LJResult;
|
|
#[derive(Debug, Default)]
|
|
pub struct EDH {
|
|
pub matrix: Matrix3<f32>
|
|
}
|
|
|
|
|
|
impl EDH {
|
|
pub fn new(vec: Vec<Vec<f32>>) -> LJResult<EDH> {
|
|
let matrix = Matrix3::new(vec[0][0], vec[0][1], vec[0][2],
|
|
vec[1][0], vec[1][1], vec[1][2],
|
|
vec[2][0], vec[2][1], vec[2][2]);
|
|
Ok(EDH { matrix })
|
|
}
|
|
}
|
|
|
|
#[derive(Debug, Default)]
|
|
pub struct WorldState {
|
|
pub edh: EDH,
|
|
pub resampler: Vec<f32>,
|
|
pub client_key: u8,
|
|
pub intensity: u8,
|
|
pub kpps: u32,
|
|
pub color: Color
|
|
}
|
|
|
|
impl WorldState {
|
|
|
|
}
|