lighttransport / nanort

NanoRT, single header only modern ray tracing kernel.
MIT License
1.07k stars 89 forks source link

gui: introduce camera models, e.g., for panorama rendering #75

Closed schwieni closed 2 years ago

schwieni commented 2 years ago

Currently, seven camera models are supported:

Add mouse interaction to change the field-of-view by holding ALT + left mouse and move mouse up/down

syoyo commented 2 years ago

Good! but there are some compilation errors. for example: on macOS clang

In file included from render.cc:49:
./camera.h:47:19: error: call to constructor of 'Camera::Pinhole::float3' (aka 'real3<float>') is ambiguous
  float3 corner = {0};
                  ^~~

And see AppVeyor build error for other errors.

Also, it'd like to add some screenshots of camera models used in your examples/gui PR to README.md . Could you please add some screenshots?

schwieni commented 2 years ago

@syoyo thank you for looking into this PR. Yes, I saw the AppVeyor errors only today. I am sorry. Actually, the errors from AppVeyor were made by me to silence some warnings from MS Visual Studio. I will revert the errors causing AppVeyor to fail. Can you tell me your installed version of clang, please?

I did develop the PR using MS Visual Studio 2019 with c++14. Maybe that is a hint why the float3 corner = {0}; initializer works for me. Which c++ standard is expected to have compatibility with?

Since I am developing under Windows and also have the possibility to compile under Ubuntu Linux 20.04, I am limited to these compilers/platforms (so, no possibility for macOS clang, sorry). But I guess that the clang compiler works the same way under Linux and macOS.

Thanks for the hint about the screenshots. I think that is a good idea! I will provide that. Can you point out where I should put the screenshot image files? Under [examples/gui/screenshot] or [images]?

schwieni commented 2 years ago

@syoyo I made the changes and hope that there are no errors anymore (sorry again). I also added some screenshots under [examples/gui/screenshot] (it made most sense to me to put it there) and linked the images in the README.md

syoyo commented 2 years ago

@schwieni Nice you fixed compilation errors by yourself! And thanks for screenshots. Merged!