Ray Tracer  2020
PinholeCamera.h
Go to the documentation of this file.
1 #pragma once
2 
3 #ifndef PINHOLE_CAMERA_H_INCLUDED
4 #define PINHOLE_CAMERA_H_INCLUDED
5 
6 #include "Camera.h"
7 
21 class PinholeCamera : public Camera {
22 
23 public:
24 
35  PinholeCamera(double f = 1);
36 
41  PinholeCamera(const PinholeCamera& camera);
42 
45 
51  PinholeCamera& operator=(const PinholeCamera& camera);
52 
62  Ray castRay(double x, double y) const;
63 
64  double focalLength;
65 
66 private:
67 
68 };
69 
70 #endif
Camera class header file.
Abstract base class for Cameras.
Definition: Camera.h:24
PinholeCamera class.
Definition: PinholeCamera.h:21
PinholeCamera(double f=1)
PinholeCamera constructor.
Definition: PinholeCamera.cpp:3
~PinholeCamera()
PinholeCamera destructor.
Definition: PinholeCamera.cpp:11
double focalLength
The distance from the camera centre to the image plane.
Definition: PinholeCamera.h:64
Ray castRay(double x, double y) const
Generate a ray for a given image plane co-ordinate.
Definition: PinholeCamera.cpp:23
PinholeCamera & operator=(const PinholeCamera &camera)
PinholeCamera assignment operator.
Definition: PinholeCamera.cpp:15
Rays as a starting Point and Direction.
Definition: Ray.h:20