浏览代码

Major API cleanup. Unified formatting & doxygen tags in the public API.
Added factory provider for default log streams.
Added default log streams to std::out and std::cerr.
Updated VC8 project config, boost workarounds is now working for the viewer.
Updated unit test suite.
Fixed some minor issues in the postprocessing-framework.

BROKEN: DebugDLL build.




git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@292 67173fc5-114c-0410-ac8e-9d2fd5bffc1f

aramis_acg 16 年之前
父节点
当前提交
58eb786d62
共有 100 个文件被更改,包括 5268 次插入1659 次删除
  1. 1 1
      clean.bat
  2. 1 1
      code/3DSLoader.cpp
  3. 1 1
      code/ACLoader.cpp
  4. 19 13
      code/Assimp.cpp
  5. 17 22
      code/AssimpPCH.h
  6. 2 10
      code/BaseImporter.cpp
  7. 6 4
      code/BaseImporter.h
  8. 7 12
      code/BaseProcess.h
  9. 44 35
      code/DefaultIOStream.cpp
  10. 14 17
      code/DefaultIOStream.h
  11. 103 78
      code/DefaultLogger.cpp
  12. 29 24
      code/FileLogStream.h
  13. 1 1
      code/FindDegenerates.cpp
  14. 12 8
      code/FindInvalidDataProcess.cpp
  15. 8 10
      code/GenVertexNormalsProcess.cpp
  16. 98 40
      code/Importer.cpp
  17. 40 9
      code/MaterialSystem.cpp
  18. 63 67
      code/MaterialSystem.h
  19. 1 1
      code/NFFLoader.cpp
  20. 7 7
      code/ParsingUtils.h
  21. 0 1
      code/ProcessHelper.h
  22. 1 1
      code/Q3DLoader.cpp
  23. 73 65
      code/RemoveVCProcess.cpp
  24. 26 10
      code/RemoveVCProcess.h
  25. 1 1
      code/SceneCombiner.cpp
  26. 5 5
      code/ScenePreprocessor.cpp
  27. 45 7
      code/ScenePreprocessor.h
  28. 4 6
      code/SmoothingGroups.inl
  29. 1 1
      code/SortByPTypeProcess.cpp
  30. 52 0
      code/StdOStreamLogStream.h
  31. 24 24
      code/StreamReader.h
  32. 57 34
      code/StringComparison.h
  33. 7 3
      code/TargetAnimation.cpp
  34. 20 22
      code/VertexTriangleAdjacency.h
  35. 7 18
      code/Win32DebugLogStream.h
  36. 34 35
      include/BoostWorkaround/boost/tuple/tuple.hpp
  37. 32 21
      include/DefaultLogger.h
  38. 76 47
      include/IOStream.h
  39. 64 19
      include/IOSystem.h
  40. 91 11
      include/LogStream.h
  41. 45 21
      include/Logger.h
  42. 6 6
      include/aiAnim.h
  43. 5 6
      include/aiCamera.h
  44. 82 57
      include/aiDefines.h
  45. 32 28
      include/aiFileIO.h
  46. 7 7
      include/aiLight.h
  47. 159 121
      include/aiMaterial.h
  48. 22 16
      include/aiMaterial.inl
  49. 85 75
      include/aiMesh.h
  50. 2 2
      include/aiScene.h
  51. 42 24
      include/aiTexture.h
  52. 164 54
      include/aiTypes.h
  53. 63 26
      include/aiVector2D.h
  54. 63 40
      include/assimp.hpp
  55. 28 17
      test/RunSingleUnitTestSuite.bat
  56. 25 18
      test/RunUnitTestSuite.bat
  57. 35 0
      test/unit/BoostWorkaround/tupletest.cpp
  58. 7 0
      test/unit/CCompilerTest.c
  59. 0 28
      test/unit/ExecuteUnitTestWin32.bat
  60. 0 28
      test/unit/ExecuteUnitTestWin64.bat
  61. 16 0
      test/unit/Main.cpp
  62. 3 0
      test/unit/UnitTestPCH.cpp
  63. 21 0
      test/unit/UnitTestPCH.h
  64. 7 9
      test/unit/utFindInvalidData.cpp
  65. 0 5
      test/unit/utFindInvalidData.h
  66. 2 0
      test/unit/utFixInfacingNormals.cpp
  67. 5 3
      test/unit/utGenNormals.cpp
  68. 2 0
      test/unit/utImporter.cpp
  69. 1 1
      test/unit/utImporter.h
  70. 2 0
      test/unit/utImproveCacheLocality.cpp
  71. 7 3
      test/unit/utJoinVertices.cpp
  72. 4 0
      test/unit/utLimitBoneWeights.cpp
  73. 15 7
      test/unit/utMaterialSystem.cpp
  74. 2 0
      test/unit/utOptimizeGraph.cpp
  75. 2 0
      test/unit/utPretransformVertices.cpp
  76. 5 1
      test/unit/utRemoveComments.cpp
  77. 95 0
      test/unit/utRemoveComponent.cpp
  78. 1 1
      test/unit/utRemoveComponent.h
  79. 8 3
      test/unit/utRemoveRedundantMaterials.cpp
  80. 137 0
      test/unit/utScenePreprocessor.cpp
  81. 44 0
      test/unit/utScenePreprocessor.h
  82. 7 0
      test/unit/utSharedPPData.cpp
  83. 29 15
      test/unit/utSortByPType.cpp
  84. 0 2
      test/unit/utSortByPType.h
  85. 7 2
      test/unit/utSplitLargeMeshes.cpp
  86. 4 0
      test/unit/utTargetAnimation.cpp
  87. 0 0
      test/unit/utTargetAnimation.h
  88. 2 0
      test/unit/utTextureTransform.cpp
  89. 1 0
      test/unit/utTriangulate.cpp
  90. 7 2
      test/unit/utVertexTriangleAdjacency.cpp
  91. 5 1
      tools/assimp_view/AnimEvaluator.h
  92. 3 0
      tools/assimp_view/MessageProc.cpp
  93. 821 59
      workspaces/vc8/UnitTest.vcproj
  94. 128 84
      workspaces/vc8/assimp.sln
  95. 497 136
      workspaces/vc8/assimp.vcproj
  96. 413 51
      workspaces/vc8/assimp_view.vcproj
  97. 962 8
      workspaces/vc8/jAssimp.vcproj
  98. 17 0
      workspaces/vc8/shared/DllShared.vsprops
  99. 9 0
      workspaces/vc8/shared/LibShared.vsprops
  100. 11 0
      workspaces/vc8/shared/NoBoostShared.vsprops

+ 1 - 1
clean.bat

@@ -2,5 +2,5 @@ cd code
 mingw32-make -f makefile.mingw clean
 mingw32-make -f makefile.mingw clean
 
 
 cd ..
 cd ..
-del /Q /S obj bin
+del /Q /S obj bin lib
 
 

+ 1 - 1
code/3DSLoader.cpp

@@ -264,7 +264,7 @@ void Discreet3DSImporter::ParseEditorChunk()
 		{
 		{
 		// print the version number
 		// print the version number
 		char buff[10];
 		char buff[10];
-		itoa10(buff,stream->GetI2());
+		ASSIMP_itoa10(buff,stream->GetI2());
 		DefaultLogger::get()->info(std::string("3DS file format version: ") + buff);
 		DefaultLogger::get()->info(std::string("3DS file format version: ") + buff);
 		}
 		}
 		break;
 		break;

+ 1 - 1
code/ACLoader.cpp

@@ -734,7 +734,7 @@ void AC3DImporter::InternReadFile( const std::string& pFile,
 	// print the file format version to the console
 	// print the file format version to the console
 	unsigned int version = HexDigitToDecimal( buffer[4] );
 	unsigned int version = HexDigitToDecimal( buffer[4] );
 	char msg[3];
 	char msg[3];
-	itoa10(msg,3,version);
+	ASSIMP_itoa10(msg,3,version);
 	DefaultLogger::get()->info(std::string("AC3D file format version: ") + msg);
 	DefaultLogger::get()->info(std::string("AC3D file format version: ") + msg);
 
 
 	std::vector<Material> materials;
 	std::vector<Material> materials;

+ 19 - 13
code/Assimp.cpp

@@ -50,7 +50,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
 #include "GenericProperty.h"
 #include "GenericProperty.h"
 
 
-
 #if (defined AI_C_THREADSAFE)
 #if (defined AI_C_THREADSAFE)
 #	include <boost/thread/thread.hpp>
 #	include <boost/thread/thread.hpp>
 #	include <boost/thread/mutex.hpp>
 #	include <boost/thread/mutex.hpp>
@@ -92,7 +91,7 @@ public:
 	{}
 	{}
 
 
 	// -------------------------------------------------------------------
 	// -------------------------------------------------------------------
-    size_t Read(void* pvBuffer, 
+	size_t Read(void* pvBuffer, 
 		size_t pSize, 
 		size_t pSize, 
 		size_t pCount)
 		size_t pCount)
 	{
 	{
@@ -100,16 +99,14 @@ public:
 		return mFile->ReadProc(mFile,(char*)pvBuffer,pSize,pCount);
 		return mFile->ReadProc(mFile,(char*)pvBuffer,pSize,pCount);
 	}
 	}
 
 
-
 	// -------------------------------------------------------------------
 	// -------------------------------------------------------------------
-   size_t Write(const void* pvBuffer, 
+	size_t Write(const void* pvBuffer, 
 		size_t pSize,
 		size_t pSize,
 		size_t pCount)
 		size_t pCount)
-   {
-	   // need to typecast here as C has no void*
-	   return mFile->WriteProc(mFile,(const char*)pvBuffer,pSize,pCount);
-   }
-
+	{
+		// need to typecast here as C has no void*
+		return mFile->WriteProc(mFile,(const char*)pvBuffer,pSize,pCount);
+	}
 
 
 	// -------------------------------------------------------------------
 	// -------------------------------------------------------------------
 	aiReturn Seek(size_t pOffset,
 	aiReturn Seek(size_t pOffset,
@@ -118,20 +115,24 @@ public:
 		return mFile->SeekProc(mFile,pOffset,pOrigin);
 		return mFile->SeekProc(mFile,pOffset,pOrigin);
 	}
 	}
 
 
-
 	// -------------------------------------------------------------------
 	// -------------------------------------------------------------------
-    size_t Tell(void) const
+	size_t Tell(void) const
 	{
 	{
 		return mFile->TellProc(mFile);
 		return mFile->TellProc(mFile);
 	}
 	}
 
 
-
 	// -------------------------------------------------------------------
 	// -------------------------------------------------------------------
 	size_t	FileSize() const
 	size_t	FileSize() const
 	{
 	{
 		return mFile->FileSizeProc(mFile);
 		return mFile->FileSizeProc(mFile);
 	}
 	}
 
 
+	// -------------------------------------------------------------------
+	void Flush ()
+	{
+		return mFile->FlushProc(mFile);
+	}
+
 private:
 private:
 	aiFile* mFile;
 	aiFile* mFile;
 };
 };
@@ -152,13 +153,17 @@ public:
 	{
 	{
 		CIOSystemWrapper* pip = const_cast<CIOSystemWrapper*>(this);
 		CIOSystemWrapper* pip = const_cast<CIOSystemWrapper*>(this);
 		IOStream* p = pip->Open(pFile);
 		IOStream* p = pip->Open(pFile);
-		if (p){pip->Close(p);return true;}
+		if (p){
+			pip->Close(p);
+			return true;
+		}
 		return false;
 		return false;
 	}
 	}
 
 
 	// -------------------------------------------------------------------
 	// -------------------------------------------------------------------
 	std::string getOsSeparator() const
 	std::string getOsSeparator() const
 	{
 	{
+		// FIXME
 		return "/";
 		return "/";
 	}
 	}
 
 
@@ -179,6 +184,7 @@ public:
 		delete pFile;
 		delete pFile;
 	}
 	}
 
 
+
 private:
 private:
 
 
 	aiFileIO* mFileSystem;
 	aiFileIO* mFileSystem;

+ 17 - 22
code/AssimpPCH.h

@@ -44,17 +44,12 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
 #define ASSIMP_INTERNAL_BUILD
 #define ASSIMP_INTERNAL_BUILD
 
 
-// *******************************************************************
-// If we have at least VC8 some C string manipulation functions
-// are mapped to their safe _s counterparts (e.g. _itoa_s).
-// *******************************************************************
-#if _MSC_VER >= 1400 && !(defined _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES)
-#	define _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES 1
-#endif
-
-// *******************************************************************
-// STL headers - we need quite a lot of them
-// *******************************************************************
+// Compile config
+#include "../include/aiDefines.h"
+
+// ===================================================================
+// Runtime/STL headers
+// ===================================================================
 #include <vector>
 #include <vector>
 #include <list>
 #include <list>
 #include <map>
 #include <map>
@@ -67,10 +62,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include <iostream>
 #include <iostream>
 #include <algorithm>
 #include <algorithm>
 #include <numeric>
 #include <numeric>
+#include <new>
 
 
-// *******************************************************************
-// public ASSIMP headers
-// *******************************************************************
+// ===================================================================
+// Public ASSIMP headers
+// ===================================================================
 #include "../include/DefaultLogger.h"
 #include "../include/DefaultLogger.h"
 #include "../include/IOStream.h"
 #include "../include/IOStream.h"
 #include "../include/IOSystem.h"
 #include "../include/IOSystem.h"
@@ -78,18 +74,18 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include "../include/aiPostProcess.h"
 #include "../include/aiPostProcess.h"
 #include "../include/assimp.hpp"
 #include "../include/assimp.hpp"
 
 
-// *******************************************************************
-// internal headers that are nearly always required
-// *******************************************************************
+// ===================================================================
+// Internal utility headers
+// ===================================================================
 #include "BaseImporter.h"
 #include "BaseImporter.h"
 #include "MaterialSystem.h"
 #include "MaterialSystem.h"
 #include "StringComparison.h"
 #include "StringComparison.h"
 #include "StreamReader.h"
 #include "StreamReader.h"
 #include "qnan.h"
 #include "qnan.h"
 
 
-// *******************************************************************
+// ===================================================================
 // boost headers - take them from the workaround dir if possible
 // boost headers - take them from the workaround dir if possible
-// *******************************************************************
+// ===================================================================
 #ifdef ASSIMP_BUILD_BOOST_WORKAROUND
 #ifdef ASSIMP_BUILD_BOOST_WORKAROUND
 
 
 #	include "../include/BoostWorkaround/boost/scoped_ptr.hpp"
 #	include "../include/BoostWorkaround/boost/scoped_ptr.hpp"
@@ -104,8 +100,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #	include <boost/format.hpp>
 #	include <boost/format.hpp>
 #	include <boost/foreach.hpp>
 #	include <boost/foreach.hpp>
 
 
-#endif
-
-
+#endif // ! ASSIMP_BUILD_BOOST_WORKAROUND
 #endif // !! ASSIMP_PCH_INCLUDED
 #endif // !! ASSIMP_PCH_INCLUDED
 
 
+

+ 2 - 10
code/BaseImporter.cpp

@@ -169,7 +169,7 @@ struct LoadRequest
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
 // BatchLoader::pimpl data structure
 // BatchLoader::pimpl data structure
-struct BatchData
+struct Assimp::BatchData
 {
 {
 	// IO system to be used for all imports
 	// IO system to be used for all imports
 	IOSystem* pIOSystem;
 	IOSystem* pIOSystem;
@@ -189,8 +189,7 @@ BatchLoader::BatchLoader(IOSystem* pIO)
 {
 {
 	ai_assert(NULL != pIO);
 	ai_assert(NULL != pIO);
 
 
-	pimpl = new BatchData();
-	BatchData* data = ( BatchData* )pimpl;
+	data = new BatchData();
 	data->pIOSystem = pIO;
 	data->pIOSystem = pIO;
 	data->pImporter = new Importer();
 	data->pImporter = new Importer();
 }
 }
@@ -199,7 +198,6 @@ BatchLoader::BatchLoader(IOSystem* pIO)
 BatchLoader::~BatchLoader()
 BatchLoader::~BatchLoader()
 {
 {
 	// delete all scenes wthat have not been polled by the user
 	// delete all scenes wthat have not been polled by the user
-	BatchData* data = ( BatchData* )pimpl;
 	for (std::list<LoadRequest>::iterator it = data->requests.begin();
 	for (std::list<LoadRequest>::iterator it = data->requests.begin();
 		it != data->requests.end(); ++it)
 		it != data->requests.end(); ++it)
 	{
 	{
@@ -212,7 +210,6 @@ BatchLoader::~BatchLoader()
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
 void BatchLoader::SetBasePath (const std::string& pBase)
 void BatchLoader::SetBasePath (const std::string& pBase)
 {
 {
-	BatchData* data = ( BatchData* )pimpl;
 	data->pathBase = pBase;
 	data->pathBase = pBase;
 
 
 	// file name? we just need the directory
 	// file name? we just need the directory
@@ -241,8 +238,6 @@ void BatchLoader::AddLoadRequest	(const std::string& file,
 	ai_assert(!file.empty());
 	ai_assert(!file.empty());
 
 
 	// no threaded implementation for the moment
 	// no threaded implementation for the moment
-	BatchData* data = ( BatchData* )pimpl;
-
 	std::string real;
 	std::string real;
 
 
 	// build a full path if this is a relative path and 
 	// build a full path if this is a relative path and 
@@ -273,7 +268,6 @@ void BatchLoader::AddLoadRequest	(const std::string& file,
 aiScene* BatchLoader::GetImport		(const std::string& file)
 aiScene* BatchLoader::GetImport		(const std::string& file)
 {
 {
 	// no threaded implementation for the moment
 	// no threaded implementation for the moment
-	BatchData* data = ( BatchData* )pimpl;
 	std::string real;
 	std::string real;
 
 
 	// build a full path if this is a relative path and 
 	// build a full path if this is a relative path and 
@@ -302,8 +296,6 @@ aiScene* BatchLoader::GetImport		(const std::string& file)
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
 void BatchLoader::LoadAll()
 void BatchLoader::LoadAll()
 {
 {
-	BatchData* data = ( BatchData* )pimpl;
-
 	// no threaded implementation for the moment
 	// no threaded implementation for the moment
 	for (std::list<LoadRequest>::iterator it = data->requests.begin();
 	for (std::list<LoadRequest>::iterator it = data->requests.begin();
 		it != data->requests.end(); ++it)
 		it != data->requests.end(); ++it)

+ 6 - 4
code/BaseImporter.h

@@ -39,8 +39,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
 */
 
 
 /** @file Definition of the base class for all importer worker classes. */
 /** @file Definition of the base class for all importer worker classes. */
-#ifndef AI_BASEIMPORTER_H_INC
-#define AI_BASEIMPORTER_H_INC
+#ifndef INCLUDED_AI_BASEIMPORTER_H
+#define INCLUDED_AI_BASEIMPORTER_H
 
 
 #include <string>
 #include <string>
 #include "./../include/aiTypes.h"
 #include "./../include/aiTypes.h"
@@ -203,7 +203,7 @@ protected:
 	 *
 	 *
 	 *  The function searches the header of a file for a specific token
 	 *  The function searches the header of a file for a specific token
 	 *  and returns true if this token is found. This works for text
 	 *  and returns true if this token is found. This works for text
-	 *  files only. There is a rudimentary handling if UNICODE files.
+	 *  files only. There is a rudimentary handling of UNICODE files.
 	 *  The comparison is case independent.
 	 *  The comparison is case independent.
 	 *
 	 *
 	 *  @param pIOSystem IO System to work with
 	 *  @param pIOSystem IO System to work with
@@ -239,6 +239,8 @@ protected:
 	std::string mErrorText;
 	std::string mErrorText;
 };
 };
 
 
+struct BatchData;
+
 // ---------------------------------------------------------------------------
 // ---------------------------------------------------------------------------
 /** A helper class that can be used by importers which need to load many
 /** A helper class that can be used by importers which need to load many
  *  extern meshes recursively.
  *  extern meshes recursively.
@@ -316,7 +318,7 @@ public:
 private:
 private:
 
 
 	// No need to have that in the public API ...
 	// No need to have that in the public API ...
-	void* pimpl;
+	BatchData* data;
 };
 };
 
 
 
 

+ 7 - 12
code/BaseProcess.h

@@ -39,8 +39,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
 */
 
 
 /** @file Base class of all import post processing steps */
 /** @file Base class of all import post processing steps */
-#ifndef AI_BASEPROCESS_H_INC
-#define AI_BASEPROCESS_H_INC
+#ifndef INCLUDED_AI_BASEPROCESS_H
+#define INCLUDED_AI_BASEPROCESS_H
 
 
 #include <map>
 #include <map>
 
 
@@ -155,20 +155,17 @@ public:
 		return true;
 		return true;
 	}
 	}
 
 
-	inline void RemoveProperty( const char* name)
-	{
+	inline void RemoveProperty( const char* name)	{
 		SetGenericPropertyPtr<Base>(pmap,name,NULL);
 		SetGenericPropertyPtr<Base>(pmap,name,NULL);
 	}
 	}
 
 
 private:
 private:
 
 
-	inline void AddProperty( const char* name, Base* data)
-	{
+	inline void AddProperty( const char* name, Base* data)	{
 		SetGenericPropertyPtr<Base>(pmap,name,data);
 		SetGenericPropertyPtr<Base>(pmap,name,data);
 	}
 	}
 
 
-	inline void GetProperty( const char* name, Base*& data) const
-	{
+	inline void GetProperty( const char* name, Base*& data) const	{
 		data = GetGenericProperty<Base*>(pmap,name,NULL);
 		data = GetGenericProperty<Base*>(pmap,name,NULL);
 	}
 	}
 
 
@@ -239,16 +236,14 @@ public:
 	 *  allows multiple postprocess steps to share data.
 	 *  allows multiple postprocess steps to share data.
 	 * @param sh May be NULL
 	 * @param sh May be NULL
 	*/
 	*/
-	inline void SetSharedData(SharedPostProcessInfo* sh)
-	{
+	inline void SetSharedData(SharedPostProcessInfo* sh)	{
 		shared = sh;
 		shared = sh;
 	}
 	}
 
 
 	// -------------------------------------------------------------------
 	// -------------------------------------------------------------------
 	/** Get the shared data that is assigned to the step.
 	/** Get the shared data that is assigned to the step.
 	*/
 	*/
-	inline SharedPostProcessInfo* GetSharedData()
-	{
+	inline SharedPostProcessInfo* GetSharedData()	{
 		return shared;
 		return shared;
 	}
 	}
 
 

+ 44 - 35
code/DefaultIOStream.cpp

@@ -43,70 +43,71 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include "AssimpPCH.h"
 #include "AssimpPCH.h"
 
 
 #include "DefaultIOStream.h"
 #include "DefaultIOStream.h"
-#include "../include/aiAssert.h"
 #include <sys/types.h> 
 #include <sys/types.h> 
 #include <sys/stat.h> 
 #include <sys/stat.h> 
 
 
 using namespace Assimp;
 using namespace Assimp;
 
 
-
-// ---------------------------------------------------------------------------
+// ----------------------------------------------------------------------------------
 DefaultIOStream::~DefaultIOStream()
 DefaultIOStream::~DefaultIOStream()
 {
 {
-	if (this->mFile)
-	{
-		::fclose(this->mFile);
-	}	
+	if (mFile)
+		::fclose(mFile);
 }
 }
-// ---------------------------------------------------------------------------
+
+
+// ----------------------------------------------------------------------------------
 size_t DefaultIOStream::Read(void* pvBuffer, 
 size_t DefaultIOStream::Read(void* pvBuffer, 
-								size_t pSize, 
-								size_t pCount)
+	size_t pSize, 
+	size_t pCount)
 {
 {
 	ai_assert(NULL != pvBuffer && 0 != pSize && 0 != pCount);
 	ai_assert(NULL != pvBuffer && 0 != pSize && 0 != pCount);
+	return (mFile ? ::fread(pvBuffer, pSize, pCount, mFile) : 0);
+}
 
 
-	if (!this->mFile)
-		return 0;
 
 
-	return ::fread(pvBuffer, pSize, pCount, this->mFile);
-}
-// ---------------------------------------------------------------------------
+// ----------------------------------------------------------------------------------
 size_t DefaultIOStream::Write(const void* pvBuffer, 
 size_t DefaultIOStream::Write(const void* pvBuffer, 
-								 size_t pSize,
-								 size_t pCount)
+	size_t pSize,
+	size_t pCount)
 {
 {
 	ai_assert(NULL != pvBuffer && 0 != pSize && 0 != pCount);
 	ai_assert(NULL != pvBuffer && 0 != pSize && 0 != pCount);
+	return (mFile ? ::fwrite(pvBuffer, pSize, pCount, mFile) : 0);
+}
 
 
-	if (!this->mFile)return 0;
 
 
-	::fseek(mFile, 0, SEEK_SET);
-	return ::fwrite(pvBuffer, pSize, pCount, this->mFile);
-}
-// ---------------------------------------------------------------------------
+// ----------------------------------------------------------------------------------
 aiReturn DefaultIOStream::Seek(size_t pOffset,
 aiReturn DefaultIOStream::Seek(size_t pOffset,
-						   aiOrigin pOrigin)
+	 aiOrigin pOrigin)
 {
 {
-	if (!this->mFile)return AI_FAILURE;
+	if (!mFile)return AI_FAILURE;
 
 
-	return (0 == ::fseek(this->mFile, (long)pOffset,
-		(aiOrigin_CUR == pOrigin ? SEEK_CUR :
-		(aiOrigin_END == pOrigin ? SEEK_END : SEEK_SET))) 
-		? AI_SUCCESS : AI_FAILURE);
+	// Just to check whether our enum maps one to one with the CRT constants
+	ai_assert(aiOrigin_CUR == SEEK_CUR && aiOrigin_END == SEEK_END 
+		&& aiOrigin_SET == SEEK_SET);
+
+	// do the seek
+	return (0 == ::fseek(mFile, (long)pOffset,(int)pOrigin) ? AI_SUCCESS : AI_FAILURE);
 }
 }
-// ---------------------------------------------------------------------------
+
+
+// ----------------------------------------------------------------------------------
 size_t DefaultIOStream::Tell() const
 size_t DefaultIOStream::Tell() const
 {
 {
-	if (!this->mFile)return 0;
-
-	return ::ftell(this->mFile);
+	if (!mFile)return 0;
+	return ::ftell(mFile);
 }
 }
-// ---------------------------------------------------------------------------
+
+
+// ----------------------------------------------------------------------------------
 size_t DefaultIOStream::FileSize() const
 size_t DefaultIOStream::FileSize() const
 {
 {
 	ai_assert (!mFilename.empty());
 	ai_assert (!mFilename.empty());
 
 
-	if (NULL == mFile)
+	if (! mFile)
 		return 0;
 		return 0;
+
+	// TODO: Is that really faster if we have already opened the file?
 #if defined _WIN32 && !defined __GNUC__
 #if defined _WIN32 && !defined __GNUC__
 	struct __stat64 fileStat; 
 	struct __stat64 fileStat; 
 	int err = _stat64(  mFilename.c_str(), &fileStat ); 
 	int err = _stat64(  mFilename.c_str(), &fileStat ); 
@@ -121,4 +122,12 @@ size_t DefaultIOStream::FileSize() const
 	return (size_t) (fileStat.st_size); 
 	return (size_t) (fileStat.st_size); 
 #endif
 #endif
 }
 }
-// ---------------------------------------------------------------------------
+
+// ----------------------------------------------------------------------------------
+void DefaultIOStream::Flush()
+{
+	if (mFile)
+		::fflush(mFile);
+}
+
+// ----------------------------------------------------------------------------------

+ 14 - 17
code/DefaultIOStream.h

@@ -42,17 +42,14 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #ifndef AI_DEFAULTIOSTREAM_H_INC
 #ifndef AI_DEFAULTIOSTREAM_H_INC
 #define AI_DEFAULTIOSTREAM_H_INC
 #define AI_DEFAULTIOSTREAM_H_INC
 
 
-#include <string>
 #include <stdio.h>
 #include <stdio.h>
 #include "../include/IOStream.h"
 #include "../include/IOStream.h"
 
 
-namespace Assimp
-{
+namespace Assimp	{
 
 
-// ---------------------------------------------------------------------------
-//!	\class	DefaultIOStream
-//!	\brief	Default IO implementation, use standard IO operations
-// ---------------------------------------------------------------------------
+// ----------------------------------------------------------------------------------
+//!	@class	DefaultIOStream
+//!	@brief	Default IO implementation, use standard IO operations
 class DefaultIOStream : public IOStream
 class DefaultIOStream : public IOStream
 {
 {
 	friend class DefaultIOSystem;
 	friend class DefaultIOSystem;
@@ -66,39 +63,39 @@ public:
 	~DefaultIOStream ();
 	~DefaultIOStream ();
 
 
 	// -------------------------------------------------------------------
 	// -------------------------------------------------------------------
-	// -------------------------------------------------------------------
     size_t Read(void* pvBuffer, 
     size_t Read(void* pvBuffer, 
 		size_t pSize, 
 		size_t pSize, 
 		size_t pCount);
 		size_t pCount);
 
 
 
 
-	// -------------------------------------------------------------------
 	// -------------------------------------------------------------------
 	// -------------------------------------------------------------------
     size_t Write(const void* pvBuffer, 
     size_t Write(const void* pvBuffer, 
 		size_t pSize,
 		size_t pSize,
 		size_t pCount);
 		size_t pCount);
 
 
 
 
-	// -------------------------------------------------------------------
 	// -------------------------------------------------------------------
 	// -------------------------------------------------------------------
 	aiReturn Seek(size_t pOffset,
 	aiReturn Seek(size_t pOffset,
 		aiOrigin pOrigin);
 		aiOrigin pOrigin);
 
 
-
-	// -------------------------------------------------------------------
 	// -------------------------------------------------------------------
 	// -------------------------------------------------------------------
     size_t Tell() const;
     size_t Tell() const;
 
 
-	//!	Returns filesize
+	// -------------------------------------------------------------------
 	size_t FileSize() const;
 	size_t FileSize() const;
 
 
+	// -------------------------------------------------------------------
+	void Flush();
+
 private:
 private:
 	//!	File datastructure, using clib
 	//!	File datastructure, using clib
 	FILE* mFile;
 	FILE* mFile;
 	//!	Filename
 	//!	Filename
 	std::string	mFilename;
 	std::string	mFilename;
 };
 };
-// ---------------------------------------------------------------------------
+
+
+// ----------------------------------------------------------------------------------
 inline DefaultIOStream::DefaultIOStream () : 
 inline DefaultIOStream::DefaultIOStream () : 
 	mFile(NULL), 
 	mFile(NULL), 
 	mFilename("") 
 	mFilename("") 
@@ -106,7 +103,8 @@ inline DefaultIOStream::DefaultIOStream () :
 	// empty
 	// empty
 }
 }
 
 
-// ---------------------------------------------------------------------------
+
+// ----------------------------------------------------------------------------------
 inline DefaultIOStream::DefaultIOStream (FILE* pFile, 
 inline DefaultIOStream::DefaultIOStream (FILE* pFile, 
 		const std::string &strFilename) :
 		const std::string &strFilename) :
 	mFile(pFile), 
 	mFile(pFile), 
@@ -114,8 +112,7 @@ inline DefaultIOStream::DefaultIOStream (FILE* pFile,
 {
 {
 	// empty
 	// empty
 }
 }
-
-// ---------------------------------------------------------------------------
+// ----------------------------------------------------------------------------------
 
 
 } // ns assimp
 } // ns assimp
 
 

+ 103 - 78
code/DefaultLogger.cpp

@@ -40,18 +40,20 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
 */
 
 
 #include "AssimpPCH.h"
 #include "AssimpPCH.h"
-
 #include "DefaultIOSystem.h"
 #include "DefaultIOSystem.h"
+
+// Default log streams
 #include "Win32DebugLogStream.h"
 #include "Win32DebugLogStream.h"
+#include "StdOStreamLogStream.h"
 #include "FileLogStream.h"
 #include "FileLogStream.h"
 
 
-namespace Assimp
-{
-// ---------------------------------------------------------------------------
+namespace Assimp	{
+
+// ----------------------------------------------------------------------------------
 NullLogger DefaultLogger::s_pNullLogger;
 NullLogger DefaultLogger::s_pNullLogger;
 Logger *DefaultLogger::m_pLogger = &DefaultLogger::s_pNullLogger;
 Logger *DefaultLogger::m_pLogger = &DefaultLogger::s_pNullLogger;
 
 
-// ---------------------------------------------------------------------------
+// ----------------------------------------------------------------------------------
 //
 //
 struct LogStreamInfo
 struct LogStreamInfo
 {
 {
@@ -72,17 +74,73 @@ struct LogStreamInfo
 		// empty
 		// empty
 	}
 	}
 };
 };
-// ---------------------------------------------------------------------------
+
+// ----------------------------------------------------------------------------------
+// Construct a default log stream
+LogStream* LogStream::createDefaultStream(DefaultLogStreams	streams,
+	const std::string& name /*= "AssimpLog.txt"*/,
+	IOSystem* io		    /*= NULL*/)
+{
+	switch (streams)	
+	{
+		// This is a platform-specific feature
+	case DLS_DEBUGGER:
+#ifdef WIN32
+		return new Win32DebugLogStream();
+#else
+		return NULL;
+#endif
+
+		// Platform-independent default streams
+	case DLS_CERR:
+		return new StdOStreamLogStream(std::cerr);
+	case DLS_COUT:
+		return new StdOStreamLogStream(std::cout);
+	case DLS_FILE:
+		return (name.size() ? new FileLogStream(name,io) : NULL);
+	default:
+		// We don't know this default log stream, so raise an assertion
+		ai_assert(false);
+
+	};
+
+	// For compilers without dead code path detection
+	return NULL;
+}
+
+// ----------------------------------------------------------------------------------
 //	Creates the only singleton instance
 //	Creates the only singleton instance
-Logger *DefaultLogger::create(const std::string &name, LogSeverity severity)
+Logger *DefaultLogger::create(const std::string &name /*= "AssimpLog.txt"*/,
+	LogSeverity severity    /*= NORMAL*/,
+	unsigned int defStreams /*= DLS_DEBUGGER | DLS_FILE*/,
+	IOSystem* io		    /*= NULL*/)
 {
 {
 	if (m_pLogger && !isNullLogger() )
 	if (m_pLogger && !isNullLogger() )
 		delete m_pLogger;
 		delete m_pLogger;
-	m_pLogger = new DefaultLogger( name, severity );
+
+	m_pLogger = new DefaultLogger( severity );
+
+	// Attach default log streams
+	// Stream the log to the MSVC debugger?
+	if (defStreams & DLS_DEBUGGER)
+		m_pLogger->attachStream( LogStream::createDefaultStream(DLS_DEBUGGER));
+
+	// Stream the log to COUT?
+	if (defStreams & DLS_COUT)
+		m_pLogger->attachStream( LogStream::createDefaultStream(DLS_COUT));
+
+	// Stream the log to CERR?
+	if (defStreams & DLS_CERR)
+		 m_pLogger->attachStream( LogStream::createDefaultStream(DLS_CERR));
 	
 	
+	// Stream the log to a file
+	if (defStreams & DLS_FILE && !name.empty())
+		m_pLogger->attachStream( LogStream::createDefaultStream(DLS_FILE,name,io));
+
 	return m_pLogger;
 	return m_pLogger;
 }
 }
-// ---------------------------------------------------------------------------
+
+// ----------------------------------------------------------------------------------
 void DefaultLogger::set( Logger *logger )
 void DefaultLogger::set( Logger *logger )
 {
 {
 	if (!logger)logger = &s_pNullLogger;
 	if (!logger)logger = &s_pNullLogger;
@@ -91,19 +149,21 @@ void DefaultLogger::set( Logger *logger )
 
 
 	DefaultLogger::m_pLogger = logger;
 	DefaultLogger::m_pLogger = logger;
 }
 }
-// ---------------------------------------------------------------------------
+
+// ----------------------------------------------------------------------------------
 bool DefaultLogger::isNullLogger()
 bool DefaultLogger::isNullLogger()
 {
 {
 	return m_pLogger == &s_pNullLogger;
 	return m_pLogger == &s_pNullLogger;
 }
 }
-// ---------------------------------------------------------------------------
+
+// ----------------------------------------------------------------------------------
 //	Singleton getter
 //	Singleton getter
 Logger *DefaultLogger::get()
 Logger *DefaultLogger::get()
 {
 {
 	return m_pLogger;
 	return m_pLogger;
 }
 }
 
 
-// ---------------------------------------------------------------------------
+// ----------------------------------------------------------------------------------
 //	Kills the only instance
 //	Kills the only instance
 void DefaultLogger::kill()
 void DefaultLogger::kill()
 {
 {
@@ -112,7 +172,7 @@ void DefaultLogger::kill()
 	m_pLogger = &s_pNullLogger;
 	m_pLogger = &s_pNullLogger;
 }
 }
 
 
-// ---------------------------------------------------------------------------
+// ----------------------------------------------------------------------------------
 //	Debug message
 //	Debug message
 void DefaultLogger::debug( const std::string &message )
 void DefaultLogger::debug( const std::string &message )
 {
 {
@@ -123,7 +183,7 @@ void DefaultLogger::debug( const std::string &message )
 	writeToStreams( msg, Logger::DEBUGGING );
 	writeToStreams( msg, Logger::DEBUGGING );
 }
 }
 
 
-// ---------------------------------------------------------------------------
+// ----------------------------------------------------------------------------------
 //	Logs an info
 //	Logs an info
 void DefaultLogger::info( const std::string &message )
 void DefaultLogger::info( const std::string &message )
 {
 {
@@ -131,7 +191,7 @@ void DefaultLogger::info( const std::string &message )
 	writeToStreams( msg , Logger::INFO );
 	writeToStreams( msg , Logger::INFO );
 }
 }
 
 
-// ---------------------------------------------------------------------------
+// ----------------------------------------------------------------------------------
 //	Logs a warning
 //	Logs a warning
 void DefaultLogger::warn( const std::string &message )
 void DefaultLogger::warn( const std::string &message )
 {
 {
@@ -139,7 +199,7 @@ void DefaultLogger::warn( const std::string &message )
 	writeToStreams( msg, Logger::WARN );
 	writeToStreams( msg, Logger::WARN );
 }
 }
 
 
-// ---------------------------------------------------------------------------
+// ----------------------------------------------------------------------------------
 //	Logs an error
 //	Logs an error
 void DefaultLogger::error( const std::string &message )
 void DefaultLogger::error( const std::string &message )
 {
 {
@@ -147,18 +207,19 @@ void DefaultLogger::error( const std::string &message )
 	writeToStreams( msg, Logger::ERR );
 	writeToStreams( msg, Logger::ERR );
 }
 }
 
 
-// ---------------------------------------------------------------------------
+// ----------------------------------------------------------------------------------
 //	Severity setter
 //	Severity setter
 void DefaultLogger::setLogSeverity( LogSeverity log_severity )
 void DefaultLogger::setLogSeverity( LogSeverity log_severity )
 {
 {
 	m_Severity = log_severity;
 	m_Severity = log_severity;
 }
 }
 
 
-// ---------------------------------------------------------------------------
+// ----------------------------------------------------------------------------------
 //	Attachs a new stream
 //	Attachs a new stream
 void DefaultLogger::attachStream( LogStream *pStream, unsigned int severity )
 void DefaultLogger::attachStream( LogStream *pStream, unsigned int severity )
 {
 {
-	ai_assert ( NULL != pStream );
+	if (!pStream)
+		return;
 
 
 	// fix (Aramis)
 	// fix (Aramis)
 	if (0 == severity)
 	if (0 == severity)
@@ -181,11 +242,12 @@ void DefaultLogger::attachStream( LogStream *pStream, unsigned int severity )
 	m_StreamArray.push_back( pInfo );
 	m_StreamArray.push_back( pInfo );
 }
 }
 
 
-// ---------------------------------------------------------------------------
+// ----------------------------------------------------------------------------------
 //	Detatch a stream
 //	Detatch a stream
 void DefaultLogger::detatchStream( LogStream *pStream, unsigned int severity )
 void DefaultLogger::detatchStream( LogStream *pStream, unsigned int severity )
 {
 {
-	ai_assert ( NULL != pStream );
+	if (!pStream)
+		return;
 
 
 	// fix (Aramis)
 	// fix (Aramis)
 	if (0 == severity)
 	if (0 == severity)
@@ -199,79 +261,49 @@ void DefaultLogger::detatchStream( LogStream *pStream, unsigned int severity )
 	{
 	{
 		if ( (*it)->m_pStream == pStream )
 		if ( (*it)->m_pStream == pStream )
 		{
 		{
-			unsigned int uiSev = (*it)->m_uiErrorSeverity;
-			if ( severity & Logger::INFO ) 
-				uiSev &= ( ~Logger::INFO );
-			if ( severity & Logger::WARN ) 
-				uiSev &= ( ~Logger::WARN );
-			if ( severity & Logger::ERR ) 
-				uiSev &= ( ~Logger::ERR );
-			// fix (Aramis)
-			if ( severity & Logger::DEBUGGING ) 
-				uiSev &= ( ~Logger::DEBUGGING );
-
-			(*it)->m_uiErrorSeverity = uiSev;
-			
+			(*it)->m_uiErrorSeverity &= ~severity;
 			if ( (*it)->m_uiErrorSeverity == 0 )
 			if ( (*it)->m_uiErrorSeverity == 0 )
 			{
 			{
-				it = m_StreamArray.erase( it );
+				m_StreamArray.erase( it );
 				break;
 				break;
 			}
 			}
 		}
 		}
 	}
 	}
 }
 }
 
 
-// ---------------------------------------------------------------------------
+// ----------------------------------------------------------------------------------
 //	Constructor
 //	Constructor
-DefaultLogger::DefaultLogger( const std::string &name, LogSeverity severity ) :
-	m_Severity( severity )
-{
-#ifdef WIN32
-	m_Streams.push_back( new Win32DebugLogStream() );
-#endif
-	
-	if (name.empty())
-		return;
-	m_Streams.push_back( new FileLogStream( name ) );
+DefaultLogger::DefaultLogger(LogSeverity severity) 
 
 
-	noRepeatMsg = false;
-}
+	:	m_Severity	( severity )
+	,	noRepeatMsg	(false)
+{}
 
 
-// ---------------------------------------------------------------------------
+// ----------------------------------------------------------------------------------
 //	Destructor
 //	Destructor
 DefaultLogger::~DefaultLogger()
 DefaultLogger::~DefaultLogger()
 {
 {
-	for ( StreamIt it = m_StreamArray.begin(); 
-		it != m_StreamArray.end();
-		++it )
-	{
+	for ( StreamIt it = m_StreamArray.begin(); it != m_StreamArray.end(); ++it )
 		delete *it;
 		delete *it;
-	}
-
-	for (std::vector<LogStream*>::iterator it = m_Streams.begin();
-		it != m_Streams.end();
-		++it)
-	{
-		delete *it;
-	}
-	m_Streams.clear();
 }
 }
 
 
-// ---------------------------------------------------------------------------
+// ----------------------------------------------------------------------------------
 //	Writes message to stream
 //	Writes message to stream
 void DefaultLogger::writeToStreams(const std::string &message, 
 void DefaultLogger::writeToStreams(const std::string &message, 
-								   ErrorSeverity ErrorSev )
+	ErrorSeverity ErrorSev )
 {
 {
 	if ( message.empty() )
 	if ( message.empty() )
 		return;
 		return;
 
 
 	std::string s;
 	std::string s;
+
+	// Check whether this is a repeated message
 	if (message == lastMsg)
 	if (message == lastMsg)
 	{
 	{
 		if (!noRepeatMsg)
 		if (!noRepeatMsg)
 		{
 		{
 			noRepeatMsg = true;
 			noRepeatMsg = true;
-			s = "Skipping one or more lines with the same contents";
+			s = "Skipping one or more lines with the same contents\n";
 		}
 		}
 		else return;
 		else return;
 	}
 	}
@@ -279,32 +311,25 @@ void DefaultLogger::writeToStreams(const std::string &message,
 	{
 	{
 		lastMsg = s = message;
 		lastMsg = s = message;
 		noRepeatMsg = false;
 		noRepeatMsg = false;
-	}
 
 
+		s.append("\n");
+	}
 	for ( ConstStreamIt it = m_StreamArray.begin();
 	for ( ConstStreamIt it = m_StreamArray.begin();
 		it != m_StreamArray.end();
 		it != m_StreamArray.end();
 		++it)
 		++it)
 	{
 	{
 		if ( ErrorSev & (*it)->m_uiErrorSeverity )
 		if ( ErrorSev & (*it)->m_uiErrorSeverity )
-		{
 			(*it)->m_pStream->write( s);
 			(*it)->m_pStream->write( s);
-		}
-	}
-	for (std::vector<LogStream*>::iterator it = m_Streams.begin();
-		it != m_Streams.end();
-		++it)
-	{
-		(*it)->write( s + std::string("\n"));
 	}
 	}
 }
 }
 
 
-// ---------------------------------------------------------------------------
+// ----------------------------------------------------------------------------------
 //	Returns thread id, if not supported only a zero will be returned.
 //	Returns thread id, if not supported only a zero will be returned.
 std::string DefaultLogger::getThreadID()
 std::string DefaultLogger::getThreadID()
 {
 {
 	std::string thread_id( "0" );
 	std::string thread_id( "0" );
 #ifdef WIN32
 #ifdef WIN32
-	HANDLE hThread = GetCurrentThread();
+	HANDLE hThread = ::GetCurrentThread();
 	if ( hThread )
 	if ( hThread )
 	{
 	{
 		std::stringstream thread_msg;
 		std::stringstream thread_msg;
@@ -318,6 +343,6 @@ std::string DefaultLogger::getThreadID()
 #endif
 #endif
 }
 }
 
 
-// ---------------------------------------------------------------------------
+// ----------------------------------------------------------------------------------
 
 
-} // Namespace Assimp
+} // !namespace Assimp

+ 29 - 24
code/FileLogStream.h

@@ -4,10 +4,10 @@
 #include "../include/LogStream.h"
 #include "../include/LogStream.h"
 #include "../include/IOStream.h"
 #include "../include/IOStream.h"
 
 
-namespace Assimp
-{
+namespace Assimp	{
+
 
 
-// ---------------------------------------------------------------------------
+// ----------------------------------------------------------------------------------
 /**	@class	FileLogStream
 /**	@class	FileLogStream
  *	@brief	Logstream to write into a file.
  *	@brief	Logstream to write into a file.
  */
  */
@@ -15,52 +15,57 @@ class FileLogStream :
 	public LogStream
 	public LogStream
 {
 {
 public:
 public:
-	FileLogStream( const std::string &strFileName );
+	FileLogStream( const std::string &strFileName, IOSystem* io = NULL );
 	~FileLogStream();
 	~FileLogStream();
 	void write( const std::string &message );
 	void write( const std::string &message );
 
 
 private:
 private:
 	IOStream *m_pStream;
 	IOStream *m_pStream;
 };
 };
-// ---------------------------------------------------------------------------
+
+
+// ----------------------------------------------------------------------------------
 //	Constructor
 //	Constructor
-inline FileLogStream::FileLogStream( const std::string &strFileName ) :
+inline FileLogStream::FileLogStream( const std::string &strFileName, IOSystem* io ) :
 	m_pStream(NULL)
 	m_pStream(NULL)
 {
 {
 	if ( strFileName.empty() )
 	if ( strFileName.empty() )
 		return;
 		return;
-	
-	DefaultIOSystem FileSystem;
-	const std::string mode = "w";
-	m_pStream = FileSystem.Open( strFileName, mode );
+
+	const static std::string mode = "wt";
+
+	// If no IOSystem is specified: take a default one
+	if (!io)
+	{
+		DefaultIOSystem FileSystem;
+		m_pStream = FileSystem.Open( strFileName, mode );
+	}
+	else m_pStream = io->Open( strFileName, mode );
 }
 }
 
 
-// ---------------------------------------------------------------------------
+// ----------------------------------------------------------------------------------
 //	Destructor
 //	Destructor
 inline FileLogStream::~FileLogStream()
 inline FileLogStream::~FileLogStream()
 {
 {
-	if (NULL != m_pStream)
-	{
-		DefaultIOSystem FileSystem;
-		FileSystem.Close( m_pStream );
-	}
+	// The virtual d'tor should destroy the underlying file
+	delete m_pStream;
 }
 }
 
 
-// ---------------------------------------------------------------------------
+
+// ----------------------------------------------------------------------------------
 //	Write method
 //	Write method
 inline void FileLogStream::write( const std::string &message )
 inline void FileLogStream::write( const std::string &message )
 {
 {
 	if (m_pStream != NULL)
 	if (m_pStream != NULL)
 	{
 	{
-		m_pStream->Write(message.c_str(), sizeof(char), 
-			message.size());
-		/*int i=0;
-		i++;*/
+		m_pStream->Write(message.c_str(), sizeof(char), message.size());
+		m_pStream->Flush();
 	}
 	}
 }
 }
 
 
-// ---------------------------------------------------------------------------
 
 
-} // Namespace Assimp
+// ----------------------------------------------------------------------------------
+
+} // !Namespace Assimp
 
 
-#endif
+#endif // !! ASSIMP_FILELOGSTREAM_H_INC

+ 1 - 1
code/FindDegenerates.cpp

@@ -145,7 +145,7 @@ void FindDegeneratesProcess::Execute( aiScene* pScene)
 		if (deg && !DefaultLogger::isNullLogger())
 		if (deg && !DefaultLogger::isNullLogger())
 		{
 		{
 			char s[64];
 			char s[64];
-			itoa10(s,deg); 
+			ASSIMP_itoa10(s,deg); 
 			DefaultLogger::get()->warn(std::string("Found ") + s + " degenerated primitives");
 			DefaultLogger::get()->warn(std::string("Found ") + s + " degenerated primitives");
 		}
 		}
 	}
 	}

+ 12 - 8
code/FindInvalidDataProcess.cpp

@@ -171,9 +171,11 @@ inline const char* ValidateArrayContents<aiVector3D>(const aiVector3D* arr, unsi
 	const std::vector<bool>& dirtyMask, bool mayBeIdentical , bool mayBeZero )
 	const std::vector<bool>& dirtyMask, bool mayBeIdentical , bool mayBeZero )
 {
 {
 	bool b = false;
 	bool b = false;
+	unsigned int cnt = 0;
 	for (unsigned int i = 0; i < size;++i)
 	for (unsigned int i = 0; i < size;++i)
 	{
 	{
 		if (dirtyMask.size() && dirtyMask[i])continue;
 		if (dirtyMask.size() && dirtyMask[i])continue;
+		++cnt;
 
 
 		const aiVector3D& v = arr[i];
 		const aiVector3D& v = arr[i];
 		if (is_special_float(v.x) || is_special_float(v.y) || is_special_float(v.z))
 		if (is_special_float(v.x) || is_special_float(v.y) || is_special_float(v.z))
@@ -186,7 +188,7 @@ inline const char* ValidateArrayContents<aiVector3D>(const aiVector3D* arr, unsi
 		}
 		}
 		if (i && v != arr[i-1])b = true;
 		if (i && v != arr[i-1])b = true;
 	}
 	}
-	if (!b && !mayBeIdentical)
+	if (cnt > 1 && !b && !mayBeIdentical)
 		return "All vectors are identical";
 		return "All vectors are identical";
 	return NULL;
 	return NULL;
 }
 }
@@ -284,7 +286,7 @@ void FindInvalidDataProcess::ProcessAnimationChannel (aiNodeAnim* anim)
 int FindInvalidDataProcess::ProcessMesh (aiMesh* pMesh)
 int FindInvalidDataProcess::ProcessMesh (aiMesh* pMesh)
 {
 {
 	bool ret = false;
 	bool ret = false;
-	std::vector<bool> dirtyMask(pMesh->mNumVertices,true);
+	std::vector<bool> dirtyMask(pMesh->mNumVertices,(pMesh->mNumFaces ? true : false));
 
 
 	// Ignore elements that are not referenced by vertices.
 	// Ignore elements that are not referenced by vertices.
 	// (they are, for example, caused by the FindDegenerates step)
 	// (they are, for example, caused by the FindDegenerates step)
@@ -295,7 +297,7 @@ int FindInvalidDataProcess::ProcessMesh (aiMesh* pMesh)
 			dirtyMask[f.mIndices[i]] = false;
 			dirtyMask[f.mIndices[i]] = false;
 	}
 	}
 
 
-	// process vertex positions
+	// Process vertex positions
 	if(pMesh->mVertices && ProcessArray(pMesh->mVertices,pMesh->mNumVertices,"positions",dirtyMask))
 	if(pMesh->mVertices && ProcessArray(pMesh->mVertices,pMesh->mNumVertices,"positions",dirtyMask))
 	{
 	{
 		DefaultLogger::get()->error("Deleting mesh: Unable to continue without vertex positions");
 		DefaultLogger::get()->error("Deleting mesh: Unable to continue without vertex positions");
@@ -333,11 +335,13 @@ int FindInvalidDataProcess::ProcessMesh (aiMesh* pMesh)
 				for (unsigned int m = 0; m < pMesh->mNumFaces;++m)
 				for (unsigned int m = 0; m < pMesh->mNumFaces;++m)
 				{
 				{
 					const aiFace& f = pMesh->mFaces[m];
 					const aiFace& f = pMesh->mFaces[m];
-					if (2 == f.mNumIndices)
+
+					if (f.mNumIndices < 3) 
 					{
 					{
-						dirtyMask[f.mIndices[0]] = dirtyMask[f.mIndices[1]] = true;
+						dirtyMask[f.mIndices[0]] = true;
+						if (f.mNumIndices == 2) 
+							dirtyMask[f.mIndices[1]] = true;
 					}
 					}
-					else if (1 == f.mNumIndices)dirtyMask[f.mIndices[0]] = true;
 				}
 				}
 			}
 			}
 			// Normals, tangents and bitangents are undefined for
 			// Normals, tangents and bitangents are undefined for
@@ -354,7 +358,7 @@ int FindInvalidDataProcess::ProcessMesh (aiMesh* pMesh)
 		if (pMesh->mTangents && ProcessArray(pMesh->mTangents,pMesh->mNumVertices,
 		if (pMesh->mTangents && ProcessArray(pMesh->mTangents,pMesh->mNumVertices,
 			"tangents",dirtyMask))
 			"tangents",dirtyMask))
 		{
 		{
-			delete[] pMesh->mTangents; pMesh->mTangents = NULL;
+			delete[] pMesh->mBitangents; pMesh->mBitangents = NULL;
 			ret = true;
 			ret = true;
 		}
 		}
 
 
@@ -362,7 +366,7 @@ int FindInvalidDataProcess::ProcessMesh (aiMesh* pMesh)
 		if (pMesh->mBitangents && ProcessArray(pMesh->mBitangents,pMesh->mNumVertices,
 		if (pMesh->mBitangents && ProcessArray(pMesh->mBitangents,pMesh->mNumVertices,
 			"bitangents",dirtyMask))
 			"bitangents",dirtyMask))
 		{
 		{
-			delete[] pMesh->mBitangents; pMesh->mBitangents = NULL;
+			delete[] pMesh->mTangents; pMesh->mTangents = NULL;
 			ret = true;
 			ret = true;
 		}
 		}
 	}
 	}

+ 8 - 10
code/GenVertexNormalsProcess.cpp

@@ -123,11 +123,11 @@ bool GenVertexNormalsProcess::GenMeshVertexNormals (aiMesh* pMesh, unsigned int
 		return false;
 		return false;
 	}
 	}
 
 
-	// allocate an array to hold the output normals
+	// Allocate the array to hold the output normals
 	const float qnan = std::numeric_limits<float>::quiet_NaN();
 	const float qnan = std::numeric_limits<float>::quiet_NaN();
 	pMesh->mNormals = new aiVector3D[pMesh->mNumVertices];
 	pMesh->mNormals = new aiVector3D[pMesh->mNumVertices];
 
 
-	// compute per-face normals but store them per-vertex
+	// Compute per-face normals but store them per-vertex
 	for( unsigned int a = 0; a < pMesh->mNumFaces; a++)
 	for( unsigned int a = 0; a < pMesh->mNumFaces; a++)
 	{
 	{
 		const aiFace& face = pMesh->mFaces[a];
 		const aiFace& face = pMesh->mFaces[a];
@@ -148,7 +148,7 @@ bool GenVertexNormalsProcess::GenMeshVertexNormals (aiMesh* pMesh, unsigned int
 			pMesh->mNormals[face.mIndices[i]] = vNor;
 			pMesh->mNormals[face.mIndices[i]] = vNor;
 	}
 	}
 
 
-	// set up a SpatialSort to quickly find all vertices close to a given position
+	// Set up a SpatialSort to quickly find all vertices close to a given position
 	// check whether we can reuse the SpatialSort of a previous step.
 	// check whether we can reuse the SpatialSort of a previous step.
 	SpatialSort* vertexFinder = NULL;
 	SpatialSort* vertexFinder = NULL;
 	SpatialSort  _vertexFinder;
 	SpatialSort  _vertexFinder;
@@ -176,16 +176,15 @@ bool GenVertexNormalsProcess::GenMeshVertexNormals (aiMesh* pMesh, unsigned int
 
 
 	if (configMaxAngle >= AI_DEG_TO_RAD( 175.f ))
 	if (configMaxAngle >= AI_DEG_TO_RAD( 175.f ))
 	{
 	{
-		// there is no angle limit. Thus all vertices with positions close
+		// There is no angle limit. Thus all vertices with positions close
 		// to each other will receive the same vertex normal. This allows us
 		// to each other will receive the same vertex normal. This allows us
 		// to optimize the whole algorithm a little bit ...
 		// to optimize the whole algorithm a little bit ...
 		std::vector<bool> abHad(pMesh->mNumVertices,false);
 		std::vector<bool> abHad(pMesh->mNumVertices,false);
-
 		for (unsigned int i = 0; i < pMesh->mNumVertices;++i)
 		for (unsigned int i = 0; i < pMesh->mNumVertices;++i)
 		{
 		{
 			if (abHad[i])continue;
 			if (abHad[i])continue;
 
 
-			// get all vertices that share this one ...
+			// Get all vertices that share this one ...
 			vertexFinder->FindPositions( pMesh->mVertices[i], posEpsilon, verticesFound);
 			vertexFinder->FindPositions( pMesh->mVertices[i], posEpsilon, verticesFound);
 
 
 			aiVector3D pcNor; 
 			aiVector3D pcNor; 
@@ -194,10 +193,9 @@ bool GenVertexNormalsProcess::GenMeshVertexNormals (aiMesh* pMesh, unsigned int
 				const aiVector3D& v = pMesh->mNormals[verticesFound[a]];
 				const aiVector3D& v = pMesh->mNormals[verticesFound[a]];
 				if (is_not_qnan(v.x))pcNor += v;
 				if (is_not_qnan(v.x))pcNor += v;
 			}
 			}
-		
 			pcNor.Normalize();
 			pcNor.Normalize();
 
 
-			// write the smoothed normal back to all affected normals
+			// Write the smoothed normal back to all affected normals
 			for (unsigned int a = 0; a < verticesFound.size(); ++a)
 			for (unsigned int a = 0; a < verticesFound.size(); ++a)
 			{
 			{
 				register unsigned int vidx = verticesFound[a];
 				register unsigned int vidx = verticesFound[a];
@@ -211,7 +209,7 @@ bool GenVertexNormalsProcess::GenMeshVertexNormals (aiMesh* pMesh, unsigned int
 		const float fLimit = ::cos(configMaxAngle); 
 		const float fLimit = ::cos(configMaxAngle); 
 		for (unsigned int i = 0; i < pMesh->mNumVertices;++i)
 		for (unsigned int i = 0; i < pMesh->mNumVertices;++i)
 		{
 		{
-			// get all vertices that share this one ...
+			// Get all vertices that share this one ...
 			vertexFinder->FindPositions( pMesh->mVertices[i] , posEpsilon, verticesFound);
 			vertexFinder->FindPositions( pMesh->mVertices[i] , posEpsilon, verticesFound);
 
 
 			aiVector3D pcNor; 
 			aiVector3D pcNor; 
@@ -222,7 +220,7 @@ bool GenVertexNormalsProcess::GenMeshVertexNormals (aiMesh* pMesh, unsigned int
 				// check whether the angle between the two normals is not too large
 				// check whether the angle between the two normals is not too large
 				// HACK: if v.x is qnan the dot product will become qnan, too
 				// HACK: if v.x is qnan the dot product will become qnan, too
 				//   therefore the comparison against fLimit should be false
 				//   therefore the comparison against fLimit should be false
-				//   in every case. Contact me if you disagree with this assumption
+				//   in every case. 
 				if (v * pMesh->mNormals[i] < fLimit)
 				if (v * pMesh->mNormals[i] < fLimit)
 					continue;
 					continue;
 
 

+ 98 - 40
code/Importer.cpp

@@ -43,8 +43,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
 #include "AssimpPCH.h"
 #include "AssimpPCH.h"
 
 
-
-// internal headers
+// =======================================================================================
+// Internal headers
+// =======================================================================================
 #include "BaseImporter.h"
 #include "BaseImporter.h"
 #include "BaseProcess.h"
 #include "BaseProcess.h"
 #include "DefaultIOStream.h"
 #include "DefaultIOStream.h"
@@ -53,7 +54,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include "ProcessHelper.h"
 #include "ProcessHelper.h"
 #include "ScenePreprocessor.h"
 #include "ScenePreprocessor.h"
 
 
+// =======================================================================================
 // Importers
 // Importers
+// =======================================================================================
 #ifndef AI_BUILD_NO_X_IMPORTER
 #ifndef AI_BUILD_NO_X_IMPORTER
 #	include "XFileImporter.h"
 #	include "XFileImporter.h"
 #endif
 #endif
@@ -133,7 +136,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #	include "TerragenLoader.h"
 #	include "TerragenLoader.h"
 #endif
 #endif
 
 
+// =======================================================================================
 // PostProcess-Steps
 // PostProcess-Steps
+// =======================================================================================
 #ifndef AI_BUILD_NO_CALCTANGENTS_PROCESS
 #ifndef AI_BUILD_NO_CALCTANGENTS_PROCESS
 #	include "CalcTangentsProcess.h"
 #	include "CalcTangentsProcess.h"
 #endif
 #endif
@@ -196,22 +201,50 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #endif
 #endif
 
 
 using namespace Assimp;
 using namespace Assimp;
+using namespace Assimp::Intern;
+
+// =======================================================================================
+// Intern::AllocateFromAssimpHeap serves as abstract base class. It overrides
+// new and delete (and their array counterparts) of public API classes (e.g. Logger) to
+// utilize our DLL heap
+// =======================================================================================
+void* AllocateFromAssimpHeap::operator new ( size_t num_bytes)	
+{
+	return ::operator new(num_bytes);
+}
+
+void AllocateFromAssimpHeap::operator delete ( void* data)	
+{
+	return ::operator delete(data);
+}
+
+void* AllocateFromAssimpHeap::operator new[] ( size_t num_bytes)	
+{
+	return ::operator new[](num_bytes);
+}
+
+void AllocateFromAssimpHeap::operator delete[] ( void* data)
+{
+	return ::operator delete[](data);
+}
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-// Constructor. 
-Importer::Importer() :
-	mIOHandler(NULL),
-	mScene(NULL),
-	mErrorString("")	
+// Importer Constructor. 
+Importer::Importer() 
+	:	mIOHandler		(NULL)
+	,	mScene			(NULL)
+	,	mErrorString	("")	
 {
 {
 	// Allocate a default IO handler
 	// Allocate a default IO handler
 	mIOHandler = new DefaultIOSystem;
 	mIOHandler = new DefaultIOSystem;
 	mIsDefaultHandler = true; 
 	mIsDefaultHandler = true; 
 	bExtraVerbose     = false; // disable extra verbose mode by default
 	bExtraVerbose     = false; // disable extra verbose mode by default
 
 
+	// ======================================================================
 	// Add an instance of each worker class here
 	// Add an instance of each worker class here
-	// the order doesn't really care, however file formats that are
+	// The order doesn't really care, however file formats that are
 	// used more frequently than others should be at the beginning.
 	// used more frequently than others should be at the beginning.
+	// ======================================================================
 	mImporter.reserve(25);
 	mImporter.reserve(25);
 
 
 #if (!defined AI_BUILD_NO_X_IMPORTER)
 #if (!defined AI_BUILD_NO_X_IMPORTER)
@@ -293,9 +326,11 @@ Importer::Importer() :
 	mImporter.push_back( new TerragenImporter());
 	mImporter.push_back( new TerragenImporter());
 #endif
 #endif
 
 
+	// ======================================================================
 	// Add an instance of each post processing step here in the order 
 	// Add an instance of each post processing step here in the order 
-	// of sequence it is executed. steps that are added here are not validated -
-	// as RegisterPPStep() does - all dependencies must be there.
+	// of sequence it is executed. Steps that are added here are not
+	// validated - as RegisterPPStep() does - all dependencies must be there.
+	// ======================================================================
 	mPostProcessingSteps.reserve(25);
 	mPostProcessingSteps.reserve(25);
 
 
 #if (!defined AI_BUILD_NO_VALIDATEDS_PROCESS)
 #if (!defined AI_BUILD_NO_VALIDATEDS_PROCESS)
@@ -386,9 +421,7 @@ Importer::Importer() :
 #endif
 #endif
 
 
 
 
-
-
-	// allocate a SharedPostProcessInfo object and store pointers to it
+	// Allocate a SharedPostProcessInfo object and store pointers to it
 	// in all post-process steps in the list.
 	// in all post-process steps in the list.
 	mPPShared = new SharedPostProcessInfo();
 	mPPShared = new SharedPostProcessInfo();
 	for (std::vector<BaseProcess*>::iterator it = mPostProcessingSteps.begin(),
 	for (std::vector<BaseProcess*>::iterator it = mPostProcessingSteps.begin(),
@@ -402,37 +435,47 @@ Importer::Importer() :
 // Destructor. 
 // Destructor. 
 Importer::~Importer()
 Importer::~Importer()
 {
 {
+	// Delete all import plugins
 	for( unsigned int a = 0; a < mImporter.size(); a++)
 	for( unsigned int a = 0; a < mImporter.size(); a++)
 		delete mImporter[a];
 		delete mImporter[a];
+
+	// Delete all post-processing plug-ins
 	for( unsigned int a = 0; a < mPostProcessingSteps.size(); a++)
 	for( unsigned int a = 0; a < mPostProcessingSteps.size(); a++)
 		delete mPostProcessingSteps[a];
 		delete mPostProcessingSteps[a];
 
 
-	// delete the assigned IO handler
+	// Delete the assigned IO handler
 	delete mIOHandler;
 	delete mIOHandler;
 
 
-	// kill imported scene. Destructors should do that recursivly
+	// Kill imported scene. Destructors should do that recursivly
 	delete mScene;
 	delete mScene;
 
 
-	// delete shared post-processing data
+	// Delete shared post-processing data
 	delete mPPShared;
 	delete mPPShared;
 }
 }
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-//	Empty and private copy constructor
+//	Copy constructor - copies the config of another Importer, not the scene
 Importer::Importer(const Importer &other)
 Importer::Importer(const Importer &other)
 {
 {
-	// empty
+	// Call the default constructor
+	new(this) Importer();
+
+	// Copy the property table
+	mIntProperties    = other.mIntProperties;
+	mFloatProperties  = other.mFloatProperties;
+	mStringProperties = other.mStringProperties;
 }
 }
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
+// Register a custom loader plugin
 aiReturn Importer::RegisterLoader(BaseImporter* pImp)
 aiReturn Importer::RegisterLoader(BaseImporter* pImp)
 {
 {
 	ai_assert(NULL != pImp);
 	ai_assert(NULL != pImp);
-
-	// Check whether we would have two loaders for the same file extension now
+	// ======================================================================
+	// Check whether we would have two loaders for the same file extension 
 	// This is absolutely OK, but we should warn the developer of the new
 	// This is absolutely OK, but we should warn the developer of the new
 	// loader that his code will propably never be called.
 	// loader that his code will propably never be called.
-
+	// ======================================================================
 	std::string st;
 	std::string st;
 	pImp->GetExtensionList(st);
 	pImp->GetExtensionList(st);
 
 
@@ -441,9 +484,8 @@ aiReturn Importer::RegisterLoader(BaseImporter* pImp)
 	while (sz)
 	while (sz)
 	{
 	{
 		if (IsExtensionSupported(std::string(sz)))
 		if (IsExtensionSupported(std::string(sz)))
-		{
 			DefaultLogger::get()->warn(std::string( "The file extension " ) + sz + " is already in use");
 			DefaultLogger::get()->warn(std::string( "The file extension " ) + sz + " is already in use");
-		}
+		
 		sz = ::strtok(NULL,";");
 		sz = ::strtok(NULL,";");
 	}
 	}
 #endif
 #endif
@@ -455,10 +497,10 @@ aiReturn Importer::RegisterLoader(BaseImporter* pImp)
 }
 }
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
+// Unregister a custom loader
 aiReturn Importer::UnregisterLoader(BaseImporter* pImp)
 aiReturn Importer::UnregisterLoader(BaseImporter* pImp)
 {
 {
 	ai_assert(NULL != pImp);
 	ai_assert(NULL != pImp);
-
 	for (std::vector<BaseImporter*>::iterator
 	for (std::vector<BaseImporter*>::iterator
 		it = mImporter.begin(),end = mImporter.end();
 		it = mImporter.begin(),end = mImporter.end();
 		it != end;++it)
 		it != end;++it)
@@ -481,12 +523,14 @@ aiReturn Importer::UnregisterLoader(BaseImporter* pImp)
 // Supplies a custom IO handler to the importer to open and access files.
 // Supplies a custom IO handler to the importer to open and access files.
 void Importer::SetIOHandler( IOSystem* pIOHandler)
 void Importer::SetIOHandler( IOSystem* pIOHandler)
 {
 {
+	// If the new handler is zero, allocate a default IO implementation.
 	if (!pIOHandler)
 	if (!pIOHandler)
 	{
 	{
 		delete mIOHandler;
 		delete mIOHandler;
 		mIOHandler = new DefaultIOSystem();
 		mIOHandler = new DefaultIOSystem();
 		mIsDefaultHandler = true;
 		mIsDefaultHandler = true;
 	}
 	}
+	// Otherwise register the custom handler
 	else if (mIOHandler != pIOHandler)
 	else if (mIOHandler != pIOHandler)
 	{
 	{
 		delete mIOHandler;
 		delete mIOHandler;
@@ -533,28 +577,37 @@ bool ValidateFlags(unsigned int pFlags)
 }
 }
 #endif // ! DEBUG
 #endif // ! DEBUG
 
 
+// ------------------------------------------------------------------------------------------------
+// Free the current scene
+void Importer::FreeScene( )
+{
+	delete mScene;
+	mScene = NULL;
+}
+
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
 // Reads the given file and returns its contents if successful. 
 // Reads the given file and returns its contents if successful. 
 const aiScene* Importer::ReadFile( const std::string& pFile, unsigned int pFlags)
 const aiScene* Importer::ReadFile( const std::string& pFile, unsigned int pFlags)
 {
 {
-	// validate the flags
+	// Validate the flags
 	ai_assert(ValidateFlags(pFlags));
 	ai_assert(ValidateFlags(pFlags));
 
 
-	// put a large try block around everything to catch all std::exception's
+	// ======================================================================
+	// Put a large try block around everything to catch all std::exception's
 	// that might be thrown by STL containers or by new(). 
 	// that might be thrown by STL containers or by new(). 
 	// ImportErrorException's are throw by ourselves and caught elsewhere.
 	// ImportErrorException's are throw by ourselves and caught elsewhere.
+	// ======================================================================
 	try
 	try
 	{
 	{
-		// check whether this Importer instance has already loaded
+		// Check whether this Importer instance has already loaded
 		// a scene. In this case we need to delete the old one
 		// a scene. In this case we need to delete the old one
-		if (this->mScene)
+		if (mScene)
 		{
 		{
-			DefaultLogger::get()->debug("The previous scene has been deleted");
-			delete mScene;
-			this->mScene = NULL;
+			DefaultLogger::get()->debug("Deleting previous scene");
+			FreeScene();
 		}
 		}
 
 
-		// first check if the file is accessable at all
+		// First check if the file is accessable at all
 		if( !mIOHandler->Exists( pFile))
 		if( !mIOHandler->Exists( pFile))
 		{
 		{
 			mErrorString = "Unable to open file \"" + pFile + "\".";
 			mErrorString = "Unable to open file \"" + pFile + "\".";
@@ -562,7 +615,7 @@ const aiScene* Importer::ReadFile( const std::string& pFile, unsigned int pFlags
 			return NULL;
 			return NULL;
 		}
 		}
 
 
-		// find an worker class which can handle the file
+		// Find an worker class which can handle the file
 		BaseImporter* imp = NULL;
 		BaseImporter* imp = NULL;
 		for( unsigned int a = 0; a < mImporter.size(); a++)
 		for( unsigned int a = 0; a < mImporter.size(); a++)
 		{
 		{
@@ -573,7 +626,7 @@ const aiScene* Importer::ReadFile( const std::string& pFile, unsigned int pFlags
 			}
 			}
 		}
 		}
 
 
-		// put a proper error message if no suitable importer was found
+		// Put a proper error message if no suitable importer was found
 		if( !imp)
 		if( !imp)
 		{
 		{
 			mErrorString = "No suitable reader found for the file format of file \"" + pFile + "\".";
 			mErrorString = "No suitable reader found for the file format of file \"" + pFile + "\".";
@@ -581,17 +634,17 @@ const aiScene* Importer::ReadFile( const std::string& pFile, unsigned int pFlags
 			return NULL;
 			return NULL;
 		}
 		}
 
 
-		// dispatch the reading to the worker class for this format
+		// Dispatch the reading to the worker class for this format
 		DefaultLogger::get()->info("Found a matching importer for this file format");
 		DefaultLogger::get()->info("Found a matching importer for this file format");
 		imp->SetupProperties( this );
 		imp->SetupProperties( this );
 		mScene = imp->ReadFile( pFile, mIOHandler);
 		mScene = imp->ReadFile( pFile, mIOHandler);
 
 
-		// if successful, apply all active post processing steps to the imported data
+		// If successful, apply all active post processing steps to the imported data
 		if( mScene)
 		if( mScene)
 		{
 		{
 			// FIRST of all - preprocess the scene 
 			// FIRST of all - preprocess the scene 
-			ScenePreprocessor pre;
-			pre.ProcessScene(mScene);
+			ScenePreprocessor pre(mScene);
+			pre.ProcessScene();
 
 
 			DefaultLogger::get()->info("Import successful, entering postprocessing-steps");
 			DefaultLogger::get()->info("Import successful, entering postprocessing-steps");
 #ifdef _DEBUG
 #ifdef _DEBUG
@@ -648,7 +701,6 @@ const aiScene* Importer::ReadFile( const std::string& pFile, unsigned int pFlags
 	catch (std::exception &e)
 	catch (std::exception &e)
 	{
 	{
 #if (defined _MSC_VER) &&	(defined _CPPRTTI) 
 #if (defined _MSC_VER) &&	(defined _CPPRTTI) 
-
 		// if we have RTTI get the full name of the exception that occured
 		// if we have RTTI get the full name of the exception that occured
 		mErrorString = std::string(typeid( e ).name()) + ": " + e.what();
 		mErrorString = std::string(typeid( e ).name()) + ": " + e.what();
 #else
 #else
@@ -710,6 +762,7 @@ void Importer::SetPropertyInteger(const char* szName, int iValue,
 }
 }
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
+// Set a configuration property
 void Importer::SetPropertyFloat(const char* szName, float iValue, 
 void Importer::SetPropertyFloat(const char* szName, float iValue, 
 	bool* bWasExisting /*= NULL*/)
 	bool* bWasExisting /*= NULL*/)
 {
 {
@@ -717,6 +770,7 @@ void Importer::SetPropertyFloat(const char* szName, float iValue,
 }
 }
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
+// Set a configuration property
 void Importer::SetPropertyString(const char* szName, const std::string& value, 
 void Importer::SetPropertyString(const char* szName, const std::string& value, 
 	bool* bWasExisting /*= NULL*/)
 	bool* bWasExisting /*= NULL*/)
 {
 {
@@ -732,6 +786,7 @@ int Importer::GetPropertyInteger(const char* szName,
 }
 }
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
+// Get a configuration property
 float Importer::GetPropertyFloat(const char* szName, 
 float Importer::GetPropertyFloat(const char* szName, 
 	float iErrorReturn /*= 10e10*/) const
 	float iErrorReturn /*= 10e10*/) const
 {
 {
@@ -739,6 +794,7 @@ float Importer::GetPropertyFloat(const char* szName,
 }
 }
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
+// Get a configuration property
 const std::string& Importer::GetPropertyString(const char* szName, 
 const std::string& Importer::GetPropertyString(const char* szName, 
 	const std::string& iErrorReturn /*= ""*/) const
 	const std::string& iErrorReturn /*= ""*/) const
 {
 {
@@ -746,6 +802,7 @@ const std::string& Importer::GetPropertyString(const char* szName,
 }
 }
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
+// Get the memory requirements of a single node
 inline void AddNodeWeight(unsigned int& iScene,const aiNode* pcNode)
 inline void AddNodeWeight(unsigned int& iScene,const aiNode* pcNode)
 {
 {
 	iScene += sizeof(aiNode);
 	iScene += sizeof(aiNode);
@@ -760,8 +817,9 @@ inline void AddNodeWeight(unsigned int& iScene,const aiNode* pcNode)
 void Importer::GetMemoryRequirements(aiMemoryInfo& in) const
 void Importer::GetMemoryRequirements(aiMemoryInfo& in) const
 {
 {
 	in = aiMemoryInfo();
 	in = aiMemoryInfo();
-	if (!this->mScene)return;
 
 
+	// return if we have no scene loaded
+	if (!this->mScene)return;
 	in.total = sizeof(aiScene);
 	in.total = sizeof(aiScene);
 
 
 	// add all meshes
 	// add all meshes

+ 40 - 9
code/MaterialSystem.cpp

@@ -44,6 +44,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 using namespace Assimp;
 using namespace Assimp;
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
+// Get a specific property from a material
 aiReturn aiGetMaterialProperty(const aiMaterial* pMat, 
 aiReturn aiGetMaterialProperty(const aiMaterial* pMat, 
 	const char* pKey,
 	const char* pKey,
 	unsigned int type,
 	unsigned int type,
@@ -70,6 +71,7 @@ aiReturn aiGetMaterialProperty(const aiMaterial* pMat,
 }
 }
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
+// Get an array of floating-point values from the material.
 aiReturn aiGetMaterialFloatArray(const aiMaterial* pMat, 
 aiReturn aiGetMaterialFloatArray(const aiMaterial* pMat, 
 	const char* pKey,
 	const char* pKey,
 	unsigned int type,
 	unsigned int type,
@@ -124,6 +126,7 @@ aiReturn aiGetMaterialFloatArray(const aiMaterial* pMat,
 }
 }
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
+// Get an array if integers from the material
 aiReturn aiGetMaterialIntegerArray(const aiMaterial* pMat, 
 aiReturn aiGetMaterialIntegerArray(const aiMaterial* pMat, 
 	const char* pKey,
 	const char* pKey,
 	unsigned int type,
 	unsigned int type,
@@ -177,6 +180,7 @@ aiReturn aiGetMaterialIntegerArray(const aiMaterial* pMat,
 }
 }
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
+// Get a color (3 or 4 floats) from the material
 aiReturn aiGetMaterialColor(const aiMaterial* pMat, 
 aiReturn aiGetMaterialColor(const aiMaterial* pMat, 
 	const char* pKey,
 	const char* pKey,
 	unsigned int type,
 	unsigned int type,
@@ -192,6 +196,7 @@ aiReturn aiGetMaterialColor(const aiMaterial* pMat,
 }
 }
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
+// Get a string from the material
 aiReturn aiGetMaterialString(const aiMaterial* pMat, 
 aiReturn aiGetMaterialString(const aiMaterial* pMat, 
 	const char* pKey,
 	const char* pKey,
 	unsigned int type,
 	unsigned int type,
@@ -223,6 +228,7 @@ aiReturn aiGetMaterialString(const aiMaterial* pMat,
 }
 }
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
+// Construction. Actually the one and only way to get an aiMaterial instance
 MaterialHelper::MaterialHelper()
 MaterialHelper::MaterialHelper()
 {
 {
 	// Allocate 5 entries by default
 	// Allocate 5 entries by default
@@ -234,7 +240,30 @@ MaterialHelper::MaterialHelper()
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
 MaterialHelper::~MaterialHelper()
 MaterialHelper::~MaterialHelper()
 {
 {
+	_InternDestruct();
+}
+
+// ------------------------------------------------------------------------------------------------
+aiMaterial::~aiMaterial()
+{
+	// This is safe: aiMaterial has a private constructor,
+	// so instances must be created indirectly via MaterialHelper.
+	((MaterialHelper*)this)->_InternDestruct();
+}
+
+// ------------------------------------------------------------------------------------------------
+// Manual destructor
+void MaterialHelper::_InternDestruct()
+{
+	// First clean up all properties
 	Clear();
 	Clear();
+
+	// Then delete the array that stored them
+	delete[] mProperties;
+	AI_DEBUG_INVALIDATE_PTR(mProperties);
+
+	// Update members
+	mNumAllocated = 0;
 }
 }
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
@@ -244,36 +273,38 @@ void MaterialHelper::Clear()
 	{
 	{
 		// delete this entry
 		// delete this entry
 		delete mProperties[i];
 		delete mProperties[i];
+		AI_DEBUG_INVALIDATE_PTR(mProperties[i]);
 	}
 	}
 	mNumProperties = 0;
 	mNumProperties = 0;
 
 
-	// The array remains
+	// The array remains allocated, we just invalidated its contents
 }
 }
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-uint32_t MaterialHelper::ComputeHash()
+uint32_t MaterialHelper::ComputeHash(bool includeMatName /*= false*/)
 {
 {
 	uint32_t hash = 1503; // magic start value, choosen to be my birthday :-)
 	uint32_t hash = 1503; // magic start value, choosen to be my birthday :-)
 	for (unsigned int i = 0; i < this->mNumProperties;++i)
 	for (unsigned int i = 0; i < this->mNumProperties;++i)
 	{
 	{
 		aiMaterialProperty* prop;
 		aiMaterialProperty* prop;
 
 
-		// NOTE: We need to exclude the material name from the hash
-		if ((prop = this->mProperties[i]) && ::strcmp(prop->mKey.data,"$mat.name")) 
+		// If specified, exclude the material name from the hash
+		if ((prop = mProperties[i]) && (includeMatName || ::strcmp(prop->mKey.data,"$mat.name")))
 		{
 		{
 			hash = SuperFastHash(prop->mKey.data,(unsigned int)prop->mKey.length,hash);
 			hash = SuperFastHash(prop->mKey.data,(unsigned int)prop->mKey.length,hash);
 			hash = SuperFastHash(prop->mData,prop->mDataLength,hash);
 			hash = SuperFastHash(prop->mData,prop->mDataLength,hash);
 
 
 			// Combine the semantic and the index with the hash
 			// Combine the semantic and the index with the hash
 			// We print them to a string to make sure the quality
 			// We print them to a string to make sure the quality
-			// of the hash isn't decreased.
+			// of the hashing state isn't affected (our hashing
+			// procedure was originally intended for plaintest).
 			char buff[32];
 			char buff[32];
 			unsigned int len;
 			unsigned int len;
 			
 			
-			len = itoa10(buff,prop->mSemantic);
+			len = ASSIMP_itoa10(buff,prop->mSemantic);
 			hash = SuperFastHash(buff,len-1,hash);
 			hash = SuperFastHash(buff,len-1,hash);
 
 
-			len = itoa10(buff,prop->mIndex);
+			len = ASSIMP_itoa10(buff,prop->mIndex);
 			hash = SuperFastHash(buff,len-1,hash);
 			hash = SuperFastHash(buff,len-1,hash);
 		}
 		}
 	}
 	}
@@ -359,11 +390,11 @@ aiReturn MaterialHelper::AddBinaryProperty (const void* pInput,
 		return AI_SUCCESS;
 		return AI_SUCCESS;
 	}
 	}
 
 
-	// resize the array ... allocate storage for 5 other properties
+	// resize the array ... double the storage
 	if (mNumProperties == mNumAllocated)
 	if (mNumProperties == mNumAllocated)
 	{
 	{
 		unsigned int iOld = mNumAllocated;
 		unsigned int iOld = mNumAllocated;
-		mNumAllocated += 5;
+		mNumAllocated *= 2;
 
 
 		aiMaterialProperty** ppTemp = new aiMaterialProperty*[mNumAllocated];
 		aiMaterialProperty** ppTemp = new aiMaterialProperty*[mNumAllocated];
 		if (NULL == ppTemp)return AI_OUTOFMEMORY;
 		if (NULL == ppTemp)return AI_OUTOFMEMORY;

+ 63 - 67
code/MaterialSystem.h

@@ -43,13 +43,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #define AI_MATERIALSYSTEM_H_INC
 #define AI_MATERIALSYSTEM_H_INC
 
 
 #include "../include/aiMaterial.h"
 #include "../include/aiMaterial.h"
-
-namespace Assimp
-{
+namespace Assimp	{
 
 
 
 
-// ---------------------------------------------------------------------------
-/** Internal material helper class. Can be used to fill an aiMaterial
+// ----------------------------------------------------------------------------------------
+/** Internal material helper class. Intended to be used to fill an aiMaterial
     structure easily. */
     structure easily. */
 class ASSIMP_API MaterialHelper : public ::aiMaterial
 class ASSIMP_API MaterialHelper : public ::aiMaterial
 {
 {
@@ -58,95 +56,102 @@ public:
 	MaterialHelper();
 	MaterialHelper();
 	~MaterialHelper();
 	~MaterialHelper();
 
 
-	// -------------------------------------------------------------------
-	/** Add a property with a given key and type info to the material
+	// ------------------------------------------------------------------------------
+	/** @brief Add a property with a given key and type info to the material
 	 *  structure 
 	 *  structure 
 	 *
 	 *
-	 *  \param pInput Pointer to input data
-	 *  \param pSizeInBytes Size of input data
-	 *  \param pKey Key/Usage of the property (AI_MATKEY_XXX)
-	 *  \param type Set by the AI_MATKEY_XXX macro
-	 *  \param index Set by the AI_MATKEY_XXX macro
-	 *  \param pType Type information hint
+	 *  @param pInput Pointer to input data
+	 *  @param pSizeInBytes Size of input data
+	 *  @param pKey Key/Usage of the property (AI_MATKEY_XXX)
+	 *  @param type Set by the AI_MATKEY_XXX macro
+	 *  @param index Set by the AI_MATKEY_XXX macro
+	 *  @param pType Type information hint
      */
      */
 	aiReturn AddBinaryProperty (const void* pInput,
 	aiReturn AddBinaryProperty (const void* pInput,
 		unsigned int pSizeInBytes,
 		unsigned int pSizeInBytes,
 		const char* pKey,
 		const char* pKey,
-		unsigned int type,
-		unsigned int index,
+		unsigned int type ,
+		unsigned int index ,
 		aiPropertyTypeInfo pType);
 		aiPropertyTypeInfo pType);
 
 
 
 
-	// -------------------------------------------------------------------
-	/** Add a string property with a given key and type info to the 
+	// ------------------------------------------------------------------------------
+	/** @brief Add a string property with a given key and type info to the 
 	 *  material structure 
 	 *  material structure 
 	 *
 	 *
-	 *  \param pInput Input string
-	 *  \param pKey Key/Usage of the property (AI_MATKEY_XXX)
-	 *  \param type Set by the AI_MATKEY_XXX macro
-	 *  \param index Set by the AI_MATKEY_XXX macro
+	 *  @param pInput Input string
+	 *  @param pKey Key/Usage of the property (AI_MATKEY_XXX)
+	 *  @param type Set by the AI_MATKEY_XXX macro
+	 *  @param index Set by the AI_MATKEY_XXX macro
 	 */
 	 */
 	aiReturn AddProperty (const aiString* pInput,
 	aiReturn AddProperty (const aiString* pInput,
 		const char* pKey,
 		const char* pKey,
-		unsigned int type,
-		unsigned int index);
+		unsigned int type  = 0,
+		unsigned int index = 0);
 
 
 
 
-	// -------------------------------------------------------------------
-	/** Add a property with a given key to the material structure 
-	 *  \param pInput Pointer to the input data
-	 *  \param pNumValues Number of values in the array
-	 *  \param pKey Key/Usage of the property (AI_MATKEY_XXX)
-	 *  \param type Set by the AI_MATKEY_XXX macro
-	 *  \param index Set by the AI_MATKEY_XXX macro
+	// ------------------------------------------------------------------------------
+	/** @brief Add a property with a given key to the material structure 
+	 *  @param pInput Pointer to the input data
+	 *  @param pNumValues Number of values in the array
+	 *  @param pKey Key/Usage of the property (AI_MATKEY_XXX)
+	 *  @param type Set by the AI_MATKEY_XXX macro
+	 *  @param index Set by the AI_MATKEY_XXX macro
 	 */
 	 */
 	template<class TYPE>
 	template<class TYPE>
 	aiReturn AddProperty (const TYPE* pInput,
 	aiReturn AddProperty (const TYPE* pInput,
 		unsigned int pNumValues,
 		unsigned int pNumValues,
 		const char* pKey,
 		const char* pKey,
-		unsigned int type,
-		unsigned int index);
+		unsigned int type  = 0,
+		unsigned int index = 0);
 
 
 
 
-	// -------------------------------------------------------------------
-	/** Remove a given key from the list
-	 *  The function fails if the key isn't found
+	// ------------------------------------------------------------------------------
+	/** @brief Remove a given key from the list.
 	 *
 	 *
-	 *  \param pKey Key to be deleted
+	 *  The function fails if the key isn't found
+	 *  @param pKey Key to be deleted
 	 */
 	 */
 	aiReturn RemoveProperty (const char* pKey,
 	aiReturn RemoveProperty (const char* pKey,
-		unsigned int type,
-		unsigned int index);
+		unsigned int type  = 0,
+		unsigned int index = 0);
 
 
 
 
-	// -------------------------------------------------------------------
-	/** Removes all properties from the material
+	// ------------------------------------------------------------------------------
+	/** @brief Removes all properties from the material.
+	 *
+	 *  The array remains allocated, so adding new properties is quite fast.
 	 */
 	 */
 	void Clear();
 	void Clear();
 
 
 
 
-	// -------------------------------------------------------------------
+	// ------------------------------------------------------------------------------
 	/** Computes a hash (hopefully unique) from all material properties
 	/** Computes a hash (hopefully unique) from all material properties
-	 *  The hash value must be updated after material properties have
-	 *  been changed.
+	 *  The hash value reflects the current property state, so if you add any
+	 *  proprty and call this method again, the resulting hash value will be 
+	 *  different.
 	 *
 	 *
-	 *  \return Unique hash
+	 *  @param  includeMatName Set to 'true' to take the #AI_MATKEY_NAME property
+	 *    into account. The default value is false.
+	 *  @return Unique hash
 	 */
 	 */
-	uint32_t ComputeHash();
+	uint32_t ComputeHash(bool includeMatName = false);
 
 
 
 
-	// -------------------------------------------------------------------
+	// ------------------------------------------------------------------------------
 	/** Copy the property list of a material
 	/** Copy the property list of a material
 	 *  \param pcDest Destination material
 	 *  \param pcDest Destination material
 	 *  \param pcSrc Source material
 	 *  \param pcSrc Source material
 	 */
 	 */
 	static void CopyPropertyList(MaterialHelper* pcDest, 
 	static void CopyPropertyList(MaterialHelper* pcDest, 
 		const MaterialHelper* pcSrc);
 		const MaterialHelper* pcSrc);
+
+	// For internal use
+	void _InternDestruct();
 };
 };
 
 
 
 
-// ---------------------------------------------------------------------------
-// ---------------------------------------------------------------------------
+// ----------------------------------------------------------------------------------------
 template<class TYPE>
 template<class TYPE>
 aiReturn MaterialHelper::AddProperty (const TYPE* pInput,
 aiReturn MaterialHelper::AddProperty (const TYPE* pInput,
 	const unsigned int pNumValues,
 	const unsigned int pNumValues,
@@ -154,14 +159,12 @@ aiReturn MaterialHelper::AddProperty (const TYPE* pInput,
 	unsigned int type,
 	unsigned int type,
 	unsigned int index)
 	unsigned int index)
 {
 {
-	return this->AddBinaryProperty((const void*)pInput,
+	return AddBinaryProperty((const void*)pInput,
 		pNumValues * sizeof(TYPE),
 		pNumValues * sizeof(TYPE),
 		pKey,type,index,aiPTI_Buffer);
 		pKey,type,index,aiPTI_Buffer);
 }
 }
 
 
-
-// ---------------------------------------------------------------------------
-// ---------------------------------------------------------------------------
+// ----------------------------------------------------------------------------------------
 template<>
 template<>
 inline aiReturn MaterialHelper::AddProperty<float> (const float* pInput,
 inline aiReturn MaterialHelper::AddProperty<float> (const float* pInput,
 	const unsigned int pNumValues,
 	const unsigned int pNumValues,
@@ -169,14 +172,12 @@ inline aiReturn MaterialHelper::AddProperty<float> (const float* pInput,
 	unsigned int type,
 	unsigned int type,
 	unsigned int index)
 	unsigned int index)
 {
 {
-	return this->AddBinaryProperty((const void*)pInput,
+	return AddBinaryProperty((const void*)pInput,
 		pNumValues * sizeof(float),
 		pNumValues * sizeof(float),
 		pKey,type,index,aiPTI_Float);
 		pKey,type,index,aiPTI_Float);
 }
 }
 
 
-
-// ---------------------------------------------------------------------------
-// ---------------------------------------------------------------------------
+// ----------------------------------------------------------------------------------------
 template<>
 template<>
 inline aiReturn MaterialHelper::AddProperty<aiColor4D> (const aiColor4D* pInput,
 inline aiReturn MaterialHelper::AddProperty<aiColor4D> (const aiColor4D* pInput,
 	const unsigned int pNumValues,
 	const unsigned int pNumValues,
@@ -184,14 +185,12 @@ inline aiReturn MaterialHelper::AddProperty<aiColor4D> (const aiColor4D* pInput,
 	unsigned int type,
 	unsigned int type,
 	unsigned int index)
 	unsigned int index)
 {
 {
-	return this->AddBinaryProperty((const void*)pInput,
+	return AddBinaryProperty((const void*)pInput,
 		pNumValues * sizeof(aiColor4D),
 		pNumValues * sizeof(aiColor4D),
 		pKey,type,index,aiPTI_Float);
 		pKey,type,index,aiPTI_Float);
 }
 }
 
 
-
-// ---------------------------------------------------------------------------
-// ---------------------------------------------------------------------------
+// ----------------------------------------------------------------------------------------
 template<>
 template<>
 inline aiReturn MaterialHelper::AddProperty<aiColor3D> (const aiColor3D* pInput,
 inline aiReturn MaterialHelper::AddProperty<aiColor3D> (const aiColor3D* pInput,
 	const unsigned int pNumValues,
 	const unsigned int pNumValues,
@@ -199,14 +198,12 @@ inline aiReturn MaterialHelper::AddProperty<aiColor3D> (const aiColor3D* pInput,
 	unsigned int type,
 	unsigned int type,
 	unsigned int index)
 	unsigned int index)
 {
 {
-	return this->AddBinaryProperty((const void*)pInput,
+	return AddBinaryProperty((const void*)pInput,
 		pNumValues * sizeof(aiColor3D),
 		pNumValues * sizeof(aiColor3D),
 		pKey,type,index,aiPTI_Float);
 		pKey,type,index,aiPTI_Float);
 }
 }
 
 
-
-// ---------------------------------------------------------------------------
-// ---------------------------------------------------------------------------
+// ----------------------------------------------------------------------------------------
 template<>
 template<>
 inline aiReturn MaterialHelper::AddProperty<int> (const int* pInput,
 inline aiReturn MaterialHelper::AddProperty<int> (const int* pInput,
 	const unsigned int pNumValues,
 	const unsigned int pNumValues,
@@ -214,11 +211,10 @@ inline aiReturn MaterialHelper::AddProperty<int> (const int* pInput,
 	unsigned int type,
 	unsigned int type,
 	unsigned int index)
 	unsigned int index)
 {
 {
-	return this->AddBinaryProperty((const void*)pInput,
+	return AddBinaryProperty((const void*)pInput,
 		pNumValues * sizeof(int),
 		pNumValues * sizeof(int),
 		pKey,type,index,aiPTI_Integer);
 		pKey,type,index,aiPTI_Integer);
 }
 }
-}
-
+} // ! namespace Assimp
 
 
 #endif //!! AI_MATERIALSYSTEM_H_INC
 #endif //!! AI_MATERIALSYSTEM_H_INC

+ 1 - 1
code/NFFLoader.cpp

@@ -612,7 +612,7 @@ void NFFImporter::InternReadFile( const std::string& pFile,
 						if (objectName.length())
 						if (objectName.length())
 						{
 						{
 							::strcpy(mesh->name,objectName.c_str()); 
 							::strcpy(mesh->name,objectName.c_str()); 
-							itoa10(&mesh->name[objectName.length()],30,subMeshIdx++);
+							ASSIMP_itoa10(&mesh->name[objectName.length()],30,subMeshIdx++);
 						}
 						}
 
 
 						// copy the shader to the mesh. 
 						// copy the shader to the mesh. 

+ 7 - 7
code/ParsingUtils.h

@@ -45,25 +45,25 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
 // ---------------------------------------------------------------------------------
 // ---------------------------------------------------------------------------------
 template <class char_t>
 template <class char_t>
-inline bool IsSpace( const char_t in)
+AI_FORCE_INLINE bool IsSpace( const char_t in)
 {
 {
 	return (in == (char_t)' ' || in == (char_t)'\t');
 	return (in == (char_t)' ' || in == (char_t)'\t');
 }
 }
 // ---------------------------------------------------------------------------------
 // ---------------------------------------------------------------------------------
 template <class char_t>
 template <class char_t>
-inline bool IsLineEnd( const char_t in)
+AI_FORCE_INLINE bool IsLineEnd( const char_t in)
 {
 {
 	return (in == (char_t)'\r' || in == (char_t)'\n' || in == (char_t)'\0');
 	return (in == (char_t)'\r' || in == (char_t)'\n' || in == (char_t)'\0');
 }
 }
 // ---------------------------------------------------------------------------------
 // ---------------------------------------------------------------------------------
 template <class char_t>
 template <class char_t>
-inline bool IsSpaceOrNewLine( const char_t in)
+AI_FORCE_INLINE bool IsSpaceOrNewLine( const char_t in)
 {
 {
 	return IsSpace<char_t>(in) || IsLineEnd<char_t>(in);
 	return IsSpace<char_t>(in) || IsLineEnd<char_t>(in);
 }
 }
 // ---------------------------------------------------------------------------------
 // ---------------------------------------------------------------------------------
 template <class char_t>
 template <class char_t>
-inline bool SkipSpaces( const char_t* in, const char_t** out)
+AI_FORCE_INLINE bool SkipSpaces( const char_t* in, const char_t** out)
 {
 {
 	while (*in == (char_t)' ' || *in == (char_t)'\t')in++;
 	while (*in == (char_t)' ' || *in == (char_t)'\t')in++;
 	*out = in;
 	*out = in;
@@ -71,7 +71,7 @@ inline bool SkipSpaces( const char_t* in, const char_t** out)
 }
 }
 // ---------------------------------------------------------------------------------
 // ---------------------------------------------------------------------------------
 template <class char_t>
 template <class char_t>
-inline bool SkipSpaces( const char_t** inout)
+AI_FORCE_INLINE bool SkipSpaces( const char_t** inout)
 {
 {
 	return SkipSpaces<char_t>(*inout,inout);
 	return SkipSpaces<char_t>(*inout,inout);
 }
 }
@@ -109,7 +109,7 @@ inline bool SkipSpacesAndLineEnd( const char_t** inout)
 }
 }
 // ---------------------------------------------------------------------------------
 // ---------------------------------------------------------------------------------
 template <class char_t>
 template <class char_t>
-bool GetNextLine(const char_t*& buffer, char_t out[4096])
+inline bool GetNextLine(const char_t*& buffer, char_t out[4096])
 {
 {
 	if ((char_t)'\0' == *buffer)return false;
 	if ((char_t)'\0' == *buffer)return false;
 
 
@@ -124,7 +124,7 @@ bool GetNextLine(const char_t*& buffer, char_t out[4096])
 }
 }
 // ---------------------------------------------------------------------------------
 // ---------------------------------------------------------------------------------
 template <class char_t>
 template <class char_t>
-inline bool IsNumeric( char_t in)
+AI_FORCE_INLINE bool IsNumeric( char_t in)
 {
 {
 	return in >= '0' && in <= '9' || '-' == in || '+' == in;
 	return in >= '0' && in <= '9' || '-' == in || '+' == in;
 }
 }

+ 0 - 1
code/ProcessHelper.h

@@ -164,7 +164,6 @@ class ComputeSpatialSortProcess : public BaseProcess
 			aiMesh* mesh = pScene->mMeshes[i];
 			aiMesh* mesh = pScene->mMeshes[i];
 			_Type& blubb = *it;
 			_Type& blubb = *it;
 			blubb.first.Fill(mesh->mVertices,mesh->mNumVertices,sizeof(aiVector3D));
 			blubb.first.Fill(mesh->mVertices,mesh->mNumVertices,sizeof(aiVector3D));
-
 			blubb.second = ComputePositionEpsilon(mesh);
 			blubb.second = ComputePositionEpsilon(mesh);
 		}
 		}
 
 

+ 1 - 1
code/Q3DLoader.cpp

@@ -458,7 +458,7 @@ outer:
 		if (srcMat.texIdx < pScene->mNumTextures || real < pScene->mNumTextures)
 		if (srcMat.texIdx < pScene->mNumTextures || real < pScene->mNumTextures)
 		{
 		{
 			srcMat.name.data[0] = '*';
 			srcMat.name.data[0] = '*';
-			srcMat.name.length  = itoa10(&srcMat.name.data[1],1000,
+			srcMat.name.length  = ASSIMP_itoa10(&srcMat.name.data[1],1000,
 				(srcMat.texIdx < pScene->mNumTextures ? srcMat.texIdx : real));
 				(srcMat.texIdx < pScene->mNumTextures ? srcMat.texIdx : real));
 			mat->AddProperty(&srcMat.name,AI_MATKEY_TEXTURE_DIFFUSE(0));
 			mat->AddProperty(&srcMat.name,AI_MATKEY_TEXTURE_DIFFUSE(0));
 		}
 		}

+ 73 - 65
code/RemoveVCProcess.cpp

@@ -81,60 +81,62 @@ inline void ArrayDelete(T**& in, unsigned int& num)
 	num = 0;
 	num = 0;
 }
 }
 
 
-//// ------------------------------------------------------------------------------------------------
-//// Updates the node graph - removes all nodes which have the "remove" flag set and the 
-//// "don't remove" flag not set. Nodes with meshes are never deleted.
-//bool UpdateNodeGraph(aiNode* node,std::list<aiNode*>& childsOfParent,bool root)
-//{
-//	register bool b = false;
-//
-//	std::list<aiNode*> mine;
-//	for (unsigned int i = 0; i < node->mNumChildren;++i)
-//	{
-//		if(UpdateNodeGraph(node->mChildren[i],mine,false))
-//			b = true;
-//	}
-//
-//	// somewhat tricky ... mNumMeshes must be originally 0 and MSB2 may not be set,
-//	// so we can do a simple comparison against MSB here
-//	if (!root && AI_RC_UINT_MSB == node->mNumMeshes )
-//	{
-//		// this node needs to be removed
-//		if(node->mNumChildren)
-//		{
-//			childsOfParent.insert(childsOfParent.end(),mine.begin(),mine.end());
-//
-//			// set all children to NULL to make sure they are not deleted when we delete ourself
-//			for (unsigned int i = 0; i < node->mNumChildren;++i)
-//				node->mChildren[i] = NULL;
-//		}
-//		b = true;
-//		delete node;
-//	}
-//	else
-//	{
-//		AI_RC_UNMASK(node->mNumMeshes);
-//		childsOfParent.push_back(node);
-//
-//		if (b)
-//		{
-//			// reallocate the array of our children here
-//			node->mNumChildren = (unsigned int)mine.size();
-//			aiNode** const children = new aiNode*[mine.size()];
-//			aiNode** ptr = children;
-//
-//			for (std::list<aiNode*>::iterator it = mine.begin(), end = mine.end();
-//				 it != end; ++it)
-//			{
-//				*ptr++ = *it;
-//			}
-//			delete[] node->mChildren;
-//			node->mChildren = children;
-//			return false;
-//		}
-//	}
-//	return b;
-//}
+#if 0
+// ------------------------------------------------------------------------------------------------
+// Updates the node graph - removes all nodes which have the "remove" flag set and the 
+// "don't remove" flag not set. Nodes with meshes are never deleted.
+bool UpdateNodeGraph(aiNode* node,std::list<aiNode*>& childsOfParent,bool root)
+{
+	register bool b = false;
+
+	std::list<aiNode*> mine;
+	for (unsigned int i = 0; i < node->mNumChildren;++i)
+	{
+		if(UpdateNodeGraph(node->mChildren[i],mine,false))
+			b = true;
+	}
+
+	// somewhat tricky ... mNumMeshes must be originally 0 and MSB2 may not be set,
+	// so we can do a simple comparison against MSB here
+	if (!root && AI_RC_UINT_MSB == node->mNumMeshes )
+	{
+		// this node needs to be removed
+		if(node->mNumChildren)
+		{
+			childsOfParent.insert(childsOfParent.end(),mine.begin(),mine.end());
+
+			// set all children to NULL to make sure they are not deleted when we delete ourself
+			for (unsigned int i = 0; i < node->mNumChildren;++i)
+				node->mChildren[i] = NULL;
+		}
+		b = true;
+		delete node;
+	}
+	else
+	{
+		AI_RC_UNMASK(node->mNumMeshes);
+		childsOfParent.push_back(node);
+
+		if (b)
+		{
+			// reallocate the array of our children here
+			node->mNumChildren = (unsigned int)mine.size();
+			aiNode** const children = new aiNode*[mine.size()];
+			aiNode** ptr = children;
+
+			for (std::list<aiNode*>::iterator it = mine.begin(), end = mine.end();
+				 it != end; ++it)
+			{
+				*ptr++ = *it;
+			}
+			delete[] node->mChildren;
+			node->mChildren = children;
+			return false;
+		}
+	}
+	return b;
+}
+#endif
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
 // Executes the post processing step on the given imported data.
 // Executes the post processing step on the given imported data.
@@ -167,7 +169,9 @@ void RemoveVCProcess::Execute( aiScene* pScene)
 		for (unsigned int i = 1;i < pScene->mNumMaterials;++i)
 		for (unsigned int i = 1;i < pScene->mNumMaterials;++i)
 			delete pScene->mMaterials[i];
 			delete pScene->mMaterials[i];
 
 
+		pScene->mNumMaterials = 1;
 		MaterialHelper* helper = (MaterialHelper*) pScene->mMaterials[0];
 		MaterialHelper* helper = (MaterialHelper*) pScene->mMaterials[0];
+		ai_assert(NULL != helper);
 		helper->Clear();
 		helper->Clear();
 
 
 		// gray
 		// gray
@@ -218,6 +222,10 @@ void RemoveVCProcess::Execute( aiScene* pScene)
 	{
 	{
 		pScene->mFlags |= AI_SCENE_FLAGS_INCOMPLETE;
 		pScene->mFlags |= AI_SCENE_FLAGS_INCOMPLETE;
 		DefaultLogger::get()->debug("Setting AI_SCENE_FLAGS_INCOMPLETE flag");
 		DefaultLogger::get()->debug("Setting AI_SCENE_FLAGS_INCOMPLETE flag");
+
+		// If we have no meshes anymore we should also clear another flag ...
+		if (!pScene->mNumMeshes)
+			pScene->mFlags &= ~AI_SCENE_FLAGS_NON_VERBOSE_FORMAT;
 	}
 	}
 
 
 	if (bHas)DefaultLogger::get()->info("RemoveVCProcess finished. Data structure cleanup has been done.");
 	if (bHas)DefaultLogger::get()->info("RemoveVCProcess finished. Data structure cleanup has been done.");
@@ -267,10 +275,10 @@ bool RemoveVCProcess::ProcessMesh(aiMesh* pMesh)
 
 
 	// handle texture coordinates
 	// handle texture coordinates
 	register bool b = (0 != (configDeleteFlags & aiComponent_TEXCOORDS));
 	register bool b = (0 != (configDeleteFlags & aiComponent_TEXCOORDS));
-	for (unsigned int i = 0; i < AI_MAX_NUMBER_OF_TEXTURECOORDS; ++i)
+	for (unsigned int i = 0, real = 0; real < AI_MAX_NUMBER_OF_TEXTURECOORDS; ++real)
 	{
 	{
 		if (!pMesh->mTextureCoords[i])break;
 		if (!pMesh->mTextureCoords[i])break;
-		if (configDeleteFlags & aiComponent_TEXCOORDSn(i) || b)
+		if (configDeleteFlags & aiComponent_TEXCOORDSn(real) || b)
 		{
 		{
 			delete pMesh->mTextureCoords[i];
 			delete pMesh->mTextureCoords[i];
 			pMesh->mTextureCoords[i] = NULL;
 			pMesh->mTextureCoords[i] = NULL;
@@ -279,19 +287,19 @@ bool RemoveVCProcess::ProcessMesh(aiMesh* pMesh)
 			if (!b)
 			if (!b)
 			{
 			{
 				// collapse the rest of the array
 				// collapse the rest of the array
-				unsigned int a;
-				for (a = i+1; a < AI_MAX_NUMBER_OF_TEXTURECOORDS;++a)
-				{
+				for (unsigned int a = i+1; a < AI_MAX_NUMBER_OF_TEXTURECOORDS;++a)
 					pMesh->mTextureCoords[a-1] = pMesh->mTextureCoords[a];
 					pMesh->mTextureCoords[a-1] = pMesh->mTextureCoords[a];
-				}
+				
 				pMesh->mTextureCoords[AI_MAX_NUMBER_OF_TEXTURECOORDS-1] = NULL;
 				pMesh->mTextureCoords[AI_MAX_NUMBER_OF_TEXTURECOORDS-1] = NULL;
+				continue;
 			}
 			}
 		}
 		}
+		++i;
 	}
 	}
 
 
 	// handle vertex colors
 	// handle vertex colors
 	b = (0 != (configDeleteFlags & aiComponent_COLORS));
 	b = (0 != (configDeleteFlags & aiComponent_COLORS));
-	for (unsigned int i = 0; i < AI_MAX_NUMBER_OF_COLOR_SETS; ++i)
+	for (unsigned int i = 0, real = 0; real < AI_MAX_NUMBER_OF_COLOR_SETS; ++real)
 	{
 	{
 		if (!pMesh->mColors[i])break;
 		if (!pMesh->mColors[i])break;
 		if (configDeleteFlags & aiComponent_COLORSn(i) || b)
 		if (configDeleteFlags & aiComponent_COLORSn(i) || b)
@@ -303,14 +311,14 @@ bool RemoveVCProcess::ProcessMesh(aiMesh* pMesh)
 			if (!b)
 			if (!b)
 			{
 			{
 				// collapse the rest of the array
 				// collapse the rest of the array
-				unsigned int a;
-				for (a = i+1; a < AI_MAX_NUMBER_OF_COLOR_SETS;++a)
-				{
+				for (unsigned int a = i+1; a < AI_MAX_NUMBER_OF_COLOR_SETS;++a)
 					pMesh->mColors[a-1] = pMesh->mColors[a];
 					pMesh->mColors[a-1] = pMesh->mColors[a];
-				}
+
 				pMesh->mColors[AI_MAX_NUMBER_OF_COLOR_SETS-1] = NULL;
 				pMesh->mColors[AI_MAX_NUMBER_OF_COLOR_SETS-1] = NULL;
+				continue;
 			}
 			}
 		}
 		}
+		++i;
 	}
 	}
 
 
 	// handle bones
 	// handle bones

+ 26 - 10
code/RemoveVCProcess.h

@@ -38,19 +38,19 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
 */
 */
 
 
-/** @file Defines a post processing step to kill all loaded normals */
-#ifndef AI_KILLNORMALPROCESS_H_INC
-#define AI_KILLNORMALPROCESS_H_INC
+/** @file Defines a post processing step to remove specific parts of the scene */
+#ifndef AI_REMOVEVCPROCESS_H_INCLUDED
+#define AI_REMOVEVCPROCESS_H_INCLUDED
 
 
 #include "BaseProcess.h"
 #include "BaseProcess.h"
 #include "../include/aiMesh.h"
 #include "../include/aiMesh.h"
 
 
 class RemoveVCProcessTest;
 class RemoveVCProcessTest;
-namespace Assimp
-	{
+namespace Assimp	{
 
 
 // ---------------------------------------------------------------------------
 // ---------------------------------------------------------------------------
-/** RemoveVCProcess: Class to kill all normals loaded
+/** RemoveVCProcess: Class to exclude specific parts of the data structure
+ *  from further processing by removing them,
 */
 */
 class ASSIMP_API RemoveVCProcess : public BaseProcess
 class ASSIMP_API RemoveVCProcess : public BaseProcess
 {
 {
@@ -80,7 +80,6 @@ public:
 	*/
 	*/
 	void Execute( aiScene* pScene);
 	void Execute( aiScene* pScene);
 
 
-
 	// -------------------------------------------------------------------
 	// -------------------------------------------------------------------
 	/** Called prior to ExecuteOnScene().
 	/** Called prior to ExecuteOnScene().
 	* The function is a request to the process to update its configuration
 	* The function is a request to the process to update its configuration
@@ -88,20 +87,37 @@ public:
 	*/
 	*/
 	virtual void SetupProperties(const Importer* pImp);
 	virtual void SetupProperties(const Importer* pImp);
 
 
+	// -------------------------------------------------------------------
+	/** Manually setup the configuration flags for the step
+	 *
+	 *  @param Bitwise combintion of the #aiComponent enumerated values.
+	*/
+	void SetDeleteFlags(unsigned int f)	
+	{
+		configDeleteFlags = f;
+	}
+
+	// -------------------------------------------------------------------
+	/** Query the current configuration.
+	*/
+	unsigned int GetDeleteFlags() const
+	{
+		return configDeleteFlags;
+	}
 
 
 private:
 private:
 
 
 	bool ProcessMesh (aiMesh* pcMesh);
 	bool ProcessMesh (aiMesh* pcMesh);
 
 
-	/** Configuration
+	/** Configuration flag
 	 */
 	 */
 	unsigned int configDeleteFlags;
 	unsigned int configDeleteFlags;
 
 
-	/** The scene the instance is currently operating on
+	/** The scene we're working with
 	 */
 	 */
 	aiScene* mScene;
 	aiScene* mScene;
 };
 };
 
 
 } // end of namespace Assimp
 } // end of namespace Assimp
 
 
-#endif // !!AI_KILLNORMALPROCESS_H_INC
+#endif // !!AI_REMOVEVCPROCESS_H_INCLUDED

+ 1 - 1
code/SceneCombiner.cpp

@@ -397,7 +397,7 @@ void SceneCombiner::MergeScenes(aiScene** _dest, aiScene* master,
 							{
 							{
 								// Offset the index and write it back ..
 								// Offset the index and write it back ..
 								const unsigned int idx = strtol10(&s.data[1]) + offset[n];
 								const unsigned int idx = strtol10(&s.data[1]) + offset[n];
-								itoa10(&s.data[1],sizeof(s.data)-1,idx);
+								ASSIMP_itoa10(&s.data[1],sizeof(s.data)-1,idx);
 							}
 							}
 						}
 						}
 
 

+ 5 - 5
code/ScenePreprocessor.cpp

@@ -43,10 +43,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
 using namespace Assimp;
 using namespace Assimp;
 
 
-// ---------------------------------------------------------------------------
-void ScenePreprocessor::ProcessScene (aiScene* _scene)
+// ---------------------------------------------------------------------------------------------
+void ScenePreprocessor::ProcessScene ()
 {
 {
-	scene = _scene;
+	ai_assert(scene != NULL);
 
 
 	// Process all meshes
 	// Process all meshes
 	for (unsigned int i = 0; i < scene->mNumMeshes;++i)
 	for (unsigned int i = 0; i < scene->mNumMeshes;++i)
@@ -87,7 +87,7 @@ void ScenePreprocessor::ProcessScene (aiScene* _scene)
 	}
 	}
 }
 }
 
 
-// ---------------------------------------------------------------------------
+// ---------------------------------------------------------------------------------------------
 void ScenePreprocessor::ProcessMesh (aiMesh* mesh)
 void ScenePreprocessor::ProcessMesh (aiMesh* mesh)
 {
 {
 	// If aiMesh::mNumUVComponents is *not* set assign the default value of 2
 	// If aiMesh::mNumUVComponents is *not* set assign the default value of 2
@@ -129,7 +129,7 @@ void ScenePreprocessor::ProcessMesh (aiMesh* mesh)
 	}
 	}
 }
 }
 
 
-// ---------------------------------------------------------------------------
+// ---------------------------------------------------------------------------------------------
 void ScenePreprocessor::ProcessAnimation (aiAnimation* anim)
 void ScenePreprocessor::ProcessAnimation (aiAnimation* anim)
 {
 {
 	double first = 10e10, last = -10e10;
 	double first = 10e10, last = -10e10;

+ 45 - 7
code/ScenePreprocessor.h

@@ -43,27 +43,65 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #ifndef AI_SCENE_PREPROCESSOR_H_INC
 #ifndef AI_SCENE_PREPROCESSOR_H_INC
 #define AI_SCENE_PREPROCESSOR_H_INC
 #define AI_SCENE_PREPROCESSOR_H_INC
 
 
-
+class ScenePreprocessorTest;
 namespace Assimp	{
 namespace Assimp	{
 
 
-
-// ---------------------------------------------------------------------------
+// ----------------------------------------------------------------------------------
 /** ScenePreprocessor: Preprocess a scene before any post-processing
 /** ScenePreprocessor: Preprocess a scene before any post-processing
  *  steps are executed.
  *  steps are executed.
+ *
+ *  The step computes data that needn't necessarily be provided by the
+ *  importer, such as aiMesh::mPrimitiveTypes.
 */
 */
+// ----------------------------------------------------------------------------------
 class ASSIMP_API ScenePreprocessor
 class ASSIMP_API ScenePreprocessor
 {
 {
+	// Make ourselves a friend of the corresponding test unit.
+	friend class ::ScenePreprocessorTest;
 public:
 public:
 
 
-	/** Preprocess a given scene.
-	 *
-	 *  @param _scene Scene to be preprocessed
+	// ----------------------------------------------------------------
+	/** Default c'tpr. Use SetScene() to assign a scene to the object.
+	 */
+	ScenePreprocessor()	
+		:	scene	(NULL)
+	{}
+
+	/** Constructs the object and assigns a specific scene to it
+	 */
+	ScenePreprocessor(aiScene* _scene)
+		:	scene	(_scene)
+	{}
+
+	// ----------------------------------------------------------------
+	/** Assign a (new) scene to the object.
+	 *  
+	 *  One 'SceneProcessor' can be used for multiple scenes.
+	 *  Call ProcessScene to have the scene preprocessed.
+	 *  @param sc Scene to be processed.
 	 */
 	 */
-	void ProcessScene (aiScene* _scene);
+	void SetScene (aiScene* sc)	{
+		scene = sc;
+	}
+
+	// ----------------------------------------------------------------
+	/** Preprocess the current scene
+	 */
+	void ProcessScene ();
 
 
 protected:
 protected:
 
 
+	// ----------------------------------------------------------------
+	/** Preprocess an animation in the scene
+	 *  @param anim Anim to be preprocessed.
+	 */
 	void ProcessAnimation (aiAnimation* anim);
 	void ProcessAnimation (aiAnimation* anim);
+	
+	
+	// ----------------------------------------------------------------
+	/** Preprocess a mesh in the scene
+	 *  @param mesh Mesh to be preprocessed.
+	 */
 	void ProcessMesh (aiMesh* mesh);
 	void ProcessMesh (aiMesh* mesh);
 
 
 protected:
 protected:

+ 4 - 6
code/SmoothingGroups.inl

@@ -70,9 +70,8 @@ void ComputeNormalsWithSmoothingsGroups(MeshWithSmoothingGroups<T>& sMesh)
 		aiVector3D pDelta2 = *pV3 - *pV1;
 		aiVector3D pDelta2 = *pV3 - *pV1;
 		aiVector3D vNor = pDelta1 ^ pDelta2;
 		aiVector3D vNor = pDelta1 ^ pDelta2;
 
 
-		sMesh.mNormals[face.mIndices[0]] = vNor;
-		sMesh.mNormals[face.mIndices[1]] = vNor;
-		sMesh.mNormals[face.mIndices[2]] = vNor;
+		for (unsigned int c = 0; c < 3;++c)
+			sMesh.mNormals[face.mIndices[c]] = vNor;
 	}
 	}
 
 
 	// calculate the position bounds so we have a reliable epsilon to check position differences against 
 	// calculate the position bounds so we have a reliable epsilon to check position differences against 
@@ -95,9 +94,8 @@ void ComputeNormalsWithSmoothingsGroups(MeshWithSmoothingGroups<T>& sMesh)
 	for( typename std::vector<T>::iterator i =  sMesh.mFaces.begin();
 	for( typename std::vector<T>::iterator i =  sMesh.mFaces.begin();
 		i != sMesh.mFaces.end();++i)
 		i != sMesh.mFaces.end();++i)
 	{
 	{
-		sSort.Add(sMesh.mPositions[(*i).mIndices[0]],(*i).mIndices[0],(*i).iSmoothGroup);
-		sSort.Add(sMesh.mPositions[(*i).mIndices[1]],(*i).mIndices[1],(*i).iSmoothGroup);
-		sSort.Add(sMesh.mPositions[(*i).mIndices[2]],(*i).mIndices[2],(*i).iSmoothGroup);
+		for (unsigned int c = 0; c < 3;++c)
+			sSort.Add(sMesh.mPositions[(*i).mIndices[c]],(*i).mIndices[c],(*i).iSmoothGroup);
 	}
 	}
 	sSort.Prepare();
 	sSort.Prepare();
 
 

+ 1 - 1
code/SortByPTypeProcess.cpp

@@ -57,7 +57,7 @@ using namespace Assimp;
 // Constructor to be privately used by Importer
 // Constructor to be privately used by Importer
 SortByPTypeProcess::SortByPTypeProcess()
 SortByPTypeProcess::SortByPTypeProcess()
 {
 {
-	// nothing to do here
+	configRemoveMeshes = 0;
 }
 }
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------

+ 52 - 0
code/StdOStreamLogStream.h

@@ -0,0 +1,52 @@
+#ifndef AI_STROSTREAMLOGSTREAM_H_INC
+#define AI_STROSTREAMLOGSTREAM_H_INC
+
+#include "../include/LogStream.h"
+#include <ostream>
+
+namespace Assimp	{
+
+// ---------------------------------------------------------------------------
+/**	@class	StdOStreamLogStream
+ *	@brief	Logs into a std::ostream
+ */
+class StdOStreamLogStream : public LogStream
+{
+public:
+	/**	@brief	Construction from an existing std::ostream	
+	 *  @param _ostream Output stream to be used
+	*/
+	StdOStreamLogStream(std::ostream& _ostream);
+
+	/**	@brief	Destructor	*/
+	~StdOStreamLogStream();
+	
+	/**	@brief	Writer	*/
+	void write(const std::string &messgae);
+private:
+	std::ostream& ostream;
+};
+
+// ---------------------------------------------------------------------------
+//	Default constructor
+inline StdOStreamLogStream::StdOStreamLogStream(std::ostream& _ostream)
+	: ostream	(_ostream)
+{}
+
+// ---------------------------------------------------------------------------
+//	Default constructor
+inline StdOStreamLogStream::~StdOStreamLogStream()
+{}
+
+// ---------------------------------------------------------------------------
+//	Write method
+inline void StdOStreamLogStream::write(const std::string &message)
+{
+	ostream << message.c_str();
+	ostream.flush();
+}
+
+// ---------------------------------------------------------------------------
+}	// Namespace Assimp
+
+#endif // guard

+ 24 - 24
code/StreamReader.h

@@ -68,7 +68,7 @@ public:
 	 *  The stream will be deleted afterwards.
 	 *  The stream will be deleted afterwards.
 	 *  @param stream Input stream
 	 *  @param stream Input stream
 	 */
 	 */
-	inline StreamReader(IOStream* stream)
+	StreamReader(IOStream* stream)
 	{
 	{
 		ai_assert(NULL != stream);
 		ai_assert(NULL != stream);
 		this->stream = stream;
 		this->stream = stream;
@@ -81,7 +81,7 @@ public:
 		end = limit = &buffer[s];
 		end = limit = &buffer[s];
 	}
 	}
 
 
-	inline ~StreamReader() 
+	~StreamReader() 
 	{
 	{
 		delete[] buffer;
 		delete[] buffer;
 		delete stream;
 		delete stream;
@@ -90,28 +90,28 @@ public:
 
 
 	/** Read a float from the stream 
 	/** Read a float from the stream 
 	 */
 	 */
-	inline float GetF4()
+	float GetF4()
 	{
 	{
 		return Get<float>();
 		return Get<float>();
 	}
 	}
 
 
 	/** Read a double from the stream 
 	/** Read a double from the stream 
 	 */
 	 */
-	inline double GetF8()
+	double GetF8()
 	{
 	{
 		return Get<double>();
 		return Get<double>();
 	}
 	}
 
 
 	/** Read a short from the stream
 	/** Read a short from the stream
 	 */
 	 */
-	inline int16_t GetI2()
+	int16_t GetI2()
 	{
 	{
 		return Get<int16_t>();
 		return Get<int16_t>();
 	}
 	}
 
 
 	/** Read a char from the stream
 	/** Read a char from the stream
 	 */
 	 */
-	inline int8_t GetI1()
+	int8_t GetI1()
 	{
 	{
 		if (current >= end)
 		if (current >= end)
 			throw new ImportErrorException("End of file was reached");
 			throw new ImportErrorException("End of file was reached");
@@ -121,21 +121,21 @@ public:
 
 
 	/** Read an int from the stream
 	/** Read an int from the stream
 	 */
 	 */
-	inline int32_t GetI4()
+	int32_t GetI4()
 	{
 	{
 		return Get<int32_t>();
 		return Get<int32_t>();
 	}
 	}
 
 
 	/** Read a long from the stream
 	/** Read a long from the stream
 	 */
 	 */
-	inline int64_t GetI8()
+	int64_t GetI8()
 	{
 	{
 		return Get<int64_t>();
 		return Get<int64_t>();
 	}
 	}
 
 
 	/** Get the remaining stream size (to the end of the srream)
 	/** Get the remaining stream size (to the end of the srream)
 	 */
 	 */
-	inline unsigned int GetRemainingSize()
+	unsigned int GetRemainingSize()
 	{
 	{
 		return (unsigned int)(end - current);
 		return (unsigned int)(end - current);
 	}
 	}
@@ -143,7 +143,7 @@ public:
 
 
 	/** Get the remaining stream size (to the current read limit)
 	/** Get the remaining stream size (to the current read limit)
 	 */
 	 */
-	inline unsigned int GetRemainingSizeToLimit()
+	unsigned int GetRemainingSizeToLimit()
 	{
 	{
 		return (unsigned int)(limit - current);
 		return (unsigned int)(limit - current);
 	}
 	}
@@ -151,7 +151,7 @@ public:
 
 
 	/** Increase the file pointer
 	/** Increase the file pointer
 	 */
 	 */
-	inline void IncPtr(unsigned int plus)
+	void IncPtr(unsigned int plus)
 	{
 	{
 		current += plus;
 		current += plus;
 		if (current > end)
 		if (current > end)
@@ -162,14 +162,14 @@ public:
 
 
 	/** Get the current file pointer
 	/** Get the current file pointer
 	 */
 	 */
-	inline int8_t* GetPtr() const
+	int8_t* GetPtr() const
 	{
 	{
 		return current;
 		return current;
 	}
 	}
 
 
 	/** Set current file pointer
 	/** Set current file pointer
 	 */
 	 */
-	inline void SetPtr(int8_t* p)
+	void SetPtr(int8_t* p)
 	{
 	{
 		current = p;
 		current = p;
 		if (current > end || current < buffer)
 		if (current > end || current < buffer)
@@ -180,7 +180,7 @@ public:
 
 
 	/** Get the current offset from the beginning of the file
 	/** Get the current offset from the beginning of the file
 	 */
 	 */
-	inline int GetCurrentPos() const
+	int GetCurrentPos() const
 	{
 	{
 		return (unsigned int)(current - buffer);
 		return (unsigned int)(current - buffer);
 	}
 	}
@@ -191,7 +191,7 @@ public:
 	 *    the beginning of the file. Passing 0xffffffff
 	 *    the beginning of the file. Passing 0xffffffff
 	 *    resets the limit.
 	 *    resets the limit.
 	 */
 	 */
-	inline void SetReadLimit(unsigned int _limit)
+	void SetReadLimit(unsigned int _limit)
 	{
 	{
 		if (0xffffffff == _limit)
 		if (0xffffffff == _limit)
 		{
 		{
@@ -205,35 +205,35 @@ public:
 
 
 	/** Get the current read limit
 	/** Get the current read limit
 	 */
 	 */
-	inline int GetReadLimit() const
+	int GetReadLimit() const
 	{
 	{
 		return (unsigned int)(limit - buffer);
 		return (unsigned int)(limit - buffer);
 	}
 	}
 
 
 	/** Skip to the read limit
 	/** Skip to the read limit
 	 */
 	 */
-	inline void SkipToReadLimit()
+	void SkipToReadLimit()
 	{
 	{
 		current = limit;
 		current = limit;
 	}
 	}
 
 
 	// overload operator>> for those who prefer this way ...
 	// overload operator>> for those who prefer this way ...
-	inline void operator >> (float& f) 
+	void operator >> (float& f) 
 		{f = GetF4();}
 		{f = GetF4();}
 
 
-	inline void operator >> (double& f) 
+	void operator >> (double& f) 
 		{f = GetF8();}
 		{f = GetF8();}
 
 
-	inline void operator >> (int16_t& f) 
+	void operator >> (int16_t& f) 
 		{f = GetI2();}
 		{f = GetI2();}
 
 
-	inline void operator >> (int32_t& f) 
+	void operator >> (int32_t& f) 
 		{f = GetI4();}
 		{f = GetI4();}
 
 
-	inline void operator >> (int64_t& f) 
+	void operator >> (int64_t& f) 
 		{f = GetI8();}
 		{f = GetI8();}
 
 
-	inline void operator >> (int8_t& f) 
+	void operator >> (int8_t& f) 
 		{f = GetI1();}
 		{f = GetI1();}
 
 
 private:
 private:
@@ -241,7 +241,7 @@ private:
 	/** Generic read method. ByteSwap::Swap(T*) must exist.
 	/** Generic read method. ByteSwap::Swap(T*) must exist.
 	 */
 	 */
 	template <typename T>
 	template <typename T>
-	inline T Get()
+	T Get()
 	{
 	{
 		if (current + sizeof(T) > limit)
 		if (current + sizeof(T) > limit)
 			throw new ImportErrorException("End of file or stream limit was reached");
 			throw new ImportErrorException("End of file or stream limit was reached");

+ 57 - 34
code/StringComparison.h

@@ -38,23 +38,31 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
 */
 */
 
 
-/** @file Definition of platform independent string comparison functions */
-#ifndef AI_STRINGCOMPARISON_H_INC
-#define AI_STRINGCOMPARISON_H_INC
+/** @file Definition of platform independent string workers:
 
 
+   ASSIMP_itoa10
+   ASSIMP_stricmp
+   ASSIMP_strincmp
 
 
-namespace Assimp
-{
-
-// ---------------------------------------------------------------------------
-// itoa is not consistently available on all platforms so it is quite useful
-// to have a small replacement function here. No need to use a full sprintf()
-// if we just want to print a number ...
-// @param out Output buffer
-// @param max Maximum number of characters to be written, including '\0'
-// @param number Number to be written
-// @return Number of bytes written. Including '\0'.
-inline unsigned int itoa10( char* out, unsigned int max, int32_t number)
+   These functions are not consistently available on all platforms,
+   or the provided implementations behave too differently.
+*/
+#ifndef INCLUDED_AI_STRING_WORKERS_H
+#define INCLUDED_AI_STRING_WORKERS_H
+
+namespace Assimp	{
+
+// -------------------------------------------------------------------------------
+/** @brief itoa with a fixed base 10
+ * 'itoa' is not consistently available on all platforms so it is quite useful
+ * to have a small replacement function here. No need to use a full sprintf()
+ * if we just want to print a number ...
+ * @param out Output buffer
+ * @param max Maximum number of characters to be written, including '\0'
+ * @param number Number to be written
+ * @return Number of bytes written. Including the terminal zero.
+ */
+inline unsigned int ASSIMP_itoa10( char* out, unsigned int max, int32_t number)
 {
 {
 	ai_assert(NULL != out);
 	ai_assert(NULL != out);
 
 
@@ -91,28 +99,32 @@ inline unsigned int itoa10( char* out, unsigned int max, int32_t number)
 	return written;
 	return written;
 }
 }
 
 
-// ---------------------------------------------------------------------------
-// Secure template overload
-// The compiler should choose this function if he is able to determine the
-// size of the array automatically.
+// -------------------------------------------------------------------------------
+/** @brief itoa with a fixed base 10 (Secure template overload)
+ *  The compiler should choose this function if he is able to determine the
+ *  size of the array automatically.
+ */
 template <unsigned int length>
 template <unsigned int length>
-inline unsigned int itoa10( char(& out)[length], int32_t number)
+inline unsigned int ASSIMP_itoa10( char(& out)[length], int32_t number)
 {
 {
-	return itoa10(out,length,number);
+	return ASSIMP_itoa10(out,length,number);
 }
 }
 
 
-// ---------------------------------------------------------------------------
-/** \brief Helper function to do platform independent string comparison.
+// -------------------------------------------------------------------------------
+/** @brief Helper function to do platform independent string comparison.
  *
  *
  *  This is required since stricmp() is not consistently available on
  *  This is required since stricmp() is not consistently available on
  *  all platforms. Some platforms use the '_' prefix, others don't even
  *  all platforms. Some platforms use the '_' prefix, others don't even
  *  have such a function. 
  *  have such a function. 
  *
  *
- *  \param s1 First input string
- *  \param s2 Second input string
+ *  @param s1 First input string
+ *  @param s2 Second input string
+ *  @return 0 if the given strings are identical
  */
  */
 inline int ASSIMP_stricmp(const char *s1, const char *s2)
 inline int ASSIMP_stricmp(const char *s1, const char *s2)
 {
 {
+	ai_assert(NULL != s1 && NULL != s2);
+
 #if (defined _MSC_VER)
 #if (defined _MSC_VER)
 
 
 	return ::_stricmp(s1,s2);
 	return ::_stricmp(s1,s2);
@@ -134,8 +146,12 @@ inline int ASSIMP_stricmp(const char *s1, const char *s2)
 #endif
 #endif
 }
 }
 
 
-// ---------------------------------------------------------------------------
-/** \brief Case independent comparison of two std::strings
+// -------------------------------------------------------------------------------
+/** @brief Case independent comparison of two std::strings
+ *
+ *  @param a First  string
+ *  @param b Second string
+ *  @return 0 if a == b
  */
  */
 inline int ASSIMP_stricmp(const std::string& a, const std::string& b)
 inline int ASSIMP_stricmp(const std::string& a, const std::string& b)
 {
 {
@@ -143,19 +159,23 @@ inline int ASSIMP_stricmp(const std::string& a, const std::string& b)
 	return (i ? i : ASSIMP_stricmp(a.c_str(),b.c_str()));
 	return (i ? i : ASSIMP_stricmp(a.c_str(),b.c_str()));
 }
 }
 
 
-// ---------------------------------------------------------------------------
-/** \brief Helper function to do platform independent string comparison.
+// -------------------------------------------------------------------------------
+/** @brief Helper function to do platform independent string comparison.
  *
  *
  *  This is required since strincmp() is not consistently available on
  *  This is required since strincmp() is not consistently available on
  *  all platforms. Some platforms use the '_' prefix, others don't even
  *  all platforms. Some platforms use the '_' prefix, others don't even
  *  have such a function. 
  *  have such a function. 
  *
  *
- *  \param s1 First input string
- *  \param s2 Second input string
- *  \param n Macimum number of characters to compare
+ *  @param s1 First input string
+ *  @param s2 Second input string
+ *  @param n Macimum number of characters to compare
+ *  @return 0 if the given strings are identical
  */
  */
 inline int ASSIMP_strincmp(const char *s1, const char *s2, unsigned int n)
 inline int ASSIMP_strincmp(const char *s1, const char *s2, unsigned int n)
 {
 {
+	ai_assert(NULL != s1 && NULL != s2);
+	if (!n)return 0;
+
 #if (defined _MSC_VER)
 #if (defined _MSC_VER)
 
 
 	return ::_strnicmp(s1,s2,n);
 	return ::_strnicmp(s1,s2,n);
@@ -180,8 +200,11 @@ inline int ASSIMP_strincmp(const char *s1, const char *s2, unsigned int n)
 }
 }
 
 
 
 
-// ---------------------------------------------------------------------------
-// Evaluates an integer power. 
+// -------------------------------------------------------------------------------
+/** @brief Evaluates an integer power
+ *
+ * todo: move somewhere where it fits better in than here 
+ */
 inline unsigned int integer_pow (unsigned int base, unsigned int power)
 inline unsigned int integer_pow (unsigned int base, unsigned int power)
 {
 {
 	unsigned int res = 1;
 	unsigned int res = 1;

+ 7 - 3
code/TargetAnimation.cpp

@@ -227,14 +227,18 @@ void TargetAnimationHelper::Process(std::vector<aiVectorKey>* distanceTrack)
 		float f = diff.Length();
 		float f = diff.Length();
 
 
 		// output distance vector
 		// output distance vector
-		if (fill)
+		if (f)
 		{
 		{
 			fill->push_back(aiVectorKey());
 			fill->push_back(aiVectorKey());
 			aiVectorKey& v = fill->back();
 			aiVectorKey& v = fill->back();
 			v.mTime  = iter.GetCurTime();
 			v.mTime  = iter.GetCurTime();
-			v.mValue = aiVector3D (0.f,0.f,f);
+			v.mValue = diff;
+
+			diff /= f;
+		}
+		else
+		{
 		}
 		}
-		diff /= f; 
 
 
 		// diff is now the vector in which our camera is pointing
 		// diff is now the vector in which our camera is pointing
 	}
 	}

+ 20 - 22
code/VertexTriangleAdjacency.h

@@ -47,12 +47,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include "../include/aiAssert.h"
 #include "../include/aiAssert.h"
 
 
 struct aiMesh;
 struct aiMesh;
-
-namespace Assimp
-{
+namespace Assimp	{
 
 
 // ---------------------------------------------------------------------------
 // ---------------------------------------------------------------------------
-/** The VertexTriangleAdjacency class computes a vertex-triangle
+/** @brief The VertexTriangleAdjacency class computes a vertex-triangle
  *  adjacency map from a given index buffer.
  *  adjacency map from a given index buffer.
  *
  *
  *  @note The input data is expected to be triangulated.
  *  @note The input data is expected to be triangulated.
@@ -62,30 +60,30 @@ class ASSIMP_API VertexTriangleAdjacency
 public:
 public:
 
 
 
 
-	/** Construction from an existing index buffer
-	 * @param pcFaces Index buffer
-	 * @param iNumFaces Number of faces in the buffer
-	 * @param iNumVertices Number of referenced vertices. This value
-	 *   is computed automatically if 0 is specified.
-	 * @param bComputeNumTriangles If you want the class to compute
-	 *   a list which contains the number of referenced triangles
-	 *   per vertex - pass true.
+	/** @brief Construction from an existing index buffer
+	 *  @param pcFaces Index buffer
+	 *  @param iNumFaces Number of faces in the buffer
+	 *  @param iNumVertices Number of referenced vertices. This value
+	 *    is computed automatically if 0 is specified.
+	 *  @param bComputeNumTriangles If you want the class to compute
+	 *    a list which contains the number of referenced triangles
+	 *    per vertex - pass true.
 	 */
 	 */
 	VertexTriangleAdjacency(aiFace* pcFaces,unsigned int iNumFaces,
 	VertexTriangleAdjacency(aiFace* pcFaces,unsigned int iNumFaces,
 		unsigned int iNumVertices = 0,
 		unsigned int iNumVertices = 0,
 		bool bComputeNumTriangles = true);
 		bool bComputeNumTriangles = true);
 
 
 
 
-	/** Destructor
+	/** @brief Destructor
 	 */
 	 */
 	~VertexTriangleAdjacency();
 	~VertexTriangleAdjacency();
 
 
 
 
-	/** Get all triangles adjacent to a vertex
-	 * @param iVertIndex Index of the vertex
-	 * @return A pointer to the adjacency list
+	/** @brief Get all triangles adjacent to a vertex
+	 *  @param iVertIndex Index of the vertex
+	 *  @return A pointer to the adjacency list
 	 */
 	 */
-	inline unsigned int* GetAdjacentTriangles(unsigned int iVertIndex) const
+	unsigned int* GetAdjacentTriangles(unsigned int iVertIndex) const
 	{
 	{
 		ai_assert(iVertIndex < iNumVertices);
 		ai_assert(iVertIndex < iNumVertices);
 
 
@@ -94,12 +92,12 @@ public:
 	}
 	}
 
 
 
 
-	/** Get the number of triangles that are referenced by
-	 *  a vertex. This function returns a reference that can be modified
-	 * @param iVertIndex Index of the vertex
-	 * @return Number of referenced triangles
+	/** @brief Get the number of triangles that are referenced by
+	 *    a vertex. This function returns a reference that can be modified
+	 *  @param iVertIndex Index of the vertex
+	 *  @return Number of referenced triangles
 	 */
 	 */
-	inline unsigned int& GetNumTrianglesPtr(unsigned int iVertIndex)
+	unsigned int& GetNumTrianglesPtr(unsigned int iVertIndex)
 	{
 	{
 		ai_assert(iVertIndex < iNumVertices && NULL != mLiveTriangles);
 		ai_assert(iVertIndex < iNumVertices && NULL != mLiveTriangles);
 		return mLiveTriangles[iVertIndex];
 		return mLiveTriangles[iVertIndex];

+ 7 - 18
code/Win32DebugLogStream.h

@@ -1,17 +1,12 @@
 #ifndef AI_WIN32DEBUGLOGSTREAM_H_INC
 #ifndef AI_WIN32DEBUGLOGSTREAM_H_INC
 #define AI_WIN32DEBUGLOGSTREAM_H_INC
 #define AI_WIN32DEBUGLOGSTREAM_H_INC
 
 
-#include "../include/LogStream.h"
-
-//#ifdef _MSC_VER
 #ifdef WIN32
 #ifdef WIN32
+
+#include "../include/LogStream.h"
 #include "Windows.h"
 #include "Windows.h"
-#endif
 
 
-namespace Assimp
-{
-//#ifdef _MSC_VER
-#ifdef WIN32
+namespace Assimp	{
 
 
 // ---------------------------------------------------------------------------
 // ---------------------------------------------------------------------------
 /**	@class	Win32DebugLogStream
 /**	@class	Win32DebugLogStream
@@ -34,16 +29,12 @@ public:
 // ---------------------------------------------------------------------------
 // ---------------------------------------------------------------------------
 //	Default constructor
 //	Default constructor
 inline Win32DebugLogStream::Win32DebugLogStream()
 inline Win32DebugLogStream::Win32DebugLogStream()
-{
-	// empty
-}
+{}
 
 
 // ---------------------------------------------------------------------------
 // ---------------------------------------------------------------------------
 //	Default constructor
 //	Default constructor
 inline Win32DebugLogStream::~Win32DebugLogStream()
 inline Win32DebugLogStream::~Win32DebugLogStream()
-{
-	// empty
-}
+{}
 
 
 // ---------------------------------------------------------------------------
 // ---------------------------------------------------------------------------
 //	Write method
 //	Write method
@@ -53,9 +44,7 @@ inline void Win32DebugLogStream::write(const std::string &message)
 }
 }
 
 
 // ---------------------------------------------------------------------------
 // ---------------------------------------------------------------------------
-
-#endif
-
 }	// Namespace Assimp
 }	// Namespace Assimp
 
 
-#endif
+#endif // ! WIN32
+#endif // guard

+ 34 - 35
include/BoostWorkaround/boost/tuple/tuple.hpp

@@ -1,5 +1,5 @@
 // A very small replacement for boost::tuple
 // A very small replacement for boost::tuple
-// (c) Alexander Gessler, 2008
+// (c) Alexander Gessler, 2008 [[email protected]]
 
 
 #ifndef BOOST_TUPLE_INCLUDED
 #ifndef BOOST_TUPLE_INCLUDED
 #define BOOST_TUPLE_INCLUDED
 #define BOOST_TUPLE_INCLUDED
@@ -24,9 +24,22 @@ namespace boost	{
 			typedef const T t;
 			typedef const T t;
 		};
 		};
 
 
-		template <typename, unsigned, typename, bool, unsigned> 
-		struct value_getter;
+		// Predeclare some stuff
+		template <typename, unsigned, typename, bool, unsigned> struct value_getter;
+		
+		// Helper to obtain the type of a tuple element
+		template <typename T, unsigned NIDX, typename TNEXT, unsigned N /*= 0*/>
+		struct type_getter	{
+			typedef type_getter<typename TNEXT::type,NIDX+1,typename TNEXT::next_type,N> next_elem_getter;
+			typedef typename next_elem_getter::type type;
+		};
 
 
+		template <typename T, unsigned NIDX, typename TNEXT >
+		struct type_getter <T,NIDX,TNEXT,NIDX>	{
+			typedef T type;
+		};
+
+		// Base class for all explicit specializations of list_elem
 		template <typename T, unsigned NIDX, typename TNEXT >
 		template <typename T, unsigned NIDX, typename TNEXT >
 		struct list_elem_base {
 		struct list_elem_base {
 
 
@@ -47,27 +60,28 @@ namespace boost	{
 
 
 			// Get the value of a specific tuple element
 			// Get the value of a specific tuple element
 			template <unsigned N>
 			template <unsigned N>
-			T& get () {
+			typename type_getter<T,NIDX,TNEXT,N>::type& get () {
 				value_getter <T,NIDX,TNEXT,false,N> s;
 				value_getter <T,NIDX,TNEXT,false,N> s;
 				return s(*this);
 				return s(*this);
 			}
 			}
 
 
 			// Get the value of a specific tuple element
 			// Get the value of a specific tuple element
 			template <unsigned N>
 			template <unsigned N>
-			const T& get () const {
+			const typename type_getter<T,NIDX,TNEXT,N>::type& get () const {
 				value_getter <T,NIDX,TNEXT,true,N> s;
 				value_getter <T,NIDX,TNEXT,true,N> s;
 				return s(*this);
 				return s(*this);
 			}
 			}
 
 
-			// Assign a value to the tuple element
-			template <typename T2, typename TNEXT2> /* requires convertible(T2,T) */
-			list_elem& operator = (const list_elem<T2,NIDX,TNEXT2>& other)	{
-				me   = (T)other.me;
-				next = other.next;
-				return *this;
+			// Explicit cast
+			template <typename T2, typename TNEXT2 >
+			operator list_elem<T2,NIDX,TNEXT2> () const	{
+				list_elem<T2,NIDX,TNEXT2> ret;
+				ret.me   = (T2)me;
+				ret.next = next;
+				return ret;
 			}
 			}
 
 
-			// Recursively compare two elements
+			// Recursively compare two elements (last element returns always true)
 			bool operator == (const list_elem& s) const	{
 			bool operator == (const list_elem& s) const	{
 				return (me == s.me && next == s.next);
 				return (me == s.me && next == s.next);
 			}
 			}
@@ -100,8 +114,8 @@ namespace boost	{
 		typedef list_elem<nulltype,0,int> list_end;
 		typedef list_elem<nulltype,0,int> list_end;
 
 
 		// Helper obtain to query the value of a tuple element
 		// Helper obtain to query the value of a tuple element
-		// NOTE: Could be a nested class, but afaik it's non-standard and at least
-		//       MSVC isn't able to evaluate the partial specialization correctly.
+		// NOTE: This can't be a nested class as the compiler won't accept a full or
+		// partial specialization of a nested class of a non-specialized template
 		template <typename T, unsigned NIDX, typename TNEXT, bool IS_CONST, unsigned N>
 		template <typename T, unsigned NIDX, typename TNEXT, bool IS_CONST, unsigned N>
 		struct value_getter	 {
 		struct value_getter	 {
 
 
@@ -112,7 +126,9 @@ namespace boost	{
 			typedef value_getter<typename TNEXT::type,NIDX+1,typename TNEXT::next_type,
 			typedef value_getter<typename TNEXT::type,NIDX+1,typename TNEXT::next_type,
 				IS_CONST, N> next_value_getter;
 				IS_CONST, N> next_value_getter;
 
 
-			typename ConstIf<IS_CONST,T>::t& operator () (typename ConstIf<IS_CONST,outer_elem >::t& me) {
+			typename ConstIf<IS_CONST,typename type_getter<T,NIDX,TNEXT,N>::type>::t& 
+				operator () (typename ConstIf<IS_CONST,outer_elem >::t& me) {
+				
 				next_value_getter s;
 				next_value_getter s;
 				return s(me.next);
 				return s(me.next);
 			}
 			}
@@ -126,18 +142,6 @@ namespace boost	{
 				return me.me;
 				return me.me;
 			}
 			}
 		};
 		};
-
-		// Helper to obtain the type of a tuple element
-		template <typename T, unsigned NIDX, typename TNEXT, unsigned N /*= 0*/>
-		struct type_getter	{
-			typedef type_getter<typename TNEXT::type,NIDX+1,typename TNEXT::next_type,N> next_elem_getter;
-			typedef typename next_elem_getter::type type;
-		};
-
-		template <typename T, unsigned NIDX, typename TNEXT >
-		struct type_getter <T,NIDX,TNEXT,NIDX>	{
-			typedef T type;
-		};
 	};
 	};
 
 
 	// A very minimal implementation for up to 5 elements
 	// A very minimal implementation for up to 5 elements
@@ -175,11 +179,6 @@ namespace boost	{
 			return m.get<N>();
 			return m.get<N>();
 		}
 		}
 
 
-		// assignment operator
-		tuple& operator= (const tuple& other)	{
-			m = other.m;
-			return *this;
-		}
 
 
 		// comparison operators
 		// comparison operators
 		bool operator== (const tuple& other) const	{
 		bool operator== (const tuple& other) const	{
@@ -195,9 +194,9 @@ namespace boost	{
 		template <	typename T0, typename T1,typename T2,
 		template <	typename T0, typename T1,typename T2,
 					typename T3, typename T4>
 					typename T3, typename T4>
 
 
-		operator tuple <T0,T1,T2,T3,T4> () {
+		operator tuple <T0,T1,T2,T3,T4> () const {
 			tuple <T0,T1,T2,T3,T4> s;
 			tuple <T0,T1,T2,T3,T4> s;
-			s.m = m;
+			s.m = (tuple <T0,T1,T2,T3,T4>::very_long)m;
 			return s;
 			return s;
 		}
 		}
 	};
 	};
@@ -278,4 +277,4 @@ namespace boost	{
 	}
 	}
 };
 };
 
 
-#endif
+#endif // !! BOOST_TUPLE_INCLUDED

+ 32 - 21
include/DefaultLogger.h

@@ -38,21 +38,20 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
 */
 */
 
 
-#if (!defined AI_DEFAULTLOGGER_H_INCLUDED)
-#define AI_DEFAULTLOGGER_H_INCLUDED
+#ifndef INCLUDED_AI_DEFAULTLOGGER
+#define INCLUDED_AI_DEFAULTLOGGER
 
 
 #include "Logger.h"
 #include "Logger.h"
+#include "LogStream.h"
 #include "NullLogger.h"
 #include "NullLogger.h"
 #include <vector>
 #include <vector>
 
 
-namespace Assimp
-{
-// ---------------------------------------------------------------------------
+namespace Assimp	{
+// ------------------------------------------------------------------------------------
 class IOStream;
 class IOStream;
 struct LogStreamInfo;
 struct LogStreamInfo;
 
 
-
-// ---------------------------------------------------------------------------
+// ------------------------------------------------------------------------------------
 /**	@class	DefaultLogger
 /**	@class	DefaultLogger
  *	@brief	Default logging implementation. The logger writes into a file. 
  *	@brief	Default logging implementation. The logger writes into a file. 
  *	The name can be set by creating the logger. If no filename was specified 
  *	The name can be set by creating the logger. If no filename was specified 
@@ -62,13 +61,24 @@ class ASSIMP_API DefaultLogger :
 	public Logger
 	public Logger
 {
 {
 public:
 public:
-	/**	@brief	Creates a custom logging instance (DefaultLogger)
-	 *	@param	name		Name for logfile
+
+	/**	@brief	Creates a default logging instance (DefaultLogger)
+	 *	@param	name		Name for logfile. Only valid in combination
+	 *                      with the DLS_FILE flag. 
 	 *	@param	severity	Log severity, VERBOSE will activate debug messages
 	 *	@param	severity	Log severity, VERBOSE will activate debug messages
+	 *  @param  defStreams  Default log streams to be attached. Bitwise
+	 *                      combination of the DefaultLogStreams enumerated
+	 *                      values. If DLS_FILE is specified, but an empty
+	 *                      string is passed for 'name' no logfile is created.
+	 *  @param  io          IOSystem to be used to open external files (such as the 
+	 *                      logfile). Pass NULL for the default implementation.
 	 *
 	 *
 	 * This replaces the default NullLogger with a DefaultLogger instance.
 	 * This replaces the default NullLogger with a DefaultLogger instance.
 	 */
 	 */
-	static Logger *create(const std::string &name, LogSeverity severity);
+	static Logger *create(const std::string &name = "AssimpLog.txt",
+		LogSeverity severity    = NORMAL,
+		unsigned int defStreams = DLS_DEBUGGER | DLS_FILE,
+		IOSystem* io		    = NULL);
 
 
 	/** @brief	Setup a custom implementation of the Logger interface as
 	/** @brief	Setup a custom implementation of the Logger interface as
 	 *  default logger. 
 	 *  default logger. 
@@ -88,7 +98,7 @@ public:
 	static Logger *get();
 	static Logger *get();
 
 
 	/** @brief  Return whether a default NullLogger is currently active
 	/** @brief  Return whether a default NullLogger is currently active
-	 *  @return true if the current logger id a NullLogger.
+	 *  @return true if the current logger is a NullLogger.
 	 *  Use create() or set() to setup a custom logger.
 	 *  Use create() or set() to setup a custom logger.
 	 */
 	 */
 	static bool isNullLogger();
 	static bool isNullLogger();
@@ -97,6 +107,9 @@ public:
         logger	*/
         logger	*/
 	static void kill();
 	static void kill();
 
 
+
+
+
 	/**	@brief	Logs debug infos, only been written when severity level VERBOSE is set */
 	/**	@brief	Logs debug infos, only been written when severity level VERBOSE is set */
 	void debug(const std::string &message);
 	void debug(const std::string &message);
 
 
@@ -112,23 +125,23 @@ public:
 	/**	@drief	Severity setter	*/
 	/**	@drief	Severity setter	*/
 	void setLogSeverity(LogSeverity log_severity);
 	void setLogSeverity(LogSeverity log_severity);
 	
 	
-	/**	@brief	Detach a still attached stream from logger */
+	/**	@brief	Attach a stream to the logger. */
 	void attachStream(LogStream *pStream, unsigned int severity);
 	void attachStream(LogStream *pStream, unsigned int severity);
 
 
 	/**	@brief	Detach a still attached stream from logger */
 	/**	@brief	Detach a still attached stream from logger */
 	void detatchStream(LogStream *pStream, unsigned int severity);
 	void detatchStream(LogStream *pStream, unsigned int severity);
 
 
 private:
 private:
-	/**	@brief	Constructor
-	 *	@param	name		Name for logfile, keep this empty to use std::cout and std::cerr
-	 *	@param	severity	Severity of logger
+
+	/**	@brief	Private construction for internal use by create().
+	 *  @param severity Logging granularity
 	 */
 	 */
-	DefaultLogger(const std::string &name, LogSeverity severity);
+	DefaultLogger(LogSeverity severity);
 	
 	
 	/**	@brief	Destructor	*/
 	/**	@brief	Destructor	*/
 	~DefaultLogger();
 	~DefaultLogger();
 
 
-	/**	@brief	Writes message into a file	*/
+	/**	@brief Writes a message to all streams */
 	void writeToStreams(const std::string &message, ErrorSeverity ErrorSev );
 	void writeToStreams(const std::string &message, ErrorSeverity ErrorSev );
 
 
 	/**	@brief	Returns the thread id.
 	/**	@brief	Returns the thread id.
@@ -150,14 +163,12 @@ private:
 	LogSeverity m_Severity;
 	LogSeverity m_Severity;
 	//!	Attached streams
 	//!	Attached streams
 	StreamArray	m_StreamArray;
 	StreamArray	m_StreamArray;
-	//!	Array with default streams
-	std::vector<LogStream*> m_Streams;
 
 
 	bool noRepeatMsg;
 	bool noRepeatMsg;
 	std::string lastMsg;
 	std::string lastMsg;
 };
 };
-// ---------------------------------------------------------------------------
+// ------------------------------------------------------------------------------------
 
 
 } // Namespace Assimp
 } // Namespace Assimp
 
 
-#endif // !! AI_DEFAULTLOGGER_H_INCLUDED
+#endif // !! INCLUDED_AI_DEFAULTLOGGER

+ 76 - 47
include/IOStream.h

@@ -1,32 +1,66 @@
-
-/** @file File I/O wrappers for C++. Use interfaces instead of function
-* pointers to be sure even the silliest men on earth can work with this
+/*
+---------------------------------------------------------------------------
+Open Asset Import Library (ASSIMP)
+---------------------------------------------------------------------------
+
+Copyright (c) 2006-2008, ASSIMP Development 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 Development 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 File I/O wrappers for C++. 
 */
 */
 
 
 #ifndef AI_IOSTREAM_H_INC
 #ifndef AI_IOSTREAM_H_INC
 #define AI_IOSTREAM_H_INC
 #define AI_IOSTREAM_H_INC
 
 
-#include <string>
-#include <stddef.h>
-
 #include "aiTypes.h"
 #include "aiTypes.h"
-#include "aiFileIO.h"
 
 
 #ifndef __cplusplus
 #ifndef __cplusplus
-#error This header requires C++ to be used.
+#	error This header requires C++ to be used. aiFileIO.h is the \
+	corresponding C interface.
 #endif
 #endif
 
 
-namespace Assimp
-{
+namespace Assimp	{
 
 
-// ---------------------------------------------------------------------------
-/** Class to handle file I/O for C++
-*
-* Derive an own implementation from this interface to provide custom IO handling
-* to the Importer. If you implement this interface, be sure to also provide an
-* implementation for IOSystem that creates instances of your custom IO class.
+// ----------------------------------------------------------------------------------
+/** @class IOStream
+ *  @brief Class to handle file I/O for C++
+ *
+ *  Derive an own implementation from this interface to provide custom IO handling
+ *  to the Importer. If you implement this interface, be sure to also provide an
+ *  implementation for IOSystem that creates instances of your custom IO class.
 */
 */
-// ---------------------------------------------------------------------------
 class ASSIMP_API IOStream 
 class ASSIMP_API IOStream 
 {
 {
 protected:
 protected:
@@ -35,78 +69,73 @@ protected:
 
 
 public:
 public:
 	// -------------------------------------------------------------------
 	// -------------------------------------------------------------------
-	/** Destructor. Deleting the object closes the underlying file, 
+	/** @brief Destructor. Deleting the object closes the underlying file, 
 	 * alternatively you may use IOSystem::Close() to release the file. 
 	 * alternatively you may use IOSystem::Close() to release the file. 
 	 */
 	 */
-	virtual ~IOStream(void);
+	virtual ~IOStream();
 
 
 	// -------------------------------------------------------------------
 	// -------------------------------------------------------------------
-	/** Read from the file
+	/** @brief Read from the file
 	*
 	*
 	* See fread() for more details
 	* See fread() for more details
 	* This fails for write-only files
 	* This fails for write-only files
 	*/
 	*/
-	// -------------------------------------------------------------------
-    virtual size_t Read(
-		void* pvBuffer, 
+    virtual size_t Read(void* pvBuffer, 
 		size_t pSize, 
 		size_t pSize, 
 		size_t pCount) = 0;
 		size_t pCount) = 0;
 
 
-
 	// -------------------------------------------------------------------
 	// -------------------------------------------------------------------
-	/** Write to the file
+	/** @brief Write to the file
 	*
 	*
 	* See fwrite() for more details
 	* See fwrite() for more details
 	* This fails for read-only files
 	* This fails for read-only files
 	*/
 	*/
-	// -------------------------------------------------------------------
-    virtual size_t Write(
-		const void* pvBuffer, 
+    virtual size_t Write(const void* pvBuffer, 
 		size_t pSize,
 		size_t pSize,
 		size_t pCount) = 0;
 		size_t pCount) = 0;
 
 
-
 	// -------------------------------------------------------------------
 	// -------------------------------------------------------------------
-	/** Set the read/write cursor of the file
+	/** @brief Set the read/write cursor of the file
 	*
 	*
 	* See fseek() for more details
 	* See fseek() for more details
 	*/
 	*/
-	// -------------------------------------------------------------------
-	virtual aiReturn Seek(
-		size_t pOffset,
+	virtual aiReturn Seek(size_t pOffset,
 		aiOrigin pOrigin) = 0;
 		aiOrigin pOrigin) = 0;
 
 
-
 	// -------------------------------------------------------------------
 	// -------------------------------------------------------------------
-	/** Get the current position of the read/write cursor
+	/** @brief Get the current position of the read/write cursor
 	*
 	*
 	* See ftell() for more details
 	* See ftell() for more details
 	*/
 	*/
-	// -------------------------------------------------------------------
-    virtual size_t Tell(void) const = 0;
-
+    virtual size_t Tell() const = 0;
 
 
 	// -------------------------------------------------------------------
 	// -------------------------------------------------------------------
-	/**	Returns filesize
+	/**	@brief Returns filesize
 	*
 	*
-	*	Returns the filesize
+	*	Returns the filesize.
 	*/
 	*/
+	virtual size_t FileSize() const = 0;
+
 	// -------------------------------------------------------------------
 	// -------------------------------------------------------------------
-	virtual size_t	FileSize() const = 0;
-};
-// ----------------------------------------------------------------------------
+	/**	@brief Flush the contents of the file buffer (for writers)
+	*
+	*	See fflush() for more details.
+	*/
+	virtual void Flush() = 0;
+}; //! class IOStream
+
+// ----------------------------------------------------------------------------------
 inline IOStream::IOStream()
 inline IOStream::IOStream()
 {
 {
 	// empty
 	// empty
 }
 }
 
 
-// ----------------------------------------------------------------------------
+// ----------------------------------------------------------------------------------
 inline IOStream::~IOStream()
 inline IOStream::~IOStream()
 {
 {
 	// empty
 	// empty
 }
 }
-// ----------------------------------------------------------------------------
-
-} //!ns Assimp
+// ----------------------------------------------------------------------------------
+} //!namespace Assimp
 
 
 #endif //!!AI_IOSTREAM_H_INC
 #endif //!!AI_IOSTREAM_H_INC

+ 64 - 19
include/IOSystem.h

@@ -1,25 +1,65 @@
-/** @file Filesystem wrapper for C++. Inherit this class to supply custom file handling
- * logic to the Import library.
+/*
+---------------------------------------------------------------------------
+Open Asset Import Library (ASSIMP)
+---------------------------------------------------------------------------
+
+Copyright (c) 2006-2008, ASSIMP Development 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 Development 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 Filesystem wrapper for C++. Inherit this class to supply
+ *  custom file handling logic to the Import library.
 */
 */
 
 
 #ifndef AI_IOSYSTEM_H_INC
 #ifndef AI_IOSYSTEM_H_INC
 #define AI_IOSYSTEM_H_INC
 #define AI_IOSYSTEM_H_INC
 
 
 #ifndef __cplusplus
 #ifndef __cplusplus
-#error This header requires C++ to be used.
+#	error This header requires C++ to be used. aiFileIO.h is the \
+	corresponding C interface.
 #endif
 #endif
 
 
-#include <string>
 
 
-#include "aiDefines.h"
-
-namespace Assimp
-{
+#include "aiTypes.h"
+namespace Assimp	{
 
 
 class IOStream;
 class IOStream;
 
 
 // ---------------------------------------------------------------------------
 // ---------------------------------------------------------------------------
-/** Interface to the file system.
+/** @class IOSystem
+*   @brief Interface to the file system.
 *
 *
 * Derive an own implementation from this interface to supply custom file handling
 * Derive an own implementation from this interface to supply custom file handling
 * to the importer library. If you implement this interface, you also want to
 * to the importer library. If you implement this interface, you also want to
@@ -28,8 +68,8 @@ class IOStream;
 class ASSIMP_API IOSystem
 class ASSIMP_API IOSystem
 {
 {
 public:
 public:
-	/** Constructor. Create an instance of your derived class and assign it to 
-	 * the #Importer instance by calling Importer::SetIOHandler().
+	/** @brief Constructor. Create an instance of your derived class and
+	 * assign it to a #Importer instance by calling Importer::SetIOHandler().
 	 */
 	 */
 	IOSystem();
 	IOSystem();
 
 
@@ -37,7 +77,7 @@ public:
 	virtual ~IOSystem();
 	virtual ~IOSystem();
 
 
 	// -------------------------------------------------------------------
 	// -------------------------------------------------------------------
-	/** Tests for the existence of a file at the given path. 
+	/** @brief Tests for the existence of a file at the given path. 
 	*
 	*
 	* @param pFile Path to the file
 	* @param pFile Path to the file
 	* @return true if there is a file with this path, else false.
 	* @return true if there is a file with this path, else false.
@@ -45,14 +85,16 @@ public:
 	virtual bool Exists( const std::string& pFile) const = 0;
 	virtual bool Exists( const std::string& pFile) const = 0;
 
 
 	// -------------------------------------------------------------------
 	// -------------------------------------------------------------------
-	/**	Returns the system specific directory separator
+	/**	@brief Returns the system specific directory separator
 	*	@return	System specific directory separator
 	*	@return	System specific directory separator
 	*/
 	*/
 	virtual std::string getOsSeparator() const = 0;
 	virtual std::string getOsSeparator() const = 0;
 
 
 	// -------------------------------------------------------------------
 	// -------------------------------------------------------------------
-	/** Open a new file with a given path. When the access to the file
-	* is finished, call Close() to release all associated resources.
+	/** @brief Open a new file with a given path.
+	*
+	*  When the access to the file is finished, call Close() to release
+	*  all associated resources.
 	*
 	*
 	* @param pFile Path to the file
 	* @param pFile Path to the file
 	* @param pMode Desired file I/O mode. Required are: "wb", "w", "wt",
 	* @param pMode Desired file I/O mode. Required are: "wb", "w", "wt",
@@ -68,17 +110,20 @@ public:
 		const std::string& pMode = std::string("rb")) = 0;
 		const std::string& pMode = std::string("rb")) = 0;
 
 
 	// -------------------------------------------------------------------
 	// -------------------------------------------------------------------
-	/** Closes the given file and releases all resources associated with it.
-	 * @param pFile The file instance previously created by Open().
+	/** @brief Closes the given file and releases all resources associated with it.
+	 *  @param pFile The file instance previously created by Open().
 	 */
 	 */
 	virtual void Close( IOStream* pFile) = 0;
 	virtual void Close( IOStream* pFile) = 0;
 
 
 
 
 	// -------------------------------------------------------------------
 	// -------------------------------------------------------------------
-	/** Compares two paths and check whether the point to identical files.
+	/** @brief Compares two paths and check whether the point to
+	 *         identical files.
 	 *  
 	 *  
 	 * The dummy implementation of this virtual performs a 
 	 * The dummy implementation of this virtual performs a 
-	 * case-insensitive comparison of the absolute path strings.
+	 * case-insensitive comparison of the given strings. The default IO
+	 * system implementation uses OS mechanisms to convert relative into
+	 * absolute paths, so the result can be trusted.
 	 * @param one First file
 	 * @param one First file
 	 * @param second Second file
 	 * @param second Second file
 	 * @return true if the paths point to the same file. The file needn't
 	 * @return true if the paths point to the same file. The file needn't

+ 91 - 11
include/LogStream.h

@@ -1,15 +1,83 @@
-#ifndef AI_LOGSTREAM_H_INC
-#define AI_LOGSTREAM_H_INC
+/*
+Open Asset Import Library (ASSIMP)
+----------------------------------------------------------------------
 
 
-#include <string>
+Copyright (c) 2006-2008, ASSIMP Development Team
+All rights reserved.
 
 
-namespace Assimp
+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 Development 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 Abstract base class 'LogStream', representing an output log stream.
+ */
+
+#ifndef INCLUDED_AI_LOGSTREAM_H
+#define INCLUDED_AI_LOGSTREAM_H
+
+#include "aiTypes.h"
+
+namespace Assimp	{
+class IOSystem;
+
+// ------------------------------------------------------------------------------------
+/** @enum  DefaultLogStreams
+ *  @brief Enumerates default log streams supported by DefaultLogger
+ *
+ *  These streams can be allocated using LogStream::createDefaultStream.
+ */
+enum DefaultLogStreams	
 {
 {
-// ---------------------------------------------------------------------------
+	// Stream the log to a file
+	DLS_FILE = 0x1,
+
+	// Stream the log to std::cout
+	DLS_COUT = 0x2,
+
+	// Stream the log to std::cerr
+	DLS_CERR = 0x4,
+
+	// MSVC only: Stream the log the the debugger
+	DLS_DEBUGGER = 0x8
+};
+
+// ------------------------------------------------------------------------------------
 /**	@class	LogStream
 /**	@class	LogStream
  *	@brief	Abstract interface for log stream implementations.
  *	@brief	Abstract interface for log stream implementations.
+ *
+ *  Several default implementations are provided, see DefaultLogStreams for more
+ *  details. In most cases it shouldn't be necessary to write a custom log stream.
  */
  */
-class ASSIMP_API LogStream
+class ASSIMP_API LogStream : public Intern::AllocateFromAssimpHeap
 {
 {
 protected:
 protected:
 	/**	@brief	Default constructor	*/
 	/**	@brief	Default constructor	*/
@@ -19,26 +87,38 @@ public:
 	/**	@brief	Virtual destructor	*/
 	/**	@brief	Virtual destructor	*/
 	virtual ~LogStream();
 	virtual ~LogStream();
 
 
-	/**	@brief	Overwrite this for your own output methods	*/
+	/**	@brief	Overwrite this for your own output methods
+	 *  @param  message Message to be written
+  	 */
 	virtual void write(const std::string &message) = 0;
 	virtual void write(const std::string &message) = 0;
+
+	/** @brief Creates a default log stream
+	 *  @param streams Type of the default stream
+	 *  @param name For DLS_FILE: name of the output file
+	 *  @param  io  For DLS_FILE: IOSystem to be used to open the output file.
+	 *              Pass NULL for the default implementation.
+	 *  @return New LogStream instance - you're resposible for it's destruction!
+	 */
+	static LogStream* createDefaultStream(DefaultLogStreams	streams,
+		const std::string& name = "AssimpLog.txt",
+		IOSystem* io			= NULL);
 };
 };
 
 
-// ---------------------------------------------------------------------------
+// ------------------------------------------------------------------------------------
 //	Default constructor
 //	Default constructor
 inline LogStream::LogStream()
 inline LogStream::LogStream()
 {
 {
 	// empty
 	// empty
 }
 }
 
 
-// ---------------------------------------------------------------------------
+// ------------------------------------------------------------------------------------
 //	Virtual destructor
 //	Virtual destructor
 inline LogStream::~LogStream()
 inline LogStream::~LogStream()
 {
 {
 	// empty
 	// empty
 }
 }
 
 
-// ---------------------------------------------------------------------------
-
+// ------------------------------------------------------------------------------------
 } // Namespace Assimp
 } // Namespace Assimp
 
 
 #endif
 #endif

+ 45 - 21
include/Logger.h

@@ -38,35 +38,43 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
 */
 */
 
 
-#ifndef AI_LOGGER_H_INC
-#define AI_LOGGER_H_INC
+/** @file Abstract base class 'Logger', base of the logging system. 
+ */
 
 
-#include <string>
-#include "aiDefines.h"
+#ifndef INCLUDED_AI_LOGGER_H
+#define INCLUDED_AI_LOGGER_H
 
 
-namespace Assimp
-{
+#include "aiTypes.h"
+namespace Assimp	{
 
 
 class LogStream;
 class LogStream;
 
 
-// ---------------------------------------------------------------------------
+// ----------------------------------------------------------------------------------
 /**	@class	Logger
 /**	@class	Logger
  *	@brief	Abstract interface for logger implementations.
  *	@brief	Abstract interface for logger implementations.
+ *  Assimp provides a default implementation ('DefaultLogger').
  */
  */
-class ASSIMP_API Logger
+class ASSIMP_API Logger : public Intern::AllocateFromAssimpHeap
 {
 {
 public:
 public:
 	/**	@enum	LogSeverity
 	/**	@enum	LogSeverity
-	 *	@brief	Log severity to descripe granuality of logging.
+	 *	@brief	Log severity to descripe the granularity of logging.
+	 *
+	 *  This is a general property of a Logger instance, NORMAL means
+	 *  that debug messages are rejected immediately.
 	 */
 	 */
 	enum LogSeverity
 	enum LogSeverity
 	{
 	{
-		NORMAL,		//!< Normal granlality of logging
+		NORMAL,		//!< Normal granularity of logging
 		VERBOSE		//!< Debug infos will be logged, too
 		VERBOSE		//!< Debug infos will be logged, too
 	};
 	};
 
 
 	/**	@enum	ErrorSeverity
 	/**	@enum	ErrorSeverity
-	 *	@brief	Description for severity of a log message
+	 *	@brief	Description for severity of a log message.
+	 *
+	 *  Every LogStream has a bitwide combination of these flags.
+	 *  A LogStream doesn't receive any messages of a specific type
+	 *  if it doesn't specify the corresponding ErrorSeverity flag.
 	 */
 	 */
 	enum ErrorSeverity
 	enum ErrorSeverity
 	{
 	{
@@ -106,34 +114,50 @@ public:
 	virtual void setLogSeverity(LogSeverity log_severity) = 0;
 	virtual void setLogSeverity(LogSeverity log_severity) = 0;
 
 
 	/**	@brief	Attach a new logstream
 	/**	@brief	Attach a new logstream
-	 *	@param	pStream		Logstream to attach
+	 *
+	 *  The logger takes ownership of the stream and is resposible
+	 *  for its destruction (which is done when the logger itself 
+	 *  is destroyed). Call detachStream to detach a stream and to
+	 *  gain ownership of it again.
+	 *	@param	pStream	 Logstream to attach
+	 *  @param severity  Message filter, specified which types of log
+	 *    messages are dispatched to the stream. Provide a bitwise
+	 *    combination of the ErrorSeverity flags.
 	 */
 	 */
-	virtual void attachStream(LogStream *pStream, unsigned int severity) = 0;
-
-	/**	@brief	Detach a still attached stream from logger
-	 *	@param	pStream		Logstream instance for detatching
+	virtual void attachStream(LogStream *pStream, 
+		unsigned int severity = DEBUGGING | ERR | WARN | INFO) = 0;
+
+	/**	@brief	Detach a still attached stream from the logger (or 
+	 *          modifiy the filter flags bits)
+	 *	@param	pStream	Logstream instance for detatching
+	 *  @param severity Provide a bitwise combination of the ErrorSeverity
+	 *    flags. This value is &~ed with the current flags of the stream,
+	 *    if the result is 0 the stream is detached from the Logger and
+	 *    the caller retakes the possession of the stream.
 	 */
 	 */
-	virtual void detatchStream(LogStream *pStream, unsigned int severity) = 0;
+	virtual void detatchStream(LogStream *pStream, 
+		unsigned int severity = DEBUGGING | ERR | WARN | INFO) = 0;
 
 
 protected:
 protected:
 	/**	@brief	Default constructor	*/
 	/**	@brief	Default constructor	*/
 	Logger();
 	Logger();
 };
 };
-// ---------------------------------------------------------------------------
+
+// ----------------------------------------------------------------------------------
 //	Default constructor
 //	Default constructor
 inline Logger::Logger()
 inline Logger::Logger()
 {
 {
 	//	empty
 	//	empty
 }
 }
 
 
-// ---------------------------------------------------------------------------
+// ----------------------------------------------------------------------------------
 //	Virtual destructor
 //	Virtual destructor
 inline  Logger::~Logger()
 inline  Logger::~Logger()
 {
 {
 	// empty
 	// empty
 }
 }
-// ---------------------------------------------------------------------------
+// ----------------------------------------------------------------------------------
 
 
 } // Namespace Assimp
 } // Namespace Assimp
 
 
-#endif
+#endif // !! INCLUDED_AI_LOGGER_H

+ 6 - 6
include/aiAnim.h

@@ -124,7 +124,7 @@ enum aiAnimBehaviour
 	 */
 	 */
 	aiAnimBehaviour_DEFAULT  = 0x0,  
 	aiAnimBehaviour_DEFAULT  = 0x0,  
 
 
-	/** The nearest key is used
+	/** The nearest key value is used without interpolation
 	 */
 	 */
 	aiAnimBehaviour_CONSTANT = 0x1,
 	aiAnimBehaviour_CONSTANT = 0x1,
 
 
@@ -208,17 +208,17 @@ struct aiNodeAnim
 	 *  key is encountered.
 	 *  key is encountered.
 	 *
 	 *
 	 *  The default value is aiAnimBehaviour_DEFAULT (the original
 	 *  The default value is aiAnimBehaviour_DEFAULT (the original
-	 *  transformation matrix of the affacted node is taken).
+	 *  transformation matrix of the affected node is used).
 	 */
 	 */
-	aiAnimBehaviour mPreState;
+	C_ENUM aiAnimBehaviour mPreState;
 
 
 	/** Defines how the animation behaves after the last 
 	/** Defines how the animation behaves after the last 
-	 *  kway was encountered.
+	 *  kway was processed.
 	 *
 	 *
 	 *  The default value is aiAnimBehaviour_DEFAULT (the original
 	 *  The default value is aiAnimBehaviour_DEFAULT (the original
-	 *  transformation matrix of the affacted node is taken).
+	 *  transformation matrix of the affected node is taken).
 	 */
 	 */
-	aiAnimBehaviour mPostState;
+	C_ENUM aiAnimBehaviour mPostState;
 
 
 #ifdef __cplusplus
 #ifdef __cplusplus
 	aiNodeAnim()
 	aiNodeAnim()

+ 5 - 6
include/aiCamera.h

@@ -71,14 +71,14 @@ struct aiCamera
 	 *  This node specifies the position of the camera in the scene
 	 *  This node specifies the position of the camera in the scene
 	 *  hierarchy and can be animated.
 	 *  hierarchy and can be animated.
 	 */
 	 */
-	aiString mName;
+	C_STRUCT aiString mName;
 
 
 	/** Position of the camera relative to the coordinate space
 	/** Position of the camera relative to the coordinate space
 	 *  defined by the corresponding node.
 	 *  defined by the corresponding node.
 	 *
 	 *
 	 *  The default value is 0|0|0.
 	 *  The default value is 0|0|0.
 	 */
 	 */
-	aiVector3D mPosition;
+	C_STRUCT aiVector3D mPosition;
 
 
 
 
 	/** 'Up' - vector of the camera coordinate system relative to
 	/** 'Up' - vector of the camera coordinate system relative to
@@ -89,7 +89,7 @@ struct aiCamera
 	 *  The default value is 0|1|0. The vector
 	 *  The default value is 0|1|0. The vector
 	 *  may be normalized, but it needn't.
 	 *  may be normalized, but it needn't.
 	 */
 	 */
-	aiVector3D mUp;
+	C_STRUCT aiVector3D mUp;
 
 
 
 
 	/** 'LookAt' - vector of the camera coordinate system relative to
 	/** 'LookAt' - vector of the camera coordinate system relative to
@@ -99,7 +99,7 @@ struct aiCamera
 	 *  The default value is 0|0|1. The vector
 	 *  The default value is 0|0|1. The vector
 	 *  may be normalized, but it needn't.
 	 *  may be normalized, but it needn't.
 	 */
 	 */
-	aiVector3D mLookAt;
+	C_STRUCT aiVector3D mLookAt;
 
 
 
 
 	/** Half horizontal field of view angle, in radians. 
 	/** Half horizontal field of view angle, in radians. 
@@ -146,8 +146,7 @@ struct aiCamera
 		, mClipPlaneNear	(0.1f)
 		, mClipPlaneNear	(0.1f)
 		, mClipPlaneFar		(1000.f)
 		, mClipPlaneFar		(1000.f)
 		, mAspect			(0.f)
 		, mAspect			(0.f)
-	{
-	}
+	{}
 
 
 #endif
 #endif
 };
 };

+ 82 - 57
include/aiDefines.h

@@ -39,28 +39,26 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 ---------------------------------------------------------------------------
 ---------------------------------------------------------------------------
 */
 */
 
 
-/** Assimo build configuration setup. See the notes in the comment
- *  blocks to find out how you can customize the Assimp build
+/** Assimp build configuration setup. See the notes in the comment
+ *  blocks to find out how you can customize your Assimp build.
  */
  */
 
 
-#ifndef AI_DEFINES_H_INC
-#define AI_DEFINES_H_INC
+#ifndef INCLUDED_AI_DEFINES_H
+#define INCLUDED_AI_DEFINES_H
 
 
-
-	// ************************************************************
+	// ================================================================
 	// Define ASSIMP_BUILD_NO_XX_IMPORTER to disable a specific
 	// Define ASSIMP_BUILD_NO_XX_IMPORTER to disable a specific
 	// file format loader. The loader is be excluded from the
 	// file format loader. The loader is be excluded from the
 	// build in this case. 'XX' stands for the most common file
 	// build in this case. 'XX' stands for the most common file
 	// extension of the file format. E.g.: 
 	// extension of the file format. E.g.: 
     // ASSIMP_BUILD_NO_X_IMPORTER disables the X loader.
     // ASSIMP_BUILD_NO_X_IMPORTER disables the X loader.
-	// ************************************************************
+	// ================================================================
 
 
-	// ************************************************************
+	// ================================================================
 	// Define ASSIMP_BUILD_NO_XX_PROCESS to disable a specific
 	// Define ASSIMP_BUILD_NO_XX_PROCESS to disable a specific
 	// post-processing step. The spe will be excluded from the
 	// post-processing step. The spe will be excluded from the
 	// build in this case. 'XX' stands for the name of the loader.
 	// build in this case. 'XX' stands for the name of the loader.
-	// Name list:
-	//
+	// List of defines:
 	// CALCTANGENTS
 	// CALCTANGENTS
 	// JOINVERTICES
 	// JOINVERTICES
 	// CONVERTTOLH
 	// CONVERTTOLH
@@ -80,59 +78,59 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 	// FINDINVALIDDATA
 	// FINDINVALIDDATA
 	// TRANSFORMTEXCOORDS
 	// TRANSFORMTEXCOORDS
 	// GENUVCOORDS
 	// GENUVCOORDS
-	// ************************************************************
+	// ================================================================
 
 
+// Compiler specific includes and definitions
+#if (defined _MSC_VER)
+#	undef ASSIMP_API
 
 
-	// ************************************************************
-	// Define AI_C_THREADSAFE if you want a thread-safe C-API
-	// This feature requires boost.
-	// ************************************************************
+	// Include our workaround stdint.h - VC doesn't have one
+#	include "./../include/Compiler/pstdint.h"
 
 
+	// If we have at least VC8 some C string manipulation functions
+	// are mapped to their safe _s counterparts (e.g. _itoa_s).
+#if _MSC_VER >= 1400 && !(defined _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES) \
+	&& (defined ASSIMP_INTERNAL_BUILD)
 
 
-// compiler specific includes and definitions
-#if (defined _MSC_VER)
-
-#	undef ASSIMP_API
+#	define _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES 1
+#endif
 
 
-	
-	// ************************************************************
+	// ================================================================
 	// Define ASSIMP_BUILD_DLL_EXPORT to build a DLL of the library
 	// Define ASSIMP_BUILD_DLL_EXPORT to build a DLL of the library
-	// ************************************************************
+	// ================================================================
 #	if (defined ASSIMP_BUILD_DLL_EXPORT)
 #	if (defined ASSIMP_BUILD_DLL_EXPORT)
-
-#		if (defined ASSIMP_API)
-#			error ASSIMP_API is defined, although it shouldn't
-#		endif
-
 #		define ASSIMP_API __declspec(dllexport)
 #		define ASSIMP_API __declspec(dllexport)
 #		pragma warning (disable : 4251)
 #		pragma warning (disable : 4251)
 
 
-	// ************************************************************
+	// ================================================================
 	// Define ASSIMP_DLL before including Assimp to use ASSIMP in
 	// Define ASSIMP_DLL before including Assimp to use ASSIMP in
 	// an external DLL (otherwise a static library is used)
 	// an external DLL (otherwise a static library is used)
-	// ************************************************************
+	// ================================================================
 #	elif (defined ASSIMP_DLL)
 #	elif (defined ASSIMP_DLL)
 #		define ASSIMP_API __declspec(dllimport)
 #		define ASSIMP_API __declspec(dllimport)
 #	else
 #	else
 #		define ASSIMP_API 
 #		define ASSIMP_API 
 #	endif
 #	endif
 
 
+	// Force the compiler to inline a function, if supported
 #	define AI_FORCE_INLINE __forceinline
 #	define AI_FORCE_INLINE __forceinline
 
 
-
 #else
 #else
 #	define ASSIMP_API
 #	define ASSIMP_API
 #	define AI_FORCE_INLINE inline
 #	define AI_FORCE_INLINE inline
 #endif // (defined _MSC_VER)
 #endif // (defined _MSC_VER)
 
 
 #ifdef __cplusplus
 #ifdef __cplusplus
+	// No explicit 'struct' and 'enum' tags for C++, we don't want to 
+	// confuse the AI of our IDE.
 #	define C_STRUCT
 #	define C_STRUCT
+#	define C_ENUM
 #else
 #else
-	// ************************************************************
+	// ================================================================
 	// To build the documentation, make sure ASSIMP_DOXYGEN_BUILD
 	// To build the documentation, make sure ASSIMP_DOXYGEN_BUILD
 	// is defined by Doxygen's preprocessor. The corresponding
 	// is defined by Doxygen's preprocessor. The corresponding
 	// entries in the DoxyFile look like this:
 	// entries in the DoxyFile look like this:
-	// ************************************************************
+	// ================================================================
 #if 0
 #if 0
 	ENABLE_PREPROCESSING   = YES
 	ENABLE_PREPROCESSING   = YES
 	MACRO_EXPANSION        = YES
 	MACRO_EXPANSION        = YES
@@ -141,59 +139,86 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 	INCLUDE_PATH           = 
 	INCLUDE_PATH           = 
 	INCLUDE_FILE_PATTERNS  = 
 	INCLUDE_FILE_PATTERNS  = 
 	PREDEFINED             = ASSIMP_DOXYGEN_BUILD=1
 	PREDEFINED             = ASSIMP_DOXYGEN_BUILD=1
-	EXPAND_AS_DEFINED      = C_STRUCT
+	EXPAND_AS_DEFINED      = C_STRUCT C_ENUM
 	SKIP_FUNCTION_MACROS   = YES
 	SKIP_FUNCTION_MACROS   = YES
 #endif
 #endif
-	// ************************************************************
+	// ================================================================
+	// Doxygen gets confused if we use c-struct typedefs to avoid
+	// the explicit 'struct' notation. This trick here has the same
+	// effect as the TYPEDEF_HIDES_STRUCT option, but we don't need
+	// to typedef all structs/enums.
+	// ================================================================
 #	if (defined ASSIMP_DOXYGEN_BUILD)
 #	if (defined ASSIMP_DOXYGEN_BUILD)
-#		define C_STRUCT
+#		define C_STRUCT 
+#		define C_ENUM   
 #	else
 #	else
 #		define C_STRUCT struct
 #		define C_STRUCT struct
+#		define C_ENUM   enum
 #	endif
 #	endif
 #endif
 #endif
 
 
 #if (defined(__BORLANDC__) || defined (__BCPLUSPLUS__))
 #if (defined(__BORLANDC__) || defined (__BCPLUSPLUS__))
 
 
 // "W8059 Packgröße der Struktur geändert"
 // "W8059 Packgröße der Struktur geändert"
-// TODO: find a way to deactivate this warning automatically
-// maybe there is a pragma to do exactly this?
 
 
 #endif
 #endif
 
 
-// include our workaround stdint.h from the C98 standard to make
-// sure the types it declares are consistently available 
-#include "./../include/Compiler/pstdint.h"
-
-	// ************************************************************
+	// ================================================================
 	// Define ASSIMP_BUILD_BOOST_WORKAROUND to compile assimp
 	// Define ASSIMP_BUILD_BOOST_WORKAROUND to compile assimp
 	// without boost. This is done by using a few workaround
 	// without boost. This is done by using a few workaround
 	// classes. However, some assimp features are not available
 	// classes. However, some assimp features are not available
-	// in this case. 
-	// ************************************************************
+	// in this case. This implies the ASSIMP_BUILD_SINGLETHREADED option.
+	// ================================================================
 #ifdef ASSIMP_BUILD_BOOST_WORKAROUND
 #ifdef ASSIMP_BUILD_BOOST_WORKAROUND
 
 
-	// threading support in the C-API requires boost
-#	ifdef AI_C_THREADSAFE
-#		error Unable to activate C-API threading support. Boost is required for this.
-#	endif
+	// threading support requires boost
+#ifndef ASSIMP_BUILD_SINGLETHREADED
+#	define ASSIMP_BUILD_SINGLETHREADED
+#endif
 
 
 #endif
 #endif
 
 
-// helper macro that sets a pointer to NULL in debug builds
-#if (!defined AI_DEBUG_INVALIDATE_PTR)
-#	if (defined _DEBUG)
-#		define AI_DEBUG_INVALIDATE_PTR(x) x = NULL;
-#	else
-#		define AI_DEBUG_INVALIDATE_PTR(x)
-#	endif
-#endif 
+	// ================================================================
+	// Define ASSIMP_BUILD_SINGLETHREADED to compile assimp
+	// without threading support. The library doesn't utilize
+	// threads then, and is itself not threadsafe.
+	// If this flag is specified, boost::threads is *not* required.
+	// ================================================================
+
+	// TODO
+#ifndef ASSIMP_BUILD_SINGLETHREADED
+#	define ASSIMP_BUILD_SINGLETHREADED
+#endif
+
+#ifndef ASSIMP_BUILD_SINGLETHREADED
+#	define AI_C_THREADSAFE
+#endif // !! ASSIMP_BUILD_SINGLETHREADED
+
+// Make sure NULL is defined
+#ifndef NULL
+#	define NULL 0
+#endif
+
+// Undefine the min/max macros defined by some platform headers
+#undef min
+#undef max
+
+// Concatenate two tokens after evaluating them
+#define AI_CONCAT(a,b) a ## b
+
+// Helper macro that sets a pointer to NULL in debug builds
+#if (defined _DEBUG)
+#	define AI_DEBUG_INVALIDATE_PTR(x) x = NULL;
+#else
+#	define AI_DEBUG_INVALIDATE_PTR(x)
+#endif
 
 
 // Use our own definition of PI here
 // Use our own definition of PI here
 #define AI_MATH_PI		(3.1415926538)
 #define AI_MATH_PI		(3.1415926538)
 #define AI_MATH_TWO_PI	(AI_MATH_PI * 2.0)
 #define AI_MATH_TWO_PI	(AI_MATH_PI * 2.0)
 #define AI_MATH_HALF_PI	(AI_MATH_PI * 0.5)
 #define AI_MATH_HALF_PI	(AI_MATH_PI * 0.5)
 
 
-// macrod to convert from radians to degrees and the reverse
+// Tiny macro to convert from radians to degrees and the reverse
 #define AI_DEG_TO_RAD(x) (x*0.0174532925f)
 #define AI_DEG_TO_RAD(x) (x*0.0174532925f)
 #define AI_RAD_TO_DEG(x) (x*57.2957795f)
 #define AI_RAD_TO_DEG(x) (x*57.2957795f)
 
 

+ 32 - 28
include/aiFileIO.h

@@ -51,35 +51,31 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 extern "C" {
 extern "C" {
 #endif
 #endif
 
 
-
 struct aiFileIO;
 struct aiFileIO;
 struct aiFile;
 struct aiFile;
 
 
-typedef aiFile* (*aiFileOpenProc)(C_STRUCT aiFileIO*, const char*, const char*);
-typedef void (*aiFileCloseProc)(C_STRUCT aiFileIO*, C_STRUCT aiFile*);
-typedef size_t (*aiFileWriteProc)(C_STRUCT aiFile*, const char*, size_t, size_t);
-typedef size_t (*aiFileReadProc)(C_STRUCT aiFile*, char*, size_t,size_t);
-typedef size_t (*aiFileTellProc)(C_STRUCT aiFile*);
+// aiFile callbacks
+typedef size_t   (*aiFileWriteProc) (C_STRUCT aiFile*,   const char*, size_t, size_t);
+typedef size_t   (*aiFileReadProc)  (C_STRUCT aiFile*,   char*, size_t,size_t);
+typedef size_t   (*aiFileTellProc)  (C_STRUCT aiFile*);
+typedef void     (*aiFileFlushProc) (C_STRUCT aiFile*);
+typedef aiReturn (*aiFileSeek)(aiFile*, size_t, aiOrigin);
 
 
-// ---------------------------------------------------------------------------
-/** Define seek origins in fseek()-style.
-*/
-// ---------------------------------------------------------------------------
-enum aiOrigin
-{
-	aiOrigin_SET = 0x0,		//!< Set position
-	aiOrigin_CUR = 0x1,		//!< Current position
-	aiOrigin_END = 0x2		//!< End of file
-};
+// aiFileIO callbackss
+typedef aiFile* (*aiFileOpenProc)  (C_STRUCT aiFileIO*, const char*, const char*);
+typedef void    (*aiFileCloseProc) (C_STRUCT aiFileIO*, C_STRUCT aiFile*);
 
 
-typedef aiReturn (*aiFileSeek)(aiFile*, size_t, aiOrigin);
+// represents user-defined data
 typedef char* aiUserData;
 typedef char* aiUserData;
 
 
-// ---------------------------------------------------------------------------
-/** Defines how C-Assimp accesses files. Provided are functions to open
- *  and close files.
+// ----------------------------------------------------------------------------------
+/** @class aiFileIO
+ *  @brief Defines Assimp's way of accessing files.
+ *
+ *  Provided are functions to open and close files. Supply a custom structure to
+ *  the import function. If you don't, a default implementation is used. Use this
+ *  to enable reading from other sources, such as ZIPs or memory locations.
 */
 */
-// ---------------------------------------------------------------------------
 struct aiFileIO
 struct aiFileIO
 {
 {
 	//! Function used to open a new file
 	//! Function used to open a new file
@@ -92,13 +88,18 @@ struct aiFileIO
 	aiUserData UserData;
 	aiUserData UserData;
 };
 };
 
 
-// ---------------------------------------------------------------------------
-/** Data structure to wrap a set of fXXXX (e.g fopen) replacement functions
-*
-* The functions behave the same way as their appropriate fXXXX 
-* counterparts in the CRT.
-*/
-// ---------------------------------------------------------------------------
+// ----------------------------------------------------------------------------------
+/** @class aiFile
+ *  @brief Represents a read/write file
+ *
+ *  Actually, it is a data structure to wrap a set of fXXXX (e.g fopen) 
+ *  replacement functions
+ *
+ *  The default implementation of the functions utilizes the fXXX functions from 
+ *  the CRT. However, you can supply a custom implementation to Assimp by
+ *  also supplying a custom aiFileIO. Use this to enable reading from other sources, 
+ *  such as ZIPs or memory locations.
+ */
 struct aiFile
 struct aiFile
 {
 {
 	//! Function used to read from a file
 	//! Function used to read from a file
@@ -118,6 +119,9 @@ struct aiFile
 	//! of the file cursor (fseek())
 	//! of the file cursor (fseek())
 	aiFileSeek SeekProc;
 	aiFileSeek SeekProc;
 
 
+	//! Function used to flush the file contents
+	aiFileFlushProc FlushProc;
+
 	//! User-defined data
 	//! User-defined data
 	aiUserData UserData;
 	aiUserData UserData;
 };
 };

+ 7 - 7
include/aiLight.h

@@ -102,20 +102,20 @@ struct aiLight
 	 *  This node specifies the position of the light in the scene
 	 *  This node specifies the position of the light in the scene
 	 *  hierarchy and can be animated.
 	 *  hierarchy and can be animated.
 	 */
 	 */
-	aiString mName;
+	C_STRUCT aiString mName;
 
 
 	/** The type of the light source.
 	/** The type of the light source.
  	 *
  	 *
 	 * aiLightSource_UNDEFINED is nto a valid value for this member.
 	 * aiLightSource_UNDEFINED is nto a valid value for this member.
 	 */
 	 */
-	aiLightSourceType mType;
+	C_ENUM aiLightSourceType mType;
 
 
 	/** Position of the light source in space. Relative to the
 	/** Position of the light source in space. Relative to the
 	 *  transformation of the node corresponding to the light.
 	 *  transformation of the node corresponding to the light.
 	 *
 	 *
 	 *  The position is undefined for directional lights.
 	 *  The position is undefined for directional lights.
 	 */
 	 */
-	aiVector3D mPosition;
+	C_STRUCT aiVector3D mPosition;
 
 
 	/** Direction of the light source in space. Relative to the
 	/** Direction of the light source in space. Relative to the
 	 *  transformation of the node corresponding to the light.
 	 *  transformation of the node corresponding to the light.
@@ -123,7 +123,7 @@ struct aiLight
 	 *  The direction is undefined for point lights. The vector
 	 *  The direction is undefined for point lights. The vector
 	 *  may be normalized, but it needn't.
 	 *  may be normalized, but it needn't.
 	 */
 	 */
-	aiVector3D mDirection;
+	C_STRUCT aiVector3D mDirection;
 
 
 	/** Constant light attenuation factor. 
 	/** Constant light attenuation factor. 
 	 *
 	 *
@@ -164,7 +164,7 @@ struct aiLight
 	 *  material color to obtain the final color that contributes
 	 *  material color to obtain the final color that contributes
 	 *  to the diffuse shading term.
 	 *  to the diffuse shading term.
 	 */
 	 */
-	aiColor3D mColorDiffuse;
+	C_STRUCT aiColor3D mColorDiffuse;
 
 
 	/** Specular color of the light source
 	/** Specular color of the light source
 	 *
 	 *
@@ -172,7 +172,7 @@ struct aiLight
 	 *  material color to obtain the final color that contributes
 	 *  material color to obtain the final color that contributes
 	 *  to the specular shading term.
 	 *  to the specular shading term.
 	 */
 	 */
-	aiColor3D mColorSpecular;
+	C_STRUCT aiColor3D mColorSpecular;
 
 
 	/** Ambient color of the light source
 	/** Ambient color of the light source
 	 *
 	 *
@@ -182,7 +182,7 @@ struct aiLight
 	 *  this value it, is just a remaining of the fixed-function pipeline
 	 *  this value it, is just a remaining of the fixed-function pipeline
 	 *  that is still supported by quite many file formats.
 	 *  that is still supported by quite many file formats.
 	 */
 	 */
-	aiColor3D mColorAmbient;
+	C_STRUCT aiColor3D mColorAmbient;
 
 
 	/** Inner angle of a spot light's light cone.
 	/** Inner angle of a spot light's light cone.
 	 *
 	 *

+ 159 - 121
include/aiMaterial.h

@@ -52,42 +52,68 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 extern "C" {
 extern "C" {
 #endif
 #endif
 
 
-// Default material name
+// Name for the default material
 #define AI_DEFAULT_MATERIAL_NAME "aiDefaultMat"
 #define AI_DEFAULT_MATERIAL_NAME "aiDefaultMat"
 
 
 // ---------------------------------------------------------------------------
 // ---------------------------------------------------------------------------
-/** Defines type identifiers for use within the material system.
-*
-*/
+/** @brief A very primitive RTTI system to store the data type of a 
+ *         material property.
+ */
 enum aiPropertyTypeInfo
 enum aiPropertyTypeInfo
 {
 {
-    /** Array of single-precision floats
+    /** Array of single-precision (32 Bit) floats
+	 *
+	 *  It is possibe to use aiGetMaterialInteger[Array]() (or the C++-API 
+	 *  aiMaterial::Get()) to query properties stored in floating-point format. 
+	 *  The material system performs the type conversion automatically.
     */
     */
-    aiPTI_Float = 0x1,
+    aiPTI_Float   = 0x1,
 
 
-    /** aiString data structure
+    /** The material property is an aiString.
+	 *
+	 *  Arrays of strings aren't possible, aiGetMaterialString() (or the 
+	 *  C++-API aiMaterial::Get()) *must* be used to query a string property.
     */
     */
-    aiPTI_String = 0x3,
+    aiPTI_String  = 0x3,
 
 
-    /** Array of Integers
+    /** Array of (32 Bit) integers
+	 *
+	 *  It is possibe to use aiGetMaterialFloat[Array]() (or the C++-API 
+	 *  aiMaterial::Get()) to query properties stored in integer format. 
+	 *  The material system performs the type conversion automatically.
     */
     */
     aiPTI_Integer = 0x4,
     aiPTI_Integer = 0x4,
 
 
-    /** Simple binary buffer
-    */
-    aiPTI_Buffer = 0x5,
+
+    /** Simple binary buffer, content undefined. Not convertible to anything.
+     */
+    aiPTI_Buffer  = 0x5,
 
 
 
 
 	/** This value is not used. It is just there to force the
 	/** This value is not used. It is just there to force the
 	 *  compiler to map this enum to a 32 Bit integer.
 	 *  compiler to map this enum to a 32 Bit integer.
 	 */
 	 */
 	_aiPTI_Force32Bit = 0x9fffffff
 	_aiPTI_Force32Bit = 0x9fffffff
-};
+};  //! enum aiPropertyTypeInfo
 
 
 // ---------------------------------------------------------------------------
 // ---------------------------------------------------------------------------
-/** Defines how the Nth texture is combined with all previous textures.
-*
-*/
+/** @brief Defines how the Nth texture is combined with the N-1th texture.
+ *
+ *  Example (left: key, right: value): <br>
+ *  @code
+ *  DiffColor0     - gray
+ *  DiffTextureOp0 - aiTextureOpMultiply
+ *  DiffTexture0   - tex1.png
+ *  DiffTextureOp0 - aiTextureOpAdd
+ *  DiffTexture1   - tex2.png
+ *  @endcode
+ *  Written as equation, the final diffuse term for a specific pixel would be: 
+ *  @code
+ *  diffFinal = DiffColor0 * sampleTex(DiffTexture0,UV0) + 
+ *     sampleTex(DiffTexture1,UV0) * diffContrib;
+ *  @endcode
+ *  where 'diffContrib' is the intensity of the incoming light for that pixel.
+ */
 enum aiTextureOp
 enum aiTextureOp
 {
 {
     /** T = T1 * T2
     /** T = T1 * T2
@@ -119,11 +145,12 @@ enum aiTextureOp
 	 *  compiler to map this enum to a 32 Bit integer.
 	 *  compiler to map this enum to a 32 Bit integer.
 	 */
 	 */
 	_aiTextureOp_Force32Bit = 0x9fffffff
 	_aiTextureOp_Force32Bit = 0x9fffffff
-};
+}; //! enum aiTextureOp
 
 
 // ---------------------------------------------------------------------------
 // ---------------------------------------------------------------------------
-/** Defines how UV coordinates beyond the valid range are handled.
-*/
+/** @brief Defines how UV coordinates outside the [0...1] range are handled.
+ *
+ */
 enum aiTextureMapMode
 enum aiTextureMapMode
 {
 {
     /** A texture coordinate u|v is translated to u%1|v%1 
     /** A texture coordinate u|v is translated to u%1|v%1 
@@ -146,17 +173,21 @@ enum aiTextureMapMode
     aiTextureMapMode_Mirror = 0x2,
     aiTextureMapMode_Mirror = 0x2,
 
 
 
 
-	/** This value is not used. It is just there to force the
+	/** This value is not used. It is just here to force the
 	 *  compiler to map this enum to a 32 Bit integer.
 	 *  compiler to map this enum to a 32 Bit integer.
 	 */
 	 */
 	_aiTextureMapMode_Force32Bit = 0x9fffffff
 	_aiTextureMapMode_Force32Bit = 0x9fffffff
-};
+}; //! enum aiTextureMapMode
 
 
 // ---------------------------------------------------------------------------
 // ---------------------------------------------------------------------------
-/** Defines how the mapping coords for a texture are generated.
-*
-*  See the AI_MATKEY_MAPPING property for more details
-*/
+/** @brief Defines how the mapping coords for a texture are generated.
+ *
+ *  Realtime applications typically require full UV coordinates, so the use of
+ *  the aiProcess_GenUVCoords step is highly recommended. It generates proper
+ *  UV channels for non-UV mapped objects, as long as an accurate description
+ *  how the mapping should look like (e.g spherical) is given.
+ *  See the AI_MATKEY_MAPPING property for more details.
+ */
 enum aiTextureMapping
 enum aiTextureMapping
 {
 {
     /** The mapping coordinates are taken from an UV channel.
     /** The mapping coordinates are taken from an UV channel.
@@ -187,14 +218,14 @@ enum aiTextureMapping
     aiTextureMapping_OTHER = 0x5,
     aiTextureMapping_OTHER = 0x5,
 
 
 
 
-	/** This value is not used. It is just there to force the
+	/** This value is not used. It is just here to force the
 	 *  compiler to map this enum to a 32 Bit integer.
 	 *  compiler to map this enum to a 32 Bit integer.
 	 */
 	 */
 	_aiTextureMapping_Force32Bit = 0x9fffffff
 	_aiTextureMapping_Force32Bit = 0x9fffffff
-};
+}; //! enum aiTextureMapping
 
 
 // ---------------------------------------------------------------------------
 // ---------------------------------------------------------------------------
-/** Defines which mesh axes are used to construct the projection shape
+/** @brief Defines which mesh axes are used to construct the projection shape
  *  for non-UV mappings around the model.
  *  for non-UV mappings around the model.
  *
  *
  *  This corresponds to the AI_MATKEY_TEXMAP_AXIS property.
  *  This corresponds to the AI_MATKEY_TEXMAP_AXIS property.
@@ -206,11 +237,11 @@ enum aiAxis
 	aiAxis_Z = 0x2,
 	aiAxis_Z = 0x2,
 
 
 
 
-	/** This value is not used. It is just there to force the
+	/** This value is not used. It is just here to force the
 	 *  compiler to map this enum to a 32 Bit integer.
 	 *  compiler to map this enum to a 32 Bit integer.
 	 */
 	 */
 	_aiAxis_Force32Bit = 0x9fffffff
 	_aiAxis_Force32Bit = 0x9fffffff
-};
+};  //! enum aiAxis
 
 
 // ---------------------------------------------------------------------------
 // ---------------------------------------------------------------------------
 /** Defines the purpose of a texture 
 /** Defines the purpose of a texture 
@@ -267,21 +298,21 @@ enum aiTextureType
     aiTextureType_OPACITY = 0x7,
     aiTextureType_OPACITY = 0x7,
 
 
 
 
-	/** This value is not used. It is just there to force the
+	/** This value is not used. It is just here to force the
 	 *  compiler to map this enum to a 32 Bit integer.
 	 *  compiler to map this enum to a 32 Bit integer.
 	 */
 	 */
 	_aiTextureType_Force32Bit = 0x9fffffff
 	_aiTextureType_Force32Bit = 0x9fffffff
-};
+}; //! enum aiTextureType
 
 
 // ---------------------------------------------------------------------------
 // ---------------------------------------------------------------------------
-/** Defines all shading models supported by the library
-*
-*  @note The list of shading modes has been taken from Blender3D.
-*  See Blender3D documentation for more information. The API does
-*  not distinguish between "specular" and "diffuse" shaders (thus the
-*  specular term for diffuse shading models like Oren-Nayar remains
-*  undefined)
-*/
+/** @brief Defines all shading models supported by the library
+ *
+ *  @note The list of shading modes has been taken from Blender3D.
+ *  See Blender3D documentation for more information. The API does
+ *  not distinguish between "specular" and "diffuse" shaders (thus the
+ *  specular term for diffuse shading models like Oren-Nayar remains
+ *  undefined)
+ */
 enum aiShadingMode
 enum aiShadingMode
 {
 {
     /** Flat shading. Shading is done on per-face base, 
     /** Flat shading. Shading is done on per-face base, 
@@ -347,25 +378,29 @@ enum aiShadingMode
 	 *  compiler to map this enum to a 32 Bit integer.
 	 *  compiler to map this enum to a 32 Bit integer.
 	 */
 	 */
 	_aiShadingMode_Force32Bit = 0x9fffffff
 	_aiShadingMode_Force32Bit = 0x9fffffff
-};
+}; //! enum aiShadingMode
 
 
 #include "./Compiler/pushpack1.h"
 #include "./Compiler/pushpack1.h"
 
 
 // ---------------------------------------------------------------------------
 // ---------------------------------------------------------------------------
-/** Defines how an UV channel is transformed.
-*
-*  This is just a helper structure for the AI_MATKEY_UVTRANSFORM key.
-*  See its documentation for more details. 
-*/
+/** @brief Defines how an UV channel is transformed.
+ *
+ *  This is just a helper structure for the AI_MATKEY_UVTRANSFORM key.
+ *  See its documentation for more details. 
+ *
+ *  Typically you'll want to build a matrix of this information. However,
+ *  we keep separate scaling/translation/rotation values to make it
+ *  easier to process and optimize UV transformations internally.
+ */
 struct aiUVTransform
 struct aiUVTransform
 {
 {
 	/** Translation on the u and v axes.
 	/** Translation on the u and v axes.
 	 */
 	 */
-	aiVector2D mTranslation;
+	C_STRUCT aiVector2D mTranslation;
 
 
 	/** Scaling on the u and v axes.
 	/** Scaling on the u and v axes.
 	 */
 	 */
-	aiVector2D mScaling;
+	C_STRUCT aiVector2D mScaling;
 
 
 	/** Rotation - in counter-clockwise direction.
 	/** Rotation - in counter-clockwise direction.
 	 *
 	 *
@@ -376,25 +411,22 @@ struct aiUVTransform
 
 
 
 
 #ifdef __cplusplus
 #ifdef __cplusplus
-
 	aiUVTransform()
 	aiUVTransform()
 		:	mScaling	(1.f,1.f)
 		:	mScaling	(1.f,1.f)
 		,	mRotation	(0.f)
 		,	mRotation	(0.f)
 	{
 	{
 		// nothing to be done here ...
 		// nothing to be done here ...
 	}
 	}
-
 #endif
 #endif
 
 
-} PACK_STRUCT;
+} PACK_STRUCT; //! struct aiUVTransform
 
 
 #include "./Compiler/poppack1.h"
 #include "./Compiler/poppack1.h"
 
 
 // ---------------------------------------------------------------------------
 // ---------------------------------------------------------------------------
-/** Data structure for a single property inside a material
-*
-*  @see aiMaterial
-*/
+/** @brief Data structure for a single material property
+ *  @see aiMaterial
+ */
 struct aiMaterialProperty
 struct aiMaterialProperty
 {
 {
     /** Specifies the name of the property (key)
     /** Specifies the name of the property (key)
@@ -424,7 +456,7 @@ struct aiMaterialProperty
     * data buffer. This is used by the library
     * data buffer. This is used by the library
     * internally to perform debug checks.
     * internally to perform debug checks.
     */
     */
-    aiPropertyTypeInfo mType;
+    C_ENUM aiPropertyTypeInfo mType;
 
 
     /**	Binary buffer to hold the property's value
     /**	Binary buffer to hold the property's value
     *
     *
@@ -449,32 +481,35 @@ struct aiMaterialProperty
 	}
 	}
 
 
 #endif
 #endif
-};
+}; //! struct aiMaterialProperty
 
 
 #ifdef __cplusplus
 #ifdef __cplusplus
-} // need to end extern C block to allow template member functions
+} // We need to leave the "C" block here to allow template member functions
 #endif
 #endif
 
 
-
 // ---------------------------------------------------------------------------
 // ---------------------------------------------------------------------------
-/** Data structure for a material
+/** @brief Data structure for a material
 *
 *
-*  Material data is stored using a key-value structure, called property
-*  (to guarant that the system is maximally flexible).
-*  The library defines a set of standard keys (AI_MATKEY) which should be 
-*  enough for nearly all purposes. 
+*  Material data is stored using a key-value structure. A single key-value
+*  pair is called a 'material property'. C++ users should use the provided
+*  member functions of aiMaterial to process material properties, C users
+*  have to stick with the aiMaterialGetXXX family of unbound functions.
+*  The library defines a set of standard keys (AI_MATKEY_XXX).
 */
 */
 struct ASSIMP_API aiMaterial
 struct ASSIMP_API aiMaterial
 {
 {
 
 
 #ifdef __cplusplus
 #ifdef __cplusplus
 
 
-protected:
-    aiMaterial() {}
+	// NOTE: no initialization, instance Assimp::MaterialHelper instead
+	 aiMaterial() {}
+
 public:
 public:
 
 
+	~aiMaterial();
+
 	// -------------------------------------------------------------------
 	// -------------------------------------------------------------------
-    /** Retrieve an array of Type values with a specific key 
+    /** @brief Retrieve an array of Type values with a specific key 
      *  from the material
      *  from the material
      *
      *
      * @param pKey Key to search for. One of the AI_MATKEY_XXX constants.
      * @param pKey Key to search for. One of the AI_MATKEY_XXX constants.
@@ -484,68 +519,69 @@ public:
      * NULL is a valid value for this parameter.
      * NULL is a valid value for this parameter.
      */
      */
     template <typename Type>
     template <typename Type>
-    inline aiReturn Get(const char* pKey,unsigned int type,
-		unsigned int idx, Type* pOut, unsigned int* pMax);
+    aiReturn Get(const char* pKey,unsigned int type,
+		unsigned int idx, Type* pOut, unsigned int* pMax) const;
 
 
     // -------------------------------------------------------------------
     // -------------------------------------------------------------------
-    /** Retrieve a Type value with a specific key 
+    /** @brief Retrieve a Type value with a specific key 
      *  from the material
      *  from the material
 	 *
 	 *
 	 * @param pKey Key to search for. One of the AI_MATKEY_XXX constants.
 	 * @param pKey Key to search for. One of the AI_MATKEY_XXX constants.
 	 * @param pOut Reference to receive the output value
 	 * @param pOut Reference to receive the output value
 	 */
 	 */
 	template <typename Type>
 	template <typename Type>
-	inline aiReturn Get(const char* pKey,unsigned int type,
-		unsigned int idx,Type& pOut);
+	aiReturn Get(const char* pKey,unsigned int type,
+		unsigned int idx,Type& pOut) const;
 
 
 	// -------------------------------------------------------------------
 	// -------------------------------------------------------------------
-	/** Helper function to get a texture from a material structure.
+	/** @brief Helper function to get a texture from a material.
 	*
 	*
-	*  This function is provided just for convinience. 
-	*  @param mat Pointer to the input material. May not be NULL
-	*  @param index Index of the texture to retrieve. If the index is too 
-	*		large the function fails.
-	*  @param type Specifies the type of the texture to retrieve (e.g. diffuse,
-	*     specular, height map ...)
-	*  @param path Receives the output path
-	*		NULL is no allowed as value
+	*  This function is provided just for convinience, you could also
+	*  read the single material properties manually.
+	*  @param type Specifies the type of the texture to be retrieved (
+	*    e.g. diffuse, specular, height map ...)
+	*  @param index Index of the texture to be retrieved. The function fails
+	*    if there is no texture of that type with this index.
+	*  @param path Receives the path to the texture.
+	*	 NULL is a valid value.
 	*  @param uvindex Receives the UV index of the texture. 
 	*  @param uvindex Receives the UV index of the texture. 
-	*		NULL is allowed as value. The return value is 
+	*    NULL is a valid value.
 	*  @param blend Receives the blend factor for the texture
 	*  @param blend Receives the blend factor for the texture
-	*		NULL is allowed as value.
-	*  @param op Receives the texture operation to perform between
-	*		this texture and the previous texture. NULL is allowed as value.
+	*	 NULL is a valid value.
+	*  @param op Receives the texture operation to be performed between
+	*	 this texture and the previous texture. NULL is allowed as value.
 	*  @param mapmode Receives the mapping modes to be used for the texture.
 	*  @param mapmode Receives the mapping modes to be used for the texture.
-	*      The parameter may be NULL but if it is a valid pointer it MUST
-	*      point to an array of 3 aiTextureMapMode variables (one for each
-	*      axis: UVW order (=XYZ)). 
+	*    The parameter may be NULL but if it is a valid pointer it MUST
+	*    point to an array of 3 aiTextureMapMode's (one for each
+	*    axis: UVW order (=XYZ)). 
 	*/
 	*/
 	// -------------------------------------------------------------------
 	// -------------------------------------------------------------------
-	inline aiReturn GetTexture(aiTextureType type,
+	aiReturn GetTexture(aiTextureType type,
 		unsigned int  index,
 		unsigned int  index,
 		C_STRUCT aiString* path,
 		C_STRUCT aiString* path,
 		aiTextureMapping* mapping	= NULL,
 		aiTextureMapping* mapping	= NULL,
 		unsigned int* uvindex		= NULL,
 		unsigned int* uvindex		= NULL,
 		float* blend				= NULL,
 		float* blend				= NULL,
 		aiTextureOp* op				= NULL,
 		aiTextureOp* op				= NULL,
-		aiTextureMapMode* mapmode	= NULL); 
+		aiTextureMapMode* mapmode	= NULL) const; 
+
 #endif
 #endif
 
 
-    /** List of all material properties loaded.
-    */
+    /** List of all material properties loaded. */
     C_STRUCT aiMaterialProperty** mProperties;
     C_STRUCT aiMaterialProperty** mProperties;
 
 
-    /** Number of properties loaded
-    */
+    /** Number of properties in the data base */
     unsigned int mNumProperties;
     unsigned int mNumProperties;
+
+	/** Storage allocated */
     unsigned int mNumAllocated;
     unsigned int mNumAllocated;
-};
+}; //! struct aiMaterial
 
 
+// Go back to extern "C" again
 #ifdef __cplusplus
 #ifdef __cplusplus
 extern "C" {
 extern "C" {
 #endif
 #endif
 
 
-
 // ---------------------------------------------------------------------------
 // ---------------------------------------------------------------------------
 /** @def AI_MATKEY_NAME
 /** @def AI_MATKEY_NAME
  *  Defines the name of the material 
  *  Defines the name of the material 
@@ -1041,7 +1077,7 @@ extern "C" {
 
 
 
 
 // ---------------------------------------------------------------------------
 // ---------------------------------------------------------------------------
-/** Retrieve a material property with a specific key from the material
+/** @brief Retrieve a material property with a specific key from the material
 *
 *
 *  @param pMat Pointer to the input material. May not be NULL
 *  @param pMat Pointer to the input material. May not be NULL
 *  @param pKey Key to search for. One of the AI_MATKEY_XXX constants.
 *  @param pKey Key to search for. One of the AI_MATKEY_XXX constants.
@@ -1049,15 +1085,16 @@ extern "C" {
 *         structure or NULL if the key has not been found. 
 *         structure or NULL if the key has not been found. 
 */
 */
 // ---------------------------------------------------------------------------
 // ---------------------------------------------------------------------------
-ASSIMP_API aiReturn aiGetMaterialProperty(const C_STRUCT aiMaterial* pMat, 
+ASSIMP_API C_ENUM aiReturn aiGetMaterialProperty(
+	const C_STRUCT aiMaterial* pMat, 
     const char* pKey,
     const char* pKey,
-	aiTextureType type,
+	C_ENUM aiTextureType type,
     unsigned int  index,
     unsigned int  index,
     const C_STRUCT aiMaterialProperty** pPropOut);
     const C_STRUCT aiMaterialProperty** pPropOut);
 
 
 
 
 // ---------------------------------------------------------------------------
 // ---------------------------------------------------------------------------
-/** Retrieve an array of float values with a specific key 
+/** @brief Retrieve an array of float values with a specific key 
 *  from the material
 *  from the material
 *
 *
 * Pass one of the AI_MATKEY_XXX constants for the last three parameters (the
 * Pass one of the AI_MATKEY_XXX constants for the last three parameters (the
@@ -1084,7 +1121,8 @@ ASSIMP_API aiReturn aiGetMaterialProperty(const C_STRUCT aiMaterial* pMat,
 *   arrays remains unmodified and pMax is set to 0.
 *   arrays remains unmodified and pMax is set to 0.
 */
 */
 // ---------------------------------------------------------------------------
 // ---------------------------------------------------------------------------
-ASSIMP_API aiReturn aiGetMaterialFloatArray(const C_STRUCT aiMaterial* pMat, 
+ASSIMP_API C_ENUM aiReturn aiGetMaterialFloatArray(
+	const C_STRUCT aiMaterial* pMat, 
     const char* pKey,
     const char* pKey,
 	unsigned int type,
 	unsigned int type,
     unsigned int index,
     unsigned int index,
@@ -1096,7 +1134,7 @@ ASSIMP_API aiReturn aiGetMaterialFloatArray(const C_STRUCT aiMaterial* pMat,
 #ifdef __cplusplus
 #ifdef __cplusplus
 
 
 // ---------------------------------------------------------------------------
 // ---------------------------------------------------------------------------
-/** Retrieve a single float property with a specific key from the material.
+/** @brief Retrieve a single float property with a specific key from the material.
 *
 *
 * Pass one of the AI_MATKEY_XXX constants for the last three parameters (the
 * Pass one of the AI_MATKEY_XXX constants for the last three parameters (the
 * example reads the AI_MATKEY_SPECULAR_STRENGTH property of the first diffuse texture)
 * example reads the AI_MATKEY_SPECULAR_STRENGTH property of the first diffuse texture)
@@ -1116,7 +1154,7 @@ ASSIMP_API aiReturn aiGetMaterialFloatArray(const C_STRUCT aiMaterial* pMat,
 *   float remains unmodified.
 *   float remains unmodified.
 */
 */
 // ---------------------------------------------------------------------------
 // ---------------------------------------------------------------------------
-inline aiReturn aiGetMaterialFloat(const C_STRUCT aiMaterial* pMat, 
+inline aiReturn aiGetMaterialFloat(const aiMaterial* pMat, 
 	const char* pKey,
 	const char* pKey,
 	unsigned int type,
 	unsigned int type,
     unsigned int index,
     unsigned int index,
@@ -1135,13 +1173,13 @@ inline aiReturn aiGetMaterialFloat(const C_STRUCT aiMaterial* pMat,
 
 
 
 
 // ---------------------------------------------------------------------------
 // ---------------------------------------------------------------------------
-/** Retrieve an array of integer values with a specific key 
+/** @brief Retrieve an array of integer values with a specific key 
 *  from a material
 *  from a material
 *
 *
 * See the sample for aiGetMaterialFloatArray for more information.
 * See the sample for aiGetMaterialFloatArray for more information.
 */
 */
 // ---------------------------------------------------------------------------
 // ---------------------------------------------------------------------------
-ASSIMP_API aiReturn aiGetMaterialIntegerArray(const C_STRUCT aiMaterial* pMat, 
+ASSIMP_API C_ENUM aiReturn aiGetMaterialIntegerArray(const C_STRUCT aiMaterial* pMat, 
     const char* pKey,
     const char* pKey,
 	unsigned int  type,
 	unsigned int  type,
 	unsigned int  index,
 	unsigned int  index,
@@ -1152,7 +1190,7 @@ ASSIMP_API aiReturn aiGetMaterialIntegerArray(const C_STRUCT aiMaterial* pMat,
 #ifdef __cplusplus
 #ifdef __cplusplus
 
 
 // ---------------------------------------------------------------------------
 // ---------------------------------------------------------------------------
-/** Retrieve an integer property with a specific key from a material
+/** @brief Retrieve an integer property with a specific key from a material
 *
 *
 * See the sample for aiGetMaterialFloat for more information.
 * See the sample for aiGetMaterialFloat for more information.
 */
 */
@@ -1177,33 +1215,33 @@ inline aiReturn aiGetMaterialInteger(const C_STRUCT aiMaterial* pMat,
 
 
 
 
 // ---------------------------------------------------------------------------
 // ---------------------------------------------------------------------------
-/** Retrieve a color value from the material property table
+/** @brief Retrieve a color value from the material property table
 *
 *
 * See the sample for aiGetMaterialFloat for more information.
 * See the sample for aiGetMaterialFloat for more information.
 */
 */
 // ---------------------------------------------------------------------------
 // ---------------------------------------------------------------------------
-ASSIMP_API aiReturn aiGetMaterialColor(const C_STRUCT aiMaterial* pMat, 
+ASSIMP_API C_ENUM aiReturn aiGetMaterialColor(const C_STRUCT aiMaterial* pMat, 
     const char* pKey,
     const char* pKey,
 	unsigned int type,
 	unsigned int type,
     unsigned int index,
     unsigned int index,
-    aiColor4D* pOut);
+	C_STRUCT aiColor4D* pOut);
 
 
 
 
 // ---------------------------------------------------------------------------
 // ---------------------------------------------------------------------------
-/** Retrieve a string from the material property table
+/** @brief Retrieve a string from the material property table
 *
 *
 * See the sample for aiGetMaterialFloat for more information.
 * See the sample for aiGetMaterialFloat for more information.
 */
 */
 // ---------------------------------------------------------------------------
 // ---------------------------------------------------------------------------
-ASSIMP_API aiReturn aiGetMaterialString(const C_STRUCT aiMaterial* pMat, 
+ASSIMP_API C_ENUM aiReturn aiGetMaterialString(const C_STRUCT aiMaterial* pMat, 
     const char* pKey,
     const char* pKey,
 	unsigned int type,
 	unsigned int type,
     unsigned int index,
     unsigned int index,
-    aiString* pOut);
+    C_STRUCT aiString* pOut);
 
 
 
 
 // ---------------------------------------------------------------------------
 // ---------------------------------------------------------------------------
-/** Helper function to get a texture from a material structure.
+/** @brief Helper function to get a texture from a material structure.
  *
  *
  *  This function is provided just for convinience. 
  *  This function is provided just for convinience. 
  *  @param mat Pointer to the input material. May not be NULL
  *  @param mat Pointer to the input material. May not be NULL
@@ -1229,22 +1267,22 @@ ASSIMP_API aiReturn aiGetMaterialString(const C_STRUCT aiMaterial* pMat,
 ASSIMP_API aiReturn aiGetMaterialTexture(const C_STRUCT aiMaterial* mat,
 ASSIMP_API aiReturn aiGetMaterialTexture(const C_STRUCT aiMaterial* mat,
 	aiTextureType type,
 	aiTextureType type,
     unsigned int  index,
     unsigned int  index,
-    C_STRUCT aiString* path,
+    aiString* path,
 	aiTextureMapping* mapping	= NULL,
 	aiTextureMapping* mapping	= NULL,
     unsigned int* uvindex		= NULL,
     unsigned int* uvindex		= NULL,
     float* blend				= NULL,
     float* blend				= NULL,
     aiTextureOp* op				= NULL,
     aiTextureOp* op				= NULL,
 	aiTextureMapMode* mapmode	= NULL); 
 	aiTextureMapMode* mapmode	= NULL); 
 #else
 #else
-aiReturn aiGetMaterialTexture(const C_STRUCT aiMaterial* mat,
-    aiTextureType type,
+C_ENUM aiReturn aiGetMaterialTexture(const C_STRUCT aiMaterial* mat,
+    C_ENUM aiTextureType type,
     unsigned int  index,
     unsigned int  index,
     C_STRUCT aiString* path,
     C_STRUCT aiString* path,
-	aiTextureMapping* mapping	/*= NULL*/,
-    unsigned int* uvindex		/*= NULL*/,
-    float* blend				/*= NULL*/,
-    aiTextureOp* op				/*= NULL*/,
-	aiTextureMapMode* mapmode	/*= NULL*/); 
+	C_ENUM aiTextureMapping* mapping	/*= NULL*/,
+    unsigned int* uvindex				/*= NULL*/,
+    float* blend						/*= NULL*/,
+    C_ENUM aiTextureOp* op				/*= NULL*/,
+	C_ENUM aiTextureMapMode* mapmode	/*= NULL*/); 
 #endif // !#ifdef __cplusplus
 #endif // !#ifdef __cplusplus
 
 
 #ifdef __cplusplus
 #ifdef __cplusplus

+ 22 - 16
include/aiMaterial.inl

@@ -54,16 +54,16 @@ inline aiReturn aiMaterial::GetTexture( aiTextureType type,
     unsigned int* uvindex		/*= NULL*/,
     unsigned int* uvindex		/*= NULL*/,
     float* blend				/*= NULL*/,
     float* blend				/*= NULL*/,
     aiTextureOp* op				/*= NULL*/,
     aiTextureOp* op				/*= NULL*/,
-	aiTextureMapMode* mapmode	/*= NULL*/)
+	aiTextureMapMode* mapmode	/*= NULL*/) const
 {
 {
-	return aiGetMaterialTexture(this,type,idx,path,mapping,uvindex,blend,op,mapmode);
+	return ::aiGetMaterialTexture(this,type,idx,path,mapping,uvindex,blend,op,mapmode);
 }
 }
 
 
 // ---------------------------------------------------------------------------
 // ---------------------------------------------------------------------------
 template <typename Type>
 template <typename Type>
 inline aiReturn aiMaterial::Get(const char* pKey,unsigned int type,
 inline aiReturn aiMaterial::Get(const char* pKey,unsigned int type,
 	unsigned int idx, Type* pOut,
 	unsigned int idx, Type* pOut,
-	unsigned int* pMax)
+	unsigned int* pMax) const
 {
 {
 	unsigned int iNum = pMax ? *pMax : 1;
 	unsigned int iNum = pMax ? *pMax : 1;
 
 
@@ -71,8 +71,11 @@ inline aiReturn aiMaterial::Get(const char* pKey,unsigned int type,
 	aiReturn ret = aiGetMaterialProperty(this,pKey,type,idx,&prop);
 	aiReturn ret = aiGetMaterialProperty(this,pKey,type,idx,&prop);
 	if ( AI_SUCCESS == ret )
 	if ( AI_SUCCESS == ret )
 	{
 	{
-		if (prop->mDataLength < sizeof(Type)*iNum)return AI_FAILURE;
-		if (strcmp(prop->mData,(char*)aiPTI_Buffer)!=0)return AI_FAILURE;
+		if (prop->mDataLength < sizeof(Type)*iNum)
+			return AI_FAILURE;
+
+		if (::strcmp(prop->mData,(char*)aiPTI_Buffer)!=0)
+			return AI_FAILURE;
 
 
 		iNum = std::min((size_t)iNum,prop->mDataLength / sizeof(Type));
 		iNum = std::min((size_t)iNum,prop->mDataLength / sizeof(Type));
 		::memcpy(pOut,prop->mData,iNum * sizeof(Type));
 		::memcpy(pOut,prop->mData,iNum * sizeof(Type));
@@ -84,14 +87,17 @@ inline aiReturn aiMaterial::Get(const char* pKey,unsigned int type,
 // ---------------------------------------------------------------------------
 // ---------------------------------------------------------------------------
 template <typename Type>
 template <typename Type>
 inline aiReturn aiMaterial::Get(const char* pKey,unsigned int type,
 inline aiReturn aiMaterial::Get(const char* pKey,unsigned int type,
-	unsigned int idx,Type& pOut)
+	unsigned int idx,Type& pOut) const
 {
 {
 	aiMaterialProperty* prop;
 	aiMaterialProperty* prop;
 	aiReturn ret = aiGetMaterialProperty(this,pKey,type,idx,&prop);
 	aiReturn ret = aiGetMaterialProperty(this,pKey,type,idx,&prop);
 	if ( AI_SUCCESS == ret )
 	if ( AI_SUCCESS == ret )
 	{
 	{
-		if (prop->mDataLength < sizeof(Type))return AI_FAILURE;
-		if (strcmp(prop->mData,(char*)aiPTI_Buffer)!=0)return AI_FAILURE;
+		if (prop->mDataLength < sizeof(Type))
+			return AI_FAILURE;
+
+		if (::strcmp(prop->mData,(char*)aiPTI_Buffer)!=0)
+			return AI_FAILURE;
 
 
 		::memcpy(&pOut,prop->mData,sizeof(Type));
 		::memcpy(&pOut,prop->mData,sizeof(Type));
 	}
 	}
@@ -102,43 +108,43 @@ inline aiReturn aiMaterial::Get(const char* pKey,unsigned int type,
 template <>
 template <>
 inline aiReturn aiMaterial::Get<float>(const char* pKey,unsigned int type,
 inline aiReturn aiMaterial::Get<float>(const char* pKey,unsigned int type,
 	unsigned int idx,float* pOut,
 	unsigned int idx,float* pOut,
-	unsigned int* pMax)
+	unsigned int* pMax) const
 {
 {
-	return aiGetMaterialFloatArray(this,pKey,type,idx,pOut,pMax);
+	return ::aiGetMaterialFloatArray(this,pKey,type,idx,pOut,pMax);
 }
 }
 // ---------------------------------------------------------------------------
 // ---------------------------------------------------------------------------
 template <>
 template <>
 inline aiReturn aiMaterial::Get<int>(const char* pKey,unsigned int type,
 inline aiReturn aiMaterial::Get<int>(const char* pKey,unsigned int type,
 	unsigned int idx,int* pOut,
 	unsigned int idx,int* pOut,
-	unsigned int* pMax)
+	unsigned int* pMax) const
 {
 {
-	return aiGetMaterialIntegerArray(this,pKey,type,idx,pOut,pMax);
+	return ::aiGetMaterialIntegerArray(this,pKey,type,idx,pOut,pMax);
 }
 }
 // ---------------------------------------------------------------------------
 // ---------------------------------------------------------------------------
 template <>
 template <>
 inline aiReturn aiMaterial::Get<float>(const char* pKey,unsigned int type,
 inline aiReturn aiMaterial::Get<float>(const char* pKey,unsigned int type,
-	unsigned int idx,float& pOut)
+	unsigned int idx,float& pOut) const
 {
 {
 	return aiGetMaterialFloat(this,pKey,type,idx,&pOut);
 	return aiGetMaterialFloat(this,pKey,type,idx,&pOut);
 }
 }
 // ---------------------------------------------------------------------------
 // ---------------------------------------------------------------------------
 template <>
 template <>
 inline aiReturn aiMaterial::Get<int>(const char* pKey,unsigned int type,
 inline aiReturn aiMaterial::Get<int>(const char* pKey,unsigned int type,
-	unsigned int idx,int& pOut)
+	unsigned int idx,int& pOut) const
 {
 {
 	return aiGetMaterialInteger(this,pKey,type,idx,&pOut);
 	return aiGetMaterialInteger(this,pKey,type,idx,&pOut);
 }
 }
 // ---------------------------------------------------------------------------
 // ---------------------------------------------------------------------------
 template <>
 template <>
 inline aiReturn aiMaterial::Get<aiColor4D>(const char* pKey,unsigned int type,
 inline aiReturn aiMaterial::Get<aiColor4D>(const char* pKey,unsigned int type,
-	unsigned int idx,aiColor4D& pOut)
+	unsigned int idx,aiColor4D& pOut) const
 {
 {
 	return aiGetMaterialColor(this,pKey,type,idx,&pOut);
 	return aiGetMaterialColor(this,pKey,type,idx,&pOut);
 }
 }
 // ---------------------------------------------------------------------------
 // ---------------------------------------------------------------------------
 template <>
 template <>
 inline aiReturn aiMaterial::Get<aiString>(const char* pKey,unsigned int type,
 inline aiReturn aiMaterial::Get<aiString>(const char* pKey,unsigned int type,
-	unsigned int idx,aiString& pOut)
+	unsigned int idx,aiString& pOut) const
 {
 {
 	return aiGetMaterialString(this,pKey,type,idx,&pOut);
 	return aiGetMaterialString(this,pKey,type,idx,&pOut);
 }
 }

+ 85 - 75
include/aiMesh.h

@@ -41,8 +41,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
 /** @file Declares the data structures in which the imported geometry is 
 /** @file Declares the data structures in which the imported geometry is 
     returned by ASSIMP: aiMesh, aiFace and aiBone data structures. */
     returned by ASSIMP: aiMesh, aiFace and aiBone data structures. */
-#ifndef __AI_MESH_H_INC__
-#define __AI_MESH_H_INC__
+#ifndef INCLUDED_AI_MESH_H
+#define INCLUDED_AI_MESH_H
 
 
 #include "aiTypes.h"
 #include "aiTypes.h"
 
 
@@ -51,13 +51,23 @@ extern "C" {
 #endif
 #endif
 
 
 // ---------------------------------------------------------------------------
 // ---------------------------------------------------------------------------
-/** A single face in a mesh, referring to multiple vertices. 
-*
-* If mNumIndices is 3, the face is a triangle, 
-* for mNumIndices > 3 it's a polygon.
-* Point and line primitives are rarely used and are NOT supported. However,
-* a load could pass them as degenerated triangles.
-*/
+/** @brief A single face in a mesh, referring to multiple vertices. 
+ *
+ * If mNumIndices is 3, the face is called 'triangle', for mNumIndices > 3 
+ * it's called 'polygon' (hey, that's just a definition!).
+ * <br>
+ * aiMesh::mPrimitiveTypes can be queried to quickly examine which types of
+ * primitive are present in a mesh. The aiProcess_SortByPType flag executes
+ * a special post-processing step which splits meshes with *different*
+ * primitive types mixed up (e.g. lines and triangles) in several, 'clean'
+ * submeshes. Furthermore there is a configuration option, 
+ * AI_CONFIG_PP_SBP_REMOVE, to force SortByPType to remove specific primitive
+ * types from the scene - completely. In most cases you'll propably want to
+ * set this config to 
+ * @code 
+ * aiPrimitiveType_LINE|aiPrimitiveType_POINT
+ * @endcode
+ */
 struct aiFace
 struct aiFace
 {
 {
 	//! Number of indices defining this face. 3 for a triangle, >3 for polygon
 	//! Number of indices defining this face. 3 for a triangle, >3 for polygon
@@ -93,10 +103,10 @@ struct aiFace
 		if (&o == this)
 		if (&o == this)
 			return *this;
 			return *this;
 
 
-		delete mIndices;
+		delete[] mIndices;
 		mNumIndices = o.mNumIndices;
 		mNumIndices = o.mNumIndices;
 		mIndices = new unsigned int[mNumIndices];
 		mIndices = new unsigned int[mNumIndices];
-		memcpy( mIndices, o.mIndices, mNumIndices * sizeof( unsigned int));
+		::memcpy( mIndices, o.mIndices, mNumIndices * sizeof( unsigned int));
 		return *this;
 		return *this;
 	}
 	}
 
 
@@ -104,11 +114,11 @@ struct aiFace
 	//! of two faces is identical
 	//! of two faces is identical
 	bool operator== (const aiFace& o) const
 	bool operator== (const aiFace& o) const
 	{
 	{
-		if (this->mIndices == o.mIndices)return true;
-		else if (this->mIndices && this->mNumIndices == o.mNumIndices)
+		if (mIndices == o.mIndices)return true;
+		else if (mIndices && mNumIndices == o.mNumIndices)
 		{
 		{
 			for (unsigned int i = 0;i < this->mNumIndices;++i)
 			for (unsigned int i = 0;i < this->mNumIndices;++i)
-				if (this->mIndices[i] != o.mIndices[i])return false;
+				if (mIndices[i] != o.mIndices[i])return false;
 			return true;
 			return true;
 		}
 		}
 		return false;
 		return false;
@@ -120,13 +130,12 @@ struct aiFace
 	{
 	{
 		return !(*this == o);
 		return !(*this == o);
 	}
 	}
-
 #endif // __cplusplus
 #endif // __cplusplus
-};
+}; //! struct aiFace
 
 
 
 
 // ---------------------------------------------------------------------------
 // ---------------------------------------------------------------------------
-/** A single influence of a bone on a vertex.
+/** @brief A single influence of a bone on a vertex.
  */
  */
 struct aiVertexWeight
 struct aiVertexWeight
 {
 {
@@ -150,14 +159,16 @@ struct aiVertexWeight
 	{ /* nothing to do here */ }
 	{ /* nothing to do here */ }
 
 
 #endif // __cplusplus
 #endif // __cplusplus
-};
+}; //! struct aiVertexWeight
 
 
 
 
 // ---------------------------------------------------------------------------
 // ---------------------------------------------------------------------------
-/** A single bone of a mesh. A bone has a name by which it can be found 
-* in the frame hierarchy and by which it can be addressed by animations. 
-* In addition it has a number of influences on vertices.
-*/
+/** @brief A single bone of a mesh.
+ *
+ *  A bone has a name by which it can be found in the frame hierarchy and by
+ *  which it can be addressed by animations. In addition it has a number of 
+ *  influences on vertices.
+ */
 struct aiBone
 struct aiBone
 {
 {
 	//! The name of the bone. 
 	//! The name of the bone. 
@@ -200,52 +211,47 @@ struct aiBone
 		delete [] mWeights;
 		delete [] mWeights;
 	}
 	}
 #endif // __cplusplus
 #endif // __cplusplus
-};
-
-#if (!defined AI_MAX_NUMBER_OF_COLOR_SETS)
-
+}; //! struct aiBone
 
 
+#ifndef AI_MAX_NUMBER_OF_COLOR_SETS
 // ---------------------------------------------------------------------------
 // ---------------------------------------------------------------------------
-/** Maximum number of vertex color sets per mesh.
-*
-* Normally: Diffuse, specular, ambient and emissive
-* However one could use the vertex color sets for any other purpose, too.
-*
-* \note Some internal structures expect (and assert) this value
-*   to be at 4
-*/
+/** @def AI_MAX_NUMBER_OF_COLOR_SETS
+ *  Maximum number of vertex color sets per mesh.
+ *
+ *  Normally: Diffuse, specular, ambient and emissive
+ *  However one could use the vertex color sets for any other purpose, too.
+ *
+ *  @note Some internal structures expect (and assert) this value
+ *    to be at least 4. For the moment it is absolutely safe to assume that
+ *    this will never change.
+ */
 #	define AI_MAX_NUMBER_OF_COLOR_SETS 0x4
 #	define AI_MAX_NUMBER_OF_COLOR_SETS 0x4
-
 #endif // !! AI_MAX_NUMBER_OF_COLOR_SETS
 #endif // !! AI_MAX_NUMBER_OF_COLOR_SETS
-#if (!defined AI_MAX_NUMBER_OF_TEXTURECOORDS)
-
 
 
+#ifndef AI_MAX_NUMBER_OF_TEXTURECOORDS
 // ---------------------------------------------------------------------------
 // ---------------------------------------------------------------------------
-/** Maximum number of texture coord sets (UV(W) channels) per mesh 
-*
-* The material system uses the AI_MATKEY_UVWSRC_XXX keys to specify 
-* which UVW channel serves as data source for a texture,
-*
-* \note Some internal structures expect (and assert) this value
-*   to be  4
+/** @def AI_MAX_NUMBER_OF_TEXTURECOORDS
+ *  Maximum number of texture coord sets (UV(W) channels) per mesh 
+ *
+ *  The material system uses the AI_MATKEY_UVWSRC_XXX keys to specify 
+ *  which UVW channel serves as data source for a texture.
+ *
+ *  @note Some internal structures expect (and assert) this value
+ *    to be at least 4. For the moment it is absolutely safe to assume that
+ *    this will never change.
 */
 */
 #	define AI_MAX_NUMBER_OF_TEXTURECOORDS 0x4
 #	define AI_MAX_NUMBER_OF_TEXTURECOORDS 0x4
-
-// NOTE (Aramis): If you change these values, make sure that you also
-// change the corresponding values in all Assimp ports.
-
-// **********************************************************
-// Java: Mesh.java, 
-//  Mesh.MAX_NUMBER_OF_TEXTURECOORDS
-//  Mesh.MAX_NUMBER_OF_COLOR_SETS
-// **********************************************************
-
 #endif // !! AI_MAX_NUMBER_OF_TEXTURECOORDS
 #endif // !! AI_MAX_NUMBER_OF_TEXTURECOORDS
 
 
 
 
 // ---------------------------------------------------------------------------
 // ---------------------------------------------------------------------------
-/** Enumerates the types of geometric primitives supported by Assimp.
-*/
+/** @brief Enumerates the types of geometric primitives supported by Assimp.
+ *  
+ *  @see aiFace Face data structure
+ *  @see aiProcess_SortByPType Per-primitive sorting of meshes
+ *  @see aiProcess_Triangulate Automatic triangulation
+ *  @see AI_CONFIG_PP_SBP_REMOVE Removal of specific primitive types.
+ */
 enum aiPrimitiveType
 enum aiPrimitiveType
 {
 {
 	/** A point primitive. 
 	/** A point primitive. 
@@ -278,15 +284,18 @@ enum aiPrimitiveType
 	aiPrimitiveType_POLYGON     = 0x8,
 	aiPrimitiveType_POLYGON     = 0x8,
 
 
 
 
-	/** This value is not used. It is just there to force the
+	/** This value is not used. It is just here to force the
 	 *  compiler to map this enum to a 32 Bit integer.
 	 *  compiler to map this enum to a 32 Bit integer.
 	 */
 	 */
 	_aiPrimitiveType_Force32Bit = 0x9fffffff
 	_aiPrimitiveType_Force32Bit = 0x9fffffff
-};
+}; //! enum aiPrimitiveType
 
 
+// Get the #aiPrimitiveType flag for a specific number of face indices
+#define AI_PRIMITIVE_TYPE_FOR_N_INDICES(n) \
+	((n) > 3 ? aiPrimitiveType_POLYGON : (aiPrimitiveType)(1u << (n)-1))
 
 
 // ---------------------------------------------------------------------------
 // ---------------------------------------------------------------------------
-/** A mesh represents a geometry or model with a single material. 
+/** @brief A mesh represents a geometry or model with a single material. 
 *
 *
 * It usually consists of a number of vertices and a series of primitives/faces 
 * It usually consists of a number of vertices and a series of primitives/faces 
 * referencing the vertices. In addition there might be a series of bones, each 
 * referencing the vertices. In addition there might be a series of bones, each 
@@ -298,9 +307,11 @@ enum aiPrimitiveType
 * test for the presence of various data streams.
 * test for the presence of various data streams.
 *
 *
 * A Mesh uses only a single material which is referenced by a material ID.
 * A Mesh uses only a single material which is referenced by a material ID.
-* \note The mPositions member is not optional, although a Has()-Method is
-* provided for it. However, positions *could* be missing if the
-* AI_SCENE_FLAGS_INCOMPLETE flag is set in aiScene::mFlags.
+* @note The mPositions member is usually not optional. However, vertex positions 
+* *could* be missing if the AI_SCENE_FLAGS_INCOMPLETE flag is set in 
+* @code
+* aiScene::mFlags
+* @endcode
 */
 */
 struct aiMesh
 struct aiMesh
 {
 {
@@ -463,30 +474,30 @@ struct aiMesh
 	}
 	}
 
 
 	//! Check whether the mesh contains positions. If no special scene flags
 	//! Check whether the mesh contains positions. If no special scene flags
-	//! (such as AI_SCENE_FLAGS_ANIM_SKELETON_ONLY) are set this MUST
-	//! always return true
-	inline bool HasPositions() const 
+	//! (such as AI_SCENE_FLAGS_ANIM_SKELETON_ONLY) are set this will
+	//! always return true 
+	bool HasPositions() const 
 		{ return mVertices != NULL && mNumVertices > 0; }
 		{ return mVertices != NULL && mNumVertices > 0; }
 
 
 	//! Check whether the mesh contains faces. If no special scene flags
 	//! Check whether the mesh contains faces. If no special scene flags
 	//! are set this should always return true
 	//! are set this should always return true
-	inline bool HasFaces() const 
+	bool HasFaces() const 
 		{ return mFaces != NULL && mNumFaces > 0; }
 		{ return mFaces != NULL && mNumFaces > 0; }
 
 
 	//! Check whether the mesh contains normal vectors
 	//! Check whether the mesh contains normal vectors
-	inline bool HasNormals() const 
+	bool HasNormals() const 
 		{ return mNormals != NULL && mNumVertices > 0; }
 		{ return mNormals != NULL && mNumVertices > 0; }
 
 
 	//! Check whether the mesh contains tangent and bitangent vectors
 	//! Check whether the mesh contains tangent and bitangent vectors
 	//! It is not possible that it contains tangents and no bitangents
 	//! It is not possible that it contains tangents and no bitangents
 	//! (or the other way round). The existence of one of them
 	//! (or the other way round). The existence of one of them
 	//! implies that the second is there, too.
 	//! implies that the second is there, too.
-	inline bool HasTangentsAndBitangents() const 
+	bool HasTangentsAndBitangents() const 
 		{ return mTangents != NULL && mBitangents != NULL && mNumVertices > 0; }
 		{ return mTangents != NULL && mBitangents != NULL && mNumVertices > 0; }
 
 
 	//! Check whether the mesh contains a vertex color set
 	//! Check whether the mesh contains a vertex color set
 	//! \param pIndex Index of the vertex color set
 	//! \param pIndex Index of the vertex color set
-	inline bool HasVertexColors( unsigned int pIndex) const
+	bool HasVertexColors( unsigned int pIndex) const
 	{ 
 	{ 
 		if( pIndex >= AI_MAX_NUMBER_OF_COLOR_SETS) 
 		if( pIndex >= AI_MAX_NUMBER_OF_COLOR_SETS) 
 			return false; 
 			return false; 
@@ -496,7 +507,7 @@ struct aiMesh
 
 
 	//! Check whether the mesh contains a texture coordinate set
 	//! Check whether the mesh contains a texture coordinate set
 	//! \param pIndex Index of the texture coordinates set
 	//! \param pIndex Index of the texture coordinates set
-	inline bool HasTextureCoords( unsigned int pIndex) const
+	bool HasTextureCoords( unsigned int pIndex) const
 	{ 
 	{ 
 		if( pIndex >= AI_MAX_NUMBER_OF_TEXTURECOORDS) 
 		if( pIndex >= AI_MAX_NUMBER_OF_TEXTURECOORDS) 
 			return false; 
 			return false; 
@@ -505,7 +516,7 @@ struct aiMesh
 	}
 	}
 
 
 	//! Get the number of UV channels the mesh contains
 	//! Get the number of UV channels the mesh contains
-	inline unsigned int GetNumUVChannels() const 
+	unsigned int GetNumUVChannels() const 
 	{
 	{
 		unsigned int n = 0;
 		unsigned int n = 0;
 		while (n < AI_MAX_NUMBER_OF_TEXTURECOORDS && mTextureCoords[n])++n;
 		while (n < AI_MAX_NUMBER_OF_TEXTURECOORDS && mTextureCoords[n])++n;
@@ -513,7 +524,7 @@ struct aiMesh
 	}
 	}
 
 
 	//! Get the number of vertex color channels the mesh contains
 	//! Get the number of vertex color channels the mesh contains
-	inline unsigned int GetNumColorChannels() const 
+	unsigned int GetNumColorChannels() const 
 	{
 	{
 		unsigned int n = 0;
 		unsigned int n = 0;
 		while (n < AI_MAX_NUMBER_OF_COLOR_SETS && mColors[n])++n;
 		while (n < AI_MAX_NUMBER_OF_COLOR_SETS && mColors[n])++n;
@@ -525,11 +536,10 @@ struct aiMesh
 		{ return mBones != NULL && mNumBones > 0; }
 		{ return mBones != NULL && mNumBones > 0; }
 
 
 #endif // __cplusplus
 #endif // __cplusplus
-};
+}; //! struct aiMesh
 
 
 #ifdef __cplusplus
 #ifdef __cplusplus
 }
 }
-#endif
-
+#endif //! extern "C"
 #endif // __AI_MESH_H_INC
 #endif // __AI_MESH_H_INC
 
 

+ 2 - 2
include/aiScene.h

@@ -75,7 +75,7 @@ struct aiNode
 	C_STRUCT aiString mName;
 	C_STRUCT aiString mName;
 
 
 	/** The transformation relative to the node's parent. */
 	/** The transformation relative to the node's parent. */
-	aiMatrix4x4 mTransformation;
+	C_STRUCT aiMatrix4x4 mTransformation;
 
 
 	/** Parent node. NULL if this node is the root node. */
 	/** Parent node. NULL if this node is the root node. */
 	C_STRUCT aiNode* mParent;
 	C_STRUCT aiNode* mParent;
@@ -392,7 +392,7 @@ struct aiScene
 };
 };
 
 
 #ifdef __cplusplus
 #ifdef __cplusplus
-}
+} //! namespace Assimp
 #endif
 #endif
 
 
 #endif // __AI_SCENE_H_INC__
 #endif // __AI_SCENE_H_INC__

+ 42 - 24
include/aiTexture.h

@@ -57,14 +57,13 @@ extern "C" {
 #endif
 #endif
 
 
 
 
-// ---------------------------------------------------------------------------
-/** \def AI_MAKE_EMBEDDED_TEXNAME
+// --------------------------------------------------------------------------------
+/** @def AI_MAKE_EMBEDDED_TEXNAME
  *  Used to build the reserved path name used by the material system to 
  *  Used to build the reserved path name used by the material system to 
  *  reference textures that are embedded into their corresponding
  *  reference textures that are embedded into their corresponding
  *  model files. The parameter specifies the index of the texture
  *  model files. The parameter specifies the index of the texture
  *  (zero-based, in the aiScene::mTextures array)
  *  (zero-based, in the aiScene::mTextures array)
  */
  */
-// ---------------------------------------------------------------------------
 #if (!defined AI_MAKE_EMBEDDED_TEXNAME)
 #if (!defined AI_MAKE_EMBEDDED_TEXNAME)
 #	define AI_MAKE_EMBEDDED_TEXNAME(_n_) "*" # _n_
 #	define AI_MAKE_EMBEDDED_TEXNAME(_n_) "*" # _n_
 #endif
 #endif
@@ -72,12 +71,11 @@ extern "C" {
 
 
 #include "./Compiler/pushpack1.h"
 #include "./Compiler/pushpack1.h"
 
 
-// ---------------------------------------------------------------------------
-/** Helper structure to represent a texel in ARGB8888 format
+// --------------------------------------------------------------------------------
+/** @brief Helper structure to represent a texel in a ARGB8888 format
 * 
 * 
-* Used by aiTexture
+*  Used by aiTexture.
 */
 */
-// ---------------------------------------------------------------------------
 struct aiTexel
 struct aiTexel
 {
 {
 	unsigned char b,g,r,a;
 	unsigned char b,g,r,a;
@@ -87,28 +85,37 @@ struct aiTexel
 	bool operator== (const aiTexel& other) const
 	bool operator== (const aiTexel& other) const
 	{
 	{
 		return b == other.b && r == other.r &&
 		return b == other.b && r == other.r &&
-			g == other.g && a == other.a;
+			   g == other.g && a == other.a;
 	}
 	}
 
 
-	//! Negative comparison operator
+	//! Inverse comparison operator
 	bool operator!= (const aiTexel& other) const
 	bool operator!= (const aiTexel& other) const
 	{
 	{
 		return b != other.b || r != other.r ||
 		return b != other.b || r != other.r ||
-			g != other.g || a != other.a;
+			   g != other.g || a != other.a;
+	}
+
+	//! Conversion to a floating-point 4d color
+	operator aiColor4D() const
+	{
+		return aiColor4D(r/255.f,g/255.f,b/255.f,a/255.f);
 	}
 	}
 #endif // __cplusplus
 #endif // __cplusplus
 
 
-} PACK_STRUCT;
+} PACK_STRUCT; //! struct aiTexel
 
 
 #include "./Compiler/poppack1.h"
 #include "./Compiler/poppack1.h"
 
 
-// ---------------------------------------------------------------------------
+// --------------------------------------------------------------------------------
 /** Helper structure to describe an embedded texture
 /** Helper structure to describe an embedded texture
 * 
 * 
 * Normally textures are contained in external files but some file formats
 * Normally textures are contained in external files but some file formats
-* do embedd them. Embedded
+* embed them directly in the model file. There are two types of embedded
+* textures: 1. Uncompressed textures. The color data is directly given.
+* 2. Compressed textures stored in a file format like png or jpg. The raw
+* file is given, the application must utilize an image decoder (e.g. DevIL)
+* to get access to the color data.
 */
 */
-// ---------------------------------------------------------------------------
 struct aiTexture
 struct aiTexture
 {
 {
 	/** Width of the texture, in pixels
 	/** Width of the texture, in pixels
@@ -122,7 +129,7 @@ struct aiTexture
 	/** Height of the texture, in pixels
 	/** Height of the texture, in pixels
 	 *
 	 *
 	 * If this value is zero, pcData points to an compressed texture
 	 * If this value is zero, pcData points to an compressed texture
-	 * in an unknown format (e.g. JPEG).
+	 * in any format (e.g. JPEG).
 	 */
 	 */
 	unsigned int mHeight;
 	unsigned int mHeight;
 
 
@@ -130,10 +137,12 @@ struct aiTexture
 	 *  to determine the type of embedded compressed textures.
 	 *  to determine the type of embedded compressed textures.
 	 *
 	 *
 	 * If mHeight != 0 this member is undefined. Otherwise it
 	 * If mHeight != 0 this member is undefined. Otherwise it
-	 * will be set to '\0\0\0\0' if the loader has no additional
+	 * is set set to '\0\0\0\0' if the loader has no additional
 	 * information about the texture file format used OR the
 	 * information about the texture file format used OR the
-	 * file extension of the format without a leading dot.
-	 * E.g. 'dds\0', 'pcx\0'.  All characters are lower-case.
+	 * file extension of the format without a trailing dot. If there 
+	 * are multiple file extensions for a format, the shortest 
+	 * extension is choosen (JPEG maps to 'jpg', not to 'jpeg').
+	 * E.g. 'dds\0', 'pcx\0', 'jpg'.  All characters are lower-case.
 	 */
 	 */
 	char achFormatHint[4];
 	char achFormatHint[4];
 
 
@@ -146,20 +155,29 @@ struct aiTexture
 	 * buffer of size mWidth containing the compressed texture
 	 * buffer of size mWidth containing the compressed texture
 	 * data. Good luck, have fun!
 	 * data. Good luck, have fun!
 	 */
 	 */
-	aiTexel* pcData;
+	C_STRUCT aiTexel* pcData;
 
 
 #ifdef __cplusplus
 #ifdef __cplusplus
 
 
+	//! For compressed textures (mHeight == 0): compare the
+	//! format hint against a given string.
+	//! @param s Input string. 4 characters are maximally processed.
+	//!        Example values: "jpg", "png"
+	//! @return true if the given string matches the fomat hint
+	bool CheckFormat(const char* s) const
+	{
+		ai_assert(s && !mHeight);
+		return (0 == ::strncmp(achFormatHint,s,4));
+	}
+
 	// Construction
 	// Construction
 	aiTexture ()
 	aiTexture ()
 		: mWidth  (0)
 		: mWidth  (0)
 		, mHeight (0)
 		, mHeight (0)
 		, pcData  (NULL)
 		, pcData  (NULL)
 	{
 	{
-		achFormatHint[0] = 0;
-		achFormatHint[1] = 0;
-		achFormatHint[2] = 0;
-		achFormatHint[3] = 0;
+		achFormatHint[0] = achFormatHint[1] = 0;
+		achFormatHint[2] = achFormatHint[3] = 0;
 	}
 	}
 
 
 	// Destruction
 	// Destruction
@@ -168,7 +186,7 @@ struct aiTexture
 		delete[] pcData;
 		delete[] pcData;
 	}
 	}
 #endif
 #endif
-};
+}; //! struct aiTexture
 
 
 
 
 #ifdef __cplusplus
 #ifdef __cplusplus

+ 164 - 54
include/aiTypes.h

@@ -42,23 +42,50 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #ifndef AI_TYPES_H_INC
 #ifndef AI_TYPES_H_INC
 #define AI_TYPES_H_INC
 #define AI_TYPES_H_INC
 
 
+// Some CRT headers
 #include <sys/types.h>
 #include <sys/types.h>
 #include <memory.h>
 #include <memory.h>
+#include <math.h>
+#include <stddef.h>
 
 
+// Our compile configuration
 #include "aiDefines.h"
 #include "aiDefines.h"
 
 
-// include math helper classes 
+// Some types moved to separate header due to size of operators
 #include "aiVector3D.h"
 #include "aiVector3D.h"
 #include "aiVector2D.h"
 #include "aiVector2D.h"
 #include "aiMatrix3x3.h"
 #include "aiMatrix3x3.h"
 #include "aiMatrix4x4.h"
 #include "aiMatrix4x4.h"
+#include "aiQuaternion.h"
 
 
 #ifdef __cplusplus
 #ifdef __cplusplus
-#	include <string>
+#	include <string> // for aiString::Set(const std::string&)
+
+namespace Assimp	{
+namespace Intern		{
+
+	// Internal helper class to utilize our internal new/delete routines
+	// for allocating object of this class. By doing this you can safely
+	// share class objects between Assimp and the application - it works
+	// even over DLL boundaries.
+	struct ASSIMP_API AllocateFromAssimpHeap	{
+
+		// new/delete overload
+		void *operator new    ( size_t num_bytes);
+		void  operator delete ( void* data);
+
+		// array new/delete overload
+		void *operator new[]    ( size_t num_bytes);
+		void  operator delete[] ( void* data);
+
+	}; //! struct AllocateFromAssimpHeap
+}; //! namespace Intern
+}; //! namespace Assimp
+
 extern "C" {
 extern "C" {
 #endif
 #endif
 
 
-/** Maximum dimension for strings, ASSIMP strings are zero terminated */
+/** Maximum dimension for strings, ASSIMP strings are zero terminated. */
 #ifdef __cplusplus
 #ifdef __cplusplus
 const size_t MAXLEN = 1024;
 const size_t MAXLEN = 1024;
 #else
 #else
@@ -67,8 +94,7 @@ const size_t MAXLEN = 1024;
 
 
 #include "./Compiler/pushpack1.h"
 #include "./Compiler/pushpack1.h"
 
 
-
-// ---------------------------------------------------------------------------
+// ----------------------------------------------------------------------------------
 /** Represents a plane in a three-dimensional, euclidean space
 /** Represents a plane in a three-dimensional, euclidean space
 */
 */
 struct aiPlane
 struct aiPlane
@@ -84,10 +110,10 @@ struct aiPlane
 
 
 	//! Plane equation
 	//! Plane equation
 	float a,b,c,d;
 	float a,b,c,d;
-} PACK_STRUCT;
+} PACK_STRUCT; // !struct aiPlane
 
 
 
 
-// ---------------------------------------------------------------------------
+// ----------------------------------------------------------------------------------
 /** Represents a ray
 /** Represents a ray
 */
 */
 struct aiRay
 struct aiRay
@@ -102,14 +128,12 @@ struct aiRay
 #endif // !__cplusplus
 #endif // !__cplusplus
 
 
 	//! Position and direction of the ray
 	//! Position and direction of the ray
-	aiVector3D pos, dir;
-} PACK_STRUCT;
+	C_STRUCT aiVector3D pos, dir;
+} PACK_STRUCT; // !struct aiRay
+
 
 
-// aiVector3D type moved to separate header due to size of operators
-// aiQuaternion type moved to separate header due to size of operators
-// aiMatrix4x4 type moved to separate header due to size of operators
 
 
-// ---------------------------------------------------------------------------
+// ----------------------------------------------------------------------------------
 /** Represents a color in Red-Green-Blue space. 
 /** Represents a color in Red-Green-Blue space. 
 */
 */
 struct aiColor3D
 struct aiColor3D
@@ -119,26 +143,43 @@ struct aiColor3D
 	aiColor3D (float _r, float _g, float _b) : r(_r), g(_g), b(_b) {}
 	aiColor3D (float _r, float _g, float _b) : r(_r), g(_g), b(_b) {}
 	aiColor3D (const aiColor3D& o) : r(o.r), g(o.g), b(o.b) {}
 	aiColor3D (const aiColor3D& o) : r(o.r), g(o.g), b(o.b) {}
 	
 	
+	// Component-wise comparison 
+	// TODO: add epsilon?
 	bool operator == (const aiColor3D& other) const
 	bool operator == (const aiColor3D& other) const
 		{return r == other.r && g == other.g && b == other.b;}
 		{return r == other.r && g == other.g && b == other.b;}
 
 
+	// Component-wise inverse comparison 
+	// TODO: add epsilon?
 	bool operator != (const aiColor3D& other) const
 	bool operator != (const aiColor3D& other) const
 		{return r != other.r || g != other.g || b != other.b;}
 		{return r != other.r || g != other.g || b != other.b;}
 
 
-	aiColor3D operator+(const aiColor3D& c) const
-		{return aiColor3D(r+c.r,g+c.g,b+c.b);}
-	aiColor3D operator-(const aiColor3D& c) const
-		{return aiColor3D(r+c.r,g+c.g,b+c.b);}
-	aiColor3D operator*(const aiColor3D& c) const
-		{return aiColor3D(r*c.r,g*c.g,b*c.b);}
+	// Component-wise addition
+	aiColor3D operator+(const aiColor3D& c) const {
+		return aiColor3D(r+c.r,g+c.g,b+c.b);
+	}
+
+	// Component-wise subtraction
+	aiColor3D operator-(const aiColor3D& c) const {
+		return aiColor3D(r+c.r,g+c.g,b+c.b);
+	}
+
+	// Component-wise multiplication
+	aiColor3D operator*(const aiColor3D& c) const {
+		return aiColor3D(r*c.r,g*c.g,b*c.b);
+	}
 	
 	
-	aiColor3D operator*(float f) const
-		{return aiColor3D(r*f,g*f,b*f);}
+	// Multiply with a scalar
+	aiColor3D operator*(float f) const {
+		return aiColor3D(r*f,g*f,b*f);
+	}
 
 
-	inline float operator[](unsigned int i) const {return *(&r + i);}
-	inline float& operator[](unsigned int i) {return *(&r + i);}
+	// Access a specific color component
+	float operator[](unsigned int i) const {return *(&r + i);}
+	float& operator[](unsigned int i) {return *(&r + i);}
 
 
-	inline bool IsBlack() const
+	// Check whether a color is black
+	// TODO: add epsilon?
+	bool IsBlack() const
 	{
 	{
 		return !r && !g && !b;
 		return !r && !g && !b;
 	}
 	}
@@ -147,10 +188,10 @@ struct aiColor3D
 
 
 	//! Red, green and blue color values
 	//! Red, green and blue color values
 	float r, g, b;
 	float r, g, b;
-} PACK_STRUCT;
+} PACK_STRUCT;  // !struct aiColor3D
 
 
 
 
-// ---------------------------------------------------------------------------
+// ----------------------------------------------------------------------------------
 /** Represents a color in Red-Green-Blue space including an 
 /** Represents a color in Red-Green-Blue space including an 
 *   alpha component. 
 *   alpha component. 
 */
 */
@@ -163,15 +204,24 @@ struct aiColor4D
 	aiColor4D (const aiColor4D& o) 
 	aiColor4D (const aiColor4D& o) 
 		: r(o.r), g(o.g), b(o.b), a(o.a) {}
 		: r(o.r), g(o.g), b(o.b), a(o.a) {}
 	
 	
-	bool operator == (const aiColor4D& other) const
-		{return r == other.r && g == other.g && b == other.b && a == other.a;}
+	// Component-wise comparison 
+	// TODO: add epsilon?
+	bool operator == (const aiColor4D& other) const {
+		return r == other.r && g == other.g && b == other.b && a == other.a;
+	}
 
 
-	bool operator != (const aiColor4D& other) const
-		{return r != other.r || g != other.g || b != other.b || a != other.a;}
+	// Component-wise inverse comparison 
+	// TODO: add epsilon?
+	bool operator != (const aiColor4D& other) const {
+		return r != other.r || g != other.g || b != other.b || a != other.a;
+	}
 
 
+	// Access a specific color component
 	inline float operator[](unsigned int i) const {return *(&r + i);}
 	inline float operator[](unsigned int i) const {return *(&r + i);}
 	inline float& operator[](unsigned int i) {return *(&r + i);}
 	inline float& operator[](unsigned int i) {return *(&r + i);}
 
 
+	// Check whether a color is black
+	// TODO: add epsilon?
 	inline bool IsBlack() const
 	inline bool IsBlack() const
 	{
 	{
 		// The alpha component doesn't care here. black is black.
 		// The alpha component doesn't care here. black is black.
@@ -182,25 +232,35 @@ struct aiColor4D
 
 
 	//! Red, green, blue and alpha color values
 	//! Red, green, blue and alpha color values
 	float r, g, b, a;
 	float r, g, b, a;
-} PACK_STRUCT;
+} PACK_STRUCT;  // !struct aiColor4D
 
 
 #include "./Compiler/poppack1.h"
 #include "./Compiler/poppack1.h"
 
 
 
 
-// ---------------------------------------------------------------------------
-/** Represents a string, zero byte terminated 
+// ----------------------------------------------------------------------------------
+/** Represents a string, zero byte terminated.
+ *
+ *  We use this representation to be C-compatible. The length of such a string is
+ *  limited to MAXLEN characters (excluding the terminal zero).
 */
 */
 struct aiString
 struct aiString
 {
 {
 #ifdef __cplusplus
 #ifdef __cplusplus
-	inline aiString() :
+
+	//! Default constructor, the string is set to have zero length
+	aiString() :
 		length(0) 
 		length(0) 
 	{
 	{
 		data[0] = '\0';
 		data[0] = '\0';
+
+#ifdef _DEBUG
+		// Debug build: overwrite the string on its full length with ESC (27)
+		::memset(data+1,27,MAXLEN-1);
+#endif
 	}
 	}
 
 
 	//! Copy constructor
 	//! Copy constructor
-	inline aiString(const aiString& rOther) : 
+	aiString(const aiString& rOther) : 
 		length(rOther.length) 
 		length(rOther.length) 
 	{
 	{
 		::memcpy( data, rOther.data, rOther.length);
 		::memcpy( data, rOther.data, rOther.length);
@@ -208,14 +268,14 @@ struct aiString
 	}
 	}
 
 
 	//! Constructor from std::string
 	//! Constructor from std::string
-	inline aiString(const std::string& pString) : 
+	aiString(const std::string& pString) : 
 		length(pString.length()) 
 		length(pString.length()) 
 	{
 	{
 		memcpy( data, pString.c_str(), length);
 		memcpy( data, pString.c_str(), length);
 		data[length] = '\0';
 		data[length] = '\0';
 	}
 	}
 
 
-	//! copy a std::string to the aiString
+	//! Copy a std::string to the aiString
 	void Set( const std::string& pString)
 	void Set( const std::string& pString)
 	{
 	{
 		if( pString.length() > MAXLEN - 1)
 		if( pString.length() > MAXLEN - 1)
@@ -225,22 +285,45 @@ struct aiString
 		data[length] = 0;
 		data[length] = 0;
 	}
 	}
 
 
-	//! comparison operator
+	//! Copy a const char* to the aiString
+	void Set( const char* sz)
+	{
+		const size_t len = ::strlen(sz);
+		if( len > MAXLEN - 1)
+			return;
+		length = len;
+		::memcpy( data, sz, len);
+		data[len] = 0;
+	}
+
+	// Assign a const char* to the string
+	aiString& operator = (const char* sz)
+	{
+		Set(sz);
+		return *this;
+	}
+
+	// Assign a cstd::string to the string
+	aiString& operator = ( const std::string& pString)
+	{
+		Set(pString);
+		return *this;
+	}
+
+	//! Comparison operator
 	bool operator==(const aiString& other) const
 	bool operator==(const aiString& other) const
 	{
 	{
-		return  (length == other.length &&
-				 0 == strcmp(this->data,other.data));
+		return  (length == other.length && 0 == strcmp(this->data,other.data));
 	}
 	}
 
 
-	//! inverse comparison operator
+	//! Inverse comparison operator
 	bool operator!=(const aiString& other) const
 	bool operator!=(const aiString& other) const
 	{
 	{
-		return  (length != other.length ||
-				 0 != ::strcmp(this->data,other.data));
+		return  (length != other.length || 0 != ::strcmp(this->data,other.data));
 	}
 	}
 
 
 	//! Append a string to the string
 	//! Append a string to the string
-	inline void Append (const char* app)
+	void Append (const char* app)
 	{
 	{
 		const size_t len = ::strlen(app);
 		const size_t len = ::strlen(app);
 		if (!len)return;
 		if (!len)return;
@@ -252,11 +335,16 @@ struct aiString
 		length += len;
 		length += len;
 	}
 	}
 
 
-	//! Clear the string
-	inline void Clear ()
+	//! Clear the string - reset its length to zero
+	void Clear ()
 	{
 	{
 		length  = 0;
 		length  = 0;
 		data[0] = '\0';
 		data[0] = '\0';
+
+#ifdef _DEBUG
+		// Debug build: overwrite the string on its full length with ESC (27)
+		::memset(data+1,27,MAXLEN-1);
+#endif
 	}
 	}
 
 
 #endif // !__cplusplus
 #endif // !__cplusplus
@@ -266,10 +354,10 @@ struct aiString
 
 
 	//! String buffer. Size limit is MAXLEN
 	//! String buffer. Size limit is MAXLEN
 	char data[MAXLEN];
 	char data[MAXLEN];
-} ;
+} ;  // !struct aiString
 
 
 
 
-// ---------------------------------------------------------------------------
+// ----------------------------------------------------------------------------------
 /**	Standard return type for all library functions.
 /**	Standard return type for all library functions.
 *
 *
 * To check whether or not a function failed check against
 * To check whether or not a function failed check against
@@ -293,11 +381,33 @@ enum aiReturn
 	//! Indicates that an illegal argument has been
 	//! Indicates that an illegal argument has been
 	//! passed to a function. This is rarely used,
 	//! passed to a function. This is rarely used,
 	//! most functions assert in this case.
 	//! most functions assert in this case.
-	AI_INVALIDARG = -0x4
-};
+	AI_INVALIDARG = -0x4,
+
+	//! Force 32-bit size enum 
+	_AI_ENFORCE_ENUM_SIZE = 0x7fffffff 
+};  // !enum aiReturn
+
+
+// ----------------------------------------------------------------------------------
+/** Seek origins (for the virtual file system API)
+*/
+enum aiOrigin
+{
+	//! Beginning of the file
+	aiOrigin_SET = 0x0,	
+
+	//! Current position of the file pointer
+	aiOrigin_CUR = 0x1,		
+
+	//! End of the file, offsets must be negative
+	aiOrigin_END = 0x2,
+
+	//! Force 32-bit size enum 
+	_AI_ORIGIN_ENFORCE_ENUM_SIZE = 0x7fffffff 
+}; // !enum aiOrigin
 
 
 
 
-// ---------------------------------------------------------------------------
+// ----------------------------------------------------------------------------------
 /** Stores the memory requirements for different parts (e.g. meshes, materials,
 /** Stores the memory requirements for different parts (e.g. meshes, materials,
  *  animations) of an import.
  *  animations) of an import.
  *  @see Importer::GetMemoryRequirements()
  *  @see Importer::GetMemoryRequirements()
@@ -307,7 +417,7 @@ struct aiMemoryInfo
 #ifdef __cplusplus
 #ifdef __cplusplus
 
 
 	//! Default constructor
 	//! Default constructor
-	inline aiMemoryInfo()
+	aiMemoryInfo()
 		: textures   (0)
 		: textures   (0)
 		, materials  (0)
 		, materials  (0)
 		, meshes     (0)
 		, meshes     (0)
@@ -341,9 +451,9 @@ struct aiMemoryInfo
 	//! Storage allocated for light data, in bytes
 	//! Storage allocated for light data, in bytes
 	unsigned int lights;
 	unsigned int lights;
 
 
-	//! Storage allocated for the import, in bytes
+	//! Storage allocated for the full import, in bytes
 	unsigned int total;
 	unsigned int total;
-};
+}; // !struct aiMemoryInfo 
 
 
 
 
 #ifdef __cplusplus
 #ifdef __cplusplus

+ 63 - 26
include/aiVector2D.h

@@ -50,8 +50,9 @@ extern "C" {
 
 
 #include "./Compiler/pushpack1.h"
 #include "./Compiler/pushpack1.h"
 
 
-// ---------------------------------------------------------------------------
-/** Represents a two-dimensional vector. */
+// ----------------------------------------------------------------------------------
+/** Represents a two-dimensional vector. 
+ */
 struct aiVector2D
 struct aiVector2D
 {
 {
 #ifdef __cplusplus
 #ifdef __cplusplus
@@ -60,29 +61,58 @@ struct aiVector2D
 	aiVector2D (float _xyz) : x(_xyz), y(_xyz) {}
 	aiVector2D (float _xyz) : x(_xyz), y(_xyz) {}
 	aiVector2D (const aiVector2D& o) : x(o.x), y(o.y) {}
 	aiVector2D (const aiVector2D& o) : x(o.x), y(o.y) {}
 
 
-	void Set( float pX, float pY) { x = pX; y = pY;}
-	float SquareLength() const { return x*x + y*y; }
-	float Length() const { return sqrt( SquareLength()); }
-	aiVector2D& Normalize() { *this /= Length(); return *this; }
-	const aiVector2D& operator += (const aiVector2D& o) { x += o.x; y += o.y;  return *this; }
-	const aiVector2D& operator -= (const aiVector2D& o) { x -= o.x; y -= o.y;  return *this; }
-	const aiVector2D& operator *= (float f) { x *= f; y *= f;  return *this; }
-	const aiVector2D& operator /= (float f) { x /= f; y /= f;  return *this; }
-
-	inline float operator[](unsigned int i) const {return *(&x + i);}
-	inline float& operator[](unsigned int i) {return *(&x + i);}
-
-	inline bool operator== (const aiVector2D& other) const
-		{return x == other.x && y == other.y;}
-
-	inline bool operator!= (const aiVector2D& other) const
-		{return x != other.x || y != other.y;}
-
-	inline aiVector2D& operator= (float f)
-		{x = y = f;return *this;}
-
-	const aiVector2D SymMul(const aiVector2D& o)
-		{return aiVector2D(x*o.x,y*o.y);}
+	void Set( float pX, float pY) { 
+		x = pX; y = pY;
+	}
+	
+	float SquareLength() const {
+		return x*x + y*y; 
+	}
+	
+	float Length() const {
+		return ::sqrt( SquareLength());
+	}
+
+	aiVector2D& Normalize() { 
+		*this /= Length(); return *this;
+	}
+
+	const aiVector2D& operator += (const aiVector2D& o) {
+		x += o.x; y += o.y;  return *this; 
+	}
+	const aiVector2D& operator -= (const aiVector2D& o) {
+		x -= o.x; y -= o.y;  return *this; 
+	}
+	const aiVector2D& operator *= (float f) { 
+		x *= f; y *= f;  return *this; 
+	}
+	const aiVector2D& operator /= (float f) {
+		x /= f; y /= f;  return *this; 
+	}
+
+	float operator[](unsigned int i) const {
+		return *(&x + i);
+	}
+
+	float& operator[](unsigned int i) {
+		return *(&x + i);
+	}
+
+	bool operator== (const aiVector2D& other) const {
+		return x == other.x && y == other.y;
+	}
+
+	bool operator!= (const aiVector2D& other) const {
+		return x != other.x || y != other.y;
+	}
+
+	aiVector2D& operator= (float f)	{
+		x = y = f;return *this;
+	}
+
+	const aiVector2D SymMul(const aiVector2D& o) {
+		return aiVector2D(x*o.x,y*o.y);
+	}
 
 
 #endif // __cplusplus
 #endif // __cplusplus
 
 
@@ -94,36 +124,42 @@ struct aiVector2D
 #ifdef __cplusplus
 #ifdef __cplusplus
 } // end extern "C"
 } // end extern "C"
 
 
+// ----------------------------------------------------------------------------------
 // symmetric addition
 // symmetric addition
 inline aiVector2D operator + (const aiVector2D& v1, const aiVector2D& v2)
 inline aiVector2D operator + (const aiVector2D& v1, const aiVector2D& v2)
 {
 {
 	return aiVector2D( v1.x + v2.x, v1.y + v2.y);
 	return aiVector2D( v1.x + v2.x, v1.y + v2.y);
 }
 }
 
 
+// ----------------------------------------------------------------------------------
 // symmetric subtraction
 // symmetric subtraction
 inline aiVector2D operator - (const aiVector2D& v1, const aiVector2D& v2)
 inline aiVector2D operator - (const aiVector2D& v1, const aiVector2D& v2)
 {
 {
 	return aiVector2D( v1.x - v2.x, v1.y - v2.y);
 	return aiVector2D( v1.x - v2.x, v1.y - v2.y);
 }
 }
 
 
+// ----------------------------------------------------------------------------------
 // scalar product
 // scalar product
 inline float operator * (const aiVector2D& v1, const aiVector2D& v2)
 inline float operator * (const aiVector2D& v1, const aiVector2D& v2)
 {
 {
 	return v1.x*v2.x + v1.y*v2.y;
 	return v1.x*v2.x + v1.y*v2.y;
 }
 }
 
 
+// ----------------------------------------------------------------------------------
 // scalar multiplication
 // scalar multiplication
 inline aiVector2D operator * ( float f, const aiVector2D& v)
 inline aiVector2D operator * ( float f, const aiVector2D& v)
 {
 {
 	return aiVector2D( f*v.x, f*v.y);
 	return aiVector2D( f*v.x, f*v.y);
 }
 }
 
 
+// ----------------------------------------------------------------------------------
 // and the other way around
 // and the other way around
 inline aiVector2D operator * ( const aiVector2D& v, float f)
 inline aiVector2D operator * ( const aiVector2D& v, float f)
 {
 {
 	return aiVector2D( f*v.x, f*v.y);
 	return aiVector2D( f*v.x, f*v.y);
 }
 }
 
 
+// ----------------------------------------------------------------------------------
 // scalar division
 // scalar division
 inline aiVector2D operator / ( const aiVector2D& v, float f)
 inline aiVector2D operator / ( const aiVector2D& v, float f)
 {
 {
@@ -131,12 +167,14 @@ inline aiVector2D operator / ( const aiVector2D& v, float f)
 	return v * (1/f);
 	return v * (1/f);
 }
 }
 
 
+// ----------------------------------------------------------------------------------
 // vector division
 // vector division
 inline aiVector2D operator / ( const aiVector2D& v, const aiVector2D& v2)
 inline aiVector2D operator / ( const aiVector2D& v, const aiVector2D& v2)
 {
 {
 	return aiVector2D(v.x / v2.x,v.y / v2.y);
 	return aiVector2D(v.x / v2.x,v.y / v2.y);
 }
 }
 
 
+// ----------------------------------------------------------------------------------
 // vector inversion
 // vector inversion
 inline aiVector2D operator - ( const aiVector2D& v)
 inline aiVector2D operator - ( const aiVector2D& v)
 {
 {
@@ -144,5 +182,4 @@ inline aiVector2D operator - ( const aiVector2D& v)
 }
 }
 
 
 #endif // __cplusplus
 #endif // __cplusplus
-
 #endif // AI_VECTOR2D_H_INC
 #endif // AI_VECTOR2D_H_INC

+ 63 - 40
include/assimp.hpp

@@ -40,8 +40,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
 */
 
 
 /** @file Defines the C++-API to the Open Asset Import Library. */
 /** @file Defines the C++-API to the Open Asset Import Library. */
-#ifndef __AI_ASSIMP_HPP_INC__
-#define __AI_ASSIMP_HPP_INC__
+#ifndef INCLUDED_AI_ASSIMP_HPP
+#define INCLUDED_AI_ASSIMP_HPP
 
 
 #ifndef __cplusplus
 #ifndef __cplusplus
 #	error This header requires C++ to be used. Use Assimp's C-API (assimp.h) \
 #	error This header requires C++ to be used. Use Assimp's C-API (assimp.h) \
@@ -51,24 +51,31 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include <map>
 #include <map>
 #include <vector>
 #include <vector>
 
 
-// Public ASSIMP headers
+// Public ASSIMP data structure headers
 #include "aiTypes.h"
 #include "aiTypes.h"
 #include "aiConfig.h"
 #include "aiConfig.h"
 #include "aiAssert.h"
 #include "aiAssert.h"
 
 
-namespace Assimp
-{
-	// Public interface
+namespace Assimp	{
+
+	// =======================================================================
+	// Public interface to Assimp 
+	// =======================================================================
 	class Importer;
 	class Importer;
 	class IOStream;
 	class IOStream;
 	class IOSystem;
 	class IOSystem;
 
 
+	// =======================================================================
 	// Plugin development
 	// Plugin development
+	// Include the following headers for the definitions:
+	// =======================================================================
+	// BaseImporter.h
+	// BaseProcess.h
 	class BaseImporter;
 	class BaseImporter;
 	class BaseProcess;
 	class BaseProcess;
 	class SharedPostProcessInfo;
 	class SharedPostProcessInfo;
 	class BatchLoader;
 	class BatchLoader;
-}
+} //! namespace Assimp
 
 
 #define AI_PROPERTY_WAS_NOT_EXISTING 0xffffffff
 #define AI_PROPERTY_WAS_NOT_EXISTING 0xffffffff
 
 
@@ -76,20 +83,22 @@ struct aiScene;
 struct aiFileIO;
 struct aiFileIO;
 extern "C" ASSIMP_API const aiScene* aiImportFileEx( const char*, unsigned int, aiFileIO*);
 extern "C" ASSIMP_API const aiScene* aiImportFileEx( const char*, unsigned int, aiFileIO*);
 
 
-namespace Assimp
-{
+namespace Assimp	{
 
 
-// ---------------------------------------------------------------------------
+// ----------------------------------------------------------------------------------
 /** The Importer class forms an C++ interface to the functionality of the 
 /** The Importer class forms an C++ interface to the functionality of the 
-*   Asset Import library.
+*   Open Asset Import Library.
 *
 *
 * Create an object of this class and call ReadFile() to import a file. 
 * Create an object of this class and call ReadFile() to import a file. 
 * If the import succeeds, the function returns a pointer to the imported data. 
 * If the import succeeds, the function returns a pointer to the imported data. 
 * The data remains property of the object, it is intended to be accessed 
 * The data remains property of the object, it is intended to be accessed 
 * read-only. The imported data will be destroyed along with the Importer 
 * read-only. The imported data will be destroyed along with the Importer 
-* object. If the import failes, ReadFile() returns a NULL pointer. In this
+* object. If the import fails, ReadFile() returns a NULL pointer. In this
 * case you can retrieve a human-readable error description be calling 
 * case you can retrieve a human-readable error description be calling 
-* GetErrorString().
+* GetErrorString(). You can call ReadFile() multiple times with a single Importer
+* instance. Actually, constructing Importer objects involves quite many
+* allocations and may take some time, so it's better to reuse them as often as
+* possible.
 *
 *
 * If you need the Importer to do custom file handling to access the files,
 * If you need the Importer to do custom file handling to access the files,
 * implement IOSystem and IOStream and supply an instance of your custom 
 * implement IOSystem and IOStream and supply an instance of your custom 
@@ -98,7 +107,7 @@ namespace Assimp
 * standard C++ IO logic will be used.
 * standard C++ IO logic will be used.
 *
 *
 * @note One Importer instance is not thread-safe. If you use multiple
 * @note One Importer instance is not thread-safe. If you use multiple
-* threads for loading each thread should manage its own Importer instance.
+* threads for loading each thread should maintain its own Importer instance.
 */
 */
 class ASSIMP_API Importer
 class ASSIMP_API Importer
 {
 {
@@ -123,6 +132,17 @@ public:
 	 */
 	 */
 	Importer();
 	Importer();
 
 
+
+	// -------------------------------------------------------------------
+	/** Copy constructor.
+	 * 
+	 * This copies the configuration properties of another Importer.
+	 * If this Importer owns a scene it won't be copied.
+	 * Call ReadFile() to start the import process.
+	 */
+	Importer(const Importer& other);
+
+
 	// -------------------------------------------------------------------
 	// -------------------------------------------------------------------
 	/** Destructor. The object kept ownership of the imported data,
 	/** Destructor. The object kept ownership of the imported data,
 	 * which now will be destroyed along with the object. 
 	 * which now will be destroyed along with the object. 
@@ -298,6 +318,16 @@ public:
 	const aiScene* ReadFile( const std::string& pFile, unsigned int pFlags);
 	const aiScene* ReadFile( const std::string& pFile, unsigned int pFlags);
 
 
 
 
+	// -------------------------------------------------------------------
+	/** Frees the current scene.
+	 *
+	 *  The function does nothing if no scene has previously been 
+	 *  read via ReadFile(). FreeScene() is called automatically by the
+	 *  destructor and ReadFile() itself.
+	 */
+	void FreeScene( );
+
+
 	// -------------------------------------------------------------------
 	// -------------------------------------------------------------------
 	/** Returns an error description of an error that occured in ReadFile(). 
 	/** Returns an error description of an error that occured in ReadFile(). 
 	*
 	*
@@ -305,7 +335,7 @@ public:
 	* @return A description of the last error, an empty string if no 
 	* @return A description of the last error, an empty string if no 
 	*   error occured.
 	*   error occured.
 	*/
 	*/
-	inline const std::string& GetErrorString() const;
+	const std::string& GetErrorString() const;
 
 
 
 
 	// -------------------------------------------------------------------
 	// -------------------------------------------------------------------
@@ -324,7 +354,8 @@ public:
 	*
 	*
 	* If a file extension is contained in the list this does, of course, not
 	* If a file extension is contained in the list this does, of course, not
 	* mean that ASSIMP is able to load all files with this extension.
 	* mean that ASSIMP is able to load all files with this extension.
-	* @param szOut String to receive the extension list.
+	* @param szOut String to receive the extension list. It just means there
+    *   is a loader which handles such files.
 	*   Format of the list: "*.3ds;*.obj;*.dae". 
 	*   Format of the list: "*.3ds;*.obj;*.dae". 
 	*/
 	*/
 	void GetExtensionList(std::string& szOut);
 	void GetExtensionList(std::string& szOut);
@@ -347,7 +378,7 @@ public:
 	 *
 	 *
 	 * @return Current scene or NULL if there is currently no scene loaded
 	 * @return Current scene or NULL if there is currently no scene loaded
 	 */
 	 */
-	inline const aiScene* GetScene();
+	const aiScene* GetScene() const;
 
 
 
 
 	// -------------------------------------------------------------------
 	// -------------------------------------------------------------------
@@ -359,7 +390,7 @@ public:
 	 *
 	 *
 	 * @return Current scene or NULL if there is currently no scene loaded
 	 * @return Current scene or NULL if there is currently no scene loaded
 	 */
 	 */
-	inline const aiScene* GetOrphanedScene();
+	aiScene* GetOrphanedScene();
 
 
 
 
 	// -------------------------------------------------------------------
 	// -------------------------------------------------------------------
@@ -376,12 +407,7 @@ public:
 	* all steps behave consequently in the same manner when modifying
 	* all steps behave consequently in the same manner when modifying
 	* data structures.
 	* data structures.
 	*/
 	*/
-	inline void SetExtraVerbose(bool bDo);
-
-private:
-
-	/** Empty copy constructor. */
-	Importer(const Importer &other);
+	void SetExtraVerbose(bool bDo);
 
 
 protected:
 protected:
 
 
@@ -419,33 +445,30 @@ protected:
 
 
 	/** Used by post-process steps to share data */
 	/** Used by post-process steps to share data */
 	SharedPostProcessInfo* mPPShared;
 	SharedPostProcessInfo* mPPShared;
-};
+}; //! class Importer
 
 
-// ---------------------------------------------------------------------------
-// inline methods for Importer
+// ----------------------------------------------------------------------------------
 inline const std::string& Importer::GetErrorString() const 
 inline const std::string& Importer::GetErrorString() const 
 { 
 { 
 	return mErrorString;
 	return mErrorString;
 }
 }
-
+// ----------------------------------------------------------------------------------
 inline void Importer::SetExtraVerbose(bool bDo)
 inline void Importer::SetExtraVerbose(bool bDo)
 {
 {
 	bExtraVerbose = bDo;
 	bExtraVerbose = bDo;
 }
 }
-
-inline const aiScene* Importer::GetOrphanedScene()
+// ----------------------------------------------------------------------------------
+inline const aiScene* Importer::GetScene() const
 {
 {
-	aiScene* scene = mScene;
-	mScene = NULL;
-	return scene;
+	return mScene;
 }
 }
-
-inline const aiScene* Importer::GetScene()
+// ----------------------------------------------------------------------------------
+inline aiScene* Importer::GetOrphanedScene()
 {
 {
-	return mScene;
+	aiScene* s = mScene;
+	mScene = NULL;
+	return s;
 }
 }
 
 
-
-} // End of namespace Assimp
-
-#endif // __AI_ASSIMP_HPP_INC
+} // !namespace Assimp
+#endif // INCLUDED_AI_ASSIMP_HPP

+ 28 - 17
test/RunSingleUnitTestSuite.bat

@@ -1,24 +1,35 @@
-rem Alexander Gessler, 12:30:08
 
 
+rem ------------------------------------------------------------------------------
+rem Tiny script to execute a single unit test suite.
+rem 
+rem Usage:
+rem    SET  OUTDIR=<directory_for_test_results>
+rem    SET  BINDIR=<directory_where_binaries_are_stored>
+rem
+rem    CALL RunSingleUnitTestSuite <name_of_test> <output_file>
+rem
+rem Post:
+rem    FIRSTUTNA       - if the test wasn't found, receives the test name
+rem    FIRSTUTFAILUR   - if the test failed, receives the test name
+rem
+rem ------------------------------------------------------------------------------
 
 
-if exist %BINDIR%\%1\UnitTest.exe goto test1
+rem Check whether the 
+IF NOT EXIST %BINDIR%\%1\unit.exe (
 
 
-echo NOT AVAILABLE. Please rebuild this configuration
-echo Unable to find %BINDIR%\%1\UnitTest.exe > %OUTDIR%%2
-SET FIRSTUTNA=%2
-goto end:
+   echo NOT AVAILABLE. Please rebuild this configuration
+   echo Unable to find %BINDIR%\%1\unit.exe > %OUTDIR%%2
+   SET FIRSTUTNA=%2
+) ELSE (
 
 
-:test1
-%BINDIR%\%1\UnitTest.exe > %OUTDIR%%2
-if     errorlevel == 0 goto succ
+   %BINDIR%\%1\unit.exe > %OUTDIR%%2
+   IF errorlevel == 0 ( 
+      echo SUCCESS
+   ) ELSE (
+      echo FAILURE, check output file: %2
+      SET FIRSTUTFAILURE=%2
+   )
+)
 
 
-echo FAILURE, check output file: %2
-SET FIRSTUTFAILURE=%2
-goto end
-
-:succ
-echo SUCCESS
-
-:end
 echo.
 echo.
 echo.
 echo.

+ 25 - 18
test/RunUnitTestSuite.bat

@@ -1,16 +1,23 @@
-rem Alexander Gessler, 12:30:08
+rem ------------------------------------------------------------------------------
+rem Tiny script to execute Assimp's fully unit test suite for all configurations
+rem 
+rem Usage: call RunUnitTestSuite
+rem ------------------------------------------------------------------------------
 
 
+rem Setup the console environment
 set errorlevel=0
 set errorlevel=0
 color 4e
 color 4e
 cls
 cls
 
 
 @echo off
 @echo off
 
 
-rem 
+rem Setup target architecture
 SET ARCHEXT=x64
 SET ARCHEXT=x64
-IF %PROCESSOR_ARCHITECTURE% == x86 SET ARCHEXT=win32
-
+IF %PROCESSOR_ARCHITECTURE% == x86 (
+   SET ARCHEXT=win32
+)
 
 
+rem Setup standard paths from here
 SET OUTDIR=results\
 SET OUTDIR=results\
 SET BINDIR=..\bin\
 SET BINDIR=..\bin\
 SET FIRSTUTFAILURE=none
 SET FIRSTUTFAILURE=none
@@ -39,50 +46,50 @@ echo.
 echo ======================================================================
 echo ======================================================================
 echo Config: Release (Multi-threaded, using boost)
 echo Config: Release (Multi-threaded, using boost)
 echo ======================================================================
 echo ======================================================================
-call RunSingleUnitTestSuite unittest_release_%ARCHEXT% release.txt
+call RunSingleUnitTestSuite unit_release_%ARCHEXT% release.txt
 
 
 
 
 echo ======================================================================
 echo ======================================================================
 echo Config: Release -st (Single-threaded, using boost)
 echo Config: Release -st (Single-threaded, using boost)
 echo ======================================================================
 echo ======================================================================
-call RunSingleUnitTestSuite unittest_release-st_%ARCHEXT% release-st.txt
+call RunSingleUnitTestSuite unit_release-st_%ARCHEXT% release-st.txt
 
 
 
 
 echo ======================================================================
 echo ======================================================================
 echo Config: Release -noboost (NoBoost workaround, implicit -st)
 echo Config: Release -noboost (NoBoost workaround, implicit -st)
 echo ======================================================================
 echo ======================================================================
-call RunSingleUnitTestSuite unittest_release-noboost_%ARCHEXT% release-st-noboost.txt
+call RunSingleUnitTestSuite unit_release-noboost-st_%ARCHEXT% release-st-noboost.txt
 
 
 
 
 echo ======================================================================
 echo ======================================================================
 echo Config: Release -DLL (Multi-threaded DLL, using boost)
 echo Config: Release -DLL (Multi-threaded DLL, using boost)
 echo ======================================================================
 echo ======================================================================
-call RunSingleUnitTestSuite unittest_release-dll_%ARCHEXT% release-dll.txt
+call RunSingleUnitTestSuite unit_release-dll_%ARCHEXT% release-dll.txt
 
 
 
 
 echo ======================================================================
 echo ======================================================================
 echo Config: Debug (Multi-threaded, using boost)
 echo Config: Debug (Multi-threaded, using boost)
 echo ======================================================================
 echo ======================================================================
-call RunSingleUnitTestSuite unittest_debug_%ARCHEXT% debug.txt
+call RunSingleUnitTestSuite unit_debug_%ARCHEXT% debug.txt
 
 
 
 
 
 
 echo ======================================================================
 echo ======================================================================
 echo Config: Debug -st (Single-threaded, using boost)
 echo Config: Debug -st (Single-threaded, using boost)
 echo ======================================================================
 echo ======================================================================
-call RunSingleUnitTestSuite unittest_debug_st_%ARCHEXT% debug-st.txt
+call RunSingleUnitTestSuite unit_debug-st_%ARCHEXT% debug-st.txt
 
 
 
 
 echo ======================================================================
 echo ======================================================================
 echo Config: Debug -noboost (NoBoost workaround, implicit -st)
 echo Config: Debug -noboost (NoBoost workaround, implicit -st)
 echo ======================================================================
 echo ======================================================================
-call RunSingleUnitTestSuite unittest_debug-noboost_%ARCHEXT% debug-st-noboost.txt
+call RunSingleUnitTestSuite unit_debug-noboost-st_%ARCHEXT% debug-st-noboost.txt
 
 
 
 
 echo ======================================================================
 echo ======================================================================
 echo Config: Debug -DLL (Multi-threaded, using boost)
 echo Config: Debug -DLL (Multi-threaded, using boost)
 echo ======================================================================
 echo ======================================================================
-call RunSingleUnitTestSuite unittest_debug-dll_%ARCHEXT% debug-dll.txt
+call RunSingleUnitTestSuite unit_debug-dll_%ARCHEXT% debug-dll.txt
 
 
 
 
 
 
@@ -90,15 +97,15 @@ call RunSingleUnitTestSuite unittest_debug-dll_%ARCHEXT% debug-dll.txt
 echo.
 echo.
 echo ----------------------------------------------------------------------
 echo ----------------------------------------------------------------------
 
 
-IF FIRSTUTNA==none goto end2
-echo One or more test configs are not available.
+IF NOT FIRSTUTNA==none (
+   echo One or more test configs are not available.
+)
 
 
-:end2
-IF FIRSTUTFAILURE==none goto end
-echo One or more tests failed.
+IF NOT FIRSTUTFAILURE==none (
+   echo One or more tests failed.
+)
 
 
 echo ----------------------------------------------------------------------
 echo ----------------------------------------------------------------------
 echo.
 echo.
 
 
-:end
 pause
 pause

+ 35 - 0
test/unit/BoostWorkaround/tupletest.cpp

@@ -0,0 +1,35 @@
+
+
+#include "../../../include/BoostWorkaround/boost/tuple/tuple.hpp"
+
+struct another
+{int dummy;};
+
+boost::tuple<unsigned,unsigned,unsigned> first;
+boost::tuple<int,float,double,bool,another> second;
+boost::tuple<> third;
+boost::tuple<float,float,float> last;
+
+void test () {
+
+	// Implicit conversion
+	first = boost::make_tuple(4,4,4);
+
+	// FIXME: Explicit conversion not really required yet
+	last  = (boost::tuple<float,float,float>)boost::make_tuple(4.,4.,4.);	
+
+	// Non-const access
+	first.get<0>() = 1;
+	first.get<1>() = 2;
+	first.get<2>() = 3;
+
+	float f = last.get<2>();
+	bool  b = second.get<3>();
+
+	// Const cases
+	const boost::tuple<unsigned,unsigned,unsigned> constant = boost::make_tuple(4,4,4);
+	first.get<0>() = constant.get<0>();
+
+	// Direct assignment w. explicit conversion
+	last = first;
+}

+ 7 - 0
test/unit/CCompilerTest.c

@@ -0,0 +1,7 @@
+
+// This is just a small test to check whether Assimp's API compiles from C
+
+#include <aiTypes.h>
+#include <aiPostProcess.h>
+#include <aiScene.h>
+#include <assimp.h>

+ 0 - 28
test/unit/ExecuteUnitTestWin32.bat

@@ -1,28 +0,0 @@
-
-
-
-cd ..
-cd ..
-cd bin
-cd unittest_release_win32
-
-color 4e
-cls
-
-@echo off
-
-
-echo ----------------------------------------------------------------------
-echo _
-echo Open Asset Import Library - Unittests
-echo _
-echo ----------------------------------------------------------------------
-echo _
-echo _
-
-UnitTest.exe
-
-echo _
-echo ----------------------------------------------------------------------
-
-pause

+ 0 - 28
test/unit/ExecuteUnitTestWin64.bat

@@ -1,28 +0,0 @@
-
-
-
-cd ..
-cd ..
-cd bin
-cd unittest_release_x64
-
-color 4e
-cls
-
-@echo off
-
-
-echo ----------------------------------------------------------------------
-echo _
-echo Open Asset Import Library - Unittests
-echo _
-echo ----------------------------------------------------------------------
-echo _
-echo _
-
-UnitTest.exe
-
-echo _
-echo ----------------------------------------------------------------------
-
-pause

+ 16 - 0
test/unit/Main.cpp

@@ -1,5 +1,7 @@
 
 
+#include "UnitTestPCH.h"
 
 
+//#include <cppunit/XMLOutputter.h>
 #include <cppunit/CompilerOutputter.h>
 #include <cppunit/CompilerOutputter.h>
 #include <cppunit/extensions/TestFactoryRegistry.h>
 #include <cppunit/extensions/TestFactoryRegistry.h>
 #include <cppunit/TestResult.h>
 #include <cppunit/TestResult.h>
@@ -16,6 +18,10 @@ int main (int argc, char* argv[])
 	time_t t;time(&t);
 	time_t t;time(&t);
 	srand((unsigned int)t);
 	srand((unsigned int)t);
 
 
+	// create a logger
+	Assimp::DefaultLogger::create("AssimpLog.txt",Assimp::Logger::VERBOSE,
+		Assimp::DLS_DEBUGGER | Assimp::DLS_FILE);
+
     // Informiert Test-Listener ueber Testresultate
     // Informiert Test-Listener ueber Testresultate
     CPPUNIT_NS :: TestResult testresult;
     CPPUNIT_NS :: TestResult testresult;
 
 
@@ -36,6 +42,16 @@ int main (int argc, char* argv[])
 	CPPUNIT_NS :: CompilerOutputter compileroutputter (&collectedresults, std::cerr);
 	CPPUNIT_NS :: CompilerOutputter compileroutputter (&collectedresults, std::cerr);
     compileroutputter.write ();
     compileroutputter.write ();
 
 
+#if 0
+	// Resultate im XML-Format ausgeben
+	std::ofstream of("output.xml");
+	CPPUNIT_NS :: XmlOutputter xml (&collectedresults, of);
+    xml.write ();
+#endif
+
+	// kill the logger again
+	Assimp::DefaultLogger::kill();
+
     // Rueckmeldung, ob Tests erfolgreich waren
     // Rueckmeldung, ob Tests erfolgreich waren
     return collectedresults.wasSuccessful () ? 0 : 1;
     return collectedresults.wasSuccessful () ? 0 : 1;
 }
 }

+ 3 - 0
test/unit/UnitTestPCH.cpp

@@ -0,0 +1,3 @@
+
+// Unit used to build the precompiled header
+#include "UnitTestPCH.h"

+ 21 - 0
test/unit/UnitTestPCH.h

@@ -0,0 +1,21 @@
+
+
+#ifndef ASSIMP_BUILD_SINGLETHREADED
+#	include <boost/thread.hpp>
+#endif
+
+// Assimp public API
+#include <aiPostProcess.h>
+#include <aiScene.h>
+#include <assimp.hpp>
+#include <DefaultLogger.h>
+
+
+// CPPUNIT
+#include <cppunit/TestFixture.h>
+#include <cppunit/extensions/HelperMacros.h>
+
+#include <math.h>
+
+#undef min
+#undef max

+ 7 - 9
test/unit/utFindInvalidData.cpp

@@ -1,10 +1,11 @@
 
 
+#include "UnitTestPCH.h"
 #include "utFindInvalidData.h"
 #include "utFindInvalidData.h"
 
 
 
 
 CPPUNIT_TEST_SUITE_REGISTRATION (FindInvalidDataProcessTest);
 CPPUNIT_TEST_SUITE_REGISTRATION (FindInvalidDataProcessTest);
 
 
-
+// ------------------------------------------------------------------------------------------------
 void FindInvalidDataProcessTest :: setUp (void)
 void FindInvalidDataProcessTest :: setUp (void)
 {
 {
 	CPPUNIT_ASSERT( AI_MAX_NUMBER_OF_TEXTURECOORDS >= 3);
 	CPPUNIT_ASSERT( AI_MAX_NUMBER_OF_TEXTURECOORDS >= 3);
@@ -19,7 +20,7 @@ void FindInvalidDataProcessTest :: setUp (void)
 
 
 	pcMesh->mNormals = new aiVector3D[1000];
 	pcMesh->mNormals = new aiVector3D[1000];
 	for (unsigned int i = 0; i < 1000;++i)
 	for (unsigned int i = 0; i < 1000;++i)
-		pcMesh->mNormals[i] = aiVector3D((float)i);
+		pcMesh->mNormals[i] = aiVector3D((float)i+1);
 
 
 	pcMesh->mTangents = new aiVector3D[1000];
 	pcMesh->mTangents = new aiVector3D[1000];
 	for (unsigned int i = 0; i < 1000;++i)
 	for (unsigned int i = 0; i < 1000;++i)
@@ -37,12 +38,14 @@ void FindInvalidDataProcessTest :: setUp (void)
 	}
 	}
 }
 }
 
 
+// ------------------------------------------------------------------------------------------------
 void FindInvalidDataProcessTest :: tearDown (void)
 void FindInvalidDataProcessTest :: tearDown (void)
 {
 {
 	delete piProcess;
 	delete piProcess;
 	delete pcMesh;
 	delete pcMesh;
 }
 }
 
 
+// ------------------------------------------------------------------------------------------------
 void FindInvalidDataProcessTest :: testStepNegativeResult (void)
 void FindInvalidDataProcessTest :: testStepNegativeResult (void)
 {
 {
 	::memset(pcMesh->mNormals,0,pcMesh->mNumVertices*sizeof(aiVector3D));
 	::memset(pcMesh->mNormals,0,pcMesh->mNumVertices*sizeof(aiVector3D));
@@ -53,22 +56,19 @@ void FindInvalidDataProcessTest :: testStepNegativeResult (void)
 	piProcess->ProcessMesh(pcMesh);
 	piProcess->ProcessMesh(pcMesh);
 
 
 	CPPUNIT_ASSERT(NULL != pcMesh->mVertices);
 	CPPUNIT_ASSERT(NULL != pcMesh->mVertices);
-
 	CPPUNIT_ASSERT(NULL == pcMesh->mNormals);
 	CPPUNIT_ASSERT(NULL == pcMesh->mNormals);
 	CPPUNIT_ASSERT(NULL == pcMesh->mTangents);
 	CPPUNIT_ASSERT(NULL == pcMesh->mTangents);
 	CPPUNIT_ASSERT(NULL == pcMesh->mBitangents);
 	CPPUNIT_ASSERT(NULL == pcMesh->mBitangents);
 
 
 	
 	
 	for (unsigned int i = 0; i < 2;++i)
 	for (unsigned int i = 0; i < 2;++i)
-	{
 		CPPUNIT_ASSERT(NULL != pcMesh->mTextureCoords[i]);
 		CPPUNIT_ASSERT(NULL != pcMesh->mTextureCoords[i]);
-	}
+	
 	for (unsigned int i = 2; i < AI_MAX_NUMBER_OF_TEXTURECOORDS;++i)
 	for (unsigned int i = 2; i < AI_MAX_NUMBER_OF_TEXTURECOORDS;++i)
-	{
 		CPPUNIT_ASSERT(NULL == pcMesh->mTextureCoords[i]);
 		CPPUNIT_ASSERT(NULL == pcMesh->mTextureCoords[i]);
-	}
 }
 }
 
 
+// ------------------------------------------------------------------------------------------------
 void FindInvalidDataProcessTest :: testStepPositiveResult (void)
 void FindInvalidDataProcessTest :: testStepPositiveResult (void)
 {
 {
 	piProcess->ProcessMesh(pcMesh);
 	piProcess->ProcessMesh(pcMesh);
@@ -80,7 +80,5 @@ void FindInvalidDataProcessTest :: testStepPositiveResult (void)
 	CPPUNIT_ASSERT(NULL != pcMesh->mBitangents);
 	CPPUNIT_ASSERT(NULL != pcMesh->mBitangents);
 
 
 	for (unsigned int i = 0; i < AI_MAX_NUMBER_OF_TEXTURECOORDS;++i)
 	for (unsigned int i = 0; i < AI_MAX_NUMBER_OF_TEXTURECOORDS;++i)
-	{
 		CPPUNIT_ASSERT(NULL != pcMesh->mTextureCoords[i]);
 		CPPUNIT_ASSERT(NULL != pcMesh->mTextureCoords[i]);
-	}
 }
 }

+ 0 - 5
test/unit/utFindInvalidData.h

@@ -1,14 +1,9 @@
 #ifndef TESTNORMALS_H
 #ifndef TESTNORMALS_H
 #define TESTNORMALS_H
 #define TESTNORMALS_H
 
 
-#include <cppunit/TestFixture.h>
-#include <cppunit/extensions/HelperMacros.h>
 
 
-#include <aiTypes.h>
-#include <aiScene.h>
 #include <FindInvalidDataProcess.h>
 #include <FindInvalidDataProcess.h>
 
 
-
 using namespace std;
 using namespace std;
 using namespace Assimp;
 using namespace Assimp;
 
 

+ 2 - 0
test/unit/utFixInfacingNormals.cpp

@@ -0,0 +1,2 @@
+
+#include "UnitTestPCH.h"

+ 5 - 3
test/unit/utGenNormals.cpp

@@ -1,4 +1,5 @@
 
 
+#include "UnitTestPCH.h"
 #include "utGenNormals.h"
 #include "utGenNormals.h"
 
 
 
 
@@ -6,8 +7,9 @@ CPPUNIT_TEST_SUITE_REGISTRATION (GenNormalsTest);
 
 
 void GenNormalsTest :: setUp (void)
 void GenNormalsTest :: setUp (void)
 {
 {
-	this->piProcess = new GenVertexNormalsProcess();
-	this->pcMesh = new aiMesh();
+	piProcess = new GenVertexNormalsProcess();
+	pcMesh = new aiMesh();
+	pcMesh->mPrimitiveTypes = aiPrimitiveType_TRIANGLE;
 	pcMesh->mNumFaces = 1;
 	pcMesh->mNumFaces = 1;
 	pcMesh->mFaces = new aiFace[1];
 	pcMesh->mFaces = new aiFace[1];
 	pcMesh->mFaces[0].mIndices = new unsigned int[pcMesh->mFaces[0].mNumIndices = 3];
 	pcMesh->mFaces[0].mIndices = new unsigned int[pcMesh->mFaces[0].mNumIndices = 3];
@@ -29,6 +31,6 @@ void GenNormalsTest :: tearDown (void)
 
 
 void  GenNormalsTest :: testSimpleTriangle (void)
 void  GenNormalsTest :: testSimpleTriangle (void)
 {
 {
-	this->piProcess->GenMeshVertexNormals(pcMesh,0);
+	piProcess->GenMeshVertexNormals(pcMesh,0);
 	CPPUNIT_ASSERT(0 != pcMesh->mNormals);
 	CPPUNIT_ASSERT(0 != pcMesh->mNormals);
 }
 }

+ 2 - 0
test/unit/utImporter.cpp

@@ -1,3 +1,5 @@
+
+#include "UnitTestPCH.h"
 #include "utImporter.h"
 #include "utImporter.h"
 
 
 
 

+ 1 - 1
test/unit/utImporter.h

@@ -5,7 +5,7 @@
 #include <cppunit/extensions/HelperMacros.h>
 #include <cppunit/extensions/HelperMacros.h>
 
 
 #include <assimp.hpp>
 #include <assimp.hpp>
-
+#include <BaseImporter.h>
 
 
 using namespace std;
 using namespace std;
 using namespace Assimp;
 using namespace Assimp;

+ 2 - 0
test/unit/utImproveCacheLocality.cpp

@@ -0,0 +1,2 @@
+
+#include "UnitTestPCH.h"

+ 7 - 3
test/unit/utJoinVertices.cpp

@@ -1,17 +1,19 @@
 
 
+#include "UnitTestPCH.h"
 #include "utJoinVertices.h"
 #include "utJoinVertices.h"
 
 
 
 
 CPPUNIT_TEST_SUITE_REGISTRATION (JoinVerticesTest);
 CPPUNIT_TEST_SUITE_REGISTRATION (JoinVerticesTest);
 
 
+// ------------------------------------------------------------------------------------------------
 void JoinVerticesTest :: setUp (void)
 void JoinVerticesTest :: setUp (void)
 {
 {
 	// construct the process
 	// construct the process
-	this->piProcess = new JoinVerticesProcess();
+	piProcess = new JoinVerticesProcess();
 
 
 	// create a quite small mesh for testing purposes -
 	// create a quite small mesh for testing purposes -
 	// the mesh itself is *something* but it has redundant vertices
 	// the mesh itself is *something* but it has redundant vertices
-	this->pcMesh = new aiMesh();
+	pcMesh = new aiMesh();
 
 
 	pcMesh->mNumVertices = 900;
 	pcMesh->mNumVertices = 900;
 	aiVector3D*& pv = pcMesh->mVertices = new aiVector3D[900];
 	aiVector3D*& pv = pcMesh->mVertices = new aiVector3D[900];
@@ -49,16 +51,18 @@ void JoinVerticesTest :: setUp (void)
 	for (unsigned int i = 0; i < 900;++i)pcMesh->mBitangents[i] = 0.f; 
 	for (unsigned int i = 0; i < 900;++i)pcMesh->mBitangents[i] = 0.f; 
 }
 }
 
 
+// ------------------------------------------------------------------------------------------------
 void JoinVerticesTest :: tearDown (void)
 void JoinVerticesTest :: tearDown (void)
 {
 {
 	delete this->pcMesh;
 	delete this->pcMesh;
 	delete this->piProcess;
 	delete this->piProcess;
 }
 }
 
 
+// ------------------------------------------------------------------------------------------------
 void JoinVerticesTest :: testProcess(void)
 void JoinVerticesTest :: testProcess(void)
 {
 {
 	// execute the step on the given data
 	// execute the step on the given data
-	this->piProcess->ProcessMesh(this->pcMesh,0);
+	piProcess->ProcessMesh(pcMesh,0);
 
 
 	// the number of faces shouldn't change
 	// the number of faces shouldn't change
 	CPPUNIT_ASSERT(pcMesh->mNumFaces == 300);
 	CPPUNIT_ASSERT(pcMesh->mNumFaces == 300);

+ 4 - 0
test/unit/utLimitBoneWeights.cpp

@@ -1,9 +1,11 @@
 
 
+#include "UnitTestPCH.h"
 #include "utLimitBoneWeights.h"
 #include "utLimitBoneWeights.h"
 
 
 
 
 CPPUNIT_TEST_SUITE_REGISTRATION (LimitBoneWeightsTest);
 CPPUNIT_TEST_SUITE_REGISTRATION (LimitBoneWeightsTest);
 
 
+// ------------------------------------------------------------------------------------------------
 void LimitBoneWeightsTest :: setUp (void)
 void LimitBoneWeightsTest :: setUp (void)
 {
 {
 	// construct the process
 	// construct the process
@@ -32,12 +34,14 @@ void LimitBoneWeightsTest :: setUp (void)
 	}
 	}
 }
 }
 
 
+// ------------------------------------------------------------------------------------------------
 void LimitBoneWeightsTest :: tearDown (void)
 void LimitBoneWeightsTest :: tearDown (void)
 {
 {
 	delete this->pcMesh;
 	delete this->pcMesh;
 	delete this->piProcess;
 	delete this->piProcess;
 }
 }
 
 
+// ------------------------------------------------------------------------------------------------
 void LimitBoneWeightsTest :: testProcess(void)
 void LimitBoneWeightsTest :: testProcess(void)
 {
 {
 	// execute the step on the given data
 	// execute the step on the given data

+ 15 - 7
test/unit/utMaterialSystem.cpp

@@ -1,30 +1,34 @@
 
 
+#include "UnitTestPCH.h"
 #include "utMaterialSystem.h"
 #include "utMaterialSystem.h"
 
 
 
 
 CPPUNIT_TEST_SUITE_REGISTRATION (MaterialSystemTest);
 CPPUNIT_TEST_SUITE_REGISTRATION (MaterialSystemTest);
 
 
+// ------------------------------------------------------------------------------------------------
 void MaterialSystemTest :: setUp (void)
 void MaterialSystemTest :: setUp (void)
 {
 {
 	this->pcMat = new MaterialHelper();
 	this->pcMat = new MaterialHelper();
 }
 }
 
 
+// ------------------------------------------------------------------------------------------------
 void MaterialSystemTest :: tearDown (void)
 void MaterialSystemTest :: tearDown (void)
 {
 {
 	delete this->pcMat;
 	delete this->pcMat;
 }
 }
 
 
-
+// ------------------------------------------------------------------------------------------------
 void  MaterialSystemTest :: testFloatProperty (void)
 void  MaterialSystemTest :: testFloatProperty (void)
 {
 {
 	float pf = 150392.63f;
 	float pf = 150392.63f;
 	this->pcMat->AddProperty(&pf,1,"testKey1");
 	this->pcMat->AddProperty(&pf,1,"testKey1");
 	pf = 0.0f;
 	pf = 0.0f;
 
 
-	CPPUNIT_ASSERT(AI_SUCCESS == pcMat->Get("testKey1",pf));
+	CPPUNIT_ASSERT(AI_SUCCESS == pcMat->Get("testKey1",0,0,pf));
 	CPPUNIT_ASSERT(pf == 150392.63f);
 	CPPUNIT_ASSERT(pf == 150392.63f);
 }
 }
 
 
+// ------------------------------------------------------------------------------------------------
 void  MaterialSystemTest :: testFloatArrayProperty (void)
 void  MaterialSystemTest :: testFloatArrayProperty (void)
 {
 {
 	float pf[] = {0.0f,1.0f,2.0f,3.0f};
 	float pf[] = {0.0f,1.0f,2.0f,3.0f};
@@ -32,21 +36,23 @@ void  MaterialSystemTest :: testFloatArrayProperty (void)
 	this->pcMat->AddProperty(&pf,pMax,"testKey2");
 	this->pcMat->AddProperty(&pf,pMax,"testKey2");
 	pf[0] = pf[1] = pf[2] = pf[3] = 12.0f;
 	pf[0] = pf[1] = pf[2] = pf[3] = 12.0f;
 
 
-	CPPUNIT_ASSERT(AI_SUCCESS == pcMat->Get("testKey2",pf,&pMax));
+	CPPUNIT_ASSERT(AI_SUCCESS == pcMat->Get("testKey2",0,0,pf,&pMax));
 	CPPUNIT_ASSERT(pMax == sizeof(pf) / sizeof(float));
 	CPPUNIT_ASSERT(pMax == sizeof(pf) / sizeof(float));
 	CPPUNIT_ASSERT(!pf[0] && 1.0f == pf[1] && 2.0f == pf[2] && 3.0f == pf[3] );
 	CPPUNIT_ASSERT(!pf[0] && 1.0f == pf[1] && 2.0f == pf[2] && 3.0f == pf[3] );
 }
 }
 
 
+// ------------------------------------------------------------------------------------------------
 void  MaterialSystemTest :: testIntProperty (void)
 void  MaterialSystemTest :: testIntProperty (void)
 {
 {
 	int pf = 15039263;
 	int pf = 15039263;
 	this->pcMat->AddProperty(&pf,1,"testKey3");
 	this->pcMat->AddProperty(&pf,1,"testKey3");
 	pf = 12;
 	pf = 12;
 
 
-	CPPUNIT_ASSERT(AI_SUCCESS == pcMat->Get("testKey3",pf));
+	CPPUNIT_ASSERT(AI_SUCCESS == pcMat->Get("testKey3",0,0,pf));
 	CPPUNIT_ASSERT(pf == 15039263);
 	CPPUNIT_ASSERT(pf == 15039263);
 }
 }
 
 
+// ------------------------------------------------------------------------------------------------
 void  MaterialSystemTest :: testIntArrayProperty (void)
 void  MaterialSystemTest :: testIntArrayProperty (void)
 {
 {
 	int pf[] = {0,1,2,3};
 	int pf[] = {0,1,2,3};
@@ -54,11 +60,12 @@ void  MaterialSystemTest :: testIntArrayProperty (void)
 	this->pcMat->AddProperty(&pf,pMax,"testKey4");
 	this->pcMat->AddProperty(&pf,pMax,"testKey4");
 	pf[0] = pf[1] = pf[2] = pf[3] = 12;
 	pf[0] = pf[1] = pf[2] = pf[3] = 12;
 
 
-	CPPUNIT_ASSERT(AI_SUCCESS == pcMat->Get("testKey4",pf,&pMax));
+	CPPUNIT_ASSERT(AI_SUCCESS == pcMat->Get("testKey4",0,0,pf,&pMax));
 	CPPUNIT_ASSERT(pMax == sizeof(pf) / sizeof(int));
 	CPPUNIT_ASSERT(pMax == sizeof(pf) / sizeof(int));
 	CPPUNIT_ASSERT(!pf[0] && 1 == pf[1] && 2 == pf[2] && 3 == pf[3] );
 	CPPUNIT_ASSERT(!pf[0] && 1 == pf[1] && 2 == pf[2] && 3 == pf[3] );
 }
 }
 
 
+// ------------------------------------------------------------------------------------------------
 void  MaterialSystemTest :: testColorProperty (void)
 void  MaterialSystemTest :: testColorProperty (void)
 {
 {
 	aiColor4D clr;
 	aiColor4D clr;
@@ -67,16 +74,17 @@ void  MaterialSystemTest :: testColorProperty (void)
 	clr.b = 1.0f;
 	clr.b = 1.0f;
 	clr.a = clr.g = clr.r = 0.0f;
 	clr.a = clr.g = clr.r = 0.0f;
 
 
-	CPPUNIT_ASSERT(AI_SUCCESS == pcMat->Get("testKey5",clr));
+	CPPUNIT_ASSERT(AI_SUCCESS == pcMat->Get("testKey5",0,0,clr));
 	CPPUNIT_ASSERT(clr.r == 2.0f && clr.g == 3.0f && clr.b == 4.0f && clr.a == 5.0f);
 	CPPUNIT_ASSERT(clr.r == 2.0f && clr.g == 3.0f && clr.b == 4.0f && clr.a == 5.0f);
 }
 }
 
 
+// ------------------------------------------------------------------------------------------------
 void  MaterialSystemTest :: testStringProperty (void)
 void  MaterialSystemTest :: testStringProperty (void)
 {
 {
 	aiString s;
 	aiString s;
 	s.Set("Hello, this is a small test");
 	s.Set("Hello, this is a small test");
 	this->pcMat->AddProperty(&s,"testKey6");
 	this->pcMat->AddProperty(&s,"testKey6");
 	s.Set("358358");
 	s.Set("358358");
-	CPPUNIT_ASSERT(AI_SUCCESS == pcMat->Get("testKey6",s));
+	CPPUNIT_ASSERT(AI_SUCCESS == pcMat->Get("testKey6",0,0,s));
 	CPPUNIT_ASSERT(!::strcmp(s.data,"Hello, this is a small test"));
 	CPPUNIT_ASSERT(!::strcmp(s.data,"Hello, this is a small test"));
 }
 }

+ 2 - 0
test/unit/utOptimizeGraph.cpp

@@ -0,0 +1,2 @@
+
+#include "UnitTestPCH.h"

+ 2 - 0
test/unit/utPretransformVertices.cpp

@@ -0,0 +1,2 @@
+
+#include "UnitTestPCH.h"

+ 5 - 1
test/unit/utRemoveComments.cpp

@@ -1,20 +1,23 @@
 
 
-
+#include "UnitTestPCH.h"
 #include "utRemoveComments.h"
 #include "utRemoveComments.h"
 
 
 
 
 CPPUNIT_TEST_SUITE_REGISTRATION (RemoveCommentsTest);
 CPPUNIT_TEST_SUITE_REGISTRATION (RemoveCommentsTest);
 
 
+// ------------------------------------------------------------------------------------------------
 void RemoveCommentsTest :: setUp (void)
 void RemoveCommentsTest :: setUp (void)
 {
 {
 	// nothing to do here
 	// nothing to do here
 }
 }
 
 
+// ------------------------------------------------------------------------------------------------
 void RemoveCommentsTest :: tearDown (void)
 void RemoveCommentsTest :: tearDown (void)
 {
 {
 	// nothing to do here
 	// nothing to do here
 }
 }
 
 
+// ------------------------------------------------------------------------------------------------
 void RemoveCommentsTest :: testSingleLineComments (void)
 void RemoveCommentsTest :: testSingleLineComments (void)
 {
 {
 	const char* szTest = "int i = 0; \n"
 	const char* szTest = "int i = 0; \n"
@@ -37,6 +40,7 @@ void RemoveCommentsTest :: testSingleLineComments (void)
 	delete[] szTest2;
 	delete[] szTest2;
 }
 }
 
 
+// ------------------------------------------------------------------------------------------------
 void RemoveCommentsTest :: testMultiLineComments (void)
 void RemoveCommentsTest :: testMultiLineComments (void)
 {
 {
 	char* szTest = 
 	char* szTest = 

+ 95 - 0
test/unit/utRemoveComponent.cpp

@@ -1,3 +1,5 @@
+
+#include "UnitTestPCH.h"
 #include "utRemoveComponent.h"
 #include "utRemoveComponent.h"
 
 
 
 
@@ -8,6 +10,46 @@ void RemoveVCProcessTest :: setUp (void)
 	// construct the process
 	// construct the process
 	piProcess = new RemoveVCProcess();
 	piProcess = new RemoveVCProcess();
 	pScene = new aiScene();
 	pScene = new aiScene();
+
+	// fill the scene ..
+	pScene->mMeshes = new aiMesh*[pScene->mNumMeshes = 2];
+	pScene->mMeshes[0] = new aiMesh();
+	pScene->mMeshes[1] = new aiMesh();
+
+	pScene->mMeshes[0]->mNumVertices = 120;
+	pScene->mMeshes[0]->mVertices = new aiVector3D[120];
+	pScene->mMeshes[0]->mNormals = new aiVector3D[120];
+	pScene->mMeshes[0]->mTextureCoords[0] = new aiVector3D[120];
+	pScene->mMeshes[0]->mTextureCoords[1] = new aiVector3D[120];
+	pScene->mMeshes[0]->mTextureCoords[2] = new aiVector3D[120];
+	pScene->mMeshes[0]->mTextureCoords[3] = new aiVector3D[120];
+
+	pScene->mMeshes[1]->mNumVertices = 120;
+	pScene->mMeshes[1]->mVertices = new aiVector3D[120];
+
+	pScene->mAnimations    = new aiAnimation*[pScene->mNumAnimations = 2];
+	pScene->mAnimations[0] = new aiAnimation();
+	pScene->mAnimations[1] = new aiAnimation();
+
+	pScene->mTextures = new aiTexture*[pScene->mNumTextures = 2];
+	pScene->mTextures[0] = new aiTexture();
+	pScene->mTextures[1] = new aiTexture();
+
+	pScene->mMaterials    = new aiMaterial*[pScene->mNumMaterials = 2];
+	pScene->mMaterials[0] = new MaterialHelper();
+	pScene->mMaterials[1] = new MaterialHelper();
+
+	pScene->mLights    = new aiLight*[pScene->mNumLights = 2];
+	pScene->mLights[0] = new aiLight();
+	pScene->mLights[1] = new aiLight();
+
+	pScene->mCameras    = new aiCamera*[pScene->mNumCameras = 2];
+	pScene->mCameras[0] = new aiCamera();
+	pScene->mCameras[1] = new aiCamera();
+
+	// COMPILE TEST: MaterialHelper may no add any extra members,
+	// so we don't need a virtual destructor
+	char check[sizeof(MaterialHelper) == sizeof(aiMaterial) ? 10 : -1];
 }
 }
 
 
 void RemoveVCProcessTest :: tearDown (void)
 void RemoveVCProcessTest :: tearDown (void)
@@ -18,36 +60,89 @@ void RemoveVCProcessTest :: tearDown (void)
 
 
 void  RemoveVCProcessTest::testMeshRemove (void)
 void  RemoveVCProcessTest::testMeshRemove (void)
 {
 {
+	piProcess->SetDeleteFlags(aiComponent_MESHES);
+	piProcess->Execute(pScene);
+
+	CPPUNIT_ASSERT(NULL == pScene->mMeshes && 0 == pScene->mNumMeshes);
+	CPPUNIT_ASSERT(pScene->mFlags == AI_SCENE_FLAGS_INCOMPLETE);
 }
 }
 
 
 void  RemoveVCProcessTest::testAnimRemove (void)
 void  RemoveVCProcessTest::testAnimRemove (void)
 {
 {
+	piProcess->SetDeleteFlags(aiComponent_ANIMATIONS);
+	piProcess->Execute(pScene);
+
+	CPPUNIT_ASSERT(NULL == pScene->mAnimations && 0 == pScene->mNumAnimations);
+	CPPUNIT_ASSERT(pScene->mFlags == 0);
 }
 }
 
 
 void  RemoveVCProcessTest::testMaterialRemove (void)
 void  RemoveVCProcessTest::testMaterialRemove (void)
 {
 {
+	piProcess->SetDeleteFlags(aiComponent_MATERIALS);
+	piProcess->Execute(pScene);
+
+	// there should be one default material now ...
+	CPPUNIT_ASSERT(1 == pScene->mNumMaterials   && 
+		pScene->mMeshes[0]->mMaterialIndex == 0 &&
+		pScene->mMeshes[1]->mMaterialIndex == 0);
+	CPPUNIT_ASSERT(pScene->mFlags == 0);
 }
 }
 
 
 void  RemoveVCProcessTest::testTextureRemove (void)
 void  RemoveVCProcessTest::testTextureRemove (void)
 {
 {
+	piProcess->SetDeleteFlags(aiComponent_TEXTURES);
+	piProcess->Execute(pScene);
+
+	CPPUNIT_ASSERT(NULL == pScene->mTextures && 0 == pScene->mNumTextures);
+	CPPUNIT_ASSERT(pScene->mFlags == 0);
 }
 }
 
 
 void  RemoveVCProcessTest::testCameraRemove (void)
 void  RemoveVCProcessTest::testCameraRemove (void)
 {
 {
+	piProcess->SetDeleteFlags(aiComponent_CAMERAS);
+	piProcess->Execute(pScene);
+
+	CPPUNIT_ASSERT(NULL == pScene->mCameras && 0 == pScene->mNumCameras);
+	CPPUNIT_ASSERT(pScene->mFlags == 0);
 }
 }
 
 
 void  RemoveVCProcessTest::testLightRemove (void)
 void  RemoveVCProcessTest::testLightRemove (void)
 {
 {
+	piProcess->SetDeleteFlags(aiComponent_LIGHTS);
+	piProcess->Execute(pScene);
+
+	CPPUNIT_ASSERT(NULL == pScene->mLights && 0 == pScene->mNumLights);
+	CPPUNIT_ASSERT(pScene->mFlags == 0);
 }
 }
 
 
 void  RemoveVCProcessTest::testMeshComponentsRemoveA (void)
 void  RemoveVCProcessTest::testMeshComponentsRemoveA (void)
 {
 {
+	piProcess->SetDeleteFlags(aiComponent_TEXCOORDSn(1) | aiComponent_TEXCOORDSn(2) | aiComponent_TEXCOORDSn(3));
+	piProcess->Execute(pScene);
+
+	CPPUNIT_ASSERT(pScene->mMeshes[0]->mTextureCoords[0] &&
+		!pScene->mMeshes[0]->mTextureCoords[1] &&
+		!pScene->mMeshes[0]->mTextureCoords[2] &&
+		!pScene->mMeshes[0]->mTextureCoords[3]);
+	CPPUNIT_ASSERT(pScene->mFlags == 0);
 }
 }
 
 
 void  RemoveVCProcessTest::testMeshComponentsRemoveB (void)
 void  RemoveVCProcessTest::testMeshComponentsRemoveB (void)
 {
 {
+	piProcess->SetDeleteFlags(aiComponent_TEXCOORDSn(1) | aiComponent_NORMALS);
+	piProcess->Execute(pScene);
+
+	CPPUNIT_ASSERT(pScene->mMeshes[0]->mTextureCoords[0] &&
+		pScene->mMeshes[0]->mTextureCoords[1]  &&
+		pScene->mMeshes[0]->mTextureCoords[2]  &&     // shift forward ...
+		!pScene->mMeshes[0]->mTextureCoords[3] &&
+		!pScene->mMeshes[0]->mNormals);
+	CPPUNIT_ASSERT(pScene->mFlags == 0);
 }
 }
 
 
 void  RemoveVCProcessTest::testRemoveEverything (void)
 void  RemoveVCProcessTest::testRemoveEverything (void)
 {
 {
+	piProcess->SetDeleteFlags(aiComponent_LIGHTS | aiComponent_ANIMATIONS | 
+		aiComponent_MATERIALS | aiComponent_MESHES | aiComponent_CAMERAS | aiComponent_TEXTURES);
+	piProcess->Execute(pScene);
 }
 }

+ 1 - 1
test/unit/utRemoveComponent.h

@@ -6,7 +6,7 @@
 
 
 #include <aiScene.h>
 #include <aiScene.h>
 #include <RemoveVCProcess.h>
 #include <RemoveVCProcess.h>
-
+#include <MaterialSystem.h>
 
 
 using namespace std;
 using namespace std;
 using namespace Assimp;
 using namespace Assimp;

+ 8 - 3
test/unit/utRemoveRedundantMaterials.cpp

@@ -1,11 +1,11 @@
+
+#include "UnitTestPCH.h"
 #include "utRemoveRedundantMaterials.h"
 #include "utRemoveRedundantMaterials.h"
-#include "aiPostProcess.h"
-#include <math.h>
 
 
 CPPUNIT_TEST_SUITE_REGISTRATION (RemoveRedundantMatsTest);
 CPPUNIT_TEST_SUITE_REGISTRATION (RemoveRedundantMatsTest);
 
 
 
 
-
+// ------------------------------------------------------------------------------------------------
 aiMaterial* getUniqueMaterial1()
 aiMaterial* getUniqueMaterial1()
 {
 {
 	// setup an unique name for each material - this shouldn't care
 	// setup an unique name for each material - this shouldn't care
@@ -20,6 +20,7 @@ aiMaterial* getUniqueMaterial1()
 	return pcMat;
 	return pcMat;
 }
 }
 
 
+// ------------------------------------------------------------------------------------------------
 aiMaterial* getUniqueMaterial2()
 aiMaterial* getUniqueMaterial2()
 {
 {
 	// setup an unique name for each material - this shouldn't care
 	// setup an unique name for each material - this shouldn't care
@@ -34,6 +35,7 @@ aiMaterial* getUniqueMaterial2()
 	return pcMat;
 	return pcMat;
 }
 }
 
 
+// ------------------------------------------------------------------------------------------------
 aiMaterial* getUniqueMaterial3()
 aiMaterial* getUniqueMaterial3()
 {
 {
 	// setup an unique name for each material - this shouldn't care
 	// setup an unique name for each material - this shouldn't care
@@ -45,6 +47,7 @@ aiMaterial* getUniqueMaterial3()
 	return pcMat;
 	return pcMat;
 }
 }
 
 
+// ------------------------------------------------------------------------------------------------
 void RemoveRedundantMatsTest :: setUp (void)
 void RemoveRedundantMatsTest :: setUp (void)
 {
 {
 	// construct the process
 	// construct the process
@@ -86,12 +89,14 @@ void RemoveRedundantMatsTest :: setUp (void)
 	mTemp.data[0]++;
 	mTemp.data[0]++;
 }
 }
 
 
+// ------------------------------------------------------------------------------------------------
 void RemoveRedundantMatsTest :: tearDown (void)
 void RemoveRedundantMatsTest :: tearDown (void)
 {
 {
 	delete this->piProcess;
 	delete this->piProcess;
 	delete this->pcScene1;
 	delete this->pcScene1;
 }
 }
 
 
+// ------------------------------------------------------------------------------------------------
 void  RemoveRedundantMatsTest :: testRedundantMaterials (void)
 void  RemoveRedundantMatsTest :: testRedundantMaterials (void)
 {
 {
 	this->piProcess->Execute(this->pcScene1);
 	this->piProcess->Execute(this->pcScene1);

+ 137 - 0
test/unit/utScenePreprocessor.cpp

@@ -0,0 +1,137 @@
+
+#include "UnitTestPCH.h"
+#include "utScenePreprocessor.h"
+CPPUNIT_TEST_SUITE_REGISTRATION (ScenePreprocessorTest);
+
+// ------------------------------------------------------------------------------------------------
+void ScenePreprocessorTest::setUp (void)
+{
+	// setup a dummy scene with a single node
+	scene = new aiScene();
+	scene->mRootNode = new aiNode();
+	scene->mRootNode->mName.Set("<test>");
+
+	// add some translation
+	scene->mRootNode->mTransformation.a4 = 1.f;
+	scene->mRootNode->mTransformation.b4 = 2.f;
+	scene->mRootNode->mTransformation.c4 = 3.f;
+
+	// and allocate a ScenePreprocessor to operate on the scene
+	pp = new ScenePreprocessor(scene);
+}
+
+// ------------------------------------------------------------------------------------------------
+void ScenePreprocessorTest::tearDown (void)
+{
+	delete pp;
+	delete scene;
+}
+
+// ------------------------------------------------------------------------------------------------
+// Check whether ProcessMesh() returns flag for a mesh that consist of primitives with num indices
+void ScenePreprocessorTest::CheckIfOnly(aiMesh* p,unsigned int num, unsigned int flag)
+{
+	// Triangles only
+	for (unsigned i = 0; i < p->mNumFaces;++i)	{
+		p->mFaces[i].mNumIndices = num;
+	}
+	pp->ProcessMesh(p);
+	CPPUNIT_ASSERT(p->mPrimitiveTypes == flag);
+	p->mPrimitiveTypes = 0;
+}
+
+// ------------------------------------------------------------------------------------------------
+// Check whether a mesh is preprocessed correctly. Case 1: The mesh needs preprocessing
+void  ScenePreprocessorTest::testMeshPreprocessingPos (void)
+{
+	aiMesh* p = new aiMesh();
+	p->mNumFaces = 100;
+	p->mFaces = new aiFace[p->mNumFaces];
+	
+	p->mTextureCoords[0] = new aiVector3D[10];
+	p->mNumUVComponents[0] = 0;
+	p->mNumUVComponents[1] = 0;
+	
+	CheckIfOnly(p,1,aiPrimitiveType_POINT);
+	CheckIfOnly(p,2,aiPrimitiveType_LINE);
+	CheckIfOnly(p,3,aiPrimitiveType_TRIANGLE);
+	CheckIfOnly(p,4,aiPrimitiveType_POLYGON);
+	CheckIfOnly(p,1249,aiPrimitiveType_POLYGON);
+
+	// Polygons and triangles mixed
+	unsigned i;
+	for (i = 0; i < p->mNumFaces/2;++i)	{
+		p->mFaces[i].mNumIndices = 3;
+	}
+	for (; i < p->mNumFaces-p->mNumFaces/4;++i)	{
+		p->mFaces[i].mNumIndices = 4;
+	}
+	for (; i < p->mNumFaces;++i)	{
+		p->mFaces[i].mNumIndices = 10;
+	}
+	pp->ProcessMesh(p);
+	CPPUNIT_ASSERT(p->mPrimitiveTypes == (aiPrimitiveType_TRIANGLE|aiPrimitiveType_POLYGON));
+	CPPUNIT_ASSERT(p->mNumUVComponents[0] == 2);
+	CPPUNIT_ASSERT(p->mNumUVComponents[1] == 0);
+	delete p;
+}
+
+// ------------------------------------------------------------------------------------------------
+// Check whether a mesh is preprocessed correctly. Case 1: The mesh doesn't need preprocessing
+void  ScenePreprocessorTest::testMeshPreprocessingNeg (void)
+{
+	aiMesh* p = new aiMesh();
+	p->mPrimitiveTypes = aiPrimitiveType_TRIANGLE|aiPrimitiveType_POLYGON;
+	pp->ProcessMesh(p);
+
+	// should be unmodified
+	CPPUNIT_ASSERT(p->mPrimitiveTypes == (aiPrimitiveType_TRIANGLE|aiPrimitiveType_POLYGON));
+
+	delete p;
+}
+
+// ------------------------------------------------------------------------------------------------
+// Make a dummy animation with a single channel, '<test>'
+aiAnimation* MakeDummyAnimation()	
+{
+	aiAnimation* p =  new aiAnimation();
+	p->mNumChannels = 1;
+	p->mChannels = new aiNodeAnim*[1];
+	aiNodeAnim* anim = p->mChannels[0] = new aiNodeAnim();
+	anim->mNodeName.Set("<test>");
+	return p;
+}
+
+// ------------------------------------------------------------------------------------------------
+// Check whether an anim is preprocessed correctly. Case 1: The anim needs preprocessing
+void  ScenePreprocessorTest::testAnimationPreprocessingPos (void)
+{
+	aiAnimation* p = MakeDummyAnimation();
+	aiNodeAnim* anim = p->mChannels[0];
+
+	// we don't set the animation duration, but generate scaling channels
+	anim->mNumScalingKeys = 10;
+	anim->mScalingKeys = new aiVectorKey[10];
+
+	for (unsigned int i = 0; i < 10;++i)	{
+		anim->mScalingKeys[i].mTime = i;
+		anim->mScalingKeys[i].mValue = aiVector3D((float)i);
+	}
+	pp->ProcessAnimation(p);
+
+	// we should now have a proper duration
+	CPPUNIT_ASSERT_DOUBLES_EQUAL(p->mDuration,9.,0.005);
+
+	// ... one scaling key
+	CPPUNIT_ASSERT(anim->mNumPositionKeys == 1 && 
+		anim->mPositionKeys && 
+		anim->mPositionKeys[0].mTime == 0.0 && 
+		anim->mPositionKeys[0].mValue == aiVector3D(1.f,2.f,3.f));
+
+	// ... and one rotation key
+	CPPUNIT_ASSERT(anim->mNumRotationKeys == 1 && anim->mRotationKeys && 
+		anim->mRotationKeys[0].mTime == 0.0); 
+
+	delete p;
+}
+

+ 44 - 0
test/unit/utScenePreprocessor.h

@@ -0,0 +1,44 @@
+
+
+
+#ifndef TESTSCENEPREPROCESSOR_H
+#define TESTSCENEPREPROCESSOR_H
+
+#include <cppunit/TestFixture.h>
+#include <cppunit/extensions/HelperMacros.h>
+
+#include <aiMesh.h>
+#include <aiScene.h>
+#include <assimp.hpp>
+#include <ScenePreprocessor.h>
+
+using namespace std;
+using namespace Assimp;
+
+class ScenePreprocessorTest : public CPPUNIT_NS :: TestFixture
+{
+    CPPUNIT_TEST_SUITE (ScenePreprocessorTest);
+    CPPUNIT_TEST (testMeshPreprocessingPos);
+	CPPUNIT_TEST (testMeshPreprocessingNeg);
+	CPPUNIT_TEST (testAnimationPreprocessingPos);
+    CPPUNIT_TEST_SUITE_END ();
+
+    public:
+		void setUp (void);
+		void tearDown (void);
+
+    protected:
+
+        void  testMeshPreprocessingPos		    (void);
+		void  testMeshPreprocessingNeg		    (void);
+		void  testAnimationPreprocessingPos     (void);
+
+	private:
+
+		void CheckIfOnly(aiMesh* p,unsigned int num, unsigned flag);
+
+		ScenePreprocessor* pp;
+		aiScene* scene;
+};
+
+#endif

+ 7 - 0
test/unit/utSharedPPData.cpp

@@ -1,4 +1,5 @@
 
 
+#include "UnitTestPCH.h"
 #include "utSharedPPData.h"
 #include "utSharedPPData.h"
 
 
 
 
@@ -14,17 +15,21 @@ struct TestType
 	}
 	}
 };
 };
 
 
+
+// ------------------------------------------------------------------------------------------------
 void SharedPPDataTest :: setUp (void)
 void SharedPPDataTest :: setUp (void)
 {
 {
 	shared = new SharedPostProcessInfo();
 	shared = new SharedPostProcessInfo();
 	destructed = false;
 	destructed = false;
 }
 }
 
 
+// ------------------------------------------------------------------------------------------------
 void SharedPPDataTest :: tearDown (void)
 void SharedPPDataTest :: tearDown (void)
 {
 {
 	
 	
 }
 }
 
 
+// ------------------------------------------------------------------------------------------------
 void  SharedPPDataTest :: testPODProperty (void)
 void  SharedPPDataTest :: testPODProperty (void)
 {
 {
 	int i = 5;
 	int i = 5;
@@ -38,6 +43,7 @@ void  SharedPPDataTest :: testPODProperty (void)
 	CPPUNIT_ASSERT(shared->GetProperty("test",m) && 12.f == m);
 	CPPUNIT_ASSERT(shared->GetProperty("test",m) && 12.f == m);
 }
 }
 
 
+// ------------------------------------------------------------------------------------------------
 void  SharedPPDataTest :: testPropertyPointer (void)
 void  SharedPPDataTest :: testPropertyPointer (void)
 {
 {
 	int *i = new int[35];
 	int *i = new int[35];
@@ -48,6 +54,7 @@ void  SharedPPDataTest :: testPropertyPointer (void)
 	CPPUNIT_ASSERT(!shared->GetProperty("test16",o));
 	CPPUNIT_ASSERT(!shared->GetProperty("test16",o));
 }
 }
 
 
+// ------------------------------------------------------------------------------------------------
 void  SharedPPDataTest :: testPropertyDeallocation (void)
 void  SharedPPDataTest :: testPropertyDeallocation (void)
 {
 {
 	TestType *out, * pip = new TestType();
 	TestType *out, * pip = new TestType();

+ 29 - 15
test/unit/utSortByPType.cpp

@@ -1,9 +1,12 @@
 
 
+#include "UnitTestPCH.h"
 #include "utSortByPType.h"
 #include "utSortByPType.h"
 
 
+#include "utScenePreprocessor.h"
 
 
 CPPUNIT_TEST_SUITE_REGISTRATION (SortByPTypeProcessTest);
 CPPUNIT_TEST_SUITE_REGISTRATION (SortByPTypeProcessTest);
 
 
+// ------------------------------------------------------------------------------------------------
 static unsigned int num[10][4] = 
 static unsigned int num[10][4] = 
 	{
 	{
 		{0,0,0,1000},
 		{0,0,0,1000},
@@ -18,6 +21,7 @@ static unsigned int num[10][4] =
 		{0,100,0,900},
 		{0,100,0,900},
 	};
 	};
 
 
+// ------------------------------------------------------------------------------------------------
 static unsigned int result[10] = 
 static unsigned int result[10] = 
 {
 {
 	aiPrimitiveType_POLYGON,
 	aiPrimitiveType_POLYGON,
@@ -32,10 +36,10 @@ static unsigned int result[10] =
 	aiPrimitiveType_LINE | aiPrimitiveType_POLYGON,
 	aiPrimitiveType_LINE | aiPrimitiveType_POLYGON,
 };
 };
 
 
-
+// ------------------------------------------------------------------------------------------------
 void SortByPTypeProcessTest :: setUp (void)
 void SortByPTypeProcessTest :: setUp (void)
 {
 {
-	process0 = new DeterminePTypeHelperProcess();
+//	process0 = new DeterminePTypeHelperProcess();
 	process1 = new SortByPTypeProcess();
 	process1 = new SortByPTypeProcess();
 	scene = new aiScene();
 	scene = new aiScene();
 
 
@@ -108,27 +112,37 @@ void SortByPTypeProcessTest :: setUp (void)
 	}
 	}
 }
 }
 
 
+// ------------------------------------------------------------------------------------------------
 void SortByPTypeProcessTest :: tearDown (void)
 void SortByPTypeProcessTest :: tearDown (void)
 {
 {
-	delete process0;
+	//delete process0;
 	delete process1;
 	delete process1;
 	delete scene;
 	delete scene;
 }
 }
 
 
-void  SortByPTypeProcessTest :: testDeterminePTypeStep (void)
+// ------------------------------------------------------------------------------------------------
+//void  SortByPTypeProcessTest :: testDeterminePTypeStep (void)
+//{
+//	process0->Execute(scene);
+//
+//	for (unsigned int i = 0; i < 10; ++i)
+//	{
+//		aiMesh* mesh = scene->mMeshes[i];
+//		CPPUNIT_ASSERT(mesh->mPrimitiveTypes == result[i]);
+//	}
+//}
+
+// ------------------------------------------------------------------------------------------------
+void  SortByPTypeProcessTest :: testSortByPTypeStep (void)
 {
 {
-	process0->Execute(scene);
+//	process0->Execute(scene);
 
 
-	for (unsigned int i = 0; i < 10; ++i)
-	{
-		aiMesh* mesh = scene->mMeshes[i];
-		CPPUNIT_ASSERT(mesh->mPrimitiveTypes == result[i]);
-	}
-}
+	// and another small test for ScenePreprocessor
+	ScenePreprocessor s(scene);
+	s.ProcessScene();
+	for (unsigned int m = 0; m< 10;++m)
+		CPPUNIT_ASSERT(scene->mMeshes[m]->mPrimitiveTypes == result[m]);
 
 
-void  SortByPTypeProcessTest :: testSortByPTypeStep (void)
-{
-	process0->Execute(scene);
 	process1->Execute(scene);
 	process1->Execute(scene);
 
 
 	unsigned int idx = 0;
 	unsigned int idx = 0;
@@ -143,7 +157,7 @@ void  SortByPTypeProcessTest :: testSortByPTypeStep (void)
 				aiMesh* mesh = scene->mMeshes[real];
 				aiMesh* mesh = scene->mMeshes[real];
 
 
 				CPPUNIT_ASSERT(NULL != mesh);
 				CPPUNIT_ASSERT(NULL != mesh);
-				CPPUNIT_ASSERT(mesh->mPrimitiveTypes == 1u<<n);
+				CPPUNIT_ASSERT(mesh->mPrimitiveTypes == AI_PRIMITIVE_TYPE_FOR_N_INDICES(n+1));
 				CPPUNIT_ASSERT(NULL != mesh->mVertices);
 				CPPUNIT_ASSERT(NULL != mesh->mVertices);
 				CPPUNIT_ASSERT(NULL != mesh->mNormals);
 				CPPUNIT_ASSERT(NULL != mesh->mNormals);
 				CPPUNIT_ASSERT(NULL != mesh->mTangents);
 				CPPUNIT_ASSERT(NULL != mesh->mTangents);

+ 0 - 2
test/unit/utSortByPType.h

@@ -15,7 +15,6 @@ using namespace Assimp;
 class SortByPTypeProcessTest : public CPPUNIT_NS :: TestFixture
 class SortByPTypeProcessTest : public CPPUNIT_NS :: TestFixture
 {
 {
     CPPUNIT_TEST_SUITE (SortByPTypeProcessTest);
     CPPUNIT_TEST_SUITE (SortByPTypeProcessTest);
-	CPPUNIT_TEST (testDeterminePTypeStep);
 	CPPUNIT_TEST (testSortByPTypeStep);
 	CPPUNIT_TEST (testSortByPTypeStep);
     CPPUNIT_TEST_SUITE_END ();
     CPPUNIT_TEST_SUITE_END ();
 
 
@@ -30,7 +29,6 @@ class SortByPTypeProcessTest : public CPPUNIT_NS :: TestFixture
    
    
 	private:
 	private:
 
 
-		DeterminePTypeHelperProcess* process0;
 		SortByPTypeProcess* process1;
 		SortByPTypeProcess* process1;
 		aiScene* scene;
 		aiScene* scene;
 };
 };

+ 7 - 2
test/unit/utSplitLargeMeshes.cpp

@@ -1,9 +1,11 @@
+
+#include "UnitTestPCH.h"
 #include "utSplitLargeMeshes.h"
 #include "utSplitLargeMeshes.h"
-#include "aiPostProcess.h"
-#include <math.h>
+
 
 
 CPPUNIT_TEST_SUITE_REGISTRATION (SplitLargeMeshesTest);
 CPPUNIT_TEST_SUITE_REGISTRATION (SplitLargeMeshesTest);
 
 
+// ------------------------------------------------------------------------------------------------
 void SplitLargeMeshesTest :: setUp (void)
 void SplitLargeMeshesTest :: setUp (void)
 {
 {
 	// construct the processes
 	// construct the processes
@@ -53,12 +55,14 @@ void SplitLargeMeshesTest :: setUp (void)
 	}
 	}
 }
 }
 
 
+// ------------------------------------------------------------------------------------------------
 void SplitLargeMeshesTest :: tearDown (void)
 void SplitLargeMeshesTest :: tearDown (void)
 {
 {
 	delete this->piProcessTriangle;
 	delete this->piProcessTriangle;
 	delete this->piProcessVertex;
 	delete this->piProcessVertex;
 }
 }
 
 
+// ------------------------------------------------------------------------------------------------
 void SplitLargeMeshesTest :: testVertexSplit()
 void SplitLargeMeshesTest :: testVertexSplit()
 {
 {
 	std::vector< std::pair<aiMesh*, unsigned int> > avOut;
 	std::vector< std::pair<aiMesh*, unsigned int> > avOut;
@@ -80,6 +84,7 @@ void SplitLargeMeshesTest :: testVertexSplit()
 	CPPUNIT_ASSERT(0 == iOldFaceNum);
 	CPPUNIT_ASSERT(0 == iOldFaceNum);
 }
 }
 
 
+// ------------------------------------------------------------------------------------------------
 void SplitLargeMeshesTest :: testTriangleSplit()
 void SplitLargeMeshesTest :: testTriangleSplit()
 {
 {
 	std::vector< std::pair<aiMesh*, unsigned int> > avOut;
 	std::vector< std::pair<aiMesh*, unsigned int> > avOut;

+ 4 - 0
test/unit/utTargetAnimation.cpp

@@ -0,0 +1,4 @@
+
+#include "UnitTestPCH.h"
+
+// TODO

+ 0 - 0
test/unit/utTargetAnimation.h


+ 2 - 0
test/unit/utTextureTransform.cpp

@@ -0,0 +1,2 @@
+
+#include "UnitTestPCH.h"

+ 1 - 0
test/unit/utTriangulate.cpp

@@ -1,4 +1,5 @@
 
 
+#include "UnitTestPCH.h"
 #include "utTriangulate.h"
 #include "utTriangulate.h"
 
 
 
 

+ 7 - 2
test/unit/utVertexTriangleAdjacency.cpp

@@ -1,11 +1,11 @@
 
 
-
-
+#include "UnitTestPCH.h"
 #include "utVertexTriangleAdjacency.h"
 #include "utVertexTriangleAdjacency.h"
 
 
 
 
 CPPUNIT_TEST_SUITE_REGISTRATION (VTAdjacency);
 CPPUNIT_TEST_SUITE_REGISTRATION (VTAdjacency);
 
 
+// ------------------------------------------------------------------------------------------------
 void VTAdjacency :: setUp (void)
 void VTAdjacency :: setUp (void)
 {
 {
 	// build a test mesh with randomized input data
 	// build a test mesh with randomized input data
@@ -90,6 +90,7 @@ void VTAdjacency :: setUp (void)
 	}
 	}
 }
 }
 
 
+// ------------------------------------------------------------------------------------------------
 void VTAdjacency :: tearDown (void) 
 void VTAdjacency :: tearDown (void) 
 {
 {
 	delete pMesh;
 	delete pMesh;
@@ -102,21 +103,25 @@ void VTAdjacency :: tearDown (void)
 	pMesh3 = 0;
 	pMesh3 = 0;
 }
 }
 
 
+// ------------------------------------------------------------------------------------------------
 void VTAdjacency :: largeRandomDataSet (void)
 void VTAdjacency :: largeRandomDataSet (void)
 {
 {
 	checkMesh(pMesh);
 	checkMesh(pMesh);
 }
 }
 
 
+// ------------------------------------------------------------------------------------------------
 void VTAdjacency :: smallDataSet (void)
 void VTAdjacency :: smallDataSet (void)
 {
 {
 	checkMesh(pMesh2);
 	checkMesh(pMesh2);
 }
 }
 
 
+// ------------------------------------------------------------------------------------------------
 void VTAdjacency :: unreferencedVerticesSet (void)
 void VTAdjacency :: unreferencedVerticesSet (void)
 {
 {
 	checkMesh(pMesh3);
 	checkMesh(pMesh3);
 }
 }
 
 
+// ------------------------------------------------------------------------------------------------
 void VTAdjacency :: checkMesh (aiMesh* pMesh)
 void VTAdjacency :: checkMesh (aiMesh* pMesh)
 {
 {
 	pAdj = new VertexTriangleAdjacency(pMesh->mFaces,pMesh->mNumFaces,pMesh->mNumVertices,true);
 	pAdj = new VertexTriangleAdjacency(pMesh->mFaces,pMesh->mNumFaces,pMesh->mNumVertices,true);

+ 5 - 1
tools/assimp_view/AnimEvaluator.h

@@ -43,7 +43,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #ifndef AV_ANIMEVALUATOR_H_INCLUDED
 #ifndef AV_ANIMEVALUATOR_H_INCLUDED
 #define AV_ANIMEVALUATOR_H_INCLUDED
 #define AV_ANIMEVALUATOR_H_INCLUDED
 
 
-#include <boost/tuple/tuple.hpp>
+#ifdef ASSIMP_BUILD_BOOST_WORKAROUND
+#	include "BoostWorkaround/boost/tuple/tuple.hpp"
+#else
+#	include <boost/tuple/tuple.hpp>
+#endif
 
 
 namespace AssimpView
 namespace AssimpView
 {
 {

+ 3 - 0
tools/assimp_view/MessageProc.cpp

@@ -2072,6 +2072,9 @@ int APIENTRY _tWinMain(HINSTANCE hInstance,
 	HWND hDlg = CreateDialog(hInstance,MAKEINTRESOURCE(IDD_DIALOGMAIN),
 	HWND hDlg = CreateDialog(hInstance,MAKEINTRESOURCE(IDD_DIALOGMAIN),
 		NULL,&MessageProc);
 		NULL,&MessageProc);
 
 
+	// ensure we get high priority
+	::SetPriorityClass(GetCurrentProcess(),HIGH_PRIORITY_CLASS);
+
 	// initialise the default logger if neccessary
 	// initialise the default logger if neccessary
 	Assimp::DefaultLogger::create("",Assimp::Logger::VERBOSE);
 	Assimp::DefaultLogger::create("",Assimp::Logger::VERBOSE);
 	Assimp::DefaultLogger::get()->attachStream((Assimp::LogStream*)&CLogWindow::Instance().pcStream,
 	Assimp::DefaultLogger::get()->attachStream((Assimp::LogStream*)&CLogWindow::Instance().pcStream,

+ 821 - 59
workspaces/vc8/UnitTest.vcproj

@@ -2,7 +2,7 @@
 <VisualStudioProject
 <VisualStudioProject
 	ProjectType="Visual C++"
 	ProjectType="Visual C++"
 	Version="8,00"
 	Version="8,00"
-	Name="UnitTest"
+	Name="unit"
 	ProjectGUID="{9B9D1C90-8A03-409A-B547-AE7B48B90F1A}"
 	ProjectGUID="{9B9D1C90-8A03-409A-B547-AE7B48B90F1A}"
 	RootNamespace="UnitTest"
 	RootNamespace="UnitTest"
 	Keyword="Win32Proj"
 	Keyword="Win32Proj"
@@ -19,11 +19,11 @@
 	</ToolFiles>
 	</ToolFiles>
 	<Configurations>
 	<Configurations>
 		<Configuration
 		<Configuration
-			Name="Debug|Win32"
+			Name="debug|Win32"
 			OutputDirectory="./../../bin/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
 			OutputDirectory="./../../bin/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
 			IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
 			IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
 			ConfigurationType="1"
 			ConfigurationType="1"
-			InheritedPropertySheets=".\UnitTest.vsprops"
+			InheritedPropertySheets=".\shared\UnitTest.vsprops"
 			CharacterSet="1"
 			CharacterSet="1"
 			>
 			>
 			<Tool
 			<Tool
@@ -49,7 +49,8 @@
 				MinimalRebuild="true"
 				MinimalRebuild="true"
 				BasicRuntimeChecks="3"
 				BasicRuntimeChecks="3"
 				RuntimeLibrary="1"
 				RuntimeLibrary="1"
-				UsePrecompiledHeader="0"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="UnitTestPCH.h"
 				WarningLevel="3"
 				WarningLevel="3"
 				Detect64BitPortabilityProblems="true"
 				Detect64BitPortabilityProblems="true"
 				DebugInformationFormat="4"
 				DebugInformationFormat="4"
@@ -68,7 +69,7 @@
 				AdditionalDependencies="assimp.lib cppunitd.lib"
 				AdditionalDependencies="assimp.lib cppunitd.lib"
 				LinkIncremental="2"
 				LinkIncremental="2"
 				SuppressStartupBanner="false"
 				SuppressStartupBanner="false"
-				AdditionalLibraryDirectories="..\..\lib\assimp_debug_win32"
+				AdditionalLibraryDirectories="..\..\lib\assimp_$(ConfigurationName)_$(PlatformName)\"
 				IgnoreDefaultLibraryNames=""
 				IgnoreDefaultLibraryNames=""
 				GenerateDebugInformation="true"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				SubSystem="1"
@@ -100,11 +101,11 @@
 			/>
 			/>
 		</Configuration>
 		</Configuration>
 		<Configuration
 		<Configuration
-			Name="Debug|x64"
+			Name="debug|x64"
 			OutputDirectory="./../../bin/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
 			OutputDirectory="./../../bin/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
 			IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
 			IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
 			ConfigurationType="1"
 			ConfigurationType="1"
-			InheritedPropertySheets=".\UnitTest.vsprops"
+			InheritedPropertySheets=".\shared\UnitTest.vsprops"
 			CharacterSet="1"
 			CharacterSet="1"
 			>
 			>
 			<Tool
 			<Tool
@@ -131,7 +132,8 @@
 				MinimalRebuild="true"
 				MinimalRebuild="true"
 				BasicRuntimeChecks="3"
 				BasicRuntimeChecks="3"
 				RuntimeLibrary="1"
 				RuntimeLibrary="1"
-				UsePrecompiledHeader="0"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="UnitTestPCH.h"
 				WarningLevel="3"
 				WarningLevel="3"
 				Detect64BitPortabilityProblems="true"
 				Detect64BitPortabilityProblems="true"
 				DebugInformationFormat="3"
 				DebugInformationFormat="3"
@@ -150,7 +152,7 @@
 				AdditionalDependencies="assimp.lib cppunit64d.lib"
 				AdditionalDependencies="assimp.lib cppunit64d.lib"
 				LinkIncremental="2"
 				LinkIncremental="2"
 				SuppressStartupBanner="false"
 				SuppressStartupBanner="false"
-				AdditionalLibraryDirectories="..\..\lib\assimp_debug_x64"
+				AdditionalLibraryDirectories="..\..\lib\assimp_$(ConfigurationName)_$(PlatformName)\"
 				IgnoreDefaultLibraryNames=""
 				IgnoreDefaultLibraryNames=""
 				GenerateDebugInformation="true"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				SubSystem="1"
@@ -182,11 +184,11 @@
 			/>
 			/>
 		</Configuration>
 		</Configuration>
 		<Configuration
 		<Configuration
-			Name="Release|Win32"
+			Name="release|Win32"
 			OutputDirectory="./../../bin/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
 			OutputDirectory="./../../bin/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
 			IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
 			IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
 			ConfigurationType="1"
 			ConfigurationType="1"
-			InheritedPropertySheets=".\UnitTest.vsprops"
+			InheritedPropertySheets=".\shared\UnitTest.vsprops"
 			CharacterSet="1"
 			CharacterSet="1"
 			WholeProgramOptimization="1"
 			WholeProgramOptimization="1"
 			>
 			>
@@ -210,7 +212,8 @@
 				AdditionalIncludeDirectories="..\..\code;..\..\include"
 				AdditionalIncludeDirectories="..\..\code;..\..\include"
 				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
 				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
 				RuntimeLibrary="0"
 				RuntimeLibrary="0"
-				UsePrecompiledHeader="0"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="UnitTestPCH.h"
 				WarningLevel="3"
 				WarningLevel="3"
 				Detect64BitPortabilityProblems="true"
 				Detect64BitPortabilityProblems="true"
 				DebugInformationFormat="3"
 				DebugInformationFormat="3"
@@ -228,7 +231,7 @@
 				Name="VCLinkerTool"
 				Name="VCLinkerTool"
 				AdditionalDependencies="assimp.lib cppunit.lib"
 				AdditionalDependencies="assimp.lib cppunit.lib"
 				LinkIncremental="1"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="..\..\lib\assimp_release_win32"
+				AdditionalLibraryDirectories="..\..\lib\assimp_$(ConfigurationName)_$(PlatformName)\"
 				GenerateDebugInformation="true"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				SubSystem="1"
 				OptimizeReferences="2"
 				OptimizeReferences="2"
@@ -261,11 +264,11 @@
 			/>
 			/>
 		</Configuration>
 		</Configuration>
 		<Configuration
 		<Configuration
-			Name="Release|x64"
+			Name="release|x64"
 			OutputDirectory="./../../bin/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
 			OutputDirectory="./../../bin/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
 			IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
 			IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
 			ConfigurationType="1"
 			ConfigurationType="1"
-			InheritedPropertySheets=".\UnitTest.vsprops"
+			InheritedPropertySheets=".\shared\UnitTest.vsprops"
 			CharacterSet="1"
 			CharacterSet="1"
 			WholeProgramOptimization="1"
 			WholeProgramOptimization="1"
 			>
 			>
@@ -290,7 +293,8 @@
 				AdditionalIncludeDirectories="..\..\code;..\..\include"
 				AdditionalIncludeDirectories="..\..\code;..\..\include"
 				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
 				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
 				RuntimeLibrary="0"
 				RuntimeLibrary="0"
-				UsePrecompiledHeader="0"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="UnitTestPCH.h"
 				WarningLevel="3"
 				WarningLevel="3"
 				Detect64BitPortabilityProblems="true"
 				Detect64BitPortabilityProblems="true"
 				DebugInformationFormat="3"
 				DebugInformationFormat="3"
@@ -308,7 +312,7 @@
 				Name="VCLinkerTool"
 				Name="VCLinkerTool"
 				AdditionalDependencies="assimp.lib cppunit64.lib"
 				AdditionalDependencies="assimp.lib cppunit64.lib"
 				LinkIncremental="1"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="..\..\lib\assimp_release_x64"
+				AdditionalLibraryDirectories="..\..\lib\assimp_$(ConfigurationName)_$(PlatformName)\"
 				GenerateDebugInformation="true"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				SubSystem="1"
 				OptimizeReferences="2"
 				OptimizeReferences="2"
@@ -341,11 +345,11 @@
 			/>
 			/>
 		</Configuration>
 		</Configuration>
 		<Configuration
 		<Configuration
-			Name="Release_DLL|Win32"
+			Name="release-dll|Win32"
 			OutputDirectory="./../../bin/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
 			OutputDirectory="./../../bin/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
 			IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
 			IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
 			ConfigurationType="1"
 			ConfigurationType="1"
-			InheritedPropertySheets=".\UnitTest.vsprops"
+			InheritedPropertySheets=".\shared\UnitTest.vsprops"
 			CharacterSet="1"
 			CharacterSet="1"
 			WholeProgramOptimization="1"
 			WholeProgramOptimization="1"
 			>
 			>
@@ -368,8 +372,9 @@
 				Name="VCCLCompilerTool"
 				Name="VCCLCompilerTool"
 				AdditionalIncludeDirectories="..\..\code;..\..\include"
 				AdditionalIncludeDirectories="..\..\code;..\..\include"
 				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
 				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
-				RuntimeLibrary="2"
-				UsePrecompiledHeader="0"
+				RuntimeLibrary="0"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="UnitTestPCH.h"
 				WarningLevel="3"
 				WarningLevel="3"
 				Detect64BitPortabilityProblems="true"
 				Detect64BitPortabilityProblems="true"
 				DebugInformationFormat="3"
 				DebugInformationFormat="3"
@@ -387,7 +392,7 @@
 				Name="VCLinkerTool"
 				Name="VCLinkerTool"
 				AdditionalDependencies="assimp.lib cppunit.lib"
 				AdditionalDependencies="assimp.lib cppunit.lib"
 				LinkIncremental="1"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="..\..\lib\assimp_release_dll_win32"
+				AdditionalLibraryDirectories="..\..\lib\assimp_$(ConfigurationName)_$(PlatformName)\"
 				GenerateDebugInformation="true"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				SubSystem="1"
 				OptimizeReferences="2"
 				OptimizeReferences="2"
@@ -420,11 +425,11 @@
 			/>
 			/>
 		</Configuration>
 		</Configuration>
 		<Configuration
 		<Configuration
-			Name="Release_DLL|x64"
+			Name="release-dll|x64"
 			OutputDirectory="./../../bin/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
 			OutputDirectory="./../../bin/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
 			IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
 			IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
 			ConfigurationType="1"
 			ConfigurationType="1"
-			InheritedPropertySheets=".\UnitTest.vsprops"
+			InheritedPropertySheets=".\shared\UnitTest.vsprops"
 			CharacterSet="1"
 			CharacterSet="1"
 			WholeProgramOptimization="1"
 			WholeProgramOptimization="1"
 			>
 			>
@@ -449,7 +454,8 @@
 				AdditionalIncludeDirectories="..\..\code;..\..\include"
 				AdditionalIncludeDirectories="..\..\code;..\..\include"
 				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
 				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
 				RuntimeLibrary="2"
 				RuntimeLibrary="2"
-				UsePrecompiledHeader="0"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="UnitTestPCH.h"
 				WarningLevel="3"
 				WarningLevel="3"
 				Detect64BitPortabilityProblems="true"
 				Detect64BitPortabilityProblems="true"
 				DebugInformationFormat="3"
 				DebugInformationFormat="3"
@@ -467,7 +473,7 @@
 				Name="VCLinkerTool"
 				Name="VCLinkerTool"
 				AdditionalDependencies="assimp.lib cppunit64.lib"
 				AdditionalDependencies="assimp.lib cppunit64.lib"
 				LinkIncremental="1"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="..\..\lib\assimp_release_dll_x64"
+				AdditionalLibraryDirectories="..\..\lib\assimp_$(ConfigurationName)_$(PlatformName)\"
 				GenerateDebugInformation="true"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				SubSystem="1"
 				OptimizeReferences="2"
 				OptimizeReferences="2"
@@ -500,11 +506,11 @@
 			/>
 			/>
 		</Configuration>
 		</Configuration>
 		<Configuration
 		<Configuration
-			Name="Debug_DLL|Win32"
+			Name="debug-dll|Win32"
 			OutputDirectory="./../../bin/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
 			OutputDirectory="./../../bin/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
 			IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
 			IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
 			ConfigurationType="1"
 			ConfigurationType="1"
-			InheritedPropertySheets=".\UnitTest.vsprops"
+			InheritedPropertySheets=".\shared\UnitTest.vsprops"
 			CharacterSet="1"
 			CharacterSet="1"
 			>
 			>
 			<Tool
 			<Tool
@@ -530,7 +536,8 @@
 				MinimalRebuild="true"
 				MinimalRebuild="true"
 				BasicRuntimeChecks="3"
 				BasicRuntimeChecks="3"
 				RuntimeLibrary="3"
 				RuntimeLibrary="3"
-				UsePrecompiledHeader="0"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="UnitTestPCH.h"
 				WarningLevel="3"
 				WarningLevel="3"
 				Detect64BitPortabilityProblems="true"
 				Detect64BitPortabilityProblems="true"
 				DebugInformationFormat="4"
 				DebugInformationFormat="4"
@@ -549,7 +556,7 @@
 				AdditionalDependencies="assimp.lib cppunitd.lib"
 				AdditionalDependencies="assimp.lib cppunitd.lib"
 				LinkIncremental="2"
 				LinkIncremental="2"
 				SuppressStartupBanner="false"
 				SuppressStartupBanner="false"
-				AdditionalLibraryDirectories="..\..\lib\assimp_debug_dll_win32"
+				AdditionalLibraryDirectories="..\..\lib\assimp_$(ConfigurationName)_$(PlatformName)\"
 				IgnoreDefaultLibraryNames=""
 				IgnoreDefaultLibraryNames=""
 				GenerateDebugInformation="true"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				SubSystem="1"
@@ -581,11 +588,11 @@
 			/>
 			/>
 		</Configuration>
 		</Configuration>
 		<Configuration
 		<Configuration
-			Name="Debug_DLL|x64"
+			Name="debug-dll|x64"
 			OutputDirectory="./../../bin/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
 			OutputDirectory="./../../bin/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
 			IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
 			IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
 			ConfigurationType="1"
 			ConfigurationType="1"
-			InheritedPropertySheets=".\UnitTest.vsprops"
+			InheritedPropertySheets=".\shared\UnitTest.vsprops"
 			CharacterSet="1"
 			CharacterSet="1"
 			>
 			>
 			<Tool
 			<Tool
@@ -612,7 +619,8 @@
 				MinimalRebuild="true"
 				MinimalRebuild="true"
 				BasicRuntimeChecks="3"
 				BasicRuntimeChecks="3"
 				RuntimeLibrary="3"
 				RuntimeLibrary="3"
-				UsePrecompiledHeader="0"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="UnitTestPCH.h"
 				WarningLevel="3"
 				WarningLevel="3"
 				Detect64BitPortabilityProblems="true"
 				Detect64BitPortabilityProblems="true"
 				DebugInformationFormat="3"
 				DebugInformationFormat="3"
@@ -631,7 +639,7 @@
 				AdditionalDependencies="assimp.lib cppunit64d.lib"
 				AdditionalDependencies="assimp.lib cppunit64d.lib"
 				LinkIncremental="2"
 				LinkIncremental="2"
 				SuppressStartupBanner="false"
 				SuppressStartupBanner="false"
-				AdditionalLibraryDirectories="..\..\lib\assimp_debug_dll_x64"
+				AdditionalLibraryDirectories="..\..\lib\assimp_$(ConfigurationName)_$(PlatformName)\"
 				IgnoreDefaultLibraryNames=""
 				IgnoreDefaultLibraryNames=""
 				GenerateDebugInformation="true"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				SubSystem="1"
@@ -663,11 +671,11 @@
 			/>
 			/>
 		</Configuration>
 		</Configuration>
 		<Configuration
 		<Configuration
-			Name="Release -noBoost|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)"
+			Name="release-noboost-st|Win32"
+			OutputDirectory="./../../bin/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
+			IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
 			ConfigurationType="1"
 			ConfigurationType="1"
-			InheritedPropertySheets=".\UnitTest.vsprops"
+			InheritedPropertySheets=".\shared\UnitTest.vsprops;.\shared\NoBoostShared.vsprops"
 			CharacterSet="1"
 			CharacterSet="1"
 			WholeProgramOptimization="1"
 			WholeProgramOptimization="1"
 			>
 			>
@@ -691,7 +699,8 @@
 				AdditionalIncludeDirectories="..\..\code;..\..\include"
 				AdditionalIncludeDirectories="..\..\code;..\..\include"
 				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
 				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
 				RuntimeLibrary="0"
 				RuntimeLibrary="0"
-				UsePrecompiledHeader="0"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="UnitTestPCH.h"
 				WarningLevel="3"
 				WarningLevel="3"
 				Detect64BitPortabilityProblems="true"
 				Detect64BitPortabilityProblems="true"
 				DebugInformationFormat="3"
 				DebugInformationFormat="3"
@@ -709,7 +718,7 @@
 				Name="VCLinkerTool"
 				Name="VCLinkerTool"
 				AdditionalDependencies="assimp.lib cppunit.lib"
 				AdditionalDependencies="assimp.lib cppunit.lib"
 				LinkIncremental="1"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="..\..\lib\assimp_release_win32"
+				AdditionalLibraryDirectories="..\..\lib\assimp_$(ConfigurationName)_$(PlatformName)\"
 				GenerateDebugInformation="true"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				SubSystem="1"
 				OptimizeReferences="2"
 				OptimizeReferences="2"
@@ -742,11 +751,11 @@
 			/>
 			/>
 		</Configuration>
 		</Configuration>
 		<Configuration
 		<Configuration
-			Name="Release -noBoost|x64"
+			Name="release-noboost-st|x64"
 			OutputDirectory="$(PlatformName)\$(ConfigurationName)"
 			OutputDirectory="$(PlatformName)\$(ConfigurationName)"
 			IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
 			IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
 			ConfigurationType="1"
 			ConfigurationType="1"
-			InheritedPropertySheets=".\UnitTest.vsprops"
+			InheritedPropertySheets=".\shared\UnitTest.vsprops;.\shared\NoBoostShared.vsprops"
 			CharacterSet="1"
 			CharacterSet="1"
 			WholeProgramOptimization="1"
 			WholeProgramOptimization="1"
 			>
 			>
@@ -771,7 +780,8 @@
 				AdditionalIncludeDirectories="..\..\code;..\..\include"
 				AdditionalIncludeDirectories="..\..\code;..\..\include"
 				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
 				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
 				RuntimeLibrary="0"
 				RuntimeLibrary="0"
-				UsePrecompiledHeader="0"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="UnitTestPCH.h"
 				WarningLevel="3"
 				WarningLevel="3"
 				Detect64BitPortabilityProblems="true"
 				Detect64BitPortabilityProblems="true"
 				DebugInformationFormat="3"
 				DebugInformationFormat="3"
@@ -789,7 +799,7 @@
 				Name="VCLinkerTool"
 				Name="VCLinkerTool"
 				AdditionalDependencies="assimp.lib cppunit64.lib"
 				AdditionalDependencies="assimp.lib cppunit64.lib"
 				LinkIncremental="1"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="..\..\lib\assimp_release_x64"
+				AdditionalLibraryDirectories="..\..\lib\assimp_$(ConfigurationName)_$(PlatformName)\"
 				GenerateDebugInformation="true"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				SubSystem="1"
 				OptimizeReferences="2"
 				OptimizeReferences="2"
@@ -822,11 +832,11 @@
 			/>
 			/>
 		</Configuration>
 		</Configuration>
 		<Configuration
 		<Configuration
-			Name="Debug -noBoost|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)"
+			Name="debug-noboost-st|Win32"
+			OutputDirectory="./../../bin/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
+			IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
 			ConfigurationType="1"
 			ConfigurationType="1"
-			InheritedPropertySheets=".\UnitTest.vsprops"
+			InheritedPropertySheets=".\shared\UnitTest.vsprops;.\shared\NoBoostShared.vsprops"
 			CharacterSet="1"
 			CharacterSet="1"
 			>
 			>
 			<Tool
 			<Tool
@@ -852,7 +862,8 @@
 				MinimalRebuild="true"
 				MinimalRebuild="true"
 				BasicRuntimeChecks="3"
 				BasicRuntimeChecks="3"
 				RuntimeLibrary="1"
 				RuntimeLibrary="1"
-				UsePrecompiledHeader="0"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="UnitTestPCH.h"
 				WarningLevel="3"
 				WarningLevel="3"
 				Detect64BitPortabilityProblems="true"
 				Detect64BitPortabilityProblems="true"
 				DebugInformationFormat="4"
 				DebugInformationFormat="4"
@@ -871,7 +882,7 @@
 				AdditionalDependencies="assimp.lib cppunitd.lib"
 				AdditionalDependencies="assimp.lib cppunitd.lib"
 				LinkIncremental="2"
 				LinkIncremental="2"
 				SuppressStartupBanner="false"
 				SuppressStartupBanner="false"
-				AdditionalLibraryDirectories="..\..\lib\assimp_debug_win32"
+				AdditionalLibraryDirectories="..\..\lib\assimp_$(ConfigurationName)_$(PlatformName)\"
 				IgnoreDefaultLibraryNames=""
 				IgnoreDefaultLibraryNames=""
 				GenerateDebugInformation="true"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				SubSystem="1"
@@ -903,11 +914,11 @@
 			/>
 			/>
 		</Configuration>
 		</Configuration>
 		<Configuration
 		<Configuration
-			Name="Debug -noBoost|x64"
+			Name="debug-noboost-st|x64"
 			OutputDirectory="$(PlatformName)\$(ConfigurationName)"
 			OutputDirectory="$(PlatformName)\$(ConfigurationName)"
 			IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
 			IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
 			ConfigurationType="1"
 			ConfigurationType="1"
-			InheritedPropertySheets=".\UnitTest.vsprops"
+			InheritedPropertySheets=".\shared\UnitTest.vsprops;.\shared\NoBoostShared.vsprops"
 			CharacterSet="1"
 			CharacterSet="1"
 			>
 			>
 			<Tool
 			<Tool
@@ -934,7 +945,8 @@
 				MinimalRebuild="true"
 				MinimalRebuild="true"
 				BasicRuntimeChecks="3"
 				BasicRuntimeChecks="3"
 				RuntimeLibrary="1"
 				RuntimeLibrary="1"
-				UsePrecompiledHeader="0"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="UnitTestPCH.h"
 				WarningLevel="3"
 				WarningLevel="3"
 				Detect64BitPortabilityProblems="true"
 				Detect64BitPortabilityProblems="true"
 				DebugInformationFormat="3"
 				DebugInformationFormat="3"
@@ -953,10 +965,336 @@
 				AdditionalDependencies="assimp.lib cppunit64d.lib"
 				AdditionalDependencies="assimp.lib cppunit64d.lib"
 				LinkIncremental="2"
 				LinkIncremental="2"
 				SuppressStartupBanner="false"
 				SuppressStartupBanner="false"
-				AdditionalLibraryDirectories="..\..\lib\assimp_debug_x64"
+				AdditionalLibraryDirectories="..\..\lib\assimp_$(ConfigurationName)_$(PlatformName)\"
+				IgnoreDefaultLibraryNames=""
+				GenerateDebugInformation="true"
+				SubSystem="1"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="debug-st|Win32"
+			OutputDirectory="./../../bin/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
+			IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
+			ConfigurationType="1"
+			InheritedPropertySheets=".\shared\UnitTest.vsprops;.\shared\SingleThreadedShared.vsprops"
+			CharacterSet="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\..\code;..\..\include"
+				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+				MinimalRebuild="true"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="UnitTestPCH.h"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="4"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="assimp.lib cppunitd.lib"
+				LinkIncremental="2"
+				SuppressStartupBanner="false"
+				AdditionalLibraryDirectories="..\..\lib\assimp_$(ConfigurationName)_$(PlatformName)\"
 				IgnoreDefaultLibraryNames=""
 				IgnoreDefaultLibraryNames=""
 				GenerateDebugInformation="true"
 				GenerateDebugInformation="true"
 				SubSystem="1"
 				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="debug-st|x64"
+			OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+			ConfigurationType="1"
+			InheritedPropertySheets=".\shared\UnitTest.vsprops;.\shared\SingleThreadedShared.vsprops"
+			CharacterSet="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TargetEnvironment="3"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\..\code;..\..\include"
+				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+				MinimalRebuild="true"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="UnitTestPCH.h"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="assimp.lib cppunit64d.lib"
+				LinkIncremental="2"
+				SuppressStartupBanner="false"
+				AdditionalLibraryDirectories="..\..\lib\assimp_$(ConfigurationName)_$(PlatformName)\"
+				IgnoreDefaultLibraryNames=""
+				GenerateDebugInformation="true"
+				SubSystem="1"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="release-st|Win32"
+			OutputDirectory="./../../bin/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
+			IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
+			ConfigurationType="1"
+			InheritedPropertySheets=".\shared\UnitTest.vsprops;.\shared\SingleThreadedShared.vsprops"
+			CharacterSet="1"
+			WholeProgramOptimization="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalIncludeDirectories="..\..\code;..\..\include"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				RuntimeLibrary="0"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="UnitTestPCH.h"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="assimp.lib cppunit.lib"
+				LinkIncremental="1"
+				AdditionalLibraryDirectories="..\..\lib\assimp_$(ConfigurationName)_$(PlatformName)\"
+				GenerateDebugInformation="true"
+				SubSystem="1"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="release-st|x64"
+			OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+			ConfigurationType="1"
+			InheritedPropertySheets=".\shared\UnitTest.vsprops;.\shared\SingleThreadedShared.vsprops"
+			CharacterSet="1"
+			WholeProgramOptimization="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TargetEnvironment="3"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalIncludeDirectories="..\..\code;..\..\include"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				RuntimeLibrary="0"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="UnitTestPCH.h"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="assimp.lib cppunit64.lib"
+				LinkIncremental="1"
+				AdditionalLibraryDirectories="..\..\lib\assimp_$(ConfigurationName)_$(PlatformName)\"
+				GenerateDebugInformation="true"
+				SubSystem="1"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
 				TargetMachine="17"
 				TargetMachine="17"
 			/>
 			/>
 			<Tool
 			<Tool
@@ -989,14 +1327,10 @@
 	</References>
 	</References>
 	<Files>
 	<Files>
 		<Filter
 		<Filter
-			Name="source"
+			Name="tests"
 			Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
 			Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
 			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
 			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
 			>
 			>
-			<File
-				RelativePath="..\..\test\unit\Main.cpp"
-				>
-			</File>
 			<File
 			<File
 				RelativePath="..\..\test\unit\utFindInvalidData.cpp"
 				RelativePath="..\..\test\unit\utFindInvalidData.cpp"
 				>
 				>
@@ -1093,6 +1427,14 @@
 				RelativePath="..\..\test\unit\utRemoveRedundantMaterials.h"
 				RelativePath="..\..\test\unit\utRemoveRedundantMaterials.h"
 				>
 				>
 			</File>
 			</File>
+			<File
+				RelativePath="..\..\test\unit\utScenePreprocessor.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\test\unit\utScenePreprocessor.h"
+				>
+			</File>
 			<File
 			<File
 				RelativePath="..\..\test\unit\utSharedPPData.cpp"
 				RelativePath="..\..\test\unit\utSharedPPData.cpp"
 				>
 				>
@@ -1117,6 +1459,14 @@
 				RelativePath="..\..\test\unit\utSplitLargeMeshes.h"
 				RelativePath="..\..\test\unit\utSplitLargeMeshes.h"
 				>
 				>
 			</File>
 			</File>
+			<File
+				RelativePath="..\..\test\unit\utTargetAnimation.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\test\unit\utTargetAnimation.h"
+				>
+			</File>
 			<File
 			<File
 				RelativePath="..\..\test\unit\utTextureTransform.cpp"
 				RelativePath="..\..\test\unit\utTextureTransform.cpp"
 				>
 				>
@@ -1137,6 +1487,418 @@
 				RelativePath="..\..\test\unit\utVertexTriangleAdjacency.h"
 				RelativePath="..\..\test\unit\utVertexTriangleAdjacency.h"
 				>
 				>
 			</File>
 			</File>
+			<Filter
+				Name="compile-tests"
+				>
+				<File
+					RelativePath="..\..\test\unit\CCompilerTest.c"
+					>
+					<FileConfiguration
+						Name="debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							UsePrecompiledHeader="0"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="debug|x64"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							UsePrecompiledHeader="0"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							UsePrecompiledHeader="0"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="release|x64"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							UsePrecompiledHeader="0"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="release-dll|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							UsePrecompiledHeader="0"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="release-dll|x64"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							UsePrecompiledHeader="0"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="debug-dll|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							UsePrecompiledHeader="0"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="debug-dll|x64"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							UsePrecompiledHeader="0"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="release-noboost-st|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							UsePrecompiledHeader="0"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="release-noboost-st|x64"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							UsePrecompiledHeader="0"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="debug-noboost-st|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							UsePrecompiledHeader="0"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="debug-noboost-st|x64"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							UsePrecompiledHeader="0"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="debug-st|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							UsePrecompiledHeader="0"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="debug-st|x64"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							UsePrecompiledHeader="0"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="release-st|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							UsePrecompiledHeader="0"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="release-st|x64"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							UsePrecompiledHeader="0"
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\..\test\unit\BoostWorkaround\tupletest.cpp"
+					>
+					<FileConfiguration
+						Name="debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							UsePrecompiledHeader="0"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="debug|x64"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							UsePrecompiledHeader="0"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							UsePrecompiledHeader="0"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="release|x64"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							UsePrecompiledHeader="0"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="release-dll|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							UsePrecompiledHeader="0"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="release-dll|x64"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							UsePrecompiledHeader="0"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="debug-dll|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							UsePrecompiledHeader="0"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="debug-dll|x64"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							UsePrecompiledHeader="0"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="release-noboost-st|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							UsePrecompiledHeader="0"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="release-noboost-st|x64"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							UsePrecompiledHeader="0"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="debug-noboost-st|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							UsePrecompiledHeader="0"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="debug-noboost-st|x64"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							UsePrecompiledHeader="0"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="debug-st|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							UsePrecompiledHeader="0"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="debug-st|x64"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							UsePrecompiledHeader="0"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="release-st|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							UsePrecompiledHeader="0"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="release-st|x64"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							UsePrecompiledHeader="0"
+						/>
+					</FileConfiguration>
+				</File>
+			</Filter>
+		</Filter>
+		<Filter
+			Name="setup"
+			>
+			<File
+				RelativePath="..\..\test\unit\Main.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\test\unit\UnitTestPCH.cpp"
+				>
+				<FileConfiguration
+					Name="debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="release|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="release-dll|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="release-dll|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="debug-dll|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="debug-dll|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="release-noboost-st|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="release-noboost-st|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="debug-noboost-st|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="debug-noboost-st|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="debug-st|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="debug-st|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="release-st|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="release-st|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\..\test\unit\UnitTestPCH.h"
+				>
+			</File>
 		</Filter>
 		</Filter>
 	</Files>
 	</Files>
 	<Globals>
 	<Globals>

+ 128 - 84
workspaces/vc8/assimp.sln

@@ -33,92 +33,136 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jAssimp_NOT_WORKING", "jAss
 EndProject
 EndProject
 Global
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
-		Debug -noBoost|Win32 = Debug -noBoost|Win32
-		Debug -noBoost|x64 = Debug -noBoost|x64
-		Debug_DLL|Win32 = Debug_DLL|Win32
-		Debug_DLL|x64 = Debug_DLL|x64
-		Debug|Win32 = Debug|Win32
-		Debug|x64 = Debug|x64
-		Release -noBoost|Win32 = Release -noBoost|Win32
-		Release -noBoost|x64 = Release -noBoost|x64
-		Release_DLL|Win32 = Release_DLL|Win32
-		Release_DLL|x64 = Release_DLL|x64
-		Release|Win32 = Release|Win32
-		Release|x64 = Release|x64
+		debug|Win32 = debug|Win32
+		debug|x64 = debug|x64
+		debug-dll|Win32 = debug-dll|Win32
+		debug-dll|x64 = debug-dll|x64
+		debug-noboost-st|Win32 = debug-noboost-st|Win32
+		debug-noboost-st|x64 = debug-noboost-st|x64
+		debug-st|Win32 = debug-st|Win32
+		debug-st|x64 = debug-st|x64
+		release|Win32 = release|Win32
+		release|x64 = release|x64
+		release-dll|Win32 = release-dll|Win32
+		release-dll|x64 = release-dll|x64
+		release-noboost|Win32 = release-noboost|Win32
+		release-noboost|x64 = release-noboost|x64
+		release-st|Win32 = release-st|Win32
+		release-st|x64 = release-st|x64
 	EndGlobalSection
 	EndGlobalSection
 	GlobalSection(ProjectConfigurationPlatforms) = postSolution
 	GlobalSection(ProjectConfigurationPlatforms) = postSolution
-		{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.Debug -noBoost|Win32.ActiveCfg = Debug -noBoost|Win32
-		{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.Debug -noBoost|Win32.Build.0 = Debug -noBoost|Win32
-		{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.Debug -noBoost|x64.ActiveCfg = Debug -noBoost|x64
-		{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.Debug -noBoost|x64.Build.0 = Debug -noBoost|x64
-		{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.Debug_DLL|Win32.ActiveCfg = Debug_DLL|Win32
-		{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.Debug_DLL|Win32.Build.0 = Debug_DLL|Win32
-		{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.Debug_DLL|x64.ActiveCfg = Debug_DLL|x64
-		{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.Debug_DLL|x64.Build.0 = Debug_DLL|x64
-		{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.Debug|Win32.ActiveCfg = Debug|Win32
-		{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.Debug|Win32.Build.0 = Debug|Win32
-		{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.Debug|x64.ActiveCfg = Debug|x64
-		{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.Debug|x64.Build.0 = Debug|x64
-		{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.Release -noBoost|Win32.ActiveCfg = Release -noBoost|Win32
-		{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.Release -noBoost|Win32.Build.0 = Release -noBoost|Win32
-		{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.Release -noBoost|x64.ActiveCfg = Release -noBoost|x64
-		{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.Release -noBoost|x64.Build.0 = Release -noBoost|x64
-		{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.Release_DLL|Win32.ActiveCfg = Release_DLL|Win32
-		{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.Release_DLL|Win32.Build.0 = Release_DLL|Win32
-		{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.Release_DLL|x64.ActiveCfg = Release_DLL|x64
-		{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.Release_DLL|x64.Build.0 = Release_DLL|x64
-		{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.Release|Win32.ActiveCfg = Release|Win32
-		{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.Release|Win32.Build.0 = Release|Win32
-		{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.Release|x64.ActiveCfg = Release|x64
-		{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.Release|x64.Build.0 = Release|x64
-		{5691E159-2D9B-407F-971F-EA5C592DC524}.Debug -noBoost|Win32.ActiveCfg = Debug -noBoost|Win32
-		{5691E159-2D9B-407F-971F-EA5C592DC524}.Debug -noBoost|Win32.Build.0 = Debug -noBoost|Win32
-		{5691E159-2D9B-407F-971F-EA5C592DC524}.Debug -noBoost|x64.ActiveCfg = Debug -noBoost|x64
-		{5691E159-2D9B-407F-971F-EA5C592DC524}.Debug -noBoost|x64.Build.0 = Debug -noBoost|x64
-		{5691E159-2D9B-407F-971F-EA5C592DC524}.Debug_DLL|Win32.ActiveCfg = Debug_DLL|Win32
-		{5691E159-2D9B-407F-971F-EA5C592DC524}.Debug_DLL|Win32.Build.0 = Debug_DLL|Win32
-		{5691E159-2D9B-407F-971F-EA5C592DC524}.Debug_DLL|x64.ActiveCfg = Debug_DLL|x64
-		{5691E159-2D9B-407F-971F-EA5C592DC524}.Debug_DLL|x64.Build.0 = Debug_DLL|x64
-		{5691E159-2D9B-407F-971F-EA5C592DC524}.Debug|Win32.ActiveCfg = Debug|Win32
-		{5691E159-2D9B-407F-971F-EA5C592DC524}.Debug|Win32.Build.0 = Debug|Win32
-		{5691E159-2D9B-407F-971F-EA5C592DC524}.Debug|x64.ActiveCfg = Debug|x64
-		{5691E159-2D9B-407F-971F-EA5C592DC524}.Debug|x64.Build.0 = Debug|x64
-		{5691E159-2D9B-407F-971F-EA5C592DC524}.Release -noBoost|Win32.ActiveCfg = Release -noBoost|Win32
-		{5691E159-2D9B-407F-971F-EA5C592DC524}.Release -noBoost|Win32.Build.0 = Release -noBoost|Win32
-		{5691E159-2D9B-407F-971F-EA5C592DC524}.Release -noBoost|x64.ActiveCfg = Release -noBoost|x64
-		{5691E159-2D9B-407F-971F-EA5C592DC524}.Release -noBoost|x64.Build.0 = Release -noBoost|x64
-		{5691E159-2D9B-407F-971F-EA5C592DC524}.Release_DLL|Win32.ActiveCfg = Release_DLL|Win32
-		{5691E159-2D9B-407F-971F-EA5C592DC524}.Release_DLL|Win32.Build.0 = Release_DLL|Win32
-		{5691E159-2D9B-407F-971F-EA5C592DC524}.Release_DLL|x64.ActiveCfg = Release_DLL|x64
-		{5691E159-2D9B-407F-971F-EA5C592DC524}.Release_DLL|x64.Build.0 = Release_DLL|x64
-		{5691E159-2D9B-407F-971F-EA5C592DC524}.Release|Win32.ActiveCfg = Release|Win32
-		{5691E159-2D9B-407F-971F-EA5C592DC524}.Release|Win32.Build.0 = Release|Win32
-		{5691E159-2D9B-407F-971F-EA5C592DC524}.Release|x64.ActiveCfg = Release|x64
-		{5691E159-2D9B-407F-971F-EA5C592DC524}.Release|x64.Build.0 = Release|x64
-		{9B9D1C90-8A03-409A-B547-AE7B48B90F1A}.Debug -noBoost|Win32.ActiveCfg = Debug -noBoost|Win32
-		{9B9D1C90-8A03-409A-B547-AE7B48B90F1A}.Debug -noBoost|x64.ActiveCfg = Debug -noBoost|x64
-		{9B9D1C90-8A03-409A-B547-AE7B48B90F1A}.Debug_DLL|Win32.ActiveCfg = Debug_DLL|Win32
-		{9B9D1C90-8A03-409A-B547-AE7B48B90F1A}.Debug_DLL|x64.ActiveCfg = Debug_DLL|x64
-		{9B9D1C90-8A03-409A-B547-AE7B48B90F1A}.Debug|Win32.ActiveCfg = Debug|Win32
-		{9B9D1C90-8A03-409A-B547-AE7B48B90F1A}.Debug|x64.ActiveCfg = Debug|x64
-		{9B9D1C90-8A03-409A-B547-AE7B48B90F1A}.Release -noBoost|Win32.ActiveCfg = Release -noBoost|Win32
-		{9B9D1C90-8A03-409A-B547-AE7B48B90F1A}.Release -noBoost|x64.ActiveCfg = Release -noBoost|x64
-		{9B9D1C90-8A03-409A-B547-AE7B48B90F1A}.Release_DLL|Win32.ActiveCfg = Release_DLL|Win32
-		{9B9D1C90-8A03-409A-B547-AE7B48B90F1A}.Release_DLL|x64.ActiveCfg = Release_DLL|x64
-		{9B9D1C90-8A03-409A-B547-AE7B48B90F1A}.Release|Win32.ActiveCfg = Release|Win32
-		{9B9D1C90-8A03-409A-B547-AE7B48B90F1A}.Release|x64.ActiveCfg = Release|x64
-		{FE78BFBA-4BA5-457D-8602-B800D498102D}.Debug -noBoost|Win32.ActiveCfg = Debug -noBoost|Win32
-		{FE78BFBA-4BA5-457D-8602-B800D498102D}.Debug -noBoost|x64.ActiveCfg = Debug -noBoost|x64
-		{FE78BFBA-4BA5-457D-8602-B800D498102D}.Debug_DLL|Win32.ActiveCfg = Debug|Win32
-		{FE78BFBA-4BA5-457D-8602-B800D498102D}.Debug_DLL|x64.ActiveCfg = Debug|x64
-		{FE78BFBA-4BA5-457D-8602-B800D498102D}.Debug|Win32.ActiveCfg = Debug|Win32
-		{FE78BFBA-4BA5-457D-8602-B800D498102D}.Debug|x64.ActiveCfg = Debug|x64
-		{FE78BFBA-4BA5-457D-8602-B800D498102D}.Release -noBoost|Win32.ActiveCfg = Release -noBoost|Win32
-		{FE78BFBA-4BA5-457D-8602-B800D498102D}.Release -noBoost|x64.ActiveCfg = Release -noBoost|x64
-		{FE78BFBA-4BA5-457D-8602-B800D498102D}.Release_DLL|Win32.ActiveCfg = Release|Win32
-		{FE78BFBA-4BA5-457D-8602-B800D498102D}.Release_DLL|x64.ActiveCfg = Release|x64
-		{FE78BFBA-4BA5-457D-8602-B800D498102D}.Release|Win32.ActiveCfg = Release|Win32
-		{FE78BFBA-4BA5-457D-8602-B800D498102D}.Release|x64.ActiveCfg = Release|x64
+		{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.debug|Win32.ActiveCfg = debug|Win32
+		{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.debug|Win32.Build.0 = debug|Win32
+		{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.debug|x64.ActiveCfg = debug|x64
+		{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.debug|x64.Build.0 = debug|x64
+		{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.debug-dll|Win32.ActiveCfg = debug-dll|Win32
+		{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.debug-dll|Win32.Build.0 = debug-dll|Win32
+		{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.debug-dll|x64.ActiveCfg = debug-dll|x64
+		{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.debug-dll|x64.Build.0 = debug-dll|x64
+		{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.debug-noboost-st|Win32.ActiveCfg = debug-noboost-st|Win32
+		{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.debug-noboost-st|Win32.Build.0 = debug-noboost-st|Win32
+		{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.debug-noboost-st|x64.ActiveCfg = debug-noboost-st|x64
+		{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.debug-noboost-st|x64.Build.0 = debug-noboost-st|x64
+		{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.debug-st|Win32.ActiveCfg = debug-st|Win32
+		{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.debug-st|Win32.Build.0 = debug-st|Win32
+		{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.debug-st|x64.ActiveCfg = debug-st|x64
+		{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.debug-st|x64.Build.0 = debug-st|x64
+		{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.release|Win32.ActiveCfg = release|Win32
+		{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.release|Win32.Build.0 = release|Win32
+		{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.release|x64.ActiveCfg = release|x64
+		{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.release|x64.Build.0 = release|x64
+		{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.release-dll|Win32.ActiveCfg = release-dll|Win32
+		{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.release-dll|Win32.Build.0 = release-dll|Win32
+		{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.release-dll|x64.ActiveCfg = release-dll|x64
+		{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.release-dll|x64.Build.0 = release-dll|x64
+		{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.release-noboost|Win32.ActiveCfg = release-noboost-st|Win32
+		{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.release-noboost|Win32.Build.0 = release-noboost-st|Win32
+		{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.release-noboost|x64.ActiveCfg = release-noboost-st|x64
+		{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.release-noboost|x64.Build.0 = release-noboost-st|x64
+		{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.release-st|Win32.ActiveCfg = release-st|Win32
+		{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.release-st|Win32.Build.0 = release-st|Win32
+		{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.release-st|x64.ActiveCfg = release-st|x64
+		{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.release-st|x64.Build.0 = release-st|x64
+		{5691E159-2D9B-407F-971F-EA5C592DC524}.debug|Win32.ActiveCfg = debug|Win32
+		{5691E159-2D9B-407F-971F-EA5C592DC524}.debug|Win32.Build.0 = debug|Win32
+		{5691E159-2D9B-407F-971F-EA5C592DC524}.debug|x64.ActiveCfg = debug|x64
+		{5691E159-2D9B-407F-971F-EA5C592DC524}.debug|x64.Build.0 = debug|x64
+		{5691E159-2D9B-407F-971F-EA5C592DC524}.debug-dll|Win32.ActiveCfg = debug-dll|Win32
+		{5691E159-2D9B-407F-971F-EA5C592DC524}.debug-dll|Win32.Build.0 = debug-dll|Win32
+		{5691E159-2D9B-407F-971F-EA5C592DC524}.debug-dll|x64.ActiveCfg = debug-dll|x64
+		{5691E159-2D9B-407F-971F-EA5C592DC524}.debug-dll|x64.Build.0 = debug-dll|x64
+		{5691E159-2D9B-407F-971F-EA5C592DC524}.debug-noboost-st|Win32.ActiveCfg = debug-noboost-st|Win32
+		{5691E159-2D9B-407F-971F-EA5C592DC524}.debug-noboost-st|Win32.Build.0 = debug-noboost-st|Win32
+		{5691E159-2D9B-407F-971F-EA5C592DC524}.debug-noboost-st|x64.ActiveCfg = debug-noboost-st|x64
+		{5691E159-2D9B-407F-971F-EA5C592DC524}.debug-noboost-st|x64.Build.0 = debug-noboost-st|x64
+		{5691E159-2D9B-407F-971F-EA5C592DC524}.debug-st|Win32.ActiveCfg = debug-st|Win32
+		{5691E159-2D9B-407F-971F-EA5C592DC524}.debug-st|Win32.Build.0 = debug-st|Win32
+		{5691E159-2D9B-407F-971F-EA5C592DC524}.debug-st|x64.ActiveCfg = debug-st|x64
+		{5691E159-2D9B-407F-971F-EA5C592DC524}.debug-st|x64.Build.0 = debug-st|x64
+		{5691E159-2D9B-407F-971F-EA5C592DC524}.release|Win32.ActiveCfg = release|Win32
+		{5691E159-2D9B-407F-971F-EA5C592DC524}.release|Win32.Build.0 = release|Win32
+		{5691E159-2D9B-407F-971F-EA5C592DC524}.release|x64.ActiveCfg = release|x64
+		{5691E159-2D9B-407F-971F-EA5C592DC524}.release|x64.Build.0 = release|x64
+		{5691E159-2D9B-407F-971F-EA5C592DC524}.release-dll|Win32.ActiveCfg = release-dll|Win32
+		{5691E159-2D9B-407F-971F-EA5C592DC524}.release-dll|Win32.Build.0 = release-dll|Win32
+		{5691E159-2D9B-407F-971F-EA5C592DC524}.release-dll|x64.ActiveCfg = release-dll|x64
+		{5691E159-2D9B-407F-971F-EA5C592DC524}.release-dll|x64.Build.0 = release-dll|x64
+		{5691E159-2D9B-407F-971F-EA5C592DC524}.release-noboost|Win32.ActiveCfg = release-noboost-st|Win32
+		{5691E159-2D9B-407F-971F-EA5C592DC524}.release-noboost|Win32.Build.0 = release-noboost-st|Win32
+		{5691E159-2D9B-407F-971F-EA5C592DC524}.release-noboost|x64.ActiveCfg = release-noboost-st|x64
+		{5691E159-2D9B-407F-971F-EA5C592DC524}.release-noboost|x64.Build.0 = release-noboost-st|x64
+		{5691E159-2D9B-407F-971F-EA5C592DC524}.release-st|Win32.ActiveCfg = release-st|Win32
+		{5691E159-2D9B-407F-971F-EA5C592DC524}.release-st|Win32.Build.0 = release-st|Win32
+		{5691E159-2D9B-407F-971F-EA5C592DC524}.release-st|x64.ActiveCfg = release-st|x64
+		{5691E159-2D9B-407F-971F-EA5C592DC524}.release-st|x64.Build.0 = release-st|x64
+		{9B9D1C90-8A03-409A-B547-AE7B48B90F1A}.debug|Win32.ActiveCfg = debug|Win32
+		{9B9D1C90-8A03-409A-B547-AE7B48B90F1A}.debug|Win32.Build.0 = debug|Win32
+		{9B9D1C90-8A03-409A-B547-AE7B48B90F1A}.debug|x64.ActiveCfg = debug|x64
+		{9B9D1C90-8A03-409A-B547-AE7B48B90F1A}.debug|x64.Build.0 = debug|x64
+		{9B9D1C90-8A03-409A-B547-AE7B48B90F1A}.debug-dll|Win32.ActiveCfg = debug-dll|Win32
+		{9B9D1C90-8A03-409A-B547-AE7B48B90F1A}.debug-dll|Win32.Build.0 = debug-dll|Win32
+		{9B9D1C90-8A03-409A-B547-AE7B48B90F1A}.debug-dll|x64.ActiveCfg = debug-dll|x64
+		{9B9D1C90-8A03-409A-B547-AE7B48B90F1A}.debug-dll|x64.Build.0 = debug-dll|x64
+		{9B9D1C90-8A03-409A-B547-AE7B48B90F1A}.debug-noboost-st|Win32.ActiveCfg = debug-noboost-st|Win32
+		{9B9D1C90-8A03-409A-B547-AE7B48B90F1A}.debug-noboost-st|Win32.Build.0 = debug-noboost-st|Win32
+		{9B9D1C90-8A03-409A-B547-AE7B48B90F1A}.debug-noboost-st|x64.ActiveCfg = debug-noboost-st|x64
+		{9B9D1C90-8A03-409A-B547-AE7B48B90F1A}.debug-noboost-st|x64.Build.0 = debug-noboost-st|x64
+		{9B9D1C90-8A03-409A-B547-AE7B48B90F1A}.debug-st|Win32.ActiveCfg = debug-st|Win32
+		{9B9D1C90-8A03-409A-B547-AE7B48B90F1A}.debug-st|Win32.Build.0 = debug-st|Win32
+		{9B9D1C90-8A03-409A-B547-AE7B48B90F1A}.debug-st|x64.ActiveCfg = debug-st|x64
+		{9B9D1C90-8A03-409A-B547-AE7B48B90F1A}.debug-st|x64.Build.0 = debug-st|x64
+		{9B9D1C90-8A03-409A-B547-AE7B48B90F1A}.release|Win32.ActiveCfg = release|Win32
+		{9B9D1C90-8A03-409A-B547-AE7B48B90F1A}.release|Win32.Build.0 = release|Win32
+		{9B9D1C90-8A03-409A-B547-AE7B48B90F1A}.release|x64.ActiveCfg = release|x64
+		{9B9D1C90-8A03-409A-B547-AE7B48B90F1A}.release|x64.Build.0 = release|x64
+		{9B9D1C90-8A03-409A-B547-AE7B48B90F1A}.release-dll|Win32.ActiveCfg = release-dll|Win32
+		{9B9D1C90-8A03-409A-B547-AE7B48B90F1A}.release-dll|Win32.Build.0 = release-dll|Win32
+		{9B9D1C90-8A03-409A-B547-AE7B48B90F1A}.release-dll|x64.ActiveCfg = release-dll|x64
+		{9B9D1C90-8A03-409A-B547-AE7B48B90F1A}.release-dll|x64.Build.0 = release-dll|x64
+		{9B9D1C90-8A03-409A-B547-AE7B48B90F1A}.release-noboost|Win32.ActiveCfg = release-noboost-st|Win32
+		{9B9D1C90-8A03-409A-B547-AE7B48B90F1A}.release-noboost|Win32.Build.0 = release-noboost-st|Win32
+		{9B9D1C90-8A03-409A-B547-AE7B48B90F1A}.release-noboost|x64.ActiveCfg = release-noboost-st|x64
+		{9B9D1C90-8A03-409A-B547-AE7B48B90F1A}.release-noboost|x64.Build.0 = release-noboost-st|x64
+		{9B9D1C90-8A03-409A-B547-AE7B48B90F1A}.release-st|Win32.ActiveCfg = release-st|Win32
+		{9B9D1C90-8A03-409A-B547-AE7B48B90F1A}.release-st|Win32.Build.0 = release-st|Win32
+		{9B9D1C90-8A03-409A-B547-AE7B48B90F1A}.release-st|x64.ActiveCfg = release-st|x64
+		{9B9D1C90-8A03-409A-B547-AE7B48B90F1A}.release-st|x64.Build.0 = release-st|x64
+		{FE78BFBA-4BA5-457D-8602-B800D498102D}.debug|Win32.ActiveCfg = debug|Win32
+		{FE78BFBA-4BA5-457D-8602-B800D498102D}.debug|x64.ActiveCfg = debug|x64
+		{FE78BFBA-4BA5-457D-8602-B800D498102D}.debug-dll|Win32.ActiveCfg = debug|Win32
+		{FE78BFBA-4BA5-457D-8602-B800D498102D}.debug-dll|x64.ActiveCfg = debug|x64
+		{FE78BFBA-4BA5-457D-8602-B800D498102D}.debug-noboost-st|Win32.ActiveCfg = debug -noboost|Win32
+		{FE78BFBA-4BA5-457D-8602-B800D498102D}.debug-noboost-st|x64.ActiveCfg = debug -noboost|x64
+		{FE78BFBA-4BA5-457D-8602-B800D498102D}.debug-st|Win32.ActiveCfg = debug-st|Win32
+		{FE78BFBA-4BA5-457D-8602-B800D498102D}.debug-st|x64.ActiveCfg = debug-st|x64
+		{FE78BFBA-4BA5-457D-8602-B800D498102D}.release|Win32.ActiveCfg = release|Win32
+		{FE78BFBA-4BA5-457D-8602-B800D498102D}.release|x64.ActiveCfg = release|x64
+		{FE78BFBA-4BA5-457D-8602-B800D498102D}.release-dll|Win32.ActiveCfg = release|Win32
+		{FE78BFBA-4BA5-457D-8602-B800D498102D}.release-dll|x64.ActiveCfg = release|x64
+		{FE78BFBA-4BA5-457D-8602-B800D498102D}.release-noboost|Win32.ActiveCfg = release -noboost|Win32
+		{FE78BFBA-4BA5-457D-8602-B800D498102D}.release-noboost|x64.ActiveCfg = release -noboost|x64
+		{FE78BFBA-4BA5-457D-8602-B800D498102D}.release-st|Win32.ActiveCfg = release-st|Win32
+		{FE78BFBA-4BA5-457D-8602-B800D498102D}.release-st|x64.ActiveCfg = release-st|x64
 	EndGlobalSection
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE
 		HideSolutionNode = FALSE

+ 497 - 136
workspaces/vc8/assimp.vcproj

@@ -2,7 +2,7 @@
 <VisualStudioProject
 <VisualStudioProject
 	ProjectType="Visual C++"
 	ProjectType="Visual C++"
 	Version="8,00"
 	Version="8,00"
-	Name="Assimp"
+	Name="assimp"
 	ProjectGUID="{5691E159-2D9B-407F-971F-EA5C592DC524}"
 	ProjectGUID="{5691E159-2D9B-407F-971F-EA5C592DC524}"
 	RootNamespace="assimp"
 	RootNamespace="assimp"
 	>
 	>
@@ -18,10 +18,9 @@
 	</ToolFiles>
 	</ToolFiles>
 	<Configurations>
 	<Configurations>
 		<Configuration
 		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="./../../lib/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
-			IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
+			Name="debug|Win32"
 			ConfigurationType="4"
 			ConfigurationType="4"
+			InheritedPropertySheets=".\shared\LibShared.vsprops"
 			>
 			>
 			<Tool
 			<Tool
 				Name="VCPreBuildEventTool"
 				Name="VCPreBuildEventTool"
@@ -82,9 +81,9 @@
 			/>
 			/>
 		</Configuration>
 		</Configuration>
 		<Configuration
 		<Configuration
-			Name="Debug|x64"
-			OutputDirectory="./../../lib/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
-			IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
+			Name="debug|x64"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
 			ConfigurationType="4"
 			ConfigurationType="4"
 			>
 			>
 			<Tool
 			<Tool
@@ -144,10 +143,9 @@
 			/>
 			/>
 		</Configuration>
 		</Configuration>
 		<Configuration
 		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="./../../lib/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
-			IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
+			Name="release|Win32"
 			ConfigurationType="4"
 			ConfigurationType="4"
+			InheritedPropertySheets=".\shared\LibShared.vsprops"
 			WholeProgramOptimization="0"
 			WholeProgramOptimization="0"
 			>
 			>
 			<Tool
 			<Tool
@@ -170,6 +168,7 @@
 				InlineFunctionExpansion="2"
 				InlineFunctionExpansion="2"
 				EnableIntrinsicFunctions="true"
 				EnableIntrinsicFunctions="true"
 				FavorSizeOrSpeed="1"
 				FavorSizeOrSpeed="1"
+				WholeProgramOptimization="false"
 				AdditionalIncludeDirectories=""
 				AdditionalIncludeDirectories=""
 				PreprocessorDefinitions="NDEBUG;_SCL_SECURE_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;WIN32"
 				PreprocessorDefinitions="NDEBUG;_SCL_SECURE_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;WIN32"
 				StringPooling="true"
 				StringPooling="true"
@@ -209,10 +208,9 @@
 			/>
 			/>
 		</Configuration>
 		</Configuration>
 		<Configuration
 		<Configuration
-			Name="Release|x64"
-			OutputDirectory="./../../lib/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
-			IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
+			Name="release|x64"
 			ConfigurationType="4"
 			ConfigurationType="4"
+			InheritedPropertySheets=".\shared\LibShared.vsprops"
 			WholeProgramOptimization="0"
 			WholeProgramOptimization="0"
 			>
 			>
 			<Tool
 			<Tool
@@ -275,10 +273,9 @@
 			/>
 			/>
 		</Configuration>
 		</Configuration>
 		<Configuration
 		<Configuration
-			Name="Release_DLL|Win32"
-			OutputDirectory="./../../bin/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
-			IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
+			Name="release-dll|Win32"
 			ConfigurationType="2"
 			ConfigurationType="2"
+			InheritedPropertySheets=".\shared\DllShared.vsprops"
 			WholeProgramOptimization="0"
 			WholeProgramOptimization="0"
 			>
 			>
 			<Tool
 			<Tool
@@ -304,7 +301,7 @@
 				AdditionalIncludeDirectories=""
 				AdditionalIncludeDirectories=""
 				PreprocessorDefinitions="NDEBUG;_SCL_SECURE_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;WIN32;ASSIMP_BUILD_DLL_EXPORT"
 				PreprocessorDefinitions="NDEBUG;_SCL_SECURE_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;WIN32;ASSIMP_BUILD_DLL_EXPORT"
 				StringPooling="true"
 				StringPooling="true"
-				RuntimeLibrary="2"
+				RuntimeLibrary="0"
 				BufferSecurityCheck="false"
 				BufferSecurityCheck="false"
 				EnableEnhancedInstructionSet="2"
 				EnableEnhancedInstructionSet="2"
 				UsePrecompiledHeader="2"
 				UsePrecompiledHeader="2"
@@ -349,14 +346,13 @@
 			/>
 			/>
 			<Tool
 			<Tool
 				Name="VCPostBuildEventTool"
 				Name="VCPostBuildEventTool"
-				CommandLine="copy &quot;$(OutDir)\$(TargetFileName)&quot; &quot;$(SolutionDir)..\..\bin\unittest_$(ConfigurationName)_$(PlatformName)\&quot;"
+				CommandLine="mkdir $(SolutionDir)..\..\bin\unit_$(ConfigurationName)_$(PlatformName)&#x0D;&#x0A;mkdir $(SolutionDir)..\..\bin\assimpview_$(ConfigurationName)_$(PlatformName)&#x0D;&#x0A;&#x0D;&#x0A;copy &quot;$(OutDir)\$(TargetFileName)&quot; &quot;$(SolutionDir)..\..\bin\unit_$(ConfigurationName)_$(PlatformName)\&quot;&#x0D;&#x0A;copy &quot;$(OutDir)\$(TargetFileName)&quot; &quot;$(SolutionDir)..\..\bin\assimpview_$(ConfigurationName)_$(PlatformName)\&quot;&#x0D;&#x0A;"
 			/>
 			/>
 		</Configuration>
 		</Configuration>
 		<Configuration
 		<Configuration
-			Name="Release_DLL|x64"
-			OutputDirectory="./../../bin/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
-			IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
+			Name="release-dll|x64"
 			ConfigurationType="2"
 			ConfigurationType="2"
+			InheritedPropertySheets=".\shared\DllShared.vsprops"
 			WholeProgramOptimization="0"
 			WholeProgramOptimization="0"
 			>
 			>
 			<Tool
 			<Tool
@@ -426,14 +422,13 @@
 			/>
 			/>
 			<Tool
 			<Tool
 				Name="VCPostBuildEventTool"
 				Name="VCPostBuildEventTool"
-				CommandLine="copy &quot;$(OutDir)\$(TargetFileName)&quot; &quot;$(SolutionDir)..\..\bin\unittest_$(ConfigurationName)_$(PlatformName)&quot;"
+				CommandLine="mkdir $(SolutionDir)..\..\bin\unit_$(ConfigurationName)_$(PlatformName)&#x0D;&#x0A;mkdir $(SolutionDir)..\..\bin\assimpview_$(ConfigurationName)_$(PlatformName)&#x0D;&#x0A;&#x0D;&#x0A;copy &quot;$(OutDir)\$(TargetFileName)&quot; &quot;$(SolutionDir)..\..\bin\unit_$(ConfigurationName)_$(PlatformName)\&quot;&#x0D;&#x0A;copy &quot;$(OutDir)\$(TargetFileName)&quot; &quot;$(SolutionDir)..\..\bin\assimpview_$(ConfigurationName)_$(PlatformName)\&quot;&#x0D;&#x0A;"
 			/>
 			/>
 		</Configuration>
 		</Configuration>
 		<Configuration
 		<Configuration
-			Name="Debug_DLL|Win32"
-			OutputDirectory="./../../bin/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
-			IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
+			Name="debug-dll|Win32"
 			ConfigurationType="2"
 			ConfigurationType="2"
+			InheritedPropertySheets=".\shared\DllShared.vsprops"
 			>
 			>
 			<Tool
 			<Tool
 				Name="VCPreBuildEventTool"
 				Name="VCPreBuildEventTool"
@@ -502,14 +497,13 @@
 			/>
 			/>
 			<Tool
 			<Tool
 				Name="VCPostBuildEventTool"
 				Name="VCPostBuildEventTool"
-				CommandLine="copy &quot;$(OutDir)\$(TargetFileName)&quot; &quot;$(SolutionDir)..\..\bin\unittest_$(ConfigurationName)_$(PlatformName)&quot;"
+				CommandLine="mkdir $(SolutionDir)..\..\bin\unit_$(ConfigurationName)_$(PlatformName)&#x0D;&#x0A;mkdir $(SolutionDir)..\..\bin\assimpview_$(ConfigurationName)_$(PlatformName)&#x0D;&#x0A;&#x0D;&#x0A;copy &quot;$(OutDir)\$(TargetFileName)&quot; &quot;$(SolutionDir)..\..\bin\unit_$(ConfigurationName)_$(PlatformName)\&quot;&#x0D;&#x0A;copy &quot;$(OutDir)\$(TargetFileName)&quot; &quot;$(SolutionDir)..\..\bin\assimpview_$(ConfigurationName)_$(PlatformName)\&quot;&#x0D;&#x0A;"
 			/>
 			/>
 		</Configuration>
 		</Configuration>
 		<Configuration
 		<Configuration
-			Name="Debug_DLL|x64"
-			OutputDirectory="./../../bin/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
-			IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
+			Name="debug-dll|x64"
 			ConfigurationType="2"
 			ConfigurationType="2"
+			InheritedPropertySheets=".\shared\DllShared.vsprops"
 			>
 			>
 			<Tool
 			<Tool
 				Name="VCPreBuildEventTool"
 				Name="VCPreBuildEventTool"
@@ -577,14 +571,13 @@
 			/>
 			/>
 			<Tool
 			<Tool
 				Name="VCPostBuildEventTool"
 				Name="VCPostBuildEventTool"
-				CommandLine="copy &quot;$(OutDir)\$(TargetFileName)&quot; &quot;$(SolutionDir)..\..\bin\unittest_$(ConfigurationName)_$(PlatformName)&quot;"
+				CommandLine="mkdir $(SolutionDir)..\..\bin\unit_$(ConfigurationName)_$(PlatformName)&#x0D;&#x0A;mkdir $(SolutionDir)..\..\bin\assimpview_$(ConfigurationName)_$(PlatformName)&#x0D;&#x0A;&#x0D;&#x0A;copy &quot;$(OutDir)\$(TargetFileName)&quot; &quot;$(SolutionDir)..\..\bin\unit_$(ConfigurationName)_$(PlatformName)\&quot;&#x0D;&#x0A;copy &quot;$(OutDir)\$(TargetFileName)&quot; &quot;$(SolutionDir)..\..\bin\assimpview_$(ConfigurationName)_$(PlatformName)\&quot;&#x0D;&#x0A;"
 			/>
 			/>
 		</Configuration>
 		</Configuration>
 		<Configuration
 		<Configuration
-			Name="Release -noBoost|Win32"
-			OutputDirectory="./../../lib/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
-			IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
+			Name="release-noboost-st|Win32"
 			ConfigurationType="4"
 			ConfigurationType="4"
+			InheritedPropertySheets=".\shared\LibShared.vsprops;.\shared\NoBoostShared.vsprops"
 			WholeProgramOptimization="0"
 			WholeProgramOptimization="0"
 			>
 			>
 			<Tool
 			<Tool
@@ -646,10 +639,9 @@
 			/>
 			/>
 		</Configuration>
 		</Configuration>
 		<Configuration
 		<Configuration
-			Name="Release -noBoost|x64"
-			OutputDirectory="./../../lib/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
-			IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
+			Name="release-noboost-st|x64"
 			ConfigurationType="4"
 			ConfigurationType="4"
+			InheritedPropertySheets=".\shared\LibShared.vsprops;.\shared\NoBoostShared.vsprops"
 			WholeProgramOptimization="0"
 			WholeProgramOptimization="0"
 			>
 			>
 			<Tool
 			<Tool
@@ -712,10 +704,9 @@
 			/>
 			/>
 		</Configuration>
 		</Configuration>
 		<Configuration
 		<Configuration
-			Name="Debug -noBoost|Win32"
-			OutputDirectory="./../../lib/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
-			IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
+			Name="debug-noboost-st|Win32"
 			ConfigurationType="4"
 			ConfigurationType="4"
+			InheritedPropertySheets=".\shared\LibShared.vsprops;.\shared\NoBoostShared.vsprops"
 			>
 			>
 			<Tool
 			<Tool
 				Name="VCPreBuildEventTool"
 				Name="VCPreBuildEventTool"
@@ -776,10 +767,9 @@
 			/>
 			/>
 		</Configuration>
 		</Configuration>
 		<Configuration
 		<Configuration
-			Name="Debug -noBoost|x64"
-			OutputDirectory="./../../lib/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
-			IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
+			Name="debug-noboost-st|x64"
 			ConfigurationType="4"
 			ConfigurationType="4"
+			InheritedPropertySheets=".\shared\LibShared.vsprops;.\shared\NoBoostShared.vsprops"
 			>
 			>
 			<Tool
 			<Tool
 				Name="VCPreBuildEventTool"
 				Name="VCPreBuildEventTool"
@@ -837,6 +827,259 @@
 				Name="VCPostBuildEventTool"
 				Name="VCPostBuildEventTool"
 			/>
 			/>
 		</Configuration>
 		</Configuration>
+		<Configuration
+			Name="debug-st|Win32"
+			ConfigurationType="4"
+			InheritedPropertySheets=".\shared\LibShared.vsprops;.\shared\SingleThreadedShared.vsprops"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories=""
+				PreprocessorDefinitions="DEBUG;_SCL_SECURE_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;WIN32"
+				BasicRuntimeChecks="3"
+				SmallerTypeCheck="true"
+				RuntimeLibrary="1"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="AssimpPCH.h"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="false"
+				DebugInformationFormat="4"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="debug-st|x64"
+			ConfigurationType="4"
+			InheritedPropertySheets=".\shared\LibShared.vsprops;.\shared\SingleThreadedShared.vsprops"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TargetEnvironment="3"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories=""
+				PreprocessorDefinitions="DEBUG, _SCL_SECURE_NO_WARNINGS, _CRT_SECURE_NO_WARNINGS,WIN32"
+				BasicRuntimeChecks="3"
+				SmallerTypeCheck="true"
+				RuntimeLibrary="1"
+				EnableFunctionLevelLinking="true"
+				WarningLevel="3"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="release-st|Win32"
+			ConfigurationType="4"
+			InheritedPropertySheets=".\shared\LibShared.vsprops;.\shared\SingleThreadedShared.vsprops"
+			WholeProgramOptimization="0"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				InlineFunctionExpansion="2"
+				EnableIntrinsicFunctions="true"
+				FavorSizeOrSpeed="1"
+				AdditionalIncludeDirectories=""
+				PreprocessorDefinitions="NDEBUG;_SCL_SECURE_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;WIN32"
+				StringPooling="true"
+				BufferSecurityCheck="false"
+				EnableEnhancedInstructionSet="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="AssimpPCH.h"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="false"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="release-st|x64"
+			ConfigurationType="4"
+			InheritedPropertySheets=".\shared\LibShared.vsprops;.\shared\SingleThreadedShared.vsprops"
+			WholeProgramOptimization="0"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TargetEnvironment="3"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				InlineFunctionExpansion="2"
+				EnableIntrinsicFunctions="true"
+				FavorSizeOrSpeed="1"
+				AdditionalIncludeDirectories=""
+				PreprocessorDefinitions="NDEBUG, _SCL_SECURE_NO_WARNINGS, _CRT_SECURE_NO_WARNINGS,WIN32"
+				StringPooling="true"
+				RuntimeLibrary="0"
+				BufferSecurityCheck="false"
+				EnableEnhancedInstructionSet="0"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="AssimpPCH.h"
+				WarningLevel="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
 	</Configurations>
 	</Configurations>
 	<References>
 	<References>
 	</References>
 	</References>
@@ -1019,6 +1262,14 @@
 						>
 						>
 					</File>
 					</File>
 				</Filter>
 				</Filter>
+				<Filter
+					Name="tuple"
+					>
+					<File
+						RelativePath="..\..\include\BoostWorkaround\boost\tuple\tuple.hpp"
+						>
+					</File>
+				</Filter>
 			</Filter>
 			</Filter>
 		</Filter>
 		</Filter>
 		<Filter
 		<Filter
@@ -1048,46 +1299,6 @@
 				RelativePath="..\..\code\BaseProcess.h"
 				RelativePath="..\..\code\BaseProcess.h"
 				>
 				>
 			</File>
 			</File>
-			<File
-				RelativePath="..\..\code\ByteSwap.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\code\DefaultIOStream.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\..\code\DefaultIOStream.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\code\DefaultIOSystem.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\..\code\DefaultIOSystem.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\code\DefaultLogger.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\..\code\fast_atof.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\code\FileLogStream.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\code\GenericProperty.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\code\Hash.h"
-				>
-			</File>
 			<File
 			<File
 				RelativePath="..\..\code\IFF.h"
 				RelativePath="..\..\code\IFF.h"
 				>
 				>
@@ -1104,14 +1315,6 @@
 				RelativePath="..\..\code\MaterialSystem.h"
 				RelativePath="..\..\code\MaterialSystem.h"
 				>
 				>
 			</File>
 			</File>
-			<File
-				RelativePath="..\..\code\ParsingUtils.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\code\qnan.h"
-				>
-			</File>
 			<File
 			<File
 				RelativePath="..\..\code\RemoveComments.cpp"
 				RelativePath="..\..\code\RemoveComments.cpp"
 				>
 				>
@@ -1176,14 +1379,6 @@
 				RelativePath="..\..\code\StandardShapes.h"
 				RelativePath="..\..\code\StandardShapes.h"
 				>
 				>
 			</File>
 			</File>
-			<File
-				RelativePath="..\..\code\StreamReader.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\code\StringComparison.h"
-				>
-			</File>
 			<File
 			<File
 				RelativePath="..\..\code\TargetAnimation.cpp"
 				RelativePath="..\..\code\TargetAnimation.cpp"
 				>
 				>
@@ -1200,10 +1395,6 @@
 				RelativePath="..\..\code\VertexTriangleAdjacency.h"
 				RelativePath="..\..\code\VertexTriangleAdjacency.h"
 				>
 				>
 			</File>
 			</File>
-			<File
-				RelativePath="..\..\code\Win32DebugLogStream.h"
-				>
-			</File>
 			<Filter
 			<Filter
 				Name="extra"
 				Name="extra"
 				>
 				>
@@ -1211,7 +1402,31 @@
 					RelativePath="..\..\code\extra\MakeVerboseFormat.cpp"
 					RelativePath="..\..\code\extra\MakeVerboseFormat.cpp"
 					>
 					>
 					<FileConfiguration
 					<FileConfiguration
-						Name="Debug|Win32"
+						Name="debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							UsePrecompiledHeader="0"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							UsePrecompiledHeader="0"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="release|x64"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							UsePrecompiledHeader="0"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="release-dll|Win32"
 						>
 						>
 						<Tool
 						<Tool
 							Name="VCCLCompilerTool"
 							Name="VCCLCompilerTool"
@@ -1219,7 +1434,7 @@
 						/>
 						/>
 					</FileConfiguration>
 					</FileConfiguration>
 					<FileConfiguration
 					<FileConfiguration
-						Name="Release|Win32"
+						Name="debug-dll|Win32"
 						>
 						>
 						<Tool
 						<Tool
 							Name="VCCLCompilerTool"
 							Name="VCCLCompilerTool"
@@ -1227,7 +1442,7 @@
 						/>
 						/>
 					</FileConfiguration>
 					</FileConfiguration>
 					<FileConfiguration
 					<FileConfiguration
-						Name="Release|x64"
+						Name="release-noboost-st|Win32"
 						>
 						>
 						<Tool
 						<Tool
 							Name="VCCLCompilerTool"
 							Name="VCCLCompilerTool"
@@ -1235,7 +1450,7 @@
 						/>
 						/>
 					</FileConfiguration>
 					</FileConfiguration>
 					<FileConfiguration
 					<FileConfiguration
-						Name="Release_DLL|Win32"
+						Name="release-noboost-st|x64"
 						>
 						>
 						<Tool
 						<Tool
 							Name="VCCLCompilerTool"
 							Name="VCCLCompilerTool"
@@ -1243,7 +1458,7 @@
 						/>
 						/>
 					</FileConfiguration>
 					</FileConfiguration>
 					<FileConfiguration
 					<FileConfiguration
-						Name="Debug_DLL|Win32"
+						Name="debug-noboost-st|Win32"
 						>
 						>
 						<Tool
 						<Tool
 							Name="VCCLCompilerTool"
 							Name="VCCLCompilerTool"
@@ -1251,7 +1466,7 @@
 						/>
 						/>
 					</FileConfiguration>
 					</FileConfiguration>
 					<FileConfiguration
 					<FileConfiguration
-						Name="Release -noBoost|Win32"
+						Name="debug-st|Win32"
 						>
 						>
 						<Tool
 						<Tool
 							Name="VCCLCompilerTool"
 							Name="VCCLCompilerTool"
@@ -1259,7 +1474,7 @@
 						/>
 						/>
 					</FileConfiguration>
 					</FileConfiguration>
 					<FileConfiguration
 					<FileConfiguration
-						Name="Release -noBoost|x64"
+						Name="release-st|Win32"
 						>
 						>
 						<Tool
 						<Tool
 							Name="VCCLCompilerTool"
 							Name="VCCLCompilerTool"
@@ -1267,7 +1482,7 @@
 						/>
 						/>
 					</FileConfiguration>
 					</FileConfiguration>
 					<FileConfiguration
 					<FileConfiguration
-						Name="Debug -noBoost|Win32"
+						Name="release-st|x64"
 						>
 						>
 						<Tool
 						<Tool
 							Name="VCCLCompilerTool"
 							Name="VCCLCompilerTool"
@@ -1634,7 +1849,15 @@
 						RelativePath="..\..\code\ACLoader.cpp"
 						RelativePath="..\..\code\ACLoader.cpp"
 						>
 						>
 						<FileConfiguration
 						<FileConfiguration
-							Name="Debug|Win32"
+							Name="debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								GeneratePreprocessedFile="0"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="debug-noboost-st|Win32"
 							>
 							>
 							<Tool
 							<Tool
 								Name="VCCLCompilerTool"
 								Name="VCCLCompilerTool"
@@ -1642,7 +1865,7 @@
 							/>
 							/>
 						</FileConfiguration>
 						</FileConfiguration>
 						<FileConfiguration
 						<FileConfiguration
-							Name="Debug -noBoost|Win32"
+							Name="debug-st|Win32"
 							>
 							>
 							<Tool
 							<Tool
 								Name="VCCLCompilerTool"
 								Name="VCCLCompilerTool"
@@ -1771,6 +1994,10 @@
 			<Filter
 			<Filter
 				Name="PostProcess"
 				Name="PostProcess"
 				>
 				>
+				<File
+					RelativePath="..\..\code\AssimpPCH.h"
+					>
+				</File>
 				<File
 				<File
 					RelativePath="..\..\code\CalcTangentsProcess.cpp"
 					RelativePath="..\..\code\CalcTangentsProcess.cpp"
 					>
 					>
@@ -1947,7 +2174,7 @@
 					RelativePath="..\..\code\AssimpPCH.cpp"
 					RelativePath="..\..\code\AssimpPCH.cpp"
 					>
 					>
 					<FileConfiguration
 					<FileConfiguration
-						Name="Debug|Win32"
+						Name="debug|Win32"
 						>
 						>
 						<Tool
 						<Tool
 							Name="VCCLCompilerTool"
 							Name="VCCLCompilerTool"
@@ -1956,7 +2183,7 @@
 						/>
 						/>
 					</FileConfiguration>
 					</FileConfiguration>
 					<FileConfiguration
 					<FileConfiguration
-						Name="Release|Win32"
+						Name="release|Win32"
 						>
 						>
 						<Tool
 						<Tool
 							Name="VCCLCompilerTool"
 							Name="VCCLCompilerTool"
@@ -1965,7 +2192,7 @@
 						/>
 						/>
 					</FileConfiguration>
 					</FileConfiguration>
 					<FileConfiguration
 					<FileConfiguration
-						Name="Release|x64"
+						Name="release|x64"
 						>
 						>
 						<Tool
 						<Tool
 							Name="VCCLCompilerTool"
 							Name="VCCLCompilerTool"
@@ -1973,7 +2200,7 @@
 						/>
 						/>
 					</FileConfiguration>
 					</FileConfiguration>
 					<FileConfiguration
 					<FileConfiguration
-						Name="Release_DLL|Win32"
+						Name="release-dll|Win32"
 						>
 						>
 						<Tool
 						<Tool
 							Name="VCCLCompilerTool"
 							Name="VCCLCompilerTool"
@@ -1982,7 +2209,7 @@
 						/>
 						/>
 					</FileConfiguration>
 					</FileConfiguration>
 					<FileConfiguration
 					<FileConfiguration
-						Name="Debug_DLL|Win32"
+						Name="debug-dll|Win32"
 						>
 						>
 						<Tool
 						<Tool
 							Name="VCCLCompilerTool"
 							Name="VCCLCompilerTool"
@@ -1991,7 +2218,7 @@
 						/>
 						/>
 					</FileConfiguration>
 					</FileConfiguration>
 					<FileConfiguration
 					<FileConfiguration
-						Name="Release -noBoost|Win32"
+						Name="release-noboost-st|Win32"
 						>
 						>
 						<Tool
 						<Tool
 							Name="VCCLCompilerTool"
 							Name="VCCLCompilerTool"
@@ -2000,7 +2227,7 @@
 						/>
 						/>
 					</FileConfiguration>
 					</FileConfiguration>
 					<FileConfiguration
 					<FileConfiguration
-						Name="Release -noBoost|x64"
+						Name="release-noboost-st|x64"
 						>
 						>
 						<Tool
 						<Tool
 							Name="VCCLCompilerTool"
 							Name="VCCLCompilerTool"
@@ -2008,7 +2235,7 @@
 						/>
 						/>
 					</FileConfiguration>
 					</FileConfiguration>
 					<FileConfiguration
 					<FileConfiguration
-						Name="Debug -noBoost|Win32"
+						Name="debug-noboost-st|Win32"
 						>
 						>
 						<Tool
 						<Tool
 							Name="VCCLCompilerTool"
 							Name="VCCLCompilerTool"
@@ -2016,10 +2243,32 @@
 							PrecompiledHeaderThrough="AssimpPCH.h"
 							PrecompiledHeaderThrough="AssimpPCH.h"
 						/>
 						/>
 					</FileConfiguration>
 					</FileConfiguration>
-				</File>
-				<File
-					RelativePath="..\..\code\AssimpPCH.h"
-					>
+					<FileConfiguration
+						Name="debug-st|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							UsePrecompiledHeader="1"
+							PrecompiledHeaderThrough="AssimpPCH.h"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="release-st|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							UsePrecompiledHeader="1"
+							PrecompiledHeaderThrough="AssimpPCH.h"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="release-st|x64"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							UsePrecompiledHeader="1"
+						/>
+					</FileConfiguration>
 				</File>
 				</File>
 			</Filter>
 			</Filter>
 			<Filter
 			<Filter
@@ -2049,7 +2298,7 @@
 					RelativePath="..\..\code\irrXML\irrXML.cpp"
 					RelativePath="..\..\code\irrXML\irrXML.cpp"
 					>
 					>
 					<FileConfiguration
 					<FileConfiguration
-						Name="Debug|Win32"
+						Name="debug|Win32"
 						>
 						>
 						<Tool
 						<Tool
 							Name="VCCLCompilerTool"
 							Name="VCCLCompilerTool"
@@ -2059,7 +2308,7 @@
 						/>
 						/>
 					</FileConfiguration>
 					</FileConfiguration>
 					<FileConfiguration
 					<FileConfiguration
-						Name="Debug|x64"
+						Name="debug|x64"
 						>
 						>
 						<Tool
 						<Tool
 							Name="VCCLCompilerTool"
 							Name="VCCLCompilerTool"
@@ -2067,7 +2316,7 @@
 						/>
 						/>
 					</FileConfiguration>
 					</FileConfiguration>
 					<FileConfiguration
 					<FileConfiguration
-						Name="Release|Win32"
+						Name="release|Win32"
 						>
 						>
 						<Tool
 						<Tool
 							Name="VCCLCompilerTool"
 							Name="VCCLCompilerTool"
@@ -2077,7 +2326,7 @@
 						/>
 						/>
 					</FileConfiguration>
 					</FileConfiguration>
 					<FileConfiguration
 					<FileConfiguration
-						Name="Release|x64"
+						Name="release|x64"
 						>
 						>
 						<Tool
 						<Tool
 							Name="VCCLCompilerTool"
 							Name="VCCLCompilerTool"
@@ -2085,7 +2334,7 @@
 						/>
 						/>
 					</FileConfiguration>
 					</FileConfiguration>
 					<FileConfiguration
 					<FileConfiguration
-						Name="Release_DLL|Win32"
+						Name="release-dll|Win32"
 						>
 						>
 						<Tool
 						<Tool
 							Name="VCCLCompilerTool"
 							Name="VCCLCompilerTool"
@@ -2095,7 +2344,7 @@
 						/>
 						/>
 					</FileConfiguration>
 					</FileConfiguration>
 					<FileConfiguration
 					<FileConfiguration
-						Name="Release_DLL|x64"
+						Name="release-dll|x64"
 						>
 						>
 						<Tool
 						<Tool
 							Name="VCCLCompilerTool"
 							Name="VCCLCompilerTool"
@@ -2103,7 +2352,7 @@
 						/>
 						/>
 					</FileConfiguration>
 					</FileConfiguration>
 					<FileConfiguration
 					<FileConfiguration
-						Name="Debug_DLL|Win32"
+						Name="debug-dll|Win32"
 						>
 						>
 						<Tool
 						<Tool
 							Name="VCCLCompilerTool"
 							Name="VCCLCompilerTool"
@@ -2113,7 +2362,7 @@
 						/>
 						/>
 					</FileConfiguration>
 					</FileConfiguration>
 					<FileConfiguration
 					<FileConfiguration
-						Name="Debug_DLL|x64"
+						Name="debug-dll|x64"
 						>
 						>
 						<Tool
 						<Tool
 							Name="VCCLCompilerTool"
 							Name="VCCLCompilerTool"
@@ -2121,7 +2370,7 @@
 						/>
 						/>
 					</FileConfiguration>
 					</FileConfiguration>
 					<FileConfiguration
 					<FileConfiguration
-						Name="Release -noBoost|Win32"
+						Name="release-noboost-st|Win32"
 						>
 						>
 						<Tool
 						<Tool
 							Name="VCCLCompilerTool"
 							Name="VCCLCompilerTool"
@@ -2131,7 +2380,25 @@
 						/>
 						/>
 					</FileConfiguration>
 					</FileConfiguration>
 					<FileConfiguration
 					<FileConfiguration
-						Name="Release -noBoost|x64"
+						Name="release-noboost-st|x64"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							UsePrecompiledHeader="0"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="debug-noboost-st|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							BasicRuntimeChecks="0"
+							SmallerTypeCheck="true"
+							UsePrecompiledHeader="0"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="debug-noboost-st|x64"
 						>
 						>
 						<Tool
 						<Tool
 							Name="VCCLCompilerTool"
 							Name="VCCLCompilerTool"
@@ -2139,7 +2406,7 @@
 						/>
 						/>
 					</FileConfiguration>
 					</FileConfiguration>
 					<FileConfiguration
 					<FileConfiguration
-						Name="Debug -noBoost|Win32"
+						Name="debug-st|Win32"
 						>
 						>
 						<Tool
 						<Tool
 							Name="VCCLCompilerTool"
 							Name="VCCLCompilerTool"
@@ -2149,7 +2416,25 @@
 						/>
 						/>
 					</FileConfiguration>
 					</FileConfiguration>
 					<FileConfiguration
 					<FileConfiguration
-						Name="Debug -noBoost|x64"
+						Name="debug-st|x64"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							UsePrecompiledHeader="0"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="release-st|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							BasicRuntimeChecks="0"
+							SmallerTypeCheck="false"
+							UsePrecompiledHeader="0"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="release-st|x64"
 						>
 						>
 						<Tool
 						<Tool
 							Name="VCCLCompilerTool"
 							Name="VCCLCompilerTool"
@@ -2166,6 +2451,82 @@
 					>
 					>
 				</File>
 				</File>
 			</Filter>
 			</Filter>
+			<Filter
+				Name="Logging"
+				>
+				<File
+					RelativePath="..\..\code\DefaultLogger.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\..\code\FileLogStream.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\code\StdOStreamLogStream.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\code\Win32DebugLogStream.h"
+					>
+				</File>
+			</Filter>
+			<Filter
+				Name="FileSystem"
+				>
+				<File
+					RelativePath="..\..\code\DefaultIOStream.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\..\code\DefaultIOStream.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\code\DefaultIOSystem.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\..\code\DefaultIOSystem.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\code\StreamReader.h"
+					>
+				</File>
+			</Filter>
+			<Filter
+				Name="Util"
+				>
+				<File
+					RelativePath="..\..\code\ByteSwap.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\code\fast_atof.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\code\GenericProperty.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\code\Hash.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\code\ParsingUtils.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\code\qnan.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\code\StringComparison.h"
+					>
+				</File>
+			</Filter>
 		</Filter>
 		</Filter>
 		<Filter
 		<Filter
 			Name="doc"
 			Name="doc"

+ 413 - 51
workspaces/vc8/assimp_view.vcproj

@@ -2,7 +2,7 @@
 <VisualStudioProject
 <VisualStudioProject
 	ProjectType="Visual C++"
 	ProjectType="Visual C++"
 	Version="8,00"
 	Version="8,00"
-	Name="AssimpView"
+	Name="assimpview"
 	ProjectGUID="{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}"
 	ProjectGUID="{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}"
 	RootNamespace="assimp_view"
 	RootNamespace="assimp_view"
 	Keyword="Win32Proj"
 	Keyword="Win32Proj"
@@ -19,9 +19,9 @@
 	</ToolFiles>
 	</ToolFiles>
 	<Configurations>
 	<Configurations>
 		<Configuration
 		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(SolutionDir)..\..\tools\build\$(ConfigurationName)_$(PlatformName)"
-			IntermediateDirectory="$(SolutionDir)..\..\tools\build\$(ConfigurationName)_$(PlatformName)\obj"
+			Name="debug|Win32"
+			OutputDirectory="./../../bin/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
+			IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
 			ConfigurationType="1"
 			ConfigurationType="1"
 			CharacterSet="2"
 			CharacterSet="2"
 			>
 			>
@@ -67,7 +67,7 @@
 			<Tool
 			<Tool
 				Name="VCLinkerTool"
 				Name="VCLinkerTool"
 				AdditionalDependencies="d3d9.lib d3dx9.lib comdlg32.lib assimp.lib winmm.lib comctl32.lib user32.lib advapi32.lib shell32.lib Gdi32.lib"
 				AdditionalDependencies="d3d9.lib d3dx9.lib comdlg32.lib assimp.lib winmm.lib comctl32.lib user32.lib advapi32.lib shell32.lib Gdi32.lib"
-				OutputFile="$(OutDir)\assimpview32d.exe"
+				OutputFile="$(OutDir)\assimp_view_debug.exe"
 				LinkIncremental="2"
 				LinkIncremental="2"
 				AdditionalLibraryDirectories="&quot;..\..\lib\assimp_$(ConfigurationName)_$(PlatformName)&quot;;&quot;$(DXSDK_DIR)lib\x86&quot;"
 				AdditionalLibraryDirectories="&quot;..\..\lib\assimp_$(ConfigurationName)_$(PlatformName)&quot;;&quot;$(DXSDK_DIR)lib\x86&quot;"
 				GenerateDebugInformation="true"
 				GenerateDebugInformation="true"
@@ -100,7 +100,7 @@
 			/>
 			/>
 		</Configuration>
 		</Configuration>
 		<Configuration
 		<Configuration
-			Name="Debug|x64"
+			Name="debug|x64"
 			OutputDirectory="$(SolutionDir)..\..\tools\build\$(ConfigurationName)_$(PlatformName)"
 			OutputDirectory="$(SolutionDir)..\..\tools\build\$(ConfigurationName)_$(PlatformName)"
 			IntermediateDirectory="$(SolutionDir)..\..\tools\build\$(ConfigurationName)_$(PlatformName)\obj"
 			IntermediateDirectory="$(SolutionDir)..\..\tools\build\$(ConfigurationName)_$(PlatformName)\obj"
 			ConfigurationType="1"
 			ConfigurationType="1"
@@ -149,7 +149,7 @@
 			<Tool
 			<Tool
 				Name="VCLinkerTool"
 				Name="VCLinkerTool"
 				AdditionalDependencies="d3d9.lib d3dx9.lib comdlg32.lib assimp.lib winmm.lib comctl32.lib user32.lib advapi32.lib shell32.lib Gdi32.lib"
 				AdditionalDependencies="d3d9.lib d3dx9.lib comdlg32.lib assimp.lib winmm.lib comctl32.lib user32.lib advapi32.lib shell32.lib Gdi32.lib"
-				OutputFile="$(OutDir)\assimpview64d.exe"
+				OutputFile="$(OutDir)\assimp_view_debug.exe"
 				LinkIncremental="2"
 				LinkIncremental="2"
 				AdditionalLibraryDirectories="..\..\lib\assimp_$(ConfigurationName)_$(PlatformName);&quot;$(DXSDK_DIR)lib\x64&quot;"
 				AdditionalLibraryDirectories="..\..\lib\assimp_$(ConfigurationName)_$(PlatformName);&quot;$(DXSDK_DIR)lib\x64&quot;"
 				GenerateDebugInformation="true"
 				GenerateDebugInformation="true"
@@ -182,9 +182,9 @@
 			/>
 			/>
 		</Configuration>
 		</Configuration>
 		<Configuration
 		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(SolutionDir)..\..\tools\build\$(ConfigurationName)_$(PlatformName)"
-			IntermediateDirectory="$(SolutionDir)..\..\tools\build\$(ConfigurationName)_$(PlatformName)\obj"
+			Name="release|Win32"
+			OutputDirectory="./../../bin/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
+			IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
 			ConfigurationType="1"
 			ConfigurationType="1"
 			CharacterSet="2"
 			CharacterSet="2"
 			WholeProgramOptimization="1"
 			WholeProgramOptimization="1"
@@ -226,7 +226,7 @@
 			<Tool
 			<Tool
 				Name="VCLinkerTool"
 				Name="VCLinkerTool"
 				AdditionalDependencies="d3d9.lib d3dx9.lib comdlg32.lib assimp.lib winmm.lib comctl32.lib user32.lib advapi32.lib shell32.lib Gdi32.lib"
 				AdditionalDependencies="d3d9.lib d3dx9.lib comdlg32.lib assimp.lib winmm.lib comctl32.lib user32.lib advapi32.lib shell32.lib Gdi32.lib"
-				OutputFile="$(OutDir)\assimpview32.exe"
+				OutputFile="$(OutDir)\assimp_view.exe"
 				LinkIncremental="1"
 				LinkIncremental="1"
 				AdditionalLibraryDirectories="&quot;..\..\lib\assimp_$(ConfigurationName)_$(PlatformName)&quot;;&quot;$(DXSDK_DIR)lib\x86&quot;"
 				AdditionalLibraryDirectories="&quot;..\..\lib\assimp_$(ConfigurationName)_$(PlatformName)&quot;;&quot;$(DXSDK_DIR)lib\x86&quot;"
 				IgnoreAllDefaultLibraries="false"
 				IgnoreAllDefaultLibraries="false"
@@ -263,7 +263,7 @@
 			/>
 			/>
 		</Configuration>
 		</Configuration>
 		<Configuration
 		<Configuration
-			Name="Release|x64"
+			Name="release|x64"
 			OutputDirectory="$(SolutionDir)..\..\tools\build\$(ConfigurationName)_$(PlatformName)"
 			OutputDirectory="$(SolutionDir)..\..\tools\build\$(ConfigurationName)_$(PlatformName)"
 			IntermediateDirectory="$(SolutionDir)..\..\tools\build\$(ConfigurationName)_$(PlatformName)\obj"
 			IntermediateDirectory="$(SolutionDir)..\..\tools\build\$(ConfigurationName)_$(PlatformName)\obj"
 			ConfigurationType="1"
 			ConfigurationType="1"
@@ -308,7 +308,7 @@
 			<Tool
 			<Tool
 				Name="VCLinkerTool"
 				Name="VCLinkerTool"
 				AdditionalDependencies="d3d9.lib d3dx9.lib comdlg32.lib assimp.lib winmm.lib comctl32.lib user32.lib advapi32.lib shell32.lib Gdi32.lib"
 				AdditionalDependencies="d3d9.lib d3dx9.lib comdlg32.lib assimp.lib winmm.lib comctl32.lib user32.lib advapi32.lib shell32.lib Gdi32.lib"
-				OutputFile="$(OutDir)\assimpview64.exe"
+				OutputFile="$(OutDir)\assimp_view.exe"
 				LinkIncremental="1"
 				LinkIncremental="1"
 				AdditionalLibraryDirectories="..\..\lib\assimp_$(ConfigurationName)_$(PlatformName);&quot;$(DXSDK_DIR)lib\x64&quot;"
 				AdditionalLibraryDirectories="..\..\lib\assimp_$(ConfigurationName)_$(PlatformName);&quot;$(DXSDK_DIR)lib\x64&quot;"
 				IgnoreAllDefaultLibraries="false"
 				IgnoreAllDefaultLibraries="false"
@@ -345,9 +345,9 @@
 			/>
 			/>
 		</Configuration>
 		</Configuration>
 		<Configuration
 		<Configuration
-			Name="Release_DLL|Win32"
-			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)"
+			Name="release-dll|Win32"
+			OutputDirectory="./../../bin/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
+			IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
 			ConfigurationType="1"
 			ConfigurationType="1"
 			CharacterSet="2"
 			CharacterSet="2"
 			WholeProgramOptimization="1"
 			WholeProgramOptimization="1"
@@ -389,9 +389,9 @@
 			<Tool
 			<Tool
 				Name="VCLinkerTool"
 				Name="VCLinkerTool"
 				AdditionalDependencies="d3d9.lib d3dx9.lib comdlg32.lib assimp.lib winmm.lib comctl32.lib user32.lib advapi32.lib shell32.lib Gdi32.lib"
 				AdditionalDependencies="d3d9.lib d3dx9.lib comdlg32.lib assimp.lib winmm.lib comctl32.lib user32.lib advapi32.lib shell32.lib Gdi32.lib"
-				OutputFile="$(OutDir)\assimpview32.exe"
+				OutputFile="$(OutDir)\assimp_view.exe"
 				LinkIncremental="1"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="..\..\lib\assimp_$(ConfigurationName)_$(PlatformName);&quot;$(DXSDK_DIR)lib\x86&quot;"
+				AdditionalLibraryDirectories="&quot;..\..\lib\assimp_$(ConfigurationName)_$(PlatformName)&quot;;&quot;$(DXSDK_DIR)lib\x86&quot;"
 				IgnoreAllDefaultLibraries="false"
 				IgnoreAllDefaultLibraries="false"
 				IgnoreDefaultLibraryNames=""
 				IgnoreDefaultLibraryNames=""
 				GenerateDebugInformation="true"
 				GenerateDebugInformation="true"
@@ -426,7 +426,7 @@
 			/>
 			/>
 		</Configuration>
 		</Configuration>
 		<Configuration
 		<Configuration
-			Name="Release_DLL|x64"
+			Name="release-dll|x64"
 			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
 			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
 			IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
 			IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
 			ConfigurationType="1"
 			ConfigurationType="1"
@@ -471,7 +471,7 @@
 			<Tool
 			<Tool
 				Name="VCLinkerTool"
 				Name="VCLinkerTool"
 				AdditionalDependencies="d3d9.lib d3dx9.lib comdlg32.lib assimp.lib winmm.lib comctl32.lib user32.lib advapi32.lib shell32.lib Gdi32.lib"
 				AdditionalDependencies="d3d9.lib d3dx9.lib comdlg32.lib assimp.lib winmm.lib comctl32.lib user32.lib advapi32.lib shell32.lib Gdi32.lib"
-				OutputFile="$(OutDir)\assimpview64.exe"
+				OutputFile="$(OutDir)\assimp_view.exe"
 				LinkIncremental="1"
 				LinkIncremental="1"
 				AdditionalLibraryDirectories="..\..\lib\assimp_$(ConfigurationName)_$(PlatformName);&quot;$(DXSDK_DIR)lib\x64&quot;"
 				AdditionalLibraryDirectories="..\..\lib\assimp_$(ConfigurationName)_$(PlatformName);&quot;$(DXSDK_DIR)lib\x64&quot;"
 				IgnoreAllDefaultLibraries="false"
 				IgnoreAllDefaultLibraries="false"
@@ -508,9 +508,9 @@
 			/>
 			/>
 		</Configuration>
 		</Configuration>
 		<Configuration
 		<Configuration
-			Name="Debug_DLL|Win32"
-			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)"
+			Name="debug-dll|Win32"
+			OutputDirectory="./../../bin/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
+			IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
 			ConfigurationType="1"
 			ConfigurationType="1"
 			CharacterSet="2"
 			CharacterSet="2"
 			>
 			>
@@ -556,9 +556,9 @@
 			<Tool
 			<Tool
 				Name="VCLinkerTool"
 				Name="VCLinkerTool"
 				AdditionalDependencies="d3d9.lib d3dx9.lib comdlg32.lib assimp.lib winmm.lib comctl32.lib user32.lib advapi32.lib shell32.lib Gdi32.lib"
 				AdditionalDependencies="d3d9.lib d3dx9.lib comdlg32.lib assimp.lib winmm.lib comctl32.lib user32.lib advapi32.lib shell32.lib Gdi32.lib"
-				OutputFile="$(OutDir)\assimpview32d.exe"
+				OutputFile="$(OutDir)\assimp_view_debug.exe"
 				LinkIncremental="2"
 				LinkIncremental="2"
-				AdditionalLibraryDirectories="..\..\lib\assimp_$(ConfigurationName)_$(PlatformName);&quot;$(DXSDK_DIR)lib\x86&quot;"
+				AdditionalLibraryDirectories="&quot;..\..\lib\assimp_$(ConfigurationName)_$(PlatformName)&quot;;&quot;$(DXSDK_DIR)lib\x86&quot;"
 				GenerateDebugInformation="true"
 				GenerateDebugInformation="true"
 				SubSystem="2"
 				SubSystem="2"
 				TargetMachine="1"
 				TargetMachine="1"
@@ -589,7 +589,7 @@
 			/>
 			/>
 		</Configuration>
 		</Configuration>
 		<Configuration
 		<Configuration
-			Name="Debug_DLL|x64"
+			Name="debug-dll|x64"
 			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
 			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
 			IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
 			IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
 			ConfigurationType="1"
 			ConfigurationType="1"
@@ -638,7 +638,7 @@
 			<Tool
 			<Tool
 				Name="VCLinkerTool"
 				Name="VCLinkerTool"
 				AdditionalDependencies="d3d9.lib d3dx9.lib comdlg32.lib assimp.lib winmm.lib comctl32.lib user32.lib advapi32.lib shell32.lib Gdi32.lib"
 				AdditionalDependencies="d3d9.lib d3dx9.lib comdlg32.lib assimp.lib winmm.lib comctl32.lib user32.lib advapi32.lib shell32.lib Gdi32.lib"
-				OutputFile="$(OutDir)\assimpview64d.exe"
+				OutputFile="$(OutDir)\assimp_view_debug.exe"
 				LinkIncremental="2"
 				LinkIncremental="2"
 				AdditionalLibraryDirectories="..\..\lib\assimp_debug_dll_x64;&quot;$(DXSDK_DIR)lib\x64&quot;"
 				AdditionalLibraryDirectories="..\..\lib\assimp_debug_dll_x64;&quot;$(DXSDK_DIR)lib\x64&quot;"
 				GenerateDebugInformation="true"
 				GenerateDebugInformation="true"
@@ -671,10 +671,11 @@
 			/>
 			/>
 		</Configuration>
 		</Configuration>
 		<Configuration
 		<Configuration
-			Name="Release -noBoost|Win32"
-			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)"
+			Name="release-noboost-st|Win32"
+			OutputDirectory="./../../bin/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
+			IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
 			ConfigurationType="1"
 			ConfigurationType="1"
+			InheritedPropertySheets=".\shared\NoBoostShared.vsprops"
 			CharacterSet="2"
 			CharacterSet="2"
 			WholeProgramOptimization="1"
 			WholeProgramOptimization="1"
 			>
 			>
@@ -715,7 +716,7 @@
 			<Tool
 			<Tool
 				Name="VCLinkerTool"
 				Name="VCLinkerTool"
 				AdditionalDependencies="d3d9.lib d3dx9.lib comdlg32.lib assimp.lib winmm.lib comctl32.lib user32.lib advapi32.lib shell32.lib Gdi32.lib"
 				AdditionalDependencies="d3d9.lib d3dx9.lib comdlg32.lib assimp.lib winmm.lib comctl32.lib user32.lib advapi32.lib shell32.lib Gdi32.lib"
-				OutputFile="$(OutDir)\assimpview32.exe"
+				OutputFile="$(OutDir)\assimp_view.exe"
 				LinkIncremental="1"
 				LinkIncremental="1"
 				AdditionalLibraryDirectories="&quot;..\..\lib\assimp_$(ConfigurationName)_$(PlatformName)&quot;;&quot;$(DXSDK_DIR)lib\x86&quot;"
 				AdditionalLibraryDirectories="&quot;..\..\lib\assimp_$(ConfigurationName)_$(PlatformName)&quot;;&quot;$(DXSDK_DIR)lib\x86&quot;"
 				IgnoreAllDefaultLibraries="false"
 				IgnoreAllDefaultLibraries="false"
@@ -752,10 +753,11 @@
 			/>
 			/>
 		</Configuration>
 		</Configuration>
 		<Configuration
 		<Configuration
-			Name="Release -noBoost|x64"
+			Name="release-noboost-st|x64"
 			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
 			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
 			IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
 			IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
 			ConfigurationType="1"
 			ConfigurationType="1"
+			InheritedPropertySheets=".\shared\NoBoostShared.vsprops"
 			CharacterSet="2"
 			CharacterSet="2"
 			WholeProgramOptimization="1"
 			WholeProgramOptimization="1"
 			>
 			>
@@ -797,7 +799,7 @@
 			<Tool
 			<Tool
 				Name="VCLinkerTool"
 				Name="VCLinkerTool"
 				AdditionalDependencies="d3d9.lib d3dx9.lib comdlg32.lib assimp.lib winmm.lib comctl32.lib user32.lib advapi32.lib shell32.lib Gdi32.lib"
 				AdditionalDependencies="d3d9.lib d3dx9.lib comdlg32.lib assimp.lib winmm.lib comctl32.lib user32.lib advapi32.lib shell32.lib Gdi32.lib"
-				OutputFile="$(OutDir)\assimpview64.exe"
+				OutputFile="$(OutDir)\assimp_view.exe"
 				LinkIncremental="1"
 				LinkIncremental="1"
 				AdditionalLibraryDirectories="..\..\lib\assimp_$(ConfigurationName)_$(PlatformName);&quot;$(DXSDK_DIR)lib\x64&quot;"
 				AdditionalLibraryDirectories="..\..\lib\assimp_$(ConfigurationName)_$(PlatformName);&quot;$(DXSDK_DIR)lib\x64&quot;"
 				IgnoreAllDefaultLibraries="false"
 				IgnoreAllDefaultLibraries="false"
@@ -834,10 +836,11 @@
 			/>
 			/>
 		</Configuration>
 		</Configuration>
 		<Configuration
 		<Configuration
-			Name="Debug -noBoost|Win32"
-			OutputDirectory="$(SolutionDir)..\..\tools\build\$(ConfigurationName)_$(PlatformName)"
-			IntermediateDirectory="$(ConfigurationName)"
+			Name="debug-noboost-st|Win32"
+			OutputDirectory="./../../bin/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
+			IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
 			ConfigurationType="1"
 			ConfigurationType="1"
+			InheritedPropertySheets=".\shared\NoBoostShared.vsprops"
 			CharacterSet="2"
 			CharacterSet="2"
 			>
 			>
 			<Tool
 			<Tool
@@ -882,7 +885,7 @@
 			<Tool
 			<Tool
 				Name="VCLinkerTool"
 				Name="VCLinkerTool"
 				AdditionalDependencies="d3d9.lib d3dx9.lib comdlg32.lib assimp.lib winmm.lib comctl32.lib user32.lib advapi32.lib shell32.lib Gdi32.lib"
 				AdditionalDependencies="d3d9.lib d3dx9.lib comdlg32.lib assimp.lib winmm.lib comctl32.lib user32.lib advapi32.lib shell32.lib Gdi32.lib"
-				OutputFile="$(OutDir)\assimpview32d.exe"
+				OutputFile="$(OutDir)\assimp_view_debug.exe"
 				LinkIncremental="2"
 				LinkIncremental="2"
 				AdditionalLibraryDirectories="&quot;..\..\lib\assimp_$(ConfigurationName)_$(PlatformName)&quot;;&quot;$(DXSDK_DIR)lib\x86&quot;"
 				AdditionalLibraryDirectories="&quot;..\..\lib\assimp_$(ConfigurationName)_$(PlatformName)&quot;;&quot;$(DXSDK_DIR)lib\x86&quot;"
 				GenerateDebugInformation="true"
 				GenerateDebugInformation="true"
@@ -915,10 +918,11 @@
 			/>
 			/>
 		</Configuration>
 		</Configuration>
 		<Configuration
 		<Configuration
-			Name="Debug -noBoost|x64"
+			Name="debug-noboost-st|x64"
 			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
 			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
 			IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
 			IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
 			ConfigurationType="1"
 			ConfigurationType="1"
+			InheritedPropertySheets=".\shared\NoBoostShared.vsprops"
 			CharacterSet="2"
 			CharacterSet="2"
 			>
 			>
 			<Tool
 			<Tool
@@ -964,7 +968,7 @@
 			<Tool
 			<Tool
 				Name="VCLinkerTool"
 				Name="VCLinkerTool"
 				AdditionalDependencies="d3d9.lib d3dx9.lib comdlg32.lib assimp.lib winmm.lib comctl32.lib user32.lib advapi32.lib shell32.lib Gdi32.lib"
 				AdditionalDependencies="d3d9.lib d3dx9.lib comdlg32.lib assimp.lib winmm.lib comctl32.lib user32.lib advapi32.lib shell32.lib Gdi32.lib"
-				OutputFile="$(OutDir)\assimpview64d.exe"
+				OutputFile="$(OutDir)\assimp_view_debug.exe"
 				LinkIncremental="2"
 				LinkIncremental="2"
 				AdditionalLibraryDirectories="..\..\lib\assimp_$(ConfigurationName)_$(PlatformName);&quot;$(DXSDK_DIR)lib\x64&quot;"
 				AdditionalLibraryDirectories="..\..\lib\assimp_$(ConfigurationName)_$(PlatformName);&quot;$(DXSDK_DIR)lib\x64&quot;"
 				GenerateDebugInformation="true"
 				GenerateDebugInformation="true"
@@ -996,6 +1000,332 @@
 				Name="VCPostBuildEventTool"
 				Name="VCPostBuildEventTool"
 			/>
 			/>
 		</Configuration>
 		</Configuration>
+		<Configuration
+			Name="debug-st|Win32"
+			OutputDirectory="./../../bin/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
+			IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
+			ConfigurationType="1"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="&quot;$(DXSDK_DIR)include&quot;;..\..\include;..\..\code"
+				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_SCL_SECURE_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS"
+				MinimalRebuild="true"
+				BasicRuntimeChecks="3"
+				SmallerTypeCheck="true"
+				RuntimeLibrary="1"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="2"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="4"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="d3d9.lib d3dx9.lib comdlg32.lib assimp.lib winmm.lib comctl32.lib user32.lib advapi32.lib shell32.lib Gdi32.lib"
+				OutputFile="$(OutDir)\assimp_view_debug.exe"
+				LinkIncremental="2"
+				AdditionalLibraryDirectories="&quot;..\..\lib\assimp_$(ConfigurationName)_$(PlatformName)&quot;;&quot;$(DXSDK_DIR)lib\x86&quot;"
+				GenerateDebugInformation="true"
+				SubSystem="2"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="debug-st|x64"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+			ConfigurationType="1"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TargetEnvironment="3"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="&quot;$(DXSDK_DIR)include&quot;;..\..\include;..\..\code"
+				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_SCL_SECURE_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS"
+				MinimalRebuild="true"
+				BasicRuntimeChecks="3"
+				SmallerTypeCheck="true"
+				RuntimeLibrary="1"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="2"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="false"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="d3d9.lib d3dx9.lib comdlg32.lib assimp.lib winmm.lib comctl32.lib user32.lib advapi32.lib shell32.lib Gdi32.lib"
+				OutputFile="$(OutDir)\assimp_view_debug.exe"
+				LinkIncremental="2"
+				AdditionalLibraryDirectories="..\..\lib\assimp_$(ConfigurationName)_$(PlatformName);&quot;$(DXSDK_DIR)lib\x64&quot;"
+				GenerateDebugInformation="true"
+				SubSystem="2"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="release-st|Win32"
+			OutputDirectory="./../../bin/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
+			IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
+			ConfigurationType="1"
+			CharacterSet="2"
+			WholeProgramOptimization="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalIncludeDirectories="&quot;$(DXSDK_DIR)include&quot;;..\..\include;..\..\code"
+				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_SCL_SECURE_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS"
+				RuntimeLibrary="0"
+				UsePrecompiledHeader="2"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="d3d9.lib d3dx9.lib comdlg32.lib assimp.lib winmm.lib comctl32.lib user32.lib advapi32.lib shell32.lib Gdi32.lib"
+				OutputFile="$(OutDir)\assimp_view.exe"
+				LinkIncremental="1"
+				AdditionalLibraryDirectories="&quot;..\..\lib\assimp_$(ConfigurationName)_$(PlatformName)&quot;;&quot;$(DXSDK_DIR)lib\x86&quot;"
+				IgnoreAllDefaultLibraries="false"
+				IgnoreDefaultLibraryNames=""
+				GenerateDebugInformation="true"
+				SubSystem="2"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="release-st|x64"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+			ConfigurationType="1"
+			CharacterSet="2"
+			WholeProgramOptimization="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TargetEnvironment="3"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalIncludeDirectories="&quot;$(DXSDK_DIR)include&quot;;..\..\include;..\..\code"
+				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_SCL_SECURE_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS"
+				RuntimeLibrary="0"
+				UsePrecompiledHeader="2"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="d3d9.lib d3dx9.lib comdlg32.lib assimp.lib winmm.lib comctl32.lib user32.lib advapi32.lib shell32.lib Gdi32.lib"
+				OutputFile="$(OutDir)\assimp_view.exe"
+				LinkIncremental="1"
+				AdditionalLibraryDirectories="..\..\lib\assimp_$(ConfigurationName)_$(PlatformName);&quot;$(DXSDK_DIR)lib\x64&quot;"
+				IgnoreAllDefaultLibraries="false"
+				IgnoreDefaultLibraryNames=""
+				GenerateDebugInformation="true"
+				SubSystem="2"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
 	</Configurations>
 	</Configurations>
 	<References>
 	<References>
 	</References>
 	</References>
@@ -1121,7 +1451,39 @@
 				RelativePath="..\..\tools\assimp_view\stdafx.cpp"
 				RelativePath="..\..\tools\assimp_view\stdafx.cpp"
 				>
 				>
 				<FileConfiguration
 				<FileConfiguration
-					Name="Debug|Win32"
+					Name="debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="debug|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="release|x64"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="release-dll|Win32"
 					>
 					>
 					<Tool
 					<Tool
 						Name="VCCLCompilerTool"
 						Name="VCCLCompilerTool"
@@ -1129,7 +1491,7 @@
 					/>
 					/>
 				</FileConfiguration>
 				</FileConfiguration>
 				<FileConfiguration
 				<FileConfiguration
-					Name="Debug|x64"
+					Name="release-dll|x64"
 					>
 					>
 					<Tool
 					<Tool
 						Name="VCCLCompilerTool"
 						Name="VCCLCompilerTool"
@@ -1137,7 +1499,7 @@
 					/>
 					/>
 				</FileConfiguration>
 				</FileConfiguration>
 				<FileConfiguration
 				<FileConfiguration
-					Name="Release|Win32"
+					Name="debug-dll|Win32"
 					>
 					>
 					<Tool
 					<Tool
 						Name="VCCLCompilerTool"
 						Name="VCCLCompilerTool"
@@ -1145,7 +1507,7 @@
 					/>
 					/>
 				</FileConfiguration>
 				</FileConfiguration>
 				<FileConfiguration
 				<FileConfiguration
-					Name="Release|x64"
+					Name="debug-dll|x64"
 					>
 					>
 					<Tool
 					<Tool
 						Name="VCCLCompilerTool"
 						Name="VCCLCompilerTool"
@@ -1153,7 +1515,7 @@
 					/>
 					/>
 				</FileConfiguration>
 				</FileConfiguration>
 				<FileConfiguration
 				<FileConfiguration
-					Name="Release_DLL|Win32"
+					Name="release-noboost-st|Win32"
 					>
 					>
 					<Tool
 					<Tool
 						Name="VCCLCompilerTool"
 						Name="VCCLCompilerTool"
@@ -1161,7 +1523,7 @@
 					/>
 					/>
 				</FileConfiguration>
 				</FileConfiguration>
 				<FileConfiguration
 				<FileConfiguration
-					Name="Release_DLL|x64"
+					Name="release-noboost-st|x64"
 					>
 					>
 					<Tool
 					<Tool
 						Name="VCCLCompilerTool"
 						Name="VCCLCompilerTool"
@@ -1169,7 +1531,7 @@
 					/>
 					/>
 				</FileConfiguration>
 				</FileConfiguration>
 				<FileConfiguration
 				<FileConfiguration
-					Name="Debug_DLL|Win32"
+					Name="debug-noboost-st|Win32"
 					>
 					>
 					<Tool
 					<Tool
 						Name="VCCLCompilerTool"
 						Name="VCCLCompilerTool"
@@ -1177,7 +1539,7 @@
 					/>
 					/>
 				</FileConfiguration>
 				</FileConfiguration>
 				<FileConfiguration
 				<FileConfiguration
-					Name="Debug_DLL|x64"
+					Name="debug-noboost-st|x64"
 					>
 					>
 					<Tool
 					<Tool
 						Name="VCCLCompilerTool"
 						Name="VCCLCompilerTool"
@@ -1185,7 +1547,7 @@
 					/>
 					/>
 				</FileConfiguration>
 				</FileConfiguration>
 				<FileConfiguration
 				<FileConfiguration
-					Name="Release -noBoost|Win32"
+					Name="debug-st|Win32"
 					>
 					>
 					<Tool
 					<Tool
 						Name="VCCLCompilerTool"
 						Name="VCCLCompilerTool"
@@ -1193,7 +1555,7 @@
 					/>
 					/>
 				</FileConfiguration>
 				</FileConfiguration>
 				<FileConfiguration
 				<FileConfiguration
-					Name="Release -noBoost|x64"
+					Name="debug-st|x64"
 					>
 					>
 					<Tool
 					<Tool
 						Name="VCCLCompilerTool"
 						Name="VCCLCompilerTool"
@@ -1201,7 +1563,7 @@
 					/>
 					/>
 				</FileConfiguration>
 				</FileConfiguration>
 				<FileConfiguration
 				<FileConfiguration
-					Name="Debug -noBoost|Win32"
+					Name="release-st|Win32"
 					>
 					>
 					<Tool
 					<Tool
 						Name="VCCLCompilerTool"
 						Name="VCCLCompilerTool"
@@ -1209,7 +1571,7 @@
 					/>
 					/>
 				</FileConfiguration>
 				</FileConfiguration>
 				<FileConfiguration
 				<FileConfiguration
-					Name="Debug -noBoost|x64"
+					Name="release-st|x64"
 					>
 					>
 					<Tool
 					<Tool
 						Name="VCCLCompilerTool"
 						Name="VCCLCompilerTool"

+ 962 - 8
workspaces/vc8/jAssimp.vcproj

@@ -19,7 +19,7 @@
 	</ToolFiles>
 	</ToolFiles>
 	<Configurations>
 	<Configurations>
 		<Configuration
 		<Configuration
-			Name="Debug|Win32"
+			Name="debug|Win32"
 			OutputDirectory="./../../bin/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
 			OutputDirectory="./../../bin/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
 			IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
 			IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
 			ConfigurationType="2"
 			ConfigurationType="2"
@@ -98,7 +98,7 @@
 			/>
 			/>
 		</Configuration>
 		</Configuration>
 		<Configuration
 		<Configuration
-			Name="Debug|x64"
+			Name="debug|x64"
 			OutputDirectory="$(PlatformName)\$(ConfigurationName)"
 			OutputDirectory="$(PlatformName)\$(ConfigurationName)"
 			IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
 			IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
 			ConfigurationType="2"
 			ConfigurationType="2"
@@ -178,7 +178,7 @@
 			/>
 			/>
 		</Configuration>
 		</Configuration>
 		<Configuration
 		<Configuration
-			Name="Release|Win32"
+			Name="release|Win32"
 			OutputDirectory="./../../bin/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
 			OutputDirectory="./../../bin/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
 			IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
 			IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
 			ConfigurationType="2"
 			ConfigurationType="2"
@@ -257,7 +257,7 @@
 			/>
 			/>
 		</Configuration>
 		</Configuration>
 		<Configuration
 		<Configuration
-			Name="Release|x64"
+			Name="release|x64"
 			OutputDirectory="$(PlatformName)\$(ConfigurationName)"
 			OutputDirectory="$(PlatformName)\$(ConfigurationName)"
 			IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
 			IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
 			ConfigurationType="2"
 			ConfigurationType="2"
@@ -337,7 +337,7 @@
 			/>
 			/>
 		</Configuration>
 		</Configuration>
 		<Configuration
 		<Configuration
-			Name="Release -noBoost|Win32"
+			Name="release -noboost|Win32"
 			OutputDirectory="$(ConfigurationName)"
 			OutputDirectory="$(ConfigurationName)"
 			IntermediateDirectory="$(ConfigurationName)"
 			IntermediateDirectory="$(ConfigurationName)"
 			ConfigurationType="2"
 			ConfigurationType="2"
@@ -416,7 +416,7 @@
 			/>
 			/>
 		</Configuration>
 		</Configuration>
 		<Configuration
 		<Configuration
-			Name="Release -noBoost|x64"
+			Name="release -noboost|x64"
 			OutputDirectory="$(PlatformName)\$(ConfigurationName)"
 			OutputDirectory="$(PlatformName)\$(ConfigurationName)"
 			IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
 			IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
 			ConfigurationType="2"
 			ConfigurationType="2"
@@ -496,7 +496,7 @@
 			/>
 			/>
 		</Configuration>
 		</Configuration>
 		<Configuration
 		<Configuration
-			Name="Debug -noBoost|Win32"
+			Name="debug -noboost|Win32"
 			OutputDirectory="$(ConfigurationName)"
 			OutputDirectory="$(ConfigurationName)"
 			IntermediateDirectory="$(ConfigurationName)"
 			IntermediateDirectory="$(ConfigurationName)"
 			ConfigurationType="2"
 			ConfigurationType="2"
@@ -575,7 +575,961 @@
 			/>
 			/>
 		</Configuration>
 		</Configuration>
 		<Configuration
 		<Configuration
-			Name="Debug -noBoost|x64"
+			Name="debug -noboost|x64"
+			OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+			ConfigurationType="2"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TargetEnvironment="3"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="&quot;$(JAVA_HOME)\include&quot;;&quot;$(JAVA_HOME)\include\win32&quot;;&quot;$(SolutionDir)..\..\include&quot;"
+				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;JASSIMP_EXPORTS"
+				MinimalRebuild="true"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="assimp.lib"
+				OutputFile="$(OutDir)\jAssimp64d.dll"
+				LinkIncremental="2"
+				AdditionalLibraryDirectories="$(SolutionDir)..\..\lib\assimp_$(ConfigurationName)_DLL_$(PlatformName)\"
+				GenerateDebugInformation="true"
+				SubSystem="2"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="debug-st|Win32"
+			OutputDirectory="$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
+			ConfigurationType="2"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="&quot;$(JAVA_HOME)\include&quot;;&quot;$(JAVA_HOME)\include\win32&quot;;&quot;$(SolutionDir)..\..\include&quot;"
+				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;JASSIMP_EXPORTS"
+				MinimalRebuild="true"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="4"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="assimp.lib"
+				OutputFile="$(OutDir)\jAssimp32d.dll"
+				LinkIncremental="2"
+				AdditionalLibraryDirectories="$(SolutionDir)..\..\lib\assimp_$(ConfigurationName)_DLL_$(PlatformName)\"
+				GenerateDebugInformation="true"
+				SubSystem="2"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="debug-st|x64"
+			OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+			ConfigurationType="2"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TargetEnvironment="3"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="&quot;$(JAVA_HOME)\include&quot;;&quot;$(JAVA_HOME)\include\win32&quot;;&quot;$(SolutionDir)..\..\include&quot;"
+				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;JASSIMP_EXPORTS"
+				MinimalRebuild="true"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="assimp.lib"
+				OutputFile="$(OutDir)\jAssimp64d.dll"
+				LinkIncremental="2"
+				AdditionalLibraryDirectories="$(SolutionDir)..\..\lib\assimp_$(ConfigurationName)_DLL_$(PlatformName)\"
+				GenerateDebugInformation="true"
+				SubSystem="2"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="release-st|Win32"
+			OutputDirectory="$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
+			ConfigurationType="2"
+			CharacterSet="2"
+			WholeProgramOptimization="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalIncludeDirectories="&quot;$(JAVA_HOME)\include&quot;;&quot;$(JAVA_HOME)\include\win32&quot;;&quot;$(SolutionDir)..\..\include&quot;"
+				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;JASSIMP_EXPORTS"
+				RuntimeLibrary="2"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="assimp.lib"
+				OutputFile="$(OutDir)\jAssimp32.dll"
+				LinkIncremental="1"
+				AdditionalLibraryDirectories="$(SolutionDir)..\..\lib\assimp_$(ConfigurationName)_DLL_$(PlatformName)\"
+				GenerateDebugInformation="true"
+				SubSystem="2"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="release-st|x64"
+			OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+			ConfigurationType="2"
+			CharacterSet="2"
+			WholeProgramOptimization="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TargetEnvironment="3"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalIncludeDirectories="&quot;$(JAVA_HOME)\include&quot;;&quot;$(JAVA_HOME)\include\win32&quot;;&quot;$(SolutionDir)..\..\include&quot;"
+				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;JASSIMP_EXPORTS"
+				RuntimeLibrary="2"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="assimp.lib"
+				OutputFile="$(OutDir)\jAssimp64.dll"
+				LinkIncremental="1"
+				AdditionalLibraryDirectories="$(SolutionDir)..\..\lib\assimp_$(ConfigurationName)_DLL_$(PlatformName)\"
+				GenerateDebugInformation="true"
+				SubSystem="2"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="release-noheap|Win32"
+			OutputDirectory="$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
+			ConfigurationType="2"
+			CharacterSet="2"
+			WholeProgramOptimization="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalIncludeDirectories="&quot;$(JAVA_HOME)\include&quot;;&quot;$(JAVA_HOME)\include\win32&quot;;&quot;$(SolutionDir)..\..\include&quot;"
+				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;JASSIMP_EXPORTS"
+				RuntimeLibrary="2"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="assimp.lib"
+				OutputFile="$(OutDir)\jAssimp32.dll"
+				LinkIncremental="1"
+				AdditionalLibraryDirectories="$(SolutionDir)..\..\lib\assimp_$(ConfigurationName)_DLL_$(PlatformName)\"
+				GenerateDebugInformation="true"
+				SubSystem="2"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="release-noheap|x64"
+			OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+			ConfigurationType="2"
+			CharacterSet="2"
+			WholeProgramOptimization="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TargetEnvironment="3"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalIncludeDirectories="&quot;$(JAVA_HOME)\include&quot;;&quot;$(JAVA_HOME)\include\win32&quot;;&quot;$(SolutionDir)..\..\include&quot;"
+				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;JASSIMP_EXPORTS"
+				RuntimeLibrary="2"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="assimp.lib"
+				OutputFile="$(OutDir)\jAssimp64.dll"
+				LinkIncremental="1"
+				AdditionalLibraryDirectories="$(SolutionDir)..\..\lib\assimp_$(ConfigurationName)_DLL_$(PlatformName)\"
+				GenerateDebugInformation="true"
+				SubSystem="2"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="debug-noheap|Win32"
+			OutputDirectory="$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
+			ConfigurationType="2"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="&quot;$(JAVA_HOME)\include&quot;;&quot;$(JAVA_HOME)\include\win32&quot;;&quot;$(SolutionDir)..\..\include&quot;"
+				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;JASSIMP_EXPORTS"
+				MinimalRebuild="true"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="4"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="assimp.lib"
+				OutputFile="$(OutDir)\jAssimp32d.dll"
+				LinkIncremental="2"
+				AdditionalLibraryDirectories="$(SolutionDir)..\..\lib\assimp_$(ConfigurationName)_DLL_$(PlatformName)\"
+				GenerateDebugInformation="true"
+				SubSystem="2"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="debug-noheap|x64"
+			OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+			ConfigurationType="2"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TargetEnvironment="3"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="&quot;$(JAVA_HOME)\include&quot;;&quot;$(JAVA_HOME)\include\win32&quot;;&quot;$(SolutionDir)..\..\include&quot;"
+				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;JASSIMP_EXPORTS"
+				MinimalRebuild="true"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="assimp.lib"
+				OutputFile="$(OutDir)\jAssimp64d.dll"
+				LinkIncremental="2"
+				AdditionalLibraryDirectories="$(SolutionDir)..\..\lib\assimp_$(ConfigurationName)_DLL_$(PlatformName)\"
+				GenerateDebugInformation="true"
+				SubSystem="2"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="release-dll-noheap|Win32"
+			OutputDirectory="$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
+			ConfigurationType="2"
+			CharacterSet="2"
+			WholeProgramOptimization="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalIncludeDirectories="&quot;$(JAVA_HOME)\include&quot;;&quot;$(JAVA_HOME)\include\win32&quot;;&quot;$(SolutionDir)..\..\include&quot;"
+				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;JASSIMP_EXPORTS"
+				RuntimeLibrary="2"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="assimp.lib"
+				OutputFile="$(OutDir)\jAssimp32.dll"
+				LinkIncremental="1"
+				AdditionalLibraryDirectories="$(SolutionDir)..\..\lib\assimp_$(ConfigurationName)_DLL_$(PlatformName)\"
+				GenerateDebugInformation="true"
+				SubSystem="2"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="release-dll-noheap|x64"
+			OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+			ConfigurationType="2"
+			CharacterSet="2"
+			WholeProgramOptimization="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TargetEnvironment="3"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalIncludeDirectories="&quot;$(JAVA_HOME)\include&quot;;&quot;$(JAVA_HOME)\include\win32&quot;;&quot;$(SolutionDir)..\..\include&quot;"
+				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;JASSIMP_EXPORTS"
+				RuntimeLibrary="2"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="assimp.lib"
+				OutputFile="$(OutDir)\jAssimp64.dll"
+				LinkIncremental="1"
+				AdditionalLibraryDirectories="$(SolutionDir)..\..\lib\assimp_$(ConfigurationName)_DLL_$(PlatformName)\"
+				GenerateDebugInformation="true"
+				SubSystem="2"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="debug-dll-noheap|Win32"
+			OutputDirectory="$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
+			ConfigurationType="2"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="&quot;$(JAVA_HOME)\include&quot;;&quot;$(JAVA_HOME)\include\win32&quot;;&quot;$(SolutionDir)..\..\include&quot;"
+				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;JASSIMP_EXPORTS"
+				MinimalRebuild="true"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="4"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="assimp.lib"
+				OutputFile="$(OutDir)\jAssimp32d.dll"
+				LinkIncremental="2"
+				AdditionalLibraryDirectories="$(SolutionDir)..\..\lib\assimp_$(ConfigurationName)_DLL_$(PlatformName)\"
+				GenerateDebugInformation="true"
+				SubSystem="2"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="debug-dll-noheap|x64"
 			OutputDirectory="$(PlatformName)\$(ConfigurationName)"
 			OutputDirectory="$(PlatformName)\$(ConfigurationName)"
 			IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
 			IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
 			ConfigurationType="2"
 			ConfigurationType="2"

+ 17 - 0
workspaces/vc8/shared/DllShared.vsprops

@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="DllShared"
+	OutputDirectory="./../../bin/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
+	IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
+	>
+	<Tool
+		Name="VCCLCompilerTool"
+		PreprocessorDefinitions="ASSIMP_BUILD_DLL_EXPORT"
+	/>
+	<Tool
+		Name="VCPostBuildEventTool"
+		CommandLine=""
+	/>
+</VisualStudioPropertySheet>

+ 9 - 0
workspaces/vc8/shared/LibShared.vsprops

@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="LibShared"
+	OutputDirectory="./../../lib/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
+	IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
+	>
+</VisualStudioPropertySheet>

+ 11 - 0
workspaces/vc8/shared/NoBoostShared.vsprops

@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="NoBoostShared"
+	>
+	<Tool
+		Name="VCCLCompilerTool"
+		PreprocessorDefinitions="ASSIMP_BUILD_BOOST_WORKAROUND;ASSIMP_BUILD_SINGLETHREADED"
+	/>
+</VisualStudioPropertySheet>

部分文件因为文件数量过多而无法显示