Ver Fonte

Introduce interpolation mode to vectro and quaternion keys

Kim Kulling há 1 ano atrás
pai
commit
da281b7f48

+ 0 - 3
code/AssetLib/Step/StepExporter.cpp

@@ -4,7 +4,6 @@ Open Asset Import Library (assimp)
 
 
 Copyright (c) 2006-2024, assimp team
 Copyright (c) 2006-2024, assimp team
 
 
-
 All rights reserved.
 All rights reserved.
 
 
 Redistribution and use of this software in source and binary forms,
 Redistribution and use of this software in source and binary forms,
@@ -37,11 +36,9 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
-@author: Richard Steffen, 2015
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
 */
 */
 
 
-
 #ifndef ASSIMP_BUILD_NO_EXPORT
 #ifndef ASSIMP_BUILD_NO_EXPORT
 #ifndef ASSIMP_BUILD_NO_STEP_EXPORTER
 #ifndef ASSIMP_BUILD_NO_STEP_EXPORTER
 
 

+ 39 - 37
code/AssetLib/USD/USDLoader.cpp

@@ -1,43 +1,46 @@
 /*
 /*
----------------------------------------------------------------------------
 Open Asset Import Library (assimp)
 Open Asset Import Library (assimp)
----------------------------------------------------------------------------
+----------------------------------------------------------------------
 
 
 Copyright (c) 2006-2024, assimp team
 Copyright (c) 2006-2024, assimp team
 
 
-                          All rights reserved.
-
-                          Redistribution and use of this software in source and binary forms,
-        with or without modification, are permitted provided that the following
-        conditions are met:
-
-        * Redistributions of source code must retain the above
-        copyright notice, this list of conditions and the
-        following disclaimer.
-
-                * Redistributions in binary form must reproduce the above
-        copyright notice, this list of conditions and the
-                        following disclaimer in the documentation and/or other
-                   materials provided with the distribution.
-
-                           * Neither the name of the assimp team, nor the names of its
-                contributors may be used to endorse or promote products
-                   derived from this software without specific prior
-                   written permission of the assimp team.
-
-                   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-                   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-        LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-        A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-        OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-        SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-                                                    LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-                                 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-        THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-        (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-        OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-                ---------------------------------------------------------------------------
-                */
+
+All rights reserved.
+
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the
+following conditions are met:
+
+* Redistributions of source code must retain the above
+  copyright notice, this list of conditions and the
+  following disclaimer.
+
+* Redistributions in binary form must reproduce the above
+  copyright notice, this list of conditions and the
+  following disclaimer in the documentation and/or other
+  materials provided with the distribution.
+
+* Neither the name of the assimp team, nor the names of its
+  contributors may be used to endorse or promote products
+  derived from this software without specific prior
+  written permission of the assimp team.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+@author: Richard Steffen, 2014
+
+----------------------------------------------------------------------
+*/
 
 
 /** @file  USDLoader.cpp
 /** @file  USDLoader.cpp
  *  @brief Implementation of the USD importer class
  *  @brief Implementation of the USD importer class
@@ -87,8 +90,7 @@ USDImporter::USDImporter() :
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
 
 
-bool USDImporter::CanRead(const std::string &pFile, IOSystem *pIOHandler, bool checkSig) const {
-    UNUSED(checkSig);
+bool USDImporter::CanRead(const std::string &pFile, IOSystem *pIOHandler, bool) const {
     // Based on token
     // Based on token
     static const uint32_t usdcTokens[] = { AI_MAKE_MAGIC("PXR-USDC") };
     static const uint32_t usdcTokens[] = { AI_MAKE_MAGIC("PXR-USDC") };
     bool canRead = CheckMagicToken(pIOHandler, pFile, usdcTokens, AI_COUNT_OF(usdcTokens));
     bool canRead = CheckMagicToken(pIOHandler, pFile, usdcTokens, AI_COUNT_OF(usdcTokens));

+ 37 - 33
code/AssetLib/USD/USDLoader.h

@@ -4,39 +4,43 @@ Open Asset Import Library (assimp)
 
 
 Copyright (c) 2006-2024, assimp team
 Copyright (c) 2006-2024, assimp team
 
 
-                          All rights reserved.
-
-                          Redistribution and use of this software in source and binary forms,
-        with or without modification, are permitted provided that the
-        following conditions are met:
-
-        * Redistributions of source code must retain the above
-        copyright notice, this list of conditions and the
-        following disclaimer.
-
-                * Redistributions in binary form must reproduce the above
-        copyright notice, this list of conditions and the
-                        following disclaimer in the documentation and/or other
-                   materials provided with the distribution.
-
-                           * Neither the name of the assimp team, nor the names of its
-                contributors may be used to endorse or promote products
-                   derived from this software without specific prior
-                   written permission of the assimp team.
-
-                   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-                   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-        LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-        A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-        OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-        SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-                                                    LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-                                 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-        THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-        (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-        OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-                ----------------------------------------------------------------------
-                */
+
+All rights reserved.
+
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the
+following conditions are met:
+
+* Redistributions of source code must retain the above
+  copyright notice, this list of conditions and the
+  following disclaimer.
+
+* Redistributions in binary form must reproduce the above
+  copyright notice, this list of conditions and the
+  following disclaimer in the documentation and/or other
+  materials provided with the distribution.
+
+* Neither the name of the assimp team, nor the names of its
+  contributors may be used to endorse or promote products
+  derived from this software without specific prior
+  written permission of the assimp team.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+@author: Richard Steffen, 2014
+
+----------------------------------------------------------------------
+*/
 
 
 /** @file  USDLoader.h
 /** @file  USDLoader.h
  *  @brief Declaration of the USD importer class.
  *  @brief Declaration of the USD importer class.

+ 37 - 39
code/AssetLib/USD/USDLoaderImplTinyusdz.cpp

@@ -1,43 +1,43 @@
 /*
 /*
----------------------------------------------------------------------------
 Open Asset Import Library (assimp)
 Open Asset Import Library (assimp)
----------------------------------------------------------------------------
+----------------------------------------------------------------------
 
 
 Copyright (c) 2006-2024, assimp team
 Copyright (c) 2006-2024, assimp team
 
 
-                          All rights reserved.
-
-                          Redistribution and use of this software in source and binary forms,
-        with or without modification, are permitted provided that the following
-        conditions are met:
-
-        * Redistributions of source code must retain the above
-        copyright notice, this list of conditions and the
-        following disclaimer.
-
-                * Redistributions in binary form must reproduce the above
-        copyright notice, this list of conditions and the
-                        following disclaimer in the documentation and/or other
-                   materials provided with the distribution.
-
-                           * Neither the name of the assimp team, nor the names of its
-                contributors may be used to endorse or promote products
-                   derived from this software without specific prior
-                   written permission of the assimp team.
-
-                   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-                   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-        LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-        A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-        OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-        SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-                                                    LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-                                 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-        THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-        (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-        OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-                ---------------------------------------------------------------------------
-                */
+All rights reserved.
+
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the
+following conditions are met:
+
+* Redistributions of source code must retain the above
+  copyright notice, this list of conditions and the
+  following disclaimer.
+
+* Redistributions in binary form must reproduce the above
+  copyright notice, this list of conditions and the
+  following disclaimer in the documentation and/or other
+  materials provided with the distribution.
+
+* Neither the name of the assimp team, nor the names of its
+  contributors may be used to endorse or promote products
+  derived from this software without specific prior
+  written permission of the assimp team.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+----------------------------------------------------------------------
+*/
 
 
 /** @file  USDLoader.cpp
 /** @file  USDLoader.cpp
  *  @brief Implementation of the USD importer class
  *  @brief Implementation of the USD importer class
@@ -72,7 +72,7 @@ Copyright (c) 2006-2024, assimp team
 #include "../../../contrib/tinyusdz/assimp_tinyusdz_logging.inc"
 #include "../../../contrib/tinyusdz/assimp_tinyusdz_logging.inc"
 
 
 namespace {
 namespace {
-    const char *const TAG = "tinyusdz loader";
+    static constexpr char Tag[] = "tinyusdz loader";
 }
 }
 
 
 namespace Assimp {
 namespace Assimp {
@@ -81,9 +81,7 @@ using namespace std;
 void USDImporterImplTinyusdz::InternReadFile(
 void USDImporterImplTinyusdz::InternReadFile(
         const std::string &pFile,
         const std::string &pFile,
         aiScene *pScene,
         aiScene *pScene,
-        IOSystem *pIOHandler) {
-    UNUSED(pIOHandler);
-    UNUSED(TAG); // Ignore unused variable when -Werror enabled
+        IOSystem *) {
     // Grab filename for logging purposes
     // Grab filename for logging purposes
     size_t pos = pFile.find_last_of('/');
     size_t pos = pFile.find_last_of('/');
     string basePath = pFile.substr(0, pos);
     string basePath = pFile.substr(0, pos);

+ 34 - 33
code/AssetLib/USD/USDLoaderImplTinyusdz.h

@@ -4,39 +4,40 @@ Open Asset Import Library (assimp)
 
 
 Copyright (c) 2006-2024, assimp team
 Copyright (c) 2006-2024, assimp team
 
 
-                          All rights reserved.
-
-                          Redistribution and use of this software in source and binary forms,
-        with or without modification, are permitted provided that the
-        following conditions are met:
-
-        * Redistributions of source code must retain the above
-        copyright notice, this list of conditions and the
-        following disclaimer.
-
-                * Redistributions in binary form must reproduce the above
-        copyright notice, this list of conditions and the
-                        following disclaimer in the documentation and/or other
-                   materials provided with the distribution.
-
-                           * Neither the name of the assimp team, nor the names of its
-                contributors may be used to endorse or promote products
-                   derived from this software without specific prior
-                   written permission of the assimp team.
-
-                   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-                   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-        LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-        A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-        OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-        SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-                                                    LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-                                 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-        THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-        (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-        OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-                ----------------------------------------------------------------------
-                */
+All rights reserved.
+
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the
+following conditions are met:
+
+* Redistributions of source code must retain the above
+  copyright notice, this list of conditions and the
+  following disclaimer.
+
+* Redistributions in binary form must reproduce the above
+  copyright notice, this list of conditions and the
+  following disclaimer in the documentation and/or other
+  materials provided with the distribution.
+
+* Neither the name of the assimp team, nor the names of its
+  contributors may be used to endorse or promote products
+  derived from this software without specific prior
+  written permission of the assimp team.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+----------------------------------------------------------------------
+*/
 
 
 /** @file  USDLoader.h
 /** @file  USDLoader.h
  *  @brief Declaration of the USD importer class.
  *  @brief Declaration of the USD importer class.

+ 41 - 0
code/AssetLib/USD/USDLoaderImplTinyusdzHelper.cpp

@@ -1,3 +1,44 @@
+/*
+Open Asset Import Library (assimp)
+----------------------------------------------------------------------
+
+Copyright (c) 2006-2024, assimp team
+
+All rights reserved.
+
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the
+following conditions are met:
+
+* Redistributions of source code must retain the above
+  copyright notice, this list of conditions and the
+  following disclaimer.
+
+* Redistributions in binary form must reproduce the above
+  copyright notice, this list of conditions and the
+  following disclaimer in the documentation and/or other
+  materials provided with the distribution.
+
+* Neither the name of the assimp team, nor the names of its
+  contributors may be used to endorse or promote products
+  derived from this software without specific prior
+  written permission of the assimp team.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+----------------------------------------------------------------------
+*/
+
 #ifndef ASSIMP_BUILD_NO_USD_IMPORTER
 #ifndef ASSIMP_BUILD_NO_USD_IMPORTER
 #include "USDLoaderImplTinyusdzHelper.h"
 #include "USDLoaderImplTinyusdzHelper.h"
 
 

+ 41 - 0
code/AssetLib/USD/USDLoaderImplTinyusdzHelper.h

@@ -1,3 +1,44 @@
+/*
+Open Asset Import Library (assimp)
+----------------------------------------------------------------------
+
+Copyright (c) 2006-2024, assimp team
+
+All rights reserved.
+
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the
+following conditions are met:
+
+* Redistributions of source code must retain the above
+  copyright notice, this list of conditions and the
+  following disclaimer.
+
+* Redistributions in binary form must reproduce the above
+  copyright notice, this list of conditions and the
+  following disclaimer in the documentation and/or other
+  materials provided with the distribution.
+
+* Neither the name of the assimp team, nor the names of its
+  contributors may be used to endorse or promote products
+  derived from this software without specific prior
+  written permission of the assimp team.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+----------------------------------------------------------------------
+*/
+
 #pragma once
 #pragma once
 #ifndef AI_USDLOADER_IMPL_TINYUSDZ_HELPER_H_INCLUDED
 #ifndef AI_USDLOADER_IMPL_TINYUSDZ_HELPER_H_INCLUDED
 #define AI_USDLOADER_IMPL_TINYUSDZ_HELPER_H_INCLUDED
 #define AI_USDLOADER_IMPL_TINYUSDZ_HELPER_H_INCLUDED

+ 35 - 35
code/AssetLib/USD/USDLoaderUtil.cpp

@@ -1,43 +1,43 @@
 /*
 /*
----------------------------------------------------------------------------
 Open Asset Import Library (assimp)
 Open Asset Import Library (assimp)
----------------------------------------------------------------------------
+----------------------------------------------------------------------
 
 
 Copyright (c) 2006-2024, assimp team
 Copyright (c) 2006-2024, assimp team
 
 
-                          All rights reserved.
-
-                          Redistribution and use of this software in source and binary forms,
-        with or without modification, are permitted provided that the following
-        conditions are met:
-
-        * Redistributions of source code must retain the above
-        copyright notice, this list of conditions and the
-        following disclaimer.
-
-                * Redistributions in binary form must reproduce the above
-        copyright notice, this list of conditions and the
-                        following disclaimer in the documentation and/or other
-                   materials provided with the distribution.
-
-                           * Neither the name of the assimp team, nor the names of its
-                contributors may be used to endorse or promote products
-                   derived from this software without specific prior
-                   written permission of the assimp team.
-
-                   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-                   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-        LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-        A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-        OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-        SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-                                                    LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-                                 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-        THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-        (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-        OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-                ---------------------------------------------------------------------------
-                */
+All rights reserved.
+
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the
+following conditions are met:
+
+* Redistributions of source code must retain the above
+  copyright notice, this list of conditions and the
+  following disclaimer.
+
+* Redistributions in binary form must reproduce the above
+  copyright notice, this list of conditions and the
+  following disclaimer in the documentation and/or other
+  materials provided with the distribution.
+
+* Neither the name of the assimp team, nor the names of its
+  contributors may be used to endorse or promote products
+  derived from this software without specific prior
+  written permission of the assimp team.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+----------------------------------------------------------------------
+*/
 
 
 /** @file  USDLoader.cpp
 /** @file  USDLoader.cpp
  *  @brief Implementation of the USD importer class
  *  @brief Implementation of the USD importer class

+ 38 - 37
code/AssetLib/USD/USDLoaderUtil.h

@@ -4,39 +4,40 @@ Open Asset Import Library (assimp)
 
 
 Copyright (c) 2006-2024, assimp team
 Copyright (c) 2006-2024, assimp team
 
 
-                          All rights reserved.
-
-                          Redistribution and use of this software in source and binary forms,
-        with or without modification, are permitted provided that the
-        following conditions are met:
-
-        * Redistributions of source code must retain the above
-        copyright notice, this list of conditions and the
-        following disclaimer.
-
-                * Redistributions in binary form must reproduce the above
-        copyright notice, this list of conditions and the
-                        following disclaimer in the documentation and/or other
-                   materials provided with the distribution.
-
-                           * Neither the name of the assimp team, nor the names of its
-                contributors may be used to endorse or promote products
-                   derived from this software without specific prior
-                   written permission of the assimp team.
-
-                   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-                   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-        LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-        A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-        OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-        SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-                                                    LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-                                 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-        THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-        (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-        OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-                ----------------------------------------------------------------------
-                */
+All rights reserved.
+
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the
+following conditions are met:
+
+* Redistributions of source code must retain the above
+  copyright notice, this list of conditions and the
+  following disclaimer.
+
+* Redistributions in binary form must reproduce the above
+  copyright notice, this list of conditions and the
+  following disclaimer in the documentation and/or other
+  materials provided with the distribution.
+
+* Neither the name of the assimp team, nor the names of its
+  contributors may be used to endorse or promote products
+  derived from this software without specific prior
+  written permission of the assimp team.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+----------------------------------------------------------------------
+*/
 
 
 /** @file  USDLoader.h
 /** @file  USDLoader.h
  *  @brief Declaration of the USD importer class.
  *  @brief Declaration of the USD importer class.
@@ -45,15 +46,15 @@ Copyright (c) 2006-2024, assimp team
 #ifndef AI_USDLOADER_UTIL_H_INCLUDED
 #ifndef AI_USDLOADER_UTIL_H_INCLUDED
 #define AI_USDLOADER_UTIL_H_INCLUDED
 #define AI_USDLOADER_UTIL_H_INCLUDED
 
 
-#include <assimp/BaseImporter.h>
-#include <assimp/types.h>
-#include <vector>
-#include <cstdint>
+#include <string>
 
 
 namespace Assimp {
 namespace Assimp {
+
 bool isUsda(const std::string &pFile);
 bool isUsda(const std::string &pFile);
 bool isUsdc(const std::string &pFile);
 bool isUsdc(const std::string &pFile);
 bool isUsdz(const std::string &pFile);
 bool isUsdz(const std::string &pFile);
 bool isUsd(const std::string &pFile);
 bool isUsd(const std::string &pFile);
+
 } // namespace Assimp
 } // namespace Assimp
+
 #endif // AI_USDLOADER_UTIL_H_INCLUDED
 #endif // AI_USDLOADER_UTIL_H_INCLUDED

+ 0 - 4
code/Common/SpatialSort.cpp

@@ -71,10 +71,6 @@ SpatialSort::SpatialSort() :
     mPlaneNormal.Normalize();
     mPlaneNormal.Normalize();
 }
 }
 
 
-// ------------------------------------------------------------------------------------------------
-// Destructor
-SpatialSort::~SpatialSort() = default;
-
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
 void SpatialSort::Fill(const aiVector3D *pPositions, unsigned int pNumPositions,
 void SpatialSort::Fill(const aiVector3D *pPositions, unsigned int pNumPositions,
         unsigned int pElementOffset,
         unsigned int pElementOffset,

+ 1 - 1
include/assimp/SpatialSort.h

@@ -79,7 +79,7 @@ public:
             unsigned int pElementOffset);
             unsigned int pElementOffset);
 
 
     /** Destructor */
     /** Destructor */
-    ~SpatialSort();
+    ~SpatialSort() = default;
 
 
     // ------------------------------------------------------------------------------------
     // ------------------------------------------------------------------------------------
     /** Sets the input data for the SpatialSort. This replaces existing data, if any.
     /** Sets the input data for the SpatialSort. This replaces existing data, if any.

+ 32 - 13
include/assimp/anim.h

@@ -59,6 +59,28 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 extern "C" {
 extern "C" {
 #endif
 #endif
 
 
+// ---------------------------------------------------------------------------
+/**
+ */
+enum aiAnimInterpolation {
+    /** */
+    aiAnimInterpolation_Step,
+
+    /** */
+    aiAnimInterpolation_Linear,
+
+    /** */
+    aiAnimInterpolation_Spherical_Linear,
+
+    /** */
+    aiAnimInterpolation_Cubic_Spline,
+
+/** */
+#ifndef SWIG
+    _aiAnimInterpolation_Force32Bit = INT_MAX
+#endif
+};
+
 // ---------------------------------------------------------------------------
 // ---------------------------------------------------------------------------
 /** A time-value pair specifying a certain 3D vector for the given time. */
 /** A time-value pair specifying a certain 3D vector for the given time. */
 struct aiVectorKey {
 struct aiVectorKey {
@@ -68,21 +90,18 @@ struct aiVectorKey {
     /** The value of this key */
     /** The value of this key */
     C_STRUCT aiVector3D mValue;
     C_STRUCT aiVector3D mValue;
 
 
+     /** The interpolation setting of this key */
+    C_ENUM aiAnimInterpolation mInterpolation;
+
 #ifdef __cplusplus
 #ifdef __cplusplus
 
 
     /// @brief  The default constructor.
     /// @brief  The default constructor.
     aiVectorKey() AI_NO_EXCEPT
     aiVectorKey() AI_NO_EXCEPT
-            : mTime(0.0),
-              mValue() {
-        // empty
-    }
+            : mTime(0.0), mValue(), mInterpolation(aiAnimInterpolation_Linear) {}
 
 
     /// @brief  Construction from a given time and key value.
     /// @brief  Construction from a given time and key value.
-
     aiVectorKey(double time, const aiVector3D &value) :
     aiVectorKey(double time, const aiVector3D &value) :
-            mTime(time), mValue(value) {
-        // empty
-    }
+            mTime(time), mValue(value), mInterpolation(aiAnimInterpolation_Linear){}
 
 
     typedef aiVector3D elem_type;
     typedef aiVector3D elem_type;
 
 
@@ -116,16 +135,16 @@ struct aiQuatKey {
     /** The value of this key */
     /** The value of this key */
     C_STRUCT aiQuaternion mValue;
     C_STRUCT aiQuaternion mValue;
 
 
+    /** The interpolation setting of this key */
+    C_ENUM aiAnimInterpolation mInterpolation;
+
 #ifdef __cplusplus
 #ifdef __cplusplus
     aiQuatKey() AI_NO_EXCEPT
     aiQuatKey() AI_NO_EXCEPT
-            : mTime(0.0),
-              mValue() {
-        // empty
-    }
+            : mTime(0.0), mValue(), mInterpolation(aiAnimInterpolation_Linear) {}
 
 
     /** Construction from a given time and key value */
     /** Construction from a given time and key value */
     aiQuatKey(double time, const aiQuaternion &value) :
     aiQuatKey(double time, const aiQuaternion &value) :
-            mTime(time), mValue(value) {}
+            mTime(time), mValue(value), mInterpolation(aiAnimInterpolation_Linear) {}
 
 
     typedef aiQuaternion elem_type;
     typedef aiQuaternion elem_type;
 
 

+ 2 - 2
include/assimp/material.h

@@ -1527,7 +1527,7 @@ ASSIMP_API C_ENUM aiReturn aiGetMaterialFloatArray(
         const char *pKey,
         const char *pKey,
         unsigned int type,
         unsigned int type,
         unsigned int index,
         unsigned int index,
-        ai_real *pOut,
+        float *pOut,
         unsigned int *pMax);
         unsigned int *pMax);
 
 
 // ---------------------------------------------------------------------------
 // ---------------------------------------------------------------------------
@@ -1553,7 +1553,7 @@ inline aiReturn aiGetMaterialFloat(const C_STRUCT aiMaterial *pMat,
         const char *pKey,
         const char *pKey,
         unsigned int type,
         unsigned int type,
         unsigned int index,
         unsigned int index,
-        ai_real *pOut) {
+        float *pOut) {
     return aiGetMaterialFloatArray(pMat, pKey, type, index, pOut, (unsigned int *)0x0);
     return aiGetMaterialFloatArray(pMat, pKey, type, index, pOut, (unsigned int *)0x0);
 }
 }
 
 

+ 3 - 6
include/assimp/material.inl

@@ -67,7 +67,7 @@ AI_FORCE_INLINE aiReturn aiMaterial::GetTexture( aiTextureType type,
        C_STRUCT aiString* path,
        C_STRUCT aiString* path,
        aiTextureMapping* mapping    /*= NULL*/,
        aiTextureMapping* mapping    /*= NULL*/,
        unsigned int* uvindex        /*= NULL*/,
        unsigned int* uvindex        /*= NULL*/,
-       ai_real* blend               /*= NULL*/,
+       float* blend               /*= NULL*/,
        aiTextureOp* op              /*= NULL*/,
        aiTextureOp* op              /*= NULL*/,
        aiTextureMapMode* mapmode    /*= NULL*/) const {
        aiTextureMapMode* mapmode    /*= NULL*/) const {
     return ::aiGetMaterialTexture(this,type,index,path,mapping,uvindex,blend,op,mapmode);
     return ::aiGetMaterialTexture(this,type,index,path,mapping,uvindex,blend,op,mapmode);
@@ -136,9 +136,7 @@ AI_FORCE_INLINE aiReturn aiMaterial::Get(const char* pKey,unsigned int type,
 // Specialisation for a single bool.
 // Specialisation for a single bool.
 // Casts floating point and integer to bool
 // Casts floating point and integer to bool
 template <>
 template <>
-AI_FORCE_INLINE
-        aiReturn
-        aiMaterial::Get(const char *pKey, unsigned int type,
+AI_FORCE_INLINE aiReturn aiMaterial::Get(const char *pKey, unsigned int type,
                 unsigned int idx, bool &pOut) const {
                 unsigned int idx, bool &pOut) const {
     const aiMaterialProperty *prop;
     const aiMaterialProperty *prop;
     const aiReturn ret = ::aiGetMaterialProperty(this, pKey, type, idx,
     const aiReturn ret = ::aiGetMaterialProperty(this, pKey, type, idx,
@@ -193,7 +191,7 @@ AI_FORCE_INLINE aiReturn aiMaterial::Get(const char* pKey,unsigned int type,
 }
 }
 // ---------------------------------------------------------------------------
 // ---------------------------------------------------------------------------
 AI_FORCE_INLINE aiReturn aiMaterial::Get(const char* pKey,unsigned int type,
 AI_FORCE_INLINE aiReturn aiMaterial::Get(const char* pKey,unsigned int type,
-        unsigned int idx,ai_real& pOut) const {
+        unsigned int idx, float& pOut) const {
     return aiGetMaterialFloat(this,pKey,type,idx,&pOut);
     return aiGetMaterialFloat(this,pKey,type,idx,&pOut);
 }
 }
 // ---------------------------------------------------------------------------
 // ---------------------------------------------------------------------------
@@ -312,7 +310,6 @@ AI_FORCE_INLINE aiReturn aiMaterial::AddProperty(const int* pInput,
         pKey,type,index,aiPTI_Integer);
         pKey,type,index,aiPTI_Integer);
 }
 }
 
 
-
 // ---------------------------------------------------------------------------
 // ---------------------------------------------------------------------------
 // The template specializations below are for backwards compatibility.
 // The template specializations below are for backwards compatibility.
 // The recommended way to add material properties is using the non-template
 // The recommended way to add material properties is using the non-template