Default and copy constructors for Perspective and Orthographic cameras

This commit is contained in:
Eryn Wells 2014-07-19 20:56:47 -07:00
parent 672ff82e03
commit 6f04526d36
2 changed files with 27 additions and 0 deletions

View file

@ -74,6 +74,16 @@ Camera::SetUp(const Vector3& up)
#pragma mark - Perspective Camera #pragma mark - Perspective Camera
PerspectiveCamera::PerspectiveCamera()
: Camera()
{ }
PerspectiveCamera::PerspectiveCamera(const Camera& other)
: Camera(other)
{ }
Ray Ray
PerspectiveCamera::compute_primary_ray(const int x, PerspectiveCamera::compute_primary_ray(const int x,
const int width, const int width,
@ -96,6 +106,16 @@ PerspectiveCamera::compute_primary_ray(const int x,
#pragma mark - Orthographic Camera #pragma mark - Orthographic Camera
OrthographicCamera::OrthographicCamera()
: Camera()
{ }
OrthographicCamera::OrthographicCamera(const Camera& other)
: Camera(other)
{ }
/* /*
* OrthographicCamera::compute_primary_ray -- * OrthographicCamera::compute_primary_ray --
*/ */

View file

@ -55,6 +55,10 @@ private:
class PerspectiveCamera class PerspectiveCamera
: public Camera : public Camera
{ {
public:
PerspectiveCamera();
PerspectiveCamera(const Camera& other);
Ray compute_primary_ray(const int x, const int width, Ray compute_primary_ray(const int x, const int width,
const int y, const int height) const; const int y, const int height) const;
}; };
@ -64,6 +68,9 @@ class OrthographicCamera
: public Camera : public Camera
{ {
public: public:
OrthographicCamera();
OrthographicCamera(const Camera& other);
Ray compute_primary_ray(const int x, const int width, Ray compute_primary_ray(const int x, const int width,
const int y, const int height) const; const int y, const int height) const;
}; };