Missed a few things when I…
- Removed the (viewing) angle member - Added Up and Right vectors
This commit is contained in:
parent
72e93eccb3
commit
05327fbe7a
1 changed files with 7 additions and 5 deletions
12
src/camera.h
12
src/camera.h
|
@ -29,19 +29,21 @@ public:
|
|||
float get_angle() const;
|
||||
|
||||
virtual Ray compute_primary_ray(const int &x, const int &y) const = 0;
|
||||
const Vector3& GetRight() const;
|
||||
void SetRight(const Vector3& right);
|
||||
const Vector3& GetUp() const;
|
||||
void SetUp(const Vector3& up);
|
||||
|
||||
|
||||
private:
|
||||
// Pixel dimensions of the image plane.
|
||||
int pwidth, pheight;
|
||||
|
||||
// Size of the image plane.
|
||||
Vector3 height, width;
|
||||
|
||||
// Direction. A normalized vector defining where the camera is pointed.
|
||||
Vector3 direction;
|
||||
Vector3 mRight;
|
||||
Vector3 mUp;
|
||||
|
||||
// Horizontal viewing angle.
|
||||
float angle;
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue