AGL2/src/shapes/point.rs

21 lines
388 B
Rust

use std::fmt::Display;
pub type PointVec<'a> = Vec<&'a Point>;
#[derive(Debug, Clone, Copy)]
pub struct Point {
pub x: f64,
pub y: f64,
pub z: f64,
}
impl Display for Point {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
write!(f, "({}, {}, {})", self.x, self.y, self.z)
}
}
pub struct ScreenPoint {
pub x: usize,
pub y: usize,
}