Add Camera::LookAt
This is identical to the POV-Ray look_at keyword for cameras. In fact, I stole the code almost directly from them… It's super handy for panning and tilting the camera towards a particular point, and saves me having to do dubiously accurate direction vector calculations by hand. I still need to figure out what exactly this math is doing.
This commit is contained in:
parent
e64b9403ac
commit
7297bc5c17
4 changed files with 52 additions and 0 deletions
|
@ -35,6 +35,8 @@ struct Camera
|
|||
const Vector3& GetUp() const;
|
||||
void SetUp(const Vector3& up);
|
||||
|
||||
void LookAt(const Vector3& pt);
|
||||
|
||||
virtual Ray compute_primary_ray(const int x, const int width,
|
||||
const int y, const int height) const = 0;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue