From 4d9ce774a8bbd39170fa4e19d4088ce55babf7f3 Mon Sep 17 00:00:00 2001 From: Cirilo Bernardo Date: Sun, 3 Jan 2016 09:57:41 +1100 Subject: [PATCH] Organizing VRML2 plugin debug reporting levels --- plugins/3d/vrml/v2/vrml2_appearance.cpp | 34 +++++++-------- plugins/3d/vrml/v2/vrml2_base.cpp | 28 ++++++------- plugins/3d/vrml/v2/vrml2_color.cpp | 16 +++---- plugins/3d/vrml/v2/vrml2_coords.cpp | 14 +++---- plugins/3d/vrml/v2/vrml2_faceset.cpp | 56 ++++++++++++------------- plugins/3d/vrml/v2/vrml2_material.cpp | 22 +++++----- plugins/3d/vrml/v2/vrml2_node.cpp | 6 +-- plugins/3d/vrml/v2/vrml2_norms.cpp | 14 +++---- plugins/3d/vrml/v2/vrml2_shape.cpp | 26 ++++++------ plugins/3d/vrml/v2/vrml2_transform.cpp | 22 +++++----- plugins/3d/vrml/vrml.cpp | 2 +- 11 files changed, 120 insertions(+), 120 deletions(-) diff --git a/plugins/3d/vrml/v2/vrml2_appearance.cpp b/plugins/3d/vrml/v2/vrml2_appearance.cpp index 6329208608..d7acfb3311 100644 --- a/plugins/3d/vrml/v2/vrml2_appearance.cpp +++ b/plugins/3d/vrml/v2/vrml2_appearance.cpp @@ -56,7 +56,7 @@ WRL2APPEARANCE::WRL2APPEARANCE( WRL2NODE* aParent ) : WRL2NODE() WRL2APPEARANCE::~WRL2APPEARANCE() { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 2 ) std::cerr << " * [INFO] Destroying Appearance with " << m_Children.size(); std::cerr << " children, " << m_Refs.size() << " references and "; std::cerr << m_BackPointers.size() << " backpointers\n"; @@ -111,7 +111,7 @@ bool WRL2APPEARANCE::AddRefNode( WRL2NODE* aNode ) if( !checkNodeType( type ) ) { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; std::cerr << " * [INFO] bad file format; unexpected child node '"; std::cerr << aNode->GetNodeTypeName( type ) << "'\n"; @@ -124,7 +124,7 @@ bool WRL2APPEARANCE::AddRefNode( WRL2NODE* aNode ) { if( NULL != material ) { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; std::cerr << " * [INFO] bad file format; multiple material nodes\n"; #endif @@ -139,7 +139,7 @@ bool WRL2APPEARANCE::AddRefNode( WRL2NODE* aNode ) { if( NULL != textureTransform ) { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; std::cerr << " * [INFO] bad file format; multiple textureTransform nodes\n"; #endif @@ -152,7 +152,7 @@ bool WRL2APPEARANCE::AddRefNode( WRL2NODE* aNode ) if( NULL != texture ) { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; std::cerr << " * [INFO] bad file format; multiple texture nodes\n"; #endif @@ -180,7 +180,7 @@ bool WRL2APPEARANCE::AddChildNode( WRL2NODE* aNode ) if( !checkNodeType( type ) ) { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; std::cerr << " * [INFO] bad file format; unexpected child node '"; std::cerr << aNode->GetNodeTypeName( type ) << "'\n"; @@ -193,7 +193,7 @@ bool WRL2APPEARANCE::AddChildNode( WRL2NODE* aNode ) { if( NULL != material ) { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; std::cerr << " * [INFO] bad file format; multiple material nodes\n"; #endif @@ -208,7 +208,7 @@ bool WRL2APPEARANCE::AddChildNode( WRL2NODE* aNode ) { if( NULL != textureTransform ) { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; std::cerr << " * [INFO] bad file format; multiple textureTransform nodes\n"; #endif @@ -221,9 +221,9 @@ bool WRL2APPEARANCE::AddChildNode( WRL2NODE* aNode ) if( NULL != texture ) { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; - std::cerr << " * [INFO] bad file format; multiple texture nodes\n"; + std::cerr << " * [INFO] bad file format; multiple texture nodes\n"; #endif return false; } @@ -251,7 +251,7 @@ bool WRL2APPEARANCE::Read( WRLPROC& proc, WRL2BASE* aTopNode ) if( proc.eof() ) { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; std::cerr << " * [INFO] bad file format; unexpected eof at line "; std::cerr << line << ", column " << column << "\n"; @@ -261,7 +261,7 @@ bool WRL2APPEARANCE::Read( WRLPROC& proc, WRL2BASE* aTopNode ) if( '{' != tok ) { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) std::cerr << proc.GetError() << "\n"; std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; std::cerr << " * [INFO] bad file format; expecting '{' but got '" << tok; @@ -284,7 +284,7 @@ bool WRL2APPEARANCE::Read( WRLPROC& proc, WRL2BASE* aTopNode ) if( !proc.ReadName( glob ) ) { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; std::cerr << proc.GetError() << "\n"; #endif @@ -303,7 +303,7 @@ bool WRL2APPEARANCE::Read( WRLPROC& proc, WRL2BASE* aTopNode ) { if( !aTopNode->ReadNode( proc, this, NULL ) ) { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; std::cerr << " * [INFO] could not read material information\n"; #endif @@ -314,7 +314,7 @@ bool WRL2APPEARANCE::Read( WRLPROC& proc, WRL2BASE* aTopNode ) { if( !aTopNode->ReadNode( proc, this, NULL ) ) { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; std::cerr << " * [INFO] could not read texture information\n"; #endif @@ -325,7 +325,7 @@ bool WRL2APPEARANCE::Read( WRLPROC& proc, WRL2BASE* aTopNode ) { if( !aTopNode->ReadNode( proc, this, NULL ) ) { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; std::cerr << " * [INFO] could not read textureTransform information\n"; #endif @@ -334,7 +334,7 @@ bool WRL2APPEARANCE::Read( WRLPROC& proc, WRL2BASE* aTopNode ) } else { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; std::cerr << " * [INFO] bad Appearance at line " << line << ", column "; std::cerr << column << "\n"; diff --git a/plugins/3d/vrml/v2/vrml2_base.cpp b/plugins/3d/vrml/v2/vrml2_base.cpp index 6959dd4741..e880e3b738 100644 --- a/plugins/3d/vrml/v2/vrml2_base.cpp +++ b/plugins/3d/vrml/v2/vrml2_base.cpp @@ -87,7 +87,7 @@ bool WRL2BASE::Read( WRLPROC& proc ) { #ifdef DEBUG_VRML2 std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; - std::cerr << " * [INFO] no open file or file is not a VRML2 file\n"; + std::cerr << " * [BUG] no open file or file is not a VRML2 file\n"; #endif return false; } @@ -129,7 +129,7 @@ bool WRL2BASE::implementUse( WRLPROC& proc, WRL2NODE* aParent, WRL2NODE** aNode if( !proc.ReadName( glob ) ) { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; std::cerr << proc.GetError() << "\n"; #endif @@ -142,7 +142,7 @@ bool WRL2BASE::implementUse( WRLPROC& proc, WRL2NODE* aParent, WRL2NODE** aNode // return 'true' - the file may be defective but it may still be somewhat OK if( NULL == ref ) { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; std::cerr << " * [INFO] node '" << glob << "' not found\n"; #endif @@ -152,7 +152,7 @@ bool WRL2BASE::implementUse( WRLPROC& proc, WRL2NODE* aParent, WRL2NODE** aNode if( !aParent->AddRefNode( ref ) ) { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; std::cerr << " * [INFO] failed to add node '" << glob << "' ("; std::cerr << ref->GetNodeTypeName( ref->GetNodeType() ) << ") to parent of type "; @@ -189,7 +189,7 @@ bool WRL2BASE::implementDef( WRLPROC& proc, WRL2NODE* aParent, WRL2NODE** aNode if( !proc.ReadName( glob ) ) { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; std::cerr << proc.GetError() << "\n"; #endif @@ -207,7 +207,7 @@ bool WRL2BASE::implementDef( WRLPROC& proc, WRL2NODE* aParent, WRL2NODE** aNode if( lnode && !lnode->SetName( glob ) ) { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) size_t line, column; proc.GetFilePosData( line, column ); std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; @@ -251,7 +251,7 @@ bool WRL2BASE::ReadNode( WRLPROC& proc, WRL2NODE* aParent, WRL2NODE** aNode ) if( !proc.ReadName( glob ) ) { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) if( !proc.eof() ) { std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; @@ -277,7 +277,7 @@ bool WRL2BASE::ReadNode( WRLPROC& proc, WRL2NODE* aParent, WRL2NODE** aNode ) { if( !implementUse( proc, aParent, aNode ) ) { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; std::cerr << proc.GetError() << "\n"; #endif @@ -292,7 +292,7 @@ bool WRL2BASE::ReadNode( WRLPROC& proc, WRL2NODE* aParent, WRL2NODE** aNode ) { if( !implementDef( proc, aParent, aNode ) ) { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; std::cerr << proc.GetError() << "\n"; #endif @@ -307,7 +307,7 @@ bool WRL2BASE::ReadNode( WRLPROC& proc, WRL2NODE* aParent, WRL2NODE** aNode ) { if( !proc.ReadName( glob ) || !proc.DiscardList() ) { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; std::cerr << proc.GetError() << "\n"; #endif @@ -322,7 +322,7 @@ bool WRL2BASE::ReadNode( WRLPROC& proc, WRL2NODE* aParent, WRL2NODE** aNode ) { if( !proc.ReadName( glob ) || !proc.ReadName( glob ) || !proc.DiscardList() ) { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; std::cerr << proc.GetError() << "\n"; #endif @@ -337,7 +337,7 @@ bool WRL2BASE::ReadNode( WRLPROC& proc, WRL2NODE* aParent, WRL2NODE** aNode ) { if( !proc.ReadGlob( glob ) || !proc.ReadGlob( glob ) || !proc.ReadGlob( glob ) ) { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; std::cerr << proc.GetError() << "\n"; #endif @@ -352,7 +352,7 @@ bool WRL2BASE::ReadNode( WRLPROC& proc, WRL2NODE* aParent, WRL2NODE** aNode ) size_t line = 0; size_t column = 0; proc.GetFilePosData( line, column ); - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 2 ) std::cerr << " * [INFO] Processing node '" << glob << "' ID: " << ntype << "\n"; #endif @@ -575,7 +575,7 @@ bool WRL2BASE::ReadNode( WRLPROC& proc, WRL2NODE* aParent, WRL2NODE** aNode ) if( !proc.DiscardNode() ) { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) std::cerr << proc.GetError() << "\n"; std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; std::cerr << " * [INFO] could not discard node at line " << line; diff --git a/plugins/3d/vrml/v2/vrml2_color.cpp b/plugins/3d/vrml/v2/vrml2_color.cpp index 6fdc60d507..7714d8a2d8 100644 --- a/plugins/3d/vrml/v2/vrml2_color.cpp +++ b/plugins/3d/vrml/v2/vrml2_color.cpp @@ -49,7 +49,7 @@ WRL2COLOR::WRL2COLOR( WRL2NODE* aParent ) : WRL2NODE() WRL2COLOR::~WRL2COLOR() { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 2 ) std::cerr << " * [INFO] Destroying Color node\n"; #endif return; @@ -102,7 +102,7 @@ bool WRL2COLOR::Read( WRLPROC& proc, WRL2BASE* aTopNode ) if( proc.eof() ) { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; std::cerr << " * [INFO] bad file format; unexpected eof at line "; std::cerr << line << ", column " << column << "\n"; @@ -112,7 +112,7 @@ bool WRL2COLOR::Read( WRLPROC& proc, WRL2BASE* aTopNode ) if( '{' != tok ) { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) std::cerr << proc.GetError() << "\n"; std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; std::cerr << " * [INFO] bad file format; expecting '{' but got '" << tok; @@ -133,7 +133,7 @@ bool WRL2COLOR::Read( WRLPROC& proc, WRL2BASE* aTopNode ) if( !proc.ReadName( glob ) ) { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; std::cerr << proc.GetError() << "\n"; #endif @@ -148,7 +148,7 @@ bool WRL2COLOR::Read( WRLPROC& proc, WRL2BASE* aTopNode ) { if( !proc.ReadMFVec3f( colors ) ) { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; std::cerr << " * [INFO] invalid color set at line " << line << ", column "; std::cerr << column << "\n"; @@ -160,7 +160,7 @@ bool WRL2COLOR::Read( WRLPROC& proc, WRL2BASE* aTopNode ) } else { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; std::cerr << " * [INFO] bad Color at line " << line << ", column "; std::cerr << column << "\n"; @@ -178,7 +178,7 @@ bool WRL2COLOR::Read( WRLPROC& proc, WRL2BASE* aTopNode ) proc.GetFilePosData( line, column ); - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; std::cerr << " * [INFO] bad Color at line " << line << ", column "; std::cerr << column << " (no closing brace)\n"; @@ -191,6 +191,6 @@ bool WRL2COLOR::Read( WRLPROC& proc, WRL2BASE* aTopNode ) SGNODE* WRL2COLOR::TranslateToSG( SGNODE* aParent, bool calcNormals ) { - // XXX - TO IMPLEMENT + // any data manipulation must be performed by the parent node return NULL; } diff --git a/plugins/3d/vrml/v2/vrml2_coords.cpp b/plugins/3d/vrml/v2/vrml2_coords.cpp index cf760a2416..cff7d2bb84 100644 --- a/plugins/3d/vrml/v2/vrml2_coords.cpp +++ b/plugins/3d/vrml/v2/vrml2_coords.cpp @@ -49,7 +49,7 @@ WRL2COORDS::WRL2COORDS( WRL2NODE* aParent ) : WRL2NODE() WRL2COORDS::~WRL2COORDS() { - #ifdef DEBUG_VRML2 +#if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 2 ) std::cerr << " * [INFO] Destroying Coordinate node\n"; #endif return; @@ -102,7 +102,7 @@ bool WRL2COORDS::Read( WRLPROC& proc, WRL2BASE* aTopNode ) if( proc.eof() ) { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; std::cerr << " * [INFO] bad file format; unexpected eof at line "; std::cerr << line << ", column " << column << "\n"; @@ -112,7 +112,7 @@ bool WRL2COORDS::Read( WRLPROC& proc, WRL2BASE* aTopNode ) if( '{' != tok ) { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) std::cerr << proc.GetError() << "\n"; std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; std::cerr << " * [INFO] bad file format; expecting '{' but got '" << tok; @@ -133,7 +133,7 @@ bool WRL2COORDS::Read( WRLPROC& proc, WRL2BASE* aTopNode ) if( !proc.ReadName( glob ) ) { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; std::cerr << proc.GetError() << "\n"; #endif @@ -148,7 +148,7 @@ bool WRL2COORDS::Read( WRLPROC& proc, WRL2BASE* aTopNode ) { if( !proc.ReadMFVec3f( points ) ) { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; std::cerr << " * [INFO] invalid point set at line " << line << ", column "; std::cerr << column << "\n"; @@ -160,7 +160,7 @@ bool WRL2COORDS::Read( WRLPROC& proc, WRL2BASE* aTopNode ) } else { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; std::cerr << " * [INFO] bad Coordinate at line " << line << ", column "; std::cerr << column << "\n"; @@ -178,7 +178,7 @@ bool WRL2COORDS::Read( WRLPROC& proc, WRL2BASE* aTopNode ) proc.GetFilePosData( line, column ); - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; std::cerr << " * [INFO] bad Coordinate at line " << line << ", column "; std::cerr << column << " (no closing brace)\n"; diff --git a/plugins/3d/vrml/v2/vrml2_faceset.cpp b/plugins/3d/vrml/v2/vrml2_faceset.cpp index 979fc6e4ac..879f448cdf 100644 --- a/plugins/3d/vrml/v2/vrml2_faceset.cpp +++ b/plugins/3d/vrml/v2/vrml2_faceset.cpp @@ -54,7 +54,7 @@ WRL2FACESET::WRL2FACESET( WRL2NODE* aParent ) : WRL2NODE() WRL2FACESET::~WRL2FACESET() { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 2 ) std::cerr << " * [INFO] Destroying IndexedFaceSet with " << m_Children.size(); std::cerr << " children, " << m_Refs.size() << " references and "; std::cerr << m_BackPointers.size() << " backpointers\n"; @@ -132,7 +132,7 @@ bool WRL2FACESET::AddRefNode( WRL2NODE* aNode ) if( !checkNodeType( type ) ) { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; std::cerr << " * [INFO] bad file format; unexpected child node '"; std::cerr << aNode->GetNodeTypeName( type ) << "'\n"; @@ -145,7 +145,7 @@ bool WRL2FACESET::AddRefNode( WRL2NODE* aNode ) { if( NULL != color ) { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; std::cerr << " * [INFO] bad file format; multiple color nodes\n"; #endif @@ -160,7 +160,7 @@ bool WRL2FACESET::AddRefNode( WRL2NODE* aNode ) { if( NULL != coord ) { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; std::cerr << " * [INFO] bad file format; multiple coordinate nodes\n"; #endif @@ -175,7 +175,7 @@ bool WRL2FACESET::AddRefNode( WRL2NODE* aNode ) { if( NULL != normal ) { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; std::cerr << " * [INFO] bad file format; multiple normal nodes\n"; #endif @@ -197,7 +197,7 @@ bool WRL2FACESET::AddRefNode( WRL2NODE* aNode ) if( NULL != texCoord ) { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; std::cerr << " * [INFO] bad file format; multiple texCoord nodes\n"; #endif @@ -225,7 +225,7 @@ bool WRL2FACESET::AddChildNode( WRL2NODE* aNode ) if( !checkNodeType( type ) ) { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; std::cerr << " * [INFO] bad file format; unexpected child node '"; std::cerr << aNode->GetNodeTypeName( type ) << "'\n"; @@ -238,7 +238,7 @@ bool WRL2FACESET::AddChildNode( WRL2NODE* aNode ) { if( NULL != color ) { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; std::cerr << " * [INFO] bad file format; multiple color nodes\n"; #endif @@ -253,7 +253,7 @@ bool WRL2FACESET::AddChildNode( WRL2NODE* aNode ) { if( NULL != coord ) { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; std::cerr << " * [INFO] bad file format; multiple coordinate nodes\n"; #endif @@ -268,7 +268,7 @@ bool WRL2FACESET::AddChildNode( WRL2NODE* aNode ) { if( NULL != normal ) { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; std::cerr << " * [INFO] bad file format; multiple normal nodes\n"; #endif @@ -290,7 +290,7 @@ bool WRL2FACESET::AddChildNode( WRL2NODE* aNode ) if( NULL != texCoord ) { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; std::cerr << " * [INFO] bad file format; multiple texCoord nodes\n"; #endif @@ -312,7 +312,7 @@ bool WRL2FACESET::Read( WRLPROC& proc, WRL2BASE* aTopNode ) if( proc.eof() ) { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; std::cerr << " * [INFO] bad file format; unexpected eof at line "; std::cerr << line << ", column " << column << "\n"; @@ -322,7 +322,7 @@ bool WRL2FACESET::Read( WRLPROC& proc, WRL2BASE* aTopNode ) if( '{' != tok ) { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) std::cerr << proc.GetError() << "\n"; std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; std::cerr << " * [INFO] bad file format; expecting '{' but got '" << tok; @@ -345,7 +345,7 @@ bool WRL2FACESET::Read( WRLPROC& proc, WRL2BASE* aTopNode ) if( !proc.ReadName( glob ) ) { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; std::cerr << proc.GetError() << "\n"; #endif @@ -378,7 +378,7 @@ bool WRL2FACESET::Read( WRLPROC& proc, WRL2BASE* aTopNode ) { if( !proc.ReadSFBool( ccw ) ) { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; std::cerr << " * [INFO] invalid ccw at line " << line << ", column "; std::cerr << column << "\n"; @@ -392,7 +392,7 @@ bool WRL2FACESET::Read( WRLPROC& proc, WRL2BASE* aTopNode ) { if( !proc.ReadSFBool( colorPerVertex ) ) { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; std::cerr << " * [INFO] invalid colorPerVertex at line " << line << ", column "; std::cerr << column << "\n"; @@ -406,7 +406,7 @@ bool WRL2FACESET::Read( WRLPROC& proc, WRL2BASE* aTopNode ) { if( !proc.ReadSFBool( convex ) ) { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; std::cerr << " * [INFO] invalid convex at line " << line << ", column "; std::cerr << column << "\n"; @@ -420,7 +420,7 @@ bool WRL2FACESET::Read( WRLPROC& proc, WRL2BASE* aTopNode ) { if( !proc.ReadSFBool( normalPerVertex ) ) { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; std::cerr << " * [INFO] invalid normalPerVertex at line " << line << ", column "; std::cerr << column << "\n"; @@ -434,7 +434,7 @@ bool WRL2FACESET::Read( WRLPROC& proc, WRL2BASE* aTopNode ) { if( !proc.ReadSFBool( solid ) ) { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; std::cerr << " * [INFO] invalid solid at line " << line << ", column "; std::cerr << column << "\n"; @@ -448,7 +448,7 @@ bool WRL2FACESET::Read( WRLPROC& proc, WRL2BASE* aTopNode ) { if( !proc.ReadSFFloat( creaseAngle ) ) { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; std::cerr << " * [INFO] invalid creaseAngle at line " << line << ", column "; std::cerr << column << "\n"; @@ -462,7 +462,7 @@ bool WRL2FACESET::Read( WRLPROC& proc, WRL2BASE* aTopNode ) { if( !proc.ReadMFInt( colorIndex ) ) { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; std::cerr << " * [INFO] invalid colorIndex at line " << line << ", column "; std::cerr << column << "\n"; @@ -476,7 +476,7 @@ bool WRL2FACESET::Read( WRLPROC& proc, WRL2BASE* aTopNode ) { if( !proc.ReadMFInt( coordIndex ) ) { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; std::cerr << " * [INFO] invalid coordIndex at line " << line << ", column "; std::cerr << column << "\n"; @@ -490,7 +490,7 @@ bool WRL2FACESET::Read( WRLPROC& proc, WRL2BASE* aTopNode ) { if( !proc.ReadMFInt( normalIndex ) ) { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; std::cerr << " * [INFO] invalid normalIndex at line " << line << ", column "; std::cerr << column << "\n"; @@ -504,7 +504,7 @@ bool WRL2FACESET::Read( WRLPROC& proc, WRL2BASE* aTopNode ) { if( !aTopNode->ReadNode( proc, this, NULL ) ) { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; std::cerr << " * [INFO] could not read color node information\n"; #endif @@ -515,7 +515,7 @@ bool WRL2FACESET::Read( WRLPROC& proc, WRL2BASE* aTopNode ) { if( !aTopNode->ReadNode( proc, this, NULL ) ) { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; std::cerr << " * [INFO] could not read coord node information\n"; #endif @@ -526,7 +526,7 @@ bool WRL2FACESET::Read( WRLPROC& proc, WRL2BASE* aTopNode ) { if( !aTopNode->ReadNode( proc, this, NULL ) ) { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; std::cerr << " * [INFO] could not read normal node information\n"; #endif @@ -537,7 +537,7 @@ bool WRL2FACESET::Read( WRLPROC& proc, WRL2BASE* aTopNode ) { if( !aTopNode->ReadNode( proc, this, NULL ) ) { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; std::cerr << " * [INFO] could not read texCoord node information\n"; #endif @@ -546,7 +546,7 @@ bool WRL2FACESET::Read( WRLPROC& proc, WRL2BASE* aTopNode ) } else { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; std::cerr << " * [INFO] bad IndexedFaceSet at line " << line << ", column "; std::cerr << column << "\n"; diff --git a/plugins/3d/vrml/v2/vrml2_material.cpp b/plugins/3d/vrml/v2/vrml2_material.cpp index 35518fad70..4c09366437 100644 --- a/plugins/3d/vrml/v2/vrml2_material.cpp +++ b/plugins/3d/vrml/v2/vrml2_material.cpp @@ -52,7 +52,7 @@ WRL2MATERIAL::WRL2MATERIAL( WRL2NODE* aParent ) : WRL2NODE() WRL2MATERIAL::~WRL2MATERIAL() { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 2 ) std::cerr << " * [INFO] Destroying Material node\n"; #endif @@ -136,7 +136,7 @@ bool WRL2MATERIAL::Read( WRLPROC& proc, WRL2BASE* aTopNode ) if( proc.eof() ) { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; std::cerr << " * [INFO] bad file format; unexpected eof at line "; std::cerr << line << ", column " << column << "\n"; @@ -146,7 +146,7 @@ bool WRL2MATERIAL::Read( WRLPROC& proc, WRL2BASE* aTopNode ) if( '{' != tok ) { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) std::cerr << proc.GetError() << "\n"; std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; std::cerr << " * [INFO] bad file format; expecting '{' but got '" << tok; @@ -169,7 +169,7 @@ bool WRL2MATERIAL::Read( WRLPROC& proc, WRL2BASE* aTopNode ) if( !proc.ReadName( glob ) ) { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; std::cerr << proc.GetError() << "\n"; #endif @@ -191,7 +191,7 @@ bool WRL2MATERIAL::Read( WRLPROC& proc, WRL2BASE* aTopNode ) { if( !proc.ReadSFVec3f( specularColor ) ) { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; std::cerr << " * [INFO] invalid specularColor at line " << line << ", column "; std::cerr << column << "\n"; @@ -205,7 +205,7 @@ bool WRL2MATERIAL::Read( WRLPROC& proc, WRL2BASE* aTopNode ) { if( !proc.ReadSFVec3f( diffuseColor ) ) { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; std::cerr << " * [INFO] invalid diffuseColor at line " << line << ", column "; std::cerr << column << "\n"; @@ -219,7 +219,7 @@ bool WRL2MATERIAL::Read( WRLPROC& proc, WRL2BASE* aTopNode ) { if( !proc.ReadSFVec3f( emissiveColor ) ) { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; std::cerr << " * [INFO] invalid emissiveColor at line " << line << ", column "; std::cerr << column << "\n"; @@ -233,7 +233,7 @@ bool WRL2MATERIAL::Read( WRLPROC& proc, WRL2BASE* aTopNode ) { if( !proc.ReadSFFloat( shininess ) ) { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; std::cerr << " * [INFO] invalid shininess at line " << line << ", column "; std::cerr << column << "\n"; @@ -247,7 +247,7 @@ bool WRL2MATERIAL::Read( WRLPROC& proc, WRL2BASE* aTopNode ) { if( !proc.ReadSFFloat( transparency ) ) { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; std::cerr << " * [INFO] invalid transparency at line " << line << ", column "; std::cerr << column << "\n"; @@ -261,7 +261,7 @@ bool WRL2MATERIAL::Read( WRLPROC& proc, WRL2BASE* aTopNode ) { if( !proc.ReadSFFloat( ambientIntensity ) ) { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; std::cerr << " * [INFO] invalid ambientIntensity at line " << line << ", column "; std::cerr << column << "\n"; @@ -273,7 +273,7 @@ bool WRL2MATERIAL::Read( WRLPROC& proc, WRL2BASE* aTopNode ) } else { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; std::cerr << " * [INFO] bad Material at line " << line << ", column "; std::cerr << column << "\n"; diff --git a/plugins/3d/vrml/v2/vrml2_node.cpp b/plugins/3d/vrml/v2/vrml2_node.cpp index 7b9b2b3515..9681904eed 100644 --- a/plugins/3d/vrml/v2/vrml2_node.cpp +++ b/plugins/3d/vrml/v2/vrml2_node.cpp @@ -218,7 +218,7 @@ bool WRL2NODE::SetName( const std::string& aName ) if( item != badNames.end() ) { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; std::cerr << " * [INFO] invalid node name '" << *item << "' (matches restricted word)\n"; #endif @@ -228,7 +228,7 @@ bool WRL2NODE::SetName( const std::string& aName ) if( isdigit( aName[0] ) ) { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; std::cerr << " * [INFO] invalid node name '" << *item << "' (begins with digit)\n"; #endif @@ -244,7 +244,7 @@ bool WRL2NODE::SetName( const std::string& aName ) if( std::string::npos != aName.find_first_of( BAD_CHARS1 ) || std::string::npos != aName.find_first_of( BAD_CHARS2 ) ) { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; std::cerr << " * [INFO] invalid node name '" << aName; std::cerr<< "' (contains invalid character)\n"; diff --git a/plugins/3d/vrml/v2/vrml2_norms.cpp b/plugins/3d/vrml/v2/vrml2_norms.cpp index 9f42896e7e..7789a2974c 100644 --- a/plugins/3d/vrml/v2/vrml2_norms.cpp +++ b/plugins/3d/vrml/v2/vrml2_norms.cpp @@ -49,7 +49,7 @@ WRL2NORMS::WRL2NORMS( WRL2NODE* aParent ) : WRL2NODE() WRL2NORMS::~WRL2NORMS() { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 3 ) std::cerr << " * [INFO] Destroying Normal node\n"; #endif return; @@ -102,7 +102,7 @@ bool WRL2NORMS::Read( WRLPROC& proc, WRL2BASE* aTopNode ) if( proc.eof() ) { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; std::cerr << " * [INFO] bad file format; unexpected eof at line "; std::cerr << line << ", column " << column << "\n"; @@ -112,7 +112,7 @@ bool WRL2NORMS::Read( WRLPROC& proc, WRL2BASE* aTopNode ) if( '{' != tok ) { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) std::cerr << proc.GetError() << "\n"; std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; std::cerr << " * [INFO] bad file format; expecting '{' but got '" << tok; @@ -133,7 +133,7 @@ bool WRL2NORMS::Read( WRLPROC& proc, WRL2BASE* aTopNode ) if( !proc.ReadName( glob ) ) { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; std::cerr << proc.GetError() << "\n"; #endif @@ -148,7 +148,7 @@ bool WRL2NORMS::Read( WRLPROC& proc, WRL2BASE* aTopNode ) { if( !proc.ReadMFVec3f( vectors ) ) { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; std::cerr << " * [INFO] invalid vector set at line " << line << ", column "; std::cerr << column << "\n"; @@ -160,7 +160,7 @@ bool WRL2NORMS::Read( WRLPROC& proc, WRL2BASE* aTopNode ) } else { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; std::cerr << " * [INFO] bad Normal at line " << line << ", column "; std::cerr << column << "\n"; @@ -178,7 +178,7 @@ bool WRL2NORMS::Read( WRLPROC& proc, WRL2BASE* aTopNode ) proc.GetFilePosData( line, column ); - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; std::cerr << " * [INFO] bad Normal at line " << line << ", column "; std::cerr << column << " (no closing brace)\n"; diff --git a/plugins/3d/vrml/v2/vrml2_shape.cpp b/plugins/3d/vrml/v2/vrml2_shape.cpp index 22ef3e06c4..442c9cb666 100644 --- a/plugins/3d/vrml/v2/vrml2_shape.cpp +++ b/plugins/3d/vrml/v2/vrml2_shape.cpp @@ -54,7 +54,7 @@ WRL2SHAPE::WRL2SHAPE( WRL2NODE* aParent ) : WRL2NODE() WRL2SHAPE::~WRL2SHAPE() { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 2 ) std::cerr << " * [INFO] Destroying Shape with " << m_Children.size(); std::cerr << " children, " << m_Refs.size() << " references and "; std::cerr << m_BackPointers.size() << " backpointers\n"; @@ -90,7 +90,7 @@ bool WRL2SHAPE::AddRefNode( WRL2NODE* aNode ) if( !checkNodeType( type ) ) { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; std::cerr << " * [INFO] bad file format; unexpected child node '"; std::cerr << aNode->GetNodeTypeName( type ) << "'\n"; @@ -103,7 +103,7 @@ bool WRL2SHAPE::AddRefNode( WRL2NODE* aNode ) { if( NULL != appearance ) { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; std::cerr << " * [INFO] bad file format; multiple appearance nodes\n"; #endif @@ -116,7 +116,7 @@ bool WRL2SHAPE::AddRefNode( WRL2NODE* aNode ) if( NULL != geometry ) { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; std::cerr << " * [INFO] bad file format; multiple geometry nodes\n"; #endif @@ -144,7 +144,7 @@ bool WRL2SHAPE::AddChildNode( WRL2NODE* aNode ) if( !checkNodeType( type ) ) { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; std::cerr << " * [INFO] bad file format; unexpected child node '"; std::cerr << aNode->GetNodeTypeName( type ) << "'\n"; @@ -157,7 +157,7 @@ bool WRL2SHAPE::AddChildNode( WRL2NODE* aNode ) { if( NULL != appearance ) { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; std::cerr << " * [INFO] bad file format; multiple appearance nodes\n"; #endif @@ -170,7 +170,7 @@ bool WRL2SHAPE::AddChildNode( WRL2NODE* aNode ) if( NULL != geometry ) { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; std::cerr << " * [INFO] bad file format; multiple geometry nodes\n"; #endif @@ -226,7 +226,7 @@ bool WRL2SHAPE::Read( WRLPROC& proc, WRL2BASE* aTopNode ) if( proc.eof() ) { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; std::cerr << " * [INFO] bad file format; unexpected eof at line "; std::cerr << line << ", column " << column << "\n"; @@ -236,7 +236,7 @@ bool WRL2SHAPE::Read( WRLPROC& proc, WRL2BASE* aTopNode ) if( '{' != tok ) { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) std::cerr << proc.GetError() << "\n"; std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; std::cerr << " * [INFO] bad file format; expecting '{' but got '" << tok; @@ -259,7 +259,7 @@ bool WRL2SHAPE::Read( WRLPROC& proc, WRL2BASE* aTopNode ) if( !proc.ReadName( glob ) ) { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; std::cerr << proc.GetError() << "\n"; #endif @@ -277,7 +277,7 @@ bool WRL2SHAPE::Read( WRLPROC& proc, WRL2BASE* aTopNode ) { if( !aTopNode->ReadNode( proc, this, NULL ) ) { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; std::cerr << " * [INFO] could not read appearance information\n"; #endif @@ -288,7 +288,7 @@ bool WRL2SHAPE::Read( WRLPROC& proc, WRL2BASE* aTopNode ) { if( !aTopNode->ReadNode( proc, this, NULL ) ) { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; std::cerr << " * [INFO] could not read geometry information\n"; #endif @@ -297,7 +297,7 @@ bool WRL2SHAPE::Read( WRLPROC& proc, WRL2BASE* aTopNode ) } else { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; std::cerr << " * [INFO] bad Shape at line " << line << ", column "; std::cerr << column << "\n"; diff --git a/plugins/3d/vrml/v2/vrml2_transform.cpp b/plugins/3d/vrml/v2/vrml2_transform.cpp index 1f5a3ff4b0..875fc18b9b 100644 --- a/plugins/3d/vrml/v2/vrml2_transform.cpp +++ b/plugins/3d/vrml/v2/vrml2_transform.cpp @@ -49,7 +49,7 @@ WRL2TRANSFORM::WRL2TRANSFORM( WRL2NODE* aParent ) : WRL2NODE() WRL2TRANSFORM::~WRL2TRANSFORM() { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 2 ) std::cerr << " * [INFO] Destroying Transform with " << m_Children.size(); std::cerr << " children, " << m_Refs.size() << " references and "; std::cerr << m_BackPointers.size() << " backpointers\n"; @@ -120,7 +120,7 @@ bool WRL2TRANSFORM::Read( WRLPROC& proc, WRL2BASE* aTopNode ) if( proc.eof() ) { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; std::cerr << " * [INFO] bad file format; unexpected eof at line "; std::cerr << line << ", column " << column << "\n"; @@ -130,7 +130,7 @@ bool WRL2TRANSFORM::Read( WRLPROC& proc, WRL2BASE* aTopNode ) if( '{' != tok ) { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) std::cerr << proc.GetError() << "\n"; std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; std::cerr << " * [INFO] bad file format; expecting '{' but got '" << tok; @@ -153,7 +153,7 @@ bool WRL2TRANSFORM::Read( WRLPROC& proc, WRL2BASE* aTopNode ) if( !proc.ReadName( glob ) ) { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; std::cerr << proc.GetError() << "\n"; #endif @@ -175,7 +175,7 @@ bool WRL2TRANSFORM::Read( WRLPROC& proc, WRL2BASE* aTopNode ) { if( !proc.ReadSFVec3f( center ) ) { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; std::cerr << " * [INFO] invalid center at line " << line << ", column "; std::cerr << column << "\n"; @@ -189,7 +189,7 @@ bool WRL2TRANSFORM::Read( WRLPROC& proc, WRL2BASE* aTopNode ) { if( !proc.ReadSFRotation( rotation ) ) { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; std::cerr << " * [INFO] invalid rotation at line " << line << ", column "; std::cerr << column << "\n"; @@ -203,7 +203,7 @@ bool WRL2TRANSFORM::Read( WRLPROC& proc, WRL2BASE* aTopNode ) { if( !proc.ReadSFVec3f( scale ) ) { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; std::cerr << " * [INFO] invalid scale at line " << line << ", column "; std::cerr << column << "\n"; @@ -217,7 +217,7 @@ bool WRL2TRANSFORM::Read( WRLPROC& proc, WRL2BASE* aTopNode ) { if( !proc.ReadSFRotation( scaleOrientation ) ) { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; std::cerr << " * [INFO] invalid scaleOrientation at line " << line << ", column "; std::cerr << column << "\n"; @@ -231,7 +231,7 @@ bool WRL2TRANSFORM::Read( WRLPROC& proc, WRL2BASE* aTopNode ) { if( !proc.ReadSFVec3f( translation ) ) { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; std::cerr << " * [INFO] invalid translation at line " << line << ", column "; std::cerr << column << "\n"; @@ -248,7 +248,7 @@ bool WRL2TRANSFORM::Read( WRLPROC& proc, WRL2BASE* aTopNode ) } else { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; std::cerr << " * [INFO] bad Transform at line " << line << ", column "; std::cerr << column << "\n"; @@ -300,7 +300,7 @@ bool WRL2TRANSFORM::readChildren( WRLPROC& proc, WRL2BASE* aTopNode ) if( proc.eof() ) { - #ifdef DEBUG_VRML2 + #if defined( DEBUG_VRML2 ) && ( DEBUG_VRML2 > 1 ) std::cerr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n"; std::cerr << " * [INFO] bad file format; unexpected eof at line "; std::cerr << line << ", column " << column << "\n"; diff --git a/plugins/3d/vrml/vrml.cpp b/plugins/3d/vrml/vrml.cpp index 5c3932d17b..9e58128e6f 100644 --- a/plugins/3d/vrml/vrml.cpp +++ b/plugins/3d/vrml/vrml.cpp @@ -217,7 +217,7 @@ SCENEGRAPH* Load( char const* aFileName ) } // DEBUG: WRITE OUT VRML2 FILE TO CONFIRM STRUCTURE - #ifdef DEBUG + #if defined( DEBUG_VRML1 ) || defined( DEBUG_VRML2 ) if( scene ) { wxFileName fn( wxString::FromUTF8Unchecked( aFileName ) );