|
|
ec50314 |
diff -up ./CMakeLists.txt.unbundle ./CMakeLists.txt
|
|
|
ec50314 |
--- ./CMakeLists.txt.unbundle 2011-08-22 16:52:02.000000000 -0400
|
|
|
ec50314 |
+++ ./CMakeLists.txt 2013-07-05 18:17:27.356011868 -0400
|
|
|
ec50314 |
@@ -97,6 +97,36 @@ if (PKG_CONFIG_FOUND)
|
|
|
ec50314 |
PKG_CHECK_MODULES(UNZIP minizip)
|
|
|
ec50314 |
endif (PKG_CONFIG_FOUND)
|
|
|
ec50314 |
|
|
|
ec50314 |
+# Search for irrXML
|
|
|
ec50314 |
+FIND_LIBRARY(IRRXML_LIB IrrXML HINTS ${IRRXML_LIB_PATH})
|
|
|
ec50314 |
+FIND_FILE(IRRXML_H irrXML.h PATHS ${IRRXML_INCLUDE_PATH})
|
|
|
ec50314 |
+IF(IRRXML_LIB AND IRRXML_H)
|
|
|
ec50314 |
+ message (STATUS "Found External IrrXML")
|
|
|
ec50314 |
+ set(HAVE_IRRXML true)
|
|
|
ec50314 |
+ELSE (IRRXML_LIB AND IRRXML_H)
|
|
|
ec50314 |
+ SET(HAVE_IRRXML false)
|
|
|
ec50314 |
+ENDIF(IRRXML_LIB AND IRRXML_H)
|
|
|
ec50314 |
+
|
|
|
ec50314 |
+# Search for poly2tri
|
|
|
ec50314 |
+FIND_LIBRARY(POLY2TRI_LIB poly2tri HINTS ${POLY2TRI_LIB_PATH})
|
|
|
ec50314 |
+FIND_FILE(POLY2TRI_H poly2tri.h PATHS ${POLY2TRI_INCLUDE_PATH})
|
|
|
ec50314 |
+IF (POLY2TRI_LIB AND POLY2TRI_H)
|
|
|
ec50314 |
+ message(status "Found External poly2tri")
|
|
|
ec50314 |
+ SET(HAVE_POLY2TRI true)
|
|
|
ec50314 |
+ELSE(POLY2TRI_LIB AND POLY2TRI_H)
|
|
|
ec50314 |
+ SET(HAVE_POLY2TRI false)
|
|
|
ec50314 |
+ENDIF(POLY2TRI_LIB AND POLY2TRI_H)
|
|
|
ec50314 |
+
|
|
|
ec50314 |
+# Search for clipper
|
|
|
ec50314 |
+FIND_LIBRARY(CLIPPER_LIB polyclipping HINTS ${CLIPPER_LIB_PATH})
|
|
|
ec50314 |
+FIND_FILE(CLIPPER_H clipper.hpp PATHS ${CLIPPER_INCLUDE_PATH})
|
|
|
ec50314 |
+IF (CLIPPER_LIB AND CLIPPER_H)
|
|
|
ec50314 |
+ message(status "Found External clipper")
|
|
|
ec50314 |
+ SET(HAVE_CLIPPER true)
|
|
|
ec50314 |
+ELSE(CLIPPER_LIB AND CLIPPER_H)
|
|
|
ec50314 |
+ SET(HAVE_CLIPPER false)
|
|
|
ec50314 |
+ENDIF(CLIPPER_LIB AND CLIPPER_H)
|
|
|
ec50314 |
+
|
|
|
ec50314 |
IF ( NO_EXPORT )
|
|
|
ec50314 |
ADD_DEFINITIONS( -DASSIMP_BUILD_NO_EXPORT)
|
|
|
ec50314 |
MESSAGE( STATUS "Build an import-only version of Assimp." )
|
|
|
ec50314 |
diff -up ./code/ACLoader.cpp.unbundle ./code/ACLoader.cpp
|
|
|
ec50314 |
--- ./code/ACLoader.cpp.unbundle 2011-08-22 16:22:51.000000000 -0400
|
|
|
ec50314 |
+++ ./code/ACLoader.cpp 2013-07-05 18:17:27.356011868 -0400
|
|
|
ec50314 |
@@ -49,7 +49,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
|
ec50314 |
// internal headers
|
|
|
ec50314 |
#include "ACLoader.h"
|
|
|
ec50314 |
#include "ParsingUtils.h"
|
|
|
ec50314 |
-#include "fast_atof.h"
|
|
|
ec50314 |
+#include "fast_atof_assimp.h"
|
|
|
ec50314 |
#include "Subdivision.h"
|
|
|
ec50314 |
|
|
|
ec50314 |
using namespace Assimp;
|
|
|
ec50314 |
diff -up ./code/ASELoader.cpp.unbundle ./code/ASELoader.cpp
|
|
|
ec50314 |
--- ./code/ASELoader.cpp.unbundle 2011-08-22 16:22:51.000000000 -0400
|
|
|
ec50314 |
+++ ./code/ASELoader.cpp 2013-07-05 18:17:27.356011868 -0400
|
|
|
ec50314 |
@@ -53,7 +53,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
|
ec50314 |
#include "TargetAnimation.h"
|
|
|
ec50314 |
|
|
|
ec50314 |
// utilities
|
|
|
ec50314 |
-#include "fast_atof.h"
|
|
|
ec50314 |
+#include "fast_atof_assimp.h"
|
|
|
ec50314 |
|
|
|
ec50314 |
using namespace Assimp;
|
|
|
ec50314 |
using namespace Assimp::ASE;
|
|
|
ec50314 |
diff -up ./code/ASEParser.cpp.unbundle ./code/ASEParser.cpp
|
|
|
ec50314 |
--- ./code/ASEParser.cpp.unbundle 2011-04-29 13:37:08.000000000 -0400
|
|
|
ec50314 |
+++ ./code/ASEParser.cpp 2013-07-05 18:17:27.357011907 -0400
|
|
|
ec50314 |
@@ -49,7 +49,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
|
ec50314 |
#include "TextureTransform.h"
|
|
|
ec50314 |
#include "ASELoader.h"
|
|
|
ec50314 |
#include "MaterialSystem.h"
|
|
|
ec50314 |
-#include "fast_atof.h"
|
|
|
ec50314 |
+#include "fast_atof_assimp.h"
|
|
|
ec50314 |
|
|
|
ec50314 |
using namespace Assimp;
|
|
|
ec50314 |
using namespace Assimp::ASE;
|
|
|
ec50314 |
diff -up ./code/BlenderDNA.cpp.unbundle ./code/BlenderDNA.cpp
|
|
|
ec50314 |
--- ./code/BlenderDNA.cpp.unbundle 2011-06-09 10:29:32.000000000 -0400
|
|
|
ec50314 |
+++ ./code/BlenderDNA.cpp 2013-07-05 18:17:27.357011907 -0400
|
|
|
ec50314 |
@@ -47,7 +47,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
|
ec50314 |
#ifndef ASSIMP_BUILD_NO_BLEND_IMPORTER
|
|
|
ec50314 |
#include "BlenderDNA.h"
|
|
|
ec50314 |
#include "StreamReader.h"
|
|
|
ec50314 |
-#include "fast_atof.h"
|
|
|
ec50314 |
+#include "fast_atof_assimp.h"
|
|
|
ec50314 |
|
|
|
ec50314 |
using namespace Assimp;
|
|
|
ec50314 |
using namespace Assimp::Blender;
|
|
|
ec50314 |
diff -up ./code/BVHLoader.cpp.unbundle ./code/BVHLoader.cpp
|
|
|
ec50314 |
--- ./code/BVHLoader.cpp.unbundle 2011-06-09 10:29:32.000000000 -0400
|
|
|
ec50314 |
+++ ./code/BVHLoader.cpp 2013-07-05 18:17:27.357011907 -0400
|
|
|
ec50314 |
@@ -44,7 +44,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
|
ec50314 |
#ifndef ASSIMP_BUILD_NO_BVH_IMPORTER
|
|
|
ec50314 |
|
|
|
ec50314 |
#include "BVHLoader.h"
|
|
|
ec50314 |
-#include "fast_atof.h"
|
|
|
ec50314 |
+#include "fast_atof_assimp.h"
|
|
|
ec50314 |
#include "SkeletonMeshBuilder.h"
|
|
|
ec50314 |
|
|
|
ec50314 |
using namespace Assimp;
|
|
|
ec50314 |
diff -up ./code/CMakeLists.txt.unbundle ./code/CMakeLists.txt
|
|
|
ec50314 |
--- ./code/CMakeLists.txt.unbundle 2011-08-04 07:27:13.000000000 -0400
|
|
|
ec50314 |
+++ ./code/CMakeLists.txt 2013-07-05 18:17:27.358011946 -0400
|
|
|
ec50314 |
@@ -89,7 +89,7 @@ SET( Logging_SRCS
|
|
|
ec50314 |
SOURCE_GROUP(Logging FILES ${Logging_SRCS})
|
|
|
ec50314 |
|
|
|
ec50314 |
SET( Common_SRCS
|
|
|
ec50314 |
- fast_atof.h
|
|
|
ec50314 |
+ fast_atof_assimp.h
|
|
|
ec50314 |
qnan.h
|
|
|
ec50314 |
BaseImporter.cpp
|
|
|
ec50314 |
BaseImporter.h
|
|
|
ec50314 |
@@ -592,9 +592,7 @@ ADD_LIBRARY( assimp SHARED
|
|
|
ec50314 |
${IFC_SRCS}
|
|
|
ec50314 |
|
|
|
ec50314 |
# Third-party libraries
|
|
|
ec50314 |
- ${IrrXML_SRCS}
|
|
|
ec50314 |
${ConvertUTF_SRCS}
|
|
|
ec50314 |
- ${unzip_compile_SRCS}
|
|
|
ec50314 |
# Necessary to show the headers in the project when using the VC++ generator:
|
|
|
ec50314 |
${Boost_SRCS}
|
|
|
ec50314 |
|
|
|
ec50314 |
@@ -616,6 +614,13 @@ else (UNZIP_FOUND)
|
|
|
ec50314 |
INCLUDE_DIRECTORIES("../contrib/unzip")
|
|
|
ec50314 |
endif (UNZIP_FOUND)
|
|
|
ec50314 |
|
|
|
ec50314 |
+if (HAVE_IRRXML)
|
|
|
ec50314 |
+ INCLUDE_DIRECTORIES(${IRRXML_INCLUDE_PATH})
|
|
|
ec50314 |
+ TARGET_LINK_LIBRARIES(assimp ${IRRXML_LIB})
|
|
|
ec50314 |
+else (HAVE_IRRXML)
|
|
|
ec50314 |
+ INCLUDE_DIRECTORIES("../contrib/irrXML")
|
|
|
ec50314 |
+endif (HAVE_IRRXML)
|
|
|
ec50314 |
+
|
|
|
ec50314 |
INSTALL( TARGETS assimp DESTINATION ${LIB_INSTALL_DIR} COMPONENT libassimp${ASSIMP_VERSION_MAJOR})
|
|
|
ec50314 |
INSTALL( FILES ${PUBLIC_HEADERS} DESTINATION ${INCLUDE_INSTALL_DIR}/assimp COMPONENT assimp-dev)
|
|
|
ec50314 |
INSTALL( FILES ${COMPILER_HEADERS} DESTINATION ${INCLUDE_INSTALL_DIR}/assimp/Compiler COMPONENT assimp-dev)
|
|
|
ec50314 |
diff -up ./code/COBLoader.cpp.unbundle ./code/COBLoader.cpp
|
|
|
ec50314 |
--- ./code/COBLoader.cpp.unbundle 2011-08-22 16:22:51.000000000 -0400
|
|
|
ec50314 |
+++ ./code/COBLoader.cpp 2013-07-05 18:17:27.358011946 -0400
|
|
|
ec50314 |
@@ -49,7 +49,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
|
ec50314 |
|
|
|
ec50314 |
#include "StreamReader.h"
|
|
|
ec50314 |
#include "ParsingUtils.h"
|
|
|
ec50314 |
-#include "fast_atof.h"
|
|
|
ec50314 |
+#include "fast_atof_assimp.h"
|
|
|
ec50314 |
|
|
|
ec50314 |
#include "LineSplitter.h"
|
|
|
ec50314 |
#include "TinyFormatter.h"
|
|
|
ec50314 |
diff -up ./code/ColladaLoader.cpp.unbundle ./code/ColladaLoader.cpp
|
|
|
ec50314 |
--- ./code/ColladaLoader.cpp.unbundle 2011-08-22 16:22:51.000000000 -0400
|
|
|
ec50314 |
+++ ./code/ColladaLoader.cpp 2013-07-05 18:17:27.359011984 -0400
|
|
|
ec50314 |
@@ -48,7 +48,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
|
ec50314 |
#include "ColladaLoader.h"
|
|
|
ec50314 |
#include "ColladaParser.h"
|
|
|
ec50314 |
|
|
|
ec50314 |
-#include "fast_atof.h"
|
|
|
ec50314 |
+#include "fast_atof_assimp.h"
|
|
|
ec50314 |
#include "ParsingUtils.h"
|
|
|
ec50314 |
#include "SkeletonMeshBuilder.h"
|
|
|
ec50314 |
|
|
|
ec50314 |
diff -up ./code/ColladaParser.cpp.unbundle ./code/ColladaParser.cpp
|
|
|
ec50314 |
--- ./code/ColladaParser.cpp.unbundle 2011-08-23 12:27:07.000000000 -0400
|
|
|
ec50314 |
+++ ./code/ColladaParser.cpp 2013-07-05 18:17:27.359011984 -0400
|
|
|
ec50314 |
@@ -47,7 +47,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
|
ec50314 |
#ifndef ASSIMP_BUILD_NO_DAE_IMPORTER
|
|
|
ec50314 |
|
|
|
ec50314 |
#include "ColladaParser.h"
|
|
|
ec50314 |
-#include "fast_atof.h"
|
|
|
ec50314 |
+#include "fast_atof_assimp.h"
|
|
|
ec50314 |
#include "ParsingUtils.h"
|
|
|
ec50314 |
|
|
|
ec50314 |
using namespace Assimp;
|
|
|
ec50314 |
diff -up ./code/CSMLoader.cpp.unbundle ./code/CSMLoader.cpp
|
|
|
ec50314 |
--- ./code/CSMLoader.cpp.unbundle 2011-06-09 10:29:32.000000000 -0400
|
|
|
ec50314 |
+++ ./code/CSMLoader.cpp 2013-07-05 18:17:27.360012023 -0400
|
|
|
ec50314 |
@@ -50,7 +50,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
|
ec50314 |
#include "CSMLoader.h"
|
|
|
ec50314 |
#include "SkeletonMeshBuilder.h"
|
|
|
ec50314 |
#include "ParsingUtils.h"
|
|
|
ec50314 |
-#include "fast_atof.h"
|
|
|
ec50314 |
+#include "fast_atof_assimp.h"
|
|
|
ec50314 |
|
|
|
ec50314 |
using namespace Assimp;
|
|
|
ec50314 |
|
|
|
ec50314 |
diff -up ./code/DXFLoader.cpp.unbundle ./code/DXFLoader.cpp
|
|
|
ec50314 |
--- ./code/DXFLoader.cpp.unbundle 2011-08-22 16:22:51.000000000 -0400
|
|
|
ec50314 |
+++ ./code/DXFLoader.cpp 2013-07-05 18:17:27.360012023 -0400
|
|
|
ec50314 |
@@ -49,7 +49,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
|
ec50314 |
#include "DXFLoader.h"
|
|
|
ec50314 |
#include "ParsingUtils.h"
|
|
|
ec50314 |
#include "ConvertToLHProcess.h"
|
|
|
ec50314 |
-#include "fast_atof.h"
|
|
|
ec50314 |
+#include "fast_atof_assimp.h"
|
|
|
ec50314 |
|
|
|
ec50314 |
#include "DXFHelper.h"
|
|
|
ec50314 |
|
|
|
ec50314 |
diff -up ./code/fast_atof_assimp.h.unbundle ./code/fast_atof_assimp.h
|
|
|
ec50314 |
--- ./code/fast_atof_assimp.h.unbundle 2013-07-05 18:17:27.360012023 -0400
|
|
|
ec50314 |
+++ ./code/fast_atof_assimp.h 2013-07-05 18:17:36.342359745 -0400
|
|
|
ec50314 |
@@ -0,0 +1,269 @@
|
|
|
ec50314 |
+// Copyright (C) 2002-2007 Nikolaus Gebhardt
|
|
|
ec50314 |
+// This file is part of the "Irrlicht Engine" and the "irrXML" project.
|
|
|
ec50314 |
+// For conditions of distribution and use, see copyright notice in irrlicht.h and irrXML.h
|
|
|
ec50314 |
+
|
|
|
ec50314 |
+// ------------------------------------------------------------------------------------
|
|
|
ec50314 |
+// Original description: (Schrompf)
|
|
|
ec50314 |
+// Adapted to the ASSIMP library because the builtin atof indeed takes AGES to parse a
|
|
|
ec50314 |
+// float inside a large string. Before parsing, it does a strlen on the given point.
|
|
|
ec50314 |
+// Changes:
|
|
|
ec50314 |
+// 22nd October 08 (Aramis_acg): Added temporary cast to double, added strtoul10_64
|
|
|
ec50314 |
+// to ensure long numbers are handled correctly
|
|
|
ec50314 |
+// ------------------------------------------------------------------------------------
|
|
|
ec50314 |
+
|
|
|
ec50314 |
+
|
|
|
ec50314 |
+#ifndef __ASSIMP_FAST_A_TO_F_H_INCLUDED__
|
|
|
ec50314 |
+#define __ASSIMP_FAST_A_TO_F_H_INCLUDED__
|
|
|
ec50314 |
+
|
|
|
ec50314 |
+#include <math.h>
|
|
|
ec50314 |
+#include "fast_atof.h"
|
|
|
ec50314 |
+
|
|
|
ec50314 |
+namespace Assimp
|
|
|
ec50314 |
+{
|
|
|
ec50314 |
+
|
|
|
ec50314 |
+// ------------------------------------------------------------------------------------
|
|
|
ec50314 |
+// Convert a string in decimal format to a number
|
|
|
ec50314 |
+// ------------------------------------------------------------------------------------
|
|
|
ec50314 |
+inline unsigned int strtoul10( const char* in, const char** out=0)
|
|
|
ec50314 |
+{
|
|
|
ec50314 |
+ return irr::core::strtoul10(in, out);
|
|
|
ec50314 |
+}
|
|
|
ec50314 |
+
|
|
|
ec50314 |
+// ------------------------------------------------------------------------------------
|
|
|
ec50314 |
+// Convert a string in octal format to a number
|
|
|
ec50314 |
+// ------------------------------------------------------------------------------------
|
|
|
ec50314 |
+inline unsigned int strtoul8( const char* in, const char** out=0)
|
|
|
ec50314 |
+{
|
|
|
ec50314 |
+ return irr::core::strtoul8(in, out);
|
|
|
ec50314 |
+}
|
|
|
ec50314 |
+
|
|
|
ec50314 |
+// ------------------------------------------------------------------------------------
|
|
|
ec50314 |
+// Convert a string in hex format to a number
|
|
|
ec50314 |
+// ------------------------------------------------------------------------------------
|
|
|
ec50314 |
+inline unsigned int strtoul16( const char* in, const char** out=0)
|
|
|
ec50314 |
+{
|
|
|
ec50314 |
+ return irr::core::strtoul16(in, out);
|
|
|
ec50314 |
+}
|
|
|
ec50314 |
+
|
|
|
ec50314 |
+// ------------------------------------------------------------------------------------
|
|
|
ec50314 |
+// Convert just one hex digit
|
|
|
ec50314 |
+// Return value is UINT_MAX if the input character is not a hex digit.
|
|
|
ec50314 |
+// ------------------------------------------------------------------------------------
|
|
|
ec50314 |
+inline unsigned int HexDigitToDecimal(char in)
|
|
|
ec50314 |
+{
|
|
|
ec50314 |
+ unsigned int out = UINT_MAX;
|
|
|
ec50314 |
+ if (in >= '0' && in <= '9')
|
|
|
ec50314 |
+ out = in - '0';
|
|
|
ec50314 |
+
|
|
|
ec50314 |
+ else if (in >= 'a' && in <= 'f')
|
|
|
ec50314 |
+ out = 10u + in - 'a';
|
|
|
ec50314 |
+
|
|
|
ec50314 |
+ else if (in >= 'A' && in <= 'F')
|
|
|
ec50314 |
+ out = 10u + in - 'A';
|
|
|
ec50314 |
+
|
|
|
ec50314 |
+ // return value is UINT_MAX if the input is not a hex digit
|
|
|
ec50314 |
+ return out;
|
|
|
ec50314 |
+}
|
|
|
ec50314 |
+
|
|
|
ec50314 |
+// ------------------------------------------------------------------------------------
|
|
|
ec50314 |
+// Convert a hex-encoded octet (2 characters, i.e. df or 1a).
|
|
|
ec50314 |
+// ------------------------------------------------------------------------------------
|
|
|
ec50314 |
+inline uint8_t HexOctetToDecimal(const char* in)
|
|
|
ec50314 |
+{
|
|
|
ec50314 |
+ return ((uint8_t)HexDigitToDecimal(in[0])<<4)+(uint8_t)HexDigitToDecimal(in[1]);
|
|
|
ec50314 |
+}
|
|
|
ec50314 |
+
|
|
|
ec50314 |
+
|
|
|
ec50314 |
+// ------------------------------------------------------------------------------------
|
|
|
ec50314 |
+// signed variant of strtoul10
|
|
|
ec50314 |
+// ------------------------------------------------------------------------------------
|
|
|
ec50314 |
+inline int strtol10( const char* in, const char** out=0)
|
|
|
ec50314 |
+{
|
|
|
ec50314 |
+ return irr::core::strtol10(in, out);
|
|
|
ec50314 |
+}
|
|
|
ec50314 |
+
|
|
|
ec50314 |
+// ------------------------------------------------------------------------------------
|
|
|
ec50314 |
+// Parse a C++-like integer literal - hex and oct prefixes.
|
|
|
ec50314 |
+// 0xNNNN - hex
|
|
|
ec50314 |
+// 0NNN - oct
|
|
|
ec50314 |
+// NNN - dec
|
|
|
ec50314 |
+// ------------------------------------------------------------------------------------
|
|
|
ec50314 |
+inline unsigned int strtoul_cppstyle( const char* in, const char** out=0)
|
|
|
ec50314 |
+{
|
|
|
ec50314 |
+ if ('0' == in[0])
|
|
|
ec50314 |
+ {
|
|
|
ec50314 |
+ return 'x' == in[1] ? strtoul16(in+2,out) : strtoul8(in+1,out);
|
|
|
ec50314 |
+ }
|
|
|
ec50314 |
+ return strtoul10(in, out);
|
|
|
ec50314 |
+}
|
|
|
ec50314 |
+
|
|
|
ec50314 |
+// ------------------------------------------------------------------------------------
|
|
|
ec50314 |
+// Special version of the function, providing higher accuracy and safety
|
|
|
ec50314 |
+// It is mainly used by fast_atof to prevent ugly and unwanted integer overflows.
|
|
|
ec50314 |
+// ------------------------------------------------------------------------------------
|
|
|
ec50314 |
+inline uint64_t strtoul10_64( const char* in, const char** out=0, unsigned int* max_inout=0)
|
|
|
ec50314 |
+{
|
|
|
ec50314 |
+ unsigned int cur = 0;
|
|
|
ec50314 |
+ uint64_t value = 0;
|
|
|
ec50314 |
+
|
|
|
ec50314 |
+ bool running = true;
|
|
|
ec50314 |
+ while ( running )
|
|
|
ec50314 |
+ {
|
|
|
ec50314 |
+ if ( *in < '0' || *in > '9' )
|
|
|
ec50314 |
+ break;
|
|
|
ec50314 |
+
|
|
|
ec50314 |
+ const uint64_t new_value = ( value * 10 ) + ( *in - '0' );
|
|
|
ec50314 |
+
|
|
|
ec50314 |
+ if (new_value < value) /* numeric overflow, we rely on you */
|
|
|
ec50314 |
+ return value;
|
|
|
ec50314 |
+
|
|
|
ec50314 |
+ value = new_value;
|
|
|
ec50314 |
+
|
|
|
ec50314 |
+ ++in;
|
|
|
ec50314 |
+ ++cur;
|
|
|
ec50314 |
+
|
|
|
ec50314 |
+ if (max_inout && *max_inout == cur) {
|
|
|
ec50314 |
+
|
|
|
ec50314 |
+ if (out) { /* skip to end */
|
|
|
ec50314 |
+ while (*in >= '0' && *in <= '9')
|
|
|
ec50314 |
+ ++in;
|
|
|
ec50314 |
+ *out = in;
|
|
|
ec50314 |
+ }
|
|
|
ec50314 |
+
|
|
|
ec50314 |
+ return value;
|
|
|
ec50314 |
+ }
|
|
|
ec50314 |
+ }
|
|
|
ec50314 |
+ if (out)
|
|
|
ec50314 |
+ *out = in;
|
|
|
ec50314 |
+
|
|
|
ec50314 |
+ if (max_inout)
|
|
|
ec50314 |
+ *max_inout = cur;
|
|
|
ec50314 |
+
|
|
|
ec50314 |
+ return value;
|
|
|
ec50314 |
+}
|
|
|
ec50314 |
+
|
|
|
ec50314 |
+// Number of relevant decimals for floating-point parsing.
|
|
|
ec50314 |
+#define AI_FAST_ATOF_RELAVANT_DECIMALS 15
|
|
|
ec50314 |
+
|
|
|
ec50314 |
+// ------------------------------------------------------------------------------------
|
|
|
ec50314 |
+//! Provides a fast function for converting a string into a float,
|
|
|
ec50314 |
+//! about 6 times faster than atof in win32.
|
|
|
ec50314 |
+// If you find any bugs, please send them to me, niko (at) irrlicht3d.org.
|
|
|
ec50314 |
+// ------------------------------------------------------------------------------------
|
|
|
ec50314 |
+template <typename Real>
|
|
|
ec50314 |
+inline const char* fast_atoreal_move( const char* c, Real& out)
|
|
|
ec50314 |
+{
|
|
|
ec50314 |
+ Real f;
|
|
|
ec50314 |
+
|
|
|
ec50314 |
+ bool inv = (*c=='-');
|
|
|
ec50314 |
+ if (inv || *c=='+') {
|
|
|
ec50314 |
+ ++c;
|
|
|
ec50314 |
+ }
|
|
|
ec50314 |
+
|
|
|
ec50314 |
+ f = static_cast<Real>( strtoul10_64 ( c, &c) );
|
|
|
ec50314 |
+ if (*c == '.' || (c[0] == ',' && c[1] >= '0' && c[1] <= '9')) // allow for commas, too
|
|
|
ec50314 |
+ {
|
|
|
ec50314 |
+ ++c;
|
|
|
ec50314 |
+
|
|
|
ec50314 |
+ // NOTE: The original implementation is highly inaccurate here. The precision of a single
|
|
|
ec50314 |
+ // IEEE 754 float is not high enough, everything behind the 6th digit tends to be more
|
|
|
ec50314 |
+ // inaccurate than it would need to be. Casting to double seems to solve the problem.
|
|
|
ec50314 |
+ // strtol_64 is used to prevent integer overflow.
|
|
|
ec50314 |
+
|
|
|
ec50314 |
+ // Another fix: this tends to become 0 for long numbers if we don't limit the maximum
|
|
|
ec50314 |
+ // number of digits to be read. AI_FAST_ATOF_RELAVANT_DECIMALS can be a value between
|
|
|
ec50314 |
+ // 1 and 15.
|
|
|
ec50314 |
+ unsigned int diff = AI_FAST_ATOF_RELAVANT_DECIMALS;
|
|
|
ec50314 |
+ double pl = static_cast<double>( strtoul10_64 ( c, &c, &diff ));
|
|
|
ec50314 |
+
|
|
|
ec50314 |
+ pl *= irr::core::fast_atof_table[diff];
|
|
|
ec50314 |
+ f += static_cast<Real>( pl );
|
|
|
ec50314 |
+ }
|
|
|
ec50314 |
+
|
|
|
ec50314 |
+ // A major 'E' must be allowed. Necessary for proper reading of some DXF files.
|
|
|
ec50314 |
+ // Thanks to Zhao Lei to point out that this if() must be outside the if (*c == '.' ..)
|
|
|
ec50314 |
+ if (*c == 'e' || *c == 'E') {
|
|
|
ec50314 |
+
|
|
|
ec50314 |
+ ++c;
|
|
|
ec50314 |
+ const bool einv = (*c=='-');
|
|
|
ec50314 |
+ if (einv || *c=='+') {
|
|
|
ec50314 |
+ ++c;
|
|
|
ec50314 |
+ }
|
|
|
ec50314 |
+
|
|
|
ec50314 |
+ // The reason float constants are used here is that we've seen cases where compilers
|
|
|
ec50314 |
+ // would perform such casts on compile-time constants at runtime, which would be
|
|
|
ec50314 |
+ // bad considering how frequently fast_atoreal_move<float> is called in Assimp.
|
|
|
ec50314 |
+ Real exp = static_cast<Real>( strtoul10_64(c, &c) );
|
|
|
ec50314 |
+ if (einv) {
|
|
|
ec50314 |
+ exp = -exp;
|
|
|
ec50314 |
+ }
|
|
|
ec50314 |
+ f *= pow(static_cast<Real>(10.0f), exp);
|
|
|
ec50314 |
+ }
|
|
|
ec50314 |
+
|
|
|
ec50314 |
+ if (inv) {
|
|
|
ec50314 |
+ f = -f;
|
|
|
ec50314 |
+ }
|
|
|
ec50314 |
+ out = f;
|
|
|
ec50314 |
+ return c;
|
|
|
ec50314 |
+}
|
|
|
ec50314 |
+
|
|
|
ec50314 |
+// ------------------------------------------------------------------------------------
|
|
|
ec50314 |
+// The same but more human.
|
|
|
ec50314 |
+inline float fast_atof(const char* c)
|
|
|
ec50314 |
+{
|
|
|
ec50314 |
+ float ret;
|
|
|
ec50314 |
+ fast_atoreal_move<float>(c, ret);
|
|
|
ec50314 |
+ return ret;
|
|
|
ec50314 |
+}
|
|
|
ec50314 |
+
|
|
|
ec50314 |
+
|
|
|
ec50314 |
+inline float fast_atof( const char* c, const char** cout)
|
|
|
ec50314 |
+{
|
|
|
ec50314 |
+ float ret;
|
|
|
ec50314 |
+ *cout = fast_atoreal_move<float>(c, ret);
|
|
|
ec50314 |
+
|
|
|
ec50314 |
+ return ret;
|
|
|
ec50314 |
+}
|
|
|
ec50314 |
+
|
|
|
ec50314 |
+inline float fast_atof( const char** inout)
|
|
|
ec50314 |
+{
|
|
|
ec50314 |
+ float ret;
|
|
|
ec50314 |
+ *inout = fast_atoreal_move<float>(*inout, ret);
|
|
|
ec50314 |
+
|
|
|
ec50314 |
+ return ret;
|
|
|
ec50314 |
+}
|
|
|
ec50314 |
+
|
|
|
ec50314 |
+
|
|
|
ec50314 |
+inline double fast_atod(const char* c)
|
|
|
ec50314 |
+{
|
|
|
ec50314 |
+ double ret;
|
|
|
ec50314 |
+ fast_atoreal_move<double>(c, ret);
|
|
|
ec50314 |
+ return ret;
|
|
|
ec50314 |
+}
|
|
|
ec50314 |
+
|
|
|
ec50314 |
+
|
|
|
ec50314 |
+inline double fast_atod( const char* c, const char** cout)
|
|
|
ec50314 |
+{
|
|
|
ec50314 |
+ double ret;
|
|
|
ec50314 |
+ *cout = fast_atoreal_move<double>(c, ret);
|
|
|
ec50314 |
+
|
|
|
ec50314 |
+ return ret;
|
|
|
ec50314 |
+}
|
|
|
ec50314 |
+
|
|
|
ec50314 |
+inline double fast_atod( const char** inout)
|
|
|
ec50314 |
+{
|
|
|
ec50314 |
+ double ret;
|
|
|
ec50314 |
+ *inout = fast_atoreal_move<double>(*inout, ret);
|
|
|
ec50314 |
+
|
|
|
ec50314 |
+ return ret;
|
|
|
ec50314 |
+}
|
|
|
ec50314 |
+
|
|
|
ec50314 |
+inline const char* fast_atof_move(const char* in, irr::f32& result)
|
|
|
ec50314 |
+{
|
|
|
ec50314 |
+ return irr::core::fast_atof_move(in, result);
|
|
|
ec50314 |
+}
|
|
|
ec50314 |
+
|
|
|
ec50314 |
+} // end of namespace Assimp
|
|
|
ec50314 |
+
|
|
|
ec50314 |
+#endif
|
|
|
ec50314 |
+
|
|
|
ec50314 |
diff -up ./code/FileSystemFilter.h.unbundle ./code/FileSystemFilter.h
|
|
|
ec50314 |
--- ./code/FileSystemFilter.h.unbundle 2011-05-03 18:47:14.000000000 -0400
|
|
|
ec50314 |
+++ ./code/FileSystemFilter.h 2013-07-05 18:17:27.361012062 -0400
|
|
|
ec50314 |
@@ -46,7 +46,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
|
ec50314 |
#define AI_FILESYSTEMFILTER_H_INC
|
|
|
ec50314 |
|
|
|
ec50314 |
#include "../include/IOSystem.h"
|
|
|
ec50314 |
-#include "fast_atof.h"
|
|
|
ec50314 |
+#include "fast_atof_assimp.h"
|
|
|
ec50314 |
#include "ParsingUtils.h"
|
|
|
ec50314 |
namespace Assimp {
|
|
|
ec50314 |
|
|
|
ec50314 |
diff -up ./code/IRRLoader.cpp.unbundle ./code/IRRLoader.cpp
|
|
|
ec50314 |
--- ./code/IRRLoader.cpp.unbundle 2011-08-22 16:22:51.000000000 -0400
|
|
|
ec50314 |
+++ ./code/IRRLoader.cpp 2013-07-05 18:17:27.361012062 -0400
|
|
|
ec50314 |
@@ -47,7 +47,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
|
ec50314 |
|
|
|
ec50314 |
#include "IRRLoader.h"
|
|
|
ec50314 |
#include "ParsingUtils.h"
|
|
|
ec50314 |
-#include "fast_atof.h"
|
|
|
ec50314 |
+#include "fast_atof_assimp.h"
|
|
|
ec50314 |
#include "GenericProperty.h"
|
|
|
ec50314 |
|
|
|
ec50314 |
#include "SceneCombiner.h"
|
|
|
ec50314 |
diff -up ./code/IRRMeshLoader.cpp.unbundle ./code/IRRMeshLoader.cpp
|
|
|
ec50314 |
--- ./code/IRRMeshLoader.cpp.unbundle 2011-08-22 16:22:51.000000000 -0400
|
|
|
ec50314 |
+++ ./code/IRRMeshLoader.cpp 2013-07-05 18:17:27.362012101 -0400
|
|
|
ec50314 |
@@ -45,7 +45,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
|
ec50314 |
|
|
|
ec50314 |
#include "IRRMeshLoader.h"
|
|
|
ec50314 |
#include "ParsingUtils.h"
|
|
|
ec50314 |
-#include "fast_atof.h"
|
|
|
ec50314 |
+#include "fast_atof_assimp.h"
|
|
|
ec50314 |
|
|
|
ec50314 |
using namespace Assimp;
|
|
|
ec50314 |
using namespace irr;
|
|
|
ec50314 |
diff -up ./code/IRRShared.cpp.unbundle ./code/IRRShared.cpp
|
|
|
ec50314 |
--- ./code/IRRShared.cpp.unbundle 2011-08-22 16:22:51.000000000 -0400
|
|
|
ec50314 |
+++ ./code/IRRShared.cpp 2013-07-05 18:17:27.362012101 -0400
|
|
|
ec50314 |
@@ -47,7 +47,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
|
ec50314 |
|
|
|
ec50314 |
#include "IRRShared.h"
|
|
|
ec50314 |
#include "ParsingUtils.h"
|
|
|
ec50314 |
-#include "fast_atof.h"
|
|
|
ec50314 |
+#include "fast_atof_assimp.h"
|
|
|
ec50314 |
|
|
|
ec50314 |
using namespace Assimp;
|
|
|
ec50314 |
using namespace irr;
|
|
|
ec50314 |
diff -up ./code/irrXMLWrapper.h.unbundle ./code/irrXMLWrapper.h
|
|
|
ec50314 |
--- ./code/irrXMLWrapper.h.unbundle 2010-04-10 11:30:22.000000000 -0400
|
|
|
ec50314 |
+++ ./code/irrXMLWrapper.h 2013-07-05 18:17:27.362012101 -0400
|
|
|
ec50314 |
@@ -42,7 +42,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
|
ec50314 |
#define INCLUDED_AI_IRRXML_WRAPPER
|
|
|
ec50314 |
|
|
|
ec50314 |
// some long includes ....
|
|
|
ec50314 |
-#include "./../contrib/irrXML/irrXML.h"
|
|
|
ec50314 |
+#include "irrXML.h"
|
|
|
ec50314 |
#include "./../include/IOStream.h"
|
|
|
ec50314 |
namespace Assimp {
|
|
|
ec50314 |
|
|
|
ec50314 |
@@ -115,7 +115,7 @@ public:
|
|
|
ec50314 |
|
|
|
ec50314 |
// ----------------------------------------------------------------------------------
|
|
|
ec50314 |
//! Returns size of file in bytes
|
|
|
ec50314 |
- virtual int getSize() {
|
|
|
ec50314 |
+ virtual long getSize() const {
|
|
|
ec50314 |
return (int)data.size();
|
|
|
ec50314 |
}
|
|
|
ec50314 |
|
|
|
ec50314 |
diff -up ./code/LWSLoader.cpp.unbundle ./code/LWSLoader.cpp
|
|
|
ec50314 |
--- ./code/LWSLoader.cpp.unbundle 2011-08-01 16:58:31.000000000 -0400
|
|
|
ec50314 |
+++ ./code/LWSLoader.cpp 2013-07-05 18:17:27.363012139 -0400
|
|
|
ec50314 |
@@ -47,7 +47,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
|
ec50314 |
|
|
|
ec50314 |
#include "LWSLoader.h"
|
|
|
ec50314 |
#include "ParsingUtils.h"
|
|
|
ec50314 |
-#include "fast_atof.h"
|
|
|
ec50314 |
+#include "fast_atof_assimp.h"
|
|
|
ec50314 |
|
|
|
ec50314 |
#include "SceneCombiner.h"
|
|
|
ec50314 |
#include "GenericProperty.h"
|
|
|
ec50314 |
diff -up ./code/MaterialSystem.cpp.unbundle ./code/MaterialSystem.cpp
|
|
|
ec50314 |
--- ./code/MaterialSystem.cpp.unbundle 2011-08-22 16:22:51.000000000 -0400
|
|
|
ec50314 |
+++ ./code/MaterialSystem.cpp 2013-07-05 18:17:27.363012139 -0400
|
|
|
ec50314 |
@@ -45,7 +45,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
|
ec50314 |
#include "AssimpPCH.h"
|
|
|
ec50314 |
|
|
|
ec50314 |
#include "Hash.h"
|
|
|
ec50314 |
-#include "fast_atof.h"
|
|
|
ec50314 |
+#include "fast_atof_assimp.h"
|
|
|
ec50314 |
#include "ParsingUtils.h"
|
|
|
ec50314 |
#include "MaterialSystem.h"
|
|
|
ec50314 |
|
|
|
ec50314 |
diff -up ./code/MD5Loader.cpp.unbundle ./code/MD5Loader.cpp
|
|
|
ec50314 |
--- ./code/MD5Loader.cpp.unbundle 2011-08-22 16:22:51.000000000 -0400
|
|
|
ec50314 |
+++ ./code/MD5Loader.cpp 2013-07-05 18:17:27.364012178 -0400
|
|
|
ec50314 |
@@ -50,7 +50,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
|
ec50314 |
#include "RemoveComments.h"
|
|
|
ec50314 |
#include "MD5Loader.h"
|
|
|
ec50314 |
#include "StringComparison.h"
|
|
|
ec50314 |
-#include "fast_atof.h"
|
|
|
ec50314 |
+#include "fast_atof_assimp.h"
|
|
|
ec50314 |
#include "SkeletonMeshBuilder.h"
|
|
|
ec50314 |
|
|
|
ec50314 |
using namespace Assimp;
|
|
|
ec50314 |
diff -up ./code/MD5Parser.cpp.unbundle ./code/MD5Parser.cpp
|
|
|
ec50314 |
--- ./code/MD5Parser.cpp.unbundle 2011-04-22 17:29:18.000000000 -0400
|
|
|
ec50314 |
+++ ./code/MD5Parser.cpp 2013-07-05 18:17:27.364012178 -0400
|
|
|
ec50314 |
@@ -47,7 +47,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
|
ec50314 |
// internal headers
|
|
|
ec50314 |
#include "MD5Loader.h"
|
|
|
ec50314 |
#include "MaterialSystem.h"
|
|
|
ec50314 |
-#include "fast_atof.h"
|
|
|
ec50314 |
+#include "fast_atof_assimp.h"
|
|
|
ec50314 |
#include "ParsingUtils.h"
|
|
|
ec50314 |
#include "StringComparison.h"
|
|
|
ec50314 |
|
|
|
ec50314 |
diff -up ./code/NFFLoader.cpp.unbundle ./code/NFFLoader.cpp
|
|
|
ec50314 |
--- ./code/NFFLoader.cpp.unbundle 2011-08-22 16:22:51.000000000 -0400
|
|
|
ec50314 |
+++ ./code/NFFLoader.cpp 2013-07-05 18:17:27.365012217 -0400
|
|
|
ec50314 |
@@ -48,7 +48,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
|
ec50314 |
#include "NFFLoader.h"
|
|
|
ec50314 |
#include "ParsingUtils.h"
|
|
|
ec50314 |
#include "StandardShapes.h"
|
|
|
ec50314 |
-#include "fast_atof.h"
|
|
|
ec50314 |
+#include "fast_atof_assimp.h"
|
|
|
ec50314 |
#include "RemoveComments.h"
|
|
|
ec50314 |
|
|
|
ec50314 |
using namespace Assimp;
|
|
|
ec50314 |
diff -up ./code/ObjFileMtlImporter.cpp.unbundle ./code/ObjFileMtlImporter.cpp
|
|
|
ec50314 |
--- ./code/ObjFileMtlImporter.cpp.unbundle 2010-04-10 11:30:22.000000000 -0400
|
|
|
ec50314 |
+++ ./code/ObjFileMtlImporter.cpp 2013-07-05 18:17:27.365012217 -0400
|
|
|
ec50314 |
@@ -45,7 +45,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
|
ec50314 |
#include "ObjFileMtlImporter.h"
|
|
|
ec50314 |
#include "ObjTools.h"
|
|
|
ec50314 |
#include "ObjFileData.h"
|
|
|
ec50314 |
-#include "fast_atof.h"
|
|
|
ec50314 |
+#include "fast_atof_assimp.h"
|
|
|
ec50314 |
|
|
|
ec50314 |
namespace Assimp {
|
|
|
ec50314 |
|
|
|
ec50314 |
diff -up ./code/ObjTools.h.unbundle ./code/ObjTools.h
|
|
|
ec50314 |
--- ./code/ObjTools.h.unbundle 2010-10-26 14:32:07.000000000 -0400
|
|
|
ec50314 |
+++ ./code/ObjTools.h 2013-07-05 18:17:27.365012217 -0400
|
|
|
ec50314 |
@@ -44,7 +44,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
|
ec50314 |
#ifndef OBJ_TOOLS_H_INC
|
|
|
ec50314 |
#define OBJ_TOOLS_H_INC
|
|
|
ec50314 |
|
|
|
ec50314 |
-#include "fast_atof.h"
|
|
|
ec50314 |
+#include "fast_atof_assimp.h"
|
|
|
ec50314 |
|
|
|
ec50314 |
namespace Assimp
|
|
|
ec50314 |
{
|
|
|
ec50314 |
diff -up ./code/OFFLoader.cpp.unbundle ./code/OFFLoader.cpp
|
|
|
ec50314 |
--- ./code/OFFLoader.cpp.unbundle 2011-08-22 16:22:51.000000000 -0400
|
|
|
ec50314 |
+++ ./code/OFFLoader.cpp 2013-07-05 18:17:27.366012255 -0400
|
|
|
ec50314 |
@@ -49,7 +49,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
|
ec50314 |
// internal headers
|
|
|
ec50314 |
#include "OFFLoader.h"
|
|
|
ec50314 |
#include "ParsingUtils.h"
|
|
|
ec50314 |
-#include "fast_atof.h"
|
|
|
ec50314 |
+#include "fast_atof_assimp.h"
|
|
|
ec50314 |
|
|
|
ec50314 |
|
|
|
ec50314 |
using namespace Assimp;
|
|
|
ec50314 |
diff -up ./code/OgreXmlHelper.h.unbundle ./code/OgreXmlHelper.h
|
|
|
ec50314 |
--- ./code/OgreXmlHelper.h.unbundle 2010-04-15 06:35:15.000000000 -0400
|
|
|
ec50314 |
+++ ./code/OgreXmlHelper.h 2013-07-05 18:17:27.366012255 -0400
|
|
|
ec50314 |
@@ -1,6 +1,6 @@
|
|
|
ec50314 |
|
|
|
ec50314 |
#include "irrXMLWrapper.h"
|
|
|
ec50314 |
-#include "fast_atof.h"
|
|
|
ec50314 |
+#include "fast_atof_assimp.h"
|
|
|
ec50314 |
|
|
|
ec50314 |
namespace Assimp
|
|
|
ec50314 |
{
|
|
|
ec50314 |
diff -up ./code/PlyParser.cpp.unbundle ./code/PlyParser.cpp
|
|
|
ec50314 |
--- ./code/PlyParser.cpp.unbundle 2011-03-23 10:26:19.000000000 -0400
|
|
|
ec50314 |
+++ ./code/PlyParser.cpp 2013-07-05 18:17:27.366012255 -0400
|
|
|
ec50314 |
@@ -45,7 +45,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
|
ec50314 |
#ifndef ASSIMP_BUILD_NO_PLY_IMPORTER
|
|
|
ec50314 |
|
|
|
ec50314 |
#include "PlyLoader.h"
|
|
|
ec50314 |
-#include "fast_atof.h"
|
|
|
ec50314 |
+#include "fast_atof_assimp.h"
|
|
|
ec50314 |
|
|
|
ec50314 |
using namespace Assimp;
|
|
|
ec50314 |
|
|
|
ec50314 |
diff -up ./code/Q3DLoader.cpp.unbundle ./code/Q3DLoader.cpp
|
|
|
ec50314 |
--- ./code/Q3DLoader.cpp.unbundle 2011-08-22 16:22:51.000000000 -0400
|
|
|
ec50314 |
+++ ./code/Q3DLoader.cpp 2013-07-05 18:17:27.367012294 -0400
|
|
|
ec50314 |
@@ -49,7 +49,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
|
ec50314 |
// internal headers
|
|
|
ec50314 |
#include "Q3DLoader.h"
|
|
|
ec50314 |
#include "StreamReader.h"
|
|
|
ec50314 |
-#include "fast_atof.h"
|
|
|
ec50314 |
+#include "fast_atof_assimp.h"
|
|
|
ec50314 |
|
|
|
ec50314 |
using namespace Assimp;
|
|
|
ec50314 |
|
|
|
ec50314 |
diff -up ./code/RawLoader.cpp.unbundle ./code/RawLoader.cpp
|
|
|
ec50314 |
--- ./code/RawLoader.cpp.unbundle 2011-08-22 16:22:51.000000000 -0400
|
|
|
ec50314 |
+++ ./code/RawLoader.cpp 2013-07-05 18:17:27.367012294 -0400
|
|
|
ec50314 |
@@ -49,7 +49,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
|
ec50314 |
// internal headers
|
|
|
ec50314 |
#include "RawLoader.h"
|
|
|
ec50314 |
#include "ParsingUtils.h"
|
|
|
ec50314 |
-#include "fast_atof.h"
|
|
|
ec50314 |
+#include "fast_atof_assimp.h"
|
|
|
ec50314 |
|
|
|
ec50314 |
using namespace Assimp;
|
|
|
ec50314 |
|
|
|
ec50314 |
diff -up ./code/SceneCombiner.cpp.unbundle ./code/SceneCombiner.cpp
|
|
|
ec50314 |
--- ./code/SceneCombiner.cpp.unbundle 2011-08-22 16:22:51.000000000 -0400
|
|
|
ec50314 |
+++ ./code/SceneCombiner.cpp 2013-07-05 18:17:27.368012333 -0400
|
|
|
ec50314 |
@@ -48,7 +48,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
|
ec50314 |
// ----------------------------------------------------------------------------
|
|
|
ec50314 |
#include "AssimpPCH.h"
|
|
|
ec50314 |
#include "SceneCombiner.h"
|
|
|
ec50314 |
-#include "fast_atof.h"
|
|
|
ec50314 |
+#include "fast_atof_assimp.h"
|
|
|
ec50314 |
#include "Hash.h"
|
|
|
ec50314 |
#include "time.h"
|
|
|
ec50314 |
|
|
|
ec50314 |
diff -up ./code/SMDLoader.cpp.unbundle ./code/SMDLoader.cpp
|
|
|
ec50314 |
--- ./code/SMDLoader.cpp.unbundle 2011-08-22 16:22:51.000000000 -0400
|
|
|
ec50314 |
+++ ./code/SMDLoader.cpp 2013-07-05 18:17:27.368012333 -0400
|
|
|
ec50314 |
@@ -48,7 +48,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
|
ec50314 |
|
|
|
ec50314 |
// internal headers
|
|
|
ec50314 |
#include "SMDLoader.h"
|
|
|
ec50314 |
-#include "fast_atof.h"
|
|
|
ec50314 |
+#include "fast_atof_assimp.h"
|
|
|
ec50314 |
#include "SkeletonMeshBuilder.h"
|
|
|
ec50314 |
|
|
|
ec50314 |
using namespace Assimp;
|
|
|
ec50314 |
diff -up ./code/STEPFileReader.cpp.unbundle ./code/STEPFileReader.cpp
|
|
|
ec50314 |
--- ./code/STEPFileReader.cpp.unbundle 2011-06-09 10:29:32.000000000 -0400
|
|
|
ec50314 |
+++ ./code/STEPFileReader.cpp 2013-07-05 18:17:27.368012333 -0400
|
|
|
ec50314 |
@@ -45,7 +45,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
|
ec50314 |
#include "AssimpPCH.h"
|
|
|
ec50314 |
#include "STEPFileReader.h"
|
|
|
ec50314 |
#include "TinyFormatter.h"
|
|
|
ec50314 |
-#include "fast_atof.h"
|
|
|
ec50314 |
+#include "fast_atof_assimp.h"
|
|
|
ec50314 |
|
|
|
ec50314 |
using namespace Assimp;
|
|
|
ec50314 |
namespace EXPRESS = STEP::EXPRESS;
|
|
|
ec50314 |
diff -up ./code/STLLoader.cpp.unbundle ./code/STLLoader.cpp
|
|
|
ec50314 |
--- ./code/STLLoader.cpp.unbundle 2011-08-22 16:22:51.000000000 -0400
|
|
|
ec50314 |
+++ ./code/STLLoader.cpp 2013-07-05 18:17:27.369012372 -0400
|
|
|
ec50314 |
@@ -47,7 +47,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
|
ec50314 |
// internal headers
|
|
|
ec50314 |
#include "STLLoader.h"
|
|
|
ec50314 |
#include "ParsingUtils.h"
|
|
|
ec50314 |
-#include "fast_atof.h"
|
|
|
ec50314 |
+#include "fast_atof_assimp.h"
|
|
|
ec50314 |
|
|
|
ec50314 |
using namespace Assimp;
|
|
|
ec50314 |
|
|
|
ec50314 |
diff -up ./code/UnrealLoader.cpp.unbundle ./code/UnrealLoader.cpp
|
|
|
ec50314 |
--- ./code/UnrealLoader.cpp.unbundle 2011-08-22 16:22:51.000000000 -0400
|
|
|
ec50314 |
+++ ./code/UnrealLoader.cpp 2013-07-05 18:17:27.369012372 -0400
|
|
|
ec50314 |
@@ -53,7 +53,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
|
ec50314 |
#include "UnrealLoader.h"
|
|
|
ec50314 |
#include "StreamReader.h"
|
|
|
ec50314 |
#include "ParsingUtils.h"
|
|
|
ec50314 |
-#include "fast_atof.h"
|
|
|
ec50314 |
+#include "fast_atof_assimp.h"
|
|
|
ec50314 |
#include "ConvertToLHProcess.h"
|
|
|
ec50314 |
|
|
|
ec50314 |
using namespace Assimp;
|
|
|
ec50314 |
diff -up ./code/ValidateDataStructure.cpp.unbundle ./code/ValidateDataStructure.cpp
|
|
|
ec50314 |
--- ./code/ValidateDataStructure.cpp.unbundle 2011-04-06 08:06:40.000000000 -0400
|
|
|
ec50314 |
+++ ./code/ValidateDataStructure.cpp 2013-07-05 18:17:27.370012410 -0400
|
|
|
ec50314 |
@@ -49,7 +49,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
|
ec50314 |
// internal headers
|
|
|
ec50314 |
#include "ValidateDataStructure.h"
|
|
|
ec50314 |
#include "BaseImporter.h"
|
|
|
ec50314 |
-#include "fast_atof.h"
|
|
|
ec50314 |
+#include "fast_atof_assimp.h"
|
|
|
ec50314 |
#include "ProcessHelper.h"
|
|
|
ec50314 |
|
|
|
ec50314 |
// CRT headers
|
|
|
ec50314 |
diff -up ./code/XFileParser.cpp.unbundle ./code/XFileParser.cpp
|
|
|
ec50314 |
--- ./code/XFileParser.cpp.unbundle 2011-06-09 10:29:32.000000000 -0400
|
|
|
ec50314 |
+++ ./code/XFileParser.cpp 2013-07-05 18:17:27.370012410 -0400
|
|
|
ec50314 |
@@ -46,7 +46,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
|
ec50314 |
|
|
|
ec50314 |
#include "XFileParser.h"
|
|
|
ec50314 |
#include "XFileHelper.h"
|
|
|
ec50314 |
-#include "fast_atof.h"
|
|
|
ec50314 |
+#include "fast_atof_assimp.h"
|
|
|
ec50314 |
|
|
|
ec50314 |
using namespace Assimp;
|
|
|
ec50314 |
using namespace Assimp::XFile;
|
|
|
ec50314 |
diff -up ./tools/assimp_cmd/CMakeLists.txt.unbundle ./tools/assimp_cmd/CMakeLists.txt
|
|
|
ec50314 |
--- ./tools/assimp_cmd/CMakeLists.txt.unbundle 2011-05-09 15:34:21.000000000 -0400
|
|
|
ec50314 |
+++ ./tools/assimp_cmd/CMakeLists.txt 2013-07-05 18:17:27.370012410 -0400
|
|
|
ec50314 |
@@ -17,7 +17,10 @@ ADD_EXECUTABLE( assimp_cmd
|
|
|
ec50314 |
Export.cpp
|
|
|
ec50314 |
)
|
|
|
ec50314 |
|
|
|
ec50314 |
-TARGET_LINK_LIBRARIES( assimp_cmd assimp ${ZLIB_LIBRARIES})
|
|
|
ec50314 |
+INCLUDE_DIRECTORIES(${IRRXML_INCLUDE_PATH})
|
|
|
34d5298 |
+TARGET_LINK_LIBRARIES( assimp_cmd assimp ${ZLIB_LIBRARIES} )
|
|
|
ec50314 |
+TARGET_LINK_LIBRARIES( assimp_cmd ${IRRXML_LIB})
|
|
|
ec50314 |
+
|
|
|
ec50314 |
SET_TARGET_PROPERTIES( assimp_cmd PROPERTIES
|
|
|
ec50314 |
OUTPUT_NAME assimp
|
|
|
ec50314 |
)
|
|
|
ec50314 |
diff -up ./tools/assimp_cmd/ImageExtractor.cpp.unbundle ./tools/assimp_cmd/ImageExtractor.cpp
|
|
|
ec50314 |
--- ./tools/assimp_cmd/ImageExtractor.cpp.unbundle 2011-08-20 18:00:33.000000000 -0400
|
|
|
ec50314 |
+++ ./tools/assimp_cmd/ImageExtractor.cpp 2013-07-05 18:17:27.370012410 -0400
|
|
|
ec50314 |
@@ -44,7 +44,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
|
ec50314 |
*/
|
|
|
ec50314 |
|
|
|
ec50314 |
#include "Main.h"
|
|
|
ec50314 |
-#include <../code/fast_atof.h>
|
|
|
ec50314 |
+#include <fast_atof_assimp.h>
|
|
|
ec50314 |
#include <../code/StringComparison.h>
|
|
|
ec50314 |
|
|
|
ec50314 |
const char* AICMD_MSG_DUMP_HELP_E =
|