summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/assimp/code/OFFLoader.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/assimp/code/OFFLoader.cpp')
-rw-r--r--src/3rdparty/assimp/code/OFFLoader.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/3rdparty/assimp/code/OFFLoader.cpp b/src/3rdparty/assimp/code/OFFLoader.cpp
index fd0542fdf..5038176e2 100644
--- a/src/3rdparty/assimp/code/OFFLoader.cpp
+++ b/src/3rdparty/assimp/code/OFFLoader.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.
@@ -54,7 +55,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <assimp/IOSystem.hpp>
#include <assimp/scene.h>
#include <assimp/DefaultLogger.hpp>
-
+#include <assimp/importerdesc.h>
using namespace Assimp;
@@ -93,7 +94,7 @@ bool OFFImporter::CanRead( const std::string& pFile, IOSystem* pIOHandler, bool
{
if (!pIOHandler)return true;
const char* tokens[] = {"off"};
- return SearchFileHeaderForToken(pIOHandler,pFile,tokens,1);
+ return SearchFileHeaderForToken(pIOHandler,pFile,tokens,1,3);
}
return false;
}
@@ -161,9 +162,9 @@ void OFFImporter::InternReadFile( const std::string& pFile,
aiVector3D& v = tempPositions[i];
sz = line; SkipSpaces(&sz);
- sz = fast_atoreal_move<float>(sz,(float&)v.x); SkipSpaces(&sz);
- sz = fast_atoreal_move<float>(sz,(float&)v.y); SkipSpaces(&sz);
- fast_atoreal_move<float>(sz,(float&)v.z);
+ sz = fast_atoreal_move<ai_real>(sz,(ai_real&)v.x); SkipSpaces(&sz);
+ sz = fast_atoreal_move<ai_real>(sz,(ai_real&)v.y); SkipSpaces(&sz);
+ fast_atoreal_move<ai_real>(sz,(ai_real&)v.z);
}
@@ -242,7 +243,7 @@ void OFFImporter::InternReadFile( const std::string& pFile,
pScene->mMaterials = new aiMaterial*[pScene->mNumMaterials];
aiMaterial* pcMat = new aiMaterial();
- aiColor4D clr(0.6f,0.6f,0.6f,1.0f);
+ aiColor4D clr( ai_real( 0.6 ), ai_real( 0.6 ), ai_real( 0.6 ), ai_real( 1.0 ) );
pcMat->AddProperty(&clr,1,AI_MATKEY_COLOR_DIFFUSE);
pScene->mMaterials[0] = pcMat;