Skip to content
Snippets Groups Projects

Remove anchor point from plane surface.

Merged Udo Eisenbarth requested to merge 247-plane-anchor-point-necessary into main
1 file
+ 0
8
Compare changes
  • Side-by-side
  • Inline
@@ -17,7 +17,6 @@ use uom::si::f64::Length;
/// An infinitely large flat surface with its normal collinear to the optical axis.
pub struct Plane {
normal: Vector3<f64>,
anchor_point: Point3<Length>,
shift: Length,
isometry: Isometry,
}
@@ -29,17 +28,10 @@ impl Plane {
pub fn new(isometry: &Isometry) -> Self {
Self {
normal: isometry.transform_vector_f64(&Vector3::z()),
anchor_point: Point3::origin(),
shift: Length::zero(),
isometry: isometry.clone(),
}
}
/// Returns the anchor point of this plane
#[must_use]
pub const fn get_anchor_point(&self) -> Point3<Length> {
self.anchor_point
}
}
impl Surface for Plane {
fn calc_intersect_and_normal(&self, ray: &Ray) -> Option<(Point3<Length>, Vector3<f64>)> {
Loading