summaryrefslogtreecommitdiff
path: root/main_simple_scanner.cpp
diff options
context:
space:
mode:
authorKeuin <[email protected]>2022-04-13 13:34:50 +0800
committerKeuin <[email protected]>2022-04-13 13:34:50 +0800
commitd883ff94342f418b87ac2333b3fdf779bd2dfa0f (patch)
tree5ccd2cac2ed714d59eb27d90c7d78e39741aa966 /main_simple_scanner.cpp
parentd1a748cea4c1c33d6979c32181ff4a17da9ecd71 (diff)
Generalize hitlist and basic_viewport. (HDR in the future)
Diffstat (limited to 'main_simple_scanner.cpp')
-rw-r--r--main_simple_scanner.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/main_simple_scanner.cpp b/main_simple_scanner.cpp
index 06476d8..5f59558 100644
--- a/main_simple_scanner.cpp
+++ b/main_simple_scanner.cpp
@@ -19,8 +19,8 @@
void generate_image(uint16_t image_width, uint16_t image_height, double viewport_width, double focal_length,
double sphere_z, double sphere_r, const std::string &caption = "", unsigned caption_scale = 1) {
double r = 1.0 * image_width / image_height;
- basic_viewport vp{viewport_width, viewport_width / r, vec3d{0, 0, -focal_length}};
- hitlist world;
+ basic_viewport8b vp{viewport_width, viewport_width / r, vec3d{0, 0, -focal_length}};
+ hitlist8b world;
bias_ctx bias{false, 0};
world.add_object(std::make_shared<sphere>(
vec3d{0, -100.5, -1},
@@ -49,6 +49,9 @@ int main(int argc, char **argv) {
argv[0]);
return 0;
}
+#ifndef NDEBUG
+ std::cerr << "Notice: assertion is enabled." << std::endl;
+#endif
std::string iw{argv[1]}, ih{argv[2]}, vw{argv[3]}, fl{argv[4]}, sz{argv[5]}, sr{argv[6]}, cap{};
if (argc == 8) {
// with caption