summaryrefslogtreecommitdiff
path: root/main_simple_scanner.cpp
diff options
context:
space:
mode:
authorKeuin <[email protected]>2022-04-20 18:57:38 +0800
committerKeuin <[email protected]>2022-04-20 18:57:38 +0800
commit680b1ccceb1a8bb3521f2e3f0546e2b6bf27f9eb (patch)
tree2bec825faabc45585bf0d4accad7c7259066f9c1 /main_simple_scanner.cpp
parent68b8d26cae8e61a0098b2f2b06a7e999c6b1dbea (diff)
Fix default camera parameters were modified accidentally.
Diffstat (limited to 'main_simple_scanner.cpp')
-rw-r--r--main_simple_scanner.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/main_simple_scanner.cpp b/main_simple_scanner.cpp
index e6b6bca..d37b1b7 100644
--- a/main_simple_scanner.cpp
+++ b/main_simple_scanner.cpp
@@ -45,8 +45,8 @@ void generate_image(uint16_t image_width, uint16_t image_height, double viewport
// noaa rendering
bias_ctx no_bias{};
basic_viewport<T, V> vp_noaa{
- {-2, 2, 1}, // camera position as the coordinate origin
- {0, 0, -1},
+ vec3<V>::zero(), // camera position as the coordinate origin
+ vec3d{0, 0, -focal_length},
image_width, image_height,
viewport_width / 2.0, ((double) image_height / image_width) * viewport_width / 2.0,
world
@@ -56,8 +56,8 @@ void generate_image(uint16_t image_width, uint16_t image_height, double viewport
////////////////
// aa rendering
aa_viewport<T, V> vp_aa{
- {-2, 2, 1}, // camera position as the coordinate origin
- {0, 0, -1},
+ vec3<V>::zero(), // camera position as the coordinate origin
+ vec3d{0, 0, -focal_length},
image_width, image_height,
viewport_width / 2.0, ((double) image_height / image_width) * viewport_width / 2.0,
world, samples