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
|
#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 --
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -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;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue