1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
//! Shape objects. /// A point. #[derive(Debug, Copy, Clone)] pub struct Point { /// x-coordinate pub x: f64, /// y-coordinate pub y: f64, /// z-coordinate pub z: f64, } /// A torus. #[derive(Debug, Copy, Clone)] pub struct Torus { /// Centroid pub centroid: Point, /// Major radius (radius of the donut) pub main_radius: f64, /// Minor radius (radius of the tube) pub pipe_radius: f64, }