From fe87b092467b32104a146b43a2d93f6e219f0562 Mon Sep 17 00:00:00 2001 From: Jonne Nauha Date: Fri, 30 May 2014 01:57:21 +0300 Subject: [PATCH 1/2] Move pstdint.h for <= VC9 under include. Apps that include the Assimp headers need to have this available, as its pulled in by metadata.h. Fixes #290. --- code/AssimpPCH.h | 2 +- code/CMakeLists.txt | 2 +- {code => include/assimp/Compiler}/pstdint.h | 0 include/assimp/metadata.h | 2 +- 4 files changed, 3 insertions(+), 3 deletions(-) rename {code => include/assimp/Compiler}/pstdint.h (100%) diff --git a/code/AssimpPCH.h b/code/AssimpPCH.h index c41915e9b..548d13175 100644 --- a/code/AssimpPCH.h +++ b/code/AssimpPCH.h @@ -56,7 +56,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // Include our stdint.h replacement header for MSVC, take the global header for gcc/mingw #if defined( _MSC_VER) && (_MSC_VER < 1600) -# include "pstdint.h" +# include "../include/assimp/Compiler/pstdint.h" #else # include #endif diff --git a/code/CMakeLists.txt b/code/CMakeLists.txt index 8dbb0962f..f9a09378e 100644 --- a/code/CMakeLists.txt +++ b/code/CMakeLists.txt @@ -10,7 +10,7 @@ SET( HEADER_PATH ../include/assimp ) SET( COMPILER_HEADERS ${HEADER_PATH}/Compiler/pushpack1.h ${HEADER_PATH}/Compiler/poppack1.h - pstdint.h + ${HEADER_PATH}/Compiler/pstdint.h ) SOURCE_GROUP( Compiler FILES ${COMPILER_HEADERS}) diff --git a/code/pstdint.h b/include/assimp/Compiler/pstdint.h similarity index 100% rename from code/pstdint.h rename to include/assimp/Compiler/pstdint.h diff --git a/include/assimp/metadata.h b/include/assimp/metadata.h index 8c8880e81..16809a511 100644 --- a/include/assimp/metadata.h +++ b/include/assimp/metadata.h @@ -48,7 +48,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #if defined(_MSC_VER) && (_MSC_VER <= 1500) -#include "pstdint.h" +#include "Compiler/pstdint.h" #else #include #endif From 199d45526120cc1f2ff3ca87fa299dbd7fbec7ec Mon Sep 17 00:00:00 2001 From: Jonne Nauha Date: Fri, 30 May 2014 02:01:29 +0300 Subject: [PATCH 2/2] Make aiMatrix4x4t ctor that takes in pos, rot and scale take in const refs. Fixes #284. --- include/assimp/matrix4x4.h | 4 ++-- include/assimp/matrix4x4.inl | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/assimp/matrix4x4.h b/include/assimp/matrix4x4.h index 7c6905107..33f5a15b1 100644 --- a/include/assimp/matrix4x4.h +++ b/include/assimp/matrix4x4.h @@ -84,8 +84,8 @@ public: * @param rotation The rotation as a hamilton quaternion * @param position The position for the x,y,z axes */ - aiMatrix4x4t(aiVector3t& scaling, aiQuaterniont& rotation, - aiVector3t& position); + aiMatrix4x4t(const aiVector3t& scaling, const aiQuaterniont& rotation, + const aiVector3t& position); public: diff --git a/include/assimp/matrix4x4.inl b/include/assimp/matrix4x4.inl index 2d30796ab..8cde4773c 100644 --- a/include/assimp/matrix4x4.inl +++ b/include/assimp/matrix4x4.inl @@ -109,7 +109,7 @@ inline aiMatrix4x4t::aiMatrix4x4t (const aiMatrix3x3t& m) // ---------------------------------------------------------------------------------------- template -inline aiMatrix4x4t::aiMatrix4x4t (aiVector3t& scaling, aiQuaterniont& rotation, aiVector3t& position) +inline aiMatrix4x4t::aiMatrix4x4t (const aiVector3t& scaling, const aiQuaterniont& rotation, const aiVector3t& position) { // build a 3x3 rotation matrix aiMatrix3x3t m = rotation.GetMatrix();