62 inline static void main(
int argc,
char** argv) {
66 convertToTMApplication->run(argc, argv,
"Convert to tm Application",
nullptr, Application::WINDOW_HINT_INVISIBLE);
73 auto outputFileName = StringTools::substring(inputFileName, 0, inputFileName.rfind(
'.')) +
".tm";
75 Console::println(
"Loading model: " + inputFileName);
76 auto model = ModelReader::read(
77 FileSystem::getInstance()->getPathName(inputFileName),
78 FileSystem::getInstance()->getFileName(inputFileName)
80 Console::println(
"Exporting model: " + outputFileName);
83 FileSystem::getInstance()->getPathName(outputFileName),
84 FileSystem::getInstance()->getFileName(outputFileName)
87 Console::println(
"An error occurred: " +
string(exception.what()));
91 Console::println(
"An error occurred: " +
string(exception.what()));
97 Engine::getInstance()->dispose();
101 Engine::getInstance()->initialize();
104 void reshape(int32_t width, int32_t height)
override {
105 Engine::getInstance()->reshape(width, height);
115 Console::println(
string(
"converttotm ") + Version::getVersion());
116 Console::println(Version::getCopyright());
119 Console::println(
"Usage: converttotm inputfile1 [inputfileN]");
120 Application::exit(1);
Application base class, please make sure to allocate application on heap to have correct application ...
File system singleton class.
int main(int argc, char **argv)
std::exception Exception
Exception base class.