Arty
Public Member Functions | List of all members
PerspectiveCamera Class Reference

#include <cameras.h>

Inheritance diagram for PerspectiveCamera:
Camera

Public Member Functions

 PerspectiveCamera (const float3 &e, const float3 &c, const float3 &u, float fov, float ratio)
 
Ray gen_ray (float u, float v) const override final
 Generates a ray for a point on the image plane, represented by (u, v) in [-1,1]^2.
 
float3 project (const float3 &p) const override final
 Projects a point onto the image plane and returns the corresponding (u, v, z) coordinates.
 
float3 unproject (const float3 &) const override final
 Unprojects a point on the image plane, represented by (u, v, z) with (u, v) in [-z, z]^2 and z in [0, inf[.
 
CameraGeometry geometry (float u, float v) const override final
 Returns the geometry at a given point on the image plane.
 
void mouse_motion (float x, float y) override final
 Updates the camera after mouse input.
 
void keyboard_motion (float x, float y, float z) override final
 Updates the camera after keyboard input.
 

Detailed Description

A perspective camera, defined by the position of the eye, the point to look at, an up vector, a field of view, and a width/height ratio.


The documentation for this class was generated from the following file: