Be explicit about literal wide-strings.

This commit is contained in:
Jeff Young 2022-02-04 20:21:07 +00:00
parent 36a5580f56
commit 9582457fef
36 changed files with 481 additions and 394 deletions

View File

@ -165,7 +165,7 @@ void S3D_CACHE_ENTRY::SetSHA1( const unsigned char* aSHA1Sum )
{ {
if( nullptr == aSHA1Sum ) if( nullptr == aSHA1Sum )
{ {
wxLogTrace( MASK_3D_CACHE, "%s:%s:%d\n * [BUG] NULL passed for aSHA1Sum", wxLogTrace( MASK_3D_CACHE, wxT( "%s:%s:%d\n * [BUG] NULL passed for aSHA1Sum" ),
__FILE__, __FUNCTION__, __LINE__ ); __FILE__, __FUNCTION__, __LINE__ );
return; return;
@ -221,7 +221,7 @@ SCENEGRAPH* S3D_CACHE::load( const wxString& aModelFile, S3D_CACHE_ENTRY** aCach
if( full3Dpath.empty() ) if( full3Dpath.empty() )
{ {
// the model cannot be found; we cannot proceed // the model cannot be found; we cannot proceed
wxLogTrace( MASK_3D_CACHE, "%s:%s:%d\n * [3D model] could not find model '%s'\n", wxLogTrace( MASK_3D_CACHE, wxT( "%s:%s:%d\n * [3D model] could not find model '%s'\n" ),
__FILE__, __FUNCTION__, __LINE__, aModelFile ); __FILE__, __FUNCTION__, __LINE__, aModelFile );
return nullptr; return nullptr;
} }
@ -307,7 +307,8 @@ SCENEGRAPH* S3D_CACHE::checkCache( const wxString& aFileName, S3D_CACHE_ENTRY**
if( m_CacheMap.insert( std::pair< wxString, S3D_CACHE_ENTRY* > if( m_CacheMap.insert( std::pair< wxString, S3D_CACHE_ENTRY* >
( aFileName, ep ) ).second == false ) ( aFileName, ep ) ).second == false )
{ {
wxLogTrace( MASK_3D_CACHE, "%s:%s:%d\n * [BUG] duplicate entry in map file; key = '%s'", wxLogTrace( MASK_3D_CACHE,
wxT( "%s:%s:%d\n * [BUG] duplicate entry in map file; key = '%s'" ),
__FILE__, __FUNCTION__, __LINE__, aFileName ); __FILE__, __FUNCTION__, __LINE__, aFileName );
m_CacheList.pop_back(); m_CacheList.pop_back();
@ -325,7 +326,8 @@ SCENEGRAPH* S3D_CACHE::checkCache( const wxString& aFileName, S3D_CACHE_ENTRY**
if( m_CacheMap.insert( std::pair< wxString, S3D_CACHE_ENTRY* > if( m_CacheMap.insert( std::pair< wxString, S3D_CACHE_ENTRY* >
( aFileName, ep ) ).second == false ) ( aFileName, ep ) ).second == false )
{ {
wxLogTrace( MASK_3D_CACHE, "%s:%s:%d\n * [BUG] duplicate entry in map file; key = '%s'", wxLogTrace( MASK_3D_CACHE,
wxT( "%s:%s:%d\n * [BUG] duplicate entry in map file; key = '%s'" ),
__FILE__, __FUNCTION__, __LINE__, aFileName ); __FILE__, __FUNCTION__, __LINE__, aFileName );
m_CacheList.pop_back(); m_CacheList.pop_back();
@ -358,7 +360,7 @@ bool S3D_CACHE::getSHA1( const wxString& aFileName, unsigned char* aSHA1Sum )
{ {
if( aFileName.empty() ) if( aFileName.empty() )
{ {
wxLogTrace( MASK_3D_CACHE, "%s:%s:%d\n * [BUG] empty filename", wxLogTrace( MASK_3D_CACHE, wxT( "%s:%s:%d\n * [BUG] empty filename" ),
__FILE__, __FUNCTION__, __LINE__ ); __FILE__, __FUNCTION__, __LINE__ );
return false; return false;
@ -366,7 +368,7 @@ bool S3D_CACHE::getSHA1( const wxString& aFileName, unsigned char* aSHA1Sum )
if( nullptr == aSHA1Sum ) if( nullptr == aSHA1Sum )
{ {
wxLogTrace( MASK_3D_CACHE, "%s\n * [BUG] NULL pointer passed for aMD5Sum", wxLogTrace( MASK_3D_CACHE, wxT( "%s\n * [BUG] NULL pointer passed for aMD5Sum" ),
__FILE__, __FUNCTION__, __LINE__ ); __FILE__, __FUNCTION__, __LINE__ );
return false; return false;
@ -417,7 +419,7 @@ bool S3D_CACHE::loadCacheData( S3D_CACHE_ENTRY* aCacheItem )
if( bname.empty() ) if( bname.empty() )
{ {
wxLogTrace( MASK_3D_CACHE, wxLogTrace( MASK_3D_CACHE,
" * [3D model] cannot load cached model; no file hash available" ); wxT( " * [3D model] cannot load cached model; no file hash available" ) );
return false; return false;
} }
@ -425,7 +427,7 @@ bool S3D_CACHE::loadCacheData( S3D_CACHE_ENTRY* aCacheItem )
if( m_CacheDir.empty() ) if( m_CacheDir.empty() )
{ {
wxLogTrace( MASK_3D_CACHE, wxLogTrace( MASK_3D_CACHE,
" * [3D model] cannot load cached model; config directory unknown" ); wxT( " * [3D model] cannot load cached model; config directory unknown" ) );
return false; return false;
} }
@ -434,8 +436,7 @@ bool S3D_CACHE::loadCacheData( S3D_CACHE_ENTRY* aCacheItem )
if( !wxFileName::FileExists( fname ) ) if( !wxFileName::FileExists( fname ) )
{ {
wxString errmsg = "cannot open file"; wxLogTrace( MASK_3D_CACHE, wxT( " * [3D model] cannot open file '%s'" ), fname.GetData() );
wxLogTrace( MASK_3D_CACHE, " * [3D model] %s '%s'", errmsg.GetData(), fname.GetData() );
return false; return false;
} }
@ -455,7 +456,7 @@ bool S3D_CACHE::saveCacheData( S3D_CACHE_ENTRY* aCacheItem )
{ {
if( nullptr == aCacheItem ) if( nullptr == aCacheItem )
{ {
wxLogTrace( MASK_3D_CACHE, "%s:%s:%d\n * NULL passed for aCacheItem", wxLogTrace( MASK_3D_CACHE, wxT( "%s:%s:%d\n * NULL passed for aCacheItem" ),
__FILE__, __FUNCTION__, __LINE__ ); __FILE__, __FUNCTION__, __LINE__ );
return false; return false;
@ -463,7 +464,7 @@ bool S3D_CACHE::saveCacheData( S3D_CACHE_ENTRY* aCacheItem )
if( nullptr == aCacheItem->sceneData ) if( nullptr == aCacheItem->sceneData )
{ {
wxLogTrace( MASK_3D_CACHE, "%s:%s:%d\n * aCacheItem has no valid scene data", wxLogTrace( MASK_3D_CACHE, wxT( "%s:%s:%d\n * aCacheItem has no valid scene data" ),
__FILE__, __FUNCTION__, __LINE__ ); __FILE__, __FUNCTION__, __LINE__ );
return false; return false;
@ -474,7 +475,7 @@ bool S3D_CACHE::saveCacheData( S3D_CACHE_ENTRY* aCacheItem )
if( bname.empty() ) if( bname.empty() )
{ {
wxLogTrace( MASK_3D_CACHE, wxLogTrace( MASK_3D_CACHE,
" * [3D model] cannot load cached model; no file hash available" ); wxT( " * [3D model] cannot load cached model; no file hash available" ) );
return false; return false;
} }
@ -482,7 +483,7 @@ bool S3D_CACHE::saveCacheData( S3D_CACHE_ENTRY* aCacheItem )
if( m_CacheDir.empty() ) if( m_CacheDir.empty() )
{ {
wxLogTrace( MASK_3D_CACHE, wxLogTrace( MASK_3D_CACHE,
" * [3D model] cannot load cached model; config directory unknown" ); wxT( " * [3D model] cannot load cached model; config directory unknown" ) );
return false; return false;
} }
@ -493,8 +494,8 @@ bool S3D_CACHE::saveCacheData( S3D_CACHE_ENTRY* aCacheItem )
{ {
if( !wxFileName::FileExists( fname ) ) if( !wxFileName::FileExists( fname ) )
{ {
wxLogTrace( MASK_3D_CACHE, " * [3D model] path exists but is not a regular file '%s'", wxLogTrace( MASK_3D_CACHE,
fname ); wxT( " * [3D model] path exists but is not a regular file '%s'" ), fname );
return false; return false;
} }
@ -510,7 +511,7 @@ bool S3D_CACHE::Set3DConfigDir( const wxString& aConfigDir )
if( !m_ConfigDir.empty() ) if( !m_ConfigDir.empty() )
return false; return false;
wxFileName cfgdir( ExpandEnvVarSubstitutions( aConfigDir, m_project ), "" ); wxFileName cfgdir( ExpandEnvVarSubstitutions( aConfigDir, m_project ), wxEmptyString );
cfgdir.Normalize(); cfgdir.Normalize();
@ -521,7 +522,7 @@ bool S3D_CACHE::Set3DConfigDir( const wxString& aConfigDir )
if( !cfgdir.DirExists() ) if( !cfgdir.DirExists() )
{ {
wxLogTrace( MASK_3D_CACHE, wxLogTrace( MASK_3D_CACHE,
"%s:%s:%d\n * failed to create 3D configuration directory '%s'", wxT( "%s:%s:%d\n * failed to create 3D configuration directory '%s'" ),
__FILE__, __FUNCTION__, __LINE__, cfgdir.GetPath() ); __FILE__, __FUNCTION__, __LINE__, cfgdir.GetPath() );
return false; return false;
@ -534,8 +535,8 @@ bool S3D_CACHE::Set3DConfigDir( const wxString& aConfigDir )
if( !m_FNResolver->Set3DConfigDir( m_ConfigDir ) ) if( !m_FNResolver->Set3DConfigDir( m_ConfigDir ) )
{ {
wxLogTrace( MASK_3D_CACHE, wxLogTrace( MASK_3D_CACHE,
"%s:%s:%d\n * could not set 3D Config Directory on filename resolver\n" wxT( "%s:%s:%d\n * could not set 3D Config Directory on filename resolver\n"
" * config directory: '%s'", " * config directory: '%s'" ),
__FILE__, __FUNCTION__, __LINE__, m_ConfigDir ); __FILE__, __FUNCTION__, __LINE__, m_ConfigDir );
} }
@ -548,7 +549,7 @@ bool S3D_CACHE::Set3DConfigDir( const wxString& aConfigDir )
// 3. MSWin: AppData\Local\kicad\3d // 3. MSWin: AppData\Local\kicad\3d
wxFileName cacheDir; wxFileName cacheDir;
cacheDir.AssignDir( PATHS::GetUserCachePath() ); cacheDir.AssignDir( PATHS::GetUserCachePath() );
cacheDir.AppendDir( "3d" ); cacheDir.AppendDir( wxT( "3d" ) );
if( !cacheDir.DirExists() ) if( !cacheDir.DirExists() )
{ {
@ -556,7 +557,8 @@ bool S3D_CACHE::Set3DConfigDir( const wxString& aConfigDir )
if( !cacheDir.DirExists() ) if( !cacheDir.DirExists() )
{ {
wxLogTrace( MASK_3D_CACHE, "%s:%s:%d\n * failed to create 3D cache directory '%s'", wxLogTrace( MASK_3D_CACHE,
wxT( "%s:%s:%d\n * failed to create 3D cache directory '%s'" ),
__FILE__, __FUNCTION__, __LINE__, cacheDir.GetPath() ); __FILE__, __FUNCTION__, __LINE__, cacheDir.GetPath() );
return false; return false;
@ -651,7 +653,7 @@ S3DMODEL* S3D_CACHE::GetModel( const wxString& aModelFileName )
if( !cp ) if( !cp )
{ {
wxLogTrace( MASK_3D_CACHE, wxLogTrace( MASK_3D_CACHE,
"%s:%s:%d\n * [BUG] model loaded with no associated S3D_CACHE_ENTRY", wxT( "%s:%s:%d\n * [BUG] model loaded with no associated S3D_CACHE_ENTRY" ),
__FILE__, __FUNCTION__, __LINE__ ); __FILE__, __FUNCTION__, __LINE__ );
return nullptr; return nullptr;

View File

@ -65,11 +65,11 @@ S3D_PLUGIN_MANAGER::S3D_PLUGIN_MANAGER()
{ {
std::multimap< const wxString, KICAD_PLUGIN_LDR_3D* >::const_iterator sM = m_ExtMap.begin(); std::multimap< const wxString, KICAD_PLUGIN_LDR_3D* >::const_iterator sM = m_ExtMap.begin();
std::multimap< const wxString, KICAD_PLUGIN_LDR_3D* >::const_iterator eM = m_ExtMap.end(); std::multimap< const wxString, KICAD_PLUGIN_LDR_3D* >::const_iterator eM = m_ExtMap.end();
wxLogTrace( MASK_3D_PLUGINMGR, " * Extension [plugin name]:\n" ); wxLogTrace( MASK_3D_PLUGINMGR, wxT( " * Extension [plugin name]:\n" ) );
while( sM != eM ) while( sM != eM )
{ {
wxLogTrace( MASK_3D_PLUGINMGR, " + '%s' [%s]\n", sM->first.GetData(), wxLogTrace( MASK_3D_PLUGINMGR, wxT( " + '%s' [%s]\n" ), sM->first.GetData(),
sM->second->GetKicadPluginName() ); sM->second->GetKicadPluginName() );
++sM; ++sM;
} }
@ -77,7 +77,7 @@ S3D_PLUGIN_MANAGER::S3D_PLUGIN_MANAGER()
} }
else else
{ {
wxLogTrace( MASK_3D_PLUGINMGR, " * No plugins available\n" ); wxLogTrace( MASK_3D_PLUGINMGR, wxT( " * No plugins available\n" ) );
} }
@ -86,17 +86,17 @@ S3D_PLUGIN_MANAGER::S3D_PLUGIN_MANAGER()
/// list of file filters /// list of file filters
std::list< wxString >::const_iterator sFF = m_FileFilters.begin(); std::list< wxString >::const_iterator sFF = m_FileFilters.begin();
std::list< wxString >::const_iterator eFF = m_FileFilters.end(); std::list< wxString >::const_iterator eFF = m_FileFilters.end();
wxLogTrace( MASK_3D_PLUGINMGR, " * File filters:\n" ); wxLogTrace( MASK_3D_PLUGINMGR, wxT( " * File filters:\n" ) );
while( sFF != eFF ) while( sFF != eFF )
{ {
wxLogTrace( MASK_3D_PLUGINMGR, " + '%s'\n", (*sFF).GetData() ); wxLogTrace( MASK_3D_PLUGINMGR, wxT( " + '%s'\n" ), (*sFF).GetData() );
++sFF; ++sFF;
} }
} }
else else
{ {
wxLogTrace( MASK_3D_PLUGINMGR, " * No file filters available\n" ); wxLogTrace( MASK_3D_PLUGINMGR, wxT( " * No file filters available\n" ) );
} }
#endif // DEBUG #endif // DEBUG
} }
@ -178,7 +178,7 @@ void S3D_PLUGIN_MANAGER::loadPlugins( void )
while( sPL != ePL ) while( sPL != ePL )
{ {
wxLogTrace( MASK_3D_PLUGINMGR, "%s:%s:%d * [DEBUG] searching path: '%s'", wxLogTrace( MASK_3D_PLUGINMGR, wxT( "%s:%s:%d * [DEBUG] searching path: '%s'" ),
__FILE__, __FUNCTION__, __LINE__, (*sPL).ToUTF8() ); __FILE__, __FUNCTION__, __LINE__, (*sPL).ToUTF8() );
listPlugins( *sPL, pluginlist ); listPlugins( *sPL, pluginlist );
@ -197,13 +197,13 @@ void S3D_PLUGIN_MANAGER::loadPlugins( void )
if( pp->Open( sPL->ToUTF8() ) ) if( pp->Open( sPL->ToUTF8() ) )
{ {
wxLogTrace( MASK_3D_PLUGINMGR, "%s:%s:%d * [DEBUG] adding plugin", wxLogTrace( MASK_3D_PLUGINMGR, wxT( "%s:%s:%d * [DEBUG] adding plugin" ),
__FILE__, __FUNCTION__, __LINE__ ); __FILE__, __FUNCTION__, __LINE__ );
m_Plugins.push_back( pp ); m_Plugins.push_back( pp );
int nf = pp->GetNFilters(); int nf = pp->GetNFilters();
wxLogTrace( MASK_3D_PLUGINMGR, "%s:%s:%d * [DEBUG] adding %d filters", wxLogTrace( MASK_3D_PLUGINMGR, wxT( "%s:%s:%d * [DEBUG] adding %d filters" ),
__FILE__, __FUNCTION__, __LINE__, nf ); __FILE__, __FUNCTION__, __LINE__, nf );
for( int i = 0; i < nf; ++i ) for( int i = 0; i < nf; ++i )
@ -221,7 +221,7 @@ void S3D_PLUGIN_MANAGER::loadPlugins( void )
} }
else else
{ {
wxLogTrace( MASK_3D_PLUGINMGR, "%s:%s:%d * [DEBUG] deleting plugin", wxLogTrace( MASK_3D_PLUGINMGR, wxT( "%s:%s:%d * [DEBUG] deleting plugin" ),
__FILE__, __FUNCTION__, __LINE__ ); __FILE__, __FUNCTION__, __LINE__ );
delete pp; delete pp;
@ -230,7 +230,7 @@ void S3D_PLUGIN_MANAGER::loadPlugins( void )
++sPL; ++sPL;
} }
wxLogTrace( MASK_3D_PLUGINMGR, "%s:%s:%d * [DEBUG] plugins loaded", wxLogTrace( MASK_3D_PLUGINMGR, wxT( "%s:%s:%d * [DEBUG] plugins loaded" ),
__FILE__, __FUNCTION__, __LINE__ ); __FILE__, __FUNCTION__, __LINE__ );
} }
@ -305,7 +305,7 @@ void S3D_PLUGIN_MANAGER::checkPluginName( const wxString& aPath,
aPluginList.push_back( wxpath ); aPluginList.push_back( wxpath );
wxLogTrace( MASK_3D_PLUGINMGR, " * [INFO] found 3D plugin '%s'\n", wxpath.GetData() ); wxLogTrace( MASK_3D_PLUGINMGR, wxT( " * [INFO] found 3D plugin '%s'\n" ), wxpath.GetData() );
} }
@ -316,12 +316,13 @@ void S3D_PLUGIN_MANAGER::checkPluginPath( const wxString& aPath,
if( aPath.empty() ) if( aPath.empty() )
return; return;
wxLogTrace( MASK_3D_PLUGINMGR, " * [INFO] checking for 3D plugins in '%s'\n", aPath.GetData() ); wxLogTrace( MASK_3D_PLUGINMGR, wxT( " * [INFO] checking for 3D plugins in '%s'\n" ),
aPath.GetData() );
wxFileName path; wxFileName path;
if( aPath.StartsWith( "${" ) || aPath.StartsWith( "$(" ) ) if( aPath.StartsWith( wxT( "${" ) ) || aPath.StartsWith( wxT( "$(" ) ) )
path.Assign( ExpandEnvVarSubstitutions( aPath, nullptr ), "" ); path.Assign( ExpandEnvVarSubstitutions( aPath, nullptr ), wxEmptyString );
else else
path.Assign( aPath, "" ); path.Assign( aPath, "" );
@ -377,7 +378,7 @@ void S3D_PLUGIN_MANAGER::addExtensionMap( KICAD_PLUGIN_LDR_3D* aPlugin )
int nExt = aPlugin->GetNExtensions(); int nExt = aPlugin->GetNExtensions();
wxLogTrace( MASK_3D_PLUGINMGR, "%s:%s:%d * [INFO] adding %d extensions", wxLogTrace( MASK_3D_PLUGINMGR, wxT( "%s:%s:%d * [INFO] adding %d extensions" ),
__FILE__, __FUNCTION__, __LINE__, nExt ); __FILE__, __FUNCTION__, __LINE__, nExt );
for( int i = 0; i < nExt; ++i ) for( int i = 0; i < nExt; ++i )
@ -415,10 +416,10 @@ SCENEGRAPH* S3D_PLUGIN_MANAGER::Load3DModel( const wxString& aFileName, std::str
#endif #endif
// .gz files are compressed versions that may have additional information in the previous extension // .gz files are compressed versions that may have additional information in the previous extension
if( ext_to_find == "gz" ) if( ext_to_find == wxT( "gz" ) )
{ {
wxFileName second( raw.GetName() ); wxFileName second( raw.GetName() );
ext_to_find = second.GetExt() + ".gz"; ext_to_find = second.GetExt() + wxT( ".gz" );
} }
std::pair < std::multimap< const wxString, KICAD_PLUGIN_LDR_3D* >::iterator, std::pair < std::multimap< const wxString, KICAD_PLUGIN_LDR_3D* >::iterator,
@ -452,7 +453,7 @@ void S3D_PLUGIN_MANAGER::ClosePlugins( void )
std::list< KICAD_PLUGIN_LDR_3D* >::iterator sP = m_Plugins.begin(); std::list< KICAD_PLUGIN_LDR_3D* >::iterator sP = m_Plugins.begin();
std::list< KICAD_PLUGIN_LDR_3D* >::iterator eP = m_Plugins.end(); std::list< KICAD_PLUGIN_LDR_3D* >::iterator eP = m_Plugins.end();
wxLogTrace( MASK_3D_PLUGINMGR, "%s:%s:%d * [INFO] closing %d extensions", wxLogTrace( MASK_3D_PLUGINMGR, wxT( "%s:%s:%d * [INFO] closing %d extensions" ),
__FILE__, __FUNCTION__, __LINE__, static_cast<int>( m_Plugins.size() ) ); __FILE__, __FUNCTION__, __LINE__, static_cast<int>( m_Plugins.size() ) );
while( sP != eP ) while( sP != eP )

View File

@ -98,7 +98,7 @@ bool S3D::WriteVRML( const char* filename, bool overwrite, SGNODE* aTopNode,
if( op.fail() ) if( op.fail() )
{ {
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [INFO] failed to open file '%s'", wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] failed to open file '%s'" ),
__FILE__, __FUNCTION__, __LINE__, filename ); __FILE__, __FUNCTION__, __LINE__, filename );
return false; return false;
@ -123,7 +123,7 @@ bool S3D::WriteVRML( const char* filename, bool overwrite, SGNODE* aTopNode,
CLOSE_STREAM( op ); CLOSE_STREAM( op );
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [INFO] problems encountered writing file '%s'", wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] problems encountered writing file '%s'" ),
__FILE__, __FUNCTION__, __LINE__, filename ); __FILE__, __FUNCTION__, __LINE__, filename );
return false; return false;
@ -168,7 +168,7 @@ bool S3D::WriteCache( const char* aFileName, bool overwrite, SGNODE* aNode,
{ {
if( !overwrite ) if( !overwrite )
{ {
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [INFO] file exists not overwriting '%s'", wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] file exists not overwriting '%s'" ),
__FILE__, __FUNCTION__, __LINE__, aFileName ); __FILE__, __FUNCTION__, __LINE__, aFileName );
return false; return false;
@ -177,7 +177,7 @@ bool S3D::WriteCache( const char* aFileName, bool overwrite, SGNODE* aNode,
// make sure we make no attempt to write a directory // make sure we make no attempt to write a directory
if( !wxFileName::FileExists( aFileName ) ) if( !wxFileName::FileExists( aFileName ) )
{ {
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [INFO] specified path is a directory '%s'", wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] specified path is a directory '%s'" ),
__FILE__, __FUNCTION__, __LINE__, aFileName ); __FILE__, __FUNCTION__, __LINE__, aFileName );
return false; return false;
@ -188,7 +188,7 @@ bool S3D::WriteCache( const char* aFileName, bool overwrite, SGNODE* aNode,
if( output.fail() ) if( output.fail() )
{ {
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [INFO] failed to open file '%s'", wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] failed to open file '%s'" ),
__FILE__, __FUNCTION__, __LINE__, aFileName ); __FILE__, __FUNCTION__, __LINE__, aFileName );
return false; return false;
@ -206,7 +206,8 @@ bool S3D::WriteCache( const char* aFileName, bool overwrite, SGNODE* aNode,
if( !rval ) if( !rval )
{ {
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [INFO] problems encountered writing cache file '%s'", wxLogTrace( MASK_3D_SG,
wxT( "%s:%s:%d * [INFO] problems encountered writing cache file '%s'" ),
__FILE__, __FUNCTION__, __LINE__, aFileName ); __FILE__, __FUNCTION__, __LINE__, aFileName );
// delete the defective file // delete the defective file
@ -227,7 +228,7 @@ SGNODE* S3D::ReadCache( const char* aFileName, void* aPluginMgr,
if( !wxFileName::FileExists( aFileName ) ) if( !wxFileName::FileExists( aFileName ) )
{ {
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [INFO] no such file '%s'", wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] no such file '%s'" ),
__FILE__, __FUNCTION__, __LINE__, aFileName ); __FILE__, __FUNCTION__, __LINE__, aFileName );
return nullptr; return nullptr;
@ -239,7 +240,7 @@ SGNODE* S3D::ReadCache( const char* aFileName, void* aPluginMgr,
if( file.fail() ) if( file.fail() )
{ {
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [INFO] failed to open file '%s'", wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] failed to open file '%s'" ),
__FILE__, __FUNCTION__, __LINE__, aFileName ); __FILE__, __FUNCTION__, __LINE__, aFileName );
return nullptr; return nullptr;
@ -255,9 +256,10 @@ SGNODE* S3D::ReadCache( const char* aFileName, void* aPluginMgr,
if( '(' != schar ) if( '(' != schar )
{ {
wxLogTrace( MASK_3D_SG, wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data; missing left parenthesis"
"%s:%s:%d * [INFO] corrupt data; missing left parenthesis at position '%d'", " at position '%d'" ),
__FILE__, __FUNCTION__, __LINE__, static_cast<int>( file.tellg() ) ); __FILE__, __FUNCTION__, __LINE__,
static_cast<int>( file.tellg() ) );
CLOSE_STREAM( file ); CLOSE_STREAM( file );
return nullptr; return nullptr;
@ -289,9 +291,10 @@ SGNODE* S3D::ReadCache( const char* aFileName, void* aPluginMgr,
if( '(' != schar ) if( '(' != schar )
{ {
wxLogTrace( MASK_3D_SG, wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data; missing left parenthesis"
"%s:%s:%d * [INFO] corrupt data; missing left parenthesis at position '%d'", " at position '%d'" ),
__FILE__, __FUNCTION__, __LINE__, static_cast<int>( file.tellg() ) ); __FILE__, __FUNCTION__, __LINE__,
static_cast<int>( file.tellg() ) );
CLOSE_STREAM( file ); CLOSE_STREAM( file );
return nullptr; return nullptr;

View File

@ -56,7 +56,8 @@ IFSG_APPEARANCE::IFSG_APPEARANCE( SGNODE* aParent )
delete m_node; delete m_node;
m_node = nullptr; m_node = nullptr;
wxLogTrace( MASK_3D_SG, "%s:%s:%d %s", __FILE__, __FUNCTION__, __LINE__, WrongParent ); wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d %s" ), __FILE__, __FUNCTION__, __LINE__,
WrongParent );
return; return;
} }
@ -72,7 +73,8 @@ IFSG_APPEARANCE::IFSG_APPEARANCE( IFSG_NODE& aParent )
#ifdef DEBUG #ifdef DEBUG
if( ! pp ) if( ! pp )
{ {
wxLogTrace( MASK_3D_SG, "%s:%s:%d %s", __FILE__, __FUNCTION__, __LINE__, BadParent ); wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d %s" ), __FILE__, __FUNCTION__, __LINE__,
BadParent );
} }
#endif #endif
@ -83,7 +85,8 @@ IFSG_APPEARANCE::IFSG_APPEARANCE( IFSG_NODE& aParent )
delete m_node; delete m_node;
m_node = nullptr; m_node = nullptr;
wxLogTrace( MASK_3D_SG, "%s:%s:%d %s", __FILE__, __FUNCTION__, __LINE__, WrongParent ); wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d %s" ), __FILE__, __FUNCTION__, __LINE__,
WrongParent );
return; return;
} }
@ -123,7 +126,8 @@ bool IFSG_APPEARANCE::NewNode( SGNODE* aParent )
if( aParent != m_node->GetParent() ) if( aParent != m_node->GetParent() )
{ {
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] invalid SGNODE parent (%s) to SGAPPEARANCE", wxLogTrace( MASK_3D_SG,
wxT( "%s:%s:%d * [BUG] invalid SGNODE parent (%s) to SGAPPEARANCE" ),
__FILE__, __FUNCTION__, __LINE__, __FILE__, __FUNCTION__, __LINE__,
aParent->GetNodeTypeName( aParent->GetNodeType() ) ); aParent->GetNodeTypeName( aParent->GetNodeType() ) );
@ -250,7 +254,7 @@ bool IFSG_APPEARANCE::SetShininess( float aShininess ) noexcept
if( aShininess < 0 || aShininess > 1.0 ) if( aShininess < 0 || aShininess > 1.0 )
{ {
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] shininess out of range [0..1]", wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [BUG] shininess out of range [0..1]" ),
__FILE__, __FUNCTION__, __LINE__ ); __FILE__, __FUNCTION__, __LINE__ );
return false; return false;
@ -268,7 +272,7 @@ bool IFSG_APPEARANCE::SetTransparency( float aTransparency ) noexcept
if( aTransparency < 0 || aTransparency > 1.0 ) if( aTransparency < 0 || aTransparency > 1.0 )
{ {
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] transparency out of range [0..1]", wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [BUG] transparency out of range [0..1]" ),
__FILE__, __FUNCTION__, __LINE__ ); __FILE__, __FUNCTION__, __LINE__ );
return false; return false;

View File

@ -56,7 +56,7 @@ IFSG_COLORS::IFSG_COLORS( SGNODE* aParent )
delete m_node; delete m_node;
m_node = nullptr; m_node = nullptr;
wxLogTrace( MASK_3D_SG, "%s:%s:%d", __FILE__, __FUNCTION__, __LINE__ ); wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d" ), __FILE__, __FUNCTION__, __LINE__ );
return; return;
} }
@ -73,7 +73,8 @@ IFSG_COLORS::IFSG_COLORS( IFSG_NODE& aParent )
// Braces needed due to dangling else warning from wxLogTrace macro // Braces needed due to dangling else warning from wxLogTrace macro
if( !pp ) if( !pp )
{ {
wxLogTrace( MASK_3D_SG, "%s:%s:%d %s", __FILE__, __FUNCTION__, __LINE__, BadParent ); wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d %s" ), __FILE__, __FUNCTION__, __LINE__,
BadParent );
} }
#endif #endif
@ -84,7 +85,7 @@ IFSG_COLORS::IFSG_COLORS( IFSG_NODE& aParent )
delete m_node; delete m_node;
m_node = nullptr; m_node = nullptr;
wxLogTrace( MASK_3D_SG, "%s:%s:%d %s", __FILE__, __FUNCTION__, __LINE__, wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d %s" ), __FILE__, __FUNCTION__, __LINE__,
WrongParent ); WrongParent );
return; return;
@ -125,7 +126,7 @@ bool IFSG_COLORS::NewNode( SGNODE* aParent )
if( aParent != m_node->GetParent() ) if( aParent != m_node->GetParent() )
{ {
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] invalid SGNODE parent (%s) to SGCOLORS", wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [BUG] invalid SGNODE parent (%s) to SGCOLORS" ),
__FILE__, __FUNCTION__, __LINE__, __FILE__, __FUNCTION__, __LINE__,
aParent->GetNodeTypeName( aParent->GetNodeType() ) ); aParent->GetNodeTypeName( aParent->GetNodeType() ) );

View File

@ -57,7 +57,8 @@ IFSG_COORDINDEX::IFSG_COORDINDEX( SGNODE* aParent )
delete m_node; delete m_node;
m_node = nullptr; m_node = nullptr;
wxLogTrace( MASK_3D_SG, "%s:%s:%d %s", __FILE__, __FUNCTION__, __LINE__, WrongParent ); wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d %s" ), __FILE__, __FUNCTION__, __LINE__,
WrongParent );
return; return;
} }
@ -72,7 +73,8 @@ IFSG_COORDINDEX::IFSG_COORDINDEX( IFSG_NODE& aParent )
if( !pp ) if( !pp )
{ {
wxLogTrace( MASK_3D_SG, "%s:%s:%d %s", __FILE__, __FUNCTION__, __LINE__, BadParent ); wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d %s" ), __FILE__, __FUNCTION__, __LINE__,
BadParent );
return; return;
} }
@ -81,7 +83,8 @@ IFSG_COORDINDEX::IFSG_COORDINDEX( IFSG_NODE& aParent )
if( !m_node->SetParent( pp ) ) if( !m_node->SetParent( pp ) )
{ {
wxLogTrace( MASK_3D_SG, "%s:%s:%d %s", __FILE__, __FUNCTION__, __LINE__, WrongParent ); wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d %s" ), __FILE__, __FUNCTION__, __LINE__,
WrongParent );
delete m_node; delete m_node;
m_node = nullptr; m_node = nullptr;
@ -123,7 +126,8 @@ bool IFSG_COORDINDEX::NewNode( SGNODE* aParent )
if( aParent != m_node->GetParent() ) if( aParent != m_node->GetParent() )
{ {
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] invalid SGNODE parent (%s) to SGCOORDINDEX", wxLogTrace( MASK_3D_SG,
wxT( "%s:%s:%d * [BUG] invalid SGNODE parent (%s) to SGCOORDINDEX" ),
__FILE__, __FUNCTION__, __LINE__, __FILE__, __FUNCTION__, __LINE__,
aParent->GetNodeTypeName( aParent->GetNodeType() ) ); aParent->GetNodeTypeName( aParent->GetNodeType() ) );

View File

@ -56,7 +56,8 @@ IFSG_COORDS::IFSG_COORDS( SGNODE* aParent )
delete m_node; delete m_node;
m_node = nullptr; m_node = nullptr;
wxLogTrace( MASK_3D_SG, "%s:%s:%d %s", __FILE__, __FUNCTION__, __LINE__, WrongParent ); wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d %s" ), __FILE__, __FUNCTION__, __LINE__,
WrongParent );
return; return;
} }
@ -72,7 +73,8 @@ IFSG_COORDS::IFSG_COORDS( IFSG_NODE& aParent )
#ifdef DEBUG #ifdef DEBUG
if( !pp ) if( !pp )
{ {
wxLogTrace( MASK_3D_SG, "%s:%s:%d %s", __FILE__, __FUNCTION__, __LINE__, BadParent ); wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d %s" ), __FILE__, __FUNCTION__, __LINE__,
BadParent );
} }
#endif #endif
@ -83,7 +85,8 @@ IFSG_COORDS::IFSG_COORDS( IFSG_NODE& aParent )
delete m_node; delete m_node;
m_node = nullptr; m_node = nullptr;
wxLogTrace( MASK_3D_SG, "%s:%s:%d %s", __FILE__, __FUNCTION__, __LINE__, WrongParent ); wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d %s" ), __FILE__, __FUNCTION__, __LINE__,
WrongParent );
return; return;
} }
@ -123,7 +126,7 @@ bool IFSG_COORDS::NewNode( SGNODE* aParent )
if( aParent != m_node->GetParent() ) if( aParent != m_node->GetParent() )
{ {
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] invalid SGNODE parent (%s) to SGCOORDS", wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [BUG] invalid SGNODE parent (%s) to SGCOORDS" ),
__FILE__, __FUNCTION__, __LINE__, __FILE__, __FUNCTION__, __LINE__,
aParent->GetNodeTypeName( aParent->GetNodeType() ) ); aParent->GetNodeTypeName( aParent->GetNodeType() ) );

View File

@ -57,7 +57,8 @@ IFSG_FACESET::IFSG_FACESET( SGNODE* aParent )
delete m_node; delete m_node;
m_node = nullptr; m_node = nullptr;
wxLogTrace( MASK_3D_SG, "%s:%s:%d %s", __FILE__, __FUNCTION__, __LINE__, WrongParent ); wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d %s" ), __FILE__, __FUNCTION__, __LINE__,
WrongParent );
return; return;
} }
@ -73,7 +74,8 @@ IFSG_FACESET::IFSG_FACESET( IFSG_NODE& aParent )
#ifdef DEBUG #ifdef DEBUG
if( ! pp ) if( ! pp )
{ {
wxLogTrace( MASK_3D_SG, "%s:%s:%d %s", __FILE__, __FUNCTION__, __LINE__, BadParent ); wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d %s" ), __FILE__, __FUNCTION__, __LINE__,
BadParent );
} }
#endif #endif
@ -84,7 +86,8 @@ IFSG_FACESET::IFSG_FACESET( IFSG_NODE& aParent )
delete m_node; delete m_node;
m_node = nullptr; m_node = nullptr;
wxLogTrace( MASK_3D_SG, "%s:%s:%d %s", __FILE__, __FUNCTION__, __LINE__, WrongParent ); wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d %s" ), __FILE__, __FUNCTION__, __LINE__,
WrongParent );
return; return;
} }
@ -124,7 +127,7 @@ bool IFSG_FACESET::NewNode( SGNODE* aParent )
if( aParent != m_node->GetParent() ) if( aParent != m_node->GetParent() )
{ {
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] invalid SGNODE parent (%s) to SGFACESET", wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [BUG] invalid SGNODE parent (%s) to SGFACESET" ),
__FILE__, __FUNCTION__, __LINE__, __FILE__, __FUNCTION__, __LINE__,
aParent->GetNodeTypeName( aParent->GetNodeType() ) ); aParent->GetNodeTypeName( aParent->GetNodeType() ) );

View File

@ -57,7 +57,8 @@ IFSG_NORMALS::IFSG_NORMALS( SGNODE* aParent )
delete m_node; delete m_node;
m_node = nullptr; m_node = nullptr;
wxLogTrace( MASK_3D_SG, "%s:%s:%d %s", __FILE__, __FUNCTION__, __LINE__, WrongParent ); wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d %s" ), __FILE__, __FUNCTION__, __LINE__,
WrongParent );
return; return;
} }
@ -73,7 +74,8 @@ IFSG_NORMALS::IFSG_NORMALS( IFSG_NODE& aParent )
#ifdef DEBUG #ifdef DEBUG
if( ! pp ) if( ! pp )
{ {
wxLogTrace( MASK_3D_SG, "%s:%s:%d %s", __FILE__, __FUNCTION__, __LINE__, BadParent ); wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d %s" ), __FILE__, __FUNCTION__, __LINE__,
BadParent );
} }
#endif #endif
@ -84,7 +86,8 @@ IFSG_NORMALS::IFSG_NORMALS( IFSG_NODE& aParent )
delete m_node; delete m_node;
m_node = nullptr; m_node = nullptr;
wxLogTrace( MASK_3D_SG, "%s:%s:%d %s", __FILE__, __FUNCTION__, __LINE__, WrongParent ); wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d %s" ), __FILE__, __FUNCTION__, __LINE__,
WrongParent );
return; return;
} }
@ -124,7 +127,7 @@ bool IFSG_NORMALS::NewNode( SGNODE* aParent )
if( aParent != m_node->GetParent() ) if( aParent != m_node->GetParent() )
{ {
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] invalid SGNODE parent (%s) to SGNORMALS", wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [BUG] invalid SGNODE parent (%s) to SGNORMALS" ),
__FILE__, __FUNCTION__, __LINE__, __FILE__, __FUNCTION__, __LINE__,
aParent->GetNodeTypeName( aParent->GetNodeType() ) ); aParent->GetNodeTypeName( aParent->GetNodeType() ) );

View File

@ -57,7 +57,8 @@ IFSG_SHAPE::IFSG_SHAPE( SGNODE* aParent )
delete m_node; delete m_node;
m_node = nullptr; m_node = nullptr;
wxLogTrace( MASK_3D_SG, "%s:%s:%d %s", __FILE__, __FUNCTION__, __LINE__, WrongParent ); wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d %s" ), __FILE__, __FUNCTION__, __LINE__,
WrongParent );
return; return;
} }
@ -73,7 +74,8 @@ IFSG_SHAPE::IFSG_SHAPE( IFSG_NODE& aParent )
#ifdef DEBUG #ifdef DEBUG
if( !pp ) if( !pp )
{ {
wxLogTrace( MASK_3D_SG, "%s:%s:%d %s", __FILE__, __FUNCTION__, __LINE__, BadParent ); wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d %s" ), __FILE__, __FUNCTION__, __LINE__,
BadParent );
} }
#endif #endif
@ -84,7 +86,8 @@ IFSG_SHAPE::IFSG_SHAPE( IFSG_NODE& aParent )
delete m_node; delete m_node;
m_node = nullptr; m_node = nullptr;
wxLogTrace( MASK_3D_SG, "%s:%s:%d %s", __FILE__, __FUNCTION__, __LINE__, WrongParent ); wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d %s" ), __FILE__, __FUNCTION__, __LINE__,
WrongParent );
return; return;
} }
@ -124,7 +127,7 @@ bool IFSG_SHAPE::NewNode( SGNODE* aParent )
if( aParent != m_node->GetParent() ) if( aParent != m_node->GetParent() )
{ {
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] invalid SGNODE parent (%s) to SGSHAPE", wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [BUG] invalid SGNODE parent (%s) to SGSHAPE" ),
__FILE__, __FUNCTION__, __LINE__, __FILE__, __FUNCTION__, __LINE__,
aParent->GetNodeTypeName( aParent->GetNodeType() ) ); aParent->GetNodeTypeName( aParent->GetNodeType() ) );

View File

@ -56,7 +56,8 @@ IFSG_TRANSFORM::IFSG_TRANSFORM( SGNODE* aParent )
delete m_node; delete m_node;
m_node = nullptr; m_node = nullptr;
wxLogTrace( MASK_3D_SG, "%s:%s:%d %s", __FILE__, __FUNCTION__, __LINE__, WrongParent ); wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d %s" ), __FILE__, __FUNCTION__, __LINE__,
WrongParent );
return; return;
} }
@ -96,7 +97,7 @@ bool IFSG_TRANSFORM::NewNode( SGNODE* aParent )
if( aParent != m_node->GetParent() ) if( aParent != m_node->GetParent() )
{ {
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] invalid SGNODE parent (%s) to SCENEGRAPH", wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [BUG] invalid SGNODE parent (%s) to SCENEGRAPH" ),
__FILE__, __FUNCTION__, __LINE__, __FILE__, __FUNCTION__, __LINE__,
aParent->GetNodeTypeName( aParent->GetNodeType() ) ); aParent->GetNodeTypeName( aParent->GetNodeType() ) );
@ -148,7 +149,7 @@ bool IFSG_TRANSFORM::SetScale( double aScale )
if( aScale < 1e-8 && aScale > -1e-8 ) if( aScale < 1e-8 && aScale > -1e-8 )
{ {
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] |scale| is < 1e-8 - this seems strange", wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [BUG] |scale| is < 1e-8 - this seems strange" ),
__FILE__, __FUNCTION__, __LINE__ ); __FILE__, __FUNCTION__, __LINE__ );
return false; return false;

View File

@ -49,8 +49,10 @@ SCENEGRAPH::SCENEGRAPH( SGNODE* aParent ) : SGNODE( aParent )
{ {
m_Parent = nullptr; m_Parent = nullptr;
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] inappropriate parent to SCENEGRAPH (type %d)" , wxLogTrace( MASK_3D_SG,
__FILE__, __FUNCTION__, __LINE__, aParent->GetNodeType() ); wxT( "%s:%s:%d * [BUG] inappropriate parent to SCENEGRAPH (type %d)" ),
__FILE__, __FUNCTION__, __LINE__,
aParent->GetNodeType() );
} }
else if( nullptr != aParent && S3D::SGTYPE_TRANSFORM == aParent->GetNodeType() ) else if( nullptr != aParent && S3D::SGTYPE_TRANSFORM == aParent->GetNodeType() )
{ {
@ -140,7 +142,7 @@ void SCENEGRAPH::unlinkNode( const SGNODE* aNode, bool isChild )
break; break;
} }
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] unlinkNode() did not find its target", wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [BUG] unlinkNode() did not find its target" ),
__FILE__, __FUNCTION__, __LINE__ ); __FILE__, __FUNCTION__, __LINE__ );
} }
@ -166,8 +168,11 @@ bool SCENEGRAPH::addNode( SGNODE* aNode, bool isChild )
ADD_NODE( S3D::SGTYPE_TRANSFORM, SCENEGRAPH, aNode, m_Transforms, m_RTransforms, isChild ); ADD_NODE( S3D::SGTYPE_TRANSFORM, SCENEGRAPH, aNode, m_Transforms, m_RTransforms, isChild );
ADD_NODE( S3D::SGTYPE_SHAPE, SGSHAPE, aNode, m_Shape, m_RShape, isChild ); ADD_NODE( S3D::SGTYPE_SHAPE, SGSHAPE, aNode, m_Shape, m_RShape, isChild );
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] object '%s' is not a valid type for this object (%d)", wxLogTrace( MASK_3D_SG,
__FILE__, __FUNCTION__, __LINE__, aNode->GetName(), aNode->GetNodeType() ); wxT( "%s:%s:%d * [BUG] object '%s' is not a valid type for this object (%d)" ),
__FILE__, __FUNCTION__, __LINE__,
aNode->GetName(),
aNode->GetNodeType() );
return false; return false;
} }
@ -358,7 +363,8 @@ bool SCENEGRAPH::WriteCache( std::ostream& aFile, SGNODE* parentNode )
if( aFile.fail() ) if( aFile.fail() )
{ {
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [INFO] bad stream", __FILE__, __FUNCTION__, __LINE__ ); wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] bad stream" ),
__FILE__, __FUNCTION__, __LINE__ );
return false; return false;
} }
@ -414,7 +420,8 @@ bool SCENEGRAPH::WriteCache( std::ostream& aFile, SGNODE* parentNode )
{ {
if( !m_Transforms[i]->WriteCache( aFile, this ) ) if( !m_Transforms[i]->WriteCache( aFile, this ) )
{ {
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [INFO] bad stream while writing child transforms", wxLogTrace( MASK_3D_SG,
wxT( "%s:%s:%d * [INFO] bad stream while writing child transforms" ),
__FILE__, __FUNCTION__, __LINE__ ); __FILE__, __FUNCTION__, __LINE__ );
return false; return false;
@ -434,7 +441,8 @@ bool SCENEGRAPH::WriteCache( std::ostream& aFile, SGNODE* parentNode )
{ {
if( !m_Shape[i]->WriteCache( aFile, this ) ) if( !m_Shape[i]->WriteCache( aFile, this ) )
{ {
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [INFO] bad stream while writing child shapes", wxLogTrace( MASK_3D_SG,
wxT( "%s:%s:%d * [INFO] bad stream while writing child shapes" ),
__FILE__, __FUNCTION__, __LINE__ ); __FILE__, __FUNCTION__, __LINE__ );
return false; return false;
@ -467,8 +475,8 @@ bool SCENEGRAPH::ReadCache( std::istream& aFile, SGNODE* parentNode )
// we need to read the tag and verify its type // we need to read the tag and verify its type
if( S3D::SGTYPE_TRANSFORM != S3D::ReadTag( aFile, name ) ) if( S3D::SGTYPE_TRANSFORM != S3D::ReadTag( aFile, name ) )
{ {
wxLogTrace( MASK_3D_SG, wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data; tag mismatch at position "
"%s:%s:%d * [INFO] corrupt data; tag mismatch at position %ul", "%ul" ),
__FILE__, __FUNCTION__, __LINE__, __FILE__, __FUNCTION__, __LINE__,
static_cast<unsigned long>( aFile.tellg() ) ); static_cast<unsigned long>( aFile.tellg() ) );
@ -504,8 +512,8 @@ bool SCENEGRAPH::ReadCache( std::istream& aFile, SGNODE* parentNode )
{ {
if( S3D::SGTYPE_TRANSFORM != S3D::ReadTag( aFile, name ) ) if( S3D::SGTYPE_TRANSFORM != S3D::ReadTag( aFile, name ) )
{ {
wxLogTrace( MASK_3D_SG, wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data; bad child transform tag "
"%s:%s:%d * [INFO] corrupt data; bad child transform tag at position %ul", "at position %ul" ),
__FILE__, __FUNCTION__, __LINE__, __FILE__, __FUNCTION__, __LINE__,
static_cast<unsigned long>( aFile.tellg() ) ); static_cast<unsigned long>( aFile.tellg() ) );
@ -517,8 +525,8 @@ bool SCENEGRAPH::ReadCache( std::istream& aFile, SGNODE* parentNode )
if( !sp->ReadCache( aFile, this ) ) if( !sp->ReadCache( aFile, this ) )
{ {
wxLogTrace( MASK_3D_SG, wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data while reading transform "
"%s:%s:%d * [INFO] corrupt data while reading transform %ul", "%ul" ),
__FILE__, __FUNCTION__, __LINE__, __FILE__, __FUNCTION__, __LINE__,
static_cast<unsigned long>( aFile.tellg() ) ); static_cast<unsigned long>( aFile.tellg() ) );
@ -531,8 +539,8 @@ bool SCENEGRAPH::ReadCache( std::istream& aFile, SGNODE* parentNode )
{ {
if( S3D::SGTYPE_TRANSFORM != S3D::ReadTag( aFile, name ) ) if( S3D::SGTYPE_TRANSFORM != S3D::ReadTag( aFile, name ) )
{ {
wxLogTrace( MASK_3D_SG, wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data; bad ref transform tag at "
"%s:%s:%d * [INFO] corrupt data; bad ref transform tag at position %ul", "position %ul" ),
__FILE__, __FUNCTION__, __LINE__, __FILE__, __FUNCTION__, __LINE__,
static_cast<unsigned long>( aFile.tellg() ) ); static_cast<unsigned long>( aFile.tellg() ) );
@ -543,8 +551,8 @@ bool SCENEGRAPH::ReadCache( std::istream& aFile, SGNODE* parentNode )
if( !sp ) if( !sp )
{ {
wxLogTrace( MASK_3D_SG, wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data: cannot find ref "
"%s:%s:%d * [INFO] corrupt data: cannot find ref transform at position %ul", "transform at position %ul" ),
__FILE__, __FUNCTION__, __LINE__, __FILE__, __FUNCTION__, __LINE__,
static_cast<unsigned long>( aFile.tellg() ) ); static_cast<unsigned long>( aFile.tellg() ) );
@ -553,8 +561,8 @@ bool SCENEGRAPH::ReadCache( std::istream& aFile, SGNODE* parentNode )
if( S3D::SGTYPE_TRANSFORM != sp->GetNodeType() ) if( S3D::SGTYPE_TRANSFORM != sp->GetNodeType() )
{ {
wxLogTrace( MASK_3D_SG, wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data: type is not TRANSFORM "
"%s:%s:%d * [INFO] corrupt data: type is not TRANSFORM at position %ul", "at position %ul" ),
__FILE__, __FUNCTION__, __LINE__, __FILE__, __FUNCTION__, __LINE__,
static_cast<unsigned long>( aFile.tellg() ) ); static_cast<unsigned long>( aFile.tellg() ) );
@ -569,8 +577,8 @@ bool SCENEGRAPH::ReadCache( std::istream& aFile, SGNODE* parentNode )
{ {
if( S3D::SGTYPE_SHAPE != S3D::ReadTag( aFile, name ) ) if( S3D::SGTYPE_SHAPE != S3D::ReadTag( aFile, name ) )
{ {
wxLogTrace( MASK_3D_SG, wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data; bad child shape tag at "
"%s:%s:%d * [INFO] corrupt data; bad child shape tag at position %ul", "position %ul" ),
__FILE__, __FUNCTION__, __LINE__, __FILE__, __FUNCTION__, __LINE__,
static_cast<unsigned long>( aFile.tellg() ) ); static_cast<unsigned long>( aFile.tellg() ) );
@ -582,9 +590,9 @@ bool SCENEGRAPH::ReadCache( std::istream& aFile, SGNODE* parentNode )
if( !sp->ReadCache( aFile, this ) ) if( !sp->ReadCache( aFile, this ) )
{ {
wxLogTrace( MASK_3D_SG, wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data; corrupt data while "
"%s:%s:%d * [INFO] corrupt data; corrupt data while reading shape at " "reading shape at position %ul" ),
"position %ul", __FILE__, __FUNCTION__, __LINE__, __FILE__, __FUNCTION__, __LINE__,
static_cast<unsigned long>( aFile.tellg() ) ); static_cast<unsigned long>( aFile.tellg() ) );
return false; return false;
@ -596,8 +604,8 @@ bool SCENEGRAPH::ReadCache( std::istream& aFile, SGNODE* parentNode )
{ {
if( S3D::SGTYPE_SHAPE != S3D::ReadTag( aFile, name ) ) if( S3D::SGTYPE_SHAPE != S3D::ReadTag( aFile, name ) )
{ {
wxLogTrace( MASK_3D_SG, wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data; bad ref shape tag at "
"%s:%s:%d * [INFO] corrupt data; bad ref shape tag at position %ul", "position %ul" ),
__FILE__, __FUNCTION__, __LINE__, __FILE__, __FUNCTION__, __LINE__,
static_cast<unsigned long>( aFile.tellg() ) ); static_cast<unsigned long>( aFile.tellg() ) );
@ -608,8 +616,8 @@ bool SCENEGRAPH::ReadCache( std::istream& aFile, SGNODE* parentNode )
if( !sp ) if( !sp )
{ {
wxLogTrace( MASK_3D_SG, wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data: cannot find ref shape "
"%s:%s:%d * [INFO] corrupt data: cannot find ref shape at position %ul", "at position %ul" ),
__FILE__, __FUNCTION__, __LINE__, __FILE__, __FUNCTION__, __LINE__,
static_cast<unsigned long>( aFile.tellg() ) ); static_cast<unsigned long>( aFile.tellg() ) );
@ -618,8 +626,8 @@ bool SCENEGRAPH::ReadCache( std::istream& aFile, SGNODE* parentNode )
if( S3D::SGTYPE_SHAPE != sp->GetNodeType() ) if( S3D::SGTYPE_SHAPE != sp->GetNodeType() )
{ {
wxLogTrace( MASK_3D_SG, wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data: type is not SGSHAPE at "
"%s:%s:%d * [INFO] corrupt data: type is not SGSHAPE at position %ul", "position %ul" ),
__FILE__, __FUNCTION__, __LINE__, __FILE__, __FUNCTION__, __LINE__,
static_cast<unsigned long>( aFile.tellg() ) ); static_cast<unsigned long>( aFile.tellg() ) );

View File

@ -45,7 +45,8 @@ SGAPPEARANCE::SGAPPEARANCE( SGNODE* aParent ) : SGNODE( aParent )
{ {
m_Parent = nullptr; m_Parent = nullptr;
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] inappropriate parent to SGAPPEARANCE (type %s )", wxLogTrace( MASK_3D_SG,
wxT( "%s:%s:%d * [BUG] inappropriate parent to SGAPPEARANCE (type %s )" ),
__FILE__, __FUNCTION__, __LINE__, aParent->GetNodeType() ); __FILE__, __FUNCTION__, __LINE__, aParent->GetNodeType() );
} }
else if( nullptr != aParent && S3D::SGTYPE_SHAPE == aParent->GetNodeType() ) else if( nullptr != aParent && S3D::SGTYPE_SHAPE == aParent->GetNodeType() )
@ -98,7 +99,7 @@ bool SGAPPEARANCE::SetEmissive( float aRVal, float aGVal, float aBVal )
bool SGAPPEARANCE::SetEmissive( const SGCOLOR* aRGBColor ) bool SGAPPEARANCE::SetEmissive( const SGCOLOR* aRGBColor )
{ {
wxCHECK_MSG( aRGBColor, false, "NULL pointer passed for aRGBColor" ); wxCHECK_MSG( aRGBColor, false, wxT( "NULL pointer passed for aRGBColor" ) );
return emissive.SetColor( aRGBColor ); return emissive.SetColor( aRGBColor );
} }
@ -118,7 +119,7 @@ bool SGAPPEARANCE::SetDiffuse( float aRVal, float aGVal, float aBVal )
bool SGAPPEARANCE::SetDiffuse( const SGCOLOR* aRGBColor ) bool SGAPPEARANCE::SetDiffuse( const SGCOLOR* aRGBColor )
{ {
wxCHECK_MSG( aRGBColor, false, "NULL pointer passed for aRGBColor" ); wxCHECK_MSG( aRGBColor, false, wxT( "NULL pointer passed for aRGBColor" ) );
return diffuse.SetColor( aRGBColor ); return diffuse.SetColor( aRGBColor );
} }
@ -138,7 +139,7 @@ bool SGAPPEARANCE::SetSpecular( float aRVal, float aGVal, float aBVal )
bool SGAPPEARANCE::SetSpecular( const SGCOLOR* aRGBColor ) bool SGAPPEARANCE::SetSpecular( const SGCOLOR* aRGBColor )
{ {
wxCHECK_MSG( aRGBColor, false, "NULL pointer passed for aRGBColor" ); wxCHECK_MSG( aRGBColor, false, wxT( "NULL pointer passed for aRGBColor" ) );
return specular.SetColor( aRGBColor ); return specular.SetColor( aRGBColor );
} }
@ -157,7 +158,7 @@ bool SGAPPEARANCE::SetAmbient( float aRVal, float aGVal, float aBVal )
bool SGAPPEARANCE::SetAmbient( const SGCOLOR* aRGBColor ) bool SGAPPEARANCE::SetAmbient( const SGCOLOR* aRGBColor )
{ {
wxCHECK_MSG( aRGBColor, false, "NULL pointer passed for aRGBColor" ); wxCHECK_MSG( aRGBColor, false, wxT( "NULL pointer passed for aRGBColor" ) );
return ambient.SetColor( aRGBColor ); return ambient.SetColor( aRGBColor );
} }
@ -184,20 +185,20 @@ SGNODE* SGAPPEARANCE::FindNode( const char* aNodeName, const SGNODE* aCaller) no
void SGAPPEARANCE::unlinkChildNode( const SGNODE* aCaller ) noexcept void SGAPPEARANCE::unlinkChildNode( const SGNODE* aCaller ) noexcept
{ {
wxCHECK_MSG( aCaller, /* void */, wxCHECK_MSG( aCaller, /* void */,
"unexpected code branch; node should have no children or refs" ); wxT( "unexpected code branch; node should have no children or refs" ) );
} }
void SGAPPEARANCE::unlinkRefNode( const SGNODE* aCaller ) noexcept void SGAPPEARANCE::unlinkRefNode( const SGNODE* aCaller ) noexcept
{ {
wxCHECK_MSG( aCaller, /* void */, wxCHECK_MSG( aCaller, /* void */,
"unexpected code branch; node should have no children or refs" ); wxT( "unexpected code branch; node should have no children or refs" ) );
} }
bool SGAPPEARANCE::AddRefNode( SGNODE* aNode ) noexcept bool SGAPPEARANCE::AddRefNode( SGNODE* aNode ) noexcept
{ {
wxCHECK_MSG( aNode, false, "this node does not accept children or refs" ); wxCHECK_MSG( aNode, false, wxT( "this node does not accept children or refs" ) );
// This is redundant but it keeps gcc from generating a warning on debug builds. // This is redundant but it keeps gcc from generating a warning on debug builds.
return false; return false;
@ -206,7 +207,7 @@ bool SGAPPEARANCE::AddRefNode( SGNODE* aNode ) noexcept
bool SGAPPEARANCE::AddChildNode( SGNODE* aNode ) noexcept bool SGAPPEARANCE::AddChildNode( SGNODE* aNode ) noexcept
{ {
wxCHECK_MSG( aNode, false, "this node does not accept children or refs" ); wxCHECK_MSG( aNode, false, wxT( "this node does not accept children or refs" ) );
// This is redundant but it keeps gcc from generating a warning on debug builds. // This is redundant but it keeps gcc from generating a warning on debug builds.
return false; return false;
@ -304,7 +305,7 @@ bool SGAPPEARANCE::WriteCache( std::ostream& aFile, SGNODE* parentNode )
{ {
if( nullptr == parentNode ) if( nullptr == parentNode )
{ {
wxCHECK_MSG( m_Parent, false, "corrupt data; m_aParent is NULL" ); wxCHECK_MSG( m_Parent, false, wxT( "corrupt data; m_aParent is NULL" ) );
SGNODE* np = m_Parent; SGNODE* np = m_Parent;
@ -320,11 +321,12 @@ bool SGAPPEARANCE::WriteCache( std::ostream& aFile, SGNODE* parentNode )
return false; return false;
} }
wxCHECK_MSG( parentNode == m_Parent, false, "corrupt data; parentNode != m_aParent" ); wxCHECK_MSG( parentNode == m_Parent, false, wxT( "corrupt data; parentNode != m_aParent" ) );
if( !aFile.good() ) if( !aFile.good() )
{ {
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [INFO] bad stream", __FILE__, __FUNCTION__, __LINE__ ); wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] bad stream" ),
__FILE__, __FUNCTION__, __LINE__ );
return false; return false;
} }

View File

@ -42,7 +42,7 @@ SGCOLOR::SGCOLOR( float aRVal, float aGVal, float aBVal )
{ {
if( !checkRange( aRVal, aGVal, aBVal ) ) if( !checkRange( aRVal, aGVal, aBVal ) )
{ {
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] invalid value passed to constructor", wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [BUG] invalid value passed to constructor" ),
__FILE__, __FUNCTION__, __LINE__ ); __FILE__, __FUNCTION__, __LINE__ );
red = 0.0; red = 0.0;
green = 0.0; green = 0.0;
@ -74,7 +74,7 @@ void SGCOLOR::GetColor( SGCOLOR& aColor ) const noexcept
void SGCOLOR::GetColor( SGCOLOR* aColor ) const noexcept void SGCOLOR::GetColor( SGCOLOR* aColor ) const noexcept
{ {
wxCHECK_MSG( aColor, /* void */, "NULL pointer passed for aRGBColor" ); wxCHECK_MSG( aColor, /* void */, wxT( "NULL pointer passed for aRGBColor" ) );
aColor->red = red; aColor->red = red;
aColor->green = green; aColor->green = green;
@ -106,7 +106,7 @@ bool SGCOLOR::SetColor( const SGCOLOR& aColor ) noexcept
bool SGCOLOR::SetColor( const SGCOLOR* aColor ) noexcept bool SGCOLOR::SetColor( const SGCOLOR* aColor ) noexcept
{ {
wxCHECK_MSG( aColor, false, "NULL pointer passed for aRGBColor" ); wxCHECK_MSG( aColor, false, wxT( "NULL pointer passed for aRGBColor" ) );
red = aColor->red; red = aColor->red;
green = aColor->green; green = aColor->green;
@ -121,7 +121,7 @@ bool SGCOLOR::checkRange( float aRedVal, float aGreenVal, float aBlueVal ) const
if( aRedVal < 0.0 || aRedVal > 1.0 ) if( aRedVal < 0.0 || aRedVal > 1.0 )
{ {
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] invalid RED value: %g", wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [BUG] invalid RED value: %g" ),
__FILE__, __FUNCTION__, __LINE__, aRedVal ); __FILE__, __FUNCTION__, __LINE__, aRedVal );
ok = false; ok = false;
@ -129,7 +129,7 @@ bool SGCOLOR::checkRange( float aRedVal, float aGreenVal, float aBlueVal ) const
if( aGreenVal < 0.0 || aGreenVal > 1.0 ) if( aGreenVal < 0.0 || aGreenVal > 1.0 )
{ {
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] invalid GREEN value: %g", wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [BUG] invalid GREEN value: %g" ),
__FILE__, __FUNCTION__, __LINE__, aGreenVal ); __FILE__, __FUNCTION__, __LINE__, aGreenVal );
ok = false; ok = false;
@ -137,7 +137,7 @@ bool SGCOLOR::checkRange( float aRedVal, float aGreenVal, float aBlueVal ) const
if( aBlueVal < 0.0 || aBlueVal > 1.0 ) if( aBlueVal < 0.0 || aBlueVal > 1.0 )
{ {
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] invalid BLUE value: %g", wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [BUG] invalid BLUE value: %g" ),
__FILE__, __FUNCTION__, __LINE__, aBlueVal ); __FILE__, __FUNCTION__, __LINE__, aBlueVal );
ok = false; ok = false;
@ -181,7 +181,7 @@ void SGPOINT::GetPoint( const SGPOINT& aPoint ) noexcept
void SGPOINT::GetPoint( const SGPOINT* aPoint ) noexcept void SGPOINT::GetPoint( const SGPOINT* aPoint ) noexcept
{ {
wxCHECK_MSG( aPoint, /* void */, "NULL pointer passed for aPoint" ); wxCHECK_MSG( aPoint, /* void */, wxT( "NULL pointer passed for aPoint" ) );
x = aPoint->x; x = aPoint->x;
y = aPoint->y; y = aPoint->y;

View File

@ -38,7 +38,8 @@ SGCOLORS::SGCOLORS( SGNODE* aParent ) : SGNODE( aParent )
{ {
m_Parent = nullptr; m_Parent = nullptr;
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] inappropriate parent to SGCOLORS (type %s)", wxLogTrace( MASK_3D_SG,
wxT( "%s:%s:%d * [BUG] inappropriate parent to SGCOLORS (type %s)" ),
__FILE__, __FUNCTION__, __LINE__, aParent->GetNodeType() ); __FILE__, __FUNCTION__, __LINE__, aParent->GetNodeType() );
} }
else if( nullptr != aParent && S3D::SGTYPE_FACESET == aParent->GetNodeType() ) else if( nullptr != aParent && S3D::SGTYPE_FACESET == aParent->GetNodeType() )
@ -259,7 +260,8 @@ bool SGCOLORS::WriteCache( std::ostream& aFile, SGNODE* parentNode )
if( !aFile.good() ) if( !aFile.good() )
{ {
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [INFO] bad stream", __FILE__, __FUNCTION__, __LINE__ ); wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] bad stream" ),
__FILE__, __FUNCTION__, __LINE__ );
return false; return false;
} }

View File

@ -40,7 +40,8 @@ SGCOORDS::SGCOORDS( SGNODE* aParent ) : SGNODE( aParent )
{ {
m_Parent = nullptr; m_Parent = nullptr;
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] inappropriate parent to SGCOORDS (type %s)", wxLogTrace( MASK_3D_SG,
wxT( "%s:%s:%d * [BUG] inappropriate parent to SGCOORDS (type %s)" ),
__FILE__, __FUNCTION__, __LINE__, aParent->GetNodeType() ); __FILE__, __FUNCTION__, __LINE__, aParent->GetNodeType() );
} }
else if( nullptr != aParent && S3D::SGTYPE_FACESET == aParent->GetNodeType() ) else if( nullptr != aParent && S3D::SGTYPE_FACESET == aParent->GetNodeType() )
@ -261,7 +262,8 @@ bool SGCOORDS::WriteCache( std::ostream& aFile, SGNODE* parentNode )
if( !aFile.good() ) if( !aFile.good() )
{ {
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [INFO] bad stream", __FILE__, __FUNCTION__, __LINE__ ); wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] bad stream" ),
__FILE__, __FUNCTION__, __LINE__ );
return false; return false;
} }

View File

@ -52,8 +52,10 @@ SGFACESET::SGFACESET( SGNODE* aParent ) : SGNODE( aParent )
{ {
m_Parent = nullptr; m_Parent = nullptr;
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] inappropriate parent to SGFACESET (type %s)", wxLogTrace( MASK_3D_SG,
__FILE__, __FUNCTION__, __LINE__, aParent->GetNodeType() ); wxT( "%s:%s:%d * [BUG] inappropriate parent to SGFACESET (type %s)" ),
__FILE__, __FUNCTION__, __LINE__,
aParent->GetNodeType() );
} }
else if( nullptr != aParent && S3D::SGTYPE_SHAPE == aParent->GetNodeType() ) else if( nullptr != aParent && S3D::SGTYPE_SHAPE == aParent->GetNodeType() )
{ {
@ -252,7 +254,7 @@ void SGFACESET::unlinkNode( const SGNODE* aNode, bool isChild )
} }
} }
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] unlinkNode() did not find its target", wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [BUG] unlinkNode() did not find its target" ),
__FILE__, __FUNCTION__, __LINE__ ); __FILE__, __FUNCTION__, __LINE__ );
} }
@ -283,7 +285,7 @@ bool SGFACESET::addNode( SGNODE* aNode, bool isChild )
{ {
if( aNode != m_Colors && aNode != m_RColors ) if( aNode != m_Colors && aNode != m_RColors )
{ {
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] assigning multiple Colors nodes", wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [BUG] assigning multiple Colors nodes" ),
__FILE__, __FUNCTION__, __LINE__ ); __FILE__, __FUNCTION__, __LINE__ );
return false; return false;
@ -312,7 +314,7 @@ bool SGFACESET::addNode( SGNODE* aNode, bool isChild )
{ {
if( aNode != m_Coords && aNode != m_RCoords ) if( aNode != m_Coords && aNode != m_RCoords )
{ {
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] assigning multiple Colors nodes", wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [BUG] assigning multiple Colors nodes" ),
__FILE__, __FUNCTION__, __LINE__ ); __FILE__, __FUNCTION__, __LINE__ );
return false; return false;
@ -341,7 +343,7 @@ bool SGFACESET::addNode( SGNODE* aNode, bool isChild )
{ {
if( aNode != m_Normals && aNode != m_RNormals ) if( aNode != m_Normals && aNode != m_RNormals )
{ {
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] assigning multiple Normals nodes", wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [BUG] assigning multiple Normals nodes" ),
__FILE__, __FUNCTION__, __LINE__ ); __FILE__, __FUNCTION__, __LINE__ );
return false; return false;
@ -370,7 +372,8 @@ bool SGFACESET::addNode( SGNODE* aNode, bool isChild )
{ {
if( aNode != m_CoordIndices ) if( aNode != m_CoordIndices )
{ {
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] assigning multiple CoordIndex nodes", wxLogTrace( MASK_3D_SG,
wxT( "%s:%s:%d * [BUG] assigning multiple CoordIndex nodes" ),
__FILE__, __FUNCTION__, __LINE__ ); __FILE__, __FUNCTION__, __LINE__ );
return false; return false;
@ -385,8 +388,10 @@ bool SGFACESET::addNode( SGNODE* aNode, bool isChild )
return true; return true;
} }
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] object type '%s' is not a valid type for " wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [BUG] object type '%s' is not a valid type for "
"this object '%d'", __FILE__, __FUNCTION__, __LINE__, aNode->GetName(), "this object '%d'" ),
__FILE__, __FUNCTION__, __LINE__,
aNode->GetName(),
aNode->GetNodeType() ); aNode->GetNodeType() );
return false; return false;
@ -509,7 +514,8 @@ bool SGFACESET::WriteCache( std::ostream& aFile, SGNODE* parentNode )
if( !aFile.good() ) if( !aFile.good() )
{ {
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [INFO] bad stream", __FILE__, __FUNCTION__, __LINE__ ); wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] bad stream" ),
__FILE__, __FUNCTION__, __LINE__ );
return false; return false;
} }
@ -597,7 +603,7 @@ bool SGFACESET::ReadCache( std::istream& aFile, SGNODE* parentNode )
if( m_Coords || m_RCoords || m_CoordIndices || m_Colors || m_RColors || m_Normals if( m_Coords || m_RCoords || m_CoordIndices || m_Colors || m_RColors || m_Normals
|| m_RNormals ) || m_RNormals )
{ {
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] non-empty node", wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [BUG] non-empty node" ),
__FILE__, __FUNCTION__, __LINE__ ); __FILE__, __FUNCTION__, __LINE__ );
return false; return false;
@ -611,9 +617,10 @@ bool SGFACESET::ReadCache( std::istream& aFile, SGNODE* parentNode )
if( ( items[0] && items[1] ) || ( items[3] && items[4] ) || ( items[5] && items[6] ) ) if( ( items[0] && items[1] ) || ( items[3] && items[4] ) || ( items[5] && items[6] ) )
{ {
wxLogTrace( MASK_3D_SG, wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data; multiple item definitions "
"%s:%s:%d * [INFO] corrupt data; multiple item definitions at position %d", "at position %d" ),
__FILE__, __FUNCTION__, __LINE__, static_cast<int>( aFile.tellg() ) ); __FILE__, __FUNCTION__, __LINE__,
static_cast<int>( aFile.tellg() ) );
return false; return false;
} }
@ -624,9 +631,10 @@ bool SGFACESET::ReadCache( std::istream& aFile, SGNODE* parentNode )
{ {
if( S3D::SGTYPE_COORDS != S3D::ReadTag( aFile, name ) ) if( S3D::SGTYPE_COORDS != S3D::ReadTag( aFile, name ) )
{ {
wxLogTrace( MASK_3D_SG, wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data; bad child coords tag at "
"%s:%s:%d * [INFO] corrupt data; bad child coords tag at position %d", "position %d" ),
__FILE__, __FUNCTION__, __LINE__, static_cast<int>( aFile.tellg() ) ); __FILE__, __FUNCTION__, __LINE__,
static_cast<int>( aFile.tellg() ) );
return false; return false;
} }
@ -636,9 +644,10 @@ bool SGFACESET::ReadCache( std::istream& aFile, SGNODE* parentNode )
if( !m_Coords->ReadCache( aFile, this ) ) if( !m_Coords->ReadCache( aFile, this ) )
{ {
wxLogTrace( MASK_3D_SG, wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data; corrupt data while "
"%s:%s:%d * [INFO] corrupt data; corrupt data while reading coords '%s'", "reading coords '%s'" ),
__FILE__, __FUNCTION__, __LINE__, name ); __FILE__, __FUNCTION__, __LINE__,
name );
return false; return false;
} }
@ -648,9 +657,10 @@ bool SGFACESET::ReadCache( std::istream& aFile, SGNODE* parentNode )
{ {
if( S3D::SGTYPE_COORDS != S3D::ReadTag( aFile, name ) ) if( S3D::SGTYPE_COORDS != S3D::ReadTag( aFile, name ) )
{ {
wxLogTrace( MASK_3D_SG, wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data; bad ref coords tag at "
"%s:%s:%d * [INFO] corrupt data; bad ref coords tag at position %d", "position %d" ),
__FILE__, __FUNCTION__, __LINE__, static_cast<int>( aFile.tellg() ) ); __FILE__, __FUNCTION__, __LINE__,
static_cast<int>( aFile.tellg() ) );
return false; return false;
} }
@ -659,18 +669,20 @@ bool SGFACESET::ReadCache( std::istream& aFile, SGNODE* parentNode )
if( !np ) if( !np )
{ {
wxLogTrace( MASK_3D_SG, wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data; cannot find ref "
"%s:%s:%d * [INFO] corrupt data; cannot find ref coords '%s'", "coords '%s'" ),
__FILE__, __FUNCTION__, __LINE__, name ); __FILE__, __FUNCTION__, __LINE__,
name );
return false; return false;
} }
if( S3D::SGTYPE_COORDS != np->GetNodeType() ) if( S3D::SGTYPE_COORDS != np->GetNodeType() )
{ {
wxLogTrace( MASK_3D_SG, wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data; type is not SGCOORDS "
"%s:%s:%d * [INFO] corrupt data; type is not SGCOORDS '%s'", "'%s'" ),
__FILE__, __FUNCTION__, __LINE__, name ); __FILE__, __FUNCTION__, __LINE__,
name );
return false; return false;
} }
@ -683,9 +695,10 @@ bool SGFACESET::ReadCache( std::istream& aFile, SGNODE* parentNode )
{ {
if( S3D::SGTYPE_COORDINDEX != S3D::ReadTag( aFile, name ) ) if( S3D::SGTYPE_COORDINDEX != S3D::ReadTag( aFile, name ) )
{ {
wxLogTrace( MASK_3D_SG, wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data; bad coord index tag at "
"%s:%s:%d * [INFO] corrupt data; bad coord index tag at position %d", "position %d" ),
__FILE__, __FUNCTION__, __LINE__, static_cast<int>( aFile.tellg() ) ); __FILE__, __FUNCTION__, __LINE__,
static_cast<int>( aFile.tellg() ) );
return false; return false;
} }
@ -695,9 +708,10 @@ bool SGFACESET::ReadCache( std::istream& aFile, SGNODE* parentNode )
if( !m_CoordIndices->ReadCache( aFile, this ) ) if( !m_CoordIndices->ReadCache( aFile, this ) )
{ {
wxLogTrace( MASK_3D_SG, wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data while reading coord "
"%s:%s:%d * [INFO] corrupt data while reading coord index '%s'", "index '%s'" ),
__FILE__, __FUNCTION__, __LINE__, name ); __FILE__, __FUNCTION__, __LINE__,
name );
return false; return false;
} }
@ -707,9 +721,10 @@ bool SGFACESET::ReadCache( std::istream& aFile, SGNODE* parentNode )
{ {
if( S3D::SGTYPE_NORMALS != S3D::ReadTag( aFile, name ) ) if( S3D::SGTYPE_NORMALS != S3D::ReadTag( aFile, name ) )
{ {
wxLogTrace( MASK_3D_SG, wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data; bad child normals tag "
"%s:%s:%d * [INFO] corrupt data; bad child normals tag at position %d", "at position %d" ),
__FILE__, __FUNCTION__, __LINE__, static_cast<int>( aFile.tellg() ) ); __FILE__, __FUNCTION__, __LINE__,
static_cast<int>( aFile.tellg() ) );
return false; return false;
} }
@ -719,9 +734,10 @@ bool SGFACESET::ReadCache( std::istream& aFile, SGNODE* parentNode )
if( !m_Normals->ReadCache( aFile, this ) ) if( !m_Normals->ReadCache( aFile, this ) )
{ {
wxLogTrace( MASK_3D_SG, wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data while reading normals "
"%s:%s:%d * [INFO] corrupt data while reading normals '%s'", "'%s'" ),
__FILE__, __FUNCTION__, __LINE__, name ); __FILE__, __FUNCTION__, __LINE__,
name );
return false; return false;
} }
@ -731,9 +747,10 @@ bool SGFACESET::ReadCache( std::istream& aFile, SGNODE* parentNode )
{ {
if( S3D::SGTYPE_NORMALS != S3D::ReadTag( aFile, name ) ) if( S3D::SGTYPE_NORMALS != S3D::ReadTag( aFile, name ) )
{ {
wxLogTrace( MASK_3D_SG, wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data; bad ref normals tag at "
"%s:%s:%d * [INFO] corrupt data; bad ref normals tag at position %d", "position %d" ),
__FILE__, __FUNCTION__, __LINE__, static_cast<int>( aFile.tellg() ) ); __FILE__, __FUNCTION__, __LINE__,
static_cast<int>( aFile.tellg() ) );
return false; return false;
} }
@ -742,18 +759,19 @@ bool SGFACESET::ReadCache( std::istream& aFile, SGNODE* parentNode )
if( !np ) if( !np )
{ {
wxLogTrace( MASK_3D_SG, wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt: cannot find ref normals "
"%s:%s:%d * [INFO] corrupt: cannot find ref normals '%s'", "'%s'" ),
__FILE__, __FUNCTION__, __LINE__, name ); __FILE__, __FUNCTION__, __LINE__,
name );
return false; return false;
} }
if( S3D::SGTYPE_NORMALS != np->GetNodeType() ) if( S3D::SGTYPE_NORMALS != np->GetNodeType() )
{ {
wxLogTrace( MASK_3D_SG, wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt: type is not SGNORMALS '%s'" ),
"%s:%s:%d * [INFO] corrupt: type is not SGNORMALS '%s'", __FILE__, __FUNCTION__, __LINE__,
__FILE__, __FUNCTION__, __LINE__, name ); name );
return false; return false;
} }
@ -766,9 +784,10 @@ bool SGFACESET::ReadCache( std::istream& aFile, SGNODE* parentNode )
{ {
if( S3D::SGTYPE_COLORS != S3D::ReadTag( aFile, name ) ) if( S3D::SGTYPE_COLORS != S3D::ReadTag( aFile, name ) )
{ {
wxLogTrace( MASK_3D_SG, wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data; bad child colors tag "
"%s:%s:%d * [INFO] corrupt data; bad child colors tag at position %d", "at position %d" ),
__FILE__, __FUNCTION__, __LINE__, static_cast<int>( aFile.tellg() ) ); __FILE__, __FUNCTION__, __LINE__,
static_cast<int>( aFile.tellg() ) );
return false; return false;
} }
@ -778,9 +797,10 @@ bool SGFACESET::ReadCache( std::istream& aFile, SGNODE* parentNode )
if( !m_Colors->ReadCache( aFile, this ) ) if( !m_Colors->ReadCache( aFile, this ) )
{ {
wxLogTrace( MASK_3D_SG, wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data while reading colors "
"%s:%s:%d * [INFO] corrupt data while reading colors '%s'", "'%s'" ),
__FILE__, __FUNCTION__, __LINE__, name ); __FILE__, __FUNCTION__, __LINE__,
name );
return false; return false;
} }
@ -790,9 +810,10 @@ bool SGFACESET::ReadCache( std::istream& aFile, SGNODE* parentNode )
{ {
if( S3D::SGTYPE_COLORS != S3D::ReadTag( aFile, name ) ) if( S3D::SGTYPE_COLORS != S3D::ReadTag( aFile, name ) )
{ {
wxLogTrace( MASK_3D_SG, wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data; bad ref colors tag at "
"%s:%s:%d * [INFO] corrupt data; bad ref colors tag at position %d", "position %d" ),
__FILE__, __FUNCTION__, __LINE__, static_cast<int>( aFile.tellg() ) ); __FILE__, __FUNCTION__, __LINE__,
static_cast<int>( aFile.tellg() ) );
return false; return false;
} }
@ -801,18 +822,20 @@ bool SGFACESET::ReadCache( std::istream& aFile, SGNODE* parentNode )
if( !np ) if( !np )
{ {
wxLogTrace( MASK_3D_SG, wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data: cannot find ref colors "
"%s:%s:%d * [INFO] corrupt data: cannot find ref colors '%s'", "'%s'" ),
__FILE__, __FUNCTION__, __LINE__, name ); __FILE__, __FUNCTION__, __LINE__,
name );
return false; return false;
} }
if( S3D::SGTYPE_COLORS != np->GetNodeType() ) if( S3D::SGTYPE_COLORS != np->GetNodeType() )
{ {
wxLogTrace( MASK_3D_SG, wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data: type is not SGCOLORS "
"%s:%s:%d * [INFO] corrupt data: type is not SGCOLORS '%s'", "'%s'" ),
__FILE__, __FUNCTION__, __LINE__, name ); __FILE__, __FUNCTION__, __LINE__,
name );
return false; return false;
} }
@ -839,8 +862,8 @@ bool SGFACESET::validate( void )
|| ( nullptr == m_Normals && nullptr == m_RNormals ) || ( nullptr == m_Normals && nullptr == m_RNormals )
|| ( nullptr == m_CoordIndices ) ) || ( nullptr == m_CoordIndices ) )
{ {
wxLogTrace( MASK_3D_SG, wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] bad model; no vertices, vertex indices, "
"%s:%s:%d * [INFO] bad model; no vertices, vertex indices, or normals", "or normals" ),
__FILE__, __FUNCTION__, __LINE__ ); __FILE__, __FUNCTION__, __LINE__ );
validated = true; validated = true;
@ -860,7 +883,7 @@ bool SGFACESET::validate( void )
if( nCoords < 3 ) if( nCoords < 3 )
{ {
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [INFO] bad model; fewer than 3 vertices", wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] bad model; fewer than 3 vertices" ),
__FILE__, __FUNCTION__, __LINE__ ); __FILE__, __FUNCTION__, __LINE__ );
validated = true; validated = true;
@ -875,8 +898,8 @@ bool SGFACESET::validate( void )
if( nCIdx < 3 || ( nCIdx % 3 > 0 ) ) if( nCIdx < 3 || ( nCIdx % 3 > 0 ) )
{ {
wxLogTrace( MASK_3D_SG, wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] bad model; no vertex indices or not "
"%s:%s:%d * [INFO] bad model; no vertex indices or not multiple of 3", "multiple of 3" ),
__FILE__, __FUNCTION__, __LINE__ ); __FILE__, __FUNCTION__, __LINE__ );
validated = true; validated = true;
@ -889,7 +912,8 @@ bool SGFACESET::validate( void )
{ {
if( lCIdx[i] < 0 || lCIdx[i] >= (int)nCoords ) if( lCIdx[i] < 0 || lCIdx[i] >= (int)nCoords )
{ {
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [INFO] bad model; vertex index out of bounds", wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] bad model; vertex index out of "
"bounds" ),
__FILE__, __FUNCTION__, __LINE__ ); __FILE__, __FUNCTION__, __LINE__ );
validated = true; validated = true;
@ -910,10 +934,11 @@ bool SGFACESET::validate( void )
if( nNorms != nCoords ) if( nNorms != nCoords )
{ {
wxLogTrace( MASK_3D_SG, wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] bad model; number of normals (%ul) does "
"%s:%s:%d * [INFO] bad model; number of normals (%ul) does not match " "not match number of vertices (%ul)" ),
"number of vertices (%ul)", __FILE__, __FUNCTION__, __LINE__, __FILE__, __FUNCTION__, __LINE__,
static_cast<unsigned long>( nNorms ), static_cast<unsigned long>( nCoords ) ); static_cast<unsigned long>( nNorms ),
static_cast<unsigned long>( nCoords ) );
validated = true; validated = true;
valid = false; valid = false;

View File

@ -199,9 +199,10 @@ S3D::SGTYPES S3D::ReadTag( std::istream& aFile, std::string& aName )
if( '[' != schar ) if( '[' != schar )
{ {
wxLogTrace( MASK_3D_SG, wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data; missing left bracket at "
"%s:%s:%d * [INFO] corrupt data; missing left bracket at position %d", "position %d" ),
__FILE__, __FUNCTION__, __LINE__, static_cast<int>( aFile.tellg() ) ); __FILE__, __FUNCTION__, __LINE__,
static_cast<int>( aFile.tellg() ) );
return S3D::SGTYPE_END; return S3D::SGTYPE_END;
} }
@ -217,8 +218,8 @@ S3D::SGTYPES S3D::ReadTag( std::istream& aFile, std::string& aName )
if( schar != ']' ) if( schar != ']' )
{ {
wxLogTrace( MASK_3D_SG, wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data; could not find right "
"%s:%s:%d * [INFO] corrupt data; could not find right bracket", "bracket" ),
__FILE__, __FUNCTION__, __LINE__ ); __FILE__, __FUNCTION__, __LINE__ );
return S3D::SGTYPE_END; return S3D::SGTYPE_END;
@ -229,9 +230,9 @@ S3D::SGTYPES S3D::ReadTag( std::istream& aFile, std::string& aName )
if( std::string::npos == upos ) if( std::string::npos == upos )
{ {
wxLogTrace( MASK_3D_SG, wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data; no underscore in name '%s'" ),
"%s:%s:%d * [INFO] corrupt data; no underscore in name '%s'", __FILE__, __FUNCTION__, __LINE__,
__FILE__, __FUNCTION__, __LINE__, name ); name );
return S3D::SGTYPE_END; return S3D::SGTYPE_END;
} }
@ -255,9 +256,9 @@ S3D::SGTYPES S3D::ReadTag( std::istream& aFile, std::string& aName )
return types[i]; return types[i];
} }
wxLogTrace( MASK_3D_SG, wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data; no node type matching '%s'" ),
"%s:%s:%d * [INFO] corrupt data; no node type matching '%s'", __FILE__, __FUNCTION__, __LINE__,
__FILE__, __FUNCTION__, __LINE__, name ); name );
return S3D::SGTYPE_END; return S3D::SGTYPE_END;
} }
@ -356,8 +357,8 @@ bool S3D::CalcTriangleNormals( std::vector< SGPOINT > coords, std::vector< int >
if( vsize < 3 ) if( vsize < 3 )
{ {
wxLogTrace( MASK_3D_SG, wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] invalid vertex set (fewer than 3 "
"%s:%s:%d * [INFO] invalid vertex set (fewer than 3 vertices)", "vertices)" ),
__FILE__, __FUNCTION__, __LINE__ ); __FILE__, __FUNCTION__, __LINE__ );
return false; return false;
@ -367,7 +368,7 @@ bool S3D::CalcTriangleNormals( std::vector< SGPOINT > coords, std::vector< int >
if( 0 != isize % 3 || index.empty() ) if( 0 != isize % 3 || index.empty() )
{ {
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [INFO] invalid index set (not multiple of 3)", wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] invalid index set (not multiple of 3)" ),
__FILE__, __FUNCTION__, __LINE__ ); __FILE__, __FUNCTION__, __LINE__ );
return false; return false;
@ -375,7 +376,7 @@ bool S3D::CalcTriangleNormals( std::vector< SGPOINT > coords, std::vector< int >
if( !norms.empty() ) if( !norms.empty() )
{ {
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [INFO] normals set is not empty", wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] normals set is not empty" ),
__FILE__, __FUNCTION__, __LINE__ ); __FILE__, __FUNCTION__, __LINE__ );
return false; return false;
@ -398,7 +399,7 @@ bool S3D::CalcTriangleNormals( std::vector< SGPOINT > coords, std::vector< int >
std::ostringstream ostr; std::ostringstream ostr;
ostr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; ostr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
ostr << " * [INFO] invalid index set; index out of bounds"; ostr << " * [INFO] invalid index set; index out of bounds";
wxLogTrace( MASK_3D_SG, "%s\n", ostr.str().c_str() ); wxLogTrace( MASK_3D_SG, wxT( "%s\n" ), ostr.str().c_str() );
#endif #endif
return false; return false;
@ -481,8 +482,8 @@ bool S3D::CalcTriangleNormals( std::vector< SGPOINT > coords, std::vector< int >
if( norms.size() != coords.size() ) if( norms.size() != coords.size() )
{ {
wxLogTrace( MASK_3D_SG, wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [BUG] number of normals does not equal number "
"%s:%s:%d * [BUG] number of normals does not equal number of vertices", "of vertices" ),
__FILE__, __FUNCTION__, __LINE__ ); __FILE__, __FUNCTION__, __LINE__ );
return false; return false;

View File

@ -35,8 +35,10 @@ SGINDEX::SGINDEX( SGNODE* aParent ) : SGNODE( aParent )
{ {
m_Parent = nullptr; m_Parent = nullptr;
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] inappropriate parent to SGINDEX (type '%d')", wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [BUG] inappropriate parent to SGINDEX (type "
__FILE__, __FUNCTION__, __LINE__, aParent->GetNodeType() ); "'%d')" ),
__FILE__, __FUNCTION__, __LINE__,
aParent->GetNodeType() );
} }
} }
@ -182,8 +184,8 @@ bool SGINDEX::writeCoordIndex( std::ostream& aFile )
{ {
size_t n = index.size(); size_t n = index.size();
wxCHECK_MSG( n % 3 == 0, false, wxCHECK_MSG( n % 3 == 0, false, wxT( "Coordinate index is not divisible by three (violates "
"Coordinate index is not divisible by three (violates triangle constraint)" ); "triangle constraint)" ) );
aFile << " coordIndex [\n "; aFile << " coordIndex [\n ";
@ -281,7 +283,7 @@ bool SGINDEX::WriteCache( std::ostream& aFile, SGNODE* parentNode )
if( !aFile.good() ) if( !aFile.good() )
{ {
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [INFO] bad stream", wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] bad stream" ),
__FILE__, __FUNCTION__, __LINE__ ); __FILE__, __FUNCTION__, __LINE__ );
return false; return false;

View File

@ -196,9 +196,11 @@ void SGNODE::delNodeRef( const SGNODE* aNode )
return; return;
} }
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] delNodeRef() did not find its target, " wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [BUG] delNodeRef() did not find its target, this "
"this node type %d, referenced node type %d", __FILE__, __FUNCTION__, __LINE__, "node type %d, referenced node type %d" ),
m_SGtype, aNode->GetNodeType() ); __FILE__, __FUNCTION__, __LINE__,
m_SGtype,
aNode->GetNodeType() );
} }
@ -212,8 +214,8 @@ void SGNODE::AssociateWrapper( SGNODE** aWrapperRef ) noexcept
{ {
*m_Association = nullptr; *m_Association = nullptr;
wxLogTrace( MASK_3D_SG, wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [WARNING] association being broken with "
"%s:%s:%d * [WARNING] association being broken with previous wrapper", "previous wrapper" ),
__FILE__, __FUNCTION__, __LINE__ ); __FILE__, __FUNCTION__, __LINE__ );
} }

View File

@ -38,8 +38,10 @@ SGNORMALS::SGNORMALS( SGNODE* aParent ) : SGNODE( aParent )
{ {
m_Parent = nullptr; m_Parent = nullptr;
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] inappropriate parent to SGNORMALS (type %d)", wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [BUG] inappropriate parent to SGNORMALS "
__FILE__, __FUNCTION__, __LINE__, aParent->GetNodeType() ); "(type %d)" ),
__FILE__, __FUNCTION__, __LINE__,
aParent->GetNodeType() );
} }
else if( nullptr != aParent && S3D::SGTYPE_FACESET == aParent->GetNodeType() ) else if( nullptr != aParent && S3D::SGTYPE_FACESET == aParent->GetNodeType() )
{ {
@ -253,7 +255,7 @@ bool SGNORMALS::WriteCache( std::ostream& aFile, SGNODE* parentNode )
if( !aFile.good() ) if( !aFile.good() )
{ {
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [INFO] bad stream", wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] bad stream" ),
__FILE__, __FUNCTION__, __LINE__ ); __FILE__, __FUNCTION__, __LINE__ );
return false; return false;

View File

@ -49,7 +49,7 @@ SGSHAPE::SGSHAPE( SGNODE* aParent ) : SGNODE( aParent )
{ {
m_Parent = nullptr; m_Parent = nullptr;
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] inappropriate parent to SGSHAPE (type %d)", wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [BUG] inappropriate parent to SGSHAPE (type %d)" ),
__FILE__, __FUNCTION__, __LINE__, aParent->GetNodeType() ); __FILE__, __FUNCTION__, __LINE__, aParent->GetNodeType() );
} }
else if( nullptr != aParent && S3D::SGTYPE_TRANSFORM == aParent->GetNodeType() ) else if( nullptr != aParent && S3D::SGTYPE_TRANSFORM == aParent->GetNodeType() )
@ -195,7 +195,7 @@ void SGSHAPE::unlinkNode( const SGNODE* aNode, bool isChild )
} }
} }
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] unlinkNode() did not find its target", wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [BUG] unlinkNode() did not find its target" ),
__FILE__, __FUNCTION__, __LINE__ ); __FILE__, __FUNCTION__, __LINE__ );
} }
@ -222,7 +222,8 @@ bool SGSHAPE::addNode( SGNODE* aNode, bool isChild )
{ {
if( aNode != m_Appearance && aNode != m_RAppearance ) if( aNode != m_Appearance && aNode != m_RAppearance )
{ {
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] assigning multiple Appearance nodes", wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [BUG] assigning multiple Appearance "
"nodes" ),
__FILE__, __FUNCTION__, __LINE__ ); __FILE__, __FUNCTION__, __LINE__ );
return false; return false;
@ -251,7 +252,7 @@ bool SGSHAPE::addNode( SGNODE* aNode, bool isChild )
{ {
if( aNode != m_FaceSet && aNode != m_RFaceSet ) if( aNode != m_FaceSet && aNode != m_RFaceSet )
{ {
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] assigning multiple FaceSet nodes", wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [BUG] assigning multiple FaceSet nodes" ),
__FILE__, __FUNCTION__, __LINE__ ); __FILE__, __FUNCTION__, __LINE__ );
return false; return false;
@ -274,7 +275,8 @@ bool SGSHAPE::addNode( SGNODE* aNode, bool isChild )
return true; return true;
} }
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] object %s is not a valid type for this object (%d)", wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [BUG] object %s is not a valid type for this "
"object (%d)" ),
__FILE__, __FUNCTION__, __LINE__, aNode->GetName(), aNode->GetNodeType() ); __FILE__, __FUNCTION__, __LINE__, aNode->GetName(), aNode->GetNodeType() );
return false; return false;
@ -378,7 +380,8 @@ bool SGSHAPE::WriteCache( std::ostream& aFile, SGNODE* parentNode )
if( !aFile.good() ) if( !aFile.good() )
{ {
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] bad stream", __FILE__, __FUNCTION__, __LINE__ ); wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [BUG] bad stream" ),
__FILE__, __FUNCTION__, __LINE__ );
return false; return false;
} }
@ -454,9 +457,10 @@ bool SGSHAPE::ReadCache( std::istream& aFile, SGNODE* parentNode )
if( ( items[0] && items[1] ) || ( items[2] && items[3] ) ) if( ( items[0] && items[1] ) || ( items[2] && items[3] ) )
{ {
wxLogTrace( MASK_3D_SG, wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data; multiple item definitions "
"%s:%s:%d * [INFO] corrupt data; multiple item definitions at position %ul", "at position %ul" ),
__FILE__, __FUNCTION__, __LINE__, static_cast<unsigned long>( aFile.tellg() ) ); __FILE__, __FUNCTION__, __LINE__,
static_cast<unsigned long>( aFile.tellg() ) );
return false; return false;
} }
@ -467,8 +471,8 @@ bool SGSHAPE::ReadCache( std::istream& aFile, SGNODE* parentNode )
{ {
if( S3D::SGTYPE_APPEARANCE != S3D::ReadTag( aFile, name ) ) if( S3D::SGTYPE_APPEARANCE != S3D::ReadTag( aFile, name ) )
{ {
wxLogTrace( MASK_3D_SG, wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data; bad child appearance "
"%s:%s:%d * [INFO] corrupt data; bad child appearance tag at position %ul", "tag at position %ul" ),
__FILE__, __FUNCTION__, __LINE__, __FILE__, __FUNCTION__, __LINE__,
static_cast<unsigned long>( aFile.tellg() ) ); static_cast<unsigned long>( aFile.tellg() ) );
@ -480,7 +484,8 @@ bool SGSHAPE::ReadCache( std::istream& aFile, SGNODE* parentNode )
if( !m_Appearance->ReadCache( aFile, this ) ) if( !m_Appearance->ReadCache( aFile, this ) )
{ {
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [INFO] corrupt data while reading appearance '%s'", wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data while reading appearance "
"'%s'" ),
__FILE__, __FUNCTION__, __LINE__, name ); __FILE__, __FUNCTION__, __LINE__, name );
return false; return false;
@ -491,8 +496,8 @@ bool SGSHAPE::ReadCache( std::istream& aFile, SGNODE* parentNode )
{ {
if( S3D::SGTYPE_APPEARANCE != S3D::ReadTag( aFile, name ) ) if( S3D::SGTYPE_APPEARANCE != S3D::ReadTag( aFile, name ) )
{ {
wxLogTrace( MASK_3D_SG, wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data; bad ref appearance tag "
"%s:%s:%d * [INFO] corrupt data; bad ref appearance tag at position %ul", "at position %ul" ),
__FILE__, __FUNCTION__, __LINE__, __FILE__, __FUNCTION__, __LINE__,
static_cast<unsigned long>( aFile.tellg() ) ); static_cast<unsigned long>( aFile.tellg() ) );
@ -503,18 +508,20 @@ bool SGSHAPE::ReadCache( std::istream& aFile, SGNODE* parentNode )
if( !np ) if( !np )
{ {
wxLogTrace( MASK_3D_SG, wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data: cannot find ref "
"%s:%s:%d * [INFO] corrupt data: cannot find ref appearance '%s'", "appearance '%s'" ),
__FILE__, __FUNCTION__, __LINE__, name ); __FILE__, __FUNCTION__, __LINE__,
name );
return false; return false;
} }
if( S3D::SGTYPE_APPEARANCE != np->GetNodeType() ) if( S3D::SGTYPE_APPEARANCE != np->GetNodeType() )
{ {
wxLogTrace( MASK_3D_SG, wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data: type is not "
"%s:%s:%d * [INFO] corrupt data: type is not SGAPPEARANCE '%s'", "SGAPPEARANCE '%s'" ),
__FILE__, __FUNCTION__, __LINE__, name ); __FILE__, __FUNCTION__, __LINE__,
name );
return false; return false;
} }
@ -527,8 +534,8 @@ bool SGSHAPE::ReadCache( std::istream& aFile, SGNODE* parentNode )
{ {
if( S3D::SGTYPE_FACESET != S3D::ReadTag( aFile, name ) ) if( S3D::SGTYPE_FACESET != S3D::ReadTag( aFile, name ) )
{ {
wxLogTrace( MASK_3D_SG, wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data; bad child face set tag "
"%s:%s:%d * [INFO] corrupt data; bad child face set tag at position %ul", "at position %ul" ),
__FILE__, __FUNCTION__, __LINE__, __FILE__, __FUNCTION__, __LINE__,
static_cast<unsigned long>( aFile.tellg() ) ); static_cast<unsigned long>( aFile.tellg() ) );
@ -540,8 +547,8 @@ bool SGSHAPE::ReadCache( std::istream& aFile, SGNODE* parentNode )
if( !m_FaceSet->ReadCache( aFile, this ) ) if( !m_FaceSet->ReadCache( aFile, this ) )
{ {
wxLogTrace( MASK_3D_SG, wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data while reading face set "
"%s:%s:%d * [INFO] corrupt data while reading face set '%s'", "'%s'" ),
__FILE__, __FUNCTION__, __LINE__, name ); __FILE__, __FUNCTION__, __LINE__, name );
return false; return false;
@ -552,8 +559,8 @@ bool SGSHAPE::ReadCache( std::istream& aFile, SGNODE* parentNode )
{ {
if( S3D::SGTYPE_FACESET != S3D::ReadTag( aFile, name ) ) if( S3D::SGTYPE_FACESET != S3D::ReadTag( aFile, name ) )
{ {
wxLogTrace( MASK_3D_SG, wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data; bad ref face set tag at "
"%s:%s:%d * [INFO] corrupt data; bad ref face set tag at position %ul", "position %ul" ),
__FILE__, __FUNCTION__, __LINE__, __FILE__, __FUNCTION__, __LINE__,
static_cast<unsigned long>( aFile.tellg() ) ); static_cast<unsigned long>( aFile.tellg() ) );
@ -564,18 +571,20 @@ bool SGSHAPE::ReadCache( std::istream& aFile, SGNODE* parentNode )
if( !np ) if( !np )
{ {
wxLogTrace( MASK_3D_SG, wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data: cannot find ref face "
"%s:%s:%d * [INFO] corrupt data: cannot find ref face set '%s'", "set '%s'" ),
__FILE__, __FUNCTION__, __LINE__, name ); __FILE__, __FUNCTION__, __LINE__,
name );
return false; return false;
} }
if( S3D::SGTYPE_FACESET != np->GetNodeType() ) if( S3D::SGTYPE_FACESET != np->GetNodeType() )
{ {
wxLogTrace( MASK_3D_SG, wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data: type is not SGFACESET "
"%s:%s:%d * [INFO] corrupt data: type is not SGFACESET '%s'", "'%s'" ),
__FILE__, __FUNCTION__, __LINE__, name ); __FILE__, __FUNCTION__, __LINE__,
name );
return false; return false;
} }
@ -612,7 +621,7 @@ bool SGSHAPE::Prepare( const glm::dmat4* aTransform, S3D::MATLIST& materials,
if( !pf->validate() ) if( !pf->validate() )
{ {
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [INFO] bad model; inconsistent data", wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] bad model; inconsistent data" ),
__FILE__, __FUNCTION__, __LINE__ ); __FILE__, __FUNCTION__, __LINE__ );
return true; return true;
@ -665,8 +674,8 @@ bool SGSHAPE::Prepare( const glm::dmat4* aTransform, S3D::MATLIST& materials,
if( nColors < nCoords ) if( nColors < nCoords )
{ {
wxLogTrace( MASK_3D_SG, wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] bad model; not enough colors per "
"%s:%s:%d * [INFO] bad model; not enough colors per vertex (%ul vs %ul)", "vertex (%ul vs %ul)" ),
__FILE__, __FUNCTION__, __LINE__, static_cast<unsigned long>( nColors ), __FILE__, __FUNCTION__, __LINE__, static_cast<unsigned long>( nColors ),
static_cast<unsigned long>( nCoords ) ); static_cast<unsigned long>( nCoords ) );
@ -697,7 +706,7 @@ bool SGSHAPE::Prepare( const glm::dmat4* aTransform, S3D::MATLIST& materials,
if( vertices.size() < 3 ) if( vertices.size() < 3 )
{ {
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [INFO] bad model; not enough vertices", wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] bad model; not enough vertices" ),
__FILE__, __FUNCTION__, __LINE__ ); __FILE__, __FUNCTION__, __LINE__ );
return true; return true;

View File

@ -139,49 +139,49 @@ BOARD_ADAPTER::BOARD_ADAPTER() :
list.push_back( CUSTOM_COLOR_ITEM( r/255.0, g/255.0, b/255.0, a, name ) ) list.push_back( CUSTOM_COLOR_ITEM( r/255.0, g/255.0, b/255.0, a, name ) )
ADD_COLOR( g_SilkscreenColors, 245, 245, 245, 1.0, NotSpecifiedPrm() ); // White ADD_COLOR( g_SilkscreenColors, 245, 245, 245, 1.0, NotSpecifiedPrm() ); // White
ADD_COLOR( g_SilkscreenColors, 20, 51, 36, 1.0, "Green" ); ADD_COLOR( g_SilkscreenColors, 20, 51, 36, 1.0, wxT( "Green" ) );
ADD_COLOR( g_SilkscreenColors, 181, 19, 21, 1.0, "Red" ); ADD_COLOR( g_SilkscreenColors, 181, 19, 21, 1.0, wxT( "Red" ) );
ADD_COLOR( g_SilkscreenColors, 2, 59, 162, 1.0, "Blue" ); ADD_COLOR( g_SilkscreenColors, 2, 59, 162, 1.0, wxT( "Blue" ) );
ADD_COLOR( g_SilkscreenColors, 11, 11, 11, 1.0, "Black" ); ADD_COLOR( g_SilkscreenColors, 11, 11, 11, 1.0, wxT( "Black" ) );
ADD_COLOR( g_SilkscreenColors, 245, 245, 245, 1.0, "White" ); ADD_COLOR( g_SilkscreenColors, 245, 245, 245, 1.0, wxT( "White" ) );
ADD_COLOR( g_SilkscreenColors, 32, 2, 53, 1.0, "Purple" ); ADD_COLOR( g_SilkscreenColors, 32, 2, 53, 1.0, wxT( "Purple" ) );
ADD_COLOR( g_SilkscreenColors, 194, 195, 0, 1.0, "Yellow" ); ADD_COLOR( g_SilkscreenColors, 194, 195, 0, 1.0, wxT( "Yellow" ) );
ADD_COLOR( g_MaskColors, 20, 51, 36, 0.83, NotSpecifiedPrm() ); // Green ADD_COLOR( g_MaskColors, 20, 51, 36, 0.83, NotSpecifiedPrm() ); // Green
ADD_COLOR( g_MaskColors, 20, 51, 36, 0.83, "Green" ); ADD_COLOR( g_MaskColors, 20, 51, 36, 0.83, wxT( "Green" ) );
ADD_COLOR( g_MaskColors, 91, 168, 12, 0.83, "Light Green" ); ADD_COLOR( g_MaskColors, 91, 168, 12, 0.83, wxT( "Light Green" ) );
ADD_COLOR( g_MaskColors, 13, 104, 11, 0.83, "Saturated Green" ); ADD_COLOR( g_MaskColors, 13, 104, 11, 0.83, wxT( "Saturated Green" ) );
ADD_COLOR( g_MaskColors, 181, 19, 21, 0.83, "Red" ); ADD_COLOR( g_MaskColors, 181, 19, 21, 0.83, wxT( "Red" ) );
ADD_COLOR( g_MaskColors, 210, 40, 14, 0.83, "Light Red" ); ADD_COLOR( g_MaskColors, 210, 40, 14, 0.83, wxT( "Light Red" ) );
ADD_COLOR( g_MaskColors, 239, 53, 41, 0.83, "Red/Orange" ); ADD_COLOR( g_MaskColors, 239, 53, 41, 0.83, wxT( "Red/Orange" ) );
ADD_COLOR( g_MaskColors, 2, 59, 162, 0.83, "Blue" ); ADD_COLOR( g_MaskColors, 2, 59, 162, 0.83, wxT( "Blue" ) );
ADD_COLOR( g_MaskColors, 54, 79, 116, 0.83, "Light Blue 1" ); ADD_COLOR( g_MaskColors, 54, 79, 116, 0.83, wxT( "Light Blue 1" ) );
ADD_COLOR( g_MaskColors, 61, 85, 130, 0.83, "Light Blue 2" ); ADD_COLOR( g_MaskColors, 61, 85, 130, 0.83, wxT( "Light Blue 2" ) );
ADD_COLOR( g_MaskColors, 21, 70, 80, 0.83, "Green/Blue" ); ADD_COLOR( g_MaskColors, 21, 70, 80, 0.83, wxT( "Green/Blue" ) );
ADD_COLOR( g_MaskColors, 11, 11, 11, 0.83, "Black" ); ADD_COLOR( g_MaskColors, 11, 11, 11, 0.83, wxT( "Black" ) );
ADD_COLOR( g_MaskColors, 245, 245, 245, 0.83, "White" ); ADD_COLOR( g_MaskColors, 245, 245, 245, 0.83, wxT( "White" ) );
ADD_COLOR( g_MaskColors, 32, 2, 53, 0.83, "Purple" ); ADD_COLOR( g_MaskColors, 32, 2, 53, 0.83, wxT( "Purple" ) );
ADD_COLOR( g_MaskColors, 119, 31, 91, 0.83, "Light Purple" ); ADD_COLOR( g_MaskColors, 119, 31, 91, 0.83, wxT( "Light Purple" ) );
ADD_COLOR( g_MaskColors, 194, 195, 0, 0.83, "Yellow" ); ADD_COLOR( g_MaskColors, 194, 195, 0, 0.83, wxT( "Yellow" ) );
ADD_COLOR( g_PasteColors, 128, 128, 128, 1.0, "Grey" ); ADD_COLOR( g_PasteColors, 128, 128, 128, 1.0, wxT( "Grey" ) );
ADD_COLOR( g_PasteColors, 90, 90, 90, 1.0, "Dark Grey" ); ADD_COLOR( g_PasteColors, 90, 90, 90, 1.0, wxT( "Dark Grey" ) );
ADD_COLOR( g_PasteColors, 213, 213, 213, 1.0, "Silver" ); ADD_COLOR( g_PasteColors, 213, 213, 213, 1.0, wxT( "Silver" ) );
ADD_COLOR( g_FinishColors, 184, 115, 50, 1.0, "Copper" ); ADD_COLOR( g_FinishColors, 184, 115, 50, 1.0, wxT( "Copper" ) );
ADD_COLOR( g_FinishColors, 178, 156, 0, 1.0, "Gold" ); ADD_COLOR( g_FinishColors, 178, 156, 0, 1.0, wxT( "Gold" ) );
ADD_COLOR( g_FinishColors, 213, 213, 213, 1.0, "Silver" ); ADD_COLOR( g_FinishColors, 213, 213, 213, 1.0, wxT( "Silver" ) );
ADD_COLOR( g_FinishColors, 160, 160, 160, 1.0, "Tin" ); ADD_COLOR( g_FinishColors, 160, 160, 160, 1.0, wxT( "Tin" ) );
ADD_COLOR( g_BoardColors, 51, 43, 22, 0.83, "FR4 natural, dark" ); ADD_COLOR( g_BoardColors, 51, 43, 22, 0.83, wxT( "FR4 natural, dark" ) );
ADD_COLOR( g_BoardColors, 109, 116, 75, 0.83, "FR4 natural" ); ADD_COLOR( g_BoardColors, 109, 116, 75, 0.83, wxT( "FR4 natural" ) );
ADD_COLOR( g_BoardColors, 252, 252, 250, 0.90, "PTFE natural" ); ADD_COLOR( g_BoardColors, 252, 252, 250, 0.90, wxT( "PTFE natural" ) );
ADD_COLOR( g_BoardColors, 205, 130, 0, 0.68, "Polyimide" ); ADD_COLOR( g_BoardColors, 205, 130, 0, 0.68, wxT( "Polyimide" ) );
ADD_COLOR( g_BoardColors, 92, 17, 6, 0.90, "Phenolic natural" ); ADD_COLOR( g_BoardColors, 92, 17, 6, 0.90, wxT( "Phenolic natural" ) );
ADD_COLOR( g_BoardColors, 146, 99, 47, 0.83, "Brown 1" ); ADD_COLOR( g_BoardColors, 146, 99, 47, 0.83, wxT( "Brown 1" ) );
ADD_COLOR( g_BoardColors, 160, 123, 54, 0.83, "Brown 2" ); ADD_COLOR( g_BoardColors, 160, 123, 54, 0.83, wxT( "Brown 2" ) );
ADD_COLOR( g_BoardColors, 146, 99, 47, 0.83, "Brown 3" ); ADD_COLOR( g_BoardColors, 146, 99, 47, 0.83, wxT( "Brown 3" ) );
ADD_COLOR( g_BoardColors, 213, 213, 213, 1.0, "Aluminum" ); ADD_COLOR( g_BoardColors, 213, 213, 213, 1.0, wxT( "Aluminum" ) );
g_DefaultBackgroundTop = COLOR4D( 0.80, 0.80, 0.90, 1.0 ); g_DefaultBackgroundTop = COLOR4D( 0.80, 0.80, 0.90, 1.0 );
g_DefaultBackgroundBot = COLOR4D( 0.40, 0.40, 0.50, 1.0 ); g_DefaultBackgroundBot = COLOR4D( 0.40, 0.40, 0.50, 1.0 );
@ -527,7 +527,7 @@ void BOARD_ADAPTER::InitSettings( REPORTER* aStatusReporter, REPORTER* aWarningR
auto findColor = auto findColor =
[]( const wxString& aColorName, const CUSTOM_COLORS_LIST& aColorSet ) []( const wxString& aColorName, const CUSTOM_COLORS_LIST& aColorSet )
{ {
if( aColorName.StartsWith( "#" ) ) if( aColorName.StartsWith( wxT( "#" ) ) )
{ {
return KIGFX::COLOR4D( aColorName ); return KIGFX::COLOR4D( aColorName );
} }
@ -596,25 +596,25 @@ void BOARD_ADAPTER::InitSettings( REPORTER* aStatusReporter, REPORTER* aWarningR
const wxString& finishName = stackup.m_FinishType; const wxString& finishName = stackup.m_FinishType;
if( finishName.EndsWith( "OSP" ) ) if( finishName.EndsWith( wxT( "OSP" ) ) )
{ {
m_CopperColor = to_SFVEC4F( findColor( "Copper", g_FinishColors ) ); m_CopperColor = to_SFVEC4F( findColor( wxT( "Copper" ), g_FinishColors ) );
} }
else if( finishName.EndsWith( "IG" ) else if( finishName.EndsWith( wxT( "IG" ) )
|| finishName.EndsWith( "gold" ) ) || finishName.EndsWith( wxT( "gold" ) ) )
{ {
m_CopperColor = to_SFVEC4F( findColor( "Gold", g_FinishColors ) ); m_CopperColor = to_SFVEC4F( findColor( wxT( "Gold" ), g_FinishColors ) );
} }
else if( finishName.StartsWith( "HAL" ) else if( finishName.StartsWith( wxT( "HAL" ) )
|| finishName.StartsWith( "HASL" ) || finishName.StartsWith( wxT( "HASL" ) )
|| finishName.EndsWith( "tin" ) || finishName.EndsWith( wxT( "tin" ) )
|| finishName.EndsWith( "nickel" ) ) || finishName.EndsWith( wxT( "nickel" ) ) )
{ {
m_CopperColor = to_SFVEC4F( findColor( "Tin", g_FinishColors ) ); m_CopperColor = to_SFVEC4F( findColor( wxT( "Tin" ), g_FinishColors ) );
} }
else if( finishName.EndsWith( "silver" ) ) else if( finishName.EndsWith( wxT( "silver" ) ) )
{ {
m_CopperColor = to_SFVEC4F( findColor( "Silver", g_FinishColors ) ); m_CopperColor = to_SFVEC4F( findColor( wxT( "Silver" ), g_FinishColors ) );
} }
else else
{ {

View File

@ -633,7 +633,7 @@ void BOARD_ADAPTER::addShape( const PCB_SHAPE* aShape, CONTAINER_2D_BASE* aConta
break; break;
default: default:
wxFAIL_MSG( "BOARD_ADAPTER::addShapeWithClearance no implementation for " wxFAIL_MSG( wxT( "BOARD_ADAPTER::addShapeWithClearance no implementation for " )
+ aShape->SHAPE_T_asString() ); + aShape->SHAPE_T_asString() );
break; break;
} }

View File

@ -114,7 +114,7 @@ EDA_3D_CANVAS::EDA_3D_CANVAS( wxWindow* aParent, const int* aAttribList,
m_accelerator3DShapes( nullptr ), m_accelerator3DShapes( nullptr ),
m_currentRollOverItem( nullptr ) m_currentRollOverItem( nullptr )
{ {
wxLogTrace( m_logTrace, "EDA_3D_CANVAS::EDA_3D_CANVAS" ); wxLogTrace( m_logTrace, wxT( "EDA_3D_CANVAS::EDA_3D_CANVAS" ) );
m_editing_timeout_timer.SetOwner( this ); m_editing_timeout_timer.SetOwner( this );
Connect( m_editing_timeout_timer.GetId(), wxEVT_TIMER, Connect( m_editing_timeout_timer.GetId(), wxEVT_TIMER,
@ -167,7 +167,7 @@ EDA_3D_CANVAS::EDA_3D_CANVAS( wxWindow* aParent, const int* aAttribList,
EDA_3D_CANVAS::~EDA_3D_CANVAS() EDA_3D_CANVAS::~EDA_3D_CANVAS()
{ {
wxLogTrace( m_logTrace, "EDA_3D_CANVAS::~EDA_3D_CANVAS" ); wxLogTrace( m_logTrace, wxT( "EDA_3D_CANVAS::~EDA_3D_CANVAS" ) );
delete m_accelerator3DShapes; delete m_accelerator3DShapes;
m_accelerator3DShapes = nullptr; m_accelerator3DShapes = nullptr;
@ -214,7 +214,7 @@ void EDA_3D_CANVAS::OnResize( wxSizeEvent& event )
bool EDA_3D_CANVAS::initializeOpenGL() bool EDA_3D_CANVAS::initializeOpenGL()
{ {
wxLogTrace( m_logTrace, "EDA_3D_CANVAS::initializeOpenGL" ); wxLogTrace( m_logTrace, wxT( "EDA_3D_CANVAS::initializeOpenGL" ) );
const GLenum err = glewInit(); const GLenum err = glewInit();
@ -228,13 +228,13 @@ bool EDA_3D_CANVAS::initializeOpenGL()
} }
else else
{ {
wxLogTrace( m_logTrace, "EDA_3D_CANVAS::initializeOpenGL Using GLEW version %s", wxLogTrace( m_logTrace, wxT( "EDA_3D_CANVAS::initializeOpenGL Using GLEW version %s" ),
FROM_UTF8( (char*) glewGetString( GLEW_VERSION ) ) ); FROM_UTF8( (char*) glewGetString( GLEW_VERSION ) ) );
} }
wxString version = FROM_UTF8( (char *) glGetString( GL_VERSION ) ); wxString version = FROM_UTF8( (char *) glGetString( GL_VERSION ) );
wxLogTrace( m_logTrace, "EDA_3D_CANVAS::%s OpenGL version string %s.", wxLogTrace( m_logTrace, wxT( "EDA_3D_CANVAS::%s OpenGL version string %s." ),
__WXFUNCTION__, version ); __WXFUNCTION__, version );
// Extract OpenGL version from string. This method is used because prior to OpenGL 2, // Extract OpenGL version from string. This method is used because prior to OpenGL 2,
@ -250,7 +250,7 @@ bool EDA_3D_CANVAS::initializeOpenGL()
tmp = tokenizer.GetNextToken(); tmp = tokenizer.GetNextToken();
tokenizer.SetString( tmp, wxString( "." ) ); tokenizer.SetString( tmp, wxString( wxT( "." ) ) );
if( tokenizer.HasMoreTokens() ) if( tokenizer.HasMoreTokens() )
tokenizer.GetNextToken().ToLong( &major ); tokenizer.GetNextToken().ToLong( &major );
@ -260,7 +260,7 @@ bool EDA_3D_CANVAS::initializeOpenGL()
if( major < 2 || ( ( major == 2 ) && ( minor < 1 ) ) ) if( major < 2 || ( ( major == 2 ) && ( minor < 1 ) ) )
{ {
wxLogTrace( m_logTrace, "EDA_3D_CANVAS::%s OpenGL ray tracing not supported.", wxLogTrace( m_logTrace, wxT( "EDA_3D_CANVAS::%s OpenGL ray tracing not supported." ),
__WXFUNCTION__ ); __WXFUNCTION__ );
if( GetParent() ) if( GetParent() )
@ -274,7 +274,8 @@ bool EDA_3D_CANVAS::initializeOpenGL()
if( ( major == 1 ) && ( minor < 5 ) ) if( ( major == 1 ) && ( minor < 5 ) )
{ {
wxLogTrace( m_logTrace, "EDA_3D_CANVAS::%s OpenGL not supported.", __WXFUNCTION__ ); wxLogTrace( m_logTrace, wxT( "EDA_3D_CANVAS::%s OpenGL not supported." ),
__WXFUNCTION__ );
m_is_opengl_version_supported = false; m_is_opengl_version_supported = false;
} }
@ -327,10 +328,10 @@ void EDA_3D_CANVAS::DisplayStatus()
{ {
wxString msg; wxString msg;
msg.Printf( "dx %3.2f", m_camera.GetCameraPos().x ); msg.Printf( wxT( "dx %3.2f" ), m_camera.GetCameraPos().x );
m_parentStatusBar->SetStatusText( msg, static_cast<int>( EDA_3D_VIEWER_STATUSBAR::X_POS ) ); m_parentStatusBar->SetStatusText( msg, static_cast<int>( EDA_3D_VIEWER_STATUSBAR::X_POS ) );
msg.Printf( "dy %3.2f", m_camera.GetCameraPos().y ); msg.Printf( wxT( "dy %3.2f" ), m_camera.GetCameraPos().y );
m_parentStatusBar->SetStatusText( msg, static_cast<int>( EDA_3D_VIEWER_STATUSBAR::Y_POS ) ); m_parentStatusBar->SetStatusText( msg, static_cast<int>( EDA_3D_VIEWER_STATUSBAR::Y_POS ) );
} }
} }
@ -351,7 +352,7 @@ void EDA_3D_CANVAS::DoRePaint()
// SwapBuffer requires the window to be shown before calling // SwapBuffer requires the window to be shown before calling
if( !IsShownOnScreen() ) if( !IsShownOnScreen() )
{ {
wxLogTrace( m_logTrace, "EDA_3D_CANVAS::DoRePaint !IsShown" ); wxLogTrace( m_logTrace, wxT( "EDA_3D_CANVAS::DoRePaint !IsShown" ) );
m_is_currently_painting.clear(); m_is_currently_painting.clear();
return; return;
} }
@ -577,7 +578,7 @@ void EDA_3D_CANVAS::OnEvent( wxEvent& aEvent )
void EDA_3D_CANVAS::OnEraseBackground( wxEraseEvent& event ) void EDA_3D_CANVAS::OnEraseBackground( wxEraseEvent& event )
{ {
wxLogTrace( m_logTrace, "EDA_3D_CANVAS::OnEraseBackground" ); wxLogTrace( m_logTrace, wxT( "EDA_3D_CANVAS::OnEraseBackground" ) );
// Do nothing, to avoid flashing. // Do nothing, to avoid flashing.
} }
@ -586,7 +587,7 @@ void EDA_3D_CANVAS::OnMouseWheel( wxMouseEvent& event )
{ {
bool mouseActivity = false; bool mouseActivity = false;
wxLogTrace( m_logTrace, "EDA_3D_CANVAS::OnMouseWheel" ); wxLogTrace( m_logTrace, wxT( "EDA_3D_CANVAS::OnMouseWheel" ) );
if( m_camera_is_moving ) if( m_camera_is_moving )
return; return;

View File

@ -41,7 +41,7 @@ static void dbg_save_rgb_buffer( const wxString& aFileName, unsigned char *aRGBp
wxImage image( aXSize, aYSize ); wxImage image( aXSize, aYSize );
image.SetData( aRGBpixelBuffer ); image.SetData( aRGBpixelBuffer );
image = image.Mirror( false ); image = image.Mirror( false );
image.SaveFile( aFileName + ".png", wxBITMAP_TYPE_PNG ); image.SaveFile( aFileName + wxT( ".png" ), wxBITMAP_TYPE_PNG );
image.Destroy(); image.Destroy();
} }

View File

@ -276,7 +276,7 @@ OPENGL_RENDER_LIST* RENDER_3D_OPENGL::generateHoles( const LIST_OBJECT2D& aListH
break; break;
default: default:
wxFAIL_MSG( "RENDER_3D_OPENGL::generateHoles: Object type is not implemented" ); wxFAIL_MSG( wxT( "RENDER_3D_OPENGL::generateHoles: Object type not implemented" ) );
break; break;
} }
} }
@ -358,7 +358,7 @@ OPENGL_RENDER_LIST* RENDER_3D_OPENGL::generateLayerList( const BVH_CONTAINER_2D*
break; break;
default: default:
wxFAIL_MSG( "RENDER_3D_OPENGL: Object type is not implemented" ); wxFAIL_MSG( wxT( "RENDER_3D_OPENGL: Object type is not implemented" ) );
break; break;
} }
} }

View File

@ -192,9 +192,9 @@ const float& POST_SHADER::GetShadowFactorAt( const SFVEC2I& aPos ) const
void POST_SHADER::DebugBuffersOutputAsImages() const void POST_SHADER::DebugBuffersOutputAsImages() const
{ {
DBG_SaveBuffer( "m_shadow_att_factor", m_shadow_att_factor, m_size.x, m_size.y ); DBG_SaveBuffer( wxT( "m_shadow_att_factor" ), m_shadow_att_factor, m_size.x, m_size.y );
DBG_SaveBuffer( "m_color", m_color, m_size.x, m_size.y ); DBG_SaveBuffer( wxT( "m_color" ), m_color, m_size.x, m_size.y );
DBG_SaveNormalsBuffer( "m_normals", m_normals, m_size.x, m_size.y ); DBG_SaveNormalsBuffer( wxT( "m_normals" ), m_normals, m_size.x, m_size.y );
// Normalize depth // Normalize depth
float *normalizedDepth = (float*) malloc( m_size.x * m_size.y * sizeof( float ) ); float *normalizedDepth = (float*) malloc( m_size.x * m_size.y * sizeof( float ) );
@ -210,7 +210,7 @@ void POST_SHADER::DebugBuffersOutputAsImages() const
} }
} }
DBG_SaveBuffer( "m_depthNormalized", normalizedDepth, m_size.x, m_size.y ); DBG_SaveBuffer( wxT( "m_depthNormalized" ), normalizedDepth, m_size.x, m_size.y );
free( normalizedDepth ); free( normalizedDepth );
} }

View File

@ -327,7 +327,7 @@ void RENDER_3D_RAYTRACE::render( GLubyte* ptrPBO, REPORTER* aStatusReporter )
break; break;
default: default:
wxASSERT_MSG( false, "Invalid state on m_renderState"); wxASSERT_MSG( false, wxT( "Invalid state on m_renderState" ) );
restartRenderState(); restartRenderState();
break; break;
} }

View File

@ -37,7 +37,7 @@
void EDA_3D_VIEWER_FRAME::CreateMenuBar() void EDA_3D_VIEWER_FRAME::CreateMenuBar()
{ {
wxLogTrace( m_logTrace, "EDA_3D_VIEWER_FRAME::CreateMenuBar" ); wxLogTrace( m_logTrace, wxT( "EDA_3D_VIEWER_FRAME::CreateMenuBar" ) );
COMMON_CONTROL* tool = m_toolManager->GetTool<COMMON_CONTROL>(); COMMON_CONTROL* tool = m_toolManager->GetTool<COMMON_CONTROL>();
WX_MENUBAR* menuBar = new WX_MENUBAR(); WX_MENUBAR* menuBar = new WX_MENUBAR();
@ -48,12 +48,12 @@ void EDA_3D_VIEWER_FRAME::CreateMenuBar()
ACTION_MENU* fileMenu = new ACTION_MENU( false, tool ); ACTION_MENU* fileMenu = new ACTION_MENU( false, tool );
fileMenu->Add( _( "Export Current View as PNG..." ), fileMenu->Add( _( "Export Current View as PNG..." ),
"", wxEmptyString,
ID_MENU_SCREENCOPY_PNG, ID_MENU_SCREENCOPY_PNG,
BITMAPS::export_png ); BITMAPS::export_png );
fileMenu->Add( _( "Export Current View as JPEG..." ), fileMenu->Add( _( "Export Current View as JPEG..." ),
"", wxEmptyString,
ID_MENU_SCREENCOPY_JPEG, ID_MENU_SCREENCOPY_JPEG,
BITMAPS::export_file ); BITMAPS::export_file );
@ -67,7 +67,7 @@ void EDA_3D_VIEWER_FRAME::CreateMenuBar()
ACTION_MENU* editMenu = new ACTION_MENU( false, tool ); ACTION_MENU* editMenu = new ACTION_MENU( false, tool );
editMenu->Add( _( "Copy 3D Image" ), editMenu->Add( _( "Copy 3D Image" ),
"", wxEmptyString,
ID_TOOL_SCREENCOPY_TOCLIBBOARD, ID_TOOL_SCREENCOPY_TOCLIBBOARD,
BITMAPS::copy ); BITMAPS::copy );
@ -109,7 +109,7 @@ void EDA_3D_VIEWER_FRAME::CreateMenuBar()
BITMAPS::tools, BITMAPS::tools,
ACTION_MENU::CHECK ); ACTION_MENU::CHECK );
prefsMenu->Add( _( "Preferences..." ) + "\tCtrl+,", prefsMenu->Add( _( "Preferences..." ) + wxT( "\tCtrl+," ),
_( "Show preferences for all open tools" ), _( "Show preferences for all open tools" ),
wxID_PREFERENCES, wxID_PREFERENCES,
BITMAPS::preference ); BITMAPS::preference );

View File

@ -35,7 +35,7 @@
void EDA_3D_VIEWER_FRAME::ReCreateMainToolbar() void EDA_3D_VIEWER_FRAME::ReCreateMainToolbar()
{ {
wxLogTrace( m_logTrace, "EDA_3D_VIEWER_FRAME::ReCreateMainToolbar" ); wxLogTrace( m_logTrace, wxT( "EDA_3D_VIEWER_FRAME::ReCreateMainToolbar" ) );
wxWindowUpdateLocker dummy( this ); wxWindowUpdateLocker dummy( this );

View File

@ -87,7 +87,7 @@ EDA_3D_VIEWER_FRAME::EDA_3D_VIEWER_FRAME( KIWAY* aKiway, PCB_BASE_FRAME* aParent
m_mainToolBar( nullptr ), m_canvas( nullptr ), m_currentCamera( m_trackBallCamera ), m_mainToolBar( nullptr ), m_canvas( nullptr ), m_currentCamera( m_trackBallCamera ),
m_trackBallCamera( 2 * RANGE_SCALE_3D ), m_spaceMouse( nullptr ) m_trackBallCamera( 2 * RANGE_SCALE_3D ), m_spaceMouse( nullptr )
{ {
wxLogTrace( m_logTrace, "EDA_3D_VIEWER_FRAME::EDA_3D_VIEWER_FRAME %s", aTitle ); wxLogTrace( m_logTrace, wxT( "EDA_3D_VIEWER_FRAME::EDA_3D_VIEWER_FRAME %s" ), aTitle );
m_disable_ray_tracing = false; m_disable_ray_tracing = false;
m_aboutTitle = _( "KiCad 3D Viewer" ); m_aboutTitle = _( "KiCad 3D Viewer" );
@ -298,7 +298,7 @@ void EDA_3D_VIEWER_FRAME::refreshRender()
void EDA_3D_VIEWER_FRAME::Exit3DFrame( wxCommandEvent &event ) void EDA_3D_VIEWER_FRAME::Exit3DFrame( wxCommandEvent &event )
{ {
wxLogTrace( m_logTrace, "EDA_3D_VIEWER_FRAME::Exit3DFrame" ); wxLogTrace( m_logTrace, wxT( "EDA_3D_VIEWER_FRAME::Exit3DFrame" ) );
Close( true ); Close( true );
} }
@ -306,7 +306,7 @@ void EDA_3D_VIEWER_FRAME::Exit3DFrame( wxCommandEvent &event )
void EDA_3D_VIEWER_FRAME::OnCloseWindow( wxCloseEvent &event ) void EDA_3D_VIEWER_FRAME::OnCloseWindow( wxCloseEvent &event )
{ {
wxLogTrace( m_logTrace, "EDA_3D_VIEWER_FRAME::OnCloseWindow" ); wxLogTrace( m_logTrace, wxT( "EDA_3D_VIEWER_FRAME::OnCloseWindow" ) );
if( m_canvas ) if( m_canvas )
m_canvas->Close(); m_canvas->Close();
@ -325,7 +325,8 @@ void EDA_3D_VIEWER_FRAME::Process_Special_Functions( wxCommandEvent &event )
int id = event.GetId(); int id = event.GetId();
bool isChecked = event.IsChecked(); bool isChecked = event.IsChecked();
wxLogTrace( m_logTrace, "EDA_3D_VIEWER_FRAME::Process_Special_Functions id %d isChecked %d", wxLogTrace( m_logTrace, wxT( "EDA_3D_VIEWER_FRAME::Process_Special_Functions id %d "
"isChecked %d" ),
id, id,
isChecked ); isChecked );
@ -358,7 +359,7 @@ void EDA_3D_VIEWER_FRAME::Process_Special_Functions( wxCommandEvent &event )
return; return;
default: default:
wxFAIL_MSG( "Invalid event in EDA_3D_VIEWER_FRAME::Process_Special_Functions()" ); wxFAIL_MSG( wxT( "Invalid event in EDA_3D_VIEWER_FRAME::Process_Special_Functions()" ) );
return; return;
} }
} }
@ -373,9 +374,11 @@ void EDA_3D_VIEWER_FRAME::OnRenderEngineSelection( wxCommandEvent &event )
else else
m_boardAdapter.m_Cfg->m_Render.engine = RENDER_ENGINE::OPENGL; m_boardAdapter.m_Cfg->m_Render.engine = RENDER_ENGINE::OPENGL;
wxLogTrace( m_logTrace, "EDA_3D_VIEWER_FRAME::OnRenderEngineSelection type %s ", wxLogTrace( m_logTrace, wxT( "EDA_3D_VIEWER_FRAME::OnRenderEngineSelection type %s " ),
m_boardAdapter.m_Cfg->m_Render.engine == RENDER_ENGINE::RAYTRACING ? "raytracing" m_boardAdapter.m_Cfg->m_Render.engine == RENDER_ENGINE::RAYTRACING ?
: "realtime" ); wxT( "raytracing" )
:
wxT( "realtime" ) );
if( old_engine != m_boardAdapter.m_Cfg->m_Render.engine ) if( old_engine != m_boardAdapter.m_Cfg->m_Render.engine )
RenderEngineChanged(); RenderEngineChanged();
@ -384,7 +387,8 @@ void EDA_3D_VIEWER_FRAME::OnRenderEngineSelection( wxCommandEvent &event )
void EDA_3D_VIEWER_FRAME::OnDisableRayTracing( wxCommandEvent& aEvent ) void EDA_3D_VIEWER_FRAME::OnDisableRayTracing( wxCommandEvent& aEvent )
{ {
wxLogTrace( m_logTrace, "EDA_3D_VIEWER_FRAME::%s disabling ray tracing.", __WXFUNCTION__ ); wxLogTrace( m_logTrace, wxT( "EDA_3D_VIEWER_FRAME::%s disabling ray tracing." ),
__WXFUNCTION__ );
m_disable_ray_tracing = true; m_disable_ray_tracing = true;
m_boardAdapter.m_Cfg->m_Render.engine = RENDER_ENGINE::OPENGL; m_boardAdapter.m_Cfg->m_Render.engine = RENDER_ENGINE::OPENGL;
@ -393,7 +397,7 @@ void EDA_3D_VIEWER_FRAME::OnDisableRayTracing( wxCommandEvent& aEvent )
void EDA_3D_VIEWER_FRAME::OnActivate( wxActivateEvent &aEvent ) void EDA_3D_VIEWER_FRAME::OnActivate( wxActivateEvent &aEvent )
{ {
wxLogTrace( m_logTrace, "EDA_3D_VIEWER_FRAME::OnActivate" ); wxLogTrace( m_logTrace, wxT( "EDA_3D_VIEWER_FRAME::OnActivate" ) );
if( aEvent.GetActive() && m_canvas ) if( aEvent.GetActive() && m_canvas )
{ {
@ -434,7 +438,7 @@ void EDA_3D_VIEWER_FRAME::LoadSettings( APP_SETTINGS_BASE *aCfg )
EDA_3D_VIEWER_SETTINGS* cfg = dynamic_cast<EDA_3D_VIEWER_SETTINGS*>( aCfg ); EDA_3D_VIEWER_SETTINGS* cfg = dynamic_cast<EDA_3D_VIEWER_SETTINGS*>( aCfg );
wxASSERT( cfg ); wxASSERT( cfg );
wxLogTrace( m_logTrace, "EDA_3D_VIEWER_FRAME::LoadSettings" ); wxLogTrace( m_logTrace, wxT( "EDA_3D_VIEWER_FRAME::LoadSettings" ) );
if( cfg ) if( cfg )
{ {
@ -446,8 +450,9 @@ void EDA_3D_VIEWER_FRAME::LoadSettings( APP_SETTINGS_BASE *aCfg )
#if 0 #if 0
RENDER_ENGINE engine = static_cast<RENDER_ENGINE>( cfg->m_Render.engine ); RENDER_ENGINE engine = static_cast<RENDER_ENGINE>( cfg->m_Render.engine );
wxLogTrace( m_logTrace, engine == RENDER_ENGINE::RAYTRACING ? wxLogTrace( m_logTrace, engine == RENDER_ENGINE::RAYTRACING ?
"EDA_3D_VIEWER_FRAME::LoadSettings render setting Ray Trace" : wxT( "EDA_3D_VIEWER_FRAME::LoadSettings render setting Ray Trace" )
"EDA_3D_VIEWER_FRAME::LoadSettings render setting OpenGL" ); :
wxT( "EDA_3D_VIEWER_FRAME::LoadSettings render setting OpenGL" ) );
#else #else
m_boardAdapter.m_Cfg->m_Render.engine = RENDER_ENGINE::OPENGL; m_boardAdapter.m_Cfg->m_Render.engine = RENDER_ENGINE::OPENGL;
#endif #endif
@ -467,11 +472,12 @@ void EDA_3D_VIEWER_FRAME::SaveSettings( APP_SETTINGS_BASE *aCfg )
EDA_BASE_FRAME::SaveSettings( cfg ); EDA_BASE_FRAME::SaveSettings( cfg );
wxLogTrace( m_logTrace, "EDA_3D_VIEWER_FRAME::SaveSettings" ); wxLogTrace( m_logTrace, wxT( "EDA_3D_VIEWER_FRAME::SaveSettings" ) );
wxLogTrace( m_logTrace, m_boardAdapter.m_Cfg->m_Render.engine == RENDER_ENGINE::RAYTRACING ? wxLogTrace( m_logTrace, m_boardAdapter.m_Cfg->m_Render.engine == RENDER_ENGINE::RAYTRACING ?
"EDA_3D_VIEWER_FRAME::SaveSettings render setting Ray Trace" : wxT( "EDA_3D_VIEWER_FRAME::SaveSettings render setting Ray Trace" )
"EDA_3D_VIEWER_FRAME::SaveSettings render setting OpenGL" ); :
wxT( "EDA_3D_VIEWER_FRAME::SaveSettings render setting OpenGL" ) );
if( cfg ) if( cfg )
{ {
@ -487,7 +493,7 @@ void EDA_3D_VIEWER_FRAME::SaveSettings( APP_SETTINGS_BASE *aCfg )
void EDA_3D_VIEWER_FRAME::CommonSettingsChanged( bool aEnvVarsChanged, bool aTextVarsChanged ) void EDA_3D_VIEWER_FRAME::CommonSettingsChanged( bool aEnvVarsChanged, bool aTextVarsChanged )
{ {
wxLogTrace( m_logTrace, "EDA_3D_VIEWER_FRAME::CommonSettingsChanged" ); wxLogTrace( m_logTrace, wxT( "EDA_3D_VIEWER_FRAME::CommonSettingsChanged" ) );
// Regen menu bars, etc // Regen menu bars, etc
EDA_BASE_FRAME::CommonSettingsChanged( aEnvVarsChanged, aTextVarsChanged ); EDA_BASE_FRAME::CommonSettingsChanged( aEnvVarsChanged, aTextVarsChanged );
@ -597,7 +603,7 @@ void EDA_3D_VIEWER_FRAME::takeScreenshot( wxCommandEvent& event )
void EDA_3D_VIEWER_FRAME::RenderEngineChanged() void EDA_3D_VIEWER_FRAME::RenderEngineChanged()
{ {
wxLogTrace( m_logTrace, "EDA_3D_VIEWER_FRAME::RenderEngineChanged()" ); wxLogTrace( m_logTrace, wxT( "EDA_3D_VIEWER_FRAME::RenderEngineChanged()" ) );
if( m_canvas ) if( m_canvas )
m_canvas->RenderEngineChanged(); m_canvas->RenderEngineChanged();
@ -606,7 +612,7 @@ void EDA_3D_VIEWER_FRAME::RenderEngineChanged()
void EDA_3D_VIEWER_FRAME::loadCommonSettings() void EDA_3D_VIEWER_FRAME::loadCommonSettings()
{ {
wxCHECK_RET( m_canvas, "Cannot load settings to null canvas" ); wxCHECK_RET( m_canvas, wxT( "Cannot load settings to null canvas" ) );
COMMON_SETTINGS* settings = Pgm().GetCommonSettings(); COMMON_SETTINGS* settings = Pgm().GetCommonSettings();

View File

@ -202,21 +202,18 @@ TOOL_ACTION EDA_3D_ACTIONS::materialCAD( "3DViewer.Control.materialCAD",
_( "Use a CAD color style based on the diffuse color of the material" ), _( "Use a CAD color style based on the diffuse color of the material" ),
BITMAPS::INVALID_BITMAP, AF_NONE, (void*) MATERIAL_MODE::CAD_MODE ); BITMAPS::INVALID_BITMAP, AF_NONE, (void*) MATERIAL_MODE::CAD_MODE );
TOOL_ACTION EDA_3D_ACTIONS::rotate45axisZ( "3DViewer.Control.rotate45axisZ",
AS_ACTIVE,
WXK_TAB, "",
"Rotate 45 degrees over Z axis" );
TOOL_ACTION EDA_3D_ACTIONS::showTHT( "3DViewer.Control.attributesTHT", TOOL_ACTION EDA_3D_ACTIONS::showTHT( "3DViewer.Control.attributesTHT",
AS_ACTIVE, AS_ACTIVE,
'T', "", 'T', "",
_( "Toggle Through Hole 3D models" ), _( "Toggle 3D models for 'Through hole' type components" ), _( "Toggle Through Hole 3D models" ),
_( "Toggle 3D models for 'Through hole' type components" ),
BITMAPS::show_tht, AF_NONE ); BITMAPS::show_tht, AF_NONE );
TOOL_ACTION EDA_3D_ACTIONS::showSMD( "3DViewer.Control.attributesSMD", TOOL_ACTION EDA_3D_ACTIONS::showSMD( "3DViewer.Control.attributesSMD",
AS_ACTIVE, AS_ACTIVE,
'S', "", 'S', "",
_( "Toggle SMD 3D models" ), _( "Toggle 3D models for 'Surface mount' type components" ), _( "Toggle SMD 3D models" ),
_( "Toggle 3D models for 'Surface mount' type components" ),
BITMAPS::show_smt, AF_NONE ); BITMAPS::show_smt, AF_NONE );
TOOL_ACTION EDA_3D_ACTIONS::showVirtual( "3DViewer.Control.attributesOther", TOOL_ACTION EDA_3D_ACTIONS::showVirtual( "3DViewer.Control.attributesOther",

View File

@ -75,7 +75,6 @@ public:
static TOOL_ACTION materialDiffuse; static TOOL_ACTION materialDiffuse;
static TOOL_ACTION materialCAD; static TOOL_ACTION materialCAD;
static TOOL_ACTION rotate45axisZ;
static TOOL_ACTION showTHT; static TOOL_ACTION showTHT;
static TOOL_ACTION showSMD; static TOOL_ACTION showSMD;
static TOOL_ACTION showVirtual; static TOOL_ACTION showVirtual;

View File

@ -166,7 +166,7 @@ void PANEL_PREVIEW_3D_MODEL::OnMenuEvent( wxMenuEvent& aEvent )
void PANEL_PREVIEW_3D_MODEL::loadSettings() void PANEL_PREVIEW_3D_MODEL::loadSettings()
{ {
wxCHECK_RET( m_previewPane, "Cannot load settings to null canvas" ); wxCHECK_RET( m_previewPane, wxT( "Cannot load settings to null canvas" ) );
COMMON_SETTINGS* settings = Pgm().GetCommonSettings(); COMMON_SETTINGS* settings = Pgm().GetCommonSettings();

View File

@ -1254,8 +1254,9 @@ PAD*& CADSTAR_PCB_ARCHIVE_LOADER::getPadReference( FOOTPRINT* aFootprint,
if( !( index < aFootprint->Pads().size() ) ) if( !( index < aFootprint->Pads().size() ) )
{ {
THROW_IO_ERROR( _( "Unable to find pad index '%d' in footprint '%s'.", (long) aCadstarPadID, THROW_IO_ERROR( wxString::Format( _( "Unable to find pad index '%d' in footprint '%s'." ),
aFootprint->GetReference() ) ); (long) aCadstarPadID,
aFootprint->GetReference() ) );
} }
return aFootprint->Pads().at( index ); return aFootprint->Pads().at( index );