Default and copy constructors for Perspective and Orthographic cameras
This commit is contained in:
parent
672ff82e03
commit
6f04526d36
2 changed files with 27 additions and 0 deletions
|
@ -74,6 +74,16 @@ Camera::SetUp(const Vector3& up)
|
|||
|
||||
#pragma mark - Perspective Camera
|
||||
|
||||
PerspectiveCamera::PerspectiveCamera()
|
||||
: Camera()
|
||||
{ }
|
||||
|
||||
|
||||
PerspectiveCamera::PerspectiveCamera(const Camera& other)
|
||||
: Camera(other)
|
||||
{ }
|
||||
|
||||
|
||||
Ray
|
||||
PerspectiveCamera::compute_primary_ray(const int x,
|
||||
const int width,
|
||||
|
@ -96,6 +106,16 @@ PerspectiveCamera::compute_primary_ray(const int x,
|
|||
|
||||
#pragma mark - Orthographic Camera
|
||||
|
||||
OrthographicCamera::OrthographicCamera()
|
||||
: Camera()
|
||||
{ }
|
||||
|
||||
|
||||
OrthographicCamera::OrthographicCamera(const Camera& other)
|
||||
: Camera(other)
|
||||
{ }
|
||||
|
||||
|
||||
/*
|
||||
* OrthographicCamera::compute_primary_ray --
|
||||
*/
|
||||
|
|
|
@ -55,6 +55,10 @@ private:
|
|||
class PerspectiveCamera
|
||||
: public Camera
|
||||
{
|
||||
public:
|
||||
PerspectiveCamera();
|
||||
PerspectiveCamera(const Camera& other);
|
||||
|
||||
Ray compute_primary_ray(const int x, const int width,
|
||||
const int y, const int height) const;
|
||||
};
|
||||
|
@ -64,6 +68,9 @@ class OrthographicCamera
|
|||
: public Camera
|
||||
{
|
||||
public:
|
||||
OrthographicCamera();
|
||||
OrthographicCamera(const Camera& other);
|
||||
|
||||
Ray compute_primary_ray(const int x, const int width,
|
||||
const int y, const int height) const;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue