PhotoGENius V1.0.0
A basic library for generating photorealistic images, developed for the course Numerical techniques for photorealistic image generation.
Public Member Functions | Public Attributes | List of all members
PGENLib.PerspectiveCamera Struct Reference

This class implements an observer seeing the world through a perspective projection. More...

Inheritance diagram for PGENLib.PerspectiveCamera:
PGENLib.ICamera

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
 

Detailed Description

This class implements an observer seeing the world through a perspective projection.

Member Function Documentation

◆ FireRay()

Ray PGENLib.PerspectiveCamera.FireRay ( float  u,
float  v 
)

Shoot a ray through the camera's screen

Parameters
ux-axis
vy-axis
Returns

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.

◆ GetTransf()

Transformation PGENLib.PerspectiveCamera.GetTransf ( )

Implements PGENLib.ICamera.

◆ SetTransf()

void PGENLib.PerspectiveCamera.SetTransf ( Transformation  tr)

Implements PGENLib.ICamera.


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