PhotoGENius V1.0.0
A basic library for generating photorealistic images, developed for the course Numerical techniques for photorealistic image generation.
Classes | Enumerations
PGENLib Namespace Reference

Classes

class  BRDF
 An abstract class representing a Bidirectional Reflectance Distribution Function (BRDF). More...
 
class  CheckeredPigment
 A checkered pigment. The number of rows/columns in the checkered pattern is tunable, but you cannot have a different number of repetitions along the u/v directions. The parameters defined in this dataclass are the following:

Col1 first Color
Col2 second Color
NumStep int number of repetition
More...
 
struct  Color
 
class  Cylinder
 Class to represent a cylinder. More...
 
class  DiffuseBRDF
 A class representing an ideal diffuse BRDF. More...
 
class  ExpectParse
 
class  FlatRenderer
 This renderer estimates the solution of the rendering equation by neglecting any contribution of the light. It just uses the pigment of each surface to determine how to compute the final radiance. More...
 
class  GrammarErrorException
 An error found by the lexer/parser while reading a scene file. The fields of this type are the following:

Message a user-frendly error message
sourceLocation a sourceLocation object pointing out the name of the file, the line number and the column number where the error occured
More...
 
class  HdrImage
 A High-Dynamic-Range 2D image. This class has 3 members:

Width number (int) of columns in the 2D matrix of colors
Height number (int) of rows in the 2D matrix of colors
Pixel the 2D matrix (array of Color), represented as a 1D array
More...
 
struct  HitRecord
 A class holding information about a ray-shape intersection. The parameters defined in this dataclass are the following:

WorldPoint a Point object holding the world coordinates of the hit point
Normal a Normal object holding the orientation of the normal to the surface where the hit happened
SurfacePoint a Vec2d object holding the position of the hit point on the surface of the object
t a floating-point value specifying the distance from the origin of the ray where the hit happened
Ray a Ray object that hit the surface
Material the parameter Material of the Shape object hit by the ray
More...
 
interface  ICamera
 An interface representing an observer. Interface for camera: the method FireRay will be implemented in two different ways by OrthogonalCamera and PerspectiveCamera. More...
 
class  IdentifierToken
 A token containing an identifier. More...
 
class  ImagePigment
 The texture is given through a PFM image. The parameters defined in this dataclass are the following:

Image HdrImageobject
More...
 
struct  ImageTracer
 Send rays from the Camera (observer) to corresponding pixels of an HdrImage (screen), converting "u-v" Camera coordinates to "column-raw" index of the HdrImage.

Image must be a :class:.HdrImage object that has already been initialized
Camera must be a descendeant of the :class:.Camera object
Pcg random number generator
SamplePerSize If SamplesPerSide is larger than zero, stratified sampling will be applied to each pixel in the image, using the random number generator pcg
More...
 
class  InputStream
 This class implements a wrapper around a stream, with the following additional capabilities:

  1. It tracks the line number and column number;
  2. It permits to "un-read" characters and tokens.
More...
 
class  InvalidPfmFileFormat
 
class  KeywordToken
 A token containing a keyword. Parameters:

Location a SourceLocation object holding informations about token location in the file (filename, number of column, number of rows)
Keyword a KeywordList object holding the possible Keyword options
More...
 
class  LiteralNumberToken
 A token containing a literal number. More...
 
class  Material
 A class representing a Material. The parameters defined in this dataclass are the following:

Brdf
EmittedRadiance
More...
 
struct  Normal
 A normal vector in 3D space. This struct has three floating-point fields: x, y, and z. More...
 
class  OnOffRenderer
 A on/off renderer, produces black and white images and is useful for debugging purposes. Other than Renderer's member it has the third member

Color type Color
More...
 
struct  OrthogonalCamera
 This struct implements an observer seeing the world through an orthogonal projection. More...
 
class  PathTracer
 The algorithm implemented here allows the caller to tune number of rays thrown at each iteration, as well as the maximum depth. It implements Russian roulette to reduce the number of recursive calls.

Pcg Random number generator
NumbOfRays Number of rays to be fired at each iteration
MaxDepth Maximum number of reflections for any ray
RussianRouletteLimit Minimum number of reflections for the Russian Roulette algorith to start
More...
 
class  PCG
 PCG Uniform Pseudo-random Number Generator. More...
 
struct  PerspectiveCamera
 This class implements an observer seeing the world through a perspective projection. More...
 
class  Pigment
 This abstract class represents a pigment with a function that associates a color with each point on a parametric surface (u,v). More...
 
struct  Point
 A point in 3D space. This struct has three floating-point fields: x, y, and z. More...
 
struct  PointLight
 The class holds information about a pointlight (a Dirac's delta in the rendering equation) used by the PointLight Renderer. The fields are the following:

Position a Point object holding the position of the point light in 3D space
Color a Color object being the color of the point light
LinearRadius a float number used to compute the solid angle subtended by the light at a given distance d (r/d)^2
More...
 
class  PointLightRenderer
 Class that implements a Point Light renderer. The solid angle integral of the rendering equations can be simplified, because the integrand contains some localized Dirac deltas. More...
 
struct  Ray
 
class  Renderer
 A class implementing a solver of the rendering equation. This is an abstract class; you should use a derived concrete class. This class has 2 members:

World type World
BackGroundColor type Color
More...
 
class  RuntimeError
 
class  Scene
 A scene read from a scene file. More...
 
class  Shape
 Interface for a generic 3D shape: the method RayIntersection is implemented in different concrete shapes. More...
 
class  SourceLocation
 The class points out a specific location in a source file. The fields are:

FileName name of the file or empty string;
LineNum number of line;
ColNum number of column;
More...
 
class  SpecularBRDF
 A class representing an ideal mirror BRDF. More...
 
class  Sphere
 A 3D unit sphere centered on the axes origin. More...
 
class  StopToken
 A token representing the end of a file. More...
 
class  StringToken
 A token containing a literal string. More...
 
class  SymbolToken
 A token containing a symbol (i.e., a variable name). More...
 
class  Token
 A lexical token, used when parsing a scene file. More...
 
struct  Transformation
 An affine transformation. This class encodes an affine transformation. It has been designed with the aim of making the calculation of the inverse transformation particularly efficient. More...
 
struct  Tuple
 
class  UniformPigment
 A uniform pigment. More...
 
struct  Vec
 A 3D vector. This class has three floating-point fields: x, y, and z. More...
 
struct  Vec2d
 A 2D vector, with two floating point fields u and v. More...
 
struct  World
 
class  XyPlane
 A 2D plane that you can put in the scene. Unless transformations are applied, the z=0 plane is constructed. More...
 

Enumerations

enum  KeywordList {
  New = 1 , Material = 2 , Plane = 3 , Sphere = 4 ,
  Diffuse = 5 , Specular = 6 , Uniform = 7 , Checkered = 8 ,
  Image = 9 , Identity = 10 , Translation = 11 , RotationX = 12 ,
  RotationY = 13 , RotationZ = 14 , Scaling = 15 , Camera = 16 ,
  Orthogonal = 17 , Perspective = 18 , Float = 19 , Cylinder = 20 ,
  PointLight = 21
}
 Enumeration of all possible keywords encountered in a Scene File.
 
enum  Endianness { LittleEndian , BigEndian }