Version 9.011

This commit is contained in:
DESKTOP-FEDH8QB\misha
2017-08-22 01:05:07 -04:00
parent 03604f92a9
commit 31341bedc0
5 changed files with 62 additions and 9 deletions
+27 -1
View File
@@ -115,6 +115,7 @@ void DumpOutput2( std::vector< char* >& comments , const char* format , ... )
cmdLineString
In( "in" ) ,
Out( "out" ) ,
TempDir( "tempDir" ) ,
VoxelGrid( "voxel" ) ,
XForm( "xForm" );
@@ -180,6 +181,7 @@ cmdLineReadable* params[] =
&Color ,
&NonLinearFit ,
&PrimalVoxel ,
&TempDir ,
#if defined( _WIN32 ) || defined( _WIN64 )
&Performance ,
#endif // _WIN32 || _WIN64
@@ -257,6 +259,8 @@ void ShowUsage( char* ex )
printf( "\t[--%s <num threads>=%d]\n" , Threads.name , Threads.value );
#endif // _OPENMP
printf( "\t[--%s]\n" , TempDir.name );
printf( "\t[--%s]\n" , Verbose.name );
#ifndef FOR_RELEASE
@@ -580,7 +584,29 @@ int _Execute( int argc , char* argv[] )
}
}
CoredFileMeshData< Vertex > mesh;
char tempHeader[1024];
{
#if defined( _WIN32 ) || defined( _WIN64 )
const char FileSeparator = '\\';
#else // !_WIN
const char FileSeparator = '/';
#endif // _WIN
char tempPath[1024];
tempPath[0] = 0;
if( TempDir.set ) strcpy( tempPath , TempDir.value );
else
{
#if defined( _WIN32 ) || defined( _WIN64 )
GetTempPath( sizeof(tempPath) , tempPath );
#else // !_WIN
if( std::getenv( "TMPDIR" ) ) strcpy( tempPath , std::getenv( "TMPDIR" ) );
#endif // _WIN
}
if( strlen(tempPath)==0 ) sprintf( tempPath , ".%c" , FileSeparator );
if( tempPath[ strlen( tempPath )-1 ]==FileSeparator ) sprintf( tempHeader , "%sPR_" , tempPath );
else sprintf( tempHeader , "%s%cPR_" , tempPath , FileSeparator );
}
CoredFileMeshData< Vertex > mesh( tempHeader );
{
profiler.start();