/* ddd This module provides all the functions necessary for rendering 3D objects (transposing 3D space to 2D space, rotating, shading, etc). -- Copyright (C) 2017 Davis Remmel This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ pub mod rig; pub mod space; #[derive(Clone)] pub struct Point { pub x: f64, pub y: f64, pub z: f64 } impl Point { pub fn new(x: f64, y: f64, z: f64) -> Point { Point { x: x, y: y, z: z } } } // Rotations must be given in radians. pub struct Rotation { pub x: f64, pub y: f64, pub z: f64 } impl Rotation { pub fn new(x: f64, y: f64, z: f64) -> Rotation { Rotation { x: x, y: y, z: z } } } pub struct Translation { pub x: f64, pub y: f64, pub z: f64 } impl Translation { pub fn new(x: f64, y: f64, z: f64) -> Translation { Translation { x: x, y: y, z: z } } }