Fix 3D view format specifiers and remove overly aggressive assertion.

This commit is contained in:
Wayne Stambaugh 2021-07-27 10:07:23 -04:00
parent 37b200cb3e
commit c71ab17892
21 changed files with 64 additions and 67 deletions

View File

@ -528,7 +528,7 @@ bool WRL1BASE::readShapeHints( WRLPROC& proc, WRL1NODE* aParent, WRL1NODE** aNod
SGNODE* WRL1BASE::TranslateToSG( SGNODE* aParent, WRL1STATUS* /*sp*/ )
{
wxLogTrace( traceVrmlPlugin, wxT( " * [INFO] Translating VRML1 Base with %ul items." ),
wxLogTrace( traceVrmlPlugin, wxT( " * [INFO] Translating VRML1 Base with %lu items." ),
m_Items.size() );
if( m_Items.empty() )

View File

@ -54,8 +54,8 @@ WRL1FACESET::WRL1FACESET( NAMEREGISTER* aDictionary, WRL1NODE* aParent ) :
WRL1FACESET::~WRL1FACESET()
{
wxLogTrace( traceVrmlPlugin, wxT( " * [INFO] Destroying IndexedFaceSet with %ul children, "
"%ul references, and %ul back pointers." ),
wxLogTrace( traceVrmlPlugin, wxT( " * [INFO] Destroying IndexedFaceSet with %lu children, "
"%lu references, and %lu back pointers." ),
m_Children.size(), m_Refs.size(), m_BackPointers.size() );
}
@ -243,7 +243,7 @@ SGNODE* WRL1FACESET::TranslateToSG( SGNODE* aParent, WRL1STATUS* sp )
if( coordsize < 3 || vsize < 3 )
{
wxLogTrace( traceVrmlPlugin,
wxT( " * [INFO] bad model: coordsize = %ul, indexsize = %ul" ),
wxT( " * [INFO] bad model: coordsize = %lu, indexsize = %lu" ),
coordsize, vsize );
return nullptr;

View File

@ -57,7 +57,7 @@ WRL1GROUP::WRL1GROUP( NAMEREGISTER* aDictionary, WRL1NODE* aParent ) :
WRL1GROUP::~WRL1GROUP()
{
wxLogTrace( traceVrmlPlugin,
wxT( " * [INFO] Destroying Group with %ul children, %ul references, and %ul "
wxT( " * [INFO] Destroying Group with %lu children, %lu references, and %lu "
"back pointers." ),
m_Children.size(), m_Refs.size(), m_BackPointers.size() );
}
@ -130,8 +130,8 @@ SGNODE* WRL1GROUP::TranslateToSG( SGNODE* aParent, WRL1STATUS* sp )
wxCHECK_MSG( m_Parent, nullptr, wxT( "Group has no parent." ) );
wxLogTrace( traceVrmlPlugin,
wxT( " * [INFO] Translating Group with %ul children, %ul references, %ul back "
"pointers, and %ul items." ),
wxT( " * [INFO] Translating Group with %lu children, %lu references, %lu back "
"pointers, and %lu items." ),
m_Children.size(), m_Refs.size(), m_BackPointers.size(), m_Items.size() );
if( WRL1NODES::WRL1_BASE != m_Parent->GetNodeType() )

View File

@ -187,10 +187,11 @@ bool WRL1MATERIAL::Read( WRLPROC& proc, WRL1BASE* aTopNode )
{
wxLogTrace( traceVrmlPlugin,
wxT( "%s:%s:%d\n"
" * [INFO] invalid shininess at line %ul column %ul\n"
" * [INFO] invalid shininess %s\n"
" * [INFO] file: '%s'\n"
" * [INFO] error: '%s'." ),
__FILE__, __FUNCTION__, __LINE__, proc.GetFileName(), proc.GetError() );
__FILE__, __FUNCTION__, __LINE__, proc.GetFileName(),
proc.GetFileName(), proc.GetError() );
return false;
}
@ -201,10 +202,11 @@ bool WRL1MATERIAL::Read( WRLPROC& proc, WRL1BASE* aTopNode )
{
wxLogTrace( traceVrmlPlugin,
wxT( "%s:%s:%d\n"
" * [INFO] invalid transparency at line %ul column %ul\n"
" * [INFO] invalid transparency %s\n"
" * [INFO] file: '%s'\n"
" * [INFO] error: '%s'." ),
__FILE__, __FUNCTION__, __LINE__, proc.GetFileName(), proc.GetError() );
__FILE__, __FUNCTION__, __LINE__, proc.GetFilePosition(),
proc.GetFileName(), proc.GetError() );
return false;
}
@ -215,10 +217,11 @@ bool WRL1MATERIAL::Read( WRLPROC& proc, WRL1BASE* aTopNode )
{
wxLogTrace( traceVrmlPlugin,
wxT( "%s:%s:%d\n"
" * [INFO] invalid ambientColor at line %ul column %ul\n"
" * [INFO] invalid ambientColor %s\n"
" * [INFO] file: '%s'\n"
" * [INFO] error: '%s'." ),
__FILE__, __FUNCTION__, __LINE__, proc.GetFileName(), proc.GetError() );
__FILE__, __FUNCTION__, __LINE__, proc.GetFilePosition(),
proc.GetFileName(), proc.GetError() );
return false;
}

View File

@ -139,7 +139,7 @@ WRL1NODE::WRL1NODE( NAMEREGISTER* aDictionary )
WRL1NODE::~WRL1NODE()
{
wxLogTrace( traceVrmlPlugin,
wxT( " * [INFO] ^^ Destroying Type %d with %ul children, %ul references, and %ul "
wxT( " * [INFO] ^^ Destroying Type %d with %lu children, %lu references, and %lu "
"back pointers." ),
m_Type, m_Children.size(), m_Refs.size(), m_BackPointers.size() );

View File

@ -51,7 +51,7 @@ WRL1SEPARATOR::WRL1SEPARATOR( NAMEREGISTER* aDictionary, WRL1NODE* aParent ) :
WRL1SEPARATOR::~WRL1SEPARATOR()
{
wxLogTrace( traceVrmlPlugin,
wxT( " * [INFO] Destroying Separator with %ul children %ul references, and %ul "
wxT( " * [INFO] Destroying Separator with %lu children %lu references, and %lu "
"back pointers." ),
m_Children.size(), m_Refs.size(), m_BackPointers.size() );
}
@ -115,8 +115,8 @@ SGNODE* WRL1SEPARATOR::TranslateToSG( SGNODE* aParent, WRL1STATUS* sp )
wxCHECK_MSG( m_Parent, nullptr, wxT( "Separator has no parent." ) );
wxLogTrace( traceVrmlPlugin,
wxT( " * [INFO] Translating Separator with %ul children, %ul references, and "
"%ul back pointers (%ul total items)." ),
wxT( " * [INFO] Translating Separator with %lu children, %lu references, and "
"%lu back pointers (%lu total items)." ),
m_Children.size(), m_Refs.size(), m_BackPointers.size(), m_Items.size() );
if( sp != nullptr )

View File

@ -54,8 +54,8 @@ WRL1SWITCH::WRL1SWITCH( NAMEREGISTER* aDictionary, WRL1NODE* aParent ) :
WRL1SWITCH::~WRL1SWITCH()
{
wxLogTrace( traceVrmlPlugin,
wxT( " * [INFO] Destroying Switch node with %ul children, %ul"
"references, and %ul back pointers." ),
wxT( " * [INFO] Destroying Switch node with %lu children, %lu"
"references, and %lu back pointers." ),
m_Children.size(), m_Refs.size(), m_BackPointers.size() );
}
@ -169,8 +169,8 @@ bool WRL1SWITCH::Read( WRLPROC& proc, WRL1BASE* aTopNode )
SGNODE* WRL1SWITCH::TranslateToSG( SGNODE* aParent, WRL1STATUS* sp )
{
wxLogTrace( traceVrmlPlugin,
wxT( " * [INFO] Translating Switch node with %ul children, %ul"
"references, and %ul back pointers (%ul total items)." ),
wxT( " * [INFO] Translating Switch node with %lu children, %lu"
"references, and %lu back pointers (%lu total items)." ),
m_Children.size(), m_Refs.size(), m_BackPointers.size(), m_Items.size() );
if( m_Items.empty() )

View File

@ -51,8 +51,8 @@ WRL1TRANSFORM::WRL1TRANSFORM( NAMEREGISTER* aDictionary, WRL1NODE* aParent ) :
WRL1TRANSFORM::~WRL1TRANSFORM()
{
wxLogTrace( traceVrmlPlugin,
wxT( " * [INFO] Destroying Transform node with %ul children, %ul"
"references, and %ul back pointers." ),
wxT( " * [INFO] Destroying Transform node with %lu children, %lu"
"references, and %lu back pointers." ),
m_Children.size(), m_Refs.size(), m_BackPointers.size() );
}

View File

@ -57,8 +57,8 @@ WRL2APPEARANCE::WRL2APPEARANCE( WRL2NODE* aParent ) : WRL2NODE()
WRL2APPEARANCE::~WRL2APPEARANCE()
{
wxLogTrace( traceVrmlPlugin,
wxT( " * [INFO] Destroying Appearance node with %ul children, %ul"
"references, and %ul back pointers." ),
wxT( " * [INFO] Destroying Appearance node with %lu children, %lu"
"references, and %lu back pointers." ),
m_Children.size(), m_Refs.size(), m_BackPointers.size() );
}
@ -333,8 +333,8 @@ SGNODE* WRL2APPEARANCE::TranslateToSG( SGNODE* aParent )
"(parent ID: %d)." ), ptype ) );
wxLogTrace( traceVrmlPlugin,
wxT( " * [INFO] Translating Appearance node with %ul children, %ul"
"references, and %ul back pointers." ),
wxT( " * [INFO] Translating Appearance node with %lu children, %lu"
"references, and %lu back pointers." ),
m_Children.size(), m_Refs.size(), m_BackPointers.size() );
if( m_sgNode )

View File

@ -913,12 +913,6 @@ SGNODE* WRL2BASE::TranslateToSG( SGNODE* aParent )
if( m_Children.empty() )
return nullptr;
S3D::SGTYPES ptype = S3D::GetSGNodeType( aParent );
wxCHECK_MSG( aParent && ( ptype == S3D::SGTYPE_SHAPE ), nullptr,
wxString::Format( wxT( " * [BUG] WRL2BASE does not have a Transform parent "
"(parent ID: %d)." ), ptype ) );
if( m_sgNode )
{
if( nullptr != aParent )

View File

@ -56,8 +56,8 @@ WRL2FACESET::WRL2FACESET( WRL2NODE* aParent ) : WRL2NODE()
WRL2FACESET::~WRL2FACESET()
{
wxLogTrace( traceVrmlPlugin,
wxT( " * [INFO] Destroying IndexedFaceSet node with %ul children, %ul"
"references, and %ul back pointers." ),
wxT( " * [INFO] Destroying IndexedFaceSet node with %lu children, %lu"
"references, and %lu back pointers." ),
m_Children.size(), m_Refs.size(), m_BackPointers.size() );
}
@ -550,8 +550,8 @@ SGNODE* WRL2FACESET::TranslateToSG( SGNODE* aParent )
"ID: %d)." ), ptype ) );
wxLogTrace( traceVrmlPlugin,
wxT( " * [INFO] Translating IndexedFaceSet with %ul children, %ul references, "
"%ul back pointers, and %ul coord indices." ),
wxT( " * [INFO] Translating IndexedFaceSet with %lu children, %lu references, "
"%lu back pointers, and %lu coord indices." ),
m_Children.size(), m_Refs.size(), m_BackPointers.size(), coordIndex.size() );
if( m_sgNode )

View File

@ -55,8 +55,8 @@ WRL2LINESET::WRL2LINESET( WRL2NODE* aParent ) : WRL2NODE()
WRL2LINESET::~WRL2LINESET()
{
wxLogTrace( traceVrmlPlugin,
wxT( " * [INFO] Destroying IndexedLineSet node with %ul children, %ul"
"references, and %ul back pointers." ),
wxT( " * [INFO] Destroying IndexedLineSet node with %lu children, %lu"
"references, and %lu back pointers." ),
m_Children.size(), m_Refs.size(), m_BackPointers.size() );
}

View File

@ -262,8 +262,8 @@ SGNODE* WRL2MATERIAL::TranslateToSG( SGNODE* aParent )
"ID: %d)." ), ptype ) );
wxLogTrace( traceVrmlPlugin,
wxT( " * [INFO] Translating IndexedFaceSet with %ul children, %ul references, and"
"%ul back pointers." ),
wxT( " * [INFO] Translating IndexedFaceSet with %lu children, %lu references, and"
"%lu back pointers." ),
m_Children.size(), m_Refs.size(), m_BackPointers.size() );
if( m_sgNode )

View File

@ -55,8 +55,8 @@ WRL2POINTSET::WRL2POINTSET( WRL2NODE* aParent ) : WRL2NODE()
WRL2POINTSET::~WRL2POINTSET()
{
wxLogTrace( traceVrmlPlugin,
wxT( " * [INFO] Destroying PointSet node with %ul children, %ul"
"references, and %ul back pointers." ),
wxT( " * [INFO] Destroying PointSet node with %lu children, %lu"
"references, and %lu back pointers." ),
m_Children.size(), m_Refs.size(), m_BackPointers.size() );
}

View File

@ -56,8 +56,8 @@ WRL2SHAPE::WRL2SHAPE( WRL2NODE* aParent ) : WRL2NODE()
WRL2SHAPE::~WRL2SHAPE()
{
wxLogTrace( traceVrmlPlugin,
wxT( " * [INFO] Destroying Shape node with %ul children, %ul"
"references, and %ul back pointers." ),
wxT( " * [INFO] Destroying Shape node with %lu children, %lu"
"references, and %lu back pointers." ),
m_Children.size(), m_Refs.size(), m_BackPointers.size() );
}
@ -306,8 +306,8 @@ SGNODE* WRL2SHAPE::TranslateToSG( SGNODE* aParent )
}
wxLogTrace( traceVrmlPlugin,
wxT( " * [INFO] Translating Shape with %ul children, %ul references, and"
"%ul back pointers." ),
wxT( " * [INFO] Translating Shape with %lu children, %lu references, and"
"%lu back pointers." ),
m_Children.size(), m_Refs.size(), m_BackPointers.size() );
bool vcolors = false;

View File

@ -52,8 +52,8 @@ WRL2SWITCH::WRL2SWITCH( WRL2NODE* aParent ) : WRL2NODE()
WRL2SWITCH::~WRL2SWITCH()
{
wxLogTrace( traceVrmlPlugin,
wxT( " * [INFO] Destroying Switch node with %ul children, %ul"
"references, and %ul back pointers." ),
wxT( " * [INFO] Destroying Switch node with %lu children, %lu"
"references, and %lu back pointers." ),
m_Children.size(), m_Refs.size(), m_BackPointers.size() );
}
@ -242,8 +242,8 @@ bool WRL2SWITCH::readChildren( WRLPROC& proc, WRL2BASE* aTopNode )
SGNODE* WRL2SWITCH::TranslateToSG( SGNODE* aParent )
{
wxLogTrace( traceVrmlPlugin,
wxT( " * [INFO] Translating Switch with %ul children, %ul references, and"
"%ul back pointers." ),
wxT( " * [INFO] Translating Switch with %lu children, %lu references, and"
"%lu back pointers." ),
m_Children.size(), m_Refs.size(), m_BackPointers.size() );
if( choices.empty() )
@ -262,7 +262,7 @@ SGNODE* WRL2SWITCH::TranslateToSG( SGNODE* aParent )
if( whichChoice < 0 || whichChoice >= (int)choices.size() )
{
wxLogTrace( traceVrmlPlugin,
wxT( " * [INFO] Switch translation: no choice (choices = %ul), "
wxT( " * [INFO] Switch translation: no choice (choices = %lu), "
"whichChoice = %d." ), choices.size(), whichChoice );
return nullptr;

View File

@ -50,8 +50,8 @@ WRL2TRANSFORM::WRL2TRANSFORM( WRL2NODE* aParent ) : WRL2NODE()
WRL2TRANSFORM::~WRL2TRANSFORM()
{
wxLogTrace( traceVrmlPlugin,
wxT( " * [INFO] Destroying Transform node with %ul children, %ul"
"references, and %ul back pointers." ),
wxT( " * [INFO] Destroying Transform node with %lu children, %lu"
"references, and %lu back pointers." ),
m_Children.size(), m_Refs.size(), m_BackPointers.size() );
}
@ -333,8 +333,8 @@ bool WRL2TRANSFORM::readChildren( WRLPROC& proc, WRL2BASE* aTopNode )
SGNODE* WRL2TRANSFORM::TranslateToSG( SGNODE* aParent )
{
wxLogTrace( traceVrmlPlugin,
wxT( " * [INFO] Translating Switch with %ul children, %ul references, and"
"%ul back pointers." ),
wxT( " * [INFO] Translating Switch with %lu children, %lu references, and"
"%lu back pointers." ),
m_Children.size(), m_Refs.size(), m_BackPointers.size() );
if( m_Children.empty() && m_Refs.empty() )

View File

@ -237,8 +237,8 @@ SGNODE* X3DAPP::TranslateToSG( SGNODE* aParent )
ptype ) );
wxLogTrace( traceVrmlPlugin,
wxT( " * [INFO] Translating Appearance node with %ul children, %ul"
"references, and %ul back pointers." ),
wxT( " * [INFO] Translating Appearance node with %lu children, %lu"
"references, and %lu back pointers." ),
m_Children.size(), m_Refs.size(), m_BackPointers.size() );
if( m_sgNode )

View File

@ -233,8 +233,8 @@ SGNODE* X3DIFACESET::TranslateToSG( SGNODE* aParent )
ptype ) );
wxLogTrace( traceVrmlPlugin,
wxT( " * [INFO] Translating IndexedFaceSet with %ul children, %ul references, "
"%ul back pointers, and %ul coordinate indices." ),
wxT( " * [INFO] Translating IndexedFaceSet with %lu children, %lu references, "
"%lu back pointers, and %lu coordinate indices." ),
m_Children.size(), m_Refs.size(), m_BackPointers.size(), coordIndex.size() );
if( m_sgNode )

View File

@ -62,7 +62,7 @@ X3DSHAPE::X3DSHAPE( X3DNODE* aParent ) : X3DNODE()
X3DSHAPE::~X3DSHAPE()
{
wxLogTrace( traceVrmlPlugin,
wxT( " * [INFO] Destroying Shape with %ul children, %ul references, "
wxT( " * [INFO] Destroying Shape with %lu children, %lu references, "
"%and ul back pointers." ),
m_Children.size(), m_Refs.size(), m_BackPointers.size() );
}
@ -246,8 +246,8 @@ SGNODE* X3DSHAPE::TranslateToSG( SGNODE* aParent )
return nullptr;
wxLogTrace( traceVrmlPlugin,
wxT( " * [INFO] Translating Shape with %ul children, %ul references, "
"%and ul back pointers." ),
wxT( " * [INFO] Translating Shape with %lu children, %lu references, "
"and %lu back pointers." ),
m_Children.size(), m_Refs.size(), m_BackPointers.size() );
S3D::SGTYPES ptype = S3D::GetSGNodeType( aParent );

View File

@ -59,8 +59,8 @@ X3DTRANSFORM::X3DTRANSFORM( X3DNODE* aParent ) : X3DNODE()
X3DTRANSFORM::~X3DTRANSFORM()
{
wxLogTrace( traceVrmlPlugin,
wxT( " * [INFO] Destroying Transform with %ul children, %ul references, "
"%and ul back pointers." ),
wxT( " * [INFO] Destroying Transform with %lu children, %lu references, "
"and %lu back pointers." ),
m_Children.size(), m_Refs.size(), m_BackPointers.size() );
}
@ -258,8 +258,8 @@ bool X3DTRANSFORM::AddRefNode( X3DNODE* aNode )
SGNODE* X3DTRANSFORM::TranslateToSG( SGNODE* aParent )
{
wxLogTrace( traceVrmlPlugin,
wxT( " * [INFO] Translating Transform with %ul children, %ul references, "
"%and ul back pointers." ),
wxT( " * [INFO] Translating Transform with %lu children, %lu references, "
"and %lu back pointers." ),
m_Children.size(), m_Refs.size(), m_BackPointers.size() );
if( m_Children.empty() && m_Refs.empty() )