Add a perspective camera
Finally! :D Verified (mostly) and carefully thought through by looking at the Pov-Ray code and doing the linear algebra by hand. Fun times.
This commit is contained in:
parent
360bc52080
commit
899064ce42
2 changed files with 29 additions and 0 deletions
|
|
@ -44,7 +44,14 @@ private:
|
|||
Vector3 direction;
|
||||
Vector3 mRight;
|
||||
Vector3 mUp;
|
||||
};
|
||||
|
||||
|
||||
class PerspectiveCamera
|
||||
: public Camera
|
||||
{
|
||||
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