Path Tracer
Functions
Interface.cpp File Reference
#include "Interface.h"
Include dependency graph for Interface.cpp:

Functions

void displayCommands ()
 Prints the available commands. More...
 
void receiveAndExecuteGeneralCommands ()
 Receives and executes a general command. More...
 
void executeParametersCommands (char command)
 Executes a command specific to the parameters page. More...
 
void executeObjectsCommands (char command)
 Executes a command specific to the objects page. More...
 
void printAll ()
 Prints the whole page. More...
 
void initInterface ()
 Starts the infinite loop of the interface. More...
 

Function Documentation

◆ displayCommands()

void displayCommands ( )

Prints the available commands.

The available commands change depending on the active page.

See also
printAll(), receiveAndExecuteGeneralCommands(), executeParametersCommands(), executeObjectsCommands()

◆ executeObjectsCommands()

void executeObjectsCommands ( char  command)

Executes a command specific to the objects page.

See also
receiveAndExecuteGeneralCommands(), executeParametersCommands(), displayCommands()

◆ executeParametersCommands()

void executeParametersCommands ( char  command)

Executes a command specific to the parameters page.

See also
receiveAndExecuteGeneralCommands(), executeObjectsCommands(), displayCommands()

◆ initInterface()

void initInterface ( )

Starts the infinite loop of the interface.

Fills the scene with a default one. Then, it calls printAll() and receiveAndExecuteGeneralCommands() indefinitely.

See also
Scene::defaultScene(), printAll(), receiveAndExecuteGeneralCommands()

◆ printAll()

void printAll ( )

Prints the whole page.

Clears the page, prints the header, information and the available commands.

See also
clearScreenPrintHeader(), Scene::displayParametersPage(), Scene::displayObjectsPage(), displayCommands(), initInterface()

◆ receiveAndExecuteGeneralCommands()

void receiveAndExecuteGeneralCommands ( )

Receives and executes a general command.

Asks a command to the user. If it is general to both main pages (exit, for example), executes it. Else, it calls executeParametersCommands() or executeObjectsCommands().

See also
executeObjectsCommands(), executeObjectsCommands(), displayCommands(), initInterface()