![]() |
PhotoGENius V1.0.0
A basic library for generating photorealistic images, developed for the course Numerical techniques for photorealistic image generation.
|
This class implements an observer seeing the world through a perspective projection. More...
Public Member Functions | |
Transformation | GetTransf () |
void | SetTransf (Transformation tr) |
PerspectiveCamera (float aspectRatio) | |
PerspectiveCamera (float distance, float aspectRatio) | |
PerspectiveCamera (float distance, float aspectRatio, Transformation tr) | |
Ray | FireRay (float u, float v) |
Shoot a ray through the camera's screen More... | |
Ray | FireRay (float u, float v) |
Transformation | GetTransf () |
void | SetTransf (Transformation tr) |
Public Attributes | |
float | ScreenDistance |
The parameter screen_distance tells how far from the eye of the observer is the screen, and it influences the so-called «aperture» (the field-of-view angle along the horizontal direction). | |
float | AspectRatio |
The parameter aspect_ratio defines how larger than the height is the image. For fullscreen images, you should probably set aspect_ratio to 16/9, as this is the most used aspect ratio used in modern monitors. | |
Transformation | Transf |
This class implements an observer seeing the world through a perspective projection.
Ray PGENLib.PerspectiveCamera.FireRay | ( | float | u, |
float | v | ||
) |
Shoot a ray through the camera's screen
u | x-axis |
v | y-axis |
The coordinates (u, v) specify the point on the screen where the ray crosses it. The following diagram represents the coordinates (0,0); (1,0); (0,1); (1,1): (0, 1) (1, 1) +---------------------------—+
+---------------------------—+ (0, 0) (1, 0)
Implements PGENLib.ICamera.
Transformation PGENLib.PerspectiveCamera.GetTransf | ( | ) |
Implements PGENLib.ICamera.
void PGENLib.PerspectiveCamera.SetTransf | ( | Transformation | tr | ) |
Implements PGENLib.ICamera.