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

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...

Public Member Functions

 HitRecord (Point worldPoint, Normal normal, Vec2d surfacePoint, float t, Ray ray, Material material)
 Constructor with parameters. More...
 

Static Public Member Functions

static bool are_close (HitRecord a, HitRecord b)
 Check weather two HitRecord objects are equals. More...
 

Public Attributes

Point WorldPoint
 
Normal Normal
 
Vec2d SurfacePoint
 
float t
 
Ray Ray
 
Material Material
 

Detailed Description

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

Constructor & Destructor Documentation

◆ HitRecord()

PGENLib.HitRecord.HitRecord ( Point  worldPoint,
Normal  normal,
Vec2d  surfacePoint,
float  t,
Ray  ray,
Material  material 
)

Constructor with parameters.

Parameters
worldPoint
normal
surfacePoint
t
ray
material

Member Function Documentation

◆ are_close()

static bool PGENLib.HitRecord.are_close ( HitRecord  a,
HitRecord  b 
)
static

Check weather two HitRecord objects are equals.

Parameters
a
b
Returns

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