Accessors for Camera attributes

This commit is contained in:
Eryn Wells 2013-09-17 10:15:35 -07:00
parent 764afab8ac
commit 746731398a
2 changed files with 110 additions and 2 deletions

View file

@ -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.