aboutsummaryrefslogtreecommitdiff
path: root/src/camera/filter/mod.rs
diff options
context:
space:
mode:
authorJulian T <julian@jtle.dk>2021-08-05 15:44:40 +0200
committerJulian T <julian@jtle.dk>2021-08-05 15:44:40 +0200
commit3ef8f4d918406eec6bdc29e0ebd883fabfac9b2e (patch)
treeaa4b1aac1e165821c16f222ebfb9212a9740e98b /src/camera/filter/mod.rs
parent45119506c0293fdde6cef35f6e6f82d4055b46b6 (diff)
Add picture for c5505ab84820248c6dba35fc06aef9e0ced183derendered
Diffstat (limited to 'src/camera/filter/mod.rs')
-rw-r--r--src/camera/filter/mod.rs32
1 files changed, 0 insertions, 32 deletions
diff --git a/src/camera/filter/mod.rs b/src/camera/filter/mod.rs
deleted file mode 100644
index 01d094c..0000000
--- a/src/camera/filter/mod.rs
+++ /dev/null
@@ -1,32 +0,0 @@
-use crate::vector::Vector2f;
-use crate::Float;
-
-trait Eval {
- fn eval(&self, point: &Vector2f) -> Float;
-}
-
-pub struct Filter {
- eval: Box<dyn Eval>,
- pub radius: Vector2f,
-}
-
-struct BoxFilter {}
-
-// The same a no filter, and can give aliasing in final image
-impl Eval for BoxFilter {
- fn eval(&self, _: &Vector2f) -> Float {
- 1.0
- }
-}
-
-impl Eval for Filter {
- fn eval(&self, point: &Vector2f) -> Float {
- self.eval.eval(point)
- }
-}
-
-impl Filter {
- pub fn new_box(radius: Vector2f) -> Filter {
- Filter { radius: radius, eval: Box::new(BoxFilter {}) }
- }
-}