Be explicit about literal wide-strings.

This commit is contained in:
Jeff Young 2022-02-04 20:21:07 +00:00
parent 2365c1e96f
commit d295025964
35 changed files with 487 additions and 404 deletions

View File

@ -165,7 +165,7 @@ void S3D_CACHE_ENTRY::SetSHA1( const unsigned char* 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__ );
return;
@ -221,7 +221,7 @@ SCENEGRAPH* S3D_CACHE::load( const wxString& aModelFile, S3D_CACHE_ENTRY** aCach
if( full3Dpath.empty() )
{
// 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 );
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* >
( 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 );
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* >
( 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 );
m_CacheList.pop_back();
@ -358,7 +360,7 @@ bool S3D_CACHE::getSHA1( const wxString& aFileName, unsigned char* aSHA1Sum )
{
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__ );
return false;
@ -366,7 +368,7 @@ bool S3D_CACHE::getSHA1( const wxString& aFileName, unsigned char* 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__ );
return false;
@ -417,7 +419,7 @@ bool S3D_CACHE::loadCacheData( S3D_CACHE_ENTRY* aCacheItem )
if( bname.empty() )
{
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;
}
@ -425,7 +427,7 @@ bool S3D_CACHE::loadCacheData( S3D_CACHE_ENTRY* aCacheItem )
if( m_CacheDir.empty() )
{
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;
}
@ -434,8 +436,7 @@ bool S3D_CACHE::loadCacheData( S3D_CACHE_ENTRY* aCacheItem )
if( !wxFileName::FileExists( fname ) )
{
wxString errmsg = "cannot open file";
wxLogTrace( MASK_3D_CACHE, " * [3D model] %s '%s'", errmsg.GetData(), fname.GetData() );
wxLogTrace( MASK_3D_CACHE, wxT( " * [3D model] cannot open file '%s'" ), fname.GetData() );
return false;
}
@ -455,7 +456,7 @@ bool S3D_CACHE::saveCacheData( S3D_CACHE_ENTRY* 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__ );
return false;
@ -463,7 +464,7 @@ bool S3D_CACHE::saveCacheData( S3D_CACHE_ENTRY* aCacheItem )
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__ );
return false;
@ -474,7 +475,7 @@ bool S3D_CACHE::saveCacheData( S3D_CACHE_ENTRY* aCacheItem )
if( bname.empty() )
{
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;
}
@ -482,7 +483,7 @@ bool S3D_CACHE::saveCacheData( S3D_CACHE_ENTRY* aCacheItem )
if( m_CacheDir.empty() )
{
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;
}
@ -493,8 +494,8 @@ bool S3D_CACHE::saveCacheData( S3D_CACHE_ENTRY* aCacheItem )
{
if( !wxFileName::FileExists( fname ) )
{
wxLogTrace( MASK_3D_CACHE, " * [3D model] path exists but is not a regular file '%s'",
fname );
wxLogTrace( MASK_3D_CACHE,
wxT( " * [3D model] path exists but is not a regular file '%s'" ), fname );
return false;
}
@ -510,7 +511,7 @@ bool S3D_CACHE::Set3DConfigDir( const wxString& aConfigDir )
if( !m_ConfigDir.empty() )
return false;
wxFileName cfgdir( ExpandEnvVarSubstitutions( aConfigDir, m_project ), "" );
wxFileName cfgdir( ExpandEnvVarSubstitutions( aConfigDir, m_project ), wxEmptyString );
cfgdir.Normalize();
@ -521,7 +522,7 @@ bool S3D_CACHE::Set3DConfigDir( const wxString& aConfigDir )
if( !cfgdir.DirExists() )
{
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() );
return false;
@ -534,8 +535,8 @@ bool S3D_CACHE::Set3DConfigDir( const wxString& aConfigDir )
if( !m_FNResolver->Set3DConfigDir( m_ConfigDir ) )
{
wxLogTrace( MASK_3D_CACHE,
"%s:%s:%d\n * could not set 3D Config Directory on filename resolver\n"
" * config directory: '%s'",
wxT( "%s:%s:%d\n * could not set 3D Config Directory on filename resolver\n"
" * config directory: '%s'" ),
__FILE__, __FUNCTION__, __LINE__, m_ConfigDir );
}
@ -548,7 +549,7 @@ bool S3D_CACHE::Set3DConfigDir( const wxString& aConfigDir )
// 3. MSWin: AppData\Local\kicad\3d
wxFileName cacheDir;
cacheDir.AssignDir( PATHS::GetUserCachePath() );
cacheDir.AppendDir( "3d" );
cacheDir.AppendDir( wxT( "3d" ) );
if( !cacheDir.DirExists() )
{
@ -556,7 +557,8 @@ bool S3D_CACHE::Set3DConfigDir( const wxString& aConfigDir )
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() );
return false;
@ -651,7 +653,7 @@ S3DMODEL* S3D_CACHE::GetModel( const wxString& aModelFileName )
if( !cp )
{
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__ );
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 eM = m_ExtMap.end();
wxLogTrace( MASK_3D_PLUGINMGR, " * Extension [plugin name]:\n" );
wxLogTrace( MASK_3D_PLUGINMGR, wxT( " * Extension [plugin name]:\n" ) );
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;
}
@ -77,7 +77,7 @@ S3D_PLUGIN_MANAGER::S3D_PLUGIN_MANAGER()
}
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
std::list< wxString >::const_iterator sFF = m_FileFilters.begin();
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 )
{
wxLogTrace( MASK_3D_PLUGINMGR, " + '%s'\n", (*sFF).GetData() );
wxLogTrace( MASK_3D_PLUGINMGR, wxT( " + '%s'\n" ), (*sFF).GetData() );
++sFF;
}
}
else
{
wxLogTrace( MASK_3D_PLUGINMGR, " * No file filters available\n" );
wxLogTrace( MASK_3D_PLUGINMGR, wxT( " * No file filters available\n" ) );
}
#endif // DEBUG
}
@ -178,7 +178,7 @@ void S3D_PLUGIN_MANAGER::loadPlugins( void )
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() );
listPlugins( *sPL, pluginlist );
@ -197,13 +197,13 @@ void S3D_PLUGIN_MANAGER::loadPlugins( void )
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__ );
m_Plugins.push_back( pp );
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 );
for( int i = 0; i < nf; ++i )
@ -221,7 +221,7 @@ void S3D_PLUGIN_MANAGER::loadPlugins( void )
}
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__ );
delete pp;
@ -230,7 +230,7 @@ void S3D_PLUGIN_MANAGER::loadPlugins( void )
++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__ );
}
@ -305,7 +305,7 @@ void S3D_PLUGIN_MANAGER::checkPluginName( const wxString& aPath,
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() )
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;
if( aPath.StartsWith( "${" ) || aPath.StartsWith( "$(" ) )
path.Assign( ExpandEnvVarSubstitutions( aPath, nullptr ), "" );
if( aPath.StartsWith( wxT( "${" ) ) || aPath.StartsWith( wxT( "$(" ) ) )
path.Assign( ExpandEnvVarSubstitutions( aPath, nullptr ), wxEmptyString );
else
path.Assign( aPath, "" );
@ -377,7 +378,7 @@ void S3D_PLUGIN_MANAGER::addExtensionMap( KICAD_PLUGIN_LDR_3D* aPlugin )
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 );
for( int i = 0; i < nExt; ++i )
@ -415,10 +416,10 @@ SCENEGRAPH* S3D_PLUGIN_MANAGER::Load3DModel( const wxString& aFileName, std::str
#endif
// .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() );
ext_to_find = second.GetExt() + ".gz";
ext_to_find = second.GetExt() + wxT( ".gz" );
}
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 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() ) );
while( sP != eP )

View File

@ -97,7 +97,7 @@ bool S3D::WriteVRML( const char* filename, bool overwrite, SGNODE* aTopNode,
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 );
return false;
@ -122,7 +122,7 @@ bool S3D::WriteVRML( const char* filename, bool overwrite, SGNODE* aTopNode,
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 );
return false;
@ -167,7 +167,7 @@ bool S3D::WriteCache( const char* aFileName, bool overwrite, SGNODE* aNode,
{
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 );
return false;
@ -176,7 +176,7 @@ bool S3D::WriteCache( const char* aFileName, bool overwrite, SGNODE* aNode,
// make sure we make no attempt to write a directory
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 );
return false;
@ -187,7 +187,7 @@ bool S3D::WriteCache( const char* aFileName, bool overwrite, SGNODE* aNode,
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 );
return false;
@ -205,7 +205,8 @@ bool S3D::WriteCache( const char* aFileName, bool overwrite, SGNODE* aNode,
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 );
// delete the defective file
@ -226,7 +227,7 @@ SGNODE* S3D::ReadCache( const char* aFileName, void* aPluginMgr,
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 );
return nullptr;
@ -240,7 +241,7 @@ SGNODE* S3D::ReadCache( const char* aFileName, void* aPluginMgr,
{
delete np;
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 );
return nullptr;
@ -256,9 +257,10 @@ SGNODE* S3D::ReadCache( const char* aFileName, void* aPluginMgr,
if( '(' != schar )
{
wxLogTrace( MASK_3D_SG,
"%s:%s:%d * [INFO] corrupt data; missing left parenthesis at position '%d'",
__FILE__, __FUNCTION__, __LINE__, static_cast<int>( file.tellg() ) );
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data; missing left parenthesis"
" at position '%d'" ),
__FILE__, __FUNCTION__, __LINE__,
static_cast<int>( file.tellg() ) );
CLOSE_STREAM( file );
return nullptr;
@ -290,9 +292,10 @@ SGNODE* S3D::ReadCache( const char* aFileName, void* aPluginMgr,
if( '(' != schar )
{
wxLogTrace( MASK_3D_SG,
"%s:%s:%d * [INFO] corrupt data; missing left parenthesis at position '%d'",
__FILE__, __FUNCTION__, __LINE__, static_cast<int>( file.tellg() ) );
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data; missing left parenthesis"
" at position '%d'" ),
__FILE__, __FUNCTION__, __LINE__,
static_cast<int>( file.tellg() ) );
CLOSE_STREAM( file );
return nullptr;

View File

@ -56,7 +56,8 @@ IFSG_APPEARANCE::IFSG_APPEARANCE( SGNODE* aParent )
delete m_node;
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;
}
@ -72,7 +73,8 @@ IFSG_APPEARANCE::IFSG_APPEARANCE( IFSG_NODE& aParent )
#ifdef DEBUG
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
@ -83,7 +85,8 @@ IFSG_APPEARANCE::IFSG_APPEARANCE( IFSG_NODE& aParent )
delete m_node;
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;
}
@ -123,7 +126,8 @@ bool IFSG_APPEARANCE::NewNode( SGNODE* aParent )
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__,
aParent->GetNodeTypeName( aParent->GetNodeType() ) );
@ -250,7 +254,7 @@ bool IFSG_APPEARANCE::SetShininess( float aShininess ) noexcept
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__ );
return false;
@ -268,7 +272,7 @@ bool IFSG_APPEARANCE::SetTransparency( float aTransparency ) noexcept
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__ );
return false;

View File

@ -56,7 +56,7 @@ IFSG_COLORS::IFSG_COLORS( SGNODE* aParent )
delete m_node;
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;
}
@ -73,7 +73,8 @@ IFSG_COLORS::IFSG_COLORS( IFSG_NODE& aParent )
// Braces needed due to dangling else warning from wxLogTrace macro
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
@ -84,7 +85,7 @@ IFSG_COLORS::IFSG_COLORS( IFSG_NODE& aParent )
delete m_node;
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 );
return;
@ -125,7 +126,7 @@ bool IFSG_COLORS::NewNode( SGNODE* aParent )
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__,
aParent->GetNodeTypeName( aParent->GetNodeType() ) );

View File

@ -57,7 +57,8 @@ IFSG_COORDINDEX::IFSG_COORDINDEX( SGNODE* aParent )
delete m_node;
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;
}
@ -72,7 +73,8 @@ IFSG_COORDINDEX::IFSG_COORDINDEX( IFSG_NODE& aParent )
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;
}
@ -81,7 +83,8 @@ IFSG_COORDINDEX::IFSG_COORDINDEX( IFSG_NODE& aParent )
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;
m_node = nullptr;
@ -123,7 +126,8 @@ bool IFSG_COORDINDEX::NewNode( SGNODE* aParent )
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__,
aParent->GetNodeTypeName( aParent->GetNodeType() ) );

View File

@ -56,7 +56,8 @@ IFSG_COORDS::IFSG_COORDS( SGNODE* aParent )
delete m_node;
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;
}
@ -72,7 +73,8 @@ IFSG_COORDS::IFSG_COORDS( IFSG_NODE& aParent )
#ifdef DEBUG
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
@ -83,7 +85,8 @@ IFSG_COORDS::IFSG_COORDS( IFSG_NODE& aParent )
delete m_node;
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;
}
@ -123,7 +126,7 @@ bool IFSG_COORDS::NewNode( SGNODE* aParent )
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__,
aParent->GetNodeTypeName( aParent->GetNodeType() ) );

View File

@ -57,7 +57,8 @@ IFSG_FACESET::IFSG_FACESET( SGNODE* aParent )
delete m_node;
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;
}
@ -73,7 +74,8 @@ IFSG_FACESET::IFSG_FACESET( IFSG_NODE& aParent )
#ifdef DEBUG
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
@ -84,7 +86,8 @@ IFSG_FACESET::IFSG_FACESET( IFSG_NODE& aParent )
delete m_node;
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;
}
@ -124,7 +127,7 @@ bool IFSG_FACESET::NewNode( SGNODE* aParent )
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__,
aParent->GetNodeTypeName( aParent->GetNodeType() ) );

View File

@ -57,7 +57,8 @@ IFSG_NORMALS::IFSG_NORMALS( SGNODE* aParent )
delete m_node;
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;
}
@ -73,7 +74,8 @@ IFSG_NORMALS::IFSG_NORMALS( IFSG_NODE& aParent )
#ifdef DEBUG
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
@ -84,7 +86,8 @@ IFSG_NORMALS::IFSG_NORMALS( IFSG_NODE& aParent )
delete m_node;
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;
}
@ -124,7 +127,7 @@ bool IFSG_NORMALS::NewNode( SGNODE* aParent )
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__,
aParent->GetNodeTypeName( aParent->GetNodeType() ) );

View File

@ -57,7 +57,8 @@ IFSG_SHAPE::IFSG_SHAPE( SGNODE* aParent )
delete m_node;
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;
}
@ -73,7 +74,8 @@ IFSG_SHAPE::IFSG_SHAPE( IFSG_NODE& aParent )
#ifdef DEBUG
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
@ -84,7 +86,8 @@ IFSG_SHAPE::IFSG_SHAPE( IFSG_NODE& aParent )
delete m_node;
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;
}
@ -124,7 +127,7 @@ bool IFSG_SHAPE::NewNode( SGNODE* aParent )
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__,
aParent->GetNodeTypeName( aParent->GetNodeType() ) );

View File

@ -56,7 +56,8 @@ IFSG_TRANSFORM::IFSG_TRANSFORM( SGNODE* aParent )
delete m_node;
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;
}
@ -96,7 +97,7 @@ bool IFSG_TRANSFORM::NewNode( SGNODE* aParent )
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__,
aParent->GetNodeTypeName( aParent->GetNodeType() ) );
@ -148,7 +149,7 @@ bool IFSG_TRANSFORM::SetScale( double aScale )
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__ );
return false;

View File

@ -49,8 +49,10 @@ SCENEGRAPH::SCENEGRAPH( SGNODE* aParent ) : SGNODE( aParent )
{
m_Parent = nullptr;
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] inappropriate parent to SCENEGRAPH (type %d)" ,
__FILE__, __FUNCTION__, __LINE__, aParent->GetNodeType() );
wxLogTrace( MASK_3D_SG,
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() )
{
@ -140,7 +142,7 @@ void SCENEGRAPH::unlinkNode( const SGNODE* aNode, bool isChild )
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__ );
}
@ -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_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)",
__FILE__, __FUNCTION__, __LINE__, aNode->GetName(), aNode->GetNodeType() );
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() );
return false;
}
@ -358,7 +363,8 @@ bool SCENEGRAPH::WriteCache( std::ostream& aFile, SGNODE* parentNode )
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;
}
@ -414,7 +420,8 @@ bool SCENEGRAPH::WriteCache( std::ostream& aFile, SGNODE* parentNode )
{
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__ );
return false;
@ -434,7 +441,8 @@ bool SCENEGRAPH::WriteCache( std::ostream& aFile, SGNODE* parentNode )
{
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__ );
return false;
@ -467,8 +475,8 @@ bool SCENEGRAPH::ReadCache( std::istream& aFile, SGNODE* parentNode )
// we need to read the tag and verify its type
if( S3D::SGTYPE_TRANSFORM != S3D::ReadTag( aFile, name ) )
{
wxLogTrace( MASK_3D_SG,
"%s:%s:%d * [INFO] corrupt data; tag mismatch at position %ul",
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data; tag mismatch at position "
"%ul" ),
__FILE__, __FUNCTION__, __LINE__,
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 ) )
{
wxLogTrace( MASK_3D_SG,
"%s:%s:%d * [INFO] corrupt data; bad child transform tag at position %ul",
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data; bad child transform tag "
"at position %ul" ),
__FILE__, __FUNCTION__, __LINE__,
static_cast<unsigned long>( aFile.tellg() ) );
@ -517,8 +525,8 @@ bool SCENEGRAPH::ReadCache( std::istream& aFile, SGNODE* parentNode )
if( !sp->ReadCache( aFile, this ) )
{
wxLogTrace( MASK_3D_SG,
"%s:%s:%d * [INFO] corrupt data while reading transform %ul",
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data while reading transform "
"%ul" ),
__FILE__, __FUNCTION__, __LINE__,
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 ) )
{
wxLogTrace( MASK_3D_SG,
"%s:%s:%d * [INFO] corrupt data; bad ref transform tag at position %ul",
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data; bad ref transform tag at "
"position %ul" ),
__FILE__, __FUNCTION__, __LINE__,
static_cast<unsigned long>( aFile.tellg() ) );
@ -543,8 +551,8 @@ bool SCENEGRAPH::ReadCache( std::istream& aFile, SGNODE* parentNode )
if( !sp )
{
wxLogTrace( MASK_3D_SG,
"%s:%s:%d * [INFO] corrupt data: cannot find ref transform at position %ul",
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data: cannot find ref "
"transform at position %ul" ),
__FILE__, __FUNCTION__, __LINE__,
static_cast<unsigned long>( aFile.tellg() ) );
@ -553,8 +561,8 @@ bool SCENEGRAPH::ReadCache( std::istream& aFile, SGNODE* parentNode )
if( S3D::SGTYPE_TRANSFORM != sp->GetNodeType() )
{
wxLogTrace( MASK_3D_SG,
"%s:%s:%d * [INFO] corrupt data: type is not TRANSFORM at position %ul",
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data: type is not TRANSFORM "
"at position %ul" ),
__FILE__, __FUNCTION__, __LINE__,
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 ) )
{
wxLogTrace( MASK_3D_SG,
"%s:%s:%d * [INFO] corrupt data; bad child shape tag at position %ul",
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data; bad child shape tag at "
"position %ul" ),
__FILE__, __FUNCTION__, __LINE__,
static_cast<unsigned long>( aFile.tellg() ) );
@ -582,9 +590,9 @@ bool SCENEGRAPH::ReadCache( std::istream& aFile, SGNODE* parentNode )
if( !sp->ReadCache( aFile, this ) )
{
wxLogTrace( MASK_3D_SG,
"%s:%s:%d * [INFO] corrupt data; corrupt data while reading shape at "
"position %ul", __FILE__, __FUNCTION__, __LINE__,
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data; corrupt data while "
"reading shape at position %ul" ),
__FILE__, __FUNCTION__, __LINE__,
static_cast<unsigned long>( aFile.tellg() ) );
return false;
@ -596,8 +604,8 @@ bool SCENEGRAPH::ReadCache( std::istream& aFile, SGNODE* parentNode )
{
if( S3D::SGTYPE_SHAPE != S3D::ReadTag( aFile, name ) )
{
wxLogTrace( MASK_3D_SG,
"%s:%s:%d * [INFO] corrupt data; bad ref shape tag at position %ul",
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data; bad ref shape tag at "
"position %ul" ),
__FILE__, __FUNCTION__, __LINE__,
static_cast<unsigned long>( aFile.tellg() ) );
@ -608,8 +616,8 @@ bool SCENEGRAPH::ReadCache( std::istream& aFile, SGNODE* parentNode )
if( !sp )
{
wxLogTrace( MASK_3D_SG,
"%s:%s:%d * [INFO] corrupt data: cannot find ref shape at position %ul",
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data: cannot find ref shape "
"at position %ul" ),
__FILE__, __FUNCTION__, __LINE__,
static_cast<unsigned long>( aFile.tellg() ) );
@ -618,8 +626,8 @@ bool SCENEGRAPH::ReadCache( std::istream& aFile, SGNODE* parentNode )
if( S3D::SGTYPE_SHAPE != sp->GetNodeType() )
{
wxLogTrace( MASK_3D_SG,
"%s:%s:%d * [INFO] corrupt data: type is not SGSHAPE at position %ul",
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data: type is not SGSHAPE at "
"position %ul" ),
__FILE__, __FUNCTION__, __LINE__,
static_cast<unsigned long>( aFile.tellg() ) );

View File

@ -45,7 +45,8 @@ SGAPPEARANCE::SGAPPEARANCE( SGNODE* aParent ) : SGNODE( aParent )
{
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() );
}
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 )
{
wxCHECK_MSG( aRGBColor, false, "NULL pointer passed for aRGBColor" );
wxCHECK_MSG( aRGBColor, false, wxT( "NULL pointer passed for aRGBColor" ) );
return emissive.SetColor( aRGBColor );
}
@ -118,7 +119,7 @@ bool SGAPPEARANCE::SetDiffuse( float aRVal, float aGVal, float aBVal )
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 );
}
@ -138,7 +139,7 @@ bool SGAPPEARANCE::SetSpecular( float aRVal, float aGVal, float aBVal )
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 );
}
@ -157,7 +158,7 @@ bool SGAPPEARANCE::SetAmbient( float aRVal, float aGVal, float aBVal )
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 );
}
@ -184,20 +185,20 @@ SGNODE* SGAPPEARANCE::FindNode( const char* aNodeName, const SGNODE* aCaller) no
void SGAPPEARANCE::unlinkChildNode( const SGNODE* aCaller ) noexcept
{
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
{
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
{
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.
return false;
@ -206,7 +207,7 @@ bool SGAPPEARANCE::AddRefNode( 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.
return false;
@ -304,7 +305,7 @@ bool SGAPPEARANCE::WriteCache( std::ostream& aFile, SGNODE* 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;
@ -320,11 +321,12 @@ bool SGAPPEARANCE::WriteCache( std::ostream& aFile, SGNODE* parentNode )
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() )
{
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;
}

View File

@ -42,7 +42,7 @@ SGCOLOR::SGCOLOR( float aRVal, float aGVal, float 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__ );
red = 0.0;
green = 0.0;
@ -74,7 +74,7 @@ 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->green = green;
@ -106,7 +106,7 @@ 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;
green = aColor->green;
@ -121,7 +121,7 @@ bool SGCOLOR::checkRange( float aRedVal, float aGreenVal, float aBlueVal ) const
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 );
ok = false;
@ -129,7 +129,7 @@ bool SGCOLOR::checkRange( float aRedVal, float aGreenVal, float aBlueVal ) const
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 );
ok = false;
@ -137,7 +137,7 @@ bool SGCOLOR::checkRange( float aRedVal, float aGreenVal, float aBlueVal ) const
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 );
ok = false;
@ -181,7 +181,7 @@ 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;
y = aPoint->y;

View File

@ -38,7 +38,8 @@ SGCOLORS::SGCOLORS( SGNODE* aParent ) : SGNODE( aParent )
{
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() );
}
else if( nullptr != aParent && S3D::SGTYPE_FACESET == aParent->GetNodeType() )
@ -259,7 +260,8 @@ bool SGCOLORS::WriteCache( std::ostream& aFile, SGNODE* parentNode )
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;
}

View File

@ -40,7 +40,8 @@ SGCOORDS::SGCOORDS( SGNODE* aParent ) : SGNODE( aParent )
{
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() );
}
else if( nullptr != aParent && S3D::SGTYPE_FACESET == aParent->GetNodeType() )
@ -261,7 +262,8 @@ bool SGCOORDS::WriteCache( std::ostream& aFile, SGNODE* parentNode )
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;
}

View File

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

View File

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

View File

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

View File

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

View File

@ -38,8 +38,10 @@ SGNORMALS::SGNORMALS( SGNODE* aParent ) : SGNODE( aParent )
{
m_Parent = nullptr;
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] inappropriate parent to SGNORMALS (type %d)",
__FILE__, __FUNCTION__, __LINE__, aParent->GetNodeType() );
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [BUG] inappropriate parent to SGNORMALS "
"(type %d)" ),
__FILE__, __FUNCTION__, __LINE__,
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() )
{
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [INFO] bad stream",
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] bad stream" ),
__FILE__, __FUNCTION__, __LINE__ );
return false;

View File

@ -49,7 +49,7 @@ SGSHAPE::SGSHAPE( SGNODE* aParent ) : SGNODE( aParent )
{
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() );
}
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__ );
}
@ -222,7 +222,8 @@ bool SGSHAPE::addNode( SGNODE* aNode, bool isChild )
{
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__ );
return false;
@ -251,7 +252,7 @@ bool SGSHAPE::addNode( SGNODE* aNode, bool isChild )
{
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__ );
return false;
@ -274,7 +275,8 @@ bool SGSHAPE::addNode( SGNODE* aNode, bool isChild )
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() );
return false;
@ -378,7 +380,8 @@ bool SGSHAPE::WriteCache( std::ostream& aFile, SGNODE* parentNode )
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;
}
@ -454,9 +457,10 @@ bool SGSHAPE::ReadCache( std::istream& aFile, SGNODE* parentNode )
if( ( items[0] && items[1] ) || ( items[2] && items[3] ) )
{
wxLogTrace( MASK_3D_SG,
"%s:%s:%d * [INFO] corrupt data; multiple item definitions at position %ul",
__FILE__, __FUNCTION__, __LINE__, static_cast<unsigned long>( aFile.tellg() ) );
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data; multiple item definitions "
"at position %ul" ),
__FILE__, __FUNCTION__, __LINE__,
static_cast<unsigned long>( aFile.tellg() ) );
return false;
}
@ -467,8 +471,8 @@ bool SGSHAPE::ReadCache( std::istream& aFile, SGNODE* parentNode )
{
if( S3D::SGTYPE_APPEARANCE != S3D::ReadTag( aFile, name ) )
{
wxLogTrace( MASK_3D_SG,
"%s:%s:%d * [INFO] corrupt data; bad child appearance tag at position %ul",
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data; bad child appearance "
"tag at position %ul" ),
__FILE__, __FUNCTION__, __LINE__,
static_cast<unsigned long>( aFile.tellg() ) );
@ -480,7 +484,8 @@ bool SGSHAPE::ReadCache( std::istream& aFile, SGNODE* parentNode )
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 );
return false;
@ -491,8 +496,8 @@ bool SGSHAPE::ReadCache( std::istream& aFile, SGNODE* parentNode )
{
if( S3D::SGTYPE_APPEARANCE != S3D::ReadTag( aFile, name ) )
{
wxLogTrace( MASK_3D_SG,
"%s:%s:%d * [INFO] corrupt data; bad ref appearance tag at position %ul",
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data; bad ref appearance tag "
"at position %ul" ),
__FILE__, __FUNCTION__, __LINE__,
static_cast<unsigned long>( aFile.tellg() ) );
@ -503,18 +508,20 @@ bool SGSHAPE::ReadCache( std::istream& aFile, SGNODE* parentNode )
if( !np )
{
wxLogTrace( MASK_3D_SG,
"%s:%s:%d * [INFO] corrupt data: cannot find ref appearance '%s'",
__FILE__, __FUNCTION__, __LINE__, name );
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data: cannot find ref "
"appearance '%s'" ),
__FILE__, __FUNCTION__, __LINE__,
name );
return false;
}
if( S3D::SGTYPE_APPEARANCE != np->GetNodeType() )
{
wxLogTrace( MASK_3D_SG,
"%s:%s:%d * [INFO] corrupt data: type is not SGAPPEARANCE '%s'",
__FILE__, __FUNCTION__, __LINE__, name );
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data: type is not "
"SGAPPEARANCE '%s'" ),
__FILE__, __FUNCTION__, __LINE__,
name );
return false;
}
@ -527,8 +534,8 @@ bool SGSHAPE::ReadCache( std::istream& aFile, SGNODE* parentNode )
{
if( S3D::SGTYPE_FACESET != S3D::ReadTag( aFile, name ) )
{
wxLogTrace( MASK_3D_SG,
"%s:%s:%d * [INFO] corrupt data; bad child face set tag at position %ul",
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data; bad child face set tag "
"at position %ul" ),
__FILE__, __FUNCTION__, __LINE__,
static_cast<unsigned long>( aFile.tellg() ) );
@ -540,8 +547,8 @@ bool SGSHAPE::ReadCache( std::istream& aFile, SGNODE* parentNode )
if( !m_FaceSet->ReadCache( aFile, this ) )
{
wxLogTrace( MASK_3D_SG,
"%s:%s:%d * [INFO] corrupt data while reading face set '%s'",
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data while reading face set "
"'%s'" ),
__FILE__, __FUNCTION__, __LINE__, name );
return false;
@ -552,8 +559,8 @@ bool SGSHAPE::ReadCache( std::istream& aFile, SGNODE* parentNode )
{
if( S3D::SGTYPE_FACESET != S3D::ReadTag( aFile, name ) )
{
wxLogTrace( MASK_3D_SG,
"%s:%s:%d * [INFO] corrupt data; bad ref face set tag at position %ul",
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data; bad ref face set tag at "
"position %ul" ),
__FILE__, __FUNCTION__, __LINE__,
static_cast<unsigned long>( aFile.tellg() ) );
@ -564,18 +571,20 @@ bool SGSHAPE::ReadCache( std::istream& aFile, SGNODE* parentNode )
if( !np )
{
wxLogTrace( MASK_3D_SG,
"%s:%s:%d * [INFO] corrupt data: cannot find ref face set '%s'",
__FILE__, __FUNCTION__, __LINE__, name );
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data: cannot find ref face "
"set '%s'" ),
__FILE__, __FUNCTION__, __LINE__,
name );
return false;
}
if( S3D::SGTYPE_FACESET != np->GetNodeType() )
{
wxLogTrace( MASK_3D_SG,
"%s:%s:%d * [INFO] corrupt data: type is not SGFACESET '%s'",
__FILE__, __FUNCTION__, __LINE__, name );
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data: type is not SGFACESET "
"'%s'" ),
__FILE__, __FUNCTION__, __LINE__,
name );
return false;
}
@ -612,7 +621,7 @@ bool SGSHAPE::Prepare( const glm::dmat4* aTransform, S3D::MATLIST& materials,
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__ );
return true;
@ -665,8 +674,8 @@ bool SGSHAPE::Prepare( const glm::dmat4* aTransform, S3D::MATLIST& materials,
if( nColors < nCoords )
{
wxLogTrace( MASK_3D_SG,
"%s:%s:%d * [INFO] bad model; not enough colors per vertex (%ul vs %ul)",
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] bad model; not enough colors per "
"vertex (%ul vs %ul)" ),
__FILE__, __FUNCTION__, __LINE__, static_cast<unsigned long>( nColors ),
static_cast<unsigned long>( nCoords ) );
@ -697,7 +706,7 @@ bool SGSHAPE::Prepare( const glm::dmat4* aTransform, S3D::MATLIST& materials,
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__ );
return true;

View File

@ -164,49 +164,49 @@ BOARD_ADAPTER::BOARD_ADAPTER() :
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, 20, 51, 36, 1.0, "Green" );
ADD_COLOR( g_SilkscreenColors, 181, 19, 21, 1.0, "Red" );
ADD_COLOR( g_SilkscreenColors, 2, 59, 162, 1.0, "Blue" );
ADD_COLOR( g_SilkscreenColors, 11, 11, 11, 1.0, "Black" );
ADD_COLOR( g_SilkscreenColors, 245, 245, 245, 1.0, "White" );
ADD_COLOR( g_SilkscreenColors, 32, 2, 53, 1.0, "Purple" );
ADD_COLOR( g_SilkscreenColors, 194, 195, 0, 1.0, "Yellow" );
ADD_COLOR( g_SilkscreenColors, 20, 51, 36, 1.0, wxT( "Green" ) );
ADD_COLOR( g_SilkscreenColors, 181, 19, 21, 1.0, wxT( "Red" ) );
ADD_COLOR( g_SilkscreenColors, 2, 59, 162, 1.0, wxT( "Blue" ) );
ADD_COLOR( g_SilkscreenColors, 11, 11, 11, 1.0, wxT( "Black" ) );
ADD_COLOR( g_SilkscreenColors, 245, 245, 245, 1.0, wxT( "White" ) );
ADD_COLOR( g_SilkscreenColors, 32, 2, 53, 1.0, wxT( "Purple" ) );
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, "Green" );
ADD_COLOR( g_MaskColors, 91, 168, 12, 0.83, "Light Green" );
ADD_COLOR( g_MaskColors, 13, 104, 11, 0.83, "Saturated Green" );
ADD_COLOR( g_MaskColors, 181, 19, 21, 0.83, "Red" );
ADD_COLOR( g_MaskColors, 210, 40, 14, 0.83, "Light Red" );
ADD_COLOR( g_MaskColors, 239, 53, 41, 0.83, "Red/Orange" );
ADD_COLOR( g_MaskColors, 2, 59, 162, 0.83, "Blue" );
ADD_COLOR( g_MaskColors, 54, 79, 116, 0.83, "Light Blue 1" );
ADD_COLOR( g_MaskColors, 61, 85, 130, 0.83, "Light Blue 2" );
ADD_COLOR( g_MaskColors, 21, 70, 80, 0.83, "Green/Blue" );
ADD_COLOR( g_MaskColors, 11, 11, 11, 0.83, "Black" );
ADD_COLOR( g_MaskColors, 245, 245, 245, 0.83, "White" );
ADD_COLOR( g_MaskColors, 32, 2, 53, 0.83, "Purple" );
ADD_COLOR( g_MaskColors, 119, 31, 91, 0.83, "Light Purple" );
ADD_COLOR( g_MaskColors, 194, 195, 0, 0.83, "Yellow" );
ADD_COLOR( g_MaskColors, 20, 51, 36, 0.83, wxT( "Green" ) );
ADD_COLOR( g_MaskColors, 91, 168, 12, 0.83, wxT( "Light Green" ) );
ADD_COLOR( g_MaskColors, 13, 104, 11, 0.83, wxT( "Saturated Green" ) );
ADD_COLOR( g_MaskColors, 181, 19, 21, 0.83, wxT( "Red" ) );
ADD_COLOR( g_MaskColors, 210, 40, 14, 0.83, wxT( "Light Red" ) );
ADD_COLOR( g_MaskColors, 239, 53, 41, 0.83, wxT( "Red/Orange" ) );
ADD_COLOR( g_MaskColors, 2, 59, 162, 0.83, wxT( "Blue" ) );
ADD_COLOR( g_MaskColors, 54, 79, 116, 0.83, wxT( "Light Blue 1" ) );
ADD_COLOR( g_MaskColors, 61, 85, 130, 0.83, wxT( "Light Blue 2" ) );
ADD_COLOR( g_MaskColors, 21, 70, 80, 0.83, wxT( "Green/Blue" ) );
ADD_COLOR( g_MaskColors, 11, 11, 11, 0.83, wxT( "Black" ) );
ADD_COLOR( g_MaskColors, 245, 245, 245, 0.83, wxT( "White" ) );
ADD_COLOR( g_MaskColors, 32, 2, 53, 0.83, wxT( "Purple" ) );
ADD_COLOR( g_MaskColors, 119, 31, 91, 0.83, wxT( "Light Purple" ) );
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, 90, 90, 90, 1.0, "Dark Grey" );
ADD_COLOR( g_PasteColors, 213, 213, 213, 1.0, "Silver" );
ADD_COLOR( g_PasteColors, 128, 128, 128, 1.0, wxT( "Grey" ) );
ADD_COLOR( g_PasteColors, 90, 90, 90, 1.0, wxT( "Dark Grey" ) );
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, 178, 156, 0, 1.0, "Gold" );
ADD_COLOR( g_FinishColors, 213, 213, 213, 1.0, "Silver" );
ADD_COLOR( g_FinishColors, 160, 160, 160, 1.0, "Tin" );
ADD_COLOR( g_FinishColors, 184, 115, 50, 1.0, wxT( "Copper" ) );
ADD_COLOR( g_FinishColors, 178, 156, 0, 1.0, wxT( "Gold" ) );
ADD_COLOR( g_FinishColors, 213, 213, 213, 1.0, wxT( "Silver" ) );
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, 109, 116, 75, 0.83, "FR4 natural" );
ADD_COLOR( g_BoardColors, 252, 252, 250, 0.90, "PTFE natural" );
ADD_COLOR( g_BoardColors, 205, 130, 0, 0.68, "Polyimide" );
ADD_COLOR( g_BoardColors, 92, 17, 6, 0.90, "Phenolic natural" );
ADD_COLOR( g_BoardColors, 146, 99, 47, 0.83, "Brown 1" );
ADD_COLOR( g_BoardColors, 160, 123, 54, 0.83, "Brown 2" );
ADD_COLOR( g_BoardColors, 146, 99, 47, 0.83, "Brown 3" );
ADD_COLOR( g_BoardColors, 213, 213, 213, 1.0, "Aluminum" );
ADD_COLOR( g_BoardColors, 51, 43, 22, 0.83, wxT( "FR4 natural, dark" ) );
ADD_COLOR( g_BoardColors, 109, 116, 75, 0.83, wxT( "FR4 natural" ) );
ADD_COLOR( g_BoardColors, 252, 252, 250, 0.90, wxT( "PTFE natural" ) );
ADD_COLOR( g_BoardColors, 205, 130, 0, 0.68, wxT( "Polyimide" ) );
ADD_COLOR( g_BoardColors, 92, 17, 6, 0.90, wxT( "Phenolic natural" ) );
ADD_COLOR( g_BoardColors, 146, 99, 47, 0.83, wxT( "Brown 1" ) );
ADD_COLOR( g_BoardColors, 160, 123, 54, 0.83, wxT( "Brown 2" ) );
ADD_COLOR( g_BoardColors, 146, 99, 47, 0.83, wxT( "Brown 3" ) );
ADD_COLOR( g_BoardColors, 213, 213, 213, 1.0, wxT( "Aluminum" ) );
g_DefaultBackgroundTop = COLOR4D( 0.80, 0.80, 0.90, 1.0 );
g_DefaultBackgroundBot = COLOR4D( 0.40, 0.40, 0.50, 1.0 );
@ -559,7 +559,7 @@ void BOARD_ADAPTER::InitSettings( REPORTER* aStatusReporter, REPORTER* aWarningR
auto findColor =
[]( const wxString& aColorName, const CUSTOM_COLORS_LIST& aColorSet )
{
if( aColorName.StartsWith( "#" ) )
if( aColorName.StartsWith( wxT( "#" ) ) )
{
return KIGFX::COLOR4D( aColorName );
}
@ -608,28 +608,28 @@ void BOARD_ADAPTER::InitSettings( REPORTER* aStatusReporter, REPORTER* aWarningR
KIGFX::COLOR4D layerColor = COLOR4D::UNSPECIFIED;
const wxString& materialName = stackupItem->GetMaterial();
if( materialName.StartsWith( "FR4" ) )
if( materialName.StartsWith( wxT( "FR4" ) ) )
{
layerColor = findColor( "FR4 natural", g_BoardColors );
layerColor = findColor( wxT( "FR4 natural" ), g_BoardColors );
}
else if( materialName.IsSameAs( "PTFE" )
|| materialName.IsSameAs( "Teflon" ) )
else if( materialName.IsSameAs( wxT( "PTFE" ) )
|| materialName.IsSameAs( wxT( "Teflon" ) ) )
{
layerColor = findColor( "PTFE natural", g_BoardColors );
layerColor = findColor( wxT( "PTFE natural" ), g_BoardColors );
}
else if( materialName.IsSameAs( "Polyimide" )
|| materialName.IsSameAs( "Kapton" ) )
else if( materialName.IsSameAs( wxT( "Polyimide" ) )
|| materialName.IsSameAs( wxT( "Kapton" ) ) )
{
layerColor = findColor( "Polyimide", g_BoardColors );
layerColor = findColor( wxT( "Polyimide" ), g_BoardColors );
}
else if( materialName.IsSameAs( "Al" ) )
else if( materialName.IsSameAs( wxT( "Al" ) ) )
{
layerColor = findColor( "Aluminum", g_BoardColors );
layerColor = findColor( wxT( "Aluminum" ), g_BoardColors );
}
else // A default color value for unknown dielectric material
// (i.e. an exotic name entered by hand)
{
layerColor = findColor( "FR4 natural", g_BoardColors );
layerColor = findColor( wxT( "FR4 natural" ), g_BoardColors );
}
if( bodyColor == COLOR4D( 0, 0, 0, 0 ) )
@ -653,25 +653,25 @@ void BOARD_ADAPTER::InitSettings( REPORTER* aStatusReporter, REPORTER* aWarningR
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" )
|| finishName.EndsWith( "gold" ) )
else if( finishName.EndsWith( wxT( "IG" ) )
|| 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" )
|| finishName.StartsWith( "HASL" )
|| finishName.EndsWith( "tin" )
|| finishName.EndsWith( "nickel" ) )
else if( finishName.StartsWith( wxT( "HAL" ) )
|| finishName.StartsWith( wxT( "HASL" ) )
|| finishName.EndsWith( wxT( "tin" ) )
|| 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
{

View File

@ -429,7 +429,7 @@ void BOARD_ADAPTER::createPadWithClearance( const PAD* aPad, CONTAINER_2D_BASE*
break;
default:
wxFAIL_MSG( "BOARD_ADAPTER::createPadWithClearance no implementation for "
wxFAIL_MSG( wxT( "BOARD_ADAPTER::createPadWithClearance no implementation for " )
+ SHAPE_TYPE_asString( shape->Type() ) );
break;
}
@ -738,7 +738,7 @@ void BOARD_ADAPTER::addShapeWithClearance( const PCB_SHAPE* aShape,
break;
default:
wxFAIL_MSG( "BOARD_ADAPTER::addShapeWithClearance no implementation for "
wxFAIL_MSG( wxT( "BOARD_ADAPTER::addShapeWithClearance no implementation for " )
+ aShape->SHAPE_T_asString() );
break;
}

View File

@ -114,7 +114,7 @@ EDA_3D_CANVAS::EDA_3D_CANVAS( wxWindow* aParent, const int* aAttribList,
m_accelerator3DShapes( 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 );
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()
{
wxLogTrace( m_logTrace, "EDA_3D_CANVAS::~EDA_3D_CANVAS" );
wxLogTrace( m_logTrace, wxT( "EDA_3D_CANVAS::~EDA_3D_CANVAS" ) );
delete m_accelerator3DShapes;
m_accelerator3DShapes = nullptr;
@ -214,7 +214,7 @@ void EDA_3D_CANVAS::OnResize( wxSizeEvent& event )
bool EDA_3D_CANVAS::initializeOpenGL()
{
wxLogTrace( m_logTrace, "EDA_3D_CANVAS::initializeOpenGL" );
wxLogTrace( m_logTrace, wxT( "EDA_3D_CANVAS::initializeOpenGL" ) );
const GLenum err = glewInit();
@ -228,13 +228,13 @@ bool EDA_3D_CANVAS::initializeOpenGL()
}
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 ) ) );
}
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 );
// 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();
tokenizer.SetString( tmp, wxString( "." ) );
tokenizer.SetString( tmp, wxString( wxT( "." ) ) );
if( tokenizer.HasMoreTokens() )
tokenizer.GetNextToken().ToLong( &major );
@ -260,7 +260,7 @@ bool EDA_3D_CANVAS::initializeOpenGL()
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__ );
if( GetParent() )
@ -274,7 +274,8 @@ bool EDA_3D_CANVAS::initializeOpenGL()
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;
}
@ -327,10 +328,10 @@ void EDA_3D_CANVAS::DisplayStatus()
{
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 ) );
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 ) );
}
}
@ -351,7 +352,7 @@ void EDA_3D_CANVAS::DoRePaint()
// SwapBuffer requires the window to be shown before calling
if( !IsShownOnScreen() )
{
wxLogTrace( m_logTrace, "EDA_3D_CANVAS::DoRePaint !IsShown" );
wxLogTrace( m_logTrace, wxT( "EDA_3D_CANVAS::DoRePaint !IsShown" ) );
m_is_currently_painting.clear();
return;
}
@ -577,7 +578,7 @@ void EDA_3D_CANVAS::OnEvent( wxEvent& aEvent )
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.
}
@ -586,7 +587,7 @@ void EDA_3D_CANVAS::OnMouseWheel( wxMouseEvent& event )
{
bool mouseActivity = false;
wxLogTrace( m_logTrace, "EDA_3D_CANVAS::OnMouseWheel" );
wxLogTrace( m_logTrace, wxT( "EDA_3D_CANVAS::OnMouseWheel" ) );
if( m_camera_is_moving )
return;

View File

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

View File

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

View File

@ -192,9 +192,9 @@ const float& POST_SHADER::GetShadowFactorAt( const SFVEC2I& aPos ) const
void POST_SHADER::DebugBuffersOutputAsImages() const
{
DBG_SaveBuffer( "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_SaveNormalsBuffer( "m_normals", m_normals, 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( wxT( "m_color" ), m_color, m_size.x, m_size.y );
DBG_SaveNormalsBuffer( wxT( "m_normals" ), m_normals, m_size.x, m_size.y );
// Normalize depth
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 );
}

View File

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

View File

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

View File

@ -35,7 +35,7 @@
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 );

View File

@ -92,7 +92,7 @@ EDA_3D_VIEWER_FRAME::EDA_3D_VIEWER_FRAME( KIWAY *aKiway, PCB_BASE_FRAME *aParent
m_currentCamera( m_trackBallCamera ),
m_trackBallCamera( 2 * RANGE_SCALE_3D )
{
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_aboutTitle = _( "KiCad 3D Viewer" );
@ -281,7 +281,7 @@ void EDA_3D_VIEWER_FRAME::refreshRender()
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 );
}
@ -289,7 +289,7 @@ void EDA_3D_VIEWER_FRAME::Exit3DFrame( wxCommandEvent &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 )
m_canvas->Close();
@ -308,7 +308,8 @@ void EDA_3D_VIEWER_FRAME::Process_Special_Functions( wxCommandEvent &event )
int id = event.GetId();
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,
isChecked );
@ -341,7 +342,7 @@ void EDA_3D_VIEWER_FRAME::Process_Special_Functions( wxCommandEvent &event )
return;
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;
}
}
@ -356,9 +357,9 @@ void EDA_3D_VIEWER_FRAME::OnRenderEngineSelection( wxCommandEvent &event )
else
m_boardAdapter.SetRenderEngine( RENDER_ENGINE::OPENGL );
wxLogTrace( m_logTrace, "EDA_3D_VIEWER_FRAME::OnRenderEngineSelection type %s ",
( m_boardAdapter.GetRenderEngine() == RENDER_ENGINE::RAYTRACING ) ? "raytracing" :
"realtime" );
wxLogTrace( m_logTrace, wxT( "EDA_3D_VIEWER_FRAME::OnRenderEngineSelection type %s " ),
m_boardAdapter.GetRenderEngine() == RENDER_ENGINE::RAYTRACING ? wxT( "raytracing" )
: wxT( "realtime" ) );
if( old_engine != m_boardAdapter.GetRenderEngine() )
RenderEngineChanged();
@ -367,7 +368,8 @@ void EDA_3D_VIEWER_FRAME::OnRenderEngineSelection( wxCommandEvent &event )
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_boardAdapter.SetRenderEngine( RENDER_ENGINE::OPENGL );
@ -376,7 +378,7 @@ void EDA_3D_VIEWER_FRAME::OnDisableRayTracing( wxCommandEvent& 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 )
{
@ -410,7 +412,7 @@ void EDA_3D_VIEWER_FRAME::LoadSettings( APP_SETTINGS_BASE *aCfg )
EDA_3D_VIEWER_SETTINGS* cfg = dynamic_cast<EDA_3D_VIEWER_SETTINGS*>( aCfg );
wxASSERT( cfg );
wxLogTrace( m_logTrace, "EDA_3D_VIEWER_FRAME::LoadSettings" );
wxLogTrace( m_logTrace, wxT( "EDA_3D_VIEWER_FRAME::LoadSettings" ) );
if( cfg )
{
@ -503,8 +505,9 @@ void EDA_3D_VIEWER_FRAME::LoadSettings( APP_SETTINGS_BASE *aCfg )
#if 0
RENDER_ENGINE engine = static_cast<RENDER_ENGINE>( cfg->m_Render.engine );
wxLogTrace( m_logTrace, engine == RENDER_ENGINE::RAYTRACING ?
"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 Ray Trace" )
:
wxT( "EDA_3D_VIEWER_FRAME::LoadSettings render setting OpenGL" ) );
#else
m_boardAdapter.SetRenderEngine( RENDER_ENGINE::OPENGL );
#endif
@ -526,11 +529,11 @@ void EDA_3D_VIEWER_FRAME::SaveSettings( APP_SETTINGS_BASE *aCfg )
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.GetRenderEngine() == RENDER_ENGINE::RAYTRACING ?
"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 Ray Trace" ) :
wxT( "EDA_3D_VIEWER_FRAME::SaveSettings render setting OpenGL" ) );
if( cfg )
{
@ -623,7 +626,7 @@ void EDA_3D_VIEWER_FRAME::SaveSettings( APP_SETTINGS_BASE *aCfg )
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
EDA_BASE_FRAME::CommonSettingsChanged( aEnvVarsChanged, aTextVarsChanged );
@ -732,7 +735,7 @@ void EDA_3D_VIEWER_FRAME::takeScreenshot( wxCommandEvent& event )
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 )
m_canvas->RenderEngineChanged();
@ -741,7 +744,7 @@ void EDA_3D_VIEWER_FRAME::RenderEngineChanged()
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();

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" ),
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",
AS_ACTIVE,
'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, (void*) FL_FP_ATTRIBUTES_NORMAL );
TOOL_ACTION EDA_3D_ACTIONS::showSMD( "3DViewer.Control.attributesSMD",
AS_ACTIVE,
'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, (void*) FL_FP_ATTRIBUTES_NORMAL_INSERT );
TOOL_ACTION EDA_3D_ACTIONS::showVirtual( "3DViewer.Control.attributesOther",

View File

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

View File

@ -166,7 +166,7 @@ void PANEL_PREVIEW_3D_MODEL::OnMenuEvent( wxMenuEvent& aEvent )
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();