Skip to content

Commit

Permalink
Construct camera from transformation matrix directly & add `cbox-caus…
Browse files Browse the repository at this point in the history
…tic` scene (#43)

* Construct camera from transformation matrix directly

* Add cbox-caustic
  • Loading branch information
pjessesco authored Apr 13, 2024
1 parent 0a32bcd commit e1e3101
Show file tree
Hide file tree
Showing 11 changed files with 167,962 additions and 18 deletions.
7 changes: 2 additions & 5 deletions include/camera.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ namespace Caramel{
public:
Camera(const Vector3f &pos, const Vector3f &dir, const Vector3f &up,
Index w, Index h, Float fov_x);
Camera(const Matrix44f &cam_to_world, Index w, Index h, Float fov_x);

[[nodiscard]] Ray sample_ray(Float w, Float h) const;

Expand All @@ -53,13 +54,9 @@ namespace Caramel{
}

private:
const Vector3f m_pos;
const Vector3f m_dir;
Vector3f m_up;
Vector3f m_left;
Vector3f m_pos;
const Float m_fov_x;
Index m_w, m_h;
Float m_cam_space_dir_z;
Float m_ratio;
Float m_near;
Float m_far;
Expand Down
3 changes: 3 additions & 0 deletions scenes/cbox-caustic/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
License : [CC0](https://creativecommons.org/publicdomain/zero/1.0/)

Manually converted by [pjessesco](https://github.com/pjessesco) from [Benedikt Bitterli's rendering resource](https://benedikt-bitterli.me/resources/).
Loading

0 comments on commit e1e3101

Please sign in to comment.