1 #ifndef DEF_INTERFACEGESTION
2 #define DEF_INTERFACEGESTION
9 #define _USE_MATH_DEFINES
13 #include "nlohmann/json.hpp"
124 static std::uniform_real_distribution<double>
unif = std::uniform_real_distribution<double>(0, 1);
125 static std::default_random_engine
re = std::default_random_engine(std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::system_clock::now().time_since_epoch()).count());
138 std::string
formatFileName(std::string fileName, std::string extension);
const std::string FBX_EXTENSION
File extension for fbx files.
Definition: InterfaceGestion.h:119
constexpr unsigned int MAX_LENGTH_STRING_FROM_USER
Maximum length for a string the user can give.
Definition: InterfaceGestion.h:112
static std::uniform_real_distribution< double > unif
Uniform distribution used by the randomDouble() function.
Definition: InterfaceGestion.h:124
std::string formatFileName(std::string fileName, std::string extension)
Formats the name of the file the user gave and the extension we want.
Definition: InterfaceCreation.cpp:236
const std::string PROMPT
String that signals the user can write a command.
Definition: InterfaceGestion.h:113
const std::string PARAMETERS_SAVE_EXTENSION
Custom file extension to save parameters.
Definition: InterfaceGestion.h:122
double randomDouble()
Computes a random double between 0 and 1.
Definition: InterfaceGestion.cpp:43
const std::string PICTURE_EXTENSION
File extension for pictures.
Definition: InterfaceGestion.h:118
const std::string INVALID_COMMAND
String used to show that the command was invalid.
Definition: InterfaceGestion.h:116
std::string bool2string(bool b)
Converts a boolean to a string.
Definition: InterfaceGestion.cpp:31
void showCMDCursor(bool show)
Shows or hide the cursor in the interface.
Definition: InterfaceGestion.cpp:20
void availableCommandsHeader()
Prints a header before printing which commands are available.
Definition: InterfaceGestion.cpp:13
const std::string STAR_SPLITTER
A line of stars.
Definition: InterfaceGestion.h:114
const std::string PICTURE_SAVE_EXTENSION_JSON
Custom file extension to save pictures.
Definition: InterfaceGestion.h:120
bool fileExists(std::string fileName)
Verifies if the file exists.
Definition: InterfaceCreation.cpp:231
static std::default_random_engine re
Random engine used by the randomDouble() function.
Definition: InterfaceGestion.h:125
nlohmann::json json
Definition: InterfaceGestion.h:14
double getCurrentTimeSeconds()
Gives the number of seconds since 1st January 1970.
Definition: InterfaceGestion.cpp:37
const std::string DASH_SPLITTER
A line of dashs.
Definition: InterfaceGestion.h:115
const std::string OBJECTS_SAVE_EXTENSION
Custom file extension to save object groups.
Definition: InterfaceGestion.h:121
void clearScreenPrintHeader()
Clears the console and prints the header.
Definition: InterfaceGestion.cpp:4