Raytracer
Loading...
Searching...
No Matches
Public Member Functions | List of all members
Raytracer::Config::Manager Class Reference

Public Member Functions

 Manager ()
 Construct a new Manager:: Manager object.
 
bool parse (std::string path)
 Parse the configuration file.
 
void bootstrap ()
 Bootstrap the configuration.
 
void render (bool fast)
 Render the scene.
 
 GET_SET (Raytracer::Core::Scene, world)
 
 GET_SET (Raytracer::Core::Camera, camera)
 

Constructor & Destructor Documentation

◆ Manager()

Raytracer::Config::Manager::Manager ( )

Construct a new Manager:: Manager object.

Initialize the argument map with the available arguments and their corresponding functions. Initialize the camera map with the available camera arguments and their corresponding functions.

Member Function Documentation

◆ bootstrap()

void Raytracer::Config::Manager::bootstrap ( )

Bootstrap the configuration.

Bootstrap the configuration by adding the shapes to the world.

Returns
void

◆ parse()

bool Raytracer::Config::Manager::parse ( std::string path)

Parse the configuration file.

Parse the configuration file and load the scene, textures, materials, shapes and effects. If an error occurs while parsing the file, an exception is thrown.

Parameters
pathPath to the configuration file
Exceptions
Exceptions::ParseExceptionif an error occurs while parsing the file
Exceptions::CyclicExceptionif a cyclic dependency is detected
Exceptions::MissingExceptionif a path is not found
Exceptions::ParseExceptionif a path is not of the correct type
Exceptions::MissingExceptionif an argument is not found
Returns
void

◆ render()

void Raytracer::Config::Manager::render ( bool fast)

Render the scene.

Render the scene using the camera and the world. If the fast flag is set, the rendering is done in fast mode, which reduces the image width, the samples per pixel and the maximum depth.

Parameters
fastFast rendering mode
Returns
void

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