本文整理汇总了C++中Arguments::fromFbxFile方法的典型用法代码示例。如果您正苦于以下问题:C++ Arguments::fromFbxFile方法的具体用法?C++ Arguments::fromFbxFile怎么用?C++ Arguments::fromFbxFile使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Arguments
的用法示例。
在下文中一共展示了Arguments::fromFbxFile方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
int main(int argc, const char* argv[])
{
//
// Parse arguments
//
Arguments arguments;
std::string makeFile("project.pmk");
std::string fbxFile;
bool fromFbx = false; // Create the entire wallpaper from FBX.
for (int i = 1; i < argc; ++i)
{
if (strncmp(argv[i], "-h", 2) == 0)
{
printUsage();
return EXIT_SUCCESS;
}
else if (strncmp(argv[i], "-v", 2) == 0)
{
printVersion();
return EXIT_SUCCESS;
}
else if (strncmp(argv[i], "-f", 2) == 0)
{
i++;
if (i == argc)
{
logError("The project make file is missing!\n");
printUsage();
return EXIT_FAILURE;
}
makeFile = std::string(argv[i]);
}
else
{
if (i == argc - 1)
{
fbxFile = argv[i];
fromFbx = true;
}
else
{
logError("Unknown command line arguments.");
printUsage();
return EXIT_FAILURE;
}
}
}
// Parse the configuration.
if (!fromFbx)
{
if (!arguments.parse(makeFile.c_str()))
{
return EXIT_FAILURE;
}
}
else
{
arguments.fromFbxFile(fbxFile);
}
//
// Delete the old project if exists
//
char cmdline[1024];
#if defined WIN32
sprintf_s(cmdline, 1024, "rd /s /q %s", arguments.shortProjectName.c_str());
system(cmdline);
#endif
//
// Create the project
//
logInfo("Creating the project.");
MakeProject makeProject(arguments);
if (!makeProject.run(fromFbx))
{
return EXIT_FAILURE;
}
logInfo("Project %s has been created!", arguments.projectName.c_str());
//
// Run fbxtool and copy the resource to the application folder.
//
#if defined WIN32
sprintf_s(cmdline, 1024, "fbxtool.exe -meshformat pmh -meshattrib a %s", fbxFile.c_str());
int exitCode = system(cmdline);
sprintf_s(cmdline, 1024, "xcopy /E /i res %s\\application\\res", arguments.shortProjectName.c_str());
system(cmdline);
system("rd /s /q res");
#endif
// If debugger is present, a pause is required to keep the console output
// visible. Otherwise the pause is automatic.
//.........这里部分代码省略.........