Accessors for Camera attributes
This commit is contained in:
parent
764afab8ac
commit
746731398a
2 changed files with 110 additions and 2 deletions
12
src/camera.h
12
src/camera.h
|
|
@ -20,13 +20,23 @@ public:
|
|||
Camera();
|
||||
~Camera();
|
||||
|
||||
int get_pixel_height() const;
|
||||
int get_pixel_width() const;
|
||||
const Vector3 &get_height() const;
|
||||
const Vector3 &get_width() const;
|
||||
const Vector3 &get_direction() const;
|
||||
float get_angle() const;
|
||||
|
||||
virtual Ray compute_primary_ray(const int &x, const int &y) const = 0;
|
||||
|
||||
private:
|
||||
// Pixel dimensions of the image plane.
|
||||
int pwidth, pheight;
|
||||
|
||||
// Size of the image plane.
|
||||
Vector3 height, width;
|
||||
|
||||
// Direction. A unit vector defining where the camera is pointed.
|
||||
// Direction. A normalized vector defining where the camera is pointed.
|
||||
Vector3 direction;
|
||||
|
||||
// Horizontal viewing angle.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue