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.Cylinder Class Reference

Class to represent a cylinder. More...

Inheritance diagram for PGENLib.Cylinder:
PGENLib.Shape

Public Member Functions

 Cylinder (float zmin=0.0f, float zmax=2.0f, float r=1.0f)
 Constructor without any parameter.
 
 Cylinder (Material material, float zmin=0.0f, float zmax=2.0f, float r=1.0f)
 Constructor with parameters.
 
 Cylinder (Transformation transf, Material material, float zmin=0f, float zmax=2f, float r=1.0f)
 Constructor with parameters. More...
 
 Cylinder (Transformation transf, Material material, float zmin, float zmax, float phimax, float r=1.0f)
 Constructor with parameters. More...
 
override? HitRecord RayIntersection (Ray ray)
 Compute the intersection between a ray and the shape. Returns a HitRecord object, or Null if the ray doesn't hit the plane. More...
 
override bool QuickRayIntersection (Ray ray)
 Determine whether a ray hits the shape or not More...
 
virtual ? HitRecord RayIntersection (Ray ray)
 Compute the intersection between a ray and a shape More...
 
virtual bool QuickRayIntersection (Ray ray)
 Determine whether a ray hits the shape or not More...
 

Public Attributes

float R
 
float Zmin
 
float Zmax
 
float Phimax
 
- Public Attributes inherited from PGENLib.Shape
Transformation Transf
 
Material Material
 

Detailed Description

Class to represent a cylinder.

Constructor & Destructor Documentation

◆ Cylinder() [1/2]

PGENLib.Cylinder.Cylinder ( Transformation  transf,
Material  material,
float  zmin = 0f,
float  zmax = 2f,
float  r = 1.0f 
)

Constructor with parameters.

Parameters
transf
material
zmin
zmax
r

◆ Cylinder() [2/2]

PGENLib.Cylinder.Cylinder ( Transformation  transf,
Material  material,
float  zmin,
float  zmax,
float  phimax,
float  r = 1.0f 
)

Constructor with parameters.

Parameters
transf
material
zmin
zmax
phimax
r

Member Function Documentation

◆ QuickRayIntersection()

override bool PGENLib.Cylinder.QuickRayIntersection ( Ray  ray)
virtual

Determine whether a ray hits the shape or not

Parameters
ray
Returns

Reimplemented from PGENLib.Shape.

◆ RayIntersection()

override? HitRecord PGENLib.Cylinder.RayIntersection ( Ray  ray)
virtual

Compute the intersection between a ray and the shape. Returns a HitRecord object, or Null if the ray doesn't hit the plane.

Reimplemented from PGENLib.Shape.


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