From 84939d5aecc168747420d20001077977f032f1bc Mon Sep 17 00:00:00 2001 From: ulfjorensen Date: Thu, 20 Dec 2012 11:43:09 +0000 Subject: [PATCH] - fixed preprocessor checks for some importers - fixed warning about shadowing variables in quaternion.h git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@1346 67173fc5-114c-0410-ac8e-9d2fd5bffc1f --- code/ASEParser.cpp | 3 +++ code/IRRLoader.cpp | 4 ++++ code/IRRMeshLoader.cpp | 4 ++++ code/IRRShared.cpp | 4 ++++ code/LWSLoader.cpp | 3 +++ code/Q3BSPFileParser.cpp | 5 +++++ code/Q3BSPZipArchive.cpp | 5 +++++ include/assimp/quaternion.h | 4 ++-- 8 files changed, 30 insertions(+), 2 deletions(-) diff --git a/code/ASEParser.cpp b/code/ASEParser.cpp index 2cbad8499..04cd871ff 100644 --- a/code/ASEParser.cpp +++ b/code/ASEParser.cpp @@ -44,6 +44,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "AssimpPCH.h" +#ifndef ASSIMP_BUILD_NO_ASE_IMPORTER // internal headers #include "TextureTransform.h" @@ -2148,3 +2149,5 @@ void Parser::ParseLV4MeshLong(unsigned int& iOut) // parse the value iOut = strtoul10(filePtr,&filePtr); } + +#endif // !! ASSIMP_BUILD_NO_BASE_IMPORTER diff --git a/code/IRRLoader.cpp b/code/IRRLoader.cpp index 253b333f4..eab7d3eee 100644 --- a/code/IRRLoader.cpp +++ b/code/IRRLoader.cpp @@ -45,6 +45,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "AssimpPCH.h" +#ifndef ASSIMP_BUILD_NO_IRR_IMPORTER + #include "IRRLoader.h" #include "ParsingUtils.h" #include "fast_atof.h" @@ -1471,3 +1473,5 @@ void IRRImporter::InternReadFile( const std::string& pFile, */ return; } + +#endif // !! ASSIMP_BUILD_NO_IRR_IMPORTER diff --git a/code/IRRMeshLoader.cpp b/code/IRRMeshLoader.cpp index 84f7169c7..b27b2eaac 100644 --- a/code/IRRMeshLoader.cpp +++ b/code/IRRMeshLoader.cpp @@ -43,6 +43,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "AssimpPCH.h" +#ifndef ASSIMP_BUILD_NO_IRR_IMPORTER + #include "IRRMeshLoader.h" #include "ParsingUtils.h" #include "fast_atof.h" @@ -509,3 +511,5 @@ void IRRMeshImporter::InternReadFile( const std::string& pFile, delete reader; AI_DEBUG_INVALIDATE_PTR(reader); } + +#endif // !! ASSIMP_BUILD_NO_IRR_IMPORTER diff --git a/code/IRRShared.cpp b/code/IRRShared.cpp index f3faff878..bd95de1d1 100644 --- a/code/IRRShared.cpp +++ b/code/IRRShared.cpp @@ -45,6 +45,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "AssimpPCH.h" +#ifndef ASSIMP_BUILD_NO_IRR_IMPORTER + #include "IRRShared.h" #include "ParsingUtils.h" #include "fast_atof.h" @@ -494,3 +496,5 @@ aiMaterial* IrrlichtBase::ParseMaterial(unsigned int& matFlags) DefaultLogger::get()->error("IRRMESH: Unexpected end of file. Material is not complete"); return mat; } + +#endif // !! ASSIMP_BUILD_NO_IRR_IMPORTER diff --git a/code/LWSLoader.cpp b/code/LWSLoader.cpp index 9058f9169..bd1c78072 100644 --- a/code/LWSLoader.cpp +++ b/code/LWSLoader.cpp @@ -44,6 +44,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "AssimpPCH.h" +#ifndef ASSIMP_BUILD_NO_LWS_IMPORTER #include "LWSLoader.h" #include "ParsingUtils.h" @@ -915,3 +916,5 @@ void LWSImporter::InternReadFile( const std::string& pFile, aiScene* pScene, } } + +#endif // !! ASSIMP_BUILD_NO_LWS_IMPORTER diff --git a/code/Q3BSPFileParser.cpp b/code/Q3BSPFileParser.cpp index 57382c68c..600a20f2b 100644 --- a/code/Q3BSPFileParser.cpp +++ b/code/Q3BSPFileParser.cpp @@ -38,6 +38,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ---------------------------------------------------------------------- */ #include "AssimpPCH.h" + +#ifndef ASSIMP_BUILD_NO_Q3BSP_IMPORTER + #include "Q3BSPFileParser.h" #include "DefaultIOSystem.h" #include "Q3BSPFileData.h" @@ -273,3 +276,5 @@ void Q3BSPFileParser::getEntities() // ------------------------------------------------------------------------------------------------ } // Namespace Assimp + +#endif // ASSIMP_BUILD_NO_Q3BSP_IMPORTER diff --git a/code/Q3BSPZipArchive.cpp b/code/Q3BSPZipArchive.cpp index 4d80352ed..e01ed3fec 100644 --- a/code/Q3BSPZipArchive.cpp +++ b/code/Q3BSPZipArchive.cpp @@ -39,6 +39,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "AssimpPCH.h" + +#ifndef ASSIMP_BUILD_NO_Q3BSP_IMPORTER + #include "Q3BSPZipArchive.h" #include #include @@ -194,3 +197,5 @@ bool Q3BSPZipArchive::mapArchive() } // Namespace Q3BSP } // Namespace Assimp + +#endif // ASSIMP_BUILD_NO_Q3BSP_IMPORTER diff --git a/include/assimp/quaternion.h b/include/assimp/quaternion.h index c404af5ea..112d5766d 100644 --- a/include/assimp/quaternion.h +++ b/include/assimp/quaternion.h @@ -56,8 +56,8 @@ class aiQuaterniont { public: aiQuaterniont() : w(), x(), y(), z() {} - aiQuaterniont(TReal w, TReal x, TReal y, TReal z) - : w(w), x(x), y(y), z(z) {} + aiQuaterniont(TReal pw, TReal px, TReal py, TReal pz) + : w(pw), x(px), y(py), z(pz) {} /** Construct from rotation matrix. Result is undefined if the matrix is not orthonormal. */ aiQuaterniont( const aiMatrix3x3t& pRotMatrix);