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

Functions

void clearScreenPrintHeader ()
 Clears the console and prints the header. More...
 
void availableCommandsHeader ()
 Prints a header before printing which commands are available. More...
 
void showCMDCursor (bool show)
 Shows or hide the cursor in the interface. More...
 
std::string bool2string (bool b)
 Converts a boolean to a string. More...
 
double getCurrentTimeSeconds ()
 Gives the number of seconds since 1st January 1970. More...
 
double randomDouble ()
 Computes a random double between 0 and 1. More...
 

Function Documentation

◆ availableCommandsHeader()

void availableCommandsHeader ( )

Prints a header before printing which commands are available.

◆ bool2string()

std::string bool2string ( bool  b)

Converts a boolean to a string.

Parameters
bThe boolean that will be converted.
Returns
The boolean converted into a string.

◆ clearScreenPrintHeader()

void clearScreenPrintHeader ( )

Clears the console and prints the header.

See also
printAll()

◆ getCurrentTimeSeconds()

double getCurrentTimeSeconds ( )

Gives the number of seconds since 1st January 1970.

Returns
The time since 1st January 1970 in seconds.

◆ randomDouble()

double randomDouble ( )

Computes a random double between 0 and 1.

Simply calls unif(re).

Returns
A random double between 0 and 1 generated following a uniform distrbution.
See also
unif, re

◆ showCMDCursor()

void showCMDCursor ( bool  show)

Shows or hide the cursor in the interface.

Used code from Captain Obvlious. Remove blinking underscore on console / cmd prompt. [Accessed 28th December 2020]. Stackoverflow. 3rd August 2013. Available from: https://stackoverflow.com/a/18028927/12637970.

Parameters
showWhether the cursor will be shown or hidden.