summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/assimp/code/XFileImporter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/assimp/code/XFileImporter.cpp')
-rw-r--r--src/3rdparty/assimp/code/XFileImporter.cpp21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/3rdparty/assimp/code/XFileImporter.cpp b/src/3rdparty/assimp/code/XFileImporter.cpp
index 9510ab3de..00c32dcc2 100644
--- a/src/3rdparty/assimp/code/XFileImporter.cpp
+++ b/src/3rdparty/assimp/code/XFileImporter.cpp
@@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
-Copyright (c) 2006-2016, assimp team
+Copyright (c) 2006-2017, assimp team
+
All rights reserved.
@@ -47,17 +48,17 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "XFileImporter.h"
#include "XFileParser.h"
-#include "Defines.h"
#include "TinyFormatter.h"
#include "ConvertToLHProcess.h"
+#include <assimp/Defines.h>
#include <assimp/IOSystem.hpp>
#include <assimp/scene.h>
#include <assimp/DefaultLogger.hpp>
+#include <assimp/importerdesc.h>
+
#include <cctype>
#include <memory>
-
-
using namespace Assimp;
using namespace Assimp::Formatter;
@@ -236,8 +237,9 @@ aiNode* XFileImporter::CreateNodes( aiScene* pScene, aiNode* pParent, const XFil
// Creates the meshes for the given node.
void XFileImporter::CreateMeshes( aiScene* pScene, aiNode* pNode, const std::vector<XFile::Mesh*>& pMeshes)
{
- if( pMeshes.size() == 0)
+ if (pMeshes.empty()) {
return;
+ }
// create a mesh for each mesh-material combination in the source node
std::vector<aiMesh*> meshes;
@@ -286,7 +288,7 @@ void XFileImporter::CreateMeshes( aiScene* pScene, aiNode* pNode, const std::vec
// or referenced material, it should already have a valid index
if( sourceMesh->mFaceMaterials.size() > 0)
{
- mesh->mMaterialIndex = sourceMesh->mMaterials[b].sceneIndex;
+ mesh->mMaterialIndex = static_cast<unsigned int>(sourceMesh->mMaterials[b].sceneIndex);
} else
{
mesh->mMaterialIndex = 0;
@@ -373,7 +375,7 @@ void XFileImporter::CreateMeshes( aiScene* pScene, aiNode* pNode, const std::vec
{
const XFile::Bone& obone = bones[c];
// set up a vertex-linear array of the weights for quick searching if a bone influences a vertex
- std::vector<float> oldWeights( sourceMesh->mPositions.size(), 0.0f);
+ std::vector<ai_real> oldWeights( sourceMesh->mPositions.size(), 0.0);
for( unsigned int d = 0; d < obone.mWeights.size(); d++)
oldWeights[obone.mWeights[d].mVertex] = obone.mWeights[d].mWeight;
@@ -383,8 +385,8 @@ void XFileImporter::CreateMeshes( aiScene* pScene, aiNode* pNode, const std::vec
for( unsigned int d = 0; d < orgPoints.size(); d++)
{
// does the new vertex stem from an old vertex which was influenced by this bone?
- float w = oldWeights[orgPoints[d]];
- if( w > 0.0f)
+ ai_real w = oldWeights[orgPoints[d]];
+ if( w > 0.0)
newWeights.push_back( aiVertexWeight( d, w));
}
@@ -713,4 +715,3 @@ void XFileImporter::ConvertMaterials( aiScene* pScene, std::vector<XFile::Materi
}
#endif // !! ASSIMP_BUILD_NO_X_IMPORTER
-