diff options
Diffstat (limited to 'src/camera.cpp')
| -rw-r--r-- | src/camera.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/camera.cpp b/src/camera.cpp index 54c847d..ff09e20 100644 --- a/src/camera.cpp +++ b/src/camera.cpp @@ -36,3 +36,8 @@ void camera::set_aspect_ratio(float aspect_ratio) { first_pixel = position - horizontal / 2.0 - vertical / 2.0 + focus_distance * forward; } + +void camera::move(vec3 v) { + position += v; + first_pixel = position - horizontal / 2.0 - vertical / 2.0 + focus_distance * forward; +} |
