geom3d/surface/plane.rs
1use super::Surface;
2use crate::{Float, Point3, Vec3};
3
4#[derive(Debug)]
5pub struct Plane {
6 pub origin: Point3,
7 pub u_axis: Vec3,
8 pub v_axis: Vec3,
9}
10
11impl Surface for Plane {
12 fn get_point(&self, u: Float, v: Float) -> Point3 {
13 self.origin + self.u_axis * u + self.v_axis * v
14 }
15}