Browse Source

Refactor: Trim trailing whitespace

Richard 10 năm trước cách đây
mục cha
commit
a96a595a7a
100 tập tin đã thay đổi với 2382 bổ sung2382 xóa
  1. 22 22
      code/3DSConverter.cpp
  2. 14 14
      code/3DSExporter.cpp
  3. 10 10
      code/3DSExporter.h
  4. 29 29
      code/3DSHelper.h
  5. 38 38
      code/3DSLoader.cpp
  6. 14 14
      code/3DSLoader.h
  7. 28 28
      code/ACLoader.cpp
  8. 16 16
      code/ACLoader.h
  9. 37 37
      code/ASELoader.cpp
  10. 12 12
      code/ASELoader.h
  11. 55 55
      code/ASEParser.cpp
  12. 20 20
      code/ASEParser.h
  13. 19 19
      code/AssbinExporter.cpp
  14. 9 9
      code/AssbinExporter.h
  15. 31 31
      code/AssbinLoader.cpp
  16. 15 15
      code/AssbinLoader.h
  17. 30 30
      code/Assimp.cpp
  18. 9 9
      code/AssimpCExport.cpp
  19. 11 11
      code/AssxmlExporter.cpp
  20. 9 9
      code/AssxmlExporter.h
  21. 20 20
      code/B3DImporter.cpp
  22. 10 10
      code/B3DImporter.h
  23. 19 19
      code/BVHLoader.cpp
  24. 12 12
      code/BVHLoader.h
  25. 24 24
      code/BaseImporter.cpp
  26. 44 44
      code/BaseImporter.h
  27. 9 9
      code/BaseProcess.cpp
  28. 19 19
      code/BaseProcess.h
  29. 11 11
      code/BlenderBMesh.cpp
  30. 9 9
      code/BlenderBMesh.h
  31. 32 32
      code/BlenderDNA.cpp
  32. 69 69
      code/BlenderDNA.h
  33. 25 25
      code/BlenderIntermediate.h
  34. 67 67
      code/BlenderLoader.cpp
  35. 40 40
      code/BlenderLoader.h
  36. 16 16
      code/BlenderModifier.cpp
  37. 26 26
      code/BlenderModifier.h
  38. 45 45
      code/BlenderScene.cpp
  39. 38 38
      code/BlenderScene.h
  40. 9 9
      code/BlenderSceneGen.h
  41. 10 10
      code/BlenderTessellator.cpp
  42. 10 10
      code/BlenderTessellator.h
  43. 26 26
      code/BlobIOSystem.h
  44. 28 28
      code/C4DImporter.cpp
  45. 10 10
      code/C4DImporter.h
  46. 14 14
      code/CInterfaceIOWrapper.h
  47. 32 32
      code/COBLoader.cpp
  48. 12 12
      code/COBLoader.h
  49. 13 13
      code/COBScene.h
  50. 18 18
      code/CSMLoader.cpp
  51. 11 11
      code/CSMLoader.h
  52. 16 16
      code/CalcTangentsProcess.cpp
  53. 11 11
      code/CalcTangentsProcess.h
  54. 28 28
      code/ColladaExporter.cpp
  55. 16 16
      code/ColladaExporter.h
  56. 34 34
      code/ColladaHelper.h
  57. 63 63
      code/ColladaLoader.cpp
  58. 22 22
      code/ColladaLoader.h
  59. 141 141
      code/ColladaParser.cpp
  60. 21 21
      code/ColladaParser.h
  61. 24 24
      code/ComputeUVMappingProcess.cpp
  62. 10 10
      code/ComputeUVMappingProcess.h
  63. 38 38
      code/ConvertToLHProcess.cpp
  64. 15 15
      code/ConvertToLHProcess.h
  65. 11 11
      code/DXFHelper.h
  66. 47 47
      code/DXFLoader.cpp
  67. 25 25
      code/DXFLoader.h
  68. 44 44
      code/DeboneProcess.cpp
  69. 15 15
      code/DeboneProcess.h
  70. 25 25
      code/DefaultIOStream.cpp
  71. 18 18
      code/DefaultIOStream.h
  72. 16 16
      code/DefaultIOSystem.cpp
  73. 10 10
      code/DefaultIOSystem.h
  74. 20 20
      code/DefaultLogger.cpp
  75. 12 12
      code/DefaultProgressHandler.h
  76. 9 9
      code/Defines.h
  77. 10 10
      code/Exceptional.h
  78. 36 36
      code/Exporter.cpp
  79. 16 16
      code/FBXAnimation.cpp
  80. 9 9
      code/FBXCompileConfig.h
  81. 154 154
      code/FBXConverter.cpp
  82. 9 9
      code/FBXConverter.h
  83. 10 10
      code/FBXDeformer.cpp
  84. 31 31
      code/FBXDocument.cpp
  85. 39 39
      code/FBXDocument.h
  86. 14 14
      code/FBXDocumentUtil.cpp
  87. 18 18
      code/FBXDocumentUtil.h
  88. 14 14
      code/FBXImportSettings.h
  89. 15 15
      code/FBXImporter.cpp
  90. 14 14
      code/FBXImporter.h
  91. 11 11
      code/FBXMaterial.cpp
  92. 31 31
      code/FBXMeshGeometry.cpp
  93. 10 10
      code/FBXModel.cpp
  94. 9 9
      code/FBXNodeAttribute.cpp
  95. 14 14
      code/FBXParser.h
  96. 17 17
      code/FBXProperties.cpp
  97. 16 16
      code/FBXProperties.h
  98. 15 15
      code/FBXTokenizer.cpp
  99. 11 11
      code/FBXTokenizer.h
  100. 12 12
      code/FBXUtil.cpp

+ 22 - 22
code/3DSConverter.cpp

@@ -7,8 +7,8 @@ Copyright (c) 2006-2015, assimp team
 
 
 All rights reserved.
 All rights reserved.
 
 
-Redistribution and use of this software in source and binary forms, 
-with or without modification, are permitted provided that the following 
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the following
 conditions are met:
 conditions are met:
 
 
 * Redistributions of source code must retain the above
 * Redistributions of source code must retain the above
@@ -25,16 +25,16 @@ conditions are met:
   derived from this software without specific prior
   derived from this software without specific prior
   written permission of the assimp team.
   written permission of the assimp team.
 
 
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+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
 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 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 
+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.
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 ---------------------------------------------------------------------------
 ---------------------------------------------------------------------------
 */
 */
@@ -59,7 +59,7 @@ using namespace Assimp;
 // Setup final material indices, generae a default material if necessary
 // Setup final material indices, generae a default material if necessary
 void Discreet3DSImporter::ReplaceDefaultMaterial()
 void Discreet3DSImporter::ReplaceDefaultMaterial()
 {
 {
-	
+
 	// Try to find an existing material that matches the
 	// Try to find an existing material that matches the
 	// typical default material setting:
 	// typical default material setting:
 	// - no textures
 	// - no textures
@@ -81,7 +81,7 @@ void Discreet3DSImporter::ReplaceDefaultMaterial()
 			mScene->mMaterials[i].mDiffuse.b)continue;
 			mScene->mMaterials[i].mDiffuse.b)continue;
 
 
 		if (mScene->mMaterials[i].sTexDiffuse.mMapName.length()   != 0	||
 		if (mScene->mMaterials[i].sTexDiffuse.mMapName.length()   != 0	||
-			mScene->mMaterials[i].sTexBump.mMapName.length()      != 0	|| 
+			mScene->mMaterials[i].sTexBump.mMapName.length()      != 0	||
 			mScene->mMaterials[i].sTexOpacity.mMapName.length()   != 0	||
 			mScene->mMaterials[i].sTexOpacity.mMapName.length()   != 0	||
 			mScene->mMaterials[i].sTexEmissive.mMapName.length()  != 0	||
 			mScene->mMaterials[i].sTexEmissive.mMapName.length()  != 0	||
 			mScene->mMaterials[i].sTexSpecular.mMapName.length()  != 0	||
 			mScene->mMaterials[i].sTexSpecular.mMapName.length()  != 0	||
@@ -159,7 +159,7 @@ void Discreet3DSImporter::CheckIndices(D3DS::Mesh& sMesh)
 void Discreet3DSImporter::MakeUnique(D3DS::Mesh& sMesh)
 void Discreet3DSImporter::MakeUnique(D3DS::Mesh& sMesh)
 {
 {
 	// TODO: really necessary? I don't think. Just a waste of memory and time
 	// TODO: really necessary? I don't think. Just a waste of memory and time
-	// to do it now in a separate buffer. 
+	// to do it now in a separate buffer.
 
 
 	// Allocate output storage
 	// Allocate output storage
 	std::vector<aiVector3D> vNew  (sMesh.mFaces.size() * 3);
 	std::vector<aiVector3D> vNew  (sMesh.mFaces.size() * 3);
@@ -202,7 +202,7 @@ void CopyTexture(aiMaterial& mat, D3DS::Texture& texture, aiTextureType type)
 	mat.AddProperty<int>((int*)&texture.mMapMode,1,AI_MATKEY_MAPPINGMODE_U(type,0));
 	mat.AddProperty<int>((int*)&texture.mMapMode,1,AI_MATKEY_MAPPINGMODE_U(type,0));
 	mat.AddProperty<int>((int*)&texture.mMapMode,1,AI_MATKEY_MAPPINGMODE_V(type,0));
 	mat.AddProperty<int>((int*)&texture.mMapMode,1,AI_MATKEY_MAPPINGMODE_V(type,0));
 
 
-	// Mirroring - double the scaling values 
+	// Mirroring - double the scaling values
 	// FIXME: this is not really correct ...
 	// FIXME: this is not really correct ...
 	if (texture.mMapMode == aiTextureMapMode_Mirror)
 	if (texture.mMapMode == aiTextureMapMode_Mirror)
 	{
 	{
@@ -211,7 +211,7 @@ void CopyTexture(aiMaterial& mat, D3DS::Texture& texture, aiTextureType type)
 		texture.mOffsetU /= 2.f;
 		texture.mOffsetU /= 2.f;
 		texture.mOffsetV /= 2.f;
 		texture.mOffsetV /= 2.f;
 	}
 	}
-	
+
 	// Setup texture UV transformations
 	// Setup texture UV transformations
 	mat.AddProperty<float>(&texture.mOffsetU,5,AI_MATKEY_UVTRANSFORM(type,0));
 	mat.AddProperty<float>(&texture.mOffsetU,5,AI_MATKEY_UVTRANSFORM(type,0));
 }
 }
@@ -249,7 +249,7 @@ void Discreet3DSImporter::ConvertMaterial(D3DS::Material& oldMat,
 	mat.AddProperty( &oldMat.mEmissive, 1, AI_MATKEY_COLOR_EMISSIVE);
 	mat.AddProperty( &oldMat.mEmissive, 1, AI_MATKEY_COLOR_EMISSIVE);
 
 
 	// Phong shininess and shininess strength
 	// Phong shininess and shininess strength
-	if (D3DS::Discreet3DS::Phong == oldMat.mShading || 
+	if (D3DS::Discreet3DS::Phong == oldMat.mShading ||
 		D3DS::Discreet3DS::Metal == oldMat.mShading)
 		D3DS::Discreet3DS::Metal == oldMat.mShading)
 	{
 	{
 		if (!oldMat.mSpecularExponent || !oldMat.mShininessStrength)
 		if (!oldMat.mSpecularExponent || !oldMat.mShininessStrength)
@@ -456,7 +456,7 @@ void Discreet3DSImporter::AddNodeToGraph(aiScene* pcSOut,aiNode* pcOut,
 	}
 	}
 	if (!iArray.empty())
 	if (!iArray.empty())
 	{
 	{
-		// The matrix should be identical for all meshes with the 
+		// The matrix should be identical for all meshes with the
 		// same name. It HAS to be identical for all meshes .....
 		// same name. It HAS to be identical for all meshes .....
 		D3DS::Mesh* imesh = ((D3DS::Mesh*)pcSOut->mMeshes[iArray[0]]->mColors[0]);
 		D3DS::Mesh* imesh = ((D3DS::Mesh*)pcSOut->mMeshes[iArray[0]]->mColors[0]);
 
 
@@ -537,7 +537,7 @@ void Discreet3DSImporter::AddNodeToGraph(aiScene* pcSOut,aiNode* pcOut,
 
 
 		pcOut->mTransformation = aiMatrix4x4( pcIn->aRotationKeys[0].mValue.GetMatrix() );
 		pcOut->mTransformation = aiMatrix4x4( pcIn->aRotationKeys[0].mValue.GetMatrix() );
 	}
 	}
-	else if (pcIn->aCameraRollKeys.size()) 
+	else if (pcIn->aCameraRollKeys.size())
 	{
 	{
 		aiMatrix4x4::RotationZ(AI_DEG_TO_RAD(- pcIn->aCameraRollKeys[0].mValue),
 		aiMatrix4x4::RotationZ(AI_DEG_TO_RAD(- pcIn->aCameraRollKeys[0].mValue),
 			pcOut->mTransformation);
 			pcOut->mTransformation);
@@ -684,7 +684,7 @@ void Discreet3DSImporter::AddNodeToGraph(aiScene* pcSOut,aiNode* pcOut,
 		}
 		}
 	}
 	}
 
 
-	// Allocate storage for children 
+	// Allocate storage for children
 	pcOut->mNumChildren = (unsigned int)pcIn->mChildren.size();
 	pcOut->mNumChildren = (unsigned int)pcIn->mChildren.size();
 	pcOut->mChildren = new aiNode*[pcIn->mChildren.size()];
 	pcOut->mChildren = new aiNode*[pcIn->mChildren.size()];
 
 
@@ -735,12 +735,12 @@ void Discreet3DSImporter::GenerateNodeGraph(aiScene* pcOut)
 		//                ROOT_NODE
 		//                ROOT_NODE
 		//                   |
 		//                   |
 		//   ----------------------------------------
 		//   ----------------------------------------
-		//   |       |       |            |         |  
+		//   |       |       |            |         |
 		// MESH_0  MESH_1  MESH_2  ...  MESH_N    CAMERA_0 ....
 		// MESH_0  MESH_1  MESH_2  ...  MESH_N    CAMERA_0 ....
 		//
 		//
 		DefaultLogger::get()->warn("No hierarchy information has been found in the file. ");
 		DefaultLogger::get()->warn("No hierarchy information has been found in the file. ");
 
 
-		pcOut->mRootNode->mNumChildren = pcOut->mNumMeshes + 
+		pcOut->mRootNode->mNumChildren = pcOut->mNumMeshes +
 			mScene->mCameras.size() + mScene->mLights.size();
 			mScene->mCameras.size() + mScene->mLights.size();
 
 
 		pcOut->mRootNode->mChildren = new aiNode* [ pcOut->mRootNode->mNumChildren ];
 		pcOut->mRootNode->mChildren = new aiNode* [ pcOut->mRootNode->mNumChildren ];
@@ -757,7 +757,7 @@ void Discreet3DSImporter::GenerateNodeGraph(aiScene* pcOut)
 			pcNode->mNumMeshes = 1;
 			pcNode->mNumMeshes = 1;
 
 
 			// Build a name for the node
 			// Build a name for the node
-			pcNode->mName.length = sprintf(pcNode->mName.data,"3DSMesh_%u",i);	
+			pcNode->mName.length = sprintf(pcNode->mName.data,"3DSMesh_%u",i);
 		}
 		}
 
 
 		// Build dummy nodes for all cameras
 		// Build dummy nodes for all cameras
@@ -796,7 +796,7 @@ void Discreet3DSImporter::GenerateNodeGraph(aiScene* pcOut)
 
 
 			anim->mName.Set("3DSMasterAnim");
 			anim->mName.Set("3DSMasterAnim");
 
 
-			// Allocate enough storage for all node animation channels, 
+			// Allocate enough storage for all node animation channels,
 			// but don't set the mNumChannels member - we'll use it to
 			// but don't set the mNumChannels member - we'll use it to
 			// index into the array
 			// index into the array
 			anim->mChannels = new aiNodeAnim*[numChannel];
 			anim->mChannels = new aiNodeAnim*[numChannel];

+ 14 - 14
code/3DSExporter.cpp

@@ -5,8 +5,8 @@ Open Asset Import Library (assimp)
 Copyright (c) 2006-2015, assimp team
 Copyright (c) 2006-2015, assimp team
 All rights reserved.
 All rights reserved.
 
 
-Redistribution and use of this software in source and binary forms, 
-with or without modification, are permitted provided that the 
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the
 following conditions are met:
 following conditions are met:
 
 
 * Redistributions of source code must retain the above
 * Redistributions of source code must retain the above
@@ -23,16 +23,16 @@ following conditions are met:
   derived from this software without specific prior
   derived from this software without specific prior
   written permission of the assimp team.
   written permission of the assimp team.
 
 
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+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
 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 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 
+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.
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
@@ -88,7 +88,7 @@ namespace {
 			writer.PutU4(chunk_size);
 			writer.PutU4(chunk_size);
 			writer.SetCurrentPos(head_pos);
 			writer.SetCurrentPos(head_pos);
 		}
 		}
-		
+
 	private:
 	private:
 		StreamWriterLE& writer;
 		StreamWriterLE& writer;
 		std::size_t chunk_start_pos;
 		std::size_t chunk_start_pos;
@@ -153,7 +153,7 @@ void ExportScene3DS(const char* pFile, IOSystem* pIOSystem, const aiScene* pScen
 	boost::shared_ptr<IOStream> outfile (pIOSystem->Open(pFile, "wb"));
 	boost::shared_ptr<IOStream> outfile (pIOSystem->Open(pFile, "wb"));
 	if(!outfile) {
 	if(!outfile) {
 		throw DeadlyExportError("Could not open output .3ds file: " + std::string(pFile));
 		throw DeadlyExportError("Could not open output .3ds file: " + std::string(pFile));
-	} 
+	}
 
 
 	// TODO: This extra copy should be avoided and all of this made a preprocess
 	// TODO: This extra copy should be avoided and all of this made a preprocess
 	// requirement of the 3DS exporter.
 	// requirement of the 3DS exporter.
@@ -174,7 +174,7 @@ void ExportScene3DS(const char* pFile, IOSystem* pIOSystem, const aiScene* pScen
 	vert_splitter.SetLimit(0xffff);
 	vert_splitter.SetLimit(0xffff);
 	vert_splitter.Execute(scenecopy.get());
 	vert_splitter.Execute(scenecopy.get());
 
 
-	// Invoke the actual exporter 
+	// Invoke the actual exporter
 	Discreet3DSExporter exporter(outfile, scenecopy.get());
 	Discreet3DSExporter exporter(outfile, scenecopy.get());
 }
 }
 
 
@@ -347,7 +347,7 @@ void Discreet3DSExporter::WriteMaterials()
 			ChunkWriter chunk(writer, Discreet3DS::CHUNK_MAT_TWO_SIDE);
 			ChunkWriter chunk(writer, Discreet3DS::CHUNK_MAT_TWO_SIDE);
 			writer.PutI2(1);
 			writer.PutI2(1);
 		}
 		}
-		
+
 		WriteTexture(mat, aiTextureType_DIFFUSE, Discreet3DS::CHUNK_MAT_TEXTURE);
 		WriteTexture(mat, aiTextureType_DIFFUSE, Discreet3DS::CHUNK_MAT_TEXTURE);
 		WriteTexture(mat, aiTextureType_HEIGHT, Discreet3DS::CHUNK_MAT_BUMPMAP);
 		WriteTexture(mat, aiTextureType_HEIGHT, Discreet3DS::CHUNK_MAT_BUMPMAP);
 		WriteTexture(mat, aiTextureType_OPACITY, Discreet3DS::CHUNK_MAT_OPACMAP);
 		WriteTexture(mat, aiTextureType_OPACITY, Discreet3DS::CHUNK_MAT_OPACMAP);
@@ -359,7 +359,7 @@ void Discreet3DSExporter::WriteMaterials()
 }
 }
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-void Discreet3DSExporter::WriteTexture(const aiMaterial& mat, aiTextureType type, uint16_t chunk_flags) 
+void Discreet3DSExporter::WriteTexture(const aiMaterial& mat, aiTextureType type, uint16_t chunk_flags)
 {
 {
 	aiString path;
 	aiString path;
 	aiTextureMapMode map_mode[2] = {
 	aiTextureMapMode map_mode[2] = {

+ 10 - 10
code/3DSExporter.h

@@ -5,8 +5,8 @@ Open Asset Import Library (assimp)
 Copyright (c) 2006-2015, assimp team
 Copyright (c) 2006-2015, assimp team
 All rights reserved.
 All rights reserved.
 
 
-Redistribution and use of this software in source and binary forms, 
-with or without modification, are permitted provided that the 
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the
 following conditions are met:
 following conditions are met:
 
 
 * Redistributions of source code must retain the above
 * Redistributions of source code must retain the above
@@ -23,16 +23,16 @@ following conditions are met:
   derived from this software without specific prior
   derived from this software without specific prior
   written permission of the assimp team.
   written permission of the assimp team.
 
 
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+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
 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 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 
+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.
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
@@ -55,7 +55,7 @@ struct aiNode;
 struct aiMaterial;
 struct aiMaterial;
 struct aiMesh;
 struct aiMesh;
 
 
-namespace Assimp	
+namespace Assimp
 {
 {
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------

+ 29 - 29
code/3DSHelper.h

@@ -5,8 +5,8 @@ Open Asset Import Library (assimp)
 Copyright (c) 2006-2015, assimp team
 Copyright (c) 2006-2015, assimp team
 All rights reserved.
 All rights reserved.
 
 
-Redistribution and use of this software in source and binary forms, 
-with or without modification, are permitted provided that the 
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the
 following conditions are met:
 following conditions are met:
 
 
 * Redistributions of source code must retain the above
 * Redistributions of source code must retain the above
@@ -23,16 +23,16 @@ following conditions are met:
   derived from this software without specific prior
   derived from this software without specific prior
   written permission of the assimp team.
   written permission of the assimp team.
 
 
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+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
 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 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 
+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.
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
@@ -113,7 +113,7 @@ public:
 		KEY_USE_EASE_FROM    = 0x10
 		KEY_USE_EASE_FROM    = 0x10
 	} ;
 	} ;
 
 
-	enum 
+	enum
 	{
 	{
 
 
 		// ********************************************************************
 		// ********************************************************************
@@ -153,7 +153,7 @@ public:
 
 
 		// Specifies the background image for the whole scene
 		// Specifies the background image for the whole scene
 		// This value is passed through the material system
 		// This value is passed through the material system
-		// to the viewer 
+		// to the viewer
 		CHUNK_BIT_MAP   = 0x1100,
 		CHUNK_BIT_MAP   = 0x1100,
 		CHUNK_BIT_MAP_EXISTS  = 0x1101,
 		CHUNK_BIT_MAP_EXISTS  = 0x1101,
 
 
@@ -195,33 +195,33 @@ public:
 		CHUNK_MAT_MATERIAL  = 0xAFFF,
 		CHUNK_MAT_MATERIAL  = 0xAFFF,
 
 
 			// asciiz containing the name of the material
 			// asciiz containing the name of the material
-			CHUNK_MAT_MATNAME   = 0xA000, 
+			CHUNK_MAT_MATNAME   = 0xA000,
 			CHUNK_MAT_AMBIENT   = 0xA010, // followed by color chunk
 			CHUNK_MAT_AMBIENT   = 0xA010, // followed by color chunk
 			CHUNK_MAT_DIFFUSE   = 0xA020, // followed by color chunk
 			CHUNK_MAT_DIFFUSE   = 0xA020, // followed by color chunk
 			CHUNK_MAT_SPECULAR  = 0xA030, // followed by color chunk
 			CHUNK_MAT_SPECULAR  = 0xA030, // followed by color chunk
 
 
 			// Specifies the shininess of the material
 			// Specifies the shininess of the material
 			// followed by percentage chunk
 			// followed by percentage chunk
-			CHUNK_MAT_SHININESS  = 0xA040, 
+			CHUNK_MAT_SHININESS  = 0xA040,
 			CHUNK_MAT_SHININESS_PERCENT  = 0xA041 ,
 			CHUNK_MAT_SHININESS_PERCENT  = 0xA041 ,
 
 
 			// Specifies the shading mode to be used
 			// Specifies the shading mode to be used
 			// followed by a short
 			// followed by a short
-			CHUNK_MAT_SHADING  = 0xA100, 
+			CHUNK_MAT_SHADING  = 0xA100,
 
 
 			// NOTE: Emissive color (self illumination) seems not
 			// NOTE: Emissive color (self illumination) seems not
 			// to be a color but a single value, type is unknown.
 			// to be a color but a single value, type is unknown.
 			// Make the parser accept both of them.
 			// Make the parser accept both of them.
 			// followed by percentage chunk (?)
 			// followed by percentage chunk (?)
-			CHUNK_MAT_SELF_ILLUM = 0xA080,  
+			CHUNK_MAT_SELF_ILLUM = 0xA080,
 
 
 			// Always followed by percentage chunk	(?)
 			// Always followed by percentage chunk	(?)
-			CHUNK_MAT_SELF_ILPCT = 0xA084,  
+			CHUNK_MAT_SELF_ILPCT = 0xA084,
 
 
 			// Always followed by percentage chunk
 			// Always followed by percentage chunk
-			CHUNK_MAT_TRANSPARENCY = 0xA050, 
+			CHUNK_MAT_TRANSPARENCY = 0xA050,
 
 
-			// Diffuse texture channel 0 
+			// Diffuse texture channel 0
 			CHUNK_MAT_TEXTURE   = 0xA200,
 			CHUNK_MAT_TEXTURE   = 0xA200,
 
 
 			// Contains opacity information for each texel
 			// Contains opacity information for each texel
@@ -232,7 +232,7 @@ public:
 			CHUNK_MAT_REFLMAP = 0xA220,
 			CHUNK_MAT_REFLMAP = 0xA220,
 
 
 			// Self Illumination map (emissive colors)
 			// Self Illumination map (emissive colors)
-			CHUNK_MAT_SELFIMAP = 0xA33d,	
+			CHUNK_MAT_SELFIMAP = 0xA33d,
 
 
 			// Bumpmap. Not specified whether it is a heightmap
 			// Bumpmap. Not specified whether it is a heightmap
 			// or a normal map. Assme it is a heightmap since
 			// or a normal map. Assme it is a heightmap since
@@ -242,17 +242,17 @@ public:
 			// Specular map. Seems to influence the specular color
 			// Specular map. Seems to influence the specular color
 			CHUNK_MAT_SPECMAP = 0xA204,
 			CHUNK_MAT_SPECMAP = 0xA204,
 
 
-			// Holds shininess data. 
+			// Holds shininess data.
 			CHUNK_MAT_MAT_SHINMAP = 0xA33C,
 			CHUNK_MAT_MAT_SHINMAP = 0xA33C,
 
 
 			// Scaling in U/V direction.
 			// Scaling in U/V direction.
-			// (need to gen separate UV coordinate set 
+			// (need to gen separate UV coordinate set
 			// and do this by hand)
 			// and do this by hand)
 			CHUNK_MAT_MAP_USCALE 	  = 0xA354,
 			CHUNK_MAT_MAP_USCALE 	  = 0xA354,
 			CHUNK_MAT_MAP_VSCALE 	  = 0xA356,
 			CHUNK_MAT_MAP_VSCALE 	  = 0xA356,
 
 
 			// Translation in U/V direction.
 			// Translation in U/V direction.
-			// (need to gen separate UV coordinate set 
+			// (need to gen separate UV coordinate set
 			// and do this by hand)
 			// and do this by hand)
 			CHUNK_MAT_MAP_UOFFSET 	  = 0xA358,
 			CHUNK_MAT_MAP_UOFFSET 	  = 0xA358,
 			CHUNK_MAT_MAP_VOFFSET 	  = 0xA35a,
 			CHUNK_MAT_MAP_VOFFSET 	  = 0xA35a,
@@ -268,7 +268,7 @@ public:
 			CHUNK_MAPFILE   = 0xA300,
 			CHUNK_MAPFILE   = 0xA300,
 
 
 			// Specifies whether a materail requires two-sided rendering
 			// Specifies whether a materail requires two-sided rendering
-			CHUNK_MAT_TWO_SIDE = 0xA081,  
+			CHUNK_MAT_TWO_SIDE = 0xA081,
 		// ********************************************************************
 		// ********************************************************************
 
 
 		// Main keyframer chunk. Contains translation/rotation/scaling data
 		// Main keyframer chunk. Contains translation/rotation/scaling data
@@ -366,7 +366,7 @@ struct Material
 {
 {
 	//! Default constructor. Builds a default name for the material
 	//! Default constructor. Builds a default name for the material
 	Material()
 	Material()
-		: 
+		:
 	mDiffuse			(0.6f,0.6f,0.6f), // FIX ... we won't want object to be black
 	mDiffuse			(0.6f,0.6f,0.6f), // FIX ... we won't want object to be black
 	mSpecularExponent	(0.0f),
 	mSpecularExponent	(0.0f),
 	mShininessStrength	(1.0f),
 	mShininessStrength	(1.0f),
@@ -376,7 +376,7 @@ struct Material
 	mTwoSided			(false)
 	mTwoSided			(false)
 	{
 	{
 		static int iCnt = 0;
 		static int iCnt = 0;
-		
+
 		char szTemp[128];
 		char szTemp[128];
 		sprintf(szTemp,"UNNAMED_%i",iCnt++);
 		sprintf(szTemp,"UNNAMED_%i",iCnt++);
 		mName = szTemp;
 		mName = szTemp;
@@ -431,7 +431,7 @@ struct Mesh : public MeshWithSmoothingGroups<D3DS::Face>
 	Mesh()
 	Mesh()
 	{
 	{
 		static int iCnt = 0;
 		static int iCnt = 0;
-		
+
 		// Generate a default name for the mesh
 		// Generate a default name for the mesh
 		char szTemp[128];
 		char szTemp[128];
 		::sprintf(szTemp,"UNNAMED_%i",iCnt++);
 		::sprintf(szTemp,"UNNAMED_%i",iCnt++);
@@ -454,7 +454,7 @@ struct Mesh : public MeshWithSmoothingGroups<D3DS::Face>
 // ---------------------------------------------------------------------------
 // ---------------------------------------------------------------------------
 /** Float key - quite similar to aiVectorKey and aiQuatKey. Both are in the
 /** Float key - quite similar to aiVectorKey and aiQuatKey. Both are in the
     C-API, so it would be difficult to make them a template. */
     C-API, so it would be difficult to make them a template. */
-struct aiFloatKey 
+struct aiFloatKey
 {
 {
 	double mTime;      ///< The time of this key
 	double mTime;      ///< The time of this key
 	float mValue;	///< The value of this key
 	float mValue;	///< The value of this key
@@ -491,7 +491,7 @@ struct Node
 
 
 	{
 	{
 		static int iCnt = 0;
 		static int iCnt = 0;
-		
+
 		// Generate a default name for the node
 		// Generate a default name for the node
 		char szTemp[128];
 		char szTemp[128];
 		::sprintf(szTemp,"UNNAMED_%i",iCnt++);
 		::sprintf(szTemp,"UNNAMED_%i",iCnt++);
@@ -520,7 +520,7 @@ struct Node
 	//! InstanceNumber of the node
 	//! InstanceNumber of the node
 	int32_t mInstanceNumber;
 	int32_t mInstanceNumber;
 
 
-	//! Dummy nodes: real name to be combined with the $$$DUMMY 
+	//! Dummy nodes: real name to be combined with the $$$DUMMY
 	std::string mDummyName;
 	std::string mDummyName;
 
 
 	//! Position of the node in the hierarchy (tree depth)
 	//! Position of the node in the hierarchy (tree depth)

+ 38 - 38
code/3DSLoader.cpp

@@ -7,8 +7,8 @@ Copyright (c) 2006-2015, assimp team
 
 
 All rights reserved.
 All rights reserved.
 
 
-Redistribution and use of this software in source and binary forms, 
-with or without modification, are permitted provided that the following 
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the following
 conditions are met:
 conditions are met:
 
 
 * Redistributions of source code must retain the above
 * Redistributions of source code must retain the above
@@ -25,16 +25,16 @@ conditions are met:
   derived from this software without specific prior
   derived from this software without specific prior
   written permission of the assimp team.
   written permission of the assimp team.
 
 
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+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
 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 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 
+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.
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 ---------------------------------------------------------------------------
 ---------------------------------------------------------------------------
 */
 */
@@ -68,10 +68,10 @@ static const aiImporterDesc desc = {
 	0,
 	0,
 	0,
 	0,
 	0,
 	0,
-	"3ds prj" 
+	"3ds prj"
 };
 };
 
 
-		
+
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
 // Begins a new parsing block
 // Begins a new parsing block
 // - Reads the current chunk and validates it
 // - Reads the current chunk and validates it
@@ -88,7 +88,7 @@ static const aiImporterDesc desc = {
         continue;                                                        \
         continue;                                                        \
 	const int oldReadLimit = stream->GetReadLimit();                     \
 	const int oldReadLimit = stream->GetReadLimit();                     \
 	stream->SetReadLimit(stream->GetCurrentPos() + chunkSize);           \
 	stream->SetReadLimit(stream->GetCurrentPos() + chunkSize);           \
-	
+
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
 // End a parsing block
 // End a parsing block
@@ -106,12 +106,12 @@ Discreet3DSImporter::Discreet3DSImporter()
 {}
 {}
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-// Destructor, private as well 
+// Destructor, private as well
 Discreet3DSImporter::~Discreet3DSImporter()
 Discreet3DSImporter::~Discreet3DSImporter()
 {}
 {}
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-// Returns whether the class can handle the format of the given file. 
+// Returns whether the class can handle the format of the given file.
 bool Discreet3DSImporter::CanRead( const std::string& pFile, IOSystem* pIOHandler, bool checkSig) const
 bool Discreet3DSImporter::CanRead( const std::string& pFile, IOSystem* pIOHandler, bool checkSig) const
 {
 {
 	std::string extension = GetExtension(pFile);
 	std::string extension = GetExtension(pFile);
@@ -143,8 +143,8 @@ void Discreet3DSImporter::SetupProperties(const Importer* /*pImp*/)
 }
 }
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-// Imports the given file into the given scene structure. 
-void Discreet3DSImporter::InternReadFile( const std::string& pFile, 
+// Imports the given file into the given scene structure.
+void Discreet3DSImporter::InternReadFile( const std::string& pFile,
 	aiScene* pScene, IOSystem* pIOHandler)
 	aiScene* pScene, IOSystem* pIOHandler)
 {
 {
 	StreamReaderLE stream(pIOHandler->Open(pFile,"rb"));
 	StreamReaderLE stream(pIOHandler->Open(pFile,"rb"));
@@ -174,7 +174,7 @@ void Discreet3DSImporter::InternReadFile( const std::string& pFile,
 	ParseMainChunk();
 	ParseMainChunk();
 
 
 	// Process all meshes in the file. First check whether all
 	// Process all meshes in the file. First check whether all
-	// face indices haev valid values. The generate our 
+	// face indices haev valid values. The generate our
 	// internal verbose representation. Finally compute normal
 	// internal verbose representation. Finally compute normal
 	// vectors from the smoothing groups we read from the
 	// vectors from the smoothing groups we read from the
 	// file.
 	// file.
@@ -225,7 +225,7 @@ void Discreet3DSImporter::ApplyMasterScale(aiScene* pScene)
 	else mMasterScale = 1.0f / mMasterScale;
 	else mMasterScale = 1.0f / mMasterScale;
 
 
 	// Construct an uniform scaling matrix and multiply with it
 	// Construct an uniform scaling matrix and multiply with it
-	pScene->mRootNode->mTransformation *= aiMatrix4x4( 
+	pScene->mRootNode->mTransformation *= aiMatrix4x4(
 		mMasterScale,0.0f, 0.0f, 0.0f,
 		mMasterScale,0.0f, 0.0f, 0.0f,
 		0.0f, mMasterScale,0.0f, 0.0f,
 		0.0f, mMasterScale,0.0f, 0.0f,
 		0.0f, 0.0f, mMasterScale,0.0f,
 		0.0f, 0.0f, mMasterScale,0.0f,
@@ -245,7 +245,7 @@ void Discreet3DSImporter::ReadChunk(Discreet3DS::Chunk* pcOut)
 
 
 	if (pcOut->Size - sizeof(Discreet3DS::Chunk) > stream->GetRemainingSize())
 	if (pcOut->Size - sizeof(Discreet3DS::Chunk) > stream->GetRemainingSize())
 		throw DeadlyImportError("Chunk is too large");
 		throw DeadlyImportError("Chunk is too large");
-	
+
 	if (pcOut->Size - sizeof(Discreet3DS::Chunk) > stream->GetRemainingSizeToLimit())
 	if (pcOut->Size - sizeof(Discreet3DS::Chunk) > stream->GetRemainingSizeToLimit())
 		DefaultLogger::get()->error("3DS: Chunk overflow");
 		DefaultLogger::get()->error("3DS: Chunk overflow");
 }
 }
@@ -256,7 +256,7 @@ void Discreet3DSImporter::SkipChunk()
 {
 {
 	Discreet3DS::Chunk psChunk;
 	Discreet3DS::Chunk psChunk;
 	ReadChunk(&psChunk);
 	ReadChunk(&psChunk);
-	
+
 	stream->IncPtr(psChunk.Size-sizeof(Discreet3DS::Chunk));
 	stream->IncPtr(psChunk.Size-sizeof(Discreet3DS::Chunk));
 	return;
 	return;
 }
 }
@@ -270,7 +270,7 @@ void Discreet3DSImporter::ParseMainChunk()
 	// get chunk type
 	// get chunk type
 	switch (chunk.Flag)
 	switch (chunk.Flag)
 	{
 	{
-	
+
 	case Discreet3DS::CHUNK_PRJ:
 	case Discreet3DS::CHUNK_PRJ:
 		bIsPrj = true;
 		bIsPrj = true;
 	case Discreet3DS::CHUNK_MAIN:
 	case Discreet3DS::CHUNK_MAIN:
@@ -356,7 +356,7 @@ void Discreet3DSImporter::ParseObjectChunk()
 
 
 	case Discreet3DS::CHUNK_BIT_MAP:
 	case Discreet3DS::CHUNK_BIT_MAP:
 		{
 		{
-		// Specifies the background image. The string should already be 
+		// Specifies the background image. The string should already be
 		// properly 0 terminated but we need to be sure
 		// properly 0 terminated but we need to be sure
 		unsigned int cnt = 0;
 		unsigned int cnt = 0;
 		const char* sz = (const char*)stream->GetPtr();
 		const char* sz = (const char*)stream->GetPtr();
@@ -404,7 +404,7 @@ void Discreet3DSImporter::ParseChunk(const char* name, unsigned int num)
 		}
 		}
 		break;
 		break;
 
 
-	case Discreet3DS::CHUNK_LIGHT:	
+	case Discreet3DS::CHUNK_LIGHT:
 		{
 		{
 		// This starts a new light
 		// This starts a new light
 		aiLight* light = new aiLight();
 		aiLight* light = new aiLight();
@@ -453,7 +453,7 @@ void Discreet3DSImporter::ParseChunk(const char* name, unsigned int num)
 		camera->mLookAt.z = stream->GetF4() - camera->mPosition.z;
 		camera->mLookAt.z = stream->GetF4() - camera->mPosition.z;
 		float len = camera->mLookAt.Length();
 		float len = camera->mLookAt.Length();
 		if (len < 1e-5f) {
 		if (len < 1e-5f) {
-			
+
 			// There are some files with lookat == position. Don't know why or whether it's ok or not.
 			// There are some files with lookat == position. Don't know why or whether it's ok or not.
 			DefaultLogger::get()->error("3DS: Unable to read proper camera look-at vector");
 			DefaultLogger::get()->error("3DS: Unable to read proper camera look-at vector");
 			camera->mLookAt = aiVector3D(0.f,1.f,0.f);
 			camera->mLookAt = aiVector3D(0.f,1.f,0.f);
@@ -461,7 +461,7 @@ void Discreet3DSImporter::ParseChunk(const char* name, unsigned int num)
 		}
 		}
 		else camera->mLookAt /= len;
 		else camera->mLookAt /= len;
 
 
-		// And finally - the camera rotation angle, in counter clockwise direction 
+		// And finally - the camera rotation angle, in counter clockwise direction
 		const float angle =  AI_DEG_TO_RAD( stream->GetF4() );
 		const float angle =  AI_DEG_TO_RAD( stream->GetF4() );
 		aiQuaternion quat(camera->mLookAt,angle);
 		aiQuaternion quat(camera->mLookAt,angle);
 		camera->mUp = quat.GetMatrix() * aiVector3D(0.f,1.f,0.f);
 		camera->mUp = quat.GetMatrix() * aiVector3D(0.f,1.f,0.f);
@@ -472,7 +472,7 @@ void Discreet3DSImporter::ParseChunk(const char* name, unsigned int num)
 			camera->mHorizontalFOV = AI_DEG_TO_RAD(45.f);
 			camera->mHorizontalFOV = AI_DEG_TO_RAD(45.f);
 		}
 		}
 
 
-		// Now check for further subchunks 
+		// Now check for further subchunks
 		if (!bIsPrj) /* fixme */ {
 		if (!bIsPrj) /* fixme */ {
 			ParseCameraChunk();
 			ParseCameraChunk();
 		}}
 		}}
@@ -505,7 +505,7 @@ void Discreet3DSImporter::ParseLightChunk()
 
 
 		// FIX: the falloff angle is just an offset
 		// FIX: the falloff angle is just an offset
 		light->mAngleOuterCone = light->mAngleInnerCone+AI_DEG_TO_RAD( stream->GetF4() );
 		light->mAngleOuterCone = light->mAngleInnerCone+AI_DEG_TO_RAD( stream->GetF4() );
-		break; 
+		break;
 
 
 		// intensity multiplier
 		// intensity multiplier
 	case Discreet3DS::CHUNK_DL_MULTIPLIER:
 	case Discreet3DS::CHUNK_DL_MULTIPLIER:
@@ -521,7 +521,7 @@ void Discreet3DSImporter::ParseLightChunk()
 		break;
 		break;
 
 
 		// light attenuation
 		// light attenuation
-	case Discreet3DS::CHUNK_DL_ATTENUATE: 
+	case Discreet3DS::CHUNK_DL_ATTENUATE:
 		light->mAttenuationLinear = stream->GetF4();
 		light->mAttenuationLinear = stream->GetF4();
 		break;
 		break;
 	};
 	};
@@ -665,7 +665,7 @@ void Discreet3DSImporter::ParseHierarchyChunk(uint16_t parent)
 		while (stream->GetI1())++cnt;
 		while (stream->GetI1())++cnt;
 		std::string name = std::string(sz,cnt);
 		std::string name = std::string(sz,cnt);
 
 
-		// Now find out whether we have this node already (target animation channels 
+		// Now find out whether we have this node already (target animation channels
 		// are stored with a separate object ID)
 		// are stored with a separate object ID)
 		D3DS::Node* pcNode = FindNode(mRootNode,name);
 		D3DS::Node* pcNode = FindNode(mRootNode,name);
 		int instanceNumber = 1;
 		int instanceNumber = 1;
@@ -698,7 +698,7 @@ void Discreet3DSImporter::ParseHierarchyChunk(uint16_t parent)
 
 
 			// add to the parent of the last touched node
 			// add to the parent of the last touched node
 			mCurrentNode->mParent->push_back(pcNode);
 			mCurrentNode->mParent->push_back(pcNode);
-			mLastNodeIndex++;	
+			mLastNodeIndex++;
 		}
 		}
 		else if(hierarchy >= mLastNodeIndex)	{
 		else if(hierarchy >= mLastNodeIndex)	{
 
 
@@ -709,7 +709,7 @@ void Discreet3DSImporter::ParseHierarchyChunk(uint16_t parent)
 		else	{
 		else	{
 			// need to go back to the specified position in the hierarchy.
 			// need to go back to the specified position in the hierarchy.
 			InverseNodeSearch(pcNode,mCurrentNode);
 			InverseNodeSearch(pcNode,mCurrentNode);
-			mLastNodeIndex++;	
+			mLastNodeIndex++;
 		}
 		}
 		// Make this node the current node
 		// Make this node the current node
 		mCurrentNode = pcNode;
 		mCurrentNode = pcNode;
@@ -734,7 +734,7 @@ void Discreet3DSImporter::ParseHierarchyChunk(uint16_t parent)
 
 
 	case Discreet3DS::CHUNK_TRACKPIVOT:
 	case Discreet3DS::CHUNK_TRACKPIVOT:
 
 
-		if ( Discreet3DS::CHUNK_TRACKINFO != parent) 
+		if ( Discreet3DS::CHUNK_TRACKINFO != parent)
 		{
 		{
 			DefaultLogger::get()->warn("3DS: Skipping pivot subchunk for non usual object");
 			DefaultLogger::get()->warn("3DS: Skipping pivot subchunk for non usual object");
 			break;
 			break;
@@ -814,7 +814,7 @@ void Discreet3DSImporter::ParseHierarchyChunk(uint16_t parent)
 			aiFloatKey v;
 			aiFloatKey v;
 			v.mTime = (double)fidx;
 			v.mTime = (double)fidx;
 
 
-			// This is just a single float 
+			// This is just a single float
 			SkipTCBInfo();
 			SkipTCBInfo();
 			v.mValue = stream->GetF4();
 			v.mValue = stream->GetF4();
 
 
@@ -917,7 +917,7 @@ void Discreet3DSImporter::ParseHierarchyChunk(uint16_t parent)
 			// check whether we'll need to sort the keys
 			// check whether we'll need to sort the keys
 			if (!l->empty() && v.mTime <= l->back().mTime)
 			if (!l->empty() && v.mTime <= l->back().mTime)
 				sortKeys = true;
 				sortKeys = true;
-			
+
 			// Remove zero-scalings on singular axes - they've been reported to be there erroneously in some strange files
 			// Remove zero-scalings on singular axes - they've been reported to be there erroneously in some strange files
 			if (!v.mValue.x) v.mValue.x = 1.f;
 			if (!v.mValue.x) v.mValue.x = 1.f;
 			if (!v.mValue.y) v.mValue.y = 1.f;
 			if (!v.mValue.y) v.mValue.y = 1.f;
@@ -950,7 +950,7 @@ void Discreet3DSImporter::ParseFaceChunk()
 	{
 	{
 	case Discreet3DS::CHUNK_SMOOLIST:
 	case Discreet3DS::CHUNK_SMOOLIST:
 		{
 		{
-		// This is the list of smoothing groups - a bitfield for every face. 
+		// This is the list of smoothing groups - a bitfield for every face.
 		// Up to 32 smoothing groups assigned to a single face.
 		// Up to 32 smoothing groups assigned to a single face.
 		unsigned int num = chunkSize/4, m = 0;
 		unsigned int num = chunkSize/4, m = 0;
 		if (num > mMesh.mFaces.size())	{
 		if (num > mMesh.mFaces.size())	{
@@ -1071,7 +1071,7 @@ void Discreet3DSImporter::ParseMeshChunk()
 			stream->IncPtr(2); // skip edge visibility flag
 			stream->IncPtr(2); // skip edge visibility flag
 		}
 		}
 
 
-		// Resize the material array (0xcdcdcdcd marks the default material; so if a face is 
+		// Resize the material array (0xcdcdcdcd marks the default material; so if a face is
 		// not referenced by a material, $$DEFAULT will be assigned to it)
 		// not referenced by a material, $$DEFAULT will be assigned to it)
 		mMesh.mFaceMaterials.resize(mMesh.mFaces.size(),0xcdcdcdcd);
 		mMesh.mFaceMaterials.resize(mMesh.mFaces.size(),0xcdcdcdcd);
 
 
@@ -1314,10 +1314,10 @@ void Discreet3DSImporter::ParseTextureChunk(D3DS::Texture* pcOut)
 		// Get the mapping mode (for both axes)
 		// Get the mapping mode (for both axes)
 		if (iFlags & 0x2u)
 		if (iFlags & 0x2u)
 			pcOut->mMapMode = aiTextureMapMode_Mirror;
 			pcOut->mMapMode = aiTextureMapMode_Mirror;
-		
+
 		else if (iFlags & 0x10u)
 		else if (iFlags & 0x10u)
 			pcOut->mMapMode = aiTextureMapMode_Decal;
 			pcOut->mMapMode = aiTextureMapMode_Decal;
-		
+
 		// wrapping in all remaining cases
 		// wrapping in all remaining cases
 		else pcOut->mMapMode = aiTextureMapMode_Wrap;
 		else pcOut->mMapMode = aiTextureMapMode_Wrap;
 		}
 		}

+ 14 - 14
code/3DSLoader.h

@@ -6,8 +6,8 @@ Open Asset Import Library (assimp)
 Copyright (c) 2006-2015, assimp team
 Copyright (c) 2006-2015, assimp team
 All rights reserved.
 All rights reserved.
 
 
-Redistribution and use of this software in source and binary forms, 
-with or without modification, are permitted provided that the 
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the
 following conditions are met:
 following conditions are met:
 
 
 * Redistributions of source code must retain the above
 * Redistributions of source code must retain the above
@@ -24,16 +24,16 @@ following conditions are met:
   derived from this software without specific prior
   derived from this software without specific prior
   written permission of the assimp team.
   written permission of the assimp team.
 
 
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+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
 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 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 
+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.
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
@@ -73,8 +73,8 @@ public:
 public:
 public:
 
 
 	// -------------------------------------------------------------------
 	// -------------------------------------------------------------------
-	/** Returns whether the class can handle the format of the given file. 
-	 * See BaseImporter::CanRead() for details.	
+	/** Returns whether the class can handle the format of the given file.
+	 * See BaseImporter::CanRead() for details.
 	 */
 	 */
 	bool CanRead( const std::string& pFile, IOSystem* pIOHandler,
 	bool CanRead( const std::string& pFile, IOSystem* pIOHandler,
 		bool checkSig) const;
 		bool checkSig) const;
@@ -95,14 +95,14 @@ protected:
 	const aiImporterDesc* GetInfo () const;
 	const aiImporterDesc* GetInfo () const;
 
 
 	// -------------------------------------------------------------------
 	// -------------------------------------------------------------------
-	/** Imports the given file into the given scene structure. 
+	/** Imports the given file into the given scene structure.
 	 * See BaseImporter::InternReadFile() for details
 	 * See BaseImporter::InternReadFile() for details
 	 */
 	 */
-	void InternReadFile( const std::string& pFile, aiScene* pScene, 
+	void InternReadFile( const std::string& pFile, aiScene* pScene,
 		IOSystem* pIOHandler);
 		IOSystem* pIOHandler);
 
 
 	// -------------------------------------------------------------------
 	// -------------------------------------------------------------------
-	/** Converts a temporary material to the outer representation 
+	/** Converts a temporary material to the outer representation
 	 */
 	 */
 	void ConvertMaterial(D3DS::Material& p_cMat,
 	void ConvertMaterial(D3DS::Material& p_cMat,
 		aiMaterial& p_pcOut);
 		aiMaterial& p_pcOut);

+ 28 - 28
code/ACLoader.cpp

@@ -8,8 +8,8 @@ Copyright (c) 2006-2015, assimp team
 
 
 All rights reserved.
 All rights reserved.
 
 
-Redistribution and use of this software in source and binary forms, 
-with or without modification, are permitted provided that the following 
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the following
 conditions are met:
 conditions are met:
 
 
 * Redistributions of source code must retain the above
 * Redistributions of source code must retain the above
@@ -26,16 +26,16 @@ conditions are met:
   derived from this software without specific prior
   derived from this software without specific prior
   written permission of the assimp team.
   written permission of the assimp team.
 
 
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+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
 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 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 
+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.
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 ---------------------------------------------------------------------------
 ---------------------------------------------------------------------------
 */
 */
@@ -84,7 +84,7 @@ static const aiImporterDesc desc = {
 	{ \
 	{ \
 		DefaultLogger::get()->error("AC3D: Unexpected EOF/EOL"); \
 		DefaultLogger::get()->error("AC3D: Unexpected EOF/EOL"); \
 		continue; \
 		continue; \
-	} 
+	}
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
 // read a string (may be enclosed in double quotation marks). buffer must point to "
 // read a string (may be enclosed in double quotation marks). buffer must point to "
@@ -107,7 +107,7 @@ static const aiImporterDesc desc = {
 
 
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-// read 1 to n floats prefixed with an optional predefined identifier 
+// read 1 to n floats prefixed with an optional predefined identifier
 #define AI_AC_CHECKED_LOAD_FLOAT_ARRAY(name,name_length,num,out) \
 #define AI_AC_CHECKED_LOAD_FLOAT_ARRAY(name,name_length,num,out) \
 	AI_AC_SKIP_TO_NEXT_TOKEN(); \
 	AI_AC_SKIP_TO_NEXT_TOKEN(); \
 	if (name_length) \
 	if (name_length) \
@@ -134,14 +134,14 @@ AC3DImporter::AC3DImporter()
 }
 }
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-// Destructor, private as well 
+// Destructor, private as well
 AC3DImporter::~AC3DImporter()
 AC3DImporter::~AC3DImporter()
 {
 {
 	// nothing to be done here
 	// nothing to be done here
 }
 }
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-// Returns whether the class can handle the format of the given file. 
+// Returns whether the class can handle the format of the given file.
 bool AC3DImporter::CanRead( const std::string& pFile, IOSystem* pIOHandler, bool checkSig) const
 bool AC3DImporter::CanRead( const std::string& pFile, IOSystem* pIOHandler, bool checkSig) const
 {
 {
 	std::string extension = GetExtension(pFile);
 	std::string extension = GetExtension(pFile);
@@ -168,7 +168,7 @@ const aiImporterDesc* AC3DImporter::GetInfo () const
 // Get a pointer to the next line from the file
 // Get a pointer to the next line from the file
 bool AC3DImporter::GetNextLine( )
 bool AC3DImporter::GetNextLine( )
 {
 {
-	SkipLine(&buffer); 
+	SkipLine(&buffer);
 	return SkipSpaces(&buffer);
 	return SkipSpaces(&buffer);
 }
 }
 
 
@@ -309,7 +309,7 @@ void AC3DImporter::LoadObjectSection(std::vector<Object>& objects)
 		else if (TokenMatch(buffer,"numsurf",7))
 		else if (TokenMatch(buffer,"numsurf",7))
 		{
 		{
 			SkipSpaces(&buffer);
 			SkipSpaces(&buffer);
-			
+
 			bool Q3DWorkAround = false;
 			bool Q3DWorkAround = false;
 
 
 			const unsigned int t = strtoul10(buffer,&buffer);
 			const unsigned int t = strtoul10(buffer,&buffer);
@@ -319,7 +319,7 @@ void AC3DImporter::LoadObjectSection(std::vector<Object>& objects)
 				GetNextLine();
 				GetNextLine();
 				if (!TokenMatch(buffer,"SURF",4))
 				if (!TokenMatch(buffer,"SURF",4))
 				{
 				{
-					// FIX: this can occur for some files - Quick 3D for 
+					// FIX: this can occur for some files - Quick 3D for
 					// example writes no surf chunks
 					// example writes no surf chunks
 					if (!Q3DWorkAround)
 					if (!Q3DWorkAround)
 					{
 					{
@@ -335,7 +335,7 @@ void AC3DImporter::LoadObjectSection(std::vector<Object>& objects)
 				obj.surfaces.push_back(Surface());
 				obj.surfaces.push_back(Surface());
 				Surface& surf = obj.surfaces.back();
 				Surface& surf = obj.surfaces.back();
 				surf.flags = strtoul_cppstyle(buffer);
 				surf.flags = strtoul_cppstyle(buffer);
-			
+
 				while (1)
 				while (1)
 				{
 				{
 					if(!GetNextLine())
 					if(!GetNextLine())
@@ -381,7 +381,7 @@ void AC3DImporter::LoadObjectSection(std::vector<Object>& objects)
 							AI_AC_CHECKED_LOAD_FLOAT_ARRAY("",0,2,&entry.second);
 							AI_AC_CHECKED_LOAD_FLOAT_ARRAY("",0,2,&entry.second);
 						}
 						}
 					}
 					}
-					else 
+					else
 					{
 					{
 
 
 						--buffer; // make sure the line is processed a second time
 						--buffer; // make sure the line is processed a second time
@@ -455,8 +455,8 @@ aiNode* AC3DImporter::ConvertObjectSection(Object& object,
 	{
 	{
 		if (!object.surfaces.size() || !object.numRefs)
 		if (!object.surfaces.size() || !object.numRefs)
 		{
 		{
-			/* " An object with 7 vertices (no surfaces, no materials defined). 
-			     This is a good way of getting point data into AC3D. 
+			/* " An object with 7 vertices (no surfaces, no materials defined).
+			     This is a good way of getting point data into AC3D.
 			     The Vertex->create convex-surface/object can be used on these
 			     The Vertex->create convex-surface/object can be used on these
 			     vertices to 'wrap' a 3d shape around them "
 			     vertices to 'wrap' a 3d shape around them "
 				 (http://www.opencity.info/html/ac3dfileformat.html)
 				 (http://www.opencity.info/html/ac3dfileformat.html)
@@ -598,7 +598,7 @@ aiNode* AC3DImporter::ConvertObjectSection(Object& object,
 						const Surface& src = *it;
 						const Surface& src = *it;
 
 
 						// closed polygon
 						// closed polygon
-						unsigned int type = (*it).flags & 0xf; 
+						unsigned int type = (*it).flags & 0xf;
 						if (!type)
 						if (!type)
 						{
 						{
 							aiFace& face = *faces++;
 							aiFace& face = *faces++;
@@ -617,7 +617,7 @@ aiNode* AC3DImporter::ConvertObjectSection(Object& object,
 									*vertices = object.vertices[entry.first] + object.translation;
 									*vertices = object.vertices[entry.first] + object.translation;
 
 
 
 
-									// copy texture coordinates 
+									// copy texture coordinates
 									if (uv)
 									if (uv)
 									{
 									{
 										uv->x =  entry.second.x;
 										uv->x =  entry.second.x;
@@ -629,7 +629,7 @@ aiNode* AC3DImporter::ConvertObjectSection(Object& object,
 						}
 						}
 						else
 						else
 						{
 						{
-							
+
 							it2  = (*it).entries.begin();
 							it2  = (*it).entries.begin();
 
 
 							// either a closed or an unclosed line
 							// either a closed or an unclosed line
@@ -650,8 +650,8 @@ aiNode* AC3DImporter::ConvertObjectSection(Object& object,
 								}
 								}
 								ai_assert((*it2).first < object.vertices.size());
 								ai_assert((*it2).first < object.vertices.size());
 								*vertices++ = object.vertices[(*it2).first];
 								*vertices++ = object.vertices[(*it2).first];
-								
-								// copy texture coordinates 
+
+								// copy texture coordinates
 								if (uv)
 								if (uv)
 								{
 								{
 									uv->x =  (*it2).second.x;
 									uv->x =  (*it2).second.x;
@@ -722,7 +722,7 @@ aiNode* AC3DImporter::ConvertObjectSection(Object& object,
 			break;
 			break;
 
 
 			// there shouldn't be more than one world, but we don't care
 			// there shouldn't be more than one world, but we don't care
-		case Object::World: 
+		case Object::World:
 			node->mName.length = ::sprintf(node->mName.data,"ACWorld_%i",worlds++);
 			node->mName.length = ::sprintf(node->mName.data,"ACWorld_%i",worlds++);
 			break;
 			break;
 		}
 		}
@@ -762,8 +762,8 @@ void AC3DImporter::SetupProperties(const Importer* pImp)
 }
 }
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-// Imports the given file into the given scene structure. 
-void AC3DImporter::InternReadFile( const std::string& pFile, 
+// Imports the given file into the given scene structure.
+void AC3DImporter::InternReadFile( const std::string& pFile,
 	aiScene* pScene, IOSystem* pIOHandler)
 	aiScene* pScene, IOSystem* pIOHandler)
 {
 {
 	boost::scoped_ptr<IOStream> file( pIOHandler->Open( pFile, "rb"));
 	boost::scoped_ptr<IOStream> file( pIOHandler->Open( pFile, "rb"));

+ 16 - 16
code/ACLoader.h

@@ -5,8 +5,8 @@ Open Asset Import Library (assimp)
 Copyright (c) 2006-2015, assimp team
 Copyright (c) 2006-2015, assimp team
 All rights reserved.
 All rights reserved.
 
 
-Redistribution and use of this software in source and binary forms, 
-with or without modification, are permitted provided that the 
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the
 following conditions are met:
 following conditions are met:
 
 
 * Redistributions of source code must retain the above
 * Redistributions of source code must retain the above
@@ -23,16 +23,16 @@ following conditions are met:
   derived from this software without specific prior
   derived from this software without specific prior
   written permission of the assimp team.
   written permission of the assimp team.
 
 
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+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
 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 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 
+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.
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
@@ -129,7 +129,7 @@ public:
 			,	vertices()
 			,	vertices()
 			,	surfaces()
 			,	surfaces()
 			,	numRefs (0)
 			,	numRefs (0)
-			,	subDiv	(0)                
+			,	subDiv	(0)
 		{}
 		{}
 
 
 		// Type description
 		// Type description
@@ -168,7 +168,7 @@ public:
 		// number of indices (= num verts in verbose format)
 		// number of indices (= num verts in verbose format)
 		unsigned int numRefs;
 		unsigned int numRefs;
 
 
-		// number of subdivisions to be performed on the 
+		// number of subdivisions to be performed on the
 		// imported data
 		// imported data
 		unsigned int subDiv;
 		unsigned int subDiv;
 
 
@@ -180,7 +180,7 @@ public:
 public:
 public:
 
 
 	// -------------------------------------------------------------------
 	// -------------------------------------------------------------------
-	/** Returns whether the class can handle the format of the given file. 
+	/** Returns whether the class can handle the format of the given file.
 	 * See BaseImporter::CanRead() for details.
 	 * See BaseImporter::CanRead() for details.
 	 */
 	 */
 	bool CanRead( const std::string& pFile, IOSystem* pIOHandler,
 	bool CanRead( const std::string& pFile, IOSystem* pIOHandler,
@@ -194,9 +194,9 @@ protected:
 	const aiImporterDesc* GetInfo () const;
 	const aiImporterDesc* GetInfo () const;
 
 
 	// -------------------------------------------------------------------
 	// -------------------------------------------------------------------
-	/** Imports the given file into the given scene structure. 
+	/** Imports the given file into the given scene structure.
 	 * See BaseImporter::InternReadFile() for details*/
 	 * See BaseImporter::InternReadFile() for details*/
-	void InternReadFile( const std::string& pFile, aiScene* pScene, 
+	void InternReadFile( const std::string& pFile, aiScene* pScene,
 		IOSystem* pIOHandler);
 		IOSystem* pIOHandler);
 
 
 	// -------------------------------------------------------------------
 	// -------------------------------------------------------------------
@@ -214,7 +214,7 @@ private:
 
 
 	// -------------------------------------------------------------------
 	// -------------------------------------------------------------------
 	/** Load the object section. This method is called recursively to
 	/** Load the object section. This method is called recursively to
-	 *  load subobjects, the method returns after a 'kids 0' was 
+	 *  load subobjects, the method returns after a 'kids 0' was
 	 *  encountered.
 	 *  encountered.
 	 *  @objects List of output objects*/
 	 *  @objects List of output objects*/
 	void LoadObjectSection(std::vector<Object>& objects);
 	void LoadObjectSection(std::vector<Object>& objects);
@@ -248,7 +248,7 @@ private:
 	const char* buffer;
 	const char* buffer;
 
 
 	// Configuration option: if enabled, up to two meshes
 	// Configuration option: if enabled, up to two meshes
-	// are generated per material: those faces who have 
+	// are generated per material: those faces who have
 	// their bf cull flags set are separated.
 	// their bf cull flags set are separated.
 	bool configSplitBFCull;
 	bool configSplitBFCull;
 
 

+ 37 - 37
code/ASELoader.cpp

@@ -7,8 +7,8 @@ Copyright (c) 2006-2015, assimp team
 
 
 All rights reserved.
 All rights reserved.
 
 
-Redistribution and use of this software in source and binary forms, 
-with or without modification, are permitted provided that the following 
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the following
 conditions are met:
 conditions are met:
 
 
 * Redistributions of source code must retain the above
 * Redistributions of source code must retain the above
@@ -25,16 +25,16 @@ conditions are met:
   derived from this software without specific prior
   derived from this software without specific prior
   written permission of the assimp team.
   written permission of the assimp team.
 
 
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+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
 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 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 
+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.
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 ---------------------------------------------------------------------------
 ---------------------------------------------------------------------------
 */
 */
@@ -73,7 +73,7 @@ static const aiImporterDesc desc = {
 	0,
 	0,
 	0,
 	0,
 	0,
 	0,
-	"ase ask" 
+	"ase ask"
 };
 };
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
@@ -83,17 +83,17 @@ ASEImporter::ASEImporter()
 {}
 {}
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-// Destructor, private as well 
+// Destructor, private as well
 ASEImporter::~ASEImporter()
 ASEImporter::~ASEImporter()
 {}
 {}
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-// Returns whether the class can handle the format of the given file. 
+// Returns whether the class can handle the format of the given file.
 bool ASEImporter::CanRead( const std::string& pFile, IOSystem* pIOHandler, bool cs) const
 bool ASEImporter::CanRead( const std::string& pFile, IOSystem* pIOHandler, bool cs) const
 {
 {
-	// check file extension 
+	// check file extension
 	const std::string extension = GetExtension(pFile);
 	const std::string extension = GetExtension(pFile);
-	
+
 	if( extension == "ase" || extension == "ask")
 	if( extension == "ase" || extension == "ask")
 		return true;
 		return true;
 
 
@@ -122,8 +122,8 @@ void ASEImporter::SetupProperties(const Importer* pImp)
 }
 }
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-// Imports the given file into the given scene structure. 
-void ASEImporter::InternReadFile( const std::string& pFile, 
+// Imports the given file into the given scene structure.
+void ASEImporter::InternReadFile( const std::string& pFile,
 	aiScene* pScene, IOSystem* pIOHandler)
 	aiScene* pScene, IOSystem* pIOHandler)
 {
 {
 	boost::scoped_ptr<IOStream> file( pIOHandler->Open( pFile, "rb"));
 	boost::scoped_ptr<IOStream> file( pIOHandler->Open( pFile, "rb"));
@@ -164,7 +164,7 @@ void ASEImporter::InternReadFile( const std::string& pFile,
 
 
 	//------------------------------------------------------------------
 	//------------------------------------------------------------------
 	// Check whether we god at least one mesh. If we did - generate
 	// Check whether we god at least one mesh. If we did - generate
-	// materials and copy meshes. 
+	// materials and copy meshes.
 	// ------------------------------------------------------------------
 	// ------------------------------------------------------------------
 	if ( !mParser->m_vMeshes.empty())	{
 	if ( !mParser->m_vMeshes.empty())	{
 
 
@@ -221,10 +221,10 @@ void ASEImporter::InternReadFile( const std::string& pFile,
 		+ mParser->m_vCameras.size() + mParser->m_vDummies.size());
 		+ mParser->m_vCameras.size() + mParser->m_vDummies.size());
 
 
 	// Lights
 	// Lights
-	for (std::vector<ASE::Light>::iterator it = mParser->m_vLights.begin(), 
+	for (std::vector<ASE::Light>::iterator it = mParser->m_vLights.begin(),
 		 end = mParser->m_vLights.end();it != end; ++it)nodes.push_back(&(*it));
 		 end = mParser->m_vLights.end();it != end; ++it)nodes.push_back(&(*it));
 	// Cameras
 	// Cameras
-	for (std::vector<ASE::Camera>::iterator it = mParser->m_vCameras.begin(), 
+	for (std::vector<ASE::Camera>::iterator it = mParser->m_vCameras.begin(),
 		 end = mParser->m_vCameras.end();it != end; ++it)nodes.push_back(&(*it));
 		 end = mParser->m_vCameras.end();it != end; ++it)nodes.push_back(&(*it));
 	// Meshes
 	// Meshes
 	for (std::vector<ASE::Mesh>::iterator it = mParser->m_vMeshes.begin(),
 	for (std::vector<ASE::Mesh>::iterator it = mParser->m_vMeshes.begin(),
@@ -325,7 +325,7 @@ void ASEImporter::BuildAnimations(const std::vector<BaseNode*>& nodes)
 		pcAnim->mTicksPerSecond = mParser->iFrameSpeed * mParser->iTicksPerFrame;
 		pcAnim->mTicksPerSecond = mParser->iFrameSpeed * mParser->iTicksPerFrame;
 
 
 		iNum = 0;
 		iNum = 0;
-		
+
 		// Now iterate through all meshes and collect all data we can find
 		// Now iterate through all meshes and collect all data we can find
 		for (i =  nodes.begin();i != nodes.end();++i)	{
 		for (i =  nodes.begin();i != nodes.end();++i)	{
 
 
@@ -349,7 +349,7 @@ void ASEImporter::BuildAnimations(const std::vector<BaseNode*>& nodes)
 				}
 				}
 				else helper.SetMainAnimationChannel (&me->mAnim.akeyPositions);
 				else helper.SetMainAnimationChannel (&me->mAnim.akeyPositions);
 				helper.SetTargetAnimationChannel (&me->mTargetAnim.akeyPositions);
 				helper.SetTargetAnimationChannel (&me->mTargetAnim.akeyPositions);
-				
+
 				helper.Process(&me->mTargetAnim.akeyPositions);*/
 				helper.Process(&me->mTargetAnim.akeyPositions);*/
 
 
 				// Allocate the key array and fill it
 				// Allocate the key array and fill it
@@ -383,7 +383,7 @@ void ASEImporter::BuildAnimations(const std::vector<BaseNode*>& nodes)
 
 
 					// --------------------------------------------------------------------
 					// --------------------------------------------------------------------
 					// Rotation keys are offsets to the previous keys.
 					// Rotation keys are offsets to the previous keys.
-					// We have the quaternion representations of all 
+					// We have the quaternion representations of all
 					// of them, so we just need to concatenate all
 					// of them, so we just need to concatenate all
 					// (unit-length) quaternions to get the absolute
 					// (unit-length) quaternions to get the absolute
 					// rotations.
 					// rotations.
@@ -398,7 +398,7 @@ void ASEImporter::BuildAnimations(const std::vector<BaseNode*>& nodes)
 							cur = (a ? cur*q.mValue : q.mValue);
 							cur = (a ? cur*q.mValue : q.mValue);
 							q.mValue = cur.Normalize();
 							q.mValue = cur.Normalize();
 						}
 						}
-						nd->mRotationKeys[a] = q; 
+						nd->mRotationKeys[a] = q;
 
 
 						// need this to get to Assimp quaternion conventions
 						// need this to get to Assimp quaternion conventions
 						nd->mRotationKeys[a].mValue.w *= -1.f;
 						nd->mRotationKeys[a].mValue.w *= -1.f;
@@ -432,7 +432,7 @@ void ASEImporter::BuildCameras()
 
 
 			// copy members
 			// copy members
 			out->mClipPlaneFar  = in.mFar;
 			out->mClipPlaneFar  = in.mFar;
-			out->mClipPlaneNear = (in.mNear ? in.mNear : 0.1f); 
+			out->mClipPlaneNear = (in.mNear ? in.mNear : 0.1f);
 			out->mHorizontalFOV = in.mFOV;
 			out->mHorizontalFOV = in.mFOV;
 
 
 			out->mName.Set(in.mName);
 			out->mName.Set(in.mName);
@@ -452,9 +452,9 @@ void ASEImporter::BuildLights()
 			aiLight* out = pcScene->mLights[i] = new aiLight();
 			aiLight* out = pcScene->mLights[i] = new aiLight();
 			ASE::Light& in = mParser->m_vLights[i];
 			ASE::Light& in = mParser->m_vLights[i];
 
 
-			// The direction is encoded in the transformation matrix of the node. 
-			// In 3DS MAX the light source points into negative Z direction if 
-			// the node transformation is the identity. 
+			// The direction is encoded in the transformation matrix of the node.
+			// In 3DS MAX the light source points into negative Z direction if
+			// the node transformation is the identity.
 			out->mDirection = aiVector3D(0.f,0.f,-1.f);
 			out->mDirection = aiVector3D(0.f,0.f,-1.f);
 
 
 			out->mName.Set(in.mName);
 			out->mName.Set(in.mName);
@@ -511,7 +511,7 @@ void ASEImporter::AddMeshes(const ASE::BaseNode* snode,aiNode* node)
 			if (mesh == snode)	{
 			if (mesh == snode)	{
 				node->mMeshes[p++] = i;
 				node->mMeshes[p++] = i;
 
 
-				// Transform all vertices of the mesh back into their local space -> 
+				// Transform all vertices of the mesh back into their local space ->
 				// at the moment they are pretransformed
 				// at the moment they are pretransformed
 				aiMatrix4x4 m  = mesh->mTransform;
 				aiMatrix4x4 m  = mesh->mTransform;
 				m.Inverse();
 				m.Inverse();
@@ -612,10 +612,10 @@ void ASEImporter::AddNodes (const std::vector<BaseNode*>& nodes,
 
 
 			nd->mParent = node;
 			nd->mParent = node;
 
 
-			// The .Target node is always the first child node 
+			// The .Target node is always the first child node
 			for (unsigned int m = 0; m < node->mNumChildren;++m)
 			for (unsigned int m = 0; m < node->mNumChildren;++m)
-				node->mChildren[m+1] = node->mChildren[m]; 
-		
+				node->mChildren[m+1] = node->mChildren[m];
+
 			node->mChildren[0] = nd;
 			node->mChildren[0] = nd;
 			node->mNumChildren++;
 			node->mNumChildren++;
 
 
@@ -671,7 +671,7 @@ void ASEImporter::BuildNodes(std::vector<BaseNode*>& nodes)	{
 
 
 		// check whether our parent is known
 		// check whether our parent is known
 		bool bKnowParent = false;
 		bool bKnowParent = false;
-		
+
 		// search the list another time, starting *here* and try to find out whether
 		// search the list another time, starting *here* and try to find out whether
 		// there is a node that references *us* as a parent
 		// there is a node that references *us* as a parent
 		for (std::vector<BaseNode*>::const_iterator it2 = nodes.begin();it2 != end; ++it2) {
 		for (std::vector<BaseNode*>::const_iterator it2 = nodes.begin();it2 != end; ++it2) {
@@ -701,7 +701,7 @@ void ASEImporter::BuildNodes(std::vector<BaseNode*>& nodes)	{
 		for (std::vector<const BaseNode*>::/*const_*/iterator i =  aiList.begin();i != aiList.end();++i)	{
 		for (std::vector<const BaseNode*>::/*const_*/iterator i =  aiList.begin();i != aiList.end();++i)	{
 			const ASE::BaseNode* src = *i;
 			const ASE::BaseNode* src = *i;
 
 
-			// The parent is not known, so we can assume that we must add 
+			// The parent is not known, so we can assume that we must add
 			// this node to the root node of the whole scene
 			// this node to the root node of the whole scene
 			aiNode* pcNode = new aiNode();
 			aiNode* pcNode = new aiNode();
 			pcNode->mParent = pcScene->mRootNode;
 			pcNode->mParent = pcScene->mRootNode;
@@ -727,7 +727,7 @@ void ASEImporter::BuildNodes(std::vector<BaseNode*>& nodes)	{
 	if (!pcScene->mRootNode->mNumChildren) {
 	if (!pcScene->mRootNode->mNumChildren) {
 		throw DeadlyImportError("ASE: No nodes loaded. The file is either empty or corrupt");
 		throw DeadlyImportError("ASE: No nodes loaded. The file is either empty or corrupt");
 	}
 	}
-	
+
 	// Now rotate the whole scene 90 degrees around the x axis to convert to internal coordinate system
 	// Now rotate the whole scene 90 degrees around the x axis to convert to internal coordinate system
 	pcScene->mRootNode->mTransformation = aiMatrix4x4(1.f,0.f,0.f,0.f,
 	pcScene->mRootNode->mTransformation = aiMatrix4x4(1.f,0.f,0.f,0.f,
 		0.f,0.f,1.f,0.f,0.f,-1.f,0.f,0.f,0.f,0.f,0.f,1.f);
 		0.f,0.f,1.f,0.f,0.f,-1.f,0.f,0.f,0.f,0.f,0.f,1.f);
@@ -994,7 +994,7 @@ void ASEImporter::ConvertMeshes(ASE::Mesh& mesh, std::vector<aiMesh*>& avOutMesh
 				if (!mesh.mBones.empty())	{
 				if (!mesh.mBones.empty())	{
 					avOutputBones = new std::vector<std::pair<unsigned int, float> >[mesh.mBones.size()];
 					avOutputBones = new std::vector<std::pair<unsigned int, float> >[mesh.mBones.size()];
 				}
 				}
-				
+
 				// allocate enough storage for faces
 				// allocate enough storage for faces
 				p_pcOut->mFaces = new aiFace[p_pcOut->mNumFaces];
 				p_pcOut->mFaces = new aiFace[p_pcOut->mNumFaces];
 
 
@@ -1102,7 +1102,7 @@ void ASEImporter::ConvertMeshes(ASE::Mesh& mesh, std::vector<aiMesh*>& avOutMesh
 	{
 	{
 		// Otherwise we can simply copy the data to one output mesh
 		// Otherwise we can simply copy the data to one output mesh
 		// This codepath needs less memory and uses fast memcpy()s
 		// This codepath needs less memory and uses fast memcpy()s
-		// to do the actual copying. So I think it is worth the 
+		// to do the actual copying. So I think it is worth the
 		// effort here.
 		// effort here.
 
 
 		aiMesh* p_pcOut = new aiMesh();
 		aiMesh* p_pcOut = new aiMesh();
@@ -1167,7 +1167,7 @@ void ASEImporter::ConvertMeshes(ASE::Mesh& mesh, std::vector<aiMesh*>& avOutMesh
 			p_pcOut->mFaces[iFace].mNumIndices = 3;
 			p_pcOut->mFaces[iFace].mNumIndices = 3;
 			p_pcOut->mFaces[iFace].mIndices = new unsigned int[3];
 			p_pcOut->mFaces[iFace].mIndices = new unsigned int[3];
 
 
-			// copy indices 
+			// copy indices
 			p_pcOut->mFaces[iFace].mIndices[0] = mesh.mFaces[iFace].mIndices[0];
 			p_pcOut->mFaces[iFace].mIndices[0] = mesh.mFaces[iFace].mIndices[0];
 			p_pcOut->mFaces[iFace].mIndices[1] = mesh.mFaces[iFace].mIndices[1];
 			p_pcOut->mFaces[iFace].mIndices[1] = mesh.mFaces[iFace].mIndices[1];
 			p_pcOut->mFaces[iFace].mIndices[2] = mesh.mFaces[iFace].mIndices[2];
 			p_pcOut->mFaces[iFace].mIndices[2] = mesh.mFaces[iFace].mIndices[2];

+ 12 - 12
code/ASELoader.h

@@ -5,8 +5,8 @@ Open Asset Import Library (assimp)
 Copyright (c) 2006-2015, assimp team
 Copyright (c) 2006-2015, assimp team
 All rights reserved.
 All rights reserved.
 
 
-Redistribution and use of this software in source and binary forms, 
-with or without modification, are permitted provided that the 
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the
 following conditions are met:
 following conditions are met:
 
 
 * Redistributions of source code must retain the above
 * Redistributions of source code must retain the above
@@ -23,16 +23,16 @@ following conditions are met:
   derived from this software without specific prior
   derived from this software without specific prior
   written permission of the assimp team.
   written permission of the assimp team.
 
 
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+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
 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 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 
+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.
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
@@ -66,8 +66,8 @@ public:
 public:
 public:
 
 
 	// -------------------------------------------------------------------
 	// -------------------------------------------------------------------
-	/** Returns whether the class can handle the format of the given file. 
-	 * See BaseImporter::CanRead() for details.	
+	/** Returns whether the class can handle the format of the given file.
+	 * See BaseImporter::CanRead() for details.
 	 */
 	 */
 	bool CanRead( const std::string& pFile, IOSystem* pIOHandler,
 	bool CanRead( const std::string& pFile, IOSystem* pIOHandler,
 		bool checkSig) const;
 		bool checkSig) const;
@@ -82,7 +82,7 @@ protected:
 
 
 
 
 	// -------------------------------------------------------------------
 	// -------------------------------------------------------------------
-	/** Imports the given file into the given scene structure. 
+	/** Imports the given file into the given scene structure.
 	* See BaseImporter::InternReadFile() for details
 	* See BaseImporter::InternReadFile() for details
 	*/
 	*/
 	void InternReadFile( const std::string& pFile, aiScene* pScene,
 	void InternReadFile( const std::string& pFile, aiScene* pScene,

+ 55 - 55
code/ASEParser.cpp

@@ -7,8 +7,8 @@ Copyright (c) 2006-2015, assimp team
 
 
 All rights reserved.
 All rights reserved.
 
 
-Redistribution and use of this software in source and binary forms, 
-with or without modification, are permitted provided that the following 
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the following
 conditions are met:
 conditions are met:
 
 
 * Redistributions of source code must retain the above
 * Redistributions of source code must retain the above
@@ -25,22 +25,22 @@ conditions are met:
   derived from this software without specific prior
   derived from this software without specific prior
   written permission of the assimp team.
   written permission of the assimp team.
 
 
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+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
 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 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 
+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.
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 ---------------------------------------------------------------------------
 ---------------------------------------------------------------------------
 */
 */
 
 
 /** @file  ASEParser.cpp
 /** @file  ASEParser.cpp
- *  @brief Implementation of the ASE parser class 
+ *  @brief Implementation of the ASE parser class
  */
  */
 
 
 
 
@@ -86,7 +86,7 @@ using namespace Assimp::ASE;
 		++iLineNumber; \
 		++iLineNumber; \
 		bLastWasEndLine = true; \
 		bLastWasEndLine = true; \
 	} else bLastWasEndLine = false; \
 	} else bLastWasEndLine = false; \
-	++filePtr; 
+	++filePtr;
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
 // Handle a nested section in the file. EOF is an error in this case
 // Handle a nested section in the file. EOF is an error in this case
@@ -114,7 +114,7 @@ using namespace Assimp::ASE;
 		++iLineNumber; \
 		++iLineNumber; \
 		bLastWasEndLine = true; \
 		bLastWasEndLine = true; \
 	} else bLastWasEndLine = false; \
 	} else bLastWasEndLine = false; \
-	++filePtr; 
+	++filePtr;
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
 Parser::Parser (const char* szFile, unsigned int fileFormatDefault)
 Parser::Parser (const char* szFile, unsigned int fileFormatDefault)
@@ -229,7 +229,7 @@ bool Parser::SkipSection()
 		}
 		}
 		else if ('\0' == *filePtr)
 		else if ('\0' == *filePtr)
 		{
 		{
-			LogWarning("Unable to parse block: Unexpected EOF, closing bracket \'}\' was expected [#1]");	
+			LogWarning("Unable to parse block: Unexpected EOF, closing bracket \'}\' was expected [#1]");
 			return false;
 			return false;
 		}
 		}
 		else if(IsLineEnd(*filePtr))++iLineNumber;
 		else if(IsLineEnd(*filePtr))++iLineNumber;
@@ -276,50 +276,50 @@ void Parser::Parse()
 			}
 			}
 			// "group" - no implementation yet, in facte
 			// "group" - no implementation yet, in facte
 			// we're just ignoring them for the moment
 			// we're just ignoring them for the moment
-			if (TokenMatch(filePtr,"GROUP",5)) 
+			if (TokenMatch(filePtr,"GROUP",5))
 			{
 			{
 				Parse();
 				Parse();
 				continue;
 				continue;
 			}
 			}
 			// material list
 			// material list
-			if (TokenMatch(filePtr,"MATERIAL_LIST",13)) 
+			if (TokenMatch(filePtr,"MATERIAL_LIST",13))
 			{
 			{
 				ParseLV1MaterialListBlock();
 				ParseLV1MaterialListBlock();
 				continue;
 				continue;
 			}
 			}
 			// geometric object (mesh)
 			// geometric object (mesh)
-			if (TokenMatch(filePtr,"GEOMOBJECT",10)) 
-				
+			if (TokenMatch(filePtr,"GEOMOBJECT",10))
+
 			{
 			{
 				m_vMeshes.push_back(Mesh());
 				m_vMeshes.push_back(Mesh());
 				ParseLV1ObjectBlock(m_vMeshes.back());
 				ParseLV1ObjectBlock(m_vMeshes.back());
 				continue;
 				continue;
 			}
 			}
 			// helper object = dummy in the hierarchy
 			// helper object = dummy in the hierarchy
-			if (TokenMatch(filePtr,"HELPEROBJECT",12)) 
-				
+			if (TokenMatch(filePtr,"HELPEROBJECT",12))
+
 			{
 			{
 				m_vDummies.push_back(Dummy());
 				m_vDummies.push_back(Dummy());
 				ParseLV1ObjectBlock(m_vDummies.back());
 				ParseLV1ObjectBlock(m_vDummies.back());
 				continue;
 				continue;
 			}
 			}
 			// light object
 			// light object
-			if (TokenMatch(filePtr,"LIGHTOBJECT",11)) 
-				
+			if (TokenMatch(filePtr,"LIGHTOBJECT",11))
+
 			{
 			{
 				m_vLights.push_back(Light());
 				m_vLights.push_back(Light());
 				ParseLV1ObjectBlock(m_vLights.back());
 				ParseLV1ObjectBlock(m_vLights.back());
 				continue;
 				continue;
 			}
 			}
 			// camera object
 			// camera object
-			if (TokenMatch(filePtr,"CAMERAOBJECT",12)) 
+			if (TokenMatch(filePtr,"CAMERAOBJECT",12))
 			{
 			{
 				m_vCameras.push_back(Camera());
 				m_vCameras.push_back(Camera());
 				ParseLV1ObjectBlock(m_vCameras.back());
 				ParseLV1ObjectBlock(m_vCameras.back());
 				continue;
 				continue;
 			}
 			}
 			// comment - print it on the console
 			// comment - print it on the console
-			if (TokenMatch(filePtr,"COMMENT",7)) 
+			if (TokenMatch(filePtr,"COMMENT",7))
 			{
 			{
 				std::string out = "<unknown>";
 				std::string out = "<unknown>";
 				ParseString(out,"*COMMENT");
 				ParseString(out,"*COMMENT");
@@ -327,7 +327,7 @@ void Parser::Parse()
 				continue;
 				continue;
 			}
 			}
 			// ASC bone weights
 			// ASC bone weights
-			if (AI_ASE_IS_OLD_FILE_FORMAT() && TokenMatch(filePtr,"MESH_SOFTSKINVERTS",18)) 
+			if (AI_ASE_IS_OLD_FILE_FORMAT() && TokenMatch(filePtr,"MESH_SOFTSKINVERTS",18))
 			{
 			{
 				ParseLV1SoftSkinBlock();
 				ParseLV1SoftSkinBlock();
 			}
 			}
@@ -347,7 +347,7 @@ void Parser::ParseLV1SoftSkinBlock()
 	// nested sections supported and the single elements aren't
 	// nested sections supported and the single elements aren't
 	// marked by keywords starting with an asterisk.
 	// marked by keywords starting with an asterisk.
 
 
-	/** 
+	/**
 	FORMAT BEGIN
 	FORMAT BEGIN
 
 
 	*MESH_SOFTSKINVERTS {
 	*MESH_SOFTSKINVERTS {
@@ -358,7 +358,7 @@ void Parser::ParseLV1SoftSkinBlock()
 		<number of weights>	[for <number of weights> times:] <bone name> <weight>
 		<number of weights>	[for <number of weights> times:] <bone name> <weight>
 	}
 	}
 
 
-	FORMAT END 
+	FORMAT END
 	*/
 	*/
 	// **************************************************************
 	// **************************************************************
 	while (true)
 	while (true)
@@ -433,7 +433,7 @@ void Parser::ParseLV1SoftSkinBlock()
 							// Find the bone in the mesh's list
 							// Find the bone in the mesh's list
 							std::pair<int,float> me;
 							std::pair<int,float> me;
 							me.first = -1;
 							me.first = -1;
-							
+
 							for (unsigned int n = 0; n < curMesh->mBones.size();++n)
 							for (unsigned int n = 0; n < curMesh->mBones.size();++n)
 							{
 							{
 								if (curMesh->mBones[n].mName == bone)
 								if (curMesh->mBones[n].mName == bone)
@@ -471,21 +471,21 @@ void Parser::ParseLV1SceneBlock()
 		if ('*' == *filePtr)
 		if ('*' == *filePtr)
 		{
 		{
 			++filePtr;
 			++filePtr;
-			if (TokenMatch(filePtr,"SCENE_BACKGROUND_STATIC",23)) 
-				
+			if (TokenMatch(filePtr,"SCENE_BACKGROUND_STATIC",23))
+
 			{
 			{
 				// parse a color triple and assume it is really the bg color
 				// parse a color triple and assume it is really the bg color
 				ParseLV4MeshFloatTriple( &m_clrBackground.r );
 				ParseLV4MeshFloatTriple( &m_clrBackground.r );
 				continue;
 				continue;
 			}
 			}
-			if (TokenMatch(filePtr,"SCENE_AMBIENT_STATIC",20)) 
-				
+			if (TokenMatch(filePtr,"SCENE_AMBIENT_STATIC",20))
+
 			{
 			{
 				// parse a color triple and assume it is really the bg color
 				// parse a color triple and assume it is really the bg color
 				ParseLV4MeshFloatTriple( &m_clrAmbient.r );
 				ParseLV4MeshFloatTriple( &m_clrAmbient.r );
 				continue;
 				continue;
 			}
 			}
-			if (TokenMatch(filePtr,"SCENE_FIRSTFRAME",16)) 
+			if (TokenMatch(filePtr,"SCENE_FIRSTFRAME",16))
 			{
 			{
 				ParseLV4MeshLong(iFirstFrame);
 				ParseLV4MeshLong(iFirstFrame);
 				continue;
 				continue;
@@ -495,7 +495,7 @@ void Parser::ParseLV1SceneBlock()
 				ParseLV4MeshLong(iLastFrame);
 				ParseLV4MeshLong(iLastFrame);
 				continue;
 				continue;
 			}
 			}
-			if (TokenMatch(filePtr,"SCENE_FRAMESPEED",16)) 
+			if (TokenMatch(filePtr,"SCENE_FRAMESPEED",16))
 			{
 			{
 				ParseLV4MeshLong(iFrameSpeed);
 				ParseLV4MeshLong(iFrameSpeed);
 				continue;
 				continue;
@@ -709,7 +709,7 @@ void Parser::ParseLV2MaterialBlock(ASE::Material& mat)
 			// submaterial chunks
 			// submaterial chunks
 			if (TokenMatch(filePtr,"SUBMATERIAL",11))
 			if (TokenMatch(filePtr,"SUBMATERIAL",11))
 			{
 			{
-			
+
 				unsigned int iIndex = 0;
 				unsigned int iIndex = 0;
 				ParseLV4MeshLong(iIndex);
 				ParseLV4MeshLong(iIndex);
 
 
@@ -741,7 +741,7 @@ void Parser::ParseLV3MapBlock(Texture& map)
 	// but we need to expect that case ... if the path is
 	// but we need to expect that case ... if the path is
 	// empty the texture won't be used later.
 	// empty the texture won't be used later.
 	// ***********************************************************
 	// ***********************************************************
-	bool parsePath = true; 
+	bool parsePath = true;
 	while (true)
 	while (true)
 	{
 	{
 		if ('*' == *filePtr)
 		if ('*' == *filePtr)
@@ -756,7 +756,7 @@ void Parser::ParseLV3MapBlock(Texture& map)
 				if (temp != "Bitmap" && temp != "Normal Bump")
 				if (temp != "Bitmap" && temp != "Normal Bump")
 				{
 				{
 					DefaultLogger::get()->warn("ASE: Skipping unknown map type: " + temp);
 					DefaultLogger::get()->warn("ASE: Skipping unknown map type: " + temp);
-					parsePath = false; 
+					parsePath = false;
 				}
 				}
 				continue;
 				continue;
 			}
 			}
@@ -844,7 +844,7 @@ bool Parser::ParseString(std::string& out,const char* szName)
 	{
 	{
 		if ('\"' == *sz)break;
 		if ('\"' == *sz)break;
 		else if ('\0' == *sz)
 		else if ('\0' == *sz)
-		{			
+		{
 			sprintf(szBuffer,"Unable to parse %s block: Strings are expected to "
 			sprintf(szBuffer,"Unable to parse %s block: Strings are expected to "
 				"be enclosed in double quotation marks but EOF was reached before "
 				"be enclosed in double quotation marks but EOF was reached before "
 				"a closing quotation mark was encountered",szName);
 				"a closing quotation mark was encountered",szName);
@@ -959,7 +959,7 @@ void Parser::ParseLV1ObjectBlock(ASE::BaseNode& node)
 			{
 			{
 				// mesh data
 				// mesh data
 				// FIX: Older files use MESH_SOFTSKIN
 				// FIX: Older files use MESH_SOFTSKIN
-				if (TokenMatch(filePtr,"MESH" ,4) || 
+				if (TokenMatch(filePtr,"MESH" ,4) ||
 					TokenMatch(filePtr,"MESH_SOFTSKIN",13))
 					TokenMatch(filePtr,"MESH_SOFTSKIN",13))
 				{
 				{
 					ParseLV2MeshBlock((ASE::Mesh&)node);
 					ParseLV2MeshBlock((ASE::Mesh&)node);
@@ -1060,14 +1060,14 @@ void Parser::ParseLV2AnimationBlock(ASE::BaseNode& mesh)
 				if(!ParseString(temp,"*NODE_NAME"))
 				if(!ParseString(temp,"*NODE_NAME"))
 					SkipToNextToken();
 					SkipToNextToken();
 
 
-				// If the name of the node contains .target it 
+				// If the name of the node contains .target it
 				// represents an animated camera or spot light
 				// represents an animated camera or spot light
 				// target.
 				// target.
 				if (std::string::npos != temp.find(".Target"))
 				if (std::string::npos != temp.find(".Target"))
 				{
 				{
 					if  ((mesh.mType != BaseNode::Camera || ((ASE::Camera&)mesh).mCameraType != ASE::Camera::TARGET)  &&
 					if  ((mesh.mType != BaseNode::Camera || ((ASE::Camera&)mesh).mCameraType != ASE::Camera::TARGET)  &&
 						( mesh.mType != BaseNode::Light  || ((ASE::Light&)mesh).mLightType   != ASE::Light::TARGET))
 						( mesh.mType != BaseNode::Light  || ((ASE::Light&)mesh).mLightType   != ASE::Light::TARGET))
-					{   
+					{
 
 
 						DefaultLogger::get()->error("ASE: Found target animation channel "
 						DefaultLogger::get()->error("ASE: Found target animation channel "
 							"but the node is neither a camera nor a spot light");
 							"but the node is neither a camera nor a spot light");
@@ -1176,7 +1176,7 @@ void Parser::ParseLV3PosAnimationBlock(ASE::Animation& anim)
 		if ('*' == *filePtr)
 		if ('*' == *filePtr)
 		{
 		{
 			++filePtr;
 			++filePtr;
-			
+
 			bool b = false;
 			bool b = false;
 
 
 			// For the moment we're just reading the three floats -
 			// For the moment we're just reading the three floats -
@@ -1265,7 +1265,7 @@ void Parser::ParseLV3RotAnimationBlock(ASE::Animation& anim)
 void Parser::ParseLV2NodeTransformBlock(ASE::BaseNode& mesh)
 void Parser::ParseLV2NodeTransformBlock(ASE::BaseNode& mesh)
 {
 {
 	AI_ASE_PARSER_INIT();
 	AI_ASE_PARSER_INIT();
-	int mode   = 0; 
+	int mode   = 0;
 	while (true)
 	while (true)
 	{
 	{
 		if ('*' == *filePtr)
 		if ('*' == *filePtr)
@@ -1304,7 +1304,7 @@ void Parser::ParseLV2NodeTransformBlock(ASE::BaseNode& mesh)
 			}
 			}
 			if (mode)
 			if (mode)
 			{
 			{
-				// fourth row of the transformation matrix - and also the 
+				// fourth row of the transformation matrix - and also the
 				// only information here that is interesting for targets
 				// only information here that is interesting for targets
 				if (TokenMatch(filePtr,"TM_ROW3" ,7))
 				if (TokenMatch(filePtr,"TM_ROW3" ,7))
 				{
 				{
@@ -1491,7 +1491,7 @@ void Parser::ParseLV2MeshBlock(ASE::Mesh& mesh)
 			// mesh animation keyframe. Not supported
 			// mesh animation keyframe. Not supported
 			if (TokenMatch(filePtr,"MESH_ANIMATION" ,14))
 			if (TokenMatch(filePtr,"MESH_ANIMATION" ,14))
 			{
 			{
-				
+
 				LogWarning("Found *MESH_ANIMATION element in ASE/ASK file. "
 				LogWarning("Found *MESH_ANIMATION element in ASE/ASK file. "
 					"Keyframe animation is not supported by Assimp, this element "
 					"Keyframe animation is not supported by Assimp, this element "
 					"will be ignored");
 					"will be ignored");
@@ -1571,7 +1571,7 @@ void Parser::ParseLV4MeshBones(unsigned int iNumBones,ASE::Mesh& mesh)
 						LogWarning("Bone index is out of bounds");
 						LogWarning("Bone index is out of bounds");
 						continue;
 						continue;
 					}
 					}
-					if (!ParseString(mesh.mBones[iIndex].mName,"*MESH_BONE_NAME"))						
+					if (!ParseString(mesh.mBones[iIndex].mName,"*MESH_BONE_NAME"))
 						SkipToNextToken();
 						SkipToNextToken();
 					continue;
 					continue;
 				}
 				}
@@ -1648,7 +1648,7 @@ void Parser::ParseLV3MeshVertexListBlock(
 			// Vertex entry
 			// Vertex entry
 			if (TokenMatch(filePtr,"MESH_VERTEX" ,11))
 			if (TokenMatch(filePtr,"MESH_VERTEX" ,11))
 			{
 			{
-				
+
 				aiVector3D vTemp;
 				aiVector3D vTemp;
 				unsigned int iIndex;
 				unsigned int iIndex;
 				ParseLV4MeshFloatTriple(&vTemp.x,iIndex);
 				ParseLV4MeshFloatTriple(&vTemp.x,iIndex);
@@ -1904,7 +1904,7 @@ void Parser::ParseLV3MeshNormalListBlock(ASE::Mesh& sMesh)
 				ParseLV4MeshFloatTriple(&vNormal.x,index);
 				ParseLV4MeshFloatTriple(&vNormal.x,index);
 				if (faceIdx >=  sMesh.mFaces.size())
 				if (faceIdx >=  sMesh.mFaces.size())
 					continue;
 					continue;
-					
+
 				// Make sure we assign it to the correct face
 				// Make sure we assign it to the correct face
 				const ASE::Face& face = sMesh.mFaces[faceIdx];
 				const ASE::Face& face = sMesh.mFaces[faceIdx];
 				if (index == face.mIndices[0])
 				if (index == face.mIndices[0])
@@ -1943,7 +1943,7 @@ void Parser::ParseLV3MeshNormalListBlock(ASE::Mesh& sMesh)
 }
 }
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
 void Parser::ParseLV4MeshFace(ASE::Face& out)
 void Parser::ParseLV4MeshFace(ASE::Face& out)
-{	
+{
 	// skip spaces and tabs
 	// skip spaces and tabs
 	if(!SkipSpaces(&filePtr))
 	if(!SkipSpaces(&filePtr))
 	{
 	{
@@ -1963,7 +1963,7 @@ void Parser::ParseLV4MeshFace(ASE::Face& out)
 		SkipToNextToken();
 		SkipToNextToken();
 		return;
 		return;
 	}
 	}
-	// FIX: There are some ASE files which haven't got ':' here 
+	// FIX: There are some ASE files which haven't got ':' here
 	if(':' == *filePtr)++filePtr;
 	if(':' == *filePtr)++filePtr;
 
 
 	// Parse all mesh indices
 	// Parse all mesh indices
@@ -1989,7 +1989,7 @@ void Parser::ParseLV4MeshFace(ASE::Face& out)
 		case 'c':
 		case 'c':
 			iIndex = 2;
 			iIndex = 2;
 			break;
 			break;
-		default: 
+		default:
 			LogWarning("Unable to parse *MESH_FACE Element: Unexpected EOL. "
 			LogWarning("Unable to parse *MESH_FACE Element: Unexpected EOL. "
 				"A,B or C expected [#3]");
 				"A,B or C expected [#3]");
 			SkipToNextToken();
 			SkipToNextToken();
@@ -2017,7 +2017,7 @@ void Parser::ParseLV4MeshFace(ASE::Face& out)
 		out.mIndices[iIndex] = strtoul10(filePtr,&filePtr);
 		out.mIndices[iIndex] = strtoul10(filePtr,&filePtr);
 	}
 	}
 
 
-	// now we need to skip the AB, BC, CA blocks. 
+	// now we need to skip the AB, BC, CA blocks.
 	while (true)
 	while (true)
 	{
 	{
 		if ('*' == *filePtr)break;
 		if ('*' == *filePtr)break;
@@ -2039,7 +2039,7 @@ void Parser::ParseLV4MeshFace(ASE::Face& out)
 			SkipToNextToken();
 			SkipToNextToken();
 			return;
 			return;
 		}
 		}
-		
+
 		// Parse smoothing groups until we don't anymore see commas
 		// Parse smoothing groups until we don't anymore see commas
 		// FIX: There needn't always be a value, sad but true
 		// FIX: There needn't always be a value, sad but true
 		while (true)
 		while (true)
@@ -2108,7 +2108,7 @@ void Parser::ParseLV4MeshFloatTriple(float* apOut, unsigned int& rIndexOut)
 
 
 	// parse the index
 	// parse the index
 	ParseLV4MeshLong(rIndexOut);
 	ParseLV4MeshLong(rIndexOut);
-	
+
 	// parse the three others
 	// parse the three others
 	ParseLV4MeshFloatTriple(apOut);
 	ParseLV4MeshFloatTriple(apOut);
 }
 }
@@ -2126,7 +2126,7 @@ void Parser::ParseLV4MeshFloat(float& fOut)
 	// skip spaces and tabs
 	// skip spaces and tabs
 	if(!SkipSpaces(&filePtr))
 	if(!SkipSpaces(&filePtr))
 	{
 	{
-		// LOG 
+		// LOG
 		LogWarning("Unable to parse float: unexpected EOL [#1]");
 		LogWarning("Unable to parse float: unexpected EOL [#1]");
 		fOut = 0.0f;
 		fOut = 0.0f;
 		++iLineNumber;
 		++iLineNumber;
@@ -2141,7 +2141,7 @@ void Parser::ParseLV4MeshLong(unsigned int& iOut)
 	// Skip spaces and tabs
 	// Skip spaces and tabs
 	if(!SkipSpaces(&filePtr))
 	if(!SkipSpaces(&filePtr))
 	{
 	{
-		// LOG 
+		// LOG
 		LogWarning("Unable to parse long: unexpected EOL [#1]");
 		LogWarning("Unable to parse long: unexpected EOL [#1]");
 		iOut = 0;
 		iOut = 0;
 		++iLineNumber;
 		++iLineNumber;

+ 20 - 20
code/ASEParser.h

@@ -5,8 +5,8 @@ Open Asset Import Library (assimp)
 Copyright (c) 2006-2015, assimp team
 Copyright (c) 2006-2015, assimp team
 All rights reserved.
 All rights reserved.
 
 
-Redistribution and use of this software in source and binary forms, 
-with or without modification, are permitted provided that the 
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the
 following conditions are met:
 following conditions are met:
 
 
 * Redistributions of source code must retain the above
 * Redistributions of source code must retain the above
@@ -23,16 +23,16 @@ following conditions are met:
   derived from this software without specific prior
   derived from this software without specific prior
   written permission of the assimp team.
   written permission of the assimp team.
 
 
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+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
 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 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 
+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.
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
@@ -130,7 +130,7 @@ struct Bone
 	Bone()
 	Bone()
 	{
 	{
 		static int iCnt = 0;
 		static int iCnt = 0;
-		
+
 		// Generate a default name for the bone
 		// Generate a default name for the bone
 		char szTemp[128];
 		char szTemp[128];
 		::sprintf(szTemp,"UNNAMED_%i",iCnt++);
 		::sprintf(szTemp,"UNNAMED_%i",iCnt++);
@@ -263,7 +263,7 @@ struct BaseNode
 struct Mesh : public MeshWithSmoothingGroups<ASE::Face>, public BaseNode
 struct Mesh : public MeshWithSmoothingGroups<ASE::Face>, public BaseNode
 {
 {
 	//! Constructor.
 	//! Constructor.
-	Mesh() 
+	Mesh()
 		: BaseNode	(BaseNode::Mesh)
 		: BaseNode	(BaseNode::Mesh)
 		, bSkip		(false)
 		, bSkip		(false)
 	{
 	{
@@ -309,15 +309,15 @@ struct Light : public BaseNode
 		DIRECTIONAL
 		DIRECTIONAL
 	};
 	};
 
 
-	//! Constructor. 
-	Light() 
+	//! Constructor.
+	Light()
 		: BaseNode	 (BaseNode::Light)
 		: BaseNode	 (BaseNode::Light)
 		, mLightType (OMNI)
 		, mLightType (OMNI)
 		, mColor	 (1.f,1.f,1.f)
 		, mColor	 (1.f,1.f,1.f)
 		, mIntensity (1.f) // light is white by default
 		, mIntensity (1.f) // light is white by default
 		, mAngle	 (45.f)
 		, mAngle	 (45.f)
 		, mFalloff	 (0.f)
 		, mFalloff	 (0.f)
-	{	
+	{
 	}
 	}
 
 
 	LightType mLightType;
 	LightType mLightType;
@@ -338,10 +338,10 @@ struct Camera : public BaseNode
 	};
 	};
 
 
 	//! Constructor
 	//! Constructor
-	Camera() 
+	Camera()
 		: BaseNode	  (BaseNode::Camera)
 		: BaseNode	  (BaseNode::Camera)
 		, mFOV        (0.75f)   // in radians
 		, mFOV        (0.75f)   // in radians
-		, mNear       (0.1f) 
+		, mNear       (0.1f)
 		, mFar        (1000.f)  // could be zero
 		, mFar        (1000.f)  // could be zero
 		, mCameraType (FREE)
 		, mCameraType (FREE)
 	{
 	{
@@ -356,7 +356,7 @@ struct Camera : public BaseNode
 struct Dummy : public BaseNode
 struct Dummy : public BaseNode
 {
 {
 	//! Constructor
 	//! Constructor
-	Dummy() 
+	Dummy()
 		: BaseNode	(BaseNode::Dummy)
 		: BaseNode	(BaseNode::Dummy)
 	{
 	{
 	}
 	}
@@ -492,7 +492,7 @@ private:
 		unsigned int iNumFaces,Mesh& mesh, unsigned int iChannel = 0);
 		unsigned int iNumFaces,Mesh& mesh, unsigned int iChannel = 0);
 
 
 	// -------------------------------------------------------------------
 	// -------------------------------------------------------------------
-	//! Parse an additional mapping channel 
+	//! Parse an additional mapping channel
 	//! (specified via *MESH_MAPPINGCHANNEL)
 	//! (specified via *MESH_MAPPINGCHANNEL)
 	//! \param iChannel Channel index to be filled
 	//! \param iChannel Channel index to be filled
 	//! \param mesh Mesh object to be filled
 	//! \param mesh Mesh object to be filled
@@ -571,12 +571,12 @@ private:
 	void ParseLV4MeshLongTriple(unsigned int* apOut);
 	void ParseLV4MeshLongTriple(unsigned int* apOut);
 
 
 	// -------------------------------------------------------------------
 	// -------------------------------------------------------------------
-	//! Parse a single float element 
+	//! Parse a single float element
 	//! \param fOut Output float
 	//! \param fOut Output float
 	void ParseLV4MeshFloat(float& fOut);
 	void ParseLV4MeshFloat(float& fOut);
 
 
 	// -------------------------------------------------------------------
 	// -------------------------------------------------------------------
-	//! Parse a single int element 
+	//! Parse a single int element
 	//! \param iOut Output integer
 	//! \param iOut Output integer
 	void ParseLV4MeshLong(unsigned int& iOut);
 	void ParseLV4MeshLong(unsigned int& iOut);
 
 

+ 19 - 19
code/AssbinExporter.cpp

@@ -5,8 +5,8 @@ Open Asset Import Library (assimp)
 Copyright (c) 2006-2015, assimp team
 Copyright (c) 2006-2015, assimp team
 All rights reserved.
 All rights reserved.
 
 
-Redistribution and use of this software in source and binary forms, 
-with or without modification, are permitted provided that the 
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the
 following conditions are met:
 following conditions are met:
 
 
 * Redistributions of source code must retain the above
 * Redistributions of source code must retain the above
@@ -23,16 +23,16 @@ following conditions are met:
   derived from this software without specific prior
   derived from this software without specific prior
   written permission of the assimp team.
   written permission of the assimp team.
 
 
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+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
 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 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 
+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.
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
@@ -65,7 +65,7 @@ using namespace Assimp;
 
 
 namespace Assimp	{
 namespace Assimp	{
 
 
-template <typename T> 
+template <typename T>
 size_t Write(IOStream * stream, const T& v)
 size_t Write(IOStream * stream, const T& v)
 {
 {
 	return stream->Write( &v, sizeof(T), 1 );
 	return stream->Write( &v, sizeof(T), 1 );
@@ -245,7 +245,7 @@ inline size_t WriteArray(IOStream * stream, const T* in, unsigned int size)
 
 
 	private:
 	private:
 		// -------------------------------------------------------------------
 		// -------------------------------------------------------------------
-		void Grow(size_t need = 0) 
+		void Grow(size_t need = 0)
 		{
 		{
 			size_t new_size = std::max(initial, std::max( need, cur_size+(cur_size>>1) ));
 			size_t new_size = std::max(initial, std::max( need, cur_size+(cur_size>>1) ));
 
 
@@ -262,12 +262,12 @@ inline size_t WriteArray(IOStream * stream, const T* in, unsigned int size)
 
 
 	public:
 	public:
 
 
-		AssbinChunkWriter( IOStream * container, uint32_t magic, size_t initial = 4096) 
+		AssbinChunkWriter( IOStream * container, uint32_t magic, size_t initial = 4096)
 			: buffer(NULL), magic(magic), container(container), cur_size(0), cursor(0), initial(initial)
 			: buffer(NULL), magic(magic), container(container), cur_size(0), cursor(0), initial(initial)
 		{
 		{
 		}
 		}
 
 
-		virtual ~AssbinChunkWriter() 
+		virtual ~AssbinChunkWriter()
 		{
 		{
 			if (container) {
 			if (container) {
 				container->Write( &magic, sizeof(uint32_t), 1 );
 				container->Write( &magic, sizeof(uint32_t), 1 );
@@ -291,7 +291,7 @@ inline size_t WriteArray(IOStream * stream, const T* in, unsigned int size)
 		}
 		}
 
 
 		// -------------------------------------------------------------------
 		// -------------------------------------------------------------------
-		virtual size_t Write(const void* pvBuffer, size_t pSize, size_t pCount) 
+		virtual size_t Write(const void* pvBuffer, size_t pSize, size_t pCount)
 		{
 		{
 			pSize *= pCount;
 			pSize *= pCount;
 			if (cursor + pSize > cur_size) {
 			if (cursor + pSize > cur_size) {
@@ -301,7 +301,7 @@ inline size_t WriteArray(IOStream * stream, const T* in, unsigned int size)
 			memcpy(buffer+cursor, pvBuffer, pSize);
 			memcpy(buffer+cursor, pvBuffer, pSize);
 			cursor += pSize;
 			cursor += pSize;
 
 
-			return pCount; 
+			return pCount;
 		}
 		}
 
 
 	};
 	};
@@ -580,7 +580,7 @@ inline size_t WriteArray(IOStream * stream, const T* in, unsigned int size)
 
 
 			for (unsigned int a = 0; a < anim->mNumChannels;++a) {
 			for (unsigned int a = 0; a < anim->mNumChannels;++a) {
 				const aiNodeAnim* nd = anim->mChannels[a];
 				const aiNodeAnim* nd = anim->mChannels[a];
-				WriteBinaryNodeAnim(&chunk,nd);	
+				WriteBinaryNodeAnim(&chunk,nd);
 			}
 			}
 		}
 		}
 
 
@@ -592,7 +592,7 @@ inline size_t WriteArray(IOStream * stream, const T* in, unsigned int size)
 			Write<aiString>(&chunk,l->mName);
 			Write<aiString>(&chunk,l->mName);
 			Write<unsigned int>(&chunk,l->mType);
 			Write<unsigned int>(&chunk,l->mType);
 
 
-			if (l->mType != aiLightSource_DIRECTIONAL) { 
+			if (l->mType != aiLightSource_DIRECTIONAL) {
 				Write<float>(&chunk,l->mAttenuationConstant);
 				Write<float>(&chunk,l->mAttenuationConstant);
 				Write<float>(&chunk,l->mAttenuationLinear);
 				Write<float>(&chunk,l->mAttenuationLinear);
 				Write<float>(&chunk,l->mAttenuationQuadratic);
 				Write<float>(&chunk,l->mAttenuationQuadratic);
@@ -681,7 +681,7 @@ inline size_t WriteArray(IOStream * stream, const T* in, unsigned int size)
 		}
 		}
 
 
 	public:
 	public:
-		AssbinExport() 
+		AssbinExport()
 			: shortened(false), compressed(false) // temporary settings until properties are introduced for exporters
 			: shortened(false), compressed(false) // temporary settings until properties are introduced for exporters
 		{
 		{
 		}
 		}
@@ -715,7 +715,7 @@ inline size_t WriteArray(IOStream * stream, const T* in, unsigned int size)
 			Write<uint16_t>( out, compressed );
 			Write<uint16_t>( out, compressed );
 			// ==  20 bytes
 			// ==  20 bytes
 
 
-			char buff[256]; 
+			char buff[256];
 			strncpy(buff,pFile,256);
 			strncpy(buff,pFile,256);
 			out->Write(buff,sizeof(char),256);
 			out->Write(buff,sizeof(char),256);
 
 

+ 9 - 9
code/AssbinExporter.h

@@ -5,8 +5,8 @@ Open Asset Import Library (assimp)
 Copyright (c) 2006-2015, assimp team
 Copyright (c) 2006-2015, assimp team
 All rights reserved.
 All rights reserved.
 
 
-Redistribution and use of this software in source and binary forms, 
-with or without modification, are permitted provided that the 
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the
 following conditions are met:
 following conditions are met:
 
 
 * Redistributions of source code must retain the above
 * Redistributions of source code must retain the above
@@ -23,16 +23,16 @@ following conditions are met:
   derived from this software without specific prior
   derived from this software without specific prior
   written permission of the assimp team.
   written permission of the assimp team.
 
 
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+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
 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 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 
+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.
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------

+ 31 - 31
code/AssbinLoader.cpp

@@ -7,8 +7,8 @@ Copyright (c) 2006-2015, assimp team
 
 
 All rights reserved.
 All rights reserved.
 
 
-Redistribution and use of this software in source and binary forms, 
-with or without modification, are permitted provided that the following 
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the following
 conditions are met:
 conditions are met:
 
 
 * Redistributions of source code must retain the above
 * Redistributions of source code must retain the above
@@ -25,16 +25,16 @@ conditions are met:
   derived from this software without specific prior
   derived from this software without specific prior
   written permission of the assimp team.
   written permission of the assimp team.
 
 
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+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
 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 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 
+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.
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 ---------------------------------------------------------------------------
 ---------------------------------------------------------------------------
 */
 */
@@ -74,7 +74,7 @@ static const aiImporterDesc desc = {
 	0,
 	0,
 	0,
 	0,
 	0,
 	0,
-	"assbin" 
+	"assbin"
 };
 };
 
 
 const aiImporterDesc* AssbinImporter::GetInfo() const
 const aiImporterDesc* AssbinImporter::GetInfo() const
@@ -187,7 +187,7 @@ aiQuatKey Read<aiQuatKey>(IOStream * stream)
 
 
 template <typename T>
 template <typename T>
 void ReadArray(IOStream * stream, T * out, unsigned int size)
 void ReadArray(IOStream * stream, T * out, unsigned int size)
-{ 
+{
 	for (unsigned int i=0; i<size; i++) out[i] = Read<T>(stream);
 	for (unsigned int i=0; i<size; i++) out[i] = Read<T>(stream);
 }
 }
 
 
@@ -241,11 +241,11 @@ void AssbinImporter::ReadBinaryBone( IOStream * stream, aiBone* b )
 
 
 	// for the moment we write dumb min/max values for the bones, too.
 	// for the moment we write dumb min/max values for the bones, too.
 	// maybe I'll add a better, hash-like solution later
 	// maybe I'll add a better, hash-like solution later
-	if (shortened) 
+	if (shortened)
 	{
 	{
 		ReadBounds(stream,b->mWeights,b->mNumWeights);
 		ReadBounds(stream,b->mWeights,b->mNumWeights);
 	} // else write as usual
 	} // else write as usual
-	else 
+	else
 	{
 	{
 		b->mWeights = new aiVertexWeight[b->mNumWeights];
 		b->mWeights = new aiVertexWeight[b->mNumWeights];
 		ReadArray<aiVertexWeight>(stream,b->mWeights,b->mNumWeights);
 		ReadArray<aiVertexWeight>(stream,b->mWeights,b->mNumWeights);
@@ -268,35 +268,35 @@ void AssbinImporter::ReadBinaryMesh( IOStream * stream, aiMesh* mesh )
 	// first of all, write bits for all existent vertex components
 	// first of all, write bits for all existent vertex components
 	unsigned int c = Read<unsigned int>(stream);
 	unsigned int c = Read<unsigned int>(stream);
 
 
-	if (c & ASSBIN_MESH_HAS_POSITIONS) 
+	if (c & ASSBIN_MESH_HAS_POSITIONS)
 	{
 	{
 		if (shortened) {
 		if (shortened) {
 			ReadBounds(stream,mesh->mVertices,mesh->mNumVertices);
 			ReadBounds(stream,mesh->mVertices,mesh->mNumVertices);
 		} // else write as usual
 		} // else write as usual
-		else 
+		else
 		{
 		{
 			mesh->mVertices = new aiVector3D[mesh->mNumVertices];
 			mesh->mVertices = new aiVector3D[mesh->mNumVertices];
 			ReadArray<aiVector3D>(stream,mesh->mVertices,mesh->mNumVertices);
 			ReadArray<aiVector3D>(stream,mesh->mVertices,mesh->mNumVertices);
 		}
 		}
 	}
 	}
-	if (c & ASSBIN_MESH_HAS_NORMALS) 
+	if (c & ASSBIN_MESH_HAS_NORMALS)
 	{
 	{
 		if (shortened) {
 		if (shortened) {
 			ReadBounds(stream,mesh->mNormals,mesh->mNumVertices);
 			ReadBounds(stream,mesh->mNormals,mesh->mNumVertices);
 		} // else write as usual
 		} // else write as usual
-		else 
+		else
 		{
 		{
 			mesh->mNormals = new aiVector3D[mesh->mNumVertices];
 			mesh->mNormals = new aiVector3D[mesh->mNumVertices];
 			ReadArray<aiVector3D>(stream,mesh->mNormals,mesh->mNumVertices);
 			ReadArray<aiVector3D>(stream,mesh->mNormals,mesh->mNumVertices);
 		}
 		}
 	}
 	}
-	if (c & ASSBIN_MESH_HAS_TANGENTS_AND_BITANGENTS) 
+	if (c & ASSBIN_MESH_HAS_TANGENTS_AND_BITANGENTS)
 	{
 	{
 		if (shortened) {
 		if (shortened) {
 			ReadBounds(stream,mesh->mTangents,mesh->mNumVertices);
 			ReadBounds(stream,mesh->mTangents,mesh->mNumVertices);
 			ReadBounds(stream,mesh->mBitangents,mesh->mNumVertices);
 			ReadBounds(stream,mesh->mBitangents,mesh->mNumVertices);
 		} // else write as usual
 		} // else write as usual
-		else 
+		else
 		{
 		{
 			mesh->mTangents = new aiVector3D[mesh->mNumVertices];
 			mesh->mTangents = new aiVector3D[mesh->mNumVertices];
 			ReadArray<aiVector3D>(stream,mesh->mTangents,mesh->mNumVertices);
 			ReadArray<aiVector3D>(stream,mesh->mTangents,mesh->mNumVertices);
@@ -304,22 +304,22 @@ void AssbinImporter::ReadBinaryMesh( IOStream * stream, aiMesh* mesh )
 			ReadArray<aiVector3D>(stream,mesh->mBitangents,mesh->mNumVertices);
 			ReadArray<aiVector3D>(stream,mesh->mBitangents,mesh->mNumVertices);
 		}
 		}
 	}
 	}
-	for (unsigned int n = 0; n < AI_MAX_NUMBER_OF_COLOR_SETS;++n) 
+	for (unsigned int n = 0; n < AI_MAX_NUMBER_OF_COLOR_SETS;++n)
 	{
 	{
 		if (!(c & ASSBIN_MESH_HAS_COLOR(n)))
 		if (!(c & ASSBIN_MESH_HAS_COLOR(n)))
 			break;
 			break;
 
 
-		if (shortened) 
+		if (shortened)
 		{
 		{
 			ReadBounds(stream,mesh->mColors[n],mesh->mNumVertices);
 			ReadBounds(stream,mesh->mColors[n],mesh->mNumVertices);
 		} // else write as usual
 		} // else write as usual
-		else 
+		else
 		{
 		{
 			mesh->mColors[n] = new aiColor4D[mesh->mNumVertices];
 			mesh->mColors[n] = new aiColor4D[mesh->mNumVertices];
 			ReadArray<aiColor4D>(stream,mesh->mColors[n],mesh->mNumVertices);
 			ReadArray<aiColor4D>(stream,mesh->mColors[n],mesh->mNumVertices);
 		}
 		}
 	}
 	}
-	for (unsigned int n = 0; n < AI_MAX_NUMBER_OF_TEXTURECOORDS;++n) 
+	for (unsigned int n = 0; n < AI_MAX_NUMBER_OF_TEXTURECOORDS;++n)
 	{
 	{
 		if (!(c & ASSBIN_MESH_HAS_TEXCOORD(n)))
 		if (!(c & ASSBIN_MESH_HAS_TEXCOORD(n)))
 			break;
 			break;
@@ -330,7 +330,7 @@ void AssbinImporter::ReadBinaryMesh( IOStream * stream, aiMesh* mesh )
 		if (shortened) {
 		if (shortened) {
 			ReadBounds(stream,mesh->mTextureCoords[n],mesh->mNumVertices);
 			ReadBounds(stream,mesh->mTextureCoords[n],mesh->mNumVertices);
 		} // else write as usual
 		} // else write as usual
-		else 
+		else
 		{
 		{
 			mesh->mTextureCoords[n] = new aiVector3D[mesh->mNumVertices];
 			mesh->mTextureCoords[n] = new aiVector3D[mesh->mNumVertices];
 			ReadArray<aiVector3D>(stream,mesh->mTextureCoords[n],mesh->mNumVertices);
 			ReadArray<aiVector3D>(stream,mesh->mTextureCoords[n],mesh->mNumVertices);
@@ -356,11 +356,11 @@ void AssbinImporter::ReadBinaryMesh( IOStream * stream, aiMesh* mesh )
 			f.mIndices = new unsigned int[f.mNumIndices];
 			f.mIndices = new unsigned int[f.mNumIndices];
 
 
 			for (unsigned int a = 0; a < f.mNumIndices;++a) {
 			for (unsigned int a = 0; a < f.mNumIndices;++a) {
-				if (mesh->mNumVertices < (1u<<16)) 
+				if (mesh->mNumVertices < (1u<<16))
 				{
 				{
 					f.mIndices[a] = Read<uint16_t>(stream);
 					f.mIndices[a] = Read<uint16_t>(stream);
 				}
 				}
-				else 
+				else
 				{
 				{
 					f.mIndices[a] = Read<unsigned int>(stream);
 					f.mIndices[a] = Read<unsigned int>(stream);
 				}
 				}
@@ -404,7 +404,7 @@ void AssbinImporter::ReadBinaryMaterial(IOStream * stream, aiMaterial* mat)
 	mat->mNumAllocated = mat->mNumProperties = Read<unsigned int>(stream);
 	mat->mNumAllocated = mat->mNumProperties = Read<unsigned int>(stream);
 	if (mat->mNumProperties)
 	if (mat->mNumProperties)
 	{
 	{
-		if (mat->mProperties) 
+		if (mat->mProperties)
 		{
 		{
 			delete[] mat->mProperties;
 			delete[] mat->mProperties;
 		}
 		}
@@ -445,7 +445,7 @@ void AssbinImporter::ReadBinaryNodeAnim(IOStream * stream, aiNodeAnim* nd)
 			ReadBounds(stream,nd->mRotationKeys,nd->mNumRotationKeys);
 			ReadBounds(stream,nd->mRotationKeys,nd->mNumRotationKeys);
 
 
 		} // else write as usual
 		} // else write as usual
-		else 
+		else
 		{
 		{
 			nd->mRotationKeys = new aiQuatKey[nd->mNumRotationKeys];
 			nd->mRotationKeys = new aiQuatKey[nd->mNumRotationKeys];
 			ReadArray<aiQuatKey>(stream,nd->mRotationKeys,nd->mNumRotationKeys);
 			ReadArray<aiQuatKey>(stream,nd->mRotationKeys,nd->mNumRotationKeys);
@@ -456,7 +456,7 @@ void AssbinImporter::ReadBinaryNodeAnim(IOStream * stream, aiNodeAnim* nd)
 			ReadBounds(stream,nd->mScalingKeys,nd->mNumScalingKeys);
 			ReadBounds(stream,nd->mScalingKeys,nd->mNumScalingKeys);
 
 
 		} // else write as usual
 		} // else write as usual
-		else 
+		else
 		{
 		{
 			nd->mScalingKeys = new aiVectorKey[nd->mNumScalingKeys];
 			nd->mScalingKeys = new aiVectorKey[nd->mNumScalingKeys];
 			ReadArray<aiVectorKey>(stream,nd->mScalingKeys,nd->mNumScalingKeys);
 			ReadArray<aiVectorKey>(stream,nd->mScalingKeys,nd->mNumScalingKeys);
@@ -520,7 +520,7 @@ void AssbinImporter::ReadBinaryLight( IOStream * stream, aiLight* l )
 	l->mName = Read<aiString>(stream);
 	l->mName = Read<aiString>(stream);
 	l->mType = (aiLightSourceType)Read<unsigned int>(stream);
 	l->mType = (aiLightSourceType)Read<unsigned int>(stream);
 
 
-	if (l->mType != aiLightSource_DIRECTIONAL) { 
+	if (l->mType != aiLightSource_DIRECTIONAL) {
 		l->mAttenuationConstant = Read<float>(stream);
 		l->mAttenuationConstant = Read<float>(stream);
 		l->mAttenuationLinear = Read<float>(stream);
 		l->mAttenuationLinear = Read<float>(stream);
 		l->mAttenuationQuadratic = Read<float>(stream);
 		l->mAttenuationQuadratic = Read<float>(stream);
@@ -680,7 +680,7 @@ void AssbinImporter::InternReadFile( const std::string& pFile, aiScene* pScene,
 	{
 	{
 		ReadBinaryScene(stream,pScene);
 		ReadBinaryScene(stream,pScene);
 	}
 	}
-	
+
 	pIOHandler->Close(stream);
 	pIOHandler->Close(stream);
 }
 }
 
 

+ 15 - 15
code/AssbinLoader.h

@@ -6,8 +6,8 @@ Open Asset Import Library (assimp)
 Copyright (c) 2006-2015, assimp team
 Copyright (c) 2006-2015, assimp team
 All rights reserved.
 All rights reserved.
 
 
-Redistribution and use of this software in source and binary forms, 
-with or without modification, are permitted provided that the 
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the
 following conditions are met:
 following conditions are met:
 
 
 * Redistributions of source code must retain the above
 * Redistributions of source code must retain the above
@@ -24,16 +24,16 @@ following conditions are met:
   derived from this software without specific prior
   derived from this software without specific prior
   written permission of the assimp team.
   written permission of the assimp team.
 
 
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+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
 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 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 
+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.
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
@@ -74,15 +74,15 @@ private:
 protected:
 protected:
 
 
 public:
 public:
-  virtual bool CanRead( 
-    const std::string& pFile, 
-    IOSystem* pIOHandler, 
+  virtual bool CanRead(
+    const std::string& pFile,
+    IOSystem* pIOHandler,
     bool checkSig
     bool checkSig
     ) const;
     ) const;
   virtual const aiImporterDesc* GetInfo() const;
   virtual const aiImporterDesc* GetInfo() const;
-  virtual void InternReadFile( 
-    const std::string& pFile, 
-    aiScene* pScene, 
+  virtual void InternReadFile(
+    const std::string& pFile,
+    aiScene* pScene,
     IOSystem* pIOHandler
     IOSystem* pIOHandler
     );
     );
   void ReadBinaryScene( IOStream * stream, aiScene* pScene );
   void ReadBinaryScene( IOStream * stream, aiScene* pScene );

+ 30 - 30
code/Assimp.cpp

@@ -7,8 +7,8 @@ Copyright (c) 2006-2015, assimp team
 
 
 All rights reserved.
 All rights reserved.
 
 
-Redistribution and use of this software in source and binary forms, 
-with or without modification, are permitted provided that the following 
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the following
 conditions are met:
 conditions are met:
 
 
 * Redistributions of source code must retain the above
 * Redistributions of source code must retain the above
@@ -25,16 +25,16 @@ conditions are met:
   derived from this software without specific prior
   derived from this software without specific prior
   written permission of the assimp team.
   written permission of the assimp team.
 
 
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+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
 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 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 
+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.
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 ---------------------------------------------------------------------------
 ---------------------------------------------------------------------------
 */
 */
@@ -110,7 +110,7 @@ static boost::mutex gLogStreamMutex;
 class LogToCallbackRedirector : public LogStream
 class LogToCallbackRedirector : public LogStream
 {
 {
 public:
 public:
-	LogToCallbackRedirector(const aiLogStream& s) 
+	LogToCallbackRedirector(const aiLogStream& s)
 		: stream (s)	{
 		: stream (s)	{
 			ai_assert(NULL != s.callback);
 			ai_assert(NULL != s.callback);
 	}
 	}
@@ -121,10 +121,10 @@ public:
 #endif
 #endif
 		// (HACK) Check whether the 'stream.user' pointer points to a
 		// (HACK) Check whether the 'stream.user' pointer points to a
 		// custom LogStream allocated by #aiGetPredefinedLogStream.
 		// custom LogStream allocated by #aiGetPredefinedLogStream.
-		// In this case, we need to delete it, too. Of course, this 
+		// In this case, we need to delete it, too. Of course, this
 		// might cause strange problems, but the chance is quite low.
 		// might cause strange problems, but the chance is quite low.
 
 
-		PredefLogStreamMap::iterator it = std::find(gPredefinedStreams.begin(), 
+		PredefLogStreamMap::iterator it = std::find(gPredefinedStreams.begin(),
 			gPredefinedStreams.end(), (Assimp::LogStream*)stream.user);
 			gPredefinedStreams.end(), (Assimp::LogStream*)stream.user);
 
 
 		if (it != gPredefinedStreams.end()) {
 		if (it != gPredefinedStreams.end()) {
@@ -152,7 +152,7 @@ void ReportSceneNotFoundError()
 }
 }
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-// Reads the given file and returns its content. 
+// Reads the given file and returns its content.
 const aiScene* aiImportFile( const char* pFile, unsigned int pFlags)
 const aiScene* aiImportFile( const char* pFile, unsigned int pFlags)
 {
 {
 	return aiImportFileEx(pFile,pFlags,NULL);
 	return aiImportFileEx(pFile,pFlags,NULL);
@@ -165,7 +165,7 @@ const aiScene* aiImportFileEx( const char* pFile, unsigned int pFlags,  aiFileIO
 }
 }
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-const aiScene* aiImportFileExWithProperties( const char* pFile, unsigned int pFlags, 
+const aiScene* aiImportFileExWithProperties( const char* pFile, unsigned int pFlags,
 	aiFileIO* pFS,
 	aiFileIO* pFS,
 	const aiPropertyStore* props)
 	const aiPropertyStore* props)
 {
 {
@@ -198,7 +198,7 @@ const aiScene* aiImportFileExWithProperties( const char* pFile, unsigned int pFl
 	if( scene)	{
 	if( scene)	{
 		ScenePrivateData* priv = const_cast<ScenePrivateData*>( ScenePriv(scene) );
 		ScenePrivateData* priv = const_cast<ScenePrivateData*>( ScenePriv(scene) );
 		priv->mOrigImporter = imp;
 		priv->mOrigImporter = imp;
-	} 
+	}
 	else	{
 	else	{
 		// if failed, extract error code and destroy the import
 		// if failed, extract error code and destroy the import
 		gLastErrorString = imp->GetErrorString();
 		gLastErrorString = imp->GetErrorString();
@@ -211,7 +211,7 @@ const aiScene* aiImportFileExWithProperties( const char* pFile, unsigned int pFl
 }
 }
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-const aiScene* aiImportFileFromMemory( 
+const aiScene* aiImportFileFromMemory(
 	const char* pBuffer,
 	const char* pBuffer,
 	unsigned int pLength,
 	unsigned int pLength,
 	unsigned int pFlags,
 	unsigned int pFlags,
@@ -221,7 +221,7 @@ const aiScene* aiImportFileFromMemory(
 }
 }
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-const aiScene* aiImportFileFromMemoryWithProperties( 
+const aiScene* aiImportFileFromMemoryWithProperties(
 	const char* pBuffer,
 	const char* pBuffer,
 	unsigned int pLength,
 	unsigned int pLength,
 	unsigned int pFlags,
 	unsigned int pFlags,
@@ -253,7 +253,7 @@ const aiScene* aiImportFileFromMemoryWithProperties(
 	if( scene)	{
 	if( scene)	{
 		 ScenePrivateData* priv = const_cast<ScenePrivateData*>( ScenePriv(scene) );
 		 ScenePrivateData* priv = const_cast<ScenePrivateData*>( ScenePriv(scene) );
 		 priv->mOrigImporter = imp;
 		 priv->mOrigImporter = imp;
-	} 
+	}
 	else	{
 	else	{
 		// if failed, extract error code and destroy the import
 		// if failed, extract error code and destroy the import
 		gLastErrorString = imp->GetErrorString();
 		gLastErrorString = imp->GetErrorString();
@@ -265,7 +265,7 @@ const aiScene* aiImportFileFromMemoryWithProperties(
 }
 }
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-// Releases all resources associated with the given import process. 
+// Releases all resources associated with the given import process.
 void aiReleaseImport( const aiScene* pScene)
 void aiReleaseImport( const aiScene* pScene)
 {
 {
 	if (!pScene) {
 	if (!pScene) {
@@ -273,7 +273,7 @@ void aiReleaseImport( const aiScene* pScene)
 	}
 	}
 
 
 	ASSIMP_BEGIN_EXCEPTION_REGION();
 	ASSIMP_BEGIN_EXCEPTION_REGION();
-	
+
 	// find the importer associated with this data
 	// find the importer associated with this data
 	const ScenePrivateData* priv = ScenePriv(pScene);
 	const ScenePrivateData* priv = ScenePriv(pScene);
 	if( !priv || !priv->mOrigImporter)	{
 	if( !priv || !priv->mOrigImporter)	{
@@ -286,7 +286,7 @@ void aiReleaseImport( const aiScene* pScene)
 		Importer* importer = priv->mOrigImporter;
 		Importer* importer = priv->mOrigImporter;
 		delete importer;
 		delete importer;
 	}
 	}
-	
+
 	ASSIMP_END_EXCEPTION_REGION(void);
 	ASSIMP_END_EXCEPTION_REGION(void);
 }
 }
 
 
@@ -295,7 +295,7 @@ ASSIMP_API const aiScene* aiApplyPostProcessing(const aiScene* pScene,
 	unsigned int pFlags)
 	unsigned int pFlags)
 {
 {
 	const aiScene* sc = NULL;
 	const aiScene* sc = NULL;
-	
+
 
 
 	ASSIMP_BEGIN_EXCEPTION_REGION();
 	ASSIMP_BEGIN_EXCEPTION_REGION();
 
 
@@ -417,7 +417,7 @@ ASSIMP_API void aiEnableVerboseLogging(aiBool d)
 }
 }
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-// Returns the error text of the last failed import process. 
+// Returns the error text of the last failed import process.
 const char* aiGetErrorString()
 const char* aiGetErrorString()
 {
 {
 	return gLastErrorString.c_str();
 	return gLastErrorString.c_str();
@@ -439,14 +439,14 @@ size_t aiGetImportFormatCount(void)
 
 
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-// Returns the error text of the last failed import process. 
+// Returns the error text of the last failed import process.
 aiBool aiIsExtensionSupported(const char* szExtension)
 aiBool aiIsExtensionSupported(const char* szExtension)
 {
 {
 	ai_assert(NULL != szExtension);
 	ai_assert(NULL != szExtension);
 	aiBool candoit=AI_FALSE;
 	aiBool candoit=AI_FALSE;
 	ASSIMP_BEGIN_EXCEPTION_REGION();
 	ASSIMP_BEGIN_EXCEPTION_REGION();
 
 
-	// FIXME: no need to create a temporary Importer instance just for that .. 
+	// FIXME: no need to create a temporary Importer instance just for that ..
 	Assimp::Importer tmp;
 	Assimp::Importer tmp;
 	candoit = tmp.IsExtensionSupported(std::string(szExtension)) ? AI_TRUE : AI_FALSE;
 	candoit = tmp.IsExtensionSupported(std::string(szExtension)) ? AI_TRUE : AI_FALSE;
 
 
@@ -461,7 +461,7 @@ void aiGetExtensionList(aiString* szOut)
 	ai_assert(NULL != szOut);
 	ai_assert(NULL != szOut);
 	ASSIMP_BEGIN_EXCEPTION_REGION();
 	ASSIMP_BEGIN_EXCEPTION_REGION();
 
 
-	// FIXME: no need to create a temporary Importer instance just for that .. 
+	// FIXME: no need to create a temporary Importer instance just for that ..
 	Assimp::Importer tmp;
 	Assimp::Importer tmp;
 	tmp.GetExtensionList(*szOut);
 	tmp.GetExtensionList(*szOut);
 
 
@@ -582,7 +582,7 @@ ASSIMP_API void aiTransposeMatrix4(aiMatrix4x4* mat)
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
 // Vector transformation
 // Vector transformation
-ASSIMP_API void aiTransformVecByMatrix3(aiVector3D* vec, 
+ASSIMP_API void aiTransformVecByMatrix3(aiVector3D* vec,
 	const aiMatrix3x3* mat)
 	const aiMatrix3x3* mat)
 {
 {
 	ai_assert(NULL != mat && NULL != vec);
 	ai_assert(NULL != mat && NULL != vec);
@@ -590,7 +590,7 @@ ASSIMP_API void aiTransformVecByMatrix3(aiVector3D* vec,
 }
 }
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-ASSIMP_API void aiTransformVecByMatrix4(aiVector3D* vec, 
+ASSIMP_API void aiTransformVecByMatrix4(aiVector3D* vec,
 	const aiMatrix4x4* mat)
 	const aiMatrix4x4* mat)
 {
 {
 	ai_assert(NULL != mat && NULL != vec);
 	ai_assert(NULL != mat && NULL != vec);
@@ -600,7 +600,7 @@ ASSIMP_API void aiTransformVecByMatrix4(aiVector3D* vec,
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
 // Matrix multiplication
 // Matrix multiplication
 ASSIMP_API void aiMultiplyMatrix4(
 ASSIMP_API void aiMultiplyMatrix4(
-	aiMatrix4x4* dst, 
+	aiMatrix4x4* dst,
 	const aiMatrix4x4* src)
 	const aiMatrix4x4* src)
 {
 {
 	ai_assert(NULL != dst && NULL != src);
 	ai_assert(NULL != dst && NULL != src);
@@ -609,7 +609,7 @@ ASSIMP_API void aiMultiplyMatrix4(
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
 ASSIMP_API void aiMultiplyMatrix3(
 ASSIMP_API void aiMultiplyMatrix3(
-	aiMatrix3x3* dst, 
+	aiMatrix3x3* dst,
 	const aiMatrix3x3* src)
 	const aiMatrix3x3* src)
 {
 {
 	ai_assert(NULL != dst && NULL != src);
 	ai_assert(NULL != dst && NULL != src);

+ 9 - 9
code/AssimpCExport.cpp

@@ -7,8 +7,8 @@ Copyright (c) 2006-2015, assimp team
 
 
 All rights reserved.
 All rights reserved.
 
 
-Redistribution and use of this software in source and binary forms, 
-with or without modification, are permitted provided that the following 
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the following
 conditions are met:
 conditions are met:
 
 
 * Redistributions of source code must retain the above
 * Redistributions of source code must retain the above
@@ -25,16 +25,16 @@ conditions are met:
   derived from this software without specific prior
   derived from this software without specific prior
   written permission of the assimp team.
   written permission of the assimp team.
 
 
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+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
 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 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 
+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.
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 ---------------------------------------------------------------------------
 ---------------------------------------------------------------------------
 */
 */

+ 11 - 11
code/AssxmlExporter.cpp

@@ -5,8 +5,8 @@ Open Asset Import Library (assimp)
 Copyright (c) 2006-2015, assimp team
 Copyright (c) 2006-2015, assimp team
 All rights reserved.
 All rights reserved.
 
 
-Redistribution and use of this software in source and binary forms, 
-with or without modification, are permitted provided that the 
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the
 following conditions are met:
 following conditions are met:
 
 
 * Redistributions of source code must retain the above
 * Redistributions of source code must retain the above
@@ -23,16 +23,16 @@ following conditions are met:
   derived from this software without specific prior
   derived from this software without specific prior
   written permission of the assimp team.
   written permission of the assimp team.
 
 
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+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
 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 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 
+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.
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
@@ -193,7 +193,7 @@ void WriteDump(const aiScene* scene, IOStream* io, bool shortened)
 		"-->"
 		"-->"
 		" \n\n"
 		" \n\n"
 		"<Scene flags=\"%i\" postprocessing=\"%i\">\n",
 		"<Scene flags=\"%i\" postprocessing=\"%i\">\n",
-		
+
 		aiGetVersionMajor(),aiGetVersionMinor(),aiGetVersionRevision(),asctime(p),
 		aiGetVersionMajor(),aiGetVersionMinor(),aiGetVersionRevision(),asctime(p),
 		scene->mFlags,
 		scene->mFlags,
 		0 /*globalImporter->GetEffectivePostProcessing()*/);
 		0 /*globalImporter->GetEffectivePostProcessing()*/);
@@ -578,7 +578,7 @@ void WriteDump(const aiScene* scene, IOStream* io, bool shortened)
 
 
 				ioprintf(io,"\t\t<TextureCoords num=\"%i\" set=\"%i\" num_components=\"%i\"> \n",mesh->mNumVertices,
 				ioprintf(io,"\t\t<TextureCoords num=\"%i\" set=\"%i\" num_components=\"%i\"> \n",mesh->mNumVertices,
 					a,mesh->mNumUVComponents[a]);
 					a,mesh->mNumUVComponents[a]);
-				
+
 				if (!shortened) {
 				if (!shortened) {
 					if (mesh->mNumUVComponents[a] == 3) {
 					if (mesh->mNumUVComponents[a] == 3) {
 						for (unsigned int n = 0; n < mesh->mNumVertices; ++n) {
 						for (unsigned int n = 0; n < mesh->mNumVertices; ++n) {

+ 9 - 9
code/AssxmlExporter.h

@@ -5,8 +5,8 @@ Open Asset Import Library (assimp)
 Copyright (c) 2006-2015, assimp team
 Copyright (c) 2006-2015, assimp team
 All rights reserved.
 All rights reserved.
 
 
-Redistribution and use of this software in source and binary forms, 
-with or without modification, are permitted provided that the 
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the
 following conditions are met:
 following conditions are met:
 
 
 * Redistributions of source code must retain the above
 * Redistributions of source code must retain the above
@@ -23,16 +23,16 @@ following conditions are met:
   derived from this software without specific prior
   derived from this software without specific prior
   written permission of the assimp team.
   written permission of the assimp team.
 
 
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+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
 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 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 
+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.
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------

+ 20 - 20
code/B3DImporter.cpp

@@ -7,8 +7,8 @@ Copyright (c) 2006-2015, assimp team
 
 
 All rights reserved.
 All rights reserved.
 
 
-Redistribution and use of this software in source and binary forms, 
-with or without modification, are permitted provided that the following 
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the following
 conditions are met:
 conditions are met:
 
 
 * Redistributions of source code must retain the above
 * Redistributions of source code must retain the above
@@ -25,16 +25,16 @@ conditions are met:
   derived from this software without specific prior
   derived from this software without specific prior
   written permission of the assimp team.
   written permission of the assimp team.
 
 
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+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
 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 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 
+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.
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 ---------------------------------------------------------------------------
 ---------------------------------------------------------------------------
 */
 */
@@ -70,11 +70,11 @@ static const aiImporterDesc desc = {
 	0,
 	0,
 	0,
 	0,
 	0,
 	0,
-	"b3d" 
+	"b3d"
 };
 };
 
 
 // (fixme, Aramis) quick workaround to get rid of all those signed to unsigned warnings
 // (fixme, Aramis) quick workaround to get rid of all those signed to unsigned warnings
-#ifdef _MSC_VER 
+#ifdef _MSC_VER
 #	pragma warning (disable: 4018)
 #	pragma warning (disable: 4018)
 #endif
 #endif
 
 
@@ -279,12 +279,12 @@ void B3DImporter::ReadBRUS(){
 
 
 		aiMaterial *mat=new aiMaterial;
 		aiMaterial *mat=new aiMaterial;
 		_materials.push_back( mat );
 		_materials.push_back( mat );
-		
+
 		// Name
 		// Name
 		aiString ainame( name );
 		aiString ainame( name );
 		mat->AddProperty( &ainame,AI_MATKEY_NAME );
 		mat->AddProperty( &ainame,AI_MATKEY_NAME );
-		
-		// Diffuse color 
+
+		// Diffuse color
 		mat->AddProperty( &color,1,AI_MATKEY_COLOR_DIFFUSE );
 		mat->AddProperty( &color,1,AI_MATKEY_COLOR_DIFFUSE );
 
 
 		// Opacity
 		// Opacity
@@ -293,16 +293,16 @@ void B3DImporter::ReadBRUS(){
 		// Specular color
 		// Specular color
 		aiColor3D speccolor( shiny,shiny,shiny );
 		aiColor3D speccolor( shiny,shiny,shiny );
 		mat->AddProperty( &speccolor,1,AI_MATKEY_COLOR_SPECULAR );
 		mat->AddProperty( &speccolor,1,AI_MATKEY_COLOR_SPECULAR );
-		
+
 		// Specular power
 		// Specular power
 		float specpow=shiny*128;
 		float specpow=shiny*128;
 		mat->AddProperty( &specpow,1,AI_MATKEY_SHININESS );
 		mat->AddProperty( &specpow,1,AI_MATKEY_SHININESS );
-		
+
 		// Double sided
 		// Double sided
 		if( fx & 0x10 ){
 		if( fx & 0x10 ){
-			int i=1; 
+			int i=1;
 			mat->AddProperty( &i,1,AI_MATKEY_TWOSIDED );
 			mat->AddProperty( &i,1,AI_MATKEY_TWOSIDED );
-		} 		
+		}
 
 
 		//Textures
 		//Textures
 		for( int i=0;i<n_texs;++i ){
 		for( int i=0;i<n_texs;++i ){
@@ -568,7 +568,7 @@ void B3DImporter::ReadBB3D( aiScene *scene ){
 	string t=ReadChunk();
 	string t=ReadChunk();
 	if( t=="BB3D" ){
 	if( t=="BB3D" ){
 		int version=ReadInt();
 		int version=ReadInt();
-		
+
 		if (!DefaultLogger::isNullLogger()) {
 		if (!DefaultLogger::isNullLogger()) {
 			char dmp[128];
 			char dmp[128];
 			sprintf(dmp,"B3D file format version: %i",version);
 			sprintf(dmp,"B3D file format version: %i",version);
@@ -668,7 +668,7 @@ void B3DImporter::ReadBB3D( aiScene *scene ){
 	}
 	}
 	scene->mNumMaterials=_materials.size();
 	scene->mNumMaterials=_materials.size();
 	scene->mMaterials=to_array( _materials );
 	scene->mMaterials=to_array( _materials );
-	
+
 	//meshes
 	//meshes
 	scene->mNumMeshes=_meshes.size();
 	scene->mNumMeshes=_meshes.size();
 	scene->mMeshes=to_array( _meshes );
 	scene->mMeshes=to_array( _meshes );

+ 10 - 10
code/B3DImporter.h

@@ -5,8 +5,8 @@ Open Asset Import Library (assimp)
 Copyright (c) 2006-2015, assimp team
 Copyright (c) 2006-2015, assimp team
 All rights reserved.
 All rights reserved.
 
 
-Redistribution and use of this software in source and binary forms, 
-with or without modification, are permitted provided that the 
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the
 following conditions are met:
 following conditions are met:
 
 
 * Redistributions of source code must retain the above
 * Redistributions of source code must retain the above
@@ -23,16 +23,16 @@ following conditions are met:
   derived from this software without specific prior
   derived from this software without specific prior
   written permission of the assimp team.
   written permission of the assimp team.
 
 
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+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
 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 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 
+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.
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
@@ -112,7 +112,7 @@ private:
 //	unsigned _size;
 //	unsigned _size;
 	std::vector<unsigned char> _buf;
 	std::vector<unsigned char> _buf;
 	std::vector<unsigned> _stack;
 	std::vector<unsigned> _stack;
-	
+
 	std::vector<std::string> _textures;
 	std::vector<std::string> _textures;
 	std::vector<aiMaterial*> _materials;
 	std::vector<aiMaterial*> _materials;
 
 

+ 19 - 19
code/BVHLoader.cpp

@@ -8,8 +8,8 @@ Copyright (c) 2006-2015, assimp team
 
 
 All rights reserved.
 All rights reserved.
 
 
-Redistribution and use of this software in source and binary forms, 
-with or without modification, are permitted provided that the following 
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the following
 conditions are met:
 conditions are met:
 
 
 * Redistributions of source code must retain the above
 * Redistributions of source code must retain the above
@@ -26,16 +26,16 @@ contributors may be used to endorse or promote products
 derived from this software without specific prior
 derived from this software without specific prior
 written permission of the assimp team.
 written permission of the assimp team.
 
 
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+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
 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 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 
+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.
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 ---------------------------------------------------------------------------
 ---------------------------------------------------------------------------
 */
 */
@@ -79,12 +79,12 @@ BVHLoader::~BVHLoader()
 {}
 {}
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-// Returns whether the class can handle the format of the given file. 
+// Returns whether the class can handle the format of the given file.
 bool BVHLoader::CanRead( const std::string& pFile, IOSystem* pIOHandler, bool cs) const
 bool BVHLoader::CanRead( const std::string& pFile, IOSystem* pIOHandler, bool cs) const
 {
 {
-	// check file extension 
+	// check file extension
 	const std::string extension = GetExtension(pFile);
 	const std::string extension = GetExtension(pFile);
-	
+
 	if( extension == "bvh")
 	if( extension == "bvh")
 		return true;
 		return true;
 
 
@@ -109,7 +109,7 @@ const aiImporterDesc* BVHLoader::GetInfo () const
 }
 }
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-// Imports the given file into the given scene structure. 
+// Imports the given file into the given scene structure.
 void BVHLoader::InternReadFile( const std::string& pFile, aiScene* pScene, IOSystem* pIOHandler)
 void BVHLoader::InternReadFile( const std::string& pFile, aiScene* pScene, IOSystem* pIOHandler)
 {
 {
 	mFileName = pFile;
 	mFileName = pFile;
@@ -207,7 +207,7 @@ aiNode* BVHLoader::ReadNode()
 			aiNode* child = ReadNode();
 			aiNode* child = ReadNode();
 			child->mParent = node;
 			child->mParent = node;
 			childNodes.push_back( child);
 			childNodes.push_back( child);
-		} 
+		}
 		else if( token == "End")
 		else if( token == "End")
 		{
 		{
 			// The real symbol is "End Site". Second part comes in a separate token
 			// The real symbol is "End Site". Second part comes in a separate token
@@ -218,7 +218,7 @@ aiNode* BVHLoader::ReadNode()
 			aiNode* child = ReadEndSite( nodeName);
 			aiNode* child = ReadEndSite( nodeName);
 			child->mParent = node;
 			child->mParent = node;
 			childNodes.push_back( child);
 			childNodes.push_back( child);
-		} 
+		}
 		else if( token == "}")
 		else if( token == "}")
 		{
 		{
 			// we're done with that part of the hierarchy
 			// we're done with that part of the hierarchy
@@ -263,7 +263,7 @@ aiNode* BVHLoader::ReadEndSite( const std::string& pParentName)
 		if( token == "OFFSET")
 		if( token == "OFFSET")
 		{
 		{
 			ReadNodeOffset( node);
 			ReadNodeOffset( node);
-		} 
+		}
 		else if( token == "}")
 		else if( token == "}")
 		{
 		{
 			// we're done with the end node
 			// we're done with the end node
@@ -468,7 +468,7 @@ void BVHLoader::CreateAnimation( aiScene* pScene)
 				for( unsigned int channel = 0; channel < 3; ++channel)
 				for( unsigned int channel = 0; channel < 3; ++channel)
 				{
 				{
 					switch( node.mChannels[channel])
 					switch( node.mChannels[channel])
-					{	
+					{
 					case Channel_PositionX: poskey->mValue.x = node.mChannelValues[fr * node.mChannels.size() + channel]; break;
 					case Channel_PositionX: poskey->mValue.x = node.mChannelValues[fr * node.mChannels.size() + channel]; break;
 					case Channel_PositionY: poskey->mValue.y = node.mChannelValues[fr * node.mChannels.size() + channel]; break;
 					case Channel_PositionY: poskey->mValue.y = node.mChannelValues[fr * node.mChannels.size() + channel]; break;
 					case Channel_PositionZ: poskey->mValue.z = node.mChannelValues[fr * node.mChannels.size() + channel]; break;
 					case Channel_PositionZ: poskey->mValue.z = node.mChannelValues[fr * node.mChannels.size() + channel]; break;
@@ -494,7 +494,7 @@ void BVHLoader::CreateAnimation( aiScene* pScene)
 			{
 			{
 				// Offset all further calculations
 				// Offset all further calculations
 				rotOffset = 3;
 				rotOffset = 3;
-			} 
+			}
 
 
 			// Then create the number of rotation keys
 			// Then create the number of rotation keys
 			nodeAnim->mNumRotationKeys = mAnimNumFrames;
 			nodeAnim->mNumRotationKeys = mAnimNumFrames;
@@ -511,7 +511,7 @@ void BVHLoader::CreateAnimation( aiScene* pScene)
 					const float angle = node.mChannelValues[fr * node.mChannels.size() + rotOffset + channel] * float( AI_MATH_PI) / 180.0f;
 					const float angle = node.mChannelValues[fr * node.mChannels.size() + rotOffset + channel] * float( AI_MATH_PI) / 180.0f;
 
 
 					// Compute rotation transformations in the right order
 					// Compute rotation transformations in the right order
-					switch (node.mChannels[rotOffset+channel]) 
+					switch (node.mChannels[rotOffset+channel])
 					{
 					{
 					case Channel_RotationX: aiMatrix4x4::RotationX( angle, temp); rotMatrix *= aiMatrix3x3( temp); break;
 					case Channel_RotationX: aiMatrix4x4::RotationX( angle, temp); rotMatrix *= aiMatrix3x3( temp); break;
 					case Channel_RotationY: aiMatrix4x4::RotationY( angle, temp); rotMatrix *= aiMatrix3x3( temp);	break;
 					case Channel_RotationY: aiMatrix4x4::RotationY( angle, temp); rotMatrix *= aiMatrix3x3( temp);	break;

+ 12 - 12
code/BVHLoader.h

@@ -7,8 +7,8 @@ Open Asset Import Library (assimp)
 Copyright (c) 2006-2015, assimp team
 Copyright (c) 2006-2015, assimp team
 All rights reserved.
 All rights reserved.
 
 
-Redistribution and use of this software in source and binary forms, 
-with or without modification, are permitted provided that the 
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the
 following conditions are met:
 following conditions are met:
 
 
 * Redistributions of source code must retain the above
 * Redistributions of source code must retain the above
@@ -25,16 +25,16 @@ contributors may be used to endorse or promote products
 derived from this software without specific prior
 derived from this software without specific prior
 written permission of the assimp team.
 written permission of the assimp team.
 
 
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+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
 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 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 
+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.
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
@@ -55,7 +55,7 @@ namespace Assimp
 {
 {
 
 
 // --------------------------------------------------------------------------------
 // --------------------------------------------------------------------------------
-/** Loader class to read Motion Capturing data from a .bvh file. 
+/** Loader class to read Motion Capturing data from a .bvh file.
  *
  *
  * This format only contains a hierarchy of joints and a series of keyframes for
  * This format only contains a hierarchy of joints and a series of keyframes for
  * the hierarchy. It contains no actual mesh data, but we generate a dummy mesh
  * the hierarchy. It contains no actual mesh data, but we generate a dummy mesh
@@ -92,7 +92,7 @@ public:
 	~BVHLoader();
 	~BVHLoader();
 
 
 public:
 public:
-	/** Returns whether the class can handle the format of the given file. 
+	/** Returns whether the class can handle the format of the given file.
 	 * See BaseImporter::CanRead() for details.	*/
 	 * See BaseImporter::CanRead() for details.	*/
 	bool CanRead( const std::string& pFile, IOSystem* pIOHandler, bool cs) const;
 	bool CanRead( const std::string& pFile, IOSystem* pIOHandler, bool cs) const;
 
 
@@ -102,7 +102,7 @@ public:
 protected:
 protected:
 
 
 
 
-	/** Imports the given file into the given scene structure. 
+	/** Imports the given file into the given scene structure.
 	 * See BaseImporter::InternReadFile() for details
 	 * See BaseImporter::InternReadFile() for details
 	 */
 	 */
 	void InternReadFile( const std::string& pFile, aiScene* pScene, IOSystem* pIOHandler);
 	void InternReadFile( const std::string& pFile, aiScene* pScene, IOSystem* pIOHandler);

+ 24 - 24
code/BaseImporter.cpp

@@ -7,8 +7,8 @@ Copyright (c) 2006-2015, assimp team
 
 
 All rights reserved.
 All rights reserved.
 
 
-Redistribution and use of this software in source and binary forms, 
-with or without modification, are permitted provided that the following 
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the following
 conditions are met:
 conditions are met:
 
 
 * Redistributions of source code must retain the above
 * Redistributions of source code must retain the above
@@ -25,22 +25,22 @@ conditions are met:
   derived from this software without specific prior
   derived from this software without specific prior
   written permission of the assimp team.
   written permission of the assimp team.
 
 
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+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
 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 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 
+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.
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 ---------------------------------------------------------------------------
 ---------------------------------------------------------------------------
 */
 */
 
 
 /** @file  BaseImporter.cpp
 /** @file  BaseImporter.cpp
- *  @brief Implementation of BaseImporter 
+ *  @brief Implementation of BaseImporter
  */
  */
 
 
 #include "BaseImporter.h"
 #include "BaseImporter.h"
@@ -103,7 +103,7 @@ aiScene* BaseImporter::ReadFile(const Importer* pImp, const std::string& pFile,
 		return NULL;
 		return NULL;
 	}
 	}
 
 
-	// return what we gathered from the import. 
+	// return what we gathered from the import.
 	sc.dismiss();
 	sc.dismiss();
 	return sc;
 	return sc;
 }
 }
@@ -140,7 +140,7 @@ void BaseImporter::GetExtensionList(std::set<std::string>& extensions)
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
 /*static*/ bool BaseImporter::SearchFileHeaderForToken(IOSystem* pIOHandler,
 /*static*/ bool BaseImporter::SearchFileHeaderForToken(IOSystem* pIOHandler,
 	const std::string&	pFile,
 	const std::string&	pFile,
-	const char**		tokens, 
+	const char**		tokens,
 	unsigned int		numTokens,
 	unsigned int		numTokens,
 	unsigned int		searchBytes /* = 200 */,
 	unsigned int		searchBytes /* = 200 */,
 	bool				tokensSol /* false */)
 	bool				tokensSol /* false */)
@@ -200,7 +200,7 @@ void BaseImporter::GetExtensionList(std::set<std::string>& extensions)
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
 // Simple check for file extension
 // Simple check for file extension
-/*static*/ bool BaseImporter::SimpleExtensionCheck (const std::string& pFile, 
+/*static*/ bool BaseImporter::SimpleExtensionCheck (const std::string& pFile,
 	const char* ext0,
 	const char* ext0,
 	const char* ext1,
 	const char* ext1,
 	const char* ext2)
 	const char* ext2)
@@ -210,7 +210,7 @@ void BaseImporter::GetExtensionList(std::set<std::string>& extensions)
 	// no file extension - can't read
 	// no file extension - can't read
 	if( pos == std::string::npos)
 	if( pos == std::string::npos)
 		return false;
 		return false;
-	
+
 	const char* ext_real = & pFile[ pos+1 ];
 	const char* ext_real = & pFile[ pos+1 ];
 	if( !ASSIMP_stricmp(ext_real,ext0) )
 	if( !ASSIMP_stricmp(ext_real,ext0) )
 		return true;
 		return true;
@@ -242,7 +242,7 @@ void BaseImporter::GetExtensionList(std::set<std::string>& extensions)
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
 // Check for magic bytes at the beginning of the file.
 // Check for magic bytes at the beginning of the file.
-/* static */ bool BaseImporter::CheckMagicToken(IOSystem* pIOHandler, const std::string& pFile, 
+/* static */ bool BaseImporter::CheckMagicToken(IOSystem* pIOHandler, const std::string& pFile,
 	const void* _magic, unsigned int num, unsigned int offset, unsigned int size)
 	const void* _magic, unsigned int num, unsigned int offset, unsigned int size)
 {
 {
 	ai_assert(size <= 16 && _magic);
 	ai_assert(size <= 16 && _magic);
@@ -277,7 +277,7 @@ void BaseImporter::GetExtensionList(std::set<std::string>& extensions)
 			// that's just for convinience, the chance that we cause conflicts
 			// that's just for convinience, the chance that we cause conflicts
 			// is quite low and it can save some lines and prevent nasty bugs
 			// is quite low and it can save some lines and prevent nasty bugs
 			if (2 == size) {
 			if (2 == size) {
-				uint16_t rev = *magic_u16; 
+				uint16_t rev = *magic_u16;
 				ByteSwap::Swap(&rev);
 				ByteSwap::Swap(&rev);
 				if (data_u16[0] == *magic_u16 || data_u16[0] == rev) {
 				if (data_u16[0] == *magic_u16 || data_u16[0] == rev) {
 					return true;
 					return true;
@@ -335,13 +335,13 @@ void BaseImporter::ConvertToUTF8(std::vector<char>& data)
 
 
 	// UTF 32 BE with BOM
 	// UTF 32 BE with BOM
 	if(*((uint32_t*)&data.front()) == 0xFFFE0000) {
 	if(*((uint32_t*)&data.front()) == 0xFFFE0000) {
-	
+
 		// swap the endianess ..
 		// swap the endianess ..
 		for(uint32_t* p = (uint32_t*)&data.front(), *end = (uint32_t*)&data.back(); p <= end; ++p) {
 		for(uint32_t* p = (uint32_t*)&data.front(), *end = (uint32_t*)&data.back(); p <= end; ++p) {
 			AI_SWAP4P(p);
 			AI_SWAP4P(p);
 		}
 		}
 	}
 	}
-	
+
 	// UTF 32 LE with BOM
 	// UTF 32 LE with BOM
 	if(*((uint32_t*)&data.front()) == 0x0000FFFE) {
 	if(*((uint32_t*)&data.front()) == 0x0000FFFE) {
 		DefaultLogger::get()->debug("Found UTF-32 BOM ...");
 		DefaultLogger::get()->debug("Found UTF-32 BOM ...");
@@ -358,7 +358,7 @@ void BaseImporter::ConvertToUTF8(std::vector<char>& data)
 
 
 		ReportResult(result);
 		ReportResult(result);
 
 
-		// copy to output buffer. 
+		// copy to output buffer.
 		const size_t outlen = (size_t)(dstart-&output.front());
 		const size_t outlen = (size_t)(dstart-&output.front());
 		data.assign(output.begin(),output.begin()+outlen);
 		data.assign(output.begin(),output.begin()+outlen);
 		return;
 		return;
@@ -366,13 +366,13 @@ void BaseImporter::ConvertToUTF8(std::vector<char>& data)
 
 
 	// UTF 16 BE with BOM
 	// UTF 16 BE with BOM
 	if(*((uint16_t*)&data.front()) == 0xFFFE) {
 	if(*((uint16_t*)&data.front()) == 0xFFFE) {
-	
+
 		// swap the endianess ..
 		// swap the endianess ..
 		for(uint16_t* p = (uint16_t*)&data.front(), *end = (uint16_t*)&data.back(); p <= end; ++p) {
 		for(uint16_t* p = (uint16_t*)&data.front(), *end = (uint16_t*)&data.back(); p <= end; ++p) {
 			ByteSwap::Swap2(p);
 			ByteSwap::Swap2(p);
 		}
 		}
 	}
 	}
-	
+
 	// UTF 16 LE with BOM
 	// UTF 16 LE with BOM
 	if(*((uint16_t*)&data.front()) == 0xFEFF) {
 	if(*((uint16_t*)&data.front()) == 0xFEFF) {
 		DefaultLogger::get()->debug("Found UTF-16 BOM ...");
 		DefaultLogger::get()->debug("Found UTF-16 BOM ...");
@@ -444,8 +444,8 @@ void BaseImporter::TextFileToBuffer(IOStream* stream,
 		throw DeadlyImportError("File is empty");
 		throw DeadlyImportError("File is empty");
 	}
 	}
 
 
-	data.reserve(fileSize+1); 
-	data.resize(fileSize); 
+	data.reserve(fileSize+1);
+	data.resize(fileSize);
 	if(fileSize != stream->Read( &data[0], 1, fileSize)) {
 	if(fileSize != stream->Read( &data[0], 1, fileSize)) {
 		throw DeadlyImportError("File read error");
 		throw DeadlyImportError("File read error");
 	}
 	}
@@ -540,7 +540,7 @@ unsigned int BatchLoader::AddLoadRequest	(const std::string& file,
 	unsigned int steps /*= 0*/, const PropertyMap* map /*= NULL*/)
 	unsigned int steps /*= 0*/, const PropertyMap* map /*= NULL*/)
 {
 {
 	ai_assert(!file.empty());
 	ai_assert(!file.empty());
-	
+
 	// check whether we have this loading request already
 	// check whether we have this loading request already
 	std::list<LoadRequest>::iterator it;
 	std::list<LoadRequest>::iterator it;
 	for (it = data->requests.begin();it != data->requests.end(); ++it)	{
 	for (it = data->requests.begin();it != data->requests.end(); ++it)	{

+ 44 - 44
code/BaseImporter.h

@@ -5,8 +5,8 @@ Open Asset Import Library (assimp)
 Copyright (c) 2006-2015, assimp team
 Copyright (c) 2006-2015, assimp team
 All rights reserved.
 All rights reserved.
 
 
-Redistribution and use of this software in source and binary forms, 
-with or without modification, are permitted provided that the 
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the
 following conditions are met:
 following conditions are met:
 
 
 * Redistributions of source code must retain the above
 * Redistributions of source code must retain the above
@@ -23,16 +23,16 @@ following conditions are met:
   derived from this software without specific prior
   derived from this software without specific prior
   written permission of the assimp team.
   written permission of the assimp team.
 
 
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+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
 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 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 
+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.
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
@@ -76,7 +76,7 @@ struct ScopeGuard
 			delete obj;
 			delete obj;
 		}
 		}
 		obj = NULL;
 		obj = NULL;
-	} 
+	}
 
 
 	T* dismiss() {
 	T* dismiss() {
 		mdismiss=true;
 		mdismiss=true;
@@ -104,13 +104,13 @@ private:
 
 
 
 
 // ---------------------------------------------------------------------------
 // ---------------------------------------------------------------------------
-/** FOR IMPORTER PLUGINS ONLY: The BaseImporter defines a common interface 
+/** FOR IMPORTER PLUGINS ONLY: The BaseImporter defines a common interface
  *  for all importer worker classes.
  *  for all importer worker classes.
  *
  *
- * The interface defines two functions: CanRead() is used to check if the 
- * importer can handle the format of the given file. If an implementation of 
- * this function returns true, the importer then calls ReadFile() which 
- * imports the given file. ReadFile is not overridable, it just calls 
+ * The interface defines two functions: CanRead() is used to check if the
+ * importer can handle the format of the given file. If an implementation of
+ * this function returns true, the importer then calls ReadFile() which
+ * imports the given file. ReadFile is not overridable, it just calls
  * InternReadFile() and catches any ImportErrorException that might occur.
  * InternReadFile() and catches any ImportErrorException that might occur.
  */
  */
 class ASSIMP_API BaseImporter
 class ASSIMP_API BaseImporter
@@ -144,39 +144,39 @@ public:
 	 *   to be able to load files with unknown/not existent file extensions.
 	 *   to be able to load files with unknown/not existent file extensions.
 	 * @return true if the class can read this file, false if not.
 	 * @return true if the class can read this file, false if not.
 	 */
 	 */
-	virtual bool CanRead( 
-		const std::string& pFile, 
-		IOSystem* pIOHandler, 
+	virtual bool CanRead(
+		const std::string& pFile,
+		IOSystem* pIOHandler,
 		bool checkSig
 		bool checkSig
 		) const = 0;
 		) const = 0;
 
 
 	// -------------------------------------------------------------------
 	// -------------------------------------------------------------------
 	/** Imports the given file and returns the imported data.
 	/** Imports the given file and returns the imported data.
-	 * If the import succeeds, ownership of the data is transferred to 
+	 * If the import succeeds, ownership of the data is transferred to
 	 * the caller. If the import fails, NULL is returned. The function
 	 * the caller. If the import fails, NULL is returned. The function
 	 * takes care that any partially constructed data is destroyed
 	 * takes care that any partially constructed data is destroyed
 	 * beforehand.
 	 * beforehand.
 	 *
 	 *
 	 * @param pImp #Importer object hosting this loader.
 	 * @param pImp #Importer object hosting this loader.
-	 * @param pFile Path of the file to be imported. 
+	 * @param pFile Path of the file to be imported.
 	 * @param pIOHandler IO-Handler used to open this and possible other files.
 	 * @param pIOHandler IO-Handler used to open this and possible other files.
-	 * @return The imported data or NULL if failed. If it failed a 
-	 * human-readable error description can be retrieved by calling 
+	 * @return The imported data or NULL if failed. If it failed a
+	 * human-readable error description can be retrieved by calling
 	 * GetErrorText()
 	 * GetErrorText()
 	 *
 	 *
-	 * @note This function is not intended to be overridden. Implement 
-	 * InternReadFile() to do the import. If an exception is thrown somewhere 
+	 * @note This function is not intended to be overridden. Implement
+	 * InternReadFile() to do the import. If an exception is thrown somewhere
 	 * in InternReadFile(), this function will catch it and transform it into
 	 * in InternReadFile(), this function will catch it and transform it into
 	 *  a suitable response to the caller.
 	 *  a suitable response to the caller.
 	 */
 	 */
 	aiScene* ReadFile(
 	aiScene* ReadFile(
-		const Importer* pImp, 
-		const std::string& pFile, 
+		const Importer* pImp,
+		const std::string& pFile,
 		IOSystem* pIOHandler
 		IOSystem* pIOHandler
 		);
 		);
 
 
 	// -------------------------------------------------------------------
 	// -------------------------------------------------------------------
-	/** Returns the error description of the last error that occured. 
+	/** Returns the error description of the last error that occured.
 	 * @return A description of the last error that occured. An empty
 	 * @return A description of the last error that occured. An empty
 	 * string if there was no error.
 	 * string if there was no error.
 	 */
 	 */
@@ -194,9 +194,9 @@ public:
 		const Importer* pImp
 		const Importer* pImp
 		);
 		);
 
 
-	
+
 	// -------------------------------------------------------------------
 	// -------------------------------------------------------------------
-	/** Called by #Importer::GetImporterInfo to get a description of 
+	/** Called by #Importer::GetImporterInfo to get a description of
 	 *  some loader features. Importers must provide this information. */
 	 *  some loader features. Importers must provide this information. */
 	virtual const aiImporterDesc* GetInfo() const = 0;
 	virtual const aiImporterDesc* GetInfo() const = 0;
 
 
@@ -212,10 +212,10 @@ public:
 protected:
 protected:
 
 
 	// -------------------------------------------------------------------
 	// -------------------------------------------------------------------
-	/** Imports the given file into the given scene structure. The 
-	 * function is expected to throw an ImportErrorException if there is 
-	 * an error. If it terminates normally, the data in aiScene is 
-	 * expected to be correct. Override this function to implement the 
+	/** Imports the given file into the given scene structure. The
+	 * function is expected to throw an ImportErrorException if there is
+	 * an error. If it terminates normally, the data in aiScene is
+	 * expected to be correct. Override this function to implement the
 	 * actual importing.
 	 * actual importing.
 	 * <br>
 	 * <br>
 	 *  The output scene must meet the following requirements:<br>
 	 *  The output scene must meet the following requirements:<br>
@@ -240,7 +240,7 @@ protected:
 	 *   default material setting for the file format better than Assimp's
 	 *   default material setting for the file format better than Assimp's
 	 *   generic default material. Note that default materials *should*
 	 *   generic default material. Note that default materials *should*
 	 *   be named AI_DEFAULT_MATERIAL_NAME if they're just color-shaded
 	 *   be named AI_DEFAULT_MATERIAL_NAME if they're just color-shaded
-	 *   or AI_DEFAULT_TEXTURED_MATERIAL_NAME if they define a (dummy) 
+	 *   or AI_DEFAULT_TEXTURED_MATERIAL_NAME if they define a (dummy)
 	 *   texture. </li>
 	 *   texture. </li>
 	 * </ul>
 	 * </ul>
 	 * If the AI_SCENE_FLAGS_INCOMPLETE-Flag is <b>not</b> set:<ul>
 	 * If the AI_SCENE_FLAGS_INCOMPLETE-Flag is <b>not</b> set:<ul>
@@ -255,9 +255,9 @@ protected:
 	 * NULL is not a valid parameter.
 	 * NULL is not a valid parameter.
 	 * @param pIOHandler The IO handler to use for any file access.
 	 * @param pIOHandler The IO handler to use for any file access.
 	 * NULL is not a valid parameter. */
 	 * NULL is not a valid parameter. */
-	virtual void InternReadFile( 
-		const std::string& pFile, 
-		aiScene* pScene, 
+	virtual void InternReadFile(
+		const std::string& pFile,
+		aiScene* pScene,
 		IOSystem* pIOHandler
 		IOSystem* pIOHandler
 		) = 0;
 		) = 0;
 
 
@@ -278,9 +278,9 @@ public: // static utilities
 	 *  @param searchBytes Number of bytes to be searched for the tokens.
 	 *  @param searchBytes Number of bytes to be searched for the tokens.
 	 */
 	 */
 	static bool SearchFileHeaderForToken(
 	static bool SearchFileHeaderForToken(
-		IOSystem* pIOSystem, 
+		IOSystem* pIOSystem,
 		const std::string&	file,
 		const std::string&	file,
-		const char** tokens, 
+		const char** tokens,
 		unsigned int numTokens,
 		unsigned int numTokens,
 		unsigned int searchBytes = 200,
 		unsigned int searchBytes = 200,
 		bool tokensSol = false);
 		bool tokensSol = false);
@@ -294,7 +294,7 @@ public: // static utilities
 	 *  @note Case-insensitive
 	 *  @note Case-insensitive
 	 */
 	 */
 	static bool SimpleExtensionCheck (
 	static bool SimpleExtensionCheck (
-		const std::string& pFile, 
+		const std::string& pFile,
 		const char* ext0,
 		const char* ext0,
 		const char* ext1 = NULL,
 		const char* ext1 = NULL,
 		const char* ext2 = NULL);
 		const char* ext2 = NULL);
@@ -322,8 +322,8 @@ public: // static utilities
 	 *  tokens of size 2,4.
 	 *  tokens of size 2,4.
 	 */
 	 */
 	static bool CheckMagicToken(
 	static bool CheckMagicToken(
-		IOSystem* pIOHandler, 
-		const std::string& pFile, 
+		IOSystem* pIOHandler,
+		const std::string& pFile,
 		const void* magic,
 		const void* magic,
 		unsigned int num,
 		unsigned int num,
 		unsigned int offset = 0,
 		unsigned int offset = 0,
@@ -333,7 +333,7 @@ public: // static utilities
 	/** An utility for all text file loaders. It converts a file to our
 	/** An utility for all text file loaders. It converts a file to our
 	 *   UTF8 character set. Errors are reported, but ignored.
 	 *   UTF8 character set. Errors are reported, but ignored.
 	 *
 	 *
-	 *  @param data File buffer to be converted to UTF8 data. The buffer 
+	 *  @param data File buffer to be converted to UTF8 data. The buffer
 	 *  is resized as appropriate. */
 	 *  is resized as appropriate. */
 	static void ConvertToUTF8(
 	static void ConvertToUTF8(
 		std::vector<char>& data);
 		std::vector<char>& data);
@@ -351,7 +351,7 @@ public: // static utilities
 	/** Utility for text file loaders which copies the contents of the
 	/** Utility for text file loaders which copies the contents of the
 	 *  file into a memory buffer and converts it to our UTF8
 	 *  file into a memory buffer and converts it to our UTF8
 	 *  representation.
 	 *  representation.
-	 *  @param stream Stream to read from. 
+	 *  @param stream Stream to read from.
 	 *  @param data Output buffer to be resized and filled with the
 	 *  @param data Output buffer to be resized and filled with the
 	 *   converted text file data. The buffer is terminated with
 	 *   converted text file data. The buffer is terminated with
 	 *   a binary 0. */
 	 *   a binary 0. */

+ 9 - 9
code/BaseProcess.cpp

@@ -7,8 +7,8 @@ Copyright (c) 2006-2015, assimp team
 
 
 All rights reserved.
 All rights reserved.
 
 
-Redistribution and use of this software in source and binary forms, 
-with or without modification, are permitted provided that the following 
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the following
 conditions are met:
 conditions are met:
 
 
 * Redistributions of source code must retain the above
 * Redistributions of source code must retain the above
@@ -25,16 +25,16 @@ conditions are met:
   derived from this software without specific prior
   derived from this software without specific prior
   written permission of the assimp team.
   written permission of the assimp team.
 
 
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+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
 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 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 
+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.
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 ---------------------------------------------------------------------------
 ---------------------------------------------------------------------------
 */
 */

+ 19 - 19
code/BaseProcess.h

@@ -5,8 +5,8 @@ Open Asset Import Library (assimp)
 Copyright (c) 2006-2015, assimp team
 Copyright (c) 2006-2015, assimp team
 All rights reserved.
 All rights reserved.
 
 
-Redistribution and use of this software in source and binary forms, 
-with or without modification, are permitted provided that the 
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the
 following conditions are met:
 following conditions are met:
 
 
 * Redistributions of source code must retain the above
 * Redistributions of source code must retain the above
@@ -23,16 +23,16 @@ following conditions are met:
   derived from this software without specific prior
   derived from this software without specific prior
   written permission of the assimp team.
   written permission of the assimp team.
 
 
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+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
 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 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 
+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.
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
@@ -106,7 +106,7 @@ public:
 public:
 public:
 
 
 	//! Destructor
 	//! Destructor
-	~SharedPostProcessInfo()	
+	~SharedPostProcessInfo()
 	{
 	{
 		Clean();
 		Clean();
 	}
 	}
@@ -188,7 +188,7 @@ private:
  *
  *
  *  For future use.
  *  For future use.
  */
  */
- struct PPDependencyTable 
+ struct PPDependencyTable
  {
  {
 	 unsigned int execute_me_before_these;
 	 unsigned int execute_me_before_these;
 	 unsigned int execute_me_after_these;
 	 unsigned int execute_me_after_these;
@@ -204,14 +204,14 @@ private:
 // ---------------------------------------------------------------------------
 // ---------------------------------------------------------------------------
 /** The BaseProcess defines a common interface for all post processing steps.
 /** The BaseProcess defines a common interface for all post processing steps.
  * A post processing step is run after a successful import if the caller
  * A post processing step is run after a successful import if the caller
- * specified the corresponding flag when calling ReadFile(). 
- * Enum #aiPostProcessSteps defines which flags are available. 
- * After a successful import the Importer iterates over its internal array 
- * of processes and calls IsActive() on each process to evaluate if the step 
- * should be executed. If the function returns true, the class' Execute() 
+ * specified the corresponding flag when calling ReadFile().
+ * Enum #aiPostProcessSteps defines which flags are available.
+ * After a successful import the Importer iterates over its internal array
+ * of processes and calls IsActive() on each process to evaluate if the step
+ * should be executed. If the function returns true, the class' Execute()
  * function is called subsequently.
  * function is called subsequently.
  */
  */
-class ASSIMP_API_WINONLY BaseProcess 
+class ASSIMP_API_WINONLY BaseProcess
 {
 {
 	friend class Importer;
 	friend class Importer;
 
 
@@ -229,13 +229,13 @@ public:
 	/** Returns whether the processing step is present in the given flag.
 	/** Returns whether the processing step is present in the given flag.
 	 * @param pFlags The processing flags the importer was called with. A
 	 * @param pFlags The processing flags the importer was called with. A
 	 *   bitwise combination of #aiPostProcessSteps.
 	 *   bitwise combination of #aiPostProcessSteps.
-	 * @return true if the process is present in this flag fields, 
+	 * @return true if the process is present in this flag fields,
 	 *   false if not.
 	 *   false if not.
 	*/
 	*/
 	virtual bool IsActive( unsigned int pFlags) const = 0;
 	virtual bool IsActive( unsigned int pFlags) const = 0;
 
 
 	// -------------------------------------------------------------------
 	// -------------------------------------------------------------------
-	/** Check whether this step expects its input vertex data to be 
+	/** Check whether this step expects its input vertex data to be
 	 *  in verbose format. */
 	 *  in verbose format. */
 	virtual bool RequireVerboseFormat() const;
 	virtual bool RequireVerboseFormat() const;
 
 

+ 11 - 11
code/BlenderBMesh.cpp

@@ -5,8 +5,8 @@ Open Asset Import Library (assimp)
 Copyright (c) 2006-2013, assimp team
 Copyright (c) 2006-2013, assimp team
 All rights reserved.
 All rights reserved.
 
 
-Redistribution and use of this software in source and binary forms, 
-with or without modification, are permitted provided that the 
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the
 following conditions are met:
 following conditions are met:
 
 
 * Redistributions of source code must retain the above
 * Redistributions of source code must retain the above
@@ -23,16 +23,16 @@ following conditions are met:
   derived from this software without specific prior
   derived from this software without specific prior
   written permission of the assimp team.
   written permission of the assimp team.
 
 
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+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
 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 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 
+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.
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
@@ -190,12 +190,12 @@ void BlenderBMeshConverter::AddTFace( const float* uv1, const float *uv2, const
 	memcpy( &mtface.uv[ 0 ], uv1, sizeof(float) * 2 );
 	memcpy( &mtface.uv[ 0 ], uv1, sizeof(float) * 2 );
 	memcpy( &mtface.uv[ 1 ], uv2, sizeof(float) * 2 );
 	memcpy( &mtface.uv[ 1 ], uv2, sizeof(float) * 2 );
 	memcpy( &mtface.uv[ 2 ], uv3, sizeof(float) * 2 );
 	memcpy( &mtface.uv[ 2 ], uv3, sizeof(float) * 2 );
-	
+
 	if ( uv4 )
 	if ( uv4 )
 	{
 	{
 		memcpy( &mtface.uv[ 3 ], uv4, sizeof(float) * 2 );
 		memcpy( &mtface.uv[ 3 ], uv4, sizeof(float) * 2 );
 	}
 	}
-	
+
 	triMesh->mtface.push_back( mtface );
 	triMesh->mtface.push_back( mtface );
 }
 }
 
 

+ 9 - 9
code/BlenderBMesh.h

@@ -5,8 +5,8 @@ Open Asset Import Library (assimp)
 Copyright (c) 2006-2013, assimp team
 Copyright (c) 2006-2013, assimp team
 All rights reserved.
 All rights reserved.
 
 
-Redistribution and use of this software in source and binary forms, 
-with or without modification, are permitted provided that the 
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the
 following conditions are met:
 following conditions are met:
 
 
 * Redistributions of source code must retain the above
 * Redistributions of source code must retain the above
@@ -23,16 +23,16 @@ following conditions are met:
   derived from this software without specific prior
   derived from this software without specific prior
   written permission of the assimp team.
   written permission of the assimp team.
 
 
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+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
 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 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 
+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.
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------

+ 32 - 32
code/BlenderDNA.cpp

@@ -5,8 +5,8 @@ Open Asset Import Library (assimp)
 Copyright (c) 2006-2015, assimp team
 Copyright (c) 2006-2015, assimp team
 All rights reserved.
 All rights reserved.
 
 
-Redistribution and use of this software in source and binary forms, 
-with or without modification, are permitted provided that the 
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the
 following conditions are met:
 following conditions are met:
 
 
 * Redistributions of source code must retain the above
 * Redistributions of source code must retain the above
@@ -23,16 +23,16 @@ following conditions are met:
   derived from this software without specific prior
   derived from this software without specific prior
   written permission of the assimp team.
   written permission of the assimp team.
 
 
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+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
 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 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 
+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.
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
@@ -56,10 +56,10 @@ using namespace Assimp::Formatter;
 
 
 #define for_each BOOST_FOREACH
 #define for_each BOOST_FOREACH
 bool match4(StreamReaderAny& stream, const char* string) {
 bool match4(StreamReaderAny& stream, const char* string) {
-	char tmp[] = { 
-		(stream).GetI1(), 
-		(stream).GetI1(),  
-		(stream).GetI1(), 
+	char tmp[] = {
+		(stream).GetI1(),
+		(stream).GetI1(),
+		(stream).GetI1(),
 		(stream).GetI1()
 		(stream).GetI1()
 	};
 	};
 	return (tmp[0]==string[0] && tmp[1]==string[1] && tmp[2]==string[2] && tmp[3]==string[3]);
 	return (tmp[0]==string[0] && tmp[1]==string[1] && tmp[2]==string[2] && tmp[3]==string[3]);
@@ -71,7 +71,7 @@ struct Type {
 };
 };
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-void DNAParser :: Parse () 
+void DNAParser :: Parse ()
 {
 {
 	StreamReaderAny& stream = *db.reader.get();
 	StreamReaderAny& stream = *db.reader.get();
 	DNA& dna = db.dna;
 	DNA& dna = db.dna;
@@ -84,7 +84,7 @@ void DNAParser :: Parse ()
 	if(!match4(stream,"NAME")) {
 	if(!match4(stream,"NAME")) {
 		throw DeadlyImportError("BlenderDNA: Expected NAME field");
 		throw DeadlyImportError("BlenderDNA: Expected NAME field");
 	}
 	}
-	
+
 	std::vector<std::string> names (stream.GetI4());
 	std::vector<std::string> names (stream.GetI4());
 	for_each(std::string& s, names) {
 	for_each(std::string& s, names) {
 		while (char c = stream.GetI1()) {
 		while (char c = stream.GetI1()) {
@@ -97,7 +97,7 @@ void DNAParser :: Parse ()
 	if(!match4(stream,"TYPE")) {
 	if(!match4(stream,"TYPE")) {
 		throw DeadlyImportError("BlenderDNA: Expected TYPE field");
 		throw DeadlyImportError("BlenderDNA: Expected TYPE field");
 	}
 	}
-	
+
 	std::vector<Type> types (stream.GetI4());
 	std::vector<Type> types (stream.GetI4());
 	for_each(Type& s, types) {
 	for_each(Type& s, types) {
 		while (char c = stream.GetI1()) {
 		while (char c = stream.GetI1()) {
@@ -110,7 +110,7 @@ void DNAParser :: Parse ()
 	if(!match4(stream,"TLEN")) {
 	if(!match4(stream,"TLEN")) {
 		throw DeadlyImportError("BlenderDNA: Expected TLEN field");
 		throw DeadlyImportError("BlenderDNA: Expected TLEN field");
 	}
 	}
-	
+
 	for_each(Type& s, types) {
 	for_each(Type& s, types) {
 		s.size = stream.GetI2();
 		s.size = stream.GetI2();
 	}
 	}
@@ -125,11 +125,11 @@ void DNAParser :: Parse ()
 
 
 	dna.structures.reserve(end);
 	dna.structures.reserve(end);
 	for(size_t i = 0; i != end; ++i) {
 	for(size_t i = 0; i != end; ++i) {
-		
+
 		uint16_t n = stream.GetI2();
 		uint16_t n = stream.GetI2();
 		if (n >= types.size()) {
 		if (n >= types.size()) {
 			throw DeadlyImportError((format(),
 			throw DeadlyImportError((format(),
-				"BlenderDNA: Invalid type index in structure name" ,n, 
+				"BlenderDNA: Invalid type index in structure name" ,n,
 				" (there are only ", types.size(), " entries)"
 				" (there are only ", types.size(), " entries)"
 			));
 			));
 		}
 		}
@@ -150,8 +150,8 @@ void DNAParser :: Parse ()
 
 
 			uint16_t j = stream.GetI2();
 			uint16_t j = stream.GetI2();
 			if (j >= types.size()) {
 			if (j >= types.size()) {
-				throw DeadlyImportError((format(), 
-					"BlenderDNA: Invalid type index in structure field ", j, 
+				throw DeadlyImportError((format(),
+					"BlenderDNA: Invalid type index in structure field ", j,
 					" (there are only ", types.size(), " entries)"
 					" (there are only ", types.size(), " entries)"
 				));
 				));
 			}
 			}
@@ -164,15 +164,15 @@ void DNAParser :: Parse ()
 
 
 			j = stream.GetI2();
 			j = stream.GetI2();
 			if (j >= names.size()) {
 			if (j >= names.size()) {
-				throw DeadlyImportError((format(), 
-					"BlenderDNA: Invalid name index in structure field ", j, 
+				throw DeadlyImportError((format(),
+					"BlenderDNA: Invalid name index in structure field ", j,
 					" (there are only ", names.size(), " entries)"
 					" (there are only ", names.size(), " entries)"
 				));
 				));
 			}
 			}
 
 
 			f.name = names[j];
 			f.name = names[j];
 			f.flags = 0u;
 			f.flags = 0u;
-			
+
 			// pointers always specify the size of the pointee instead of their own.
 			// pointers always specify the size of the pointee instead of their own.
 			// The pointer asterisk remains a property of the lookup name.
 			// The pointer asterisk remains a property of the lookup name.
 			if (f.name[0] == '*') {
 			if (f.name[0] == '*') {
@@ -184,18 +184,18 @@ void DNAParser :: Parse ()
 			// need to parse the (possibly multi-dimensional) array declaration
 			// need to parse the (possibly multi-dimensional) array declaration
 			// in order to obtain the actual size of the array in the file.
 			// in order to obtain the actual size of the array in the file.
 			// Also we need to alter the lookup name to include no array
 			// Also we need to alter the lookup name to include no array
-			// brackets anymore or size fixup won't work (if our size does 
+			// brackets anymore or size fixup won't work (if our size does
 			// not match the size read from the DNA).
 			// not match the size read from the DNA).
 			if (*f.name.rbegin() == ']') {
 			if (*f.name.rbegin() == ']') {
 				const std::string::size_type rb = f.name.find('[');
 				const std::string::size_type rb = f.name.find('[');
 				if (rb == std::string::npos) {
 				if (rb == std::string::npos) {
-					throw DeadlyImportError((format(), 
+					throw DeadlyImportError((format(),
 						"BlenderDNA: Encountered invalid array declaration ",
 						"BlenderDNA: Encountered invalid array declaration ",
 						f.name
 						f.name
 					));
 					));
 				}
 				}
 
 
-				f.flags |= FieldFlag_Array; 
+				f.flags |= FieldFlag_Array;
 				DNA::ExtractArraySize(f.name,f.array_sizes);
 				DNA::ExtractArraySize(f.name,f.array_sizes);
 				f.name = f.name.substr(0,rb);
 				f.name = f.name.substr(0,rb);
 
 
@@ -251,7 +251,7 @@ void DNA :: DumpToFile()
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
 /*static*/ void  DNA :: ExtractArraySize(
 /*static*/ void  DNA :: ExtractArraySize(
-	const std::string& out, 
+	const std::string& out,
 	size_t array_sizes[2]
 	size_t array_sizes[2]
 )
 )
 {
 {
@@ -273,7 +273,7 @@ void DNA :: DumpToFile()
 boost::shared_ptr< ElemBase > DNA :: ConvertBlobToStructure(
 boost::shared_ptr< ElemBase > DNA :: ConvertBlobToStructure(
 	const Structure& structure,
 	const Structure& structure,
 	const FileDatabase& db
 	const FileDatabase& db
-) const 
+) const
 {
 {
 	std::map<std::string, FactoryPair >::const_iterator it = converters.find(structure.name);
 	std::map<std::string, FactoryPair >::const_iterator it = converters.find(structure.name);
 	if (it == converters.end()) {
 	if (it == converters.end()) {
@@ -282,7 +282,7 @@ boost::shared_ptr< ElemBase > DNA :: ConvertBlobToStructure(
 
 
 	boost::shared_ptr< ElemBase > ret = (structure.*((*it).second.first))();
 	boost::shared_ptr< ElemBase > ret = (structure.*((*it).second.first))();
 	(structure.*((*it).second.second))(ret,db);
 	(structure.*((*it).second.second))(ret,db);
-	
+
 	return ret;
 	return ret;
 }
 }
 
 
@@ -290,7 +290,7 @@ boost::shared_ptr< ElemBase > DNA :: ConvertBlobToStructure(
 DNA::FactoryPair DNA :: GetBlobToStructureConverter(
 DNA::FactoryPair DNA :: GetBlobToStructureConverter(
 	const Structure& structure,
 	const Structure& structure,
 	const FileDatabase& /*db*/
 	const FileDatabase& /*db*/
-) const 
+) const
 {
 {
 	std::map<std::string,  FactoryPair>::const_iterator it = converters.find(structure.name);
 	std::map<std::string,  FactoryPair>::const_iterator it = converters.find(structure.name);
 	return it == converters.end() ? FactoryPair() : (*it).second;
 	return it == converters.end() ? FactoryPair() : (*it).second;
@@ -302,7 +302,7 @@ void DNA :: AddPrimitiveStructures()
 {
 {
 	// NOTE: these are just dummies. Their presence enforces
 	// NOTE: these are just dummies. Their presence enforces
 	// Structure::Convert<target_type> to be called on these
 	// Structure::Convert<target_type> to be called on these
-	// empty structures. These converters are special 
+	// empty structures. These converters are special
 	// overloads which scan the name of the structure and
 	// overloads which scan the name of the structure and
 	// perform the required data type conversion if one
 	// perform the required data type conversion if one
 	// of these special names is found in the structure
 	// of these special names is found in the structure

+ 69 - 69
code/BlenderDNA.h

@@ -5,8 +5,8 @@ Open Asset Import Library (assimp)
 Copyright (c) 2006-2015, assimp team
 Copyright (c) 2006-2015, assimp team
 All rights reserved.
 All rights reserved.
 
 
-Redistribution and use of this software in source and binary forms, 
-with or without modification, are permitted provided that the 
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the
 following conditions are met:
 following conditions are met:
 
 
 * Redistributions of source code must retain the above
 * Redistributions of source code must retain the above
@@ -23,23 +23,23 @@ following conditions are met:
   derived from this software without specific prior
   derived from this software without specific prior
   written permission of the assimp team.
   written permission of the assimp team.
 
 
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+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
 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 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 
+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.
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
 */
 */
 
 
 /** @file  BlenderDNA.h
 /** @file  BlenderDNA.h
- *  @brief Blender `DNA` (file format specification embedded in 
+ *  @brief Blender `DNA` (file format specification embedded in
  *    blend file itself) loader.
  *    blend file itself) loader.
  */
  */
 #ifndef INCLUDED_AI_BLEND_DNA_H
 #ifndef INCLUDED_AI_BLEND_DNA_H
@@ -89,16 +89,16 @@ struct Error : DeadlyImportError
 /** The only purpose of this structure is to feed a virtual dtor into its
 /** The only purpose of this structure is to feed a virtual dtor into its
  *  descendents. It serves as base class for all data structure fields. */
  *  descendents. It serves as base class for all data structure fields. */
 // -------------------------------------------------------------------------------
 // -------------------------------------------------------------------------------
-struct ElemBase 
+struct ElemBase
 {
 {
 	virtual ~ElemBase() {}
 	virtual ~ElemBase() {}
 
 
-	/** Type name of the element. The type 
-	 * string points is the `c_str` of the `name` attribute of the 
-	 * corresponding `Structure`, that is, it is only valid as long 
+	/** Type name of the element. The type
+	 * string points is the `c_str` of the `name` attribute of the
+	 * corresponding `Structure`, that is, it is only valid as long
 	 * as the DNA is not modified. The dna_type is only set if the
 	 * as the DNA is not modified. The dna_type is only set if the
 	 * data type is not static, i.e. a boost::shared_ptr<ElemBase>
 	 * data type is not static, i.e. a boost::shared_ptr<ElemBase>
-	 * in the scene description would have its type resolved 
+	 * in the scene description would have its type resolved
 	 * at runtime, so this member is always set. */
 	 * at runtime, so this member is always set. */
 	const char* dna_type;
 	const char* dna_type;
 };
 };
@@ -107,7 +107,7 @@ struct ElemBase
 // -------------------------------------------------------------------------------
 // -------------------------------------------------------------------------------
 /** Represents a generic pointer to a memory location, which can be either 32
 /** Represents a generic pointer to a memory location, which can be either 32
  *  or 64 bits. These pointers are loaded from the BLEND file and finally
  *  or 64 bits. These pointers are loaded from the BLEND file and finally
- *  fixed to point to the real, converted representation of the objects 
+ *  fixed to point to the real, converted representation of the objects
  *  they used to point to.*/
  *  they used to point to.*/
 // -------------------------------------------------------------------------------
 // -------------------------------------------------------------------------------
 struct Pointer
 struct Pointer
@@ -127,7 +127,7 @@ struct FileOffset
 
 
 // -------------------------------------------------------------------------------
 // -------------------------------------------------------------------------------
 /** Dummy derivate of std::vector to be able to use it in templates simultaenously
 /** Dummy derivate of std::vector to be able to use it in templates simultaenously
- *  with boost::shared_ptr, which takes only one template argument 
+ *  with boost::shared_ptr, which takes only one template argument
  *  while std::vector takes three. Also we need to provide some special member
  *  while std::vector takes three. Also we need to provide some special member
  *  functions of shared_ptr */
  *  functions of shared_ptr */
 // -------------------------------------------------------------------------------
 // -------------------------------------------------------------------------------
@@ -150,7 +150,7 @@ public:
 // -------------------------------------------------------------------------------
 // -------------------------------------------------------------------------------
 /** Mixed flags for use in #Field */
 /** Mixed flags for use in #Field */
 // -------------------------------------------------------------------------------
 // -------------------------------------------------------------------------------
-enum FieldFlags 
+enum FieldFlags
 {
 {
 	FieldFlag_Pointer = 0x1,
 	FieldFlag_Pointer = 0x1,
 	FieldFlag_Array   = 0x2
 	FieldFlag_Array   = 0x2
@@ -159,8 +159,8 @@ enum FieldFlags
 // -------------------------------------------------------------------------------
 // -------------------------------------------------------------------------------
 /** Represents a single member of a data structure in a BLEND file */
 /** Represents a single member of a data structure in a BLEND file */
 // -------------------------------------------------------------------------------
 // -------------------------------------------------------------------------------
-struct Field 
-{	
+struct Field
+{
 	std::string name;
 	std::string name;
 	std::string type;
 	std::string type;
 
 
@@ -180,7 +180,7 @@ struct Field
  *  mission critical so we need them, while others can silently be default
  *  mission critical so we need them, while others can silently be default
  *  initialized and no animations are harmed. */
  *  initialized and no animations are harmed. */
 // -------------------------------------------------------------------------------
 // -------------------------------------------------------------------------------
-enum ErrorPolicy 
+enum ErrorPolicy
 {
 {
 	/** Substitute default value and ignore */
 	/** Substitute default value and ignore */
 	ErrorPolicy_Igno,
 	ErrorPolicy_Igno,
@@ -202,7 +202,7 @@ enum ErrorPolicy
  *  binary `blob` read from the file to such a structure instance with
  *  binary `blob` read from the file to such a structure instance with
  *  meaningful contents. */
  *  meaningful contents. */
 // -------------------------------------------------------------------------------
 // -------------------------------------------------------------------------------
-class Structure 
+class Structure
 {
 {
 	template <template <typename> class> friend class ObjectCache;
 	template <template <typename> class> friend class ObjectCache;
 
 
@@ -271,7 +271,7 @@ public:
 	// --------------------------------------------------------
 	// --------------------------------------------------------
 	// field parsing for 1d arrays
 	// field parsing for 1d arrays
 	template <int error_policy, typename T, size_t M>
 	template <int error_policy, typename T, size_t M>
-	void ReadFieldArray(T (& out)[M], const char* name, 
+	void ReadFieldArray(T (& out)[M], const char* name,
 		const FileDatabase& db) const;
 		const FileDatabase& db) const;
 
 
 	// --------------------------------------------------------
 	// --------------------------------------------------------
@@ -281,11 +281,11 @@ public:
 		const FileDatabase& db) const;
 		const FileDatabase& db) const;
 
 
 	// --------------------------------------------------------
 	// --------------------------------------------------------
-	// field parsing for pointer or dynamic array types 
+	// field parsing for pointer or dynamic array types
 	// (boost::shared_ptr or boost::shared_array)
 	// (boost::shared_ptr or boost::shared_array)
 	// The return value indicates whether the data was already cached.
 	// The return value indicates whether the data was already cached.
 	template <int error_policy, template <typename> class TOUT, typename T>
 	template <int error_policy, template <typename> class TOUT, typename T>
-	bool ReadFieldPtr(TOUT<T>& out, const char* name, 
+	bool ReadFieldPtr(TOUT<T>& out, const char* name,
 		const FileDatabase& db,
 		const FileDatabase& db,
 		bool non_recursive = false) const;
 		bool non_recursive = false) const;
 
 
@@ -294,31 +294,31 @@ public:
 	// array types (boost::shared_ptr[] or boost::shared_array[])
 	// array types (boost::shared_ptr[] or boost::shared_array[])
 	// The return value indicates whether the data was already cached.
 	// The return value indicates whether the data was already cached.
 	template <int error_policy, template <typename> class TOUT, typename T, size_t N>
 	template <int error_policy, template <typename> class TOUT, typename T, size_t N>
-	bool ReadFieldPtr(TOUT<T> (&out)[N], const char* name, 
+	bool ReadFieldPtr(TOUT<T> (&out)[N], const char* name,
 		const FileDatabase& db) const;
 		const FileDatabase& db) const;
 
 
 	// --------------------------------------------------------
 	// --------------------------------------------------------
 	// field parsing for `normal` values
 	// field parsing for `normal` values
 	// The return value indicates whether the data was already cached.
 	// The return value indicates whether the data was already cached.
 	template <int error_policy, typename T>
 	template <int error_policy, typename T>
-	void ReadField(T& out, const char* name, 
+	void ReadField(T& out, const char* name,
 		const FileDatabase& db) const;
 		const FileDatabase& db) const;
 
 
 private:
 private:
 
 
 	// --------------------------------------------------------
 	// --------------------------------------------------------
 	template <template <typename> class TOUT, typename T>
 	template <template <typename> class TOUT, typename T>
-	bool ResolvePointer(TOUT<T>& out, const Pointer & ptrval, 
+	bool ResolvePointer(TOUT<T>& out, const Pointer & ptrval,
 		const FileDatabase& db, const Field& f,
 		const FileDatabase& db, const Field& f,
 		bool non_recursive = false) const;
 		bool non_recursive = false) const;
 
 
 	// --------------------------------------------------------
 	// --------------------------------------------------------
 	template <template <typename> class TOUT, typename T>
 	template <template <typename> class TOUT, typename T>
-	bool ResolvePointer(vector< TOUT<T> >& out, const Pointer & ptrval, 
+	bool ResolvePointer(vector< TOUT<T> >& out, const Pointer & ptrval,
 		const FileDatabase& db, const Field& f, bool) const;
 		const FileDatabase& db, const Field& f, bool) const;
 
 
 	// --------------------------------------------------------
 	// --------------------------------------------------------
-	bool ResolvePointer( boost::shared_ptr< FileOffset >& out, const Pointer & ptrval, 
+	bool ResolvePointer( boost::shared_ptr< FileOffset >& out, const Pointer & ptrval,
 		const FileDatabase& db, const Field& f, bool) const;
 		const FileDatabase& db, const Field& f, bool) const;
 
 
 	// --------------------------------------------------------
 	// --------------------------------------------------------
@@ -347,7 +347,7 @@ private:
 		template <typename T, unsigned int N>
 		template <typename T, unsigned int N>
 		void operator ()(T (& out)[N], const char* = NULL) {
 		void operator ()(T (& out)[N], const char* = NULL) {
 			for (unsigned int i = 0; i < N; ++i) {
 			for (unsigned int i = 0; i < N; ++i) {
-				out[i] = T(); 
+				out[i] = T();
 			}
 			}
 		}
 		}
 
 
@@ -355,7 +355,7 @@ private:
 		void operator ()(T (& out)[N][M], const char* = NULL) {
 		void operator ()(T (& out)[N][M], const char* = NULL) {
 			for (unsigned int i = 0; i < N; ++i) {
 			for (unsigned int i = 0; i < N; ++i) {
 				for (unsigned int j = 0; j < M; ++j) {
 				for (unsigned int j = 0; j < M; ++j) {
-					out[i][j] = T(); 
+					out[i][j] = T();
 				}
 				}
 			}
 			}
 		}
 		}
@@ -387,16 +387,16 @@ template <> struct Structure :: _defaultInitializer<ErrorPolicy_Fail> {
 
 
 	template <typename T>
 	template <typename T>
 	void operator ()(T& /*out*/,const char* = "") {
 	void operator ()(T& /*out*/,const char* = "") {
-		// obviously, it is crucial that _DefaultInitializer is used 
+		// obviously, it is crucial that _DefaultInitializer is used
 		// only from within a catch clause.
 		// only from within a catch clause.
 		throw;
 		throw;
 	}
 	}
 };
 };
 
 
 // -------------------------------------------------------------------------------------------------------
 // -------------------------------------------------------------------------------------------------------
-template <> inline bool Structure :: ResolvePointer<boost::shared_ptr,ElemBase>(boost::shared_ptr<ElemBase>& out, 
-	const Pointer & ptrval, 
-	const FileDatabase& db, 
+template <> inline bool Structure :: ResolvePointer<boost::shared_ptr,ElemBase>(boost::shared_ptr<ElemBase>& out,
+	const Pointer & ptrval,
+	const FileDatabase& db,
 	const Field& f,
 	const Field& f,
 	bool
 	bool
 	) const;
 	) const;
@@ -405,7 +405,7 @@ template <> inline bool Structure :: ResolvePointer<boost::shared_ptr,ElemBase>(
 // -------------------------------------------------------------------------------
 // -------------------------------------------------------------------------------
 /** Represents the full data structure information for a single BLEND file.
 /** Represents the full data structure information for a single BLEND file.
  *  This data is extracted from the DNA1 chunk in the file.
  *  This data is extracted from the DNA1 chunk in the file.
- *  #DNAParser does the reading and represents currently the only place where 
+ *  #DNAParser does the reading and represents currently the only place where
  *  DNA is altered.*/
  *  DNA is altered.*/
 // -------------------------------------------------------------------------------
 // -------------------------------------------------------------------------------
 class DNA
 class DNA
@@ -413,13 +413,13 @@ class DNA
 public:
 public:
 
 
 	typedef void (Structure::*ConvertProcPtr) (
 	typedef void (Structure::*ConvertProcPtr) (
-		boost::shared_ptr<ElemBase> in, 
+		boost::shared_ptr<ElemBase> in,
 		const FileDatabase&
 		const FileDatabase&
 	) const;
 	) const;
 
 
 	typedef boost::shared_ptr<ElemBase> (
 	typedef boost::shared_ptr<ElemBase> (
 		Structure::*AllocProcPtr) () const;
 		Structure::*AllocProcPtr) () const;
-	
+
 	typedef std::pair< AllocProcPtr, ConvertProcPtr > FactoryPair;
 	typedef std::pair< AllocProcPtr, ConvertProcPtr > FactoryPair;
 
 
 public:
 public:
@@ -431,7 +431,7 @@ public:
 public:
 public:
 
 
 	// --------------------------------------------------------
 	// --------------------------------------------------------
-	/** Access a structure by its canonical name, the pointer version returns NULL on failure 
+	/** Access a structure by its canonical name, the pointer version returns NULL on failure
 	  * while the reference version raises an error. */
 	  * while the reference version raises an error. */
 	inline const Structure& operator [] (const std::string& ss) const;
 	inline const Structure& operator [] (const std::string& ss) const;
 	inline const Structure* Get (const std::string& ss) const;
 	inline const Structure* Get (const std::string& ss) const;
@@ -448,19 +448,19 @@ public:
 	void AddPrimitiveStructures();
 	void AddPrimitiveStructures();
 
 
 	// --------------------------------------------------------
 	// --------------------------------------------------------
-	/** Fill the @c converters member with converters for all 
+	/** Fill the @c converters member with converters for all
 	 *  known data types. The implementation of this method is
 	 *  known data types. The implementation of this method is
 	 *  in BlenderScene.cpp and is machine-generated.
 	 *  in BlenderScene.cpp and is machine-generated.
 	 *  Converters are used to quickly handle objects whose
 	 *  Converters are used to quickly handle objects whose
-	 *  exact data type is a runtime-property and not yet 
+	 *  exact data type is a runtime-property and not yet
 	 *  known at compile time (consier Object::data).*/
 	 *  known at compile time (consier Object::data).*/
 	void RegisterConverters();
 	void RegisterConverters();
 
 
 
 
 	// --------------------------------------------------------
 	// --------------------------------------------------------
-	/** Take an input blob from the stream, interpret it according to 
+	/** Take an input blob from the stream, interpret it according to
 	 *  a its structure name and convert it to the intermediate
 	 *  a its structure name and convert it to the intermediate
-	 *  representation. 
+	 *  representation.
 	 *  @param structure Destination structure definition
 	 *  @param structure Destination structure definition
 	 *  @param db File database.
 	 *  @param db File database.
 	 *  @return A null pointer if no appropriate converter is available.*/
 	 *  @return A null pointer if no appropriate converter is available.*/
@@ -471,7 +471,7 @@ public:
 
 
 	// --------------------------------------------------------
 	// --------------------------------------------------------
 	/** Find a suitable conversion function for a given Structure.
 	/** Find a suitable conversion function for a given Structure.
-	 *  Such a converter function takes a blob from the input 
+	 *  Such a converter function takes a blob from the input
 	 *  stream, reads as much as it needs, and builds up a
 	 *  stream, reads as much as it needs, and builds up a
 	 *  complete object in intermediate representation.
 	 *  complete object in intermediate representation.
 	 *  @param structure Destination structure definition
 	 *  @param structure Destination structure definition
@@ -485,7 +485,7 @@ public:
 
 
 #ifdef ASSIMP_BUILD_BLENDER_DEBUG
 #ifdef ASSIMP_BUILD_BLENDER_DEBUG
 	// --------------------------------------------------------
 	// --------------------------------------------------------
-	/** Dump the DNA to a text file. This is for debugging purposes. 
+	/** Dump the DNA to a text file. This is for debugging purposes.
 	 *  The output file is `dna.txt` in the current working folder*/
 	 *  The output file is `dna.txt` in the current working folder*/
 	void DumpToFile();
 	void DumpToFile();
 #endif
 #endif
@@ -500,7 +500,7 @@ public:
 	 *  @throw DeadlyImportError if more than 2 dimensions are
 	 *  @throw DeadlyImportError if more than 2 dimensions are
 	 *    encountered. */
 	 *    encountered. */
 	static void ExtractArraySize(
 	static void ExtractArraySize(
-		const std::string& out, 
+		const std::string& out,
 		size_t array_sizes[2]
 		size_t array_sizes[2]
 	);
 	);
 };
 };
@@ -517,7 +517,7 @@ template <> inline void Structure :: Convert<Pointer>	(Pointer& dest,const FileD
 /** Describes a master file block header. Each master file sections holds n
 /** Describes a master file block header. Each master file sections holds n
  *  elements of a certain SDNA structure (or otherwise unspecified data). */
  *  elements of a certain SDNA structure (or otherwise unspecified data). */
 // -------------------------------------------------------------------------------
 // -------------------------------------------------------------------------------
-struct FileBlockHead 
+struct FileBlockHead
 {
 {
 	// points right after the header of the file block
 	// points right after the header of the file block
 	StreamReaderAny::pos start;
 	StreamReaderAny::pos start;
@@ -555,14 +555,14 @@ inline bool operator< (const Pointer& a, const Pointer& b) {
 // -------------------------------------------------------------------------------
 // -------------------------------------------------------------------------------
 /** Utility to read all master file blocks in turn. */
 /** Utility to read all master file blocks in turn. */
 // -------------------------------------------------------------------------------
 // -------------------------------------------------------------------------------
-class SectionParser 
+class SectionParser
 {
 {
 public:
 public:
 
 
 	// --------------------------------------------------------
 	// --------------------------------------------------------
-	/** @param stream Inout stream, must point to the 
+	/** @param stream Inout stream, must point to the
 	 *  first section in the file. Call Next() once
 	 *  first section in the file. Call Next() once
-	 *  to have it read. 
+	 *  to have it read.
 	 *  @param ptr64 Pointer size in file is 64 bits? */
 	 *  @param ptr64 Pointer size in file is 64 bits? */
 	SectionParser(StreamReaderAny& stream,bool ptr64)
 	SectionParser(StreamReaderAny& stream,bool ptr64)
 		: stream(stream)
 		: stream(stream)
@@ -577,12 +577,12 @@ public:
 	const FileBlockHead& GetCurrent() const {
 	const FileBlockHead& GetCurrent() const {
 		return current;
 		return current;
 	}
 	}
-	
+
 
 
 public:
 public:
 
 
 	// --------------------------------------------------------
 	// --------------------------------------------------------
-	/** Advance to the next section. 
+	/** Advance to the next section.
 	 *  @throw DeadlyImportError if the last chunk was passed. */
 	 *  @throw DeadlyImportError if the last chunk was passed. */
 	void Next();
 	void Next();
 
 
@@ -602,7 +602,7 @@ class Statistics {
 
 
 public:
 public:
 
 
-	Statistics () 
+	Statistics ()
 		: fields_read		()
 		: fields_read		()
 		, pointers_resolved	()
 		, pointers_resolved	()
 		, cache_hits		()
 		, cache_hits		()
@@ -621,7 +621,7 @@ public:
 	/** number of pointers resolved from the cache */
 	/** number of pointers resolved from the cache */
 	unsigned int cache_hits;
 	unsigned int cache_hits;
 
 
-	/** number of blocks (from  FileDatabase::entries) 
+	/** number of blocks (from  FileDatabase::entries)
 	  we did actually read from. */
 	  we did actually read from. */
 	// unsigned int blocks_read;
 	// unsigned int blocks_read;
 
 
@@ -635,7 +635,7 @@ public:
  *  avoids circular references and avoids object duplication. */
  *  avoids circular references and avoids object duplication. */
 // -------------------------------------------------------------------------------
 // -------------------------------------------------------------------------------
 template <template <typename> class TOUT>
 template <template <typename> class TOUT>
-class ObjectCache 
+class ObjectCache
 {
 {
 public:
 public:
 
 
@@ -661,21 +661,21 @@ public:
 	 *   cache doens't know the item yet.
 	 *   cache doens't know the item yet.
 	 *  @param ptr Item address to look for. */
 	 *  @param ptr Item address to look for. */
 	template <typename T> void get (
 	template <typename T> void get (
-		const Structure& s, 
-		TOUT<T>& out, 
+		const Structure& s,
+		TOUT<T>& out,
 		const Pointer& ptr) const;
 		const Pointer& ptr) const;
 
 
 	// --------------------------------------------------------
 	// --------------------------------------------------------
-	/** Add an item to the cache after the item has 
+	/** Add an item to the cache after the item has
 	 * been fully read. Do not insert anything that
 	 * been fully read. Do not insert anything that
 	 * may be faulty or might cause the loading
 	 * may be faulty or might cause the loading
-	 * to abort. 
+	 * to abort.
 	 *  @param s Data type of the item
 	 *  @param s Data type of the item
 	 *  @param out Item to insert into the cache
 	 *  @param out Item to insert into the cache
 	 *  @param ptr address (cache key) of the item. */
 	 *  @param ptr address (cache key) of the item. */
-	template <typename T> void set 
-		(const Structure& s, 
-		const TOUT<T>& out, 
+	template <typename T> void set
+		(const Structure& s,
+		const TOUT<T>& out,
 		const Pointer& ptr);
 		const Pointer& ptr);
 
 
 private:
 private:
@@ -686,7 +686,7 @@ private:
 
 
 // -------------------------------------------------------------------------------
 // -------------------------------------------------------------------------------
 // -------------------------------------------------------------------------------
 // -------------------------------------------------------------------------------
-template <> class ObjectCache<Blender::vector> 
+template <> class ObjectCache<Blender::vector>
 {
 {
 public:
 public:
 
 
@@ -704,7 +704,7 @@ public:
 /** Memory representation of a full BLEND file and all its dependencies. The
 /** Memory representation of a full BLEND file and all its dependencies. The
  *  output aiScene is constructed from an instance of this data structure. */
  *  output aiScene is constructed from an instance of this data structure. */
 // -------------------------------------------------------------------------------
 // -------------------------------------------------------------------------------
-class FileDatabase 
+class FileDatabase
 {
 {
 	template <template <typename> class TOUT> friend class ObjectCache;
 	template <template <typename> class TOUT> friend class ObjectCache;
 
 
@@ -715,7 +715,7 @@ public:
 		: _cacheArrays(*this)
 		: _cacheArrays(*this)
 		, _cache(*this)
 		, _cache(*this)
 		, next_cache_idx()
 		, next_cache_idx()
-	{} 
+	{}
 
 
 public:
 public:
 
 
@@ -735,7 +735,7 @@ public:
 
 
 	// For all our templates to work on both shared_ptr's and vector's
 	// For all our templates to work on both shared_ptr's and vector's
 	// using the same code, a dummy cache for arrays is provided. Actually,
 	// using the same code, a dummy cache for arrays is provided. Actually,
-	// arrays of objects are never cached because we can't easily 
+	// arrays of objects are never cached because we can't easily
 	// ensure their proper destruction.
 	// ensure their proper destruction.
 	template <typename T>
 	template <typename T>
 	ObjectCache<boost::shared_ptr>& cache(boost::shared_ptr<T>& /*in*/) const {
 	ObjectCache<boost::shared_ptr>& cache(boost::shared_ptr<T>& /*in*/) const {
@@ -749,7 +749,7 @@ public:
 
 
 private:
 private:
 
 
-	
+
 #ifndef ASSIMP_BUILD_BLENDER_NO_STATS
 #ifndef ASSIMP_BUILD_BLENDER_NO_STATS
 	mutable Statistics _stats;
 	mutable Statistics _stats;
 #endif
 #endif
@@ -767,7 +767,7 @@ private:
 // -------------------------------------------------------------------------------
 // -------------------------------------------------------------------------------
 /** Factory to extract a #DNA from the DNA1 file block in a BLEND file. */
 /** Factory to extract a #DNA from the DNA1 file block in a BLEND file. */
 // -------------------------------------------------------------------------------
 // -------------------------------------------------------------------------------
-class DNAParser 
+class DNAParser
 {
 {
 
 
 public:
 public:

+ 25 - 25
code/BlenderIntermediate.h

@@ -5,8 +5,8 @@ Open Asset Import Library (assimp)
 Copyright (c) 2006-2015, assimp team
 Copyright (c) 2006-2015, assimp team
 All rights reserved.
 All rights reserved.
 
 
-Redistribution and use of this software in source and binary forms, 
-with or without modification, are permitted provided that the 
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the
 following conditions are met:
 following conditions are met:
 
 
 * Redistributions of source code must retain the above
 * Redistributions of source code must retain the above
@@ -23,16 +23,16 @@ following conditions are met:
   derived from this software without specific prior
   derived from this software without specific prior
   written permission of the assimp team.
   written permission of the assimp team.
 
 
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+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
 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 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 
+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.
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
@@ -119,7 +119,7 @@ namespace Blender {
 	private:
 	private:
 		mywrap arr;
 		mywrap arr;
 	};
 	};
-	
+
 #ifdef _MSC_VER
 #ifdef _MSC_VER
 #	pragma warning(disable:4351)
 #	pragma warning(disable:4351)
 #endif
 #endif
@@ -137,7 +137,7 @@ namespace Blender {
 	/** ConversionData acts as intermediate storage location for
 	/** ConversionData acts as intermediate storage location for
 	 *  the various ConvertXXX routines in BlenderImporter.*/
 	 *  the various ConvertXXX routines in BlenderImporter.*/
 	// --------------------------------------------------------------------
 	// --------------------------------------------------------------------
-	struct ConversionData	
+	struct ConversionData
 	{
 	{
 		ConversionData(const FileDatabase& db)
 		ConversionData(const FileDatabase& db)
 			: sentinel_cnt()
 			: sentinel_cnt()
@@ -179,20 +179,20 @@ namespace Blender {
 inline const char* GetTextureTypeDisplayString(Tex::Type t)
 inline const char* GetTextureTypeDisplayString(Tex::Type t)
 {
 {
 	switch (t)	{
 	switch (t)	{
-	case Tex::Type_CLOUDS		:  return  "Clouds";			
-	case Tex::Type_WOOD			:  return  "Wood";			
-	case Tex::Type_MARBLE		:  return  "Marble";			
-	case Tex::Type_MAGIC		:  return  "Magic";		
-	case Tex::Type_BLEND		:  return  "Blend";			
-	case Tex::Type_STUCCI		:  return  "Stucci";			
-	case Tex::Type_NOISE		:  return  "Noise";			
-	case Tex::Type_PLUGIN		:  return  "Plugin";			
-	case Tex::Type_MUSGRAVE		:  return  "Musgrave";		
-	case Tex::Type_VORONOI		:  return  "Voronoi";			
-	case Tex::Type_DISTNOISE	:  return  "DistortedNoise";	
-	case Tex::Type_ENVMAP		:  return  "EnvMap";	
-	case Tex::Type_IMAGE		:  return  "Image";	
-	default: 
+	case Tex::Type_CLOUDS		:  return  "Clouds";
+	case Tex::Type_WOOD			:  return  "Wood";
+	case Tex::Type_MARBLE		:  return  "Marble";
+	case Tex::Type_MAGIC		:  return  "Magic";
+	case Tex::Type_BLEND		:  return  "Blend";
+	case Tex::Type_STUCCI		:  return  "Stucci";
+	case Tex::Type_NOISE		:  return  "Noise";
+	case Tex::Type_PLUGIN		:  return  "Plugin";
+	case Tex::Type_MUSGRAVE		:  return  "Musgrave";
+	case Tex::Type_VORONOI		:  return  "Voronoi";
+	case Tex::Type_DISTNOISE	:  return  "DistortedNoise";
+	case Tex::Type_ENVMAP		:  return  "EnvMap";
+	case Tex::Type_IMAGE		:  return  "Image";
+	default:
 		break;
 		break;
 	}
 	}
 	return "<Unknown>";
 	return "<Unknown>";

+ 67 - 67
code/BlenderLoader.cpp

@@ -6,8 +6,8 @@ Open Asset Import Library (assimp)
 Copyright (c) 2006-2015, assimp team
 Copyright (c) 2006-2015, assimp team
 All rights reserved.
 All rights reserved.
 
 
-Redistribution and use of this software in source and binary forms, 
-with or without modification, are permitted provided that the 
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the
 following conditions are met:
 following conditions are met:
 
 
 * Redistributions of source code must retain the above
 * Redistributions of source code must retain the above
@@ -24,16 +24,16 @@ following conditions are met:
   derived from this software without specific prior
   derived from this software without specific prior
   written permission of the assimp team.
   written permission of the assimp team.
 
 
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+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
 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 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 
+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.
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
@@ -60,7 +60,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include <cctype>
 #include <cctype>
 
 
 
 
-// zlib is needed for compressed blend files 
+// zlib is needed for compressed blend files
 #ifndef ASSIMP_BUILD_NO_COMPRESSED_BLEND
 #ifndef ASSIMP_BUILD_NO_COMPRESSED_BLEND
 #	ifdef ASSIMP_BUILD_NO_OWN_ZLIB
 #	ifdef ASSIMP_BUILD_NO_OWN_ZLIB
 #		include <zlib.h>
 #		include <zlib.h>
@@ -98,14 +98,14 @@ BlenderImporter::BlenderImporter()
 {}
 {}
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-// Destructor, private as well 
+// Destructor, private as well
 BlenderImporter::~BlenderImporter()
 BlenderImporter::~BlenderImporter()
 {
 {
 	delete modifier_cache;
 	delete modifier_cache;
 }
 }
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-// Returns whether the class can handle the format of the given file. 
+// Returns whether the class can handle the format of the given file.
 bool BlenderImporter::CanRead( const std::string& pFile, IOSystem* pIOHandler, bool checkSig) const
 bool BlenderImporter::CanRead( const std::string& pFile, IOSystem* pIOHandler, bool checkSig) const
 {
 {
 	const std::string& extension = GetExtension(pFile);
 	const std::string& extension = GetExtension(pFile);
@@ -123,7 +123,7 @@ bool BlenderImporter::CanRead( const std::string& pFile, IOSystem* pIOHandler, b
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
 // List all extensions handled by this loader
 // List all extensions handled by this loader
-void BlenderImporter::GetExtensionList(std::set<std::string>& app) 
+void BlenderImporter::GetExtensionList(std::set<std::string>& app)
 {
 {
 	app.insert("blend");
 	app.insert("blend");
 }
 }
@@ -153,8 +153,8 @@ struct free_it
 };
 };
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-// Imports the given file into the given scene structure. 
-void BlenderImporter::InternReadFile( const std::string& pFile, 
+// Imports the given file into the given scene structure.
+void BlenderImporter::InternReadFile( const std::string& pFile,
 	aiScene* pScene, IOSystem* pIOHandler)
 	aiScene* pScene, IOSystem* pIOHandler)
 {
 {
 #ifndef ASSIMP_BUILD_NO_COMPRESSED_BLEND
 #ifndef ASSIMP_BUILD_NO_COMPRESSED_BLEND
@@ -162,7 +162,7 @@ void BlenderImporter::InternReadFile( const std::string& pFile,
 	free_it free_it_really(dest);
 	free_it free_it_really(dest);
 #endif
 #endif
 
 
-	FileDatabase file; 
+	FileDatabase file;
 	boost::shared_ptr<IOStream> stream(pIOHandler->Open(pFile,"rb"));
 	boost::shared_ptr<IOStream> stream(pIOHandler->Open(pFile,"rb"));
 	if (!stream) {
 	if (!stream) {
 		ThrowException("Could not open file for reading");
 		ThrowException("Could not open file for reading");
@@ -222,14 +222,14 @@ void BlenderImporter::InternReadFile( const std::string& pFile,
 			total += have;
 			total += have;
 			dest = reinterpret_cast<Bytef*>( realloc(dest,total) );
 			dest = reinterpret_cast<Bytef*>( realloc(dest,total) );
 			memcpy(dest + total - have,block,have);
 			memcpy(dest + total - have,block,have);
-		} 
+		}
 		while (ret != Z_STREAM_END);
 		while (ret != Z_STREAM_END);
 
 
 		// terminate zlib
 		// terminate zlib
 		inflateEnd(&zstream);
 		inflateEnd(&zstream);
 
 
 		// replace the input stream with a memory stream
 		// replace the input stream with a memory stream
-		stream.reset(new MemoryIOStream(reinterpret_cast<uint8_t*>(dest),total)); 
+		stream.reset(new MemoryIOStream(reinterpret_cast<uint8_t*>(dest),total));
 
 
 		// .. and retry
 		// .. and retry
 		stream->Read(magic,7,1);
 		stream->Read(magic,7,1);
@@ -259,7 +259,7 @@ void BlenderImporter::InternReadFile( const std::string& pFile,
 }
 }
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-void BlenderImporter::ParseBlendFile(FileDatabase& out, boost::shared_ptr<IOStream> stream) 
+void BlenderImporter::ParseBlendFile(FileDatabase& out, boost::shared_ptr<IOStream> stream)
 {
 {
 	out.reader = boost::shared_ptr<StreamReaderAny>(new StreamReaderAny(stream,out.little));
 	out.reader = boost::shared_ptr<StreamReaderAny>(new StreamReaderAny(stream,out.little));
 
 
@@ -293,7 +293,7 @@ void BlenderImporter::ParseBlendFile(FileDatabase& out, boost::shared_ptr<IOStre
 }
 }
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-void BlenderImporter::ExtractScene(Scene& out, const FileDatabase& file) 
+void BlenderImporter::ExtractScene(Scene& out, const FileDatabase& file)
 {
 {
 	const FileBlockHead* block = NULL;
 	const FileBlockHead* block = NULL;
 	std::map<std::string,size_t>::const_iterator it = file.dna.indices.find("Scene");
 	std::map<std::string,size_t>::const_iterator it = file.dna.indices.find("Scene");
@@ -303,7 +303,7 @@ void BlenderImporter::ExtractScene(Scene& out, const FileDatabase& file)
 
 
 	const Structure& ss = file.dna.structures[(*it).second];
 	const Structure& ss = file.dna.structures[(*it).second];
 
 
-	// we need a scene somewhere to start with. 
+	// we need a scene somewhere to start with.
 	for_each(const FileBlockHead& bl,file.entries) {
 	for_each(const FileBlockHead& bl,file.entries) {
 
 
 		// Fix: using the DNA index is more reliable to locate scenes
 		// Fix: using the DNA index is more reliable to locate scenes
@@ -325,15 +325,15 @@ void BlenderImporter::ExtractScene(Scene& out, const FileDatabase& file)
 #ifndef ASSIMP_BUILD_BLENDER_NO_STATS
 #ifndef ASSIMP_BUILD_BLENDER_NO_STATS
 	DefaultLogger::get()->info((format(),
 	DefaultLogger::get()->info((format(),
 		"(Stats) Fields read: "	,file.stats().fields_read,
 		"(Stats) Fields read: "	,file.stats().fields_read,
-		", pointers resolved: "	,file.stats().pointers_resolved,  
-		", cache hits: "        ,file.stats().cache_hits,  
+		", pointers resolved: "	,file.stats().pointers_resolved,
+		", cache hits: "        ,file.stats().cache_hits,
 		", cached objects: "	,file.stats().cached_objects
 		", cached objects: "	,file.stats().cached_objects
 	));
 	));
 #endif
 #endif
 }
 }
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-void BlenderImporter::ConvertBlendFile(aiScene* out, const Scene& in,const FileDatabase& file) 
+void BlenderImporter::ConvertBlendFile(aiScene* out, const Scene& in,const FileDatabase& file)
 {
 {
 	ConversionData conv(file);
 	ConversionData conv(file);
 
 
@@ -366,7 +366,7 @@ void BlenderImporter::ConvertBlendFile(aiScene* out, const Scene& in,const FileD
 	root->mNumChildren = static_cast<unsigned int>(no_parents.size());
 	root->mNumChildren = static_cast<unsigned int>(no_parents.size());
 	root->mChildren = new aiNode*[root->mNumChildren]();
 	root->mChildren = new aiNode*[root->mNumChildren]();
 	for (unsigned int i = 0; i < root->mNumChildren; ++i) {
 	for (unsigned int i = 0; i < root->mNumChildren; ++i) {
-		root->mChildren[i] = ConvertNode(in, no_parents[i], conv, aiMatrix4x4());	
+		root->mChildren[i] = ConvertNode(in, no_parents[i], conv, aiMatrix4x4());
 		root->mChildren[i]->mParent = root;
 		root->mChildren[i]->mParent = root;
 	}
 	}
 
 
@@ -511,29 +511,29 @@ void BlenderImporter::ResolveTexture(aiMaterial* out, const Material* mat, const
 	if(!rtex || !rtex->type) {
 	if(!rtex || !rtex->type) {
 		return;
 		return;
 	}
 	}
-	
+
 	// We can't support most of the texture types because they're mostly procedural.
 	// We can't support most of the texture types because they're mostly procedural.
 	// These are substituted by a dummy texture.
 	// These are substituted by a dummy texture.
 	const char* dispnam = "";
 	const char* dispnam = "";
-	switch( rtex->type ) 
+	switch( rtex->type )
 	{
 	{
 			// these are listed in blender's UI
 			// these are listed in blender's UI
-		case Tex::Type_CLOUDS		:  
-		case Tex::Type_WOOD			:  
-		case Tex::Type_MARBLE		:  
-		case Tex::Type_MAGIC		: 
-		case Tex::Type_BLEND		:  
-		case Tex::Type_STUCCI		: 
-		case Tex::Type_NOISE		: 
-		case Tex::Type_PLUGIN		: 
-		case Tex::Type_MUSGRAVE		:  
-		case Tex::Type_VORONOI		:  
-		case Tex::Type_DISTNOISE	:  
-		case Tex::Type_ENVMAP		:  
+		case Tex::Type_CLOUDS		:
+		case Tex::Type_WOOD			:
+		case Tex::Type_MARBLE		:
+		case Tex::Type_MAGIC		:
+		case Tex::Type_BLEND		:
+		case Tex::Type_STUCCI		:
+		case Tex::Type_NOISE		:
+		case Tex::Type_PLUGIN		:
+		case Tex::Type_MUSGRAVE		:
+		case Tex::Type_VORONOI		:
+		case Tex::Type_DISTNOISE	:
+		case Tex::Type_ENVMAP		:
 
 
 			// these do no appear in the UI, why?
 			// these do no appear in the UI, why?
-		case Tex::Type_POINTDENSITY	:  
-		case Tex::Type_VOXELDATA	: 
+		case Tex::Type_POINTDENSITY	:
+		case Tex::Type_VOXELDATA	:
 
 
 			LogWarn(std::string("Encountered a texture with an unsupported type: ")+dispnam);
 			LogWarn(std::string("Encountered a texture with an unsupported type: ")+dispnam);
 			AddSentinelTexture(out, mat, tex, conv_data);
 			AddSentinelTexture(out, mat, tex, conv_data);
@@ -553,7 +553,7 @@ void BlenderImporter::ResolveTexture(aiMaterial* out, const Material* mat, const
 }
 }
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-void BlenderImporter::BuildMaterials(ConversionData& conv_data) 
+void BlenderImporter::BuildMaterials(ConversionData& conv_data)
 {
 {
 	conv_data.materials->reserve(conv_data.materials_raw.size());
 	conv_data.materials->reserve(conv_data.materials_raw.size());
 
 
@@ -594,7 +594,7 @@ void BlenderImporter::BuildMaterials(ConversionData& conv_data)
 		for (size_t i = 0; i < sizeof(conv_data.next_texture)/sizeof(conv_data.next_texture[0]);++i) {
 		for (size_t i = 0; i < sizeof(conv_data.next_texture)/sizeof(conv_data.next_texture[0]);++i) {
 			conv_data.next_texture[i] = 0 ;
 			conv_data.next_texture[i] = 0 ;
 		}
 		}
-	
+
 		aiMaterial* mout = new aiMaterial();
 		aiMaterial* mout = new aiMaterial();
 		conv_data.materials->push_back(mout);
 		conv_data.materials->push_back(mout);
 		// For any new material field handled here, the default material above must be updated with an appropriate default value.
 		// For any new material field handled here, the default material above must be updated with an appropriate default value.
@@ -607,7 +607,7 @@ void BlenderImporter::BuildMaterials(ConversionData& conv_data)
 		// basic material colors
 		// basic material colors
 		aiColor3D col(mat->r,mat->g,mat->b);
 		aiColor3D col(mat->r,mat->g,mat->b);
 		if (mat->r || mat->g || mat->b ) {
 		if (mat->r || mat->g || mat->b ) {
-			
+
 			// Usually, zero diffuse color means no diffuse color at all in the equation.
 			// Usually, zero diffuse color means no diffuse color at all in the equation.
 			// So we omit this member to express this intent.
 			// So we omit this member to express this intent.
 			mout->AddProperty(&col,1,AI_MATKEY_COLOR_DIFFUSE);
 			mout->AddProperty(&col,1,AI_MATKEY_COLOR_DIFFUSE);
@@ -649,7 +649,7 @@ void BlenderImporter::CheckActualType(const ElemBase* dt, const char* check)
 	ai_assert(dt);
 	ai_assert(dt);
 	if (strcmp(dt->dna_type,check)) {
 	if (strcmp(dt->dna_type,check)) {
 		ThrowException((format(),
 		ThrowException((format(),
-			"Expected object at ",std::hex,dt," to be of type `",check, 
+			"Expected object at ",std::hex,dt," to be of type `",check,
 			"`, but it claims to be a `",dt->dna_type,"`instead"
 			"`, but it claims to be a `",dt->dna_type,"`instead"
 		));
 		));
 	}
 	}
@@ -664,7 +664,7 @@ void BlenderImporter::NotSupportedObjectType(const Object* obj, const char* type
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
 void BlenderImporter::ConvertMesh(const Scene& /*in*/, const Object* /*obj*/, const Mesh* mesh,
 void BlenderImporter::ConvertMesh(const Scene& /*in*/, const Object* /*obj*/, const Mesh* mesh,
 	ConversionData& conv_data, TempArray<std::vector,aiMesh>&  temp
 	ConversionData& conv_data, TempArray<std::vector,aiMesh>&  temp
-	) 
+	)
 {
 {
 	// TODO: Resolve various problems with BMesh triangluation before re-enabling.
 	// TODO: Resolve various problems with BMesh triangluation before re-enabling.
 	//       See issues #400, #373, #318  #315 and #132.
 	//       See issues #400, #373, #318  #315 and #132.
@@ -730,11 +730,11 @@ void BlenderImporter::ConvertMesh(const Scene& /*in*/, const Object* /*obj*/, co
 
 
 		// all submeshes created from this mesh are named equally. this allows
 		// all submeshes created from this mesh are named equally. this allows
 		// curious users to recover the original adjacency.
 		// curious users to recover the original adjacency.
-		out->mName = aiString(mesh->id.name+2);  
+		out->mName = aiString(mesh->id.name+2);
 			// skip over the name prefix 'ME'
 			// skip over the name prefix 'ME'
 
 
 		// resolve the material reference and add this material to the set of
 		// resolve the material reference and add this material to the set of
-		// output materials. The (temporary) material index is the index 
+		// output materials. The (temporary) material index is the index
 		// of the material entry within the list of resolved materials.
 		// of the material entry within the list of resolved materials.
 		if (mesh->mat) {
 		if (mesh->mat) {
 
 
@@ -771,7 +771,7 @@ void BlenderImporter::ConvertMesh(const Scene& /*in*/, const Object* /*obj*/, co
 		aiVector3D* vn = out->mNormals + out->mNumVertices;
 		aiVector3D* vn = out->mNormals + out->mNumVertices;
 
 
 		// XXX we can't fold this easily, because we are restricted
 		// XXX we can't fold this easily, because we are restricted
-		// to the member names from the BLEND file (v1,v2,v3,v4) 
+		// to the member names from the BLEND file (v1,v2,v3,v4)
 		// which are assigned by the genblenddna.py script and
 		// which are assigned by the genblenddna.py script and
 		// cannot be changed without breaking the entire
 		// cannot be changed without breaking the entire
 		// import process.
 		// import process.
@@ -846,16 +846,16 @@ void BlenderImporter::ConvertMesh(const Scene& /*in*/, const Object* /*obj*/, co
 	}
 	}
 
 
 	for (int i = 0; i < mesh->totpoly; ++i) {
 	for (int i = 0; i < mesh->totpoly; ++i) {
-		
+
 		const MPoly& mf = mesh->mpoly[i];
 		const MPoly& mf = mesh->mpoly[i];
-		
+
 		aiMesh* const out = temp[ mat_num_to_mesh_idx[ mf.mat_nr ] ];
 		aiMesh* const out = temp[ mat_num_to_mesh_idx[ mf.mat_nr ] ];
 		aiFace& f = out->mFaces[out->mNumFaces++];
 		aiFace& f = out->mFaces[out->mNumFaces++];
-		
+
 		f.mIndices = new unsigned int[ f.mNumIndices = mf.totloop ];
 		f.mIndices = new unsigned int[ f.mNumIndices = mf.totloop ];
 		aiVector3D* vo = out->mVertices + out->mNumVertices;
 		aiVector3D* vo = out->mVertices + out->mNumVertices;
 		aiVector3D* vn = out->mNormals + out->mNumVertices;
 		aiVector3D* vn = out->mNormals + out->mNumVertices;
-		
+
 		// XXX we can't fold this easily, because we are restricted
 		// XXX we can't fold this easily, because we are restricted
 		// to the member names from the BLEND file (v1,v2,v3,v4)
 		// to the member names from the BLEND file (v1,v2,v3,v4)
 		// which are assigned by the genblenddna.py script and
 		// which are assigned by the genblenddna.py script and
@@ -870,7 +870,7 @@ void BlenderImporter::ConvertMesh(const Scene& /*in*/, const Object* /*obj*/, co
 			}
 			}
 
 
 			const MVert& v = mesh->mvert[loop.v];
 			const MVert& v = mesh->mvert[loop.v];
-			
+
 			vo->x = v.co[0];
 			vo->x = v.co[0];
 			vo->y = v.co[1];
 			vo->y = v.co[1];
 			vo->z = v.co[2];
 			vo->z = v.co[2];
@@ -878,10 +878,10 @@ void BlenderImporter::ConvertMesh(const Scene& /*in*/, const Object* /*obj*/, co
 			vn->y = v.no[1];
 			vn->y = v.no[1];
 			vn->z = v.no[2];
 			vn->z = v.no[2];
 			f.mIndices[j] = out->mNumVertices++;
 			f.mIndices[j] = out->mNumVertices++;
-			
+
 			++vo;
 			++vo;
 			++vn;
 			++vn;
-			
+
 		}
 		}
 		if (mf.totloop == 3)
 		if (mf.totloop == 3)
 		{
 		{
@@ -892,7 +892,7 @@ void BlenderImporter::ConvertMesh(const Scene& /*in*/, const Object* /*obj*/, co
 			out->mPrimitiveTypes |= aiPrimitiveType_POLYGON;
 			out->mPrimitiveTypes |= aiPrimitiveType_POLYGON;
 		}
 		}
 	}
 	}
-	
+
 	// collect texture coordinates, they're stored in a separate per-face buffer
 	// collect texture coordinates, they're stored in a separate per-face buffer
 	if (mesh->mtface || mesh->mloopuv) {
 	if (mesh->mtface || mesh->mloopuv) {
 		if (mesh->totface > static_cast<int> ( mesh->mtface.size())) {
 		if (mesh->totface > static_cast<int> ( mesh->mtface.size())) {
@@ -910,26 +910,26 @@ void BlenderImporter::ConvertMesh(const Scene& /*in*/, const Object* /*obj*/, co
 
 
 			aiMesh* const out = temp[ mat_num_to_mesh_idx[ mesh->mface[i].mat_nr ] ];
 			aiMesh* const out = temp[ mat_num_to_mesh_idx[ mesh->mface[i].mat_nr ] ];
 			const aiFace& f = out->mFaces[out->mNumFaces++];
 			const aiFace& f = out->mFaces[out->mNumFaces++];
-			
+
 			aiVector3D* vo = &out->mTextureCoords[0][out->mNumVertices];
 			aiVector3D* vo = &out->mTextureCoords[0][out->mNumVertices];
 			for (unsigned int i = 0; i < f.mNumIndices; ++i,++vo,++out->mNumVertices) {
 			for (unsigned int i = 0; i < f.mNumIndices; ++i,++vo,++out->mNumVertices) {
 				vo->x = v->uv[i][0];
 				vo->x = v->uv[i][0];
 				vo->y = v->uv[i][1];
 				vo->y = v->uv[i][1];
 			}
 			}
 		}
 		}
-		
+
 		for (int i = 0; i < mesh->totpoly; ++i) {
 		for (int i = 0; i < mesh->totpoly; ++i) {
 			const MPoly& v = mesh->mpoly[i];
 			const MPoly& v = mesh->mpoly[i];
 			aiMesh* const out = temp[ mat_num_to_mesh_idx[ v.mat_nr ] ];
 			aiMesh* const out = temp[ mat_num_to_mesh_idx[ v.mat_nr ] ];
 			const aiFace& f = out->mFaces[out->mNumFaces++];
 			const aiFace& f = out->mFaces[out->mNumFaces++];
-			
+
 			aiVector3D* vo = &out->mTextureCoords[0][out->mNumVertices];
 			aiVector3D* vo = &out->mTextureCoords[0][out->mNumVertices];
 			for (unsigned int j = 0; j < f.mNumIndices; ++j,++vo,++out->mNumVertices) {
 			for (unsigned int j = 0; j < f.mNumIndices; ++j,++vo,++out->mNumVertices) {
 				const MLoopUV& uv = mesh->mloopuv[v.loopstart + j];
 				const MLoopUV& uv = mesh->mloopuv[v.loopstart + j];
 				vo->x = uv.uv[0];
 				vo->x = uv.uv[0];
 				vo->y = uv.uv[1];
 				vo->y = uv.uv[1];
 			}
 			}
-			
+
 		}
 		}
 	}
 	}
 
 
@@ -950,7 +950,7 @@ void BlenderImporter::ConvertMesh(const Scene& /*in*/, const Object* /*obj*/, co
 
 
 			aiMesh* const out = temp[ mat_num_to_mesh_idx[ mesh->mface[i].mat_nr ] ];
 			aiMesh* const out = temp[ mat_num_to_mesh_idx[ mesh->mface[i].mat_nr ] ];
 			const aiFace& f = out->mFaces[out->mNumFaces++];
 			const aiFace& f = out->mFaces[out->mNumFaces++];
-			
+
 			aiVector3D* vo = &out->mTextureCoords[0][out->mNumVertices];
 			aiVector3D* vo = &out->mTextureCoords[0][out->mNumVertices];
 			for (unsigned int i = 0; i < f.mNumIndices; ++i,++vo,++out->mNumVertices) {
 			for (unsigned int i = 0; i < f.mNumIndices; ++i,++vo,++out->mNumVertices) {
 				vo->x = v->uv[i][0];
 				vo->x = v->uv[i][0];
@@ -975,7 +975,7 @@ void BlenderImporter::ConvertMesh(const Scene& /*in*/, const Object* /*obj*/, co
 
 
 			aiMesh* const out = temp[ mat_num_to_mesh_idx[ mesh->mface[i].mat_nr ] ];
 			aiMesh* const out = temp[ mat_num_to_mesh_idx[ mesh->mface[i].mat_nr ] ];
 			const aiFace& f = out->mFaces[out->mNumFaces++];
 			const aiFace& f = out->mFaces[out->mNumFaces++];
-			
+
 			aiColor4D* vo = &out->mColors[0][out->mNumVertices];
 			aiColor4D* vo = &out->mColors[0][out->mNumVertices];
 			for (unsigned int n = 0; n < f.mNumIndices; ++n, ++vo,++out->mNumVertices) {
 			for (unsigned int n = 0; n < f.mNumIndices; ++n, ++vo,++out->mNumVertices) {
 				const MCol* col = &mesh->mcol[(i<<2)+n];
 				const MCol* col = &mesh->mcol[(i<<2)+n];
@@ -987,12 +987,12 @@ void BlenderImporter::ConvertMesh(const Scene& /*in*/, const Object* /*obj*/, co
 			}
 			}
 			for (unsigned int n = f.mNumIndices; n < 4; ++n);
 			for (unsigned int n = f.mNumIndices; n < 4; ++n);
 		}
 		}
-		
+
 		for (int i = 0; i < mesh->totpoly; ++i) {
 		for (int i = 0; i < mesh->totpoly; ++i) {
 			const MPoly& v = mesh->mpoly[i];
 			const MPoly& v = mesh->mpoly[i];
 			aiMesh* const out = temp[ mat_num_to_mesh_idx[ v.mat_nr ] ];
 			aiMesh* const out = temp[ mat_num_to_mesh_idx[ v.mat_nr ] ];
 			const aiFace& f = out->mFaces[out->mNumFaces++];
 			const aiFace& f = out->mFaces[out->mNumFaces++];
-			
+
 			aiColor4D* vo = &out->mColors[0][out->mNumVertices];
 			aiColor4D* vo = &out->mColors[0][out->mNumVertices];
 			for (unsigned int j = 0; j < f.mNumIndices; ++j,++vo,++out->mNumVertices) {
 			for (unsigned int j = 0; j < f.mNumIndices; ++j,++vo,++out->mNumVertices) {
 				const MLoopCol& col = mesh->mloopcol[v.loopstart + j];
 				const MLoopCol& col = mesh->mloopcol[v.loopstart + j];
@@ -1001,7 +1001,7 @@ void BlenderImporter::ConvertMesh(const Scene& /*in*/, const Object* /*obj*/, co
 				vo->b = col.b;
 				vo->b = col.b;
 				vo->a = col.a;
 				vo->a = col.a;
 			}
 			}
-			
+
 		}
 		}
 
 
 	}
 	}
@@ -1140,7 +1140,7 @@ aiNode* BlenderImporter::ConvertNode(const Scene& in, const Object* obj, Convers
 	m = m.Inverse();
 	m = m.Inverse();
 
 
 	node->mTransformation = m*node->mTransformation;
 	node->mTransformation = m*node->mTransformation;
-	
+
 	if (children.size()) {
 	if (children.size()) {
 		node->mNumChildren = static_cast<unsigned int>(children.size());
 		node->mNumChildren = static_cast<unsigned int>(children.size());
 		aiNode** nd = node->mChildren = new aiNode*[node->mNumChildren]();
 		aiNode** nd = node->mChildren = new aiNode*[node->mNumChildren]();

+ 40 - 40
code/BlenderLoader.h

@@ -5,8 +5,8 @@ Open Asset Import Library (assimp)
 Copyright (c) 2006-2015, assimp team
 Copyright (c) 2006-2015, assimp team
 All rights reserved.
 All rights reserved.
 
 
-Redistribution and use of this software in source and binary forms, 
-with or without modification, are permitted provided that the 
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the
 following conditions are met:
 following conditions are met:
 
 
 * Redistributions of source code must retain the above
 * Redistributions of source code must retain the above
@@ -23,16 +23,16 @@ following conditions are met:
   derived from this software without specific prior
   derived from this software without specific prior
   written permission of the assimp team.
   written permission of the assimp team.
 
 
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+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
 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 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 
+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.
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
@@ -55,7 +55,7 @@ struct aiCamera;
 struct aiMaterial;
 struct aiMaterial;
 
 
 namespace Assimp	{
 namespace Assimp	{
-	
+
 	// TinyFormatter.h
 	// TinyFormatter.h
 	namespace Formatter {
 	namespace Formatter {
 		template <typename T,typename TR, typename A> class basic_formatter;
 		template <typename T,typename TR, typename A> class basic_formatter;
@@ -109,7 +109,7 @@ public:
 public:
 public:
 
 
 	// --------------------
 	// --------------------
-	bool CanRead( const std::string& pFile, 
+	bool CanRead( const std::string& pFile,
 		IOSystem* pIOHandler,
 		IOSystem* pIOHandler,
 		bool checkSig
 		bool checkSig
 	) const;
 	) const;
@@ -126,20 +126,20 @@ protected:
 	void SetupProperties(const Importer* pImp);
 	void SetupProperties(const Importer* pImp);
 
 
 	// --------------------
 	// --------------------
-	void InternReadFile( const std::string& pFile, 
-		aiScene* pScene, 
+	void InternReadFile( const std::string& pFile,
+		aiScene* pScene,
 		IOSystem* pIOHandler
 		IOSystem* pIOHandler
 	);
 	);
 
 
 	// --------------------
 	// --------------------
-	void ParseBlendFile(Blender::FileDatabase& out, 
+	void ParseBlendFile(Blender::FileDatabase& out,
 		boost::shared_ptr<IOStream> stream
 		boost::shared_ptr<IOStream> stream
 	);
 	);
 
 
 	// --------------------
 	// --------------------
-	void ExtractScene(Blender::Scene& out, 
+	void ExtractScene(Blender::Scene& out,
 		const Blender::FileDatabase& file
 		const Blender::FileDatabase& file
-	); 
+	);
 
 
 	// --------------------
 	// --------------------
 	void ConvertBlendFile(aiScene* out,
 	void ConvertBlendFile(aiScene* out,
@@ -150,33 +150,33 @@ protected:
 private:
 private:
 
 
 	// --------------------
 	// --------------------
-	aiNode* ConvertNode(const Blender::Scene& in, 
-		const Blender::Object* obj, 
+	aiNode* ConvertNode(const Blender::Scene& in,
+		const Blender::Object* obj,
 		Blender::ConversionData& conv_info,
 		Blender::ConversionData& conv_info,
 		const aiMatrix4x4& parentTransform
 		const aiMatrix4x4& parentTransform
-	); 
+	);
 
 
 	// --------------------
 	// --------------------
-	void ConvertMesh(const Blender::Scene& in, 
-		const Blender::Object* obj, 
-		const Blender::Mesh* mesh, 
+	void ConvertMesh(const Blender::Scene& in,
+		const Blender::Object* obj,
+		const Blender::Mesh* mesh,
 		Blender::ConversionData& conv_data,
 		Blender::ConversionData& conv_data,
 		Blender::TempArray<std::vector,aiMesh>& temp
 		Blender::TempArray<std::vector,aiMesh>& temp
-	); 
+	);
 
 
 	// --------------------
 	// --------------------
-	aiLight* ConvertLight(const Blender::Scene& in, 
-		const Blender::Object* obj, 
-		const Blender::Lamp* mesh, 
+	aiLight* ConvertLight(const Blender::Scene& in,
+		const Blender::Object* obj,
+		const Blender::Lamp* mesh,
 		Blender::ConversionData& conv_data
 		Blender::ConversionData& conv_data
-	); 
+	);
 
 
 	// --------------------
 	// --------------------
-	aiCamera* ConvertCamera(const Blender::Scene& in, 
-		const Blender::Object* obj, 
-		const Blender::Camera* mesh, 
+	aiCamera* ConvertCamera(const Blender::Scene& in,
+		const Blender::Object* obj,
+		const Blender::Camera* mesh,
 		Blender::ConversionData& conv_data
 		Blender::ConversionData& conv_data
-	); 
+	);
 
 
 	// --------------------
 	// --------------------
 	void BuildMaterials(
 	void BuildMaterials(
@@ -185,37 +185,37 @@ private:
 
 
 	// --------------------
 	// --------------------
 	void ResolveTexture(
 	void ResolveTexture(
-		aiMaterial* out, 
-		const Blender::Material* mat, 
+		aiMaterial* out,
+		const Blender::Material* mat,
 		const Blender::MTex* tex,
 		const Blender::MTex* tex,
 		Blender::ConversionData& conv_data
 		Blender::ConversionData& conv_data
 	);
 	);
 
 
 	// --------------------
 	// --------------------
 	void ResolveImage(
 	void ResolveImage(
-		aiMaterial* out, 
-		const Blender::Material* mat, 
-		const Blender::MTex* tex, 
+		aiMaterial* out,
+		const Blender::Material* mat,
+		const Blender::MTex* tex,
 		const Blender::Image* img,
 		const Blender::Image* img,
 		Blender::ConversionData& conv_data
 		Blender::ConversionData& conv_data
 	);
 	);
 
 
 	void AddSentinelTexture(
 	void AddSentinelTexture(
-		aiMaterial* out, 
+		aiMaterial* out,
 		const Blender::Material* mat,
 		const Blender::Material* mat,
-		const Blender::MTex* tex, 
+		const Blender::MTex* tex,
 		Blender::ConversionData& conv_data
 		Blender::ConversionData& conv_data
 	);
 	);
 
 
 private: // static stuff, mostly logging and error reporting.
 private: // static stuff, mostly logging and error reporting.
 
 
 	// --------------------
 	// --------------------
-	static void CheckActualType(const Blender::ElemBase* dt, 
+	static void CheckActualType(const Blender::ElemBase* dt,
 		const char* check
 		const char* check
 	);
 	);
 
 
 	// --------------------
 	// --------------------
-	static void NotSupportedObjectType(const Blender::Object* obj, 
+	static void NotSupportedObjectType(const Blender::Object* obj,
 		const char* type
 		const char* type
 	);
 	);
 
 

+ 16 - 16
code/BlenderModifier.cpp

@@ -5,8 +5,8 @@ Open Asset Import Library (assimp)
 Copyright (c) 2006-2015, assimp team
 Copyright (c) 2006-2015, assimp team
 All rights reserved.
 All rights reserved.
 
 
-Redistribution and use of this software in source and binary forms, 
-with or without modification, are permitted provided that the 
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the
 following conditions are met:
 following conditions are met:
 
 
 * Redistributions of source code must retain the above
 * Redistributions of source code must retain the above
@@ -23,16 +23,16 @@ following conditions are met:
   derived from this software without specific prior
   derived from this software without specific prior
   written permission of the assimp team.
   written permission of the assimp team.
 
 
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+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
 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 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 
+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.
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
@@ -105,7 +105,7 @@ struct SharedModifierData : ElemBase
 };
 };
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-void BlenderModifierShowcase::ApplyModifiers(aiNode& out, ConversionData& conv_data, const Scene& in, const Object& orig_object ) 
+void BlenderModifierShowcase::ApplyModifiers(aiNode& out, ConversionData& conv_data, const Scene& in, const Object& orig_object )
 {
 {
 	size_t cnt = 0u, ful = 0u;
 	size_t cnt = 0u, ful = 0u;
 
 
@@ -183,9 +183,9 @@ bool BlenderModifier_Mirror :: IsActive (const ModifierData& modin)
 }
 }
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-void  BlenderModifier_Mirror :: DoIt(aiNode& out, ConversionData& conv_data,  const ElemBase& orig_modifier, 
+void  BlenderModifier_Mirror :: DoIt(aiNode& out, ConversionData& conv_data,  const ElemBase& orig_modifier,
 	const Scene& /*in*/,
 	const Scene& /*in*/,
-	const Object& orig_object ) 
+	const Object& orig_object )
 {
 {
 	// hijacking the ABI, see the big note in BlenderModifierShowcase::ApplyModifiers()
 	// hijacking the ABI, see the big note in BlenderModifierShowcase::ApplyModifiers()
 	const MirrorModifierData& mir = static_cast<const MirrorModifierData&>(orig_modifier);
 	const MirrorModifierData& mir = static_cast<const MirrorModifierData&>(orig_modifier);
@@ -208,7 +208,7 @@ void  BlenderModifier_Mirror :: DoIt(aiNode& out, ConversionData& conv_data,  co
 			const aiVector3D center( mir.mirror_ob->obmat[3][0],mir.mirror_ob->obmat[3][1],mir.mirror_ob->obmat[3][2] );
 			const aiVector3D center( mir.mirror_ob->obmat[3][0],mir.mirror_ob->obmat[3][1],mir.mirror_ob->obmat[3][2] );
 			for (unsigned int i = 0; i < mesh->mNumVertices; ++i) {
 			for (unsigned int i = 0; i < mesh->mNumVertices; ++i) {
 				aiVector3D& v = mesh->mVertices[i];
 				aiVector3D& v = mesh->mVertices[i];
-		
+
 				v.x = center.x + xs*(center.x - v.x);
 				v.x = center.x + xs*(center.x - v.x);
 				v.y = center.y + ys*(center.y - v.y);
 				v.y = center.y + ys*(center.y - v.y);
 				v.z = center.z + zs*(center.z - v.z);
 				v.z = center.z + zs*(center.z - v.z);
@@ -287,16 +287,16 @@ bool BlenderModifier_Subdivision :: IsActive (const ModifierData& modin)
 }
 }
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-void  BlenderModifier_Subdivision :: DoIt(aiNode& out, ConversionData& conv_data,  const ElemBase& orig_modifier, 
+void  BlenderModifier_Subdivision :: DoIt(aiNode& out, ConversionData& conv_data,  const ElemBase& orig_modifier,
 	const Scene& /*in*/,
 	const Scene& /*in*/,
-	const Object& orig_object ) 
+	const Object& orig_object )
 {
 {
 	// hijacking the ABI, see the big note in BlenderModifierShowcase::ApplyModifiers()
 	// hijacking the ABI, see the big note in BlenderModifierShowcase::ApplyModifiers()
 	const SubsurfModifierData& mir = static_cast<const SubsurfModifierData&>(orig_modifier);
 	const SubsurfModifierData& mir = static_cast<const SubsurfModifierData&>(orig_modifier);
 	ai_assert(mir.modifier.type == ModifierData::eModifierType_Subsurf);
 	ai_assert(mir.modifier.type == ModifierData::eModifierType_Subsurf);
 
 
 	Subdivider::Algorithm algo;
 	Subdivider::Algorithm algo;
-	switch (mir.subdivType) 
+	switch (mir.subdivType)
 	{
 	{
 	case SubsurfModifierData::TYPE_CatmullClarke:
 	case SubsurfModifierData::TYPE_CatmullClarke:
 		algo = Subdivider::CATMULL_CLARKE;
 		algo = Subdivider::CATMULL_CLARKE;

+ 26 - 26
code/BlenderModifier.h

@@ -5,8 +5,8 @@ Open Asset Import Library (assimp)
 Copyright (c) 2006-2015, assimp team
 Copyright (c) 2006-2015, assimp team
 All rights reserved.
 All rights reserved.
 
 
-Redistribution and use of this software in source and binary forms, 
-with or without modification, are permitted provided that the 
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the
 following conditions are met:
 following conditions are met:
 
 
 * Redistributions of source code must retain the above
 * Redistributions of source code must retain the above
@@ -23,16 +23,16 @@ following conditions are met:
   derived from this software without specific prior
   derived from this software without specific prior
   written permission of the assimp team.
   written permission of the assimp team.
 
 
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+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
 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 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 
+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.
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
@@ -53,7 +53,7 @@ namespace Assimp {
 /** Dummy base class for all blender modifiers. Modifiers are reused between imports, so
 /** Dummy base class for all blender modifiers. Modifiers are reused between imports, so
  *  they should be stateless and not try to cache model data. */
  *  they should be stateless and not try to cache model data. */
 // -------------------------------------------------------------------------------------------
 // -------------------------------------------------------------------------------------------
-class BlenderModifier 
+class BlenderModifier
 {
 {
 public:
 public:
 
 
@@ -74,7 +74,7 @@ public:
 	 *  was called and gave positive response. */
 	 *  was called and gave positive response. */
 	virtual void DoIt(aiNode& /*out*/,
 	virtual void DoIt(aiNode& /*out*/,
 		ConversionData& /*conv_data*/,
 		ConversionData& /*conv_data*/,
-		const ElemBase& orig_modifier, 
+		const ElemBase& orig_modifier,
 		const Scene& /*in*/,
 		const Scene& /*in*/,
 		const Object& /*orig_object*/
 		const Object& /*orig_object*/
 	) {
 	) {
@@ -94,9 +94,9 @@ public:
 	// --------------------
 	// --------------------
 	/** Apply all requested modifiers provided we support them. */
 	/** Apply all requested modifiers provided we support them. */
 	void ApplyModifiers(aiNode& out,
 	void ApplyModifiers(aiNode& out,
-		ConversionData& conv_data, 
-		const Scene& in, 
-		const Object& orig_object 
+		ConversionData& conv_data,
+		const Scene& in,
+		const Object& orig_object
 	);
 	);
 
 
 private:
 private:
@@ -121,13 +121,13 @@ public:
 
 
 	// --------------------
 	// --------------------
 	virtual bool IsActive( const ModifierData& modin);
 	virtual bool IsActive( const ModifierData& modin);
-	
+
 	// --------------------
 	// --------------------
-	virtual void DoIt(aiNode& out, 
-		ConversionData& conv_data,  
-		const ElemBase& orig_modifier, 
-		const Scene& in, 
-		const Object& orig_object 
+	virtual void DoIt(aiNode& out,
+		ConversionData& conv_data,
+		const ElemBase& orig_modifier,
+		const Scene& in,
+		const Object& orig_object
 	) ;
 	) ;
 };
 };
 
 
@@ -140,13 +140,13 @@ public:
 
 
 	// --------------------
 	// --------------------
 	virtual bool IsActive( const ModifierData& modin);
 	virtual bool IsActive( const ModifierData& modin);
-	
+
 	// --------------------
 	// --------------------
-	virtual void DoIt(aiNode& out, 
-		ConversionData& conv_data,  
-		const ElemBase& orig_modifier, 
-		const Scene& in, 
-		const Object& orig_object 
+	virtual void DoIt(aiNode& out,
+		ConversionData& conv_data,
+		const ElemBase& orig_modifier,
+		const Scene& in,
+		const Object& orig_object
 	) ;
 	) ;
 };
 };
 
 

+ 45 - 45
code/BlenderScene.cpp

@@ -5,8 +5,8 @@ Open Asset Import Library (ASSIMP)
 Copyright (c) 2006-2010, ASSIMP Development Team
 Copyright (c) 2006-2010, ASSIMP Development Team
 All rights reserved.
 All rights reserved.
 
 
-Redistribution and use of this software in source and binary forms, 
-with or without modification, are permitted provided that the 
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the
 following conditions are met:
 following conditions are met:
 
 
 * Redistributions of source code must retain the above
 * Redistributions of source code must retain the above
@@ -23,16 +23,16 @@ following conditions are met:
   derived from this software without specific prior
   derived from this software without specific prior
   written permission of the ASSIMP Development Team.
   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 
+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
 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 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 
+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.
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
@@ -56,7 +56,7 @@ template <> void Structure :: Convert<Object> (
     Object& dest,
     Object& dest,
     const FileDatabase& db
     const FileDatabase& db
     ) const
     ) const
-{ 
+{
 
 
     ReadField<ErrorPolicy_Fail>(dest.id,"id",db);
     ReadField<ErrorPolicy_Fail>(dest.id,"id",db);
     ReadField<ErrorPolicy_Fail>((int&)dest.type,"type",db);
     ReadField<ErrorPolicy_Fail>((int&)dest.type,"type",db);
@@ -84,7 +84,7 @@ template <> void Structure :: Convert<Group> (
     Group& dest,
     Group& dest,
     const FileDatabase& db
     const FileDatabase& db
     ) const
     ) const
-{ 
+{
 
 
     ReadField<ErrorPolicy_Fail>(dest.id,"id",db);
     ReadField<ErrorPolicy_Fail>(dest.id,"id",db);
     ReadField<ErrorPolicy_Igno>(dest.layer,"layer",db);
     ReadField<ErrorPolicy_Igno>(dest.layer,"layer",db);
@@ -98,7 +98,7 @@ template <> void Structure :: Convert<MTex> (
     MTex& dest,
     MTex& dest,
     const FileDatabase& db
     const FileDatabase& db
     ) const
     ) const
-{ 
+{
 
 
     ReadField<ErrorPolicy_Igno>((short&)dest.mapto,"mapto",db);
     ReadField<ErrorPolicy_Igno>((short&)dest.mapto,"mapto",db);
     ReadField<ErrorPolicy_Igno>((int&)dest.blendtype,"blendtype",db);
     ReadField<ErrorPolicy_Igno>((int&)dest.blendtype,"blendtype",db);
@@ -137,7 +137,7 @@ template <> void Structure :: Convert<TFace> (
     TFace& dest,
     TFace& dest,
     const FileDatabase& db
     const FileDatabase& db
     ) const
     ) const
-{ 
+{
 
 
     ReadFieldArray2<ErrorPolicy_Fail>(dest.uv,"uv",db);
     ReadFieldArray2<ErrorPolicy_Fail>(dest.uv,"uv",db);
     ReadFieldArray<ErrorPolicy_Fail>(dest.col,"col",db);
     ReadFieldArray<ErrorPolicy_Fail>(dest.col,"col",db);
@@ -154,7 +154,7 @@ template <> void Structure :: Convert<SubsurfModifierData> (
     SubsurfModifierData& dest,
     SubsurfModifierData& dest,
     const FileDatabase& db
     const FileDatabase& db
     ) const
     ) const
-{ 
+{
 
 
     ReadField<ErrorPolicy_Fail>(dest.modifier,"modifier",db);
     ReadField<ErrorPolicy_Fail>(dest.modifier,"modifier",db);
     ReadField<ErrorPolicy_Warn>(dest.subdivType,"subdivType",db);
     ReadField<ErrorPolicy_Warn>(dest.subdivType,"subdivType",db);
@@ -170,7 +170,7 @@ template <> void Structure :: Convert<MFace> (
     MFace& dest,
     MFace& dest,
     const FileDatabase& db
     const FileDatabase& db
     ) const
     ) const
-{ 
+{
 
 
     ReadField<ErrorPolicy_Fail>(dest.v1,"v1",db);
     ReadField<ErrorPolicy_Fail>(dest.v1,"v1",db);
     ReadField<ErrorPolicy_Fail>(dest.v2,"v2",db);
     ReadField<ErrorPolicy_Fail>(dest.v2,"v2",db);
@@ -187,7 +187,7 @@ template <> void Structure :: Convert<Lamp> (
     Lamp& dest,
     Lamp& dest,
     const FileDatabase& db
     const FileDatabase& db
     ) const
     ) const
-{ 
+{
 
 
     ReadField<ErrorPolicy_Fail>(dest.id,"id",db);
     ReadField<ErrorPolicy_Fail>(dest.id,"id",db);
     ReadField<ErrorPolicy_Fail>((int&)dest.type,"type",db);
     ReadField<ErrorPolicy_Fail>((int&)dest.type,"type",db);
@@ -215,7 +215,7 @@ template <> void Structure :: Convert<MDeformWeight> (
     MDeformWeight& dest,
     MDeformWeight& dest,
     const FileDatabase& db
     const FileDatabase& db
     ) const
     ) const
-{ 
+{
 
 
     ReadField<ErrorPolicy_Fail>(dest.def_nr,"def_nr",db);
     ReadField<ErrorPolicy_Fail>(dest.def_nr,"def_nr",db);
     ReadField<ErrorPolicy_Fail>(dest.weight,"weight",db);
     ReadField<ErrorPolicy_Fail>(dest.weight,"weight",db);
@@ -228,7 +228,7 @@ template <> void Structure :: Convert<PackedFile> (
     PackedFile& dest,
     PackedFile& dest,
     const FileDatabase& db
     const FileDatabase& db
     ) const
     ) const
-{ 
+{
 
 
     ReadField<ErrorPolicy_Warn>(dest.size,"size",db);
     ReadField<ErrorPolicy_Warn>(dest.size,"size",db);
     ReadField<ErrorPolicy_Warn>(dest.seek,"seek",db);
     ReadField<ErrorPolicy_Warn>(dest.seek,"seek",db);
@@ -242,7 +242,7 @@ template <> void Structure :: Convert<Base> (
     Base& dest,
     Base& dest,
     const FileDatabase& db
     const FileDatabase& db
     ) const
     ) const
-{ 
+{
 	// note: as per https://github.com/assimp/assimp/issues/128,
 	// note: as per https://github.com/assimp/assimp/issues/128,
 	// reading the Object linked list recursively is prone to stack overflow.
 	// reading the Object linked list recursively is prone to stack overflow.
 	// This structure converter is therefore an hand-written exception that
 	// This structure converter is therefore an hand-written exception that
@@ -252,7 +252,7 @@ template <> void Structure :: Convert<Base> (
 
 
 	std::pair<Base*, int> todo = std::make_pair(&dest, initial_pos);
 	std::pair<Base*, int> todo = std::make_pair(&dest, initial_pos);
 	for ( ;; ) {
 	for ( ;; ) {
-	
+
 		Base& cur_dest = *todo.first;
 		Base& cur_dest = *todo.first;
 		db.reader->SetCurrentPos(todo.second);
 		db.reader->SetCurrentPos(todo.second);
 
 
@@ -262,7 +262,7 @@ template <> void Structure :: Convert<Base> (
 
 
 		ReadFieldPtr<ErrorPolicy_Warn>(cur_dest.object,"*object",db);
 		ReadFieldPtr<ErrorPolicy_Warn>(cur_dest.object,"*object",db);
 
 
-		// the return value of ReadFieldPtr indicates whether the object 
+		// the return value of ReadFieldPtr indicates whether the object
 		// was already cached. In this case, we don't need to resolve
 		// was already cached. In this case, we don't need to resolve
 		// it again.
 		// it again.
 		if(!ReadFieldPtr<ErrorPolicy_Warn>(cur_dest.next,"*next",db, true) && cur_dest.next) {
 		if(!ReadFieldPtr<ErrorPolicy_Warn>(cur_dest.next,"*next",db, true) && cur_dest.next) {
@@ -271,7 +271,7 @@ template <> void Structure :: Convert<Base> (
 		}
 		}
 		break;
 		break;
 	}
 	}
-	
+
 	db.reader->SetCurrentPos(initial_pos + size);
 	db.reader->SetCurrentPos(initial_pos + size);
 }
 }
 
 
@@ -280,7 +280,7 @@ template <> void Structure :: Convert<MTFace> (
     MTFace& dest,
     MTFace& dest,
     const FileDatabase& db
     const FileDatabase& db
     ) const
     ) const
-{ 
+{
 
 
     ReadFieldArray2<ErrorPolicy_Fail>(dest.uv,"uv",db);
     ReadFieldArray2<ErrorPolicy_Fail>(dest.uv,"uv",db);
     ReadField<ErrorPolicy_Igno>(dest.flag,"flag",db);
     ReadField<ErrorPolicy_Igno>(dest.flag,"flag",db);
@@ -296,7 +296,7 @@ template <> void Structure :: Convert<Material> (
     Material& dest,
     Material& dest,
     const FileDatabase& db
     const FileDatabase& db
     ) const
     ) const
-{ 
+{
 
 
     ReadField<ErrorPolicy_Fail>(dest.id,"id",db);
     ReadField<ErrorPolicy_Fail>(dest.id,"id",db);
     ReadField<ErrorPolicy_Warn>(dest.r,"r",db);
     ReadField<ErrorPolicy_Warn>(dest.r,"r",db);
@@ -332,7 +332,7 @@ template <> void Structure :: Convert<MTexPoly> (
     MTexPoly& dest,
     MTexPoly& dest,
     const FileDatabase& db
     const FileDatabase& db
     ) const
     ) const
-{ 
+{
 
 
     {
     {
         boost::shared_ptr<Image> tpage;
         boost::shared_ptr<Image> tpage;
@@ -353,7 +353,7 @@ template <> void Structure :: Convert<Mesh> (
     Mesh& dest,
     Mesh& dest,
     const FileDatabase& db
     const FileDatabase& db
     ) const
     ) const
-{ 
+{
 
 
     ReadField<ErrorPolicy_Fail>(dest.id,"id",db);
     ReadField<ErrorPolicy_Fail>(dest.id,"id",db);
     ReadField<ErrorPolicy_Fail>(dest.totface,"totface",db);
     ReadField<ErrorPolicy_Fail>(dest.totface,"totface",db);
@@ -387,7 +387,7 @@ template <> void Structure :: Convert<MDeformVert> (
     MDeformVert& dest,
     MDeformVert& dest,
     const FileDatabase& db
     const FileDatabase& db
     ) const
     ) const
-{ 
+{
 
 
     ReadFieldPtr<ErrorPolicy_Warn>(dest.dw,"*dw",db);
     ReadFieldPtr<ErrorPolicy_Warn>(dest.dw,"*dw",db);
     ReadField<ErrorPolicy_Igno>(dest.totweight,"totweight",db);
     ReadField<ErrorPolicy_Igno>(dest.totweight,"totweight",db);
@@ -400,7 +400,7 @@ template <> void Structure :: Convert<World> (
     World& dest,
     World& dest,
     const FileDatabase& db
     const FileDatabase& db
     ) const
     ) const
-{ 
+{
 
 
     ReadField<ErrorPolicy_Fail>(dest.id,"id",db);
     ReadField<ErrorPolicy_Fail>(dest.id,"id",db);
 
 
@@ -412,7 +412,7 @@ template <> void Structure :: Convert<MLoopCol> (
     MLoopCol& dest,
     MLoopCol& dest,
     const FileDatabase& db
     const FileDatabase& db
     ) const
     ) const
-{ 
+{
 
 
     ReadField<ErrorPolicy_Igno>(dest.r,"r",db);
     ReadField<ErrorPolicy_Igno>(dest.r,"r",db);
     ReadField<ErrorPolicy_Igno>(dest.g,"g",db);
     ReadField<ErrorPolicy_Igno>(dest.g,"g",db);
@@ -427,7 +427,7 @@ template <> void Structure :: Convert<MVert> (
     MVert& dest,
     MVert& dest,
     const FileDatabase& db
     const FileDatabase& db
     ) const
     ) const
-{ 
+{
 
 
     ReadFieldArray<ErrorPolicy_Fail>(dest.co,"co",db);
     ReadFieldArray<ErrorPolicy_Fail>(dest.co,"co",db);
     ReadFieldArray<ErrorPolicy_Fail>(dest.no,"no",db);
     ReadFieldArray<ErrorPolicy_Fail>(dest.no,"no",db);
@@ -443,7 +443,7 @@ template <> void Structure :: Convert<MEdge> (
     MEdge& dest,
     MEdge& dest,
     const FileDatabase& db
     const FileDatabase& db
     ) const
     ) const
-{ 
+{
 
 
     ReadField<ErrorPolicy_Fail>(dest.v1,"v1",db);
     ReadField<ErrorPolicy_Fail>(dest.v1,"v1",db);
     ReadField<ErrorPolicy_Fail>(dest.v2,"v2",db);
     ReadField<ErrorPolicy_Fail>(dest.v2,"v2",db);
@@ -459,7 +459,7 @@ template <> void Structure :: Convert<MLoopUV> (
     MLoopUV& dest,
     MLoopUV& dest,
     const FileDatabase& db
     const FileDatabase& db
     ) const
     ) const
-{ 
+{
 
 
     ReadFieldArray<ErrorPolicy_Igno>(dest.uv,"uv",db);
     ReadFieldArray<ErrorPolicy_Igno>(dest.uv,"uv",db);
     ReadField<ErrorPolicy_Igno>(dest.flag,"flag",db);
     ReadField<ErrorPolicy_Igno>(dest.flag,"flag",db);
@@ -472,7 +472,7 @@ template <> void Structure :: Convert<GroupObject> (
     GroupObject& dest,
     GroupObject& dest,
     const FileDatabase& db
     const FileDatabase& db
     ) const
     ) const
-{ 
+{
 
 
     ReadFieldPtr<ErrorPolicy_Fail>(dest.prev,"*prev",db);
     ReadFieldPtr<ErrorPolicy_Fail>(dest.prev,"*prev",db);
     ReadFieldPtr<ErrorPolicy_Fail>(dest.next,"*next",db);
     ReadFieldPtr<ErrorPolicy_Fail>(dest.next,"*next",db);
@@ -486,7 +486,7 @@ template <> void Structure :: Convert<ListBase> (
     ListBase& dest,
     ListBase& dest,
     const FileDatabase& db
     const FileDatabase& db
     ) const
     ) const
-{ 
+{
 
 
     ReadFieldPtr<ErrorPolicy_Igno>(dest.first,"*first",db);
     ReadFieldPtr<ErrorPolicy_Igno>(dest.first,"*first",db);
     ReadFieldPtr<ErrorPolicy_Igno>(dest.last,"*last",db);
     ReadFieldPtr<ErrorPolicy_Igno>(dest.last,"*last",db);
@@ -499,7 +499,7 @@ template <> void Structure :: Convert<MLoop> (
     MLoop& dest,
     MLoop& dest,
     const FileDatabase& db
     const FileDatabase& db
     ) const
     ) const
-{ 
+{
 
 
     ReadField<ErrorPolicy_Igno>(dest.v,"v",db);
     ReadField<ErrorPolicy_Igno>(dest.v,"v",db);
     ReadField<ErrorPolicy_Igno>(dest.e,"e",db);
     ReadField<ErrorPolicy_Igno>(dest.e,"e",db);
@@ -512,7 +512,7 @@ template <> void Structure :: Convert<ModifierData> (
     ModifierData& dest,
     ModifierData& dest,
     const FileDatabase& db
     const FileDatabase& db
     ) const
     ) const
-{ 
+{
 
 
     ReadFieldPtr<ErrorPolicy_Warn>(dest.next,"*next",db);
     ReadFieldPtr<ErrorPolicy_Warn>(dest.next,"*next",db);
     ReadFieldPtr<ErrorPolicy_Warn>(dest.prev,"*prev",db);
     ReadFieldPtr<ErrorPolicy_Warn>(dest.prev,"*prev",db);
@@ -528,7 +528,7 @@ template <> void Structure :: Convert<ID> (
     ID& dest,
     ID& dest,
     const FileDatabase& db
     const FileDatabase& db
     ) const
     ) const
-{ 
+{
 
 
     ReadFieldArray<ErrorPolicy_Warn>(dest.name,"name",db);
     ReadFieldArray<ErrorPolicy_Warn>(dest.name,"name",db);
     ReadField<ErrorPolicy_Igno>(dest.flag,"flag",db);
     ReadField<ErrorPolicy_Igno>(dest.flag,"flag",db);
@@ -541,7 +541,7 @@ template <> void Structure :: Convert<MCol> (
     MCol& dest,
     MCol& dest,
     const FileDatabase& db
     const FileDatabase& db
     ) const
     ) const
-{ 
+{
 
 
     ReadField<ErrorPolicy_Fail>(dest.r,"r",db);
     ReadField<ErrorPolicy_Fail>(dest.r,"r",db);
     ReadField<ErrorPolicy_Fail>(dest.g,"g",db);
     ReadField<ErrorPolicy_Fail>(dest.g,"g",db);
@@ -556,7 +556,7 @@ template <> void Structure :: Convert<MPoly> (
     MPoly& dest,
     MPoly& dest,
     const FileDatabase& db
     const FileDatabase& db
     ) const
     ) const
-{ 
+{
 
 
     ReadField<ErrorPolicy_Igno>(dest.loopstart,"loopstart",db);
     ReadField<ErrorPolicy_Igno>(dest.loopstart,"loopstart",db);
     ReadField<ErrorPolicy_Igno>(dest.totloop,"totloop",db);
     ReadField<ErrorPolicy_Igno>(dest.totloop,"totloop",db);
@@ -571,7 +571,7 @@ template <> void Structure :: Convert<Scene> (
     Scene& dest,
     Scene& dest,
     const FileDatabase& db
     const FileDatabase& db
     ) const
     ) const
-{ 
+{
 
 
     ReadField<ErrorPolicy_Fail>(dest.id,"id",db);
     ReadField<ErrorPolicy_Fail>(dest.id,"id",db);
     ReadFieldPtr<ErrorPolicy_Warn>(dest.camera,"*camera",db);
     ReadFieldPtr<ErrorPolicy_Warn>(dest.camera,"*camera",db);
@@ -587,7 +587,7 @@ template <> void Structure :: Convert<Library> (
     Library& dest,
     Library& dest,
     const FileDatabase& db
     const FileDatabase& db
     ) const
     ) const
-{ 
+{
 
 
     ReadField<ErrorPolicy_Fail>(dest.id,"id",db);
     ReadField<ErrorPolicy_Fail>(dest.id,"id",db);
     ReadFieldArray<ErrorPolicy_Warn>(dest.name,"name",db);
     ReadFieldArray<ErrorPolicy_Warn>(dest.name,"name",db);
@@ -602,7 +602,7 @@ template <> void Structure :: Convert<Tex> (
     Tex& dest,
     Tex& dest,
     const FileDatabase& db
     const FileDatabase& db
     ) const
     ) const
-{ 
+{
     ReadField<ErrorPolicy_Igno>((short&)dest.imaflag,"imaflag",db);
     ReadField<ErrorPolicy_Igno>((short&)dest.imaflag,"imaflag",db);
     ReadField<ErrorPolicy_Fail>((int&)dest.type,"type",db);
     ReadField<ErrorPolicy_Fail>((int&)dest.type,"type",db);
     ReadFieldPtr<ErrorPolicy_Warn>(dest.ima,"*ima",db);
     ReadFieldPtr<ErrorPolicy_Warn>(dest.ima,"*ima",db);
@@ -615,7 +615,7 @@ template <> void Structure :: Convert<Camera> (
     Camera& dest,
     Camera& dest,
     const FileDatabase& db
     const FileDatabase& db
     ) const
     ) const
-{ 
+{
 
 
     ReadField<ErrorPolicy_Fail>(dest.id,"id",db);
     ReadField<ErrorPolicy_Fail>(dest.id,"id",db);
     ReadField<ErrorPolicy_Warn>((int&)dest.type,"type",db);
     ReadField<ErrorPolicy_Warn>((int&)dest.type,"type",db);
@@ -630,7 +630,7 @@ template <> void Structure :: Convert<MirrorModifierData> (
     MirrorModifierData& dest,
     MirrorModifierData& dest,
     const FileDatabase& db
     const FileDatabase& db
     ) const
     ) const
-{ 
+{
 
 
     ReadField<ErrorPolicy_Fail>(dest.modifier,"modifier",db);
     ReadField<ErrorPolicy_Fail>(dest.modifier,"modifier",db);
     ReadField<ErrorPolicy_Igno>(dest.axis,"axis",db);
     ReadField<ErrorPolicy_Igno>(dest.axis,"axis",db);
@@ -646,7 +646,7 @@ template <> void Structure :: Convert<Image> (
     Image& dest,
     Image& dest,
     const FileDatabase& db
     const FileDatabase& db
     ) const
     ) const
-{ 
+{
 
 
     ReadField<ErrorPolicy_Fail>(dest.id,"id",db);
     ReadField<ErrorPolicy_Fail>(dest.id,"id",db);
     ReadFieldArray<ErrorPolicy_Warn>(dest.name,"name",db);
     ReadFieldArray<ErrorPolicy_Warn>(dest.name,"name",db);

+ 38 - 38
code/BlenderScene.h

@@ -5,8 +5,8 @@ Open Asset Import Library (assimp)
 Copyright (c) 2006-2015, assimp team
 Copyright (c) 2006-2015, assimp team
 All rights reserved.
 All rights reserved.
 
 
-Redistribution and use of this software in source and binary forms, 
-with or without modification, are permitted provided that the 
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the
 following conditions are met:
 following conditions are met:
 
 
 * Redistributions of source code must retain the above
 * Redistributions of source code must retain the above
@@ -23,16 +23,16 @@ following conditions are met:
   derived from this software without specific prior
   derived from this software without specific prior
   written permission of the assimp team.
   written permission of the assimp team.
 
 
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+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
 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 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 
+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.
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
@@ -58,13 +58,13 @@ namespace Assimp	{
 // this file serves as input data to the `./scripts/genblenddna.py`
 // this file serves as input data to the `./scripts/genblenddna.py`
 // script. This script generates the actual binding code to read a
 // script. This script generates the actual binding code to read a
 // blender file with a possibly different DNA into our structures.
 // blender file with a possibly different DNA into our structures.
-// Only `struct` declarations are considered and the following 
+// Only `struct` declarations are considered and the following
 // rules must be obeyed in order for the script to work properly:
 // rules must be obeyed in order for the script to work properly:
 //
 //
 // * C++ style comments only
 // * C++ style comments only
 //
 //
 // * Structures may include the primitive types char, int, short,
 // * Structures may include the primitive types char, int, short,
-//   float, double. Signedness specifiers are not allowed on 
+//   float, double. Signedness specifiers are not allowed on
 //	 integers. Enum types are allowed, but they must have been
 //	 integers. Enum types are allowed, but they must have been
 //   defined in this header.
 //   defined in this header.
 //
 //
@@ -103,13 +103,13 @@ struct Image;
 // -------------------------------------------------------------------------------
 // -------------------------------------------------------------------------------
 struct ID : ElemBase {
 struct ID : ElemBase {
 
 
-	char name[24] WARN; 
+	char name[24] WARN;
 	short flag;
 	short flag;
 };
 };
 
 
 // -------------------------------------------------------------------------------
 // -------------------------------------------------------------------------------
 struct ListBase : ElemBase {
 struct ListBase : ElemBase {
-    
+
 	boost::shared_ptr<ElemBase> first;
 	boost::shared_ptr<ElemBase> first;
 	boost::shared_ptr<ElemBase> last;
 	boost::shared_ptr<ElemBase> last;
 };
 };
@@ -124,7 +124,7 @@ struct PackedFile : ElemBase {
 
 
 // -------------------------------------------------------------------------------
 // -------------------------------------------------------------------------------
 struct GroupObject : ElemBase {
 struct GroupObject : ElemBase {
-	
+
 	boost::shared_ptr<GroupObject> prev,next FAIL;
 	boost::shared_ptr<GroupObject> prev,next FAIL;
 	boost::shared_ptr<Object> ob;
 	boost::shared_ptr<Object> ob;
 };
 };
@@ -140,7 +140,7 @@ struct Group : ElemBase {
 // -------------------------------------------------------------------------------
 // -------------------------------------------------------------------------------
 struct World : ElemBase {
 struct World : ElemBase {
 	ID id FAIL;
 	ID id FAIL;
-	
+
 };
 };
 
 
 // -------------------------------------------------------------------------------
 // -------------------------------------------------------------------------------
@@ -297,7 +297,7 @@ struct Mesh : ElemBase {
 // -------------------------------------------------------------------------------
 // -------------------------------------------------------------------------------
 struct Library : ElemBase {
 struct Library : ElemBase {
 	ID id FAIL;
 	ID id FAIL;
-	
+
 	char name[240] WARN;
 	char name[240] WARN;
 	char filename[240] FAIL;
 	char filename[240] FAIL;
 	boost::shared_ptr<Library> parent WARN;
 	boost::shared_ptr<Library> parent WARN;
@@ -312,7 +312,7 @@ struct Camera : ElemBase {
 
 
 	ID id FAIL;
 	ID id FAIL;
 
 
-	// struct AnimData *adt;  
+	// struct AnimData *adt;
 
 
 	Type type,flag WARN;
 	Type type,flag WARN;
 	float angle WARN;
 	float angle WARN;
@@ -348,29 +348,29 @@ struct Lamp : ElemBase {
 	};
 	};
 
 
       ID id FAIL;
       ID id FAIL;
-      //AnimData *adt;  
-      
+      //AnimData *adt;
+
       Type type FAIL;
       Type type FAIL;
 	  short flags;
 	  short flags;
 
 
       //int mode;
       //int mode;
-      
+
       short colormodel, totex;
       short colormodel, totex;
       float r,g,b,k WARN;
       float r,g,b,k WARN;
       //float shdwr, shdwg, shdwb;
       //float shdwr, shdwg, shdwb;
-      
+
       float energy, dist, spotsize, spotblend;
       float energy, dist, spotsize, spotblend;
       //float haint;
       //float haint;
-         
-      float att1, att2; 
+
+      float att1, att2;
       //struct CurveMapping *curfalloff;
       //struct CurveMapping *curfalloff;
       FalloffType falloff_type;
       FalloffType falloff_type;
-      
+
       //float clipsta, clipend, shadspotsize;
       //float clipsta, clipend, shadspotsize;
       //float bias, soft, compressthresh;
       //float bias, soft, compressthresh;
       //short bufsize, samp, buffers, filtertype;
       //short bufsize, samp, buffers, filtertype;
       //char bufflag, buftype;
       //char bufflag, buftype;
-      
+
       //short ray_samp, ray_sampy, ray_sampz;
       //short ray_samp, ray_sampy, ray_sampz;
       //short ray_samp_type;
       //short ray_samp_type;
       //short area_shape;
       //short area_shape;
@@ -402,11 +402,11 @@ struct Lamp : ElemBase {
 
 
 	  // float YF_glowint, YF_glowofs;
 	  // float YF_glowint, YF_glowofs;
       // short YF_glowtype, YF_pad2;
       // short YF_glowtype, YF_pad2;
-      
-      //struct Ipo *ipo;                    
-      //struct MTex *mtex[18];              
+
+      //struct Ipo *ipo;
+      //struct MTex *mtex[18];
       // short pr_texture;
       // short pr_texture;
-      
+
       //struct PreviewImage *preview;
       //struct PreviewImage *preview;
 };
 };
 
 
@@ -459,7 +459,7 @@ struct ModifierData : ElemBase  {
 struct SubsurfModifierData : ElemBase  {
 struct SubsurfModifierData : ElemBase  {
 
 
 	enum Type {
 	enum Type {
-		
+
 		TYPE_CatmullClarke = 0x0,
 		TYPE_CatmullClarke = 0x0,
 		TYPE_Simple = 0x1
 		TYPE_Simple = 0x1
 	};
 	};
@@ -519,7 +519,7 @@ struct Object : ElemBase  {
 	float obmat[4][4] WARN;
 	float obmat[4][4] WARN;
 	float parentinv[4][4] WARN;
 	float parentinv[4][4] WARN;
 	char parsubstr[32] WARN;
 	char parsubstr[32] WARN;
-	
+
 	Object* parent WARN;
 	Object* parent WARN;
 	boost::shared_ptr<Object> track WARN;
 	boost::shared_ptr<Object> track WARN;
 
 
@@ -554,7 +554,7 @@ struct Scene : ElemBase {
 struct Image : ElemBase {
 struct Image : ElemBase {
 	ID id FAIL;
 	ID id FAIL;
 
 
-	char name[240] WARN;               
+	char name[240] WARN;
 
 
 	//struct anim *anim;
 	//struct anim *anim;
 
 
@@ -565,8 +565,8 @@ struct Image : ElemBase {
 	short tpageflag, totbind;
 	short tpageflag, totbind;
 	short xrep, yrep;
 	short xrep, yrep;
 	short twsta, twend;
 	short twsta, twend;
-	//unsigned int bindcode;  
-	//unsigned int *repbind; 
+	//unsigned int bindcode;
+	//unsigned int *repbind;
 
 
 	boost::shared_ptr<PackedFile> packedfile;
 	boost::shared_ptr<PackedFile> packedfile;
 	//struct PreviewImage * preview;
 	//struct PreviewImage * preview;
@@ -575,7 +575,7 @@ struct Image : ElemBase {
 	int lastused;
 	int lastused;
 	short animspeed;
 	short animspeed;
 
 
-	short gen_x, gen_y, gen_type; 
+	short gen_x, gen_y, gen_type;
 };
 };
 
 
 // -------------------------------------------------------------------------------
 // -------------------------------------------------------------------------------
@@ -613,7 +613,7 @@ struct Tex : ElemBase {
 	};
 	};
 
 
 	ID id FAIL;
 	ID id FAIL;
-	// AnimData *adt; 
+	// AnimData *adt;
 
 
 	//float noisesize, turbul;
 	//float noisesize, turbul;
 	//float bright, contrast, rfac, gfac, bfac;
 	//float bright, contrast, rfac, gfac, bfac;
@@ -639,7 +639,7 @@ struct Tex : ElemBase {
 
 
 	//float cropxmin, cropymin, cropxmax, cropymax;
 	//float cropxmin, cropymin, cropxmax, cropymax;
 	//int texfilter;
 	//int texfilter;
-	//int afmax;  
+	//int afmax;
 	//short xrepeat, yrepeat;
 	//short xrepeat, yrepeat;
 	//short extend;
 	//short extend;
 
 
@@ -653,7 +653,7 @@ struct Tex : ElemBase {
 	//ImageUser iuser;
 	//ImageUser iuser;
 
 
 	//bNodeTree *nodetree;
 	//bNodeTree *nodetree;
-	//Ipo *ipo;                  
+	//Ipo *ipo;
 	boost::shared_ptr<Image> ima WARN;
 	boost::shared_ptr<Image> ima WARN;
 	//PluginTex *plugin;
 	//PluginTex *plugin;
 	//ColorBand *coba;
 	//ColorBand *coba;

+ 9 - 9
code/BlenderSceneGen.h

@@ -5,8 +5,8 @@ Open Asset Import Library (ASSIMP)
 Copyright (c) 2006-2010, ASSIMP Development Team
 Copyright (c) 2006-2010, ASSIMP Development Team
 All rights reserved.
 All rights reserved.
 
 
-Redistribution and use of this software in source and binary forms, 
-with or without modification, are permitted provided that the 
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the
 following conditions are met:
 following conditions are met:
 
 
 * Redistributions of source code must retain the above
 * Redistributions of source code must retain the above
@@ -23,16 +23,16 @@ following conditions are met:
   derived from this software without specific prior
   derived from this software without specific prior
   written permission of the ASSIMP Development Team.
   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 
+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
 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 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 
+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.
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------

+ 10 - 10
code/BlenderTessellator.cpp

@@ -5,8 +5,8 @@ Open Asset Import Library (assimp)
 Copyright (c) 2006-2013, assimp team
 Copyright (c) 2006-2013, assimp team
 All rights reserved.
 All rights reserved.
 
 
-Redistribution and use of this software in source and binary forms, 
-with or without modification, are permitted provided that the 
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the
 following conditions are met:
 following conditions are met:
 
 
 * Redistributions of source code must retain the above
 * Redistributions of source code must retain the above
@@ -23,16 +23,16 @@ following conditions are met:
   derived from this software without specific prior
   derived from this software without specific prior
   written permission of the assimp team.
   written permission of the assimp team.
 
 
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+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
 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 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 
+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.
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
@@ -465,7 +465,7 @@ aiVector3D BlenderTessellatorP2T::GetEigenVectorFromLargestEigenValue( const aiM
 		lastV = v;
 		lastV = v;
 	}
 	}
 	return v;
 	return v;
-} 
+}
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
 // Adapted from: http://missingbytes.blogspot.co.uk/2012/06/fitting-plane-to-point-cloud.html
 // Adapted from: http://missingbytes.blogspot.co.uk/2012/06/fitting-plane-to-point-cloud.html

+ 10 - 10
code/BlenderTessellator.h

@@ -5,8 +5,8 @@ Open Asset Import Library (assimp)
 Copyright (c) 2006-2013, assimp team
 Copyright (c) 2006-2013, assimp team
 All rights reserved.
 All rights reserved.
 
 
-Redistribution and use of this software in source and binary forms, 
-with or without modification, are permitted provided that the 
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the
 following conditions are met:
 following conditions are met:
 
 
 * Redistributions of source code must retain the above
 * Redistributions of source code must retain the above
@@ -23,16 +23,16 @@ following conditions are met:
   derived from this software without specific prior
   derived from this software without specific prior
   written permission of the assimp team.
   written permission of the assimp team.
 
 
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+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
 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 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 
+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.
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
@@ -46,7 +46,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
 // Use these to toggle between GLU Tessellate or poly2tri
 // Use these to toggle between GLU Tessellate or poly2tri
 // Note (acg) keep GLU Tesselate disabled by default - if it is turned on,
 // Note (acg) keep GLU Tesselate disabled by default - if it is turned on,
-// assimp needs to be linked against GLU, which is currently not yet 
+// assimp needs to be linked against GLU, which is currently not yet
 // made configurable in CMake and potentially not wanted by most users
 // made configurable in CMake and potentially not wanted by most users
 // as it requires a Gl environment.
 // as it requires a Gl environment.
 #ifndef ASSIMP_BLEND_WITH_GLU_TESSELLATE
 #ifndef ASSIMP_BLEND_WITH_GLU_TESSELLATE

+ 26 - 26
code/BlobIOSystem.h

@@ -7,8 +7,8 @@ Copyright (c) 2006-2015, assimp team
 
 
 All rights reserved.
 All rights reserved.
 
 
-Redistribution and use of this software in source and binary forms, 
-with or without modification, are permitted provided that the following 
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the following
 conditions are met:
 conditions are met:
 
 
 * Redistributions of source code must retain the above
 * Redistributions of source code must retain the above
@@ -25,16 +25,16 @@ conditions are met:
   derived from this software without specific prior
   derived from this software without specific prior
   written permission of the assimp team.
   written permission of the assimp team.
 
 
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+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
 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 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 
+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.
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 ---------------------------------------------------------------------------
 ---------------------------------------------------------------------------
 */
 */
@@ -97,17 +97,17 @@ public:
 
 
 
 
 	// -------------------------------------------------------------------
 	// -------------------------------------------------------------------
-    virtual size_t Read( void *, 
-		size_t, 
-		size_t ) 
+    virtual size_t Read( void *,
+		size_t,
+		size_t )
 	{
 	{
 		return 0;
 		return 0;
 	}
 	}
 
 
 	// -------------------------------------------------------------------
 	// -------------------------------------------------------------------
-    virtual size_t Write(const void* pvBuffer, 
+    virtual size_t Write(const void* pvBuffer,
 		size_t pSize,
 		size_t pSize,
-		size_t pCount) 
+		size_t pCount)
 	{
 	{
 		pSize *= pCount;
 		pSize *= pCount;
 		if (cursor + pSize > cur_size) {
 		if (cursor + pSize > cur_size) {
@@ -118,14 +118,14 @@ public:
 		cursor += pSize;
 		cursor += pSize;
 
 
 		file_size = std::max(file_size,cursor);
 		file_size = std::max(file_size,cursor);
-		return pCount; 
+		return pCount;
 	}
 	}
 
 
 	// -------------------------------------------------------------------
 	// -------------------------------------------------------------------
 	virtual aiReturn Seek(size_t pOffset,
 	virtual aiReturn Seek(size_t pOffset,
 		aiOrigin pOrigin)
 		aiOrigin pOrigin)
 	{
 	{
-		switch(pOrigin) 
+		switch(pOrigin)
 		{
 		{
 		case aiOrigin_CUR:
 		case aiOrigin_CUR:
 			cursor += pOffset;
 			cursor += pOffset;
@@ -164,7 +164,7 @@ public:
 	}
 	}
 
 
 	// -------------------------------------------------------------------
 	// -------------------------------------------------------------------
-	virtual void Flush() 
+	virtual void Flush()
 	{
 	{
 		// ignore
 		// ignore
 	}
 	}
@@ -174,12 +174,12 @@ public:
 private:
 private:
 
 
 	// -------------------------------------------------------------------
 	// -------------------------------------------------------------------
-	void Grow(size_t need = 0) 
+	void Grow(size_t need = 0)
 	{
 	{
 		// 1.5 and phi are very heap-friendly growth factors (the first
 		// 1.5 and phi are very heap-friendly growth factors (the first
 		// allows for frequent re-use of heap blocks, the second
 		// allows for frequent re-use of heap blocks, the second
 		// forms a fibonacci sequence with similar characteristics -
 		// forms a fibonacci sequence with similar characteristics -
-		// since this heavily depends on the heap implementation 
+		// since this heavily depends on the heap implementation
 		// and other factors as well, i'll just go with 1.5 since
 		// and other factors as well, i'll just go with 1.5 since
 		// it is quicker to compute).
 		// it is quicker to compute).
 		size_t new_size = std::max(initial, std::max( need, cur_size+(cur_size>>1) ));
 		size_t new_size = std::max(initial, std::max( need, cur_size+(cur_size>>1) ));
@@ -232,7 +232,7 @@ public:
 public:
 public:
 
 
 	// -------------------------------------------------------------------
 	// -------------------------------------------------------------------
-	const char* GetMagicFileName() const 
+	const char* GetMagicFileName() const
 	{
 	{
 		return AI_BLOBIO_MAGIC;
 		return AI_BLOBIO_MAGIC;
 	}
 	}
@@ -302,7 +302,7 @@ public:
 	}
 	}
 
 
 	// -------------------------------------------------------------------
 	// -------------------------------------------------------------------
-	virtual void Close( IOStream* pFile) 
+	virtual void Close( IOStream* pFile)
 	{
 	{
 		delete pFile;
 		delete pFile;
 	}
 	}
@@ -310,10 +310,10 @@ public:
 private:
 private:
 
 
 	// -------------------------------------------------------------------
 	// -------------------------------------------------------------------
-	void OnDestruct(const std::string& filename, BlobIOStream* child) 
-	{	
+	void OnDestruct(const std::string& filename, BlobIOStream* child)
+	{
 		// we don't know in which the files are closed, so we
 		// we don't know in which the files are closed, so we
-		// can't reliably say that the first must be the master 
+		// can't reliably say that the first must be the master
 		// file ...
 		// file ...
 		blobs.push_back( BlobEntry(filename,child->GetBlob()) );
 		blobs.push_back( BlobEntry(filename,child->GetBlob()) );
 	}
 	}
@@ -325,13 +325,13 @@ private:
 
 
 
 
 // --------------------------------------------------------------------------------------------
 // --------------------------------------------------------------------------------------------
-BlobIOStream :: ~BlobIOStream() 
+BlobIOStream :: ~BlobIOStream()
 {
 {
 	creator->OnDestruct(file,this);
 	creator->OnDestruct(file,this);
 	delete[] buffer;
 	delete[] buffer;
 }
 }
 
 
-	
+
 } // end Assimp
 } // end Assimp
 
 
 #endif
 #endif

+ 28 - 28
code/C4DImporter.cpp

@@ -5,8 +5,8 @@ Open Asset Import Library (assimp)
 Copyright (c) 2006-2012, assimp team
 Copyright (c) 2006-2012, assimp team
 All rights reserved.
 All rights reserved.
 
 
-Redistribution and use of this software in source and binary forms, 
-with or without modification, are permitted provided that the 
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the
 following conditions are met:
 following conditions are met:
 
 
 * Redistributions of source code must retain the above
 * Redistributions of source code must retain the above
@@ -23,16 +23,16 @@ following conditions are met:
   derived from this software without specific prior
   derived from this software without specific prior
   written permission of the assimp team.
   written permission of the assimp team.
 
 
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+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
 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 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 
+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.
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
@@ -44,11 +44,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #ifndef ASSIMP_BUILD_NO_C4D_IMPORTER
 #ifndef ASSIMP_BUILD_NO_C4D_IMPORTER
 
 
 // no #ifdefing here, Cinema4D support is carried out in a branch of assimp
 // no #ifdefing here, Cinema4D support is carried out in a branch of assimp
-// where it is turned on in the CMake settings. 
+// where it is turned on in the CMake settings.
 
 
 #ifndef _MSC_VER
 #ifndef _MSC_VER
 #	error C4D support is currently MSVC only
 #	error C4D support is currently MSVC only
-#endif 
+#endif
 
 
 #include "C4DImporter.h"
 #include "C4DImporter.h"
 #include "TinyFormatter.h"
 #include "TinyFormatter.h"
@@ -57,7 +57,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #	define __C4D_64BIT
 #	define __C4D_64BIT
 #endif
 #endif
 
 
-#define __PC 
+#define __PC
 #include "c4d_file.h"
 #include "c4d_file.h"
 #include "default_alien_overloads.h"
 #include "default_alien_overloads.h"
 
 
@@ -66,7 +66,7 @@ using namespace _melange_;
 // overload this function and fill in your own unique data
 // overload this function and fill in your own unique data
 void GetWriterInfo(LONG &id, String &appname)
 void GetWriterInfo(LONG &id, String &appname)
 {
 {
-	id = 2424226; 
+	id = 2424226;
 	appname = "Open Asset Import Library";
 	appname = "Open Asset Import Library";
 }
 }
 
 
@@ -127,8 +127,8 @@ void C4DImporter::SetupProperties(const Importer* /*pImp*/)
 
 
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-// Imports the given file into the given scene structure. 
-void C4DImporter::InternReadFile( const std::string& pFile, 
+// Imports the given file into the given scene structure.
+void C4DImporter::InternReadFile( const std::string& pFile,
 	aiScene* pScene, IOSystem* pIOHandler)
 	aiScene* pScene, IOSystem* pIOHandler)
 {
 {
 	boost::scoped_ptr<IOStream> file( pIOHandler->Open( pFile));
 	boost::scoped_ptr<IOStream> file( pIOHandler->Open( pFile));
@@ -141,7 +141,7 @@ void C4DImporter::InternReadFile( const std::string& pFile,
 
 
 	std::vector<uint8_t> mBuffer(file_size);
 	std::vector<uint8_t> mBuffer(file_size);
 	file->Read(&mBuffer[0], 1, file_size);
 	file->Read(&mBuffer[0], 1, file_size);
-	
+
 	Filename f;
 	Filename f;
 	f.SetMemoryReadMode(&mBuffer[0], file_size);
 	f.SetMemoryReadMode(&mBuffer[0], file_size);
 
 
@@ -197,7 +197,7 @@ void C4DImporter::InternReadFile( const std::string& pFile,
 
 
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-bool C4DImporter::ReadShader(aiMaterial* out, _melange_::BaseShader* shader) 
+bool C4DImporter::ReadShader(aiMaterial* out, _melange_::BaseShader* shader)
 {
 {
 	// based on Melange sample code (C4DImportExport.cpp)
 	// based on Melange sample code (C4DImportExport.cpp)
 	while(shader) {
 	while(shader) {
@@ -220,13 +220,13 @@ bool C4DImporter::ReadShader(aiMaterial* out, _melange_::BaseShader* shader)
 			{
 			{
 				if (lsl->GetType() == TypeFolder)
 				if (lsl->GetType() == TypeFolder)
 				{
 				{
-					BlendFolder* const folder = dynamic_cast<BlendFolder*>(lsl); 
+					BlendFolder* const folder = dynamic_cast<BlendFolder*>(lsl);
 					LayerShaderLayer *subLsl = dynamic_cast<LayerShaderLayer*>(folder->m_Children.GetObject(0));
 					LayerShaderLayer *subLsl = dynamic_cast<LayerShaderLayer*>(folder->m_Children.GetObject(0));
 
 
 					while (subLsl)
 					while (subLsl)
 					{
 					{
 						if (subLsl->GetType() == TypeShader) {
 						if (subLsl->GetType() == TypeShader) {
-							BlendShader* const shader = dynamic_cast<BlendShader*>(subLsl); 
+							BlendShader* const shader = dynamic_cast<BlendShader*>(subLsl);
 							if(ReadShader(out, static_cast<BaseShader*>(shader->m_pLink->GetLink()))) {
 							if(ReadShader(out, static_cast<BaseShader*>(shader->m_pLink->GetLink()))) {
 								return true;
 								return true;
 							}
 							}
@@ -236,13 +236,13 @@ bool C4DImporter::ReadShader(aiMaterial* out, _melange_::BaseShader* shader)
 					}
 					}
 				}
 				}
 				else if (lsl->GetType() == TypeShader) {
 				else if (lsl->GetType() == TypeShader) {
-					BlendShader* const shader = dynamic_cast<BlendShader*>(lsl); 
+					BlendShader* const shader = dynamic_cast<BlendShader*>(lsl);
 					if(ReadShader(out, static_cast<BaseShader*>(shader->m_pLink->GetLink()))) {
 					if(ReadShader(out, static_cast<BaseShader*>(shader->m_pLink->GetLink()))) {
 						return true;
 						return true;
 					}
 					}
 				}
 				}
 
 
-				lsl = lsl->GetNext();	
+				lsl = lsl->GetNext();
 			}
 			}
 		}
 		}
 		else if ( shader->GetType() == Xbitmap )
 		else if ( shader->GetType() == Xbitmap )
@@ -322,8 +322,8 @@ void C4DImporter::RecurseHierarchy(BaseObject* object, aiNode* parent)
 	while (object)
 	while (object)
 	{
 	{
 		const String& name = object->GetName();
 		const String& name = object->GetName();
-		const LONG type = object->GetType(); 
-		const Matrix& ml = object->GetMl(); 
+		const LONG type = object->GetType();
+		const Matrix& ml = object->GetMl();
 
 
 		aiString string;
 		aiString string;
 		name.GetCString(string.data, MAXLEN-1);
 		name.GetCString(string.data, MAXLEN-1);
@@ -350,8 +350,8 @@ void C4DImporter::RecurseHierarchy(BaseObject* object, aiNode* parent)
 		nd->mTransformation.c4 = ml.off.z;
 		nd->mTransformation.c4 = ml.off.z;
 
 
 		nodes.push_back(nd);
 		nodes.push_back(nd);
-		
-		GeData data; 
+
+		GeData data;
 		if (type == Ocamera)
 		if (type == Ocamera)
 		{
 		{
 			object->GetParameter(CAMERAOBJECT_FOV, data);
 			object->GetParameter(CAMERAOBJECT_FOV, data);
@@ -374,7 +374,7 @@ void C4DImporter::RecurseHierarchy(BaseObject* object, aiNode* parent)
 		else {
 		else {
 			LogWarn("ignoring object: " + std::string(GetObjectTypeName(type)));
 			LogWarn("ignoring object: " + std::string(GetObjectTypeName(type)));
 		}
 		}
-		
+
 		RecurseHierarchy(object->GetDown(), nd);
 		RecurseHierarchy(object->GetDown(), nd);
 		object = object->GetNext();
 		object = object->GetNext();
 	}
 	}
@@ -421,7 +421,7 @@ aiMesh* C4DImporter::ReadMesh(BaseObject* object)
 	for (LONG i = 0; i < polyCount; i++)
 	for (LONG i = 0; i < polyCount; i++)
 	{
 	{
 		vcount += 3;
 		vcount += 3;
-		
+
 		// TODO: do we also need to handle lines or points with similar checks?
 		// TODO: do we also need to handle lines or points with similar checks?
 		if (polys[i].c != polys[i].d)
 		if (polys[i].c != polys[i].d)
 		{
 		{
@@ -538,7 +538,7 @@ aiMesh* C4DImporter::ReadMesh(BaseObject* object)
 
 
 		// copy tangents and bitangents
 		// copy tangents and bitangents
 		if (tangents_src) {
 		if (tangents_src) {
-			
+
 			for(unsigned int k = 0; k < face->mNumIndices; ++k) {
 			for(unsigned int k = 0; k < face->mNumIndices; ++k) {
 				LONG l;
 				LONG l;
 				switch(k) {
 				switch(k) {

+ 10 - 10
code/C4DImporter.h

@@ -5,8 +5,8 @@ Open Asset Import Library (assimp)
 Copyright (c) 2006-2012, assimp team
 Copyright (c) 2006-2012, assimp team
 All rights reserved.
 All rights reserved.
 
 
-Redistribution and use of this software in source and binary forms, 
-with or without modification, are permitted provided that the 
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the
 following conditions are met:
 following conditions are met:
 
 
 * Redistributions of source code must retain the above
 * Redistributions of source code must retain the above
@@ -23,16 +23,16 @@ following conditions are met:
   derived from this software without specific prior
   derived from this software without specific prior
   written permission of the assimp team.
   written permission of the assimp team.
 
 
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+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
 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 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 
+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.
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
@@ -98,7 +98,7 @@ protected:
 	void SetupProperties(const Importer* pImp);
 	void SetupProperties(const Importer* pImp);
 
 
 	// --------------------
 	// --------------------
-	void InternReadFile( const std::string& pFile, aiScene* pScene, 
+	void InternReadFile( const std::string& pFile, aiScene* pScene,
 		IOSystem* pIOHandler);
 		IOSystem* pIOHandler);
 
 
 private:
 private:

+ 14 - 14
code/CInterfaceIOWrapper.h

@@ -7,8 +7,8 @@ Copyright (c) 2006-2015, assimp team
 
 
 All rights reserved.
 All rights reserved.
 
 
-Redistribution and use of this software in source and binary forms, 
-with or without modification, are permitted provided that the following 
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the following
 conditions are met:
 conditions are met:
 
 
 * Redistributions of source code must retain the above
 * Redistributions of source code must retain the above
@@ -25,16 +25,16 @@ conditions are met:
   derived from this software without specific prior
   derived from this software without specific prior
   written permission of the assimp team.
   written permission of the assimp team.
 
 
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+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
 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 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 
+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.
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 ---------------------------------------------------------------------------
 ---------------------------------------------------------------------------
 */
 */
@@ -49,7 +49,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include "../include/assimp/IOSystem.hpp"
 #include "../include/assimp/IOSystem.hpp"
 
 
 namespace Assimp	{
 namespace Assimp	{
-	
+
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
 // Custom IOStream implementation for the C-API
 // Custom IOStream implementation for the C-API
 class CIOStreamWrapper : public IOStream
 class CIOStreamWrapper : public IOStream
@@ -62,8 +62,8 @@ public:
 	{}
 	{}
 
 
 	// ...................................................................
 	// ...................................................................
-	size_t Read(void* pvBuffer, 
-		size_t pSize, 
+	size_t Read(void* pvBuffer,
+		size_t pSize,
 		size_t pCount
 		size_t pCount
 	){
 	){
 		// need to typecast here as C has no void*
 		// need to typecast here as C has no void*
@@ -71,7 +71,7 @@ public:
 	}
 	}
 
 
 	// ...................................................................
 	// ...................................................................
-	size_t Write(const void* pvBuffer, 
+	size_t Write(const void* pvBuffer,
 		size_t pSize,
 		size_t pSize,
 		size_t pCount
 		size_t pCount
 	){
 	){
@@ -116,7 +116,7 @@ public:
 
 
 	// ...................................................................
 	// ...................................................................
 	bool Exists( const char* pFile) const {
 	bool Exists( const char* pFile) const {
-		aiFile* p = mFileSystem->OpenProc(mFileSystem,pFile,"rb");		
+		aiFile* p = mFileSystem->OpenProc(mFileSystem,pFile,"rb");
 		if (p){
 		if (p){
 			mFileSystem->CloseProc(mFileSystem,p);
 			mFileSystem->CloseProc(mFileSystem,p);
 			return true;
 			return true;

+ 32 - 32
code/COBLoader.cpp

@@ -5,8 +5,8 @@ Open Asset Import Library (assimp)
 Copyright (c) 2006-2015, assimp team
 Copyright (c) 2006-2015, assimp team
 All rights reserved.
 All rights reserved.
 
 
-Redistribution and use of this software in source and binary forms, 
-with or without modification, are permitted provided that the 
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the
 following conditions are met:
 following conditions are met:
 
 
 * Redistributions of source code must retain the above
 * Redistributions of source code must retain the above
@@ -23,16 +23,16 @@ following conditions are met:
   derived from this software without specific prior
   derived from this software without specific prior
   written permission of the assimp team.
   written permission of the assimp team.
 
 
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+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
 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 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 
+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.
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
@@ -76,7 +76,7 @@ static const float units[] = {
 	1.f/0.3048f,
 	1.f/0.3048f,
 	1.f/0.9144f,
 	1.f/0.9144f,
 	1.f/1609.344f
 	1.f/1609.344f
-};	
+};
 
 
 static const aiImporterDesc desc = {
 static const aiImporterDesc desc = {
 	"TrueSpace Object Importer",
 	"TrueSpace Object Importer",
@@ -98,12 +98,12 @@ COBImporter::COBImporter()
 {}
 {}
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-// Destructor, private as well 
+// Destructor, private as well
 COBImporter::~COBImporter()
 COBImporter::~COBImporter()
 {}
 {}
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-// Returns whether the class can handle the format of the given file. 
+// Returns whether the class can handle the format of the given file.
 bool COBImporter::CanRead( const std::string& pFile, IOSystem* pIOHandler, bool checkSig) const
 bool COBImporter::CanRead( const std::string& pFile, IOSystem* pIOHandler, bool checkSig) const
 {
 {
 	const std::string& extension = GetExtension(pFile);
 	const std::string& extension = GetExtension(pFile);
@@ -139,8 +139,8 @@ void COBImporter::SetupProperties(const Importer* /*pImp*/)
 }
 }
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-// Imports the given file into the given scene structure. 
-void COBImporter::InternReadFile( const std::string& pFile, 
+// Imports the given file into the given scene structure.
+void COBImporter::InternReadFile( const std::string& pFile,
 	aiScene* pScene, IOSystem* pIOHandler)
 	aiScene* pScene, IOSystem* pIOHandler)
 {
 {
 	COB::Scene scene;
 	COB::Scene scene;
@@ -157,7 +157,7 @@ void COBImporter::InternReadFile( const std::string& pFile,
 	if (head[16]!='L') {
 	if (head[16]!='L') {
 		ThrowException("File is big-endian, which is not supported");
 		ThrowException("File is big-endian, which is not supported");
 	}
 	}
-	
+
 	// load data into intermediate structures
 	// load data into intermediate structures
 	if (head[15]=='A') {
 	if (head[15]=='A') {
 		ReadAsciiFile(scene, stream.get());
 		ReadAsciiFile(scene, stream.get());
@@ -176,7 +176,7 @@ void COBImporter::InternReadFile( const std::string& pFile,
 			for_each(Face& f,mesh.faces) {
 			for_each(Face& f,mesh.faces) {
 				mesh.temp_map[f.material].push_back(&f);
 				mesh.temp_map[f.material].push_back(&f);
 			}
 			}
-		} 
+		}
 	}
 	}
 
 
 	// count meshes
 	// count meshes
@@ -186,7 +186,7 @@ void COBImporter::InternReadFile( const std::string& pFile,
 			if (mesh.vertex_positions.size() && mesh.texture_coords.size()) {
 			if (mesh.vertex_positions.size() && mesh.texture_coords.size()) {
 				pScene->mNumMeshes += mesh.temp_map.size();
 				pScene->mNumMeshes += mesh.temp_map.size();
 			}
 			}
-		} 
+		}
 	}
 	}
 	pScene->mMeshes = new aiMesh*[pScene->mNumMeshes]();
 	pScene->mMeshes = new aiMesh*[pScene->mNumMeshes]();
 	pScene->mMaterials = new aiMaterial*[pScene->mNumMeshes]();
 	pScene->mMaterials = new aiMaterial*[pScene->mNumMeshes]();
@@ -282,8 +282,8 @@ aiNode* COBImporter::BuildNodes(const Node& root,const Scene& scin,aiScene* fill
 							if (v.uv_idx >= ndmesh.texture_coords.size()) {
 							if (v.uv_idx >= ndmesh.texture_coords.size()) {
 								ThrowException("UV index out of range");
 								ThrowException("UV index out of range");
 							}
 							}
-							outmesh->mVertices[outmesh->mNumVertices] = ndmesh.vertex_positions[ v.pos_idx ]; 
-							outmesh->mTextureCoords[0][outmesh->mNumVertices] = aiVector3D( 
+							outmesh->mVertices[outmesh->mNumVertices] = ndmesh.vertex_positions[ v.pos_idx ];
+							outmesh->mTextureCoords[0][outmesh->mNumVertices] = aiVector3D(
 								ndmesh.texture_coords[ v.uv_idx ].x,
 								ndmesh.texture_coords[ v.uv_idx ].x,
 								ndmesh.texture_coords[ v.uv_idx ].y,
 								ndmesh.texture_coords[ v.uv_idx ].y,
 								0.f
 								0.f
@@ -320,7 +320,7 @@ aiNode* COBImporter::BuildNodes(const Node& root,const Scene& scin,aiScene* fill
 					}
 					}
 
 
 					{	int shader;
 					{	int shader;
-						switch(min->shader) 
+						switch(min->shader)
 						{
 						{
 						case Material::FLAT:
 						case Material::FLAT:
 							shader = aiShadingMode_Gouraud;
 							shader = aiShadingMode_Gouraud;
@@ -369,7 +369,7 @@ aiNode* COBImporter::BuildNodes(const Node& root,const Scene& scin,aiScene* fill
 	else if (Node::TYPE_LIGHT == root.type) {
 	else if (Node::TYPE_LIGHT == root.type) {
 		const Light& ndlight = (const Light&)(root);
 		const Light& ndlight = (const Light&)(root);
 		aiLight* outlight = fill->mLights[fill->mNumLights++] = new aiLight();
 		aiLight* outlight = fill->mLights[fill->mNumLights++] = new aiLight();
-		
+
 		outlight->mName.Set(ndlight.name);
 		outlight->mName.Set(ndlight.name);
 		outlight->mColorDiffuse = outlight->mColorAmbient = outlight->mColorSpecular = ndlight.color;
 		outlight->mColorDiffuse = outlight->mColorAmbient = outlight->mColorSpecular = ndlight.color;
 
 
@@ -479,7 +479,7 @@ void COBImporter::UnsupportedChunk_Ascii(LineSplitter& splitter, const ChunkInfo
 
 
 		// (HACK) - our current position in the stream is the beginning of the
 		// (HACK) - our current position in the stream is the beginning of the
 		// head line of the next chunk. That's fine, but the caller is going
 		// head line of the next chunk. That's fine, but the caller is going
-		// to call ++ on `splitter`, which we need to swallow to avoid 
+		// to call ++ on `splitter`, which we need to swallow to avoid
 		// missing the next line.
 		// missing the next line.
 		splitter.get_stream().IncPtr(nfo.size);
 		splitter.get_stream().IncPtr(nfo.size);
 		splitter.swallow_next_increment();
 		splitter.swallow_next_increment();
@@ -554,14 +554,14 @@ void COBImporter::ReadBasicNodeInfo_Ascii(Node& msh, LineSplitter& splitter, con
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
 template <typename T>
 template <typename T>
-void COBImporter::ReadFloat3Tuple_Ascii(T& fill, const char** in) 
+void COBImporter::ReadFloat3Tuple_Ascii(T& fill, const char** in)
 {
 {
 	const char* rgb = *in;
 	const char* rgb = *in;
 	for(unsigned int i = 0; i < 3; ++i) {
 	for(unsigned int i = 0; i < 3; ++i) {
 		SkipSpaces(&rgb);
 		SkipSpaces(&rgb);
 		if (*rgb == ',')++rgb;
 		if (*rgb == ',')++rgb;
 		SkipSpaces(&rgb);
 		SkipSpaces(&rgb);
-		
+
 		fill[i] = fast_atof(&rgb);
 		fill[i] = fast_atof(&rgb);
 	}
 	}
 	*in = rgb;
 	*in = rgb;
@@ -650,7 +650,7 @@ void COBImporter::ReadUnit_Ascii(Scene& out, LineSplitter& splitter, const Chunk
 	for_each(boost::shared_ptr< Node >& nd, out.nodes) {
 	for_each(boost::shared_ptr< Node >& nd, out.nodes) {
 		if (nd->id == nfo.parent_id) {
 		if (nd->id == nfo.parent_id) {
 			const unsigned int t=strtoul10(splitter[1]);
 			const unsigned int t=strtoul10(splitter[1]);
-		
+
 			nd->unit_scale = t>=sizeof(units)/sizeof(units[0])?(
 			nd->unit_scale = t>=sizeof(units)/sizeof(units[0])?(
 				LogWarn_Ascii(splitter,format()<<t<<" is not a valid value for `Units` attribute in `Unit chunk` "<<nfo.id)
 				LogWarn_Ascii(splitter,format()<<t<<" is not a valid value for `Units` attribute in `Unit chunk` "<<nfo.id)
 				,1.f):units[t];
 				,1.f):units[t];
@@ -696,7 +696,7 @@ void COBImporter::ReadLght_Ascii(Scene& out, LineSplitter& splitter, const Chunk
 			"Unknown kind of light source in `Lght` chunk "<<nfo.id<<" : "<<*splitter);
 			"Unknown kind of light source in `Lght` chunk "<<nfo.id<<" : "<<*splitter);
 		msh.ltype = Light::SPOT;
 		msh.ltype = Light::SPOT;
 	}
 	}
-	
+
 	++splitter;
 	++splitter;
 	if (!splitter.match_start("color ")) {
 	if (!splitter.match_start("color ")) {
 		LogWarn_Ascii(splitter,format()<<
 		LogWarn_Ascii(splitter,format()<<
@@ -797,7 +797,7 @@ void COBImporter::ReadPolH_Ascii(Scene& out, LineSplitter& splitter, const Chunk
 			for(unsigned int cur = 0;cur < cnt && ++splitter;++cur) {
 			for(unsigned int cur = 0;cur < cnt && ++splitter;++cur) {
 				const char* s = splitter->c_str();
 				const char* s = splitter->c_str();
 
 
-				aiVector3D& v = msh.vertex_positions[cur]; 
+				aiVector3D& v = msh.vertex_positions[cur];
 
 
 				SkipSpaces(&s);
 				SkipSpaces(&s);
 				v.x = fast_atof(&s);
 				v.x = fast_atof(&s);
@@ -814,7 +814,7 @@ void COBImporter::ReadPolH_Ascii(Scene& out, LineSplitter& splitter, const Chunk
 			for(unsigned int cur = 0;cur < cnt && ++splitter;++cur) {
 			for(unsigned int cur = 0;cur < cnt && ++splitter;++cur) {
 				const char* s = splitter->c_str();
 				const char* s = splitter->c_str();
 
 
-				aiVector2D& v = msh.texture_coords[cur]; 
+				aiVector2D& v = msh.texture_coords[cur];
 
 
 				SkipSpaces(&s);
 				SkipSpaces(&s);
 				v.x = fast_atof(&s);
 				v.x = fast_atof(&s);
@@ -881,8 +881,8 @@ void COBImporter::ReadBitM_Ascii(Scene& /*out*/, LineSplitter& splitter, const C
 /*
 /*
 	"\nThumbNailHdrSize %ld"
 	"\nThumbNailHdrSize %ld"
 	"\nThumbHeader: %02hx 02hx %02hx "
 	"\nThumbHeader: %02hx 02hx %02hx "
-	"\nColorBufSize %ld"		
-	"\nColorBufZipSize %ld"		
+	"\nColorBufSize %ld"
+	"\nColorBufZipSize %ld"
 	"\nZippedThumbnail: %02hx 02hx %02hx "
 	"\nZippedThumbnail: %02hx 02hx %02hx "
 */
 */
 
 
@@ -1068,7 +1068,7 @@ void COBImporter::ReadPolH_Binary(COB::Scene& out, StreamReaderLE& reader, const
 			// with holes. Test data specific to COB is needed to confirm it.
 			// with holes. Test data specific to COB is needed to confirm it.
 			if (msh.faces.empty()) {
 			if (msh.faces.empty()) {
 				ThrowException(format("A hole is the first entity in the `PolH` chunk with id ") << nfo.id);
 				ThrowException(format("A hole is the first entity in the `PolH` chunk with id ") << nfo.id);
-			}	
+			}
 		}
 		}
 		else msh.faces.push_back(Face());
 		else msh.faces.push_back(Face());
 		Face& f = msh.faces.back();
 		Face& f = msh.faces.back();
@@ -1094,7 +1094,7 @@ void COBImporter::ReadPolH_Binary(COB::Scene& out, StreamReaderLE& reader, const
 		}
 		}
 	}
 	}
 	if (nfo.version>4) {
 	if (nfo.version>4) {
-		msh.draw_flags = reader.GetI4();	
+		msh.draw_flags = reader.GetI4();
 	}
 	}
 	nfo.version>5 && nfo.version<8 ? reader.GetI4() : 0;
 	nfo.version>5 && nfo.version<8 ? reader.GetI4() : 0;
 }
 }

+ 12 - 12
code/COBLoader.h

@@ -5,8 +5,8 @@ Open Asset Import Library (assimp)
 Copyright (c) 2006-2015, assimp team
 Copyright (c) 2006-2015, assimp team
 All rights reserved.
 All rights reserved.
 
 
-Redistribution and use of this software in source and binary forms, 
-with or without modification, are permitted provided that the 
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the
 following conditions are met:
 following conditions are met:
 
 
 * Redistributions of source code must retain the above
 * Redistributions of source code must retain the above
@@ -23,16 +23,16 @@ following conditions are met:
   derived from this software without specific prior
   derived from this software without specific prior
   written permission of the assimp team.
   written permission of the assimp team.
 
 
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+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
 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 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 
+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.
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
@@ -51,7 +51,7 @@ struct aiNode;
 
 
 namespace Assimp	{
 namespace Assimp	{
 	class LineSplitter;
 	class LineSplitter;
-	
+
 	// TinyFormatter.h
 	// TinyFormatter.h
 	namespace Formatter {
 	namespace Formatter {
 		template <typename T,typename TR, typename A> class basic_formatter;
 		template <typename T,typename TR, typename A> class basic_formatter;
@@ -66,7 +66,7 @@ namespace Assimp	{
 	}
 	}
 
 
 // -------------------------------------------------------------------------------------------
 // -------------------------------------------------------------------------------------------
-/** Importer class to load TrueSpace files (cob,scn) up to v6. 
+/** Importer class to load TrueSpace files (cob,scn) up to v6.
  *
  *
  *  Currently relatively limited, loads only ASCII files and needs more test coverage. */
  *  Currently relatively limited, loads only ASCII files and needs more test coverage. */
 // -------------------------------------------------------------------------------------------
 // -------------------------------------------------------------------------------------------
@@ -92,7 +92,7 @@ protected:
 	void SetupProperties(const Importer* pImp);
 	void SetupProperties(const Importer* pImp);
 
 
 	// --------------------
 	// --------------------
-	void InternReadFile( const std::string& pFile, aiScene* pScene, 
+	void InternReadFile( const std::string& pFile, aiScene* pScene,
 		IOSystem* pIOHandler);
 		IOSystem* pIOHandler);
 
 
 private:
 private:

+ 13 - 13
code/COBScene.h

@@ -5,8 +5,8 @@ Open Asset Import Library (assimp)
 Copyright (c) 2006-2015, assimp team
 Copyright (c) 2006-2015, assimp team
 All rights reserved.
 All rights reserved.
 
 
-Redistribution and use of this software in source and binary forms, 
-with or without modification, are permitted provided that the 
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the
 following conditions are met:
 following conditions are met:
 
 
 * Redistributions of source code must retain the above
 * Redistributions of source code must retain the above
@@ -23,16 +23,16 @@ contributors may be used to endorse or promote products
 derived from this software without specific prior
 derived from this software without specific prior
 written permission of the assimp team.
 written permission of the assimp team.
 
 
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+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
 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 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 
+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.
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
@@ -137,9 +137,9 @@ struct Mesh : public Node
 		HIDE  = 0x10
 		HIDE  = 0x10
 	};
 	};
 
 
-	Mesh() 
+	Mesh()
 		: Node(TYPE_MESH)
 		: Node(TYPE_MESH)
-		, draw_flags(SOLID) 
+		, draw_flags(SOLID)
 	{}
 	{}
 
 
 	// vertex elements
 	// vertex elements
@@ -232,7 +232,7 @@ struct Material : ChunkInfo
 	float alpha, exp, ior,ka,ks;
 	float alpha, exp, ior,ka,ks;
 
 
 	unsigned int matnum;
 	unsigned int matnum;
-	Shader shader; 
+	Shader shader;
 
 
 	AutoFacet autofacet;
 	AutoFacet autofacet;
 	float autofacet_angle;
 	float autofacet_angle;
@@ -245,7 +245,7 @@ struct Material : ChunkInfo
 struct Bitmap : ChunkInfo
 struct Bitmap : ChunkInfo
 {
 {
 	Bitmap() : orig_size() {}
 	Bitmap() : orig_size() {}
-	struct BitmapHeader 
+	struct BitmapHeader
 	{
 	{
 	};
 	};
 
 

+ 18 - 18
code/CSMLoader.cpp

@@ -7,8 +7,8 @@ Copyright (c) 2006-2015, assimp team
 
 
 All rights reserved.
 All rights reserved.
 
 
-Redistribution and use of this software in source and binary forms, 
-with or without modification, are permitted provided that the following 
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the following
 conditions are met:
 conditions are met:
 
 
 * Redistributions of source code must retain the above
 * Redistributions of source code must retain the above
@@ -25,16 +25,16 @@ conditions are met:
   derived from this software without specific prior
   derived from this software without specific prior
   written permission of the assimp team.
   written permission of the assimp team.
 
 
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+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
 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 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 
+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.
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 ---------------------------------------------------------------------------
 ---------------------------------------------------------------------------
 */
 */
@@ -71,7 +71,7 @@ static const aiImporterDesc desc = {
 	0,
 	0,
 	0,
 	0,
 	0,
 	0,
-	"csm" 
+	"csm"
 };
 };
 
 
 
 
@@ -82,17 +82,17 @@ CSMImporter::CSMImporter()
 {}
 {}
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-// Destructor, private as well 
+// Destructor, private as well
 CSMImporter::~CSMImporter()
 CSMImporter::~CSMImporter()
 {}
 {}
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-// Returns whether the class can handle the format of the given file. 
+// Returns whether the class can handle the format of the given file.
 bool CSMImporter::CanRead( const std::string& pFile, IOSystem* pIOHandler, bool checkSig) const
 bool CSMImporter::CanRead( const std::string& pFile, IOSystem* pIOHandler, bool checkSig) const
 {
 {
-	// check file extension 
+	// check file extension
 	const std::string extension = GetExtension(pFile);
 	const std::string extension = GetExtension(pFile);
-	
+
 	if( extension == "csm")
 	if( extension == "csm")
 		return true;
 		return true;
 
 
@@ -118,8 +118,8 @@ void CSMImporter::SetupProperties(const Importer* pImp)
 }
 }
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-// Imports the given file into the given scene structure. 
-void CSMImporter::InternReadFile( const std::string& pFile, 
+// Imports the given file into the given scene structure.
+void CSMImporter::InternReadFile( const std::string& pFile,
 	aiScene* pScene, IOSystem* pIOHandler)
 	aiScene* pScene, IOSystem* pIOHandler)
 {
 {
 	boost::scoped_ptr<IOStream> file( pIOHandler->Open( pFile, "rb"));
 	boost::scoped_ptr<IOStream> file( pIOHandler->Open( pFile, "rb"));
@@ -281,7 +281,7 @@ void CSMImporter::InternReadFile( const std::string& pFile,
 	pScene->mRootNode->mChildren = new aiNode* [anim->mNumChannels];
 	pScene->mRootNode->mChildren = new aiNode* [anim->mNumChannels];
 
 
 	for (unsigned int i = 0; i < anim->mNumChannels;++i)	{
 	for (unsigned int i = 0; i < anim->mNumChannels;++i)	{
-		aiNodeAnim* na = anim->mChannels[i]; 
+		aiNodeAnim* na = anim->mChannels[i];
 
 
 		aiNode* nd  = pScene->mRootNode->mChildren[i] = new aiNode();
 		aiNode* nd  = pScene->mRootNode->mChildren[i] = new aiNode();
 		nd->mName   = anim->mChannels[i]->mNodeName;
 		nd->mName   = anim->mChannels[i]->mNodeName;
@@ -297,7 +297,7 @@ void CSMImporter::InternReadFile( const std::string& pFile,
 
 
 	// mark the scene as incomplete and run SkeletonMeshBuilder on it
 	// mark the scene as incomplete and run SkeletonMeshBuilder on it
 	pScene->mFlags |= AI_SCENE_FLAGS_INCOMPLETE;
 	pScene->mFlags |= AI_SCENE_FLAGS_INCOMPLETE;
-	
+
 	if (!noSkeletonMesh) {
 	if (!noSkeletonMesh) {
 		SkeletonMeshBuilder maker(pScene,pScene->mRootNode,true);
 		SkeletonMeshBuilder maker(pScene,pScene->mRootNode,true);
 	}
 	}

+ 11 - 11
code/CSMLoader.h

@@ -5,8 +5,8 @@ Open Asset Import Library (assimp)
 Copyright (c) 2006-2015, assimp team
 Copyright (c) 2006-2015, assimp team
 All rights reserved.
 All rights reserved.
 
 
-Redistribution and use of this software in source and binary forms, 
-with or without modification, are permitted provided that the 
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the
 following conditions are met:
 following conditions are met:
 
 
 * Redistributions of source code must retain the above
 * Redistributions of source code must retain the above
@@ -23,16 +23,16 @@ following conditions are met:
   derived from this software without specific prior
   derived from this software without specific prior
   written permission of the assimp team.
   written permission of the assimp team.
 
 
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+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
 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 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 
+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.
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
@@ -66,7 +66,7 @@ public:
 
 
 public:
 public:
 	// -------------------------------------------------------------------
 	// -------------------------------------------------------------------
-	bool CanRead( const std::string& pFile, IOSystem* pIOHandler, 
+	bool CanRead( const std::string& pFile, IOSystem* pIOHandler,
 		bool checkSig) const;
 		bool checkSig) const;
 
 
 protected:
 protected:
@@ -78,7 +78,7 @@ protected:
 	void SetupProperties(const Importer* pImp);
 	void SetupProperties(const Importer* pImp);
 
 
 	// -------------------------------------------------------------------
 	// -------------------------------------------------------------------
-	void InternReadFile( const std::string& pFile, aiScene* pScene, 
+	void InternReadFile( const std::string& pFile, aiScene* pScene,
 		IOSystem* pIOHandler);
 		IOSystem* pIOHandler);
 
 
 private:
 private:

+ 16 - 16
code/CalcTangentsProcess.cpp

@@ -7,8 +7,8 @@ Copyright (c) 2006-2015, assimp team
 
 
 All rights reserved.
 All rights reserved.
 
 
-Redistribution and use of this software in source and binary forms, 
-with or without modification, are permitted provided that the following 
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the following
 conditions are met:
 conditions are met:
 
 
 * Redistributions of source code must retain the above
 * Redistributions of source code must retain the above
@@ -25,21 +25,21 @@ conditions are met:
   derived from this software without specific prior
   derived from this software without specific prior
   written permission of the assimp team.
   written permission of the assimp team.
 
 
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+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
 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 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 
+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.
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 ---------------------------------------------------------------------------
 ---------------------------------------------------------------------------
 */
 */
 
 
-/** @file Implementation of the post processing step to calculate 
+/** @file Implementation of the post processing step to calculate
  *  tangents and bitangents for all imported meshes
  *  tangents and bitangents for all imported meshes
  */
  */
 
 
@@ -112,7 +112,7 @@ void CalcTangentsProcess::Execute( aiScene* pScene)
 bool CalcTangentsProcess::ProcessMesh( aiMesh* pMesh, unsigned int meshIndex)
 bool CalcTangentsProcess::ProcessMesh( aiMesh* pMesh, unsigned int meshIndex)
 {
 {
 	// we assume that the mesh is still in the verbose vertex format where each face has its own set
 	// we assume that the mesh is still in the verbose vertex format where each face has its own set
-	// of vertices and no vertices are shared between faces. Sadly I don't know any quick test to 
+	// of vertices and no vertices are shared between faces. Sadly I don't know any quick test to
 	// assert() it here.
 	// assert() it here.
     // assert( must be verbose, dammit);
     // assert( must be verbose, dammit);
 
 
@@ -139,7 +139,7 @@ bool CalcTangentsProcess::ProcessMesh( aiMesh* pMesh, unsigned int meshIndex)
 		DefaultLogger::get()->error((Formatter::format("Failed to compute tangents; need UV data in channel"),configSourceUV));
 		DefaultLogger::get()->error((Formatter::format("Failed to compute tangents; need UV data in channel"),configSourceUV));
 		return false;
 		return false;
 	}
 	}
-	 
+
 	const float angleEpsilon = 0.9999f;
 	const float angleEpsilon = 0.9999f;
 
 
 	std::vector<bool> vertexDone( pMesh->mNumVertices, false);
 	std::vector<bool> vertexDone( pMesh->mNumVertices, false);
@@ -154,7 +154,7 @@ bool CalcTangentsProcess::ProcessMesh( aiMesh* pMesh, unsigned int meshIndex)
 	const aiVector3D* meshTex = pMesh->mTextureCoords[configSourceUV];
 	const aiVector3D* meshTex = pMesh->mTextureCoords[configSourceUV];
 	aiVector3D* meshTang = pMesh->mTangents;
 	aiVector3D* meshTang = pMesh->mTangents;
 	aiVector3D* meshBitang = pMesh->mBitangents;
 	aiVector3D* meshBitang = pMesh->mBitangents;
-	
+
 	// calculate the tangent and bitangent for every face
 	// calculate the tangent and bitangent for every face
 	for( unsigned int a = 0; a < pMesh->mNumFaces; a++)
 	for( unsigned int a = 0; a < pMesh->mNumFaces; a++)
 	{
 	{
@@ -220,7 +220,7 @@ bool CalcTangentsProcess::ProcessMesh( aiMesh* pMesh, unsigned int meshIndex)
                     localTangent = meshNorm[p] ^ localBitangent;
                     localTangent = meshNorm[p] ^ localBitangent;
                     localTangent.Normalize();
                     localTangent.Normalize();
                 } else {
                 } else {
-                    localBitangent = localTangent ^ meshNorm[p]; 
+                    localBitangent = localTangent ^ meshNorm[p];
                     localBitangent.Normalize();
                     localBitangent.Normalize();
                 }
                 }
             }
             }
@@ -256,10 +256,10 @@ bool CalcTangentsProcess::ProcessMesh( aiMesh* pMesh, unsigned int meshIndex)
 	}
 	}
 	std::vector<unsigned int> verticesFound;
 	std::vector<unsigned int> verticesFound;
 
 
-	const float fLimit = cosf(configMaxAngle); 
+	const float fLimit = cosf(configMaxAngle);
 	std::vector<unsigned int> closeVertices;
 	std::vector<unsigned int> closeVertices;
 
 
-	// in the second pass we now smooth out all tangents and bitangents at the same local position 
+	// in the second pass we now smooth out all tangents and bitangents at the same local position
 	// if they are not too far off.
 	// if they are not too far off.
 	for( unsigned int a = 0; a < pMesh->mNumVertices; a++)
 	for( unsigned int a = 0; a < pMesh->mNumVertices; a++)
 	{
 	{

+ 11 - 11
code/CalcTangentsProcess.h

@@ -5,8 +5,8 @@ Open Asset Import Library (assimp)
 Copyright (c) 2006-2015, assimp team
 Copyright (c) 2006-2015, assimp team
 All rights reserved.
 All rights reserved.
 
 
-Redistribution and use of this software in source and binary forms, 
-with or without modification, are permitted provided that the 
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the
 following conditions are met:
 following conditions are met:
 
 
 * Redistributions of source code must retain the above
 * Redistributions of source code must retain the above
@@ -23,23 +23,23 @@ following conditions are met:
   derived from this software without specific prior
   derived from this software without specific prior
   written permission of the assimp team.
   written permission of the assimp team.
 
 
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+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
 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 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 
+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.
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
 */
 */
 
 
 
 
-/** @file Defines a post processing step to calculate tangents and 
+/** @file Defines a post processing step to calculate tangents and
     bitangents on all imported meshes.*/
     bitangents on all imported meshes.*/
 #ifndef AI_CALCTANGENTSPROCESS_H_INC
 #ifndef AI_CALCTANGENTSPROCESS_H_INC
 #define AI_CALCTANGENTSPROCESS_H_INC
 #define AI_CALCTANGENTSPROCESS_H_INC
@@ -54,7 +54,7 @@ namespace Assimp
 // ---------------------------------------------------------------------------
 // ---------------------------------------------------------------------------
 /** The CalcTangentsProcess calculates the tangent and bitangent for any vertex
 /** The CalcTangentsProcess calculates the tangent and bitangent for any vertex
  * of all meshes. It is expected to be run before the JoinVerticesProcess runs
  * of all meshes. It is expected to be run before the JoinVerticesProcess runs
- * because the joining of vertices also considers tangents and bitangents for 
+ * because the joining of vertices also considers tangents and bitangents for
  * uniqueness.
  * uniqueness.
  */
  */
 class ASSIMP_API_WINONLY CalcTangentsProcess : public BaseProcess
 class ASSIMP_API_WINONLY CalcTangentsProcess : public BaseProcess

+ 28 - 28
code/ColladaExporter.cpp

@@ -5,8 +5,8 @@ Open Asset Import Library (assimp)
 Copyright (c) 2006-2015, assimp team
 Copyright (c) 2006-2015, assimp team
 All rights reserved.
 All rights reserved.
 
 
-Redistribution and use of this software in source and binary forms, 
-with or without modification, are permitted provided that the 
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the
 following conditions are met:
 following conditions are met:
 
 
 * Redistributions of source code must retain the above
 * Redistributions of source code must retain the above
@@ -23,16 +23,16 @@ following conditions are met:
   derived from this software without specific prior
   derived from this software without specific prior
   written permission of the assimp team.
   written permission of the assimp team.
 
 
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+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
 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 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 
+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.
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
@@ -71,7 +71,7 @@ void ExportSceneCollada(const char* pFile, IOSystem* pIOSystem, const aiScene* p
 	std::string path = DefaultIOSystem::absolutePath(std::string(pFile));
 	std::string path = DefaultIOSystem::absolutePath(std::string(pFile));
 	std::string file = DefaultIOSystem::completeBaseName(std::string(pFile));
 	std::string file = DefaultIOSystem::completeBaseName(std::string(pFile));
 
 
-	// invoke the exporter 
+	// invoke the exporter
 	ColladaExporter iDoTheExportThing( pScene, pIOSystem, path, file);
 	ColladaExporter iDoTheExportThing( pScene, pIOSystem, path, file);
 
 
 	// we're still here - export successfully completed. Write result to the given IOSYstem
 	// we're still here - export successfully completed. Write result to the given IOSYstem
@@ -99,7 +99,7 @@ ColladaExporter::ColladaExporter( const aiScene* pScene, IOSystem* pIOSystem, co
 	mSceneOwned = false;
 	mSceneOwned = false;
 
 
 	// set up strings
 	// set up strings
-	endstr = "\n"; 
+	endstr = "\n";
 
 
 	// start writing
 	// start writing
 	WriteFile();
 	WriteFile();
@@ -134,7 +134,7 @@ void ColladaExporter::WriteFile()
 
 
 	WriteSceneLibrary();
 	WriteSceneLibrary();
 
 
-	// useless Collada fu at the end, just in case we haven't had enough indirections, yet. 
+	// useless Collada fu at the end, just in case we haven't had enough indirections, yet.
 	mOutput << startstr << "<scene>" << endstr;
 	mOutput << startstr << "<scene>" << endstr;
 	PushTag();
 	PushTag();
 	mOutput << startstr << "<instance_visual_scene url=\"#" + XMLEscape(mScene->mRootNode->mName.C_Str()) + "\" />" << endstr;
 	mOutput << startstr << "<instance_visual_scene url=\"#" + XMLEscape(mScene->mRootNode->mName.C_Str()) + "\" />" << endstr;
@@ -149,7 +149,7 @@ void ColladaExporter::WriteFile()
 void ColladaExporter::WriteHeader()
 void ColladaExporter::WriteHeader()
 {
 {
 	static const float epsilon = 0.00001f;
 	static const float epsilon = 0.00001f;
-	static const aiQuaternion x_rot(aiMatrix3x3( 
+	static const aiQuaternion x_rot(aiMatrix3x3(
 		0, -1,  0,
 		0, -1,  0,
 		1,  0,  0,
 		1,  0,  0,
 		0,  0,  1));
 		0,  0,  1));
@@ -228,19 +228,19 @@ void ColladaExporter::WriteHeader()
 
 
 	aiMetadata* meta = mScene->mRootNode->mMetaData;
 	aiMetadata* meta = mScene->mRootNode->mMetaData;
 	aiString value;
 	aiString value;
-	if (!meta || !meta->Get("Author", value))		
+	if (!meta || !meta->Get("Author", value))
 		mOutput << startstr << "<author>" << "Assimp" << "</author>" << endstr;
 		mOutput << startstr << "<author>" << "Assimp" << "</author>" << endstr;
-	else		
+	else
 		mOutput << startstr << "<author>" << XMLEscape(value.C_Str()) << "</author>" << endstr;
 		mOutput << startstr << "<author>" << XMLEscape(value.C_Str()) << "</author>" << endstr;
 
 
 	if (!meta || !meta->Get("AuthoringTool", value))
 	if (!meta || !meta->Get("AuthoringTool", value))
 		mOutput << startstr << "<authoring_tool>" << "Assimp Exporter" << "</authoring_tool>" << endstr;
 		mOutput << startstr << "<authoring_tool>" << "Assimp Exporter" << "</authoring_tool>" << endstr;
-	else		
+	else
 		mOutput << startstr << "<authoring_tool>" << XMLEscape(value.C_Str()) << "</authoring_tool>" << endstr;
 		mOutput << startstr << "<authoring_tool>" << XMLEscape(value.C_Str()) << "</authoring_tool>" << endstr;
 
 
 	//mOutput << startstr << "<author>" << mScene->author.C_Str() << "</author>" << endstr;
 	//mOutput << startstr << "<author>" << mScene->author.C_Str() << "</author>" << endstr;
 	//mOutput << startstr << "<authoring_tool>" << mScene->authoringTool.C_Str() << "</authoring_tool>" << endstr;
 	//mOutput << startstr << "<authoring_tool>" << mScene->authoringTool.C_Str() << "</authoring_tool>" << endstr;
-	
+
 	PopTag();
 	PopTag();
 	mOutput << startstr << "</contributor>" << endstr;
 	mOutput << startstr << "</contributor>" << endstr;
 	mOutput << startstr << "<created>" << date_str << "</created>" << endstr;
 	mOutput << startstr << "<created>" << date_str << "</created>" << endstr;
@@ -533,9 +533,9 @@ void ColladaExporter::WriteImageEntry( const Surface& pSurface, const std::strin
   if( !pSurface.texture.empty() )
   if( !pSurface.texture.empty() )
   {
   {
     mOutput << startstr << "<image id=\"" << XMLEscape(pNameAdd) << "\">" << endstr;
     mOutput << startstr << "<image id=\"" << XMLEscape(pNameAdd) << "\">" << endstr;
-    PushTag(); 
+    PushTag();
     mOutput << startstr << "<init_from>";
     mOutput << startstr << "<init_from>";
-	
+
 	// URL encode image file name first, then XML encode on top
 	// URL encode image file name first, then XML encode on top
 	std::stringstream imageUrlEncoded;
 	std::stringstream imageUrlEncoded;
     for( std::string::const_iterator it = pSurface.texture.begin(); it != pSurface.texture.end(); ++it )
     for( std::string::const_iterator it = pSurface.texture.begin(); it != pSurface.texture.end(); ++it )
@@ -676,10 +676,10 @@ void ColladaExporter::WriteMaterials()
   // output textures if present
   // output textures if present
   if( numTextures > 0 )
   if( numTextures > 0 )
   {
   {
-    mOutput << startstr << "<library_images>" << endstr; 
+    mOutput << startstr << "<library_images>" << endstr;
     PushTag();
     PushTag();
     for( std::vector<Material>::const_iterator it = materials.begin(); it != materials.end(); ++it )
     for( std::vector<Material>::const_iterator it = materials.begin(); it != materials.end(); ++it )
-    { 
+    {
       const Material& mat = *it;
       const Material& mat = *it;
       WriteImageEntry( mat.ambient, mat.name + "-ambient-image");
       WriteImageEntry( mat.ambient, mat.name + "-ambient-image");
       WriteImageEntry( mat.diffuse, mat.name + "-diffuse-image");
       WriteImageEntry( mat.diffuse, mat.name + "-diffuse-image");
@@ -835,7 +835,7 @@ void ColladaExporter::WriteGeometry( size_t pIndex)
 		if( mesh->HasVertexColors( a) )
 		if( mesh->HasVertexColors( a) )
 			mOutput << startstr << "<input semantic=\"COLOR\" source=\"#" << idstrEscaped << "-color" << a << "\" " /*<< set=\"" << a << "\"" */ << " />" << endstr;
 			mOutput << startstr << "<input semantic=\"COLOR\" source=\"#" << idstrEscaped << "-color" << a << "\" " /*<< set=\"" << a << "\"" */ << " />" << endstr;
 	}
 	}
-	
+
 	PopTag();
 	PopTag();
 	mOutput << startstr << "</vertices>" << endstr;
 	mOutput << startstr << "</vertices>" << endstr;
 
 
@@ -871,11 +871,11 @@ void ColladaExporter::WriteGeometry( size_t pIndex)
 
 
 	// polygons
 	// polygons
 	if (countPoly)
 	if (countPoly)
-	{		
+	{
 		mOutput << startstr << "<polylist count=\"" << countPoly << "\" material=\"defaultMaterial\">" << endstr;
 		mOutput << startstr << "<polylist count=\"" << countPoly << "\" material=\"defaultMaterial\">" << endstr;
 		PushTag();
 		PushTag();
 		mOutput << startstr << "<input offset=\"0\" semantic=\"VERTEX\" source=\"#" << idstrEscaped << "-vertices\" />" << endstr;
 		mOutput << startstr << "<input offset=\"0\" semantic=\"VERTEX\" source=\"#" << idstrEscaped << "-vertices\" />" << endstr;
-	
+
 		mOutput << startstr << "<vcount>";
 		mOutput << startstr << "<vcount>";
 		for( size_t a = 0; a < mesh->mNumFaces; ++a )
 		for( size_t a = 0; a < mesh->mNumFaces; ++a )
 		{
 		{
@@ -883,7 +883,7 @@ void ColladaExporter::WriteGeometry( size_t pIndex)
 			mOutput << mesh->mFaces[a].mNumIndices << " ";
 			mOutput << mesh->mFaces[a].mNumIndices << " ";
 		}
 		}
 		mOutput << "</vcount>" << endstr;
 		mOutput << "</vcount>" << endstr;
-	
+
 		mOutput << startstr << "<p>";
 		mOutput << startstr << "<p>";
 		for( size_t a = 0; a < mesh->mNumFaces; ++a )
 		for( size_t a = 0; a < mesh->mNumFaces; ++a )
 		{
 		{
@@ -935,7 +935,7 @@ void ColladaExporter::WriteFloatArray( const std::string& pIdString, FloatDataTy
 			mOutput << pData[a*3+0] << " ";
 			mOutput << pData[a*3+0] << " ";
 			mOutput << pData[a*3+1] << " ";
 			mOutput << pData[a*3+1] << " ";
 		}
 		}
-	} 
+	}
 	else if( pType == FloatType_Color )
 	else if( pType == FloatType_Color )
 	{
 	{
 		for( size_t a = 0; a < pElementCount; ++a )
 		for( size_t a = 0; a < pElementCount; ++a )
@@ -950,7 +950,7 @@ void ColladaExporter::WriteFloatArray( const std::string& pIdString, FloatDataTy
 		for( size_t a = 0; a < pElementCount * floatsPerElement; ++a )
 		for( size_t a = 0; a < pElementCount * floatsPerElement; ++a )
 			mOutput << pData[a] << " ";
 			mOutput << pData[a] << " ";
 	}
 	}
-	mOutput << "</float_array>" << endstr; 
+	mOutput << "</float_array>" << endstr;
 	PopTag();
 	PopTag();
 
 
 	// the usual Collada fun. Let's bloat it even more!
 	// the usual Collada fun. Let's bloat it even more!
@@ -1020,7 +1020,7 @@ void ColladaExporter::WriteNode(aiNode* pNode)
 {
 {
 	// the must have a name
 	// the must have a name
 	if (pNode->mName.length == 0)
 	if (pNode->mName.length == 0)
-	{		
+	{
 		std::stringstream ss;
 		std::stringstream ss;
 		ss << "Node_" << pNode;
 		ss << "Node_" << pNode;
 		pNode->mName.Set(ss.str());
 		pNode->mName.Set(ss.str());

+ 16 - 16
code/ColladaExporter.h

@@ -5,8 +5,8 @@ Open Asset Import Library (assimp)
 Copyright (c) 2006-2015, assimp team
 Copyright (c) 2006-2015, assimp team
 All rights reserved.
 All rights reserved.
 
 
-Redistribution and use of this software in source and binary forms, 
-with or without modification, are permitted provided that the 
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the
 following conditions are met:
 following conditions are met:
 
 
 * Redistributions of source code must retain the above
 * Redistributions of source code must retain the above
@@ -23,16 +23,16 @@ following conditions are met:
   derived from this software without specific prior
   derived from this software without specific prior
   written permission of the assimp team.
   written permission of the assimp team.
 
 
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+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
 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 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 
+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.
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
@@ -57,7 +57,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 struct aiScene;
 struct aiScene;
 struct aiNode;
 struct aiNode;
 
 
-namespace Assimp	
+namespace Assimp
 {
 {
 
 
 /// Helper class to export a given scene to a Collada file. Just for my personal
 /// Helper class to export a given scene to a Collada file. Just for my personal
@@ -149,12 +149,12 @@ protected:
 	std::string endstr;
 	std::string endstr;
 
 
   // pair of color and texture - texture precedences color
   // pair of color and texture - texture precedences color
-  struct Surface 
-  { 
+  struct Surface
+  {
     bool exist;
     bool exist;
-    aiColor4D color; 
-    std::string texture; 
-    size_t channel; 
+    aiColor4D color;
+    std::string texture;
+    size_t channel;
     Surface() { exist = false; channel = 0; }
     Surface() { exist = false; channel = 0; }
   };
   };
 
 
@@ -168,7 +168,7 @@ protected:
      {}
      {}
   };
   };
 
 
-  // summarize a material in an convinient way. 
+  // summarize a material in an convinient way.
   struct Material
   struct Material
   {
   {
     std::string name;
     std::string name;

+ 34 - 34
code/ColladaHelper.h

@@ -7,8 +7,8 @@ Open Asset Import Library (assimp)
 Copyright (c) 2006-2015, assimp team
 Copyright (c) 2006-2015, assimp team
 All rights reserved.
 All rights reserved.
 
 
-Redistribution and use of this software in source and binary forms, 
-with or without modification, are permitted provided that the 
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the
 following conditions are met:
 following conditions are met:
 
 
 * Redistributions of source code must retain the above
 * Redistributions of source code must retain the above
@@ -25,16 +25,16 @@ contributors may be used to endorse or promote products
 derived from this software without specific prior
 derived from this software without specific prior
 written permission of the assimp team.
 written permission of the assimp team.
 
 
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+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
 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 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 
+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.
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
@@ -94,7 +94,7 @@ struct Transform
 {
 {
 	std::string mID;  ///< SID of the transform step, by which anim channels address their target node
 	std::string mID;  ///< SID of the transform step, by which anim channels address their target node
 	TransformType mType;
 	TransformType mType;
-	float f[16]; ///< Interpretation of data depends on the type of the transformation 
+	float f[16]; ///< Interpretation of data depends on the type of the transformation
 };
 };
 
 
 /** A collada camera. */
 /** A collada camera. */
@@ -132,7 +132,7 @@ struct Camera
 
 
 /** A collada light source. */
 /** A collada light source. */
 struct Light
 struct Light
-{	
+{
 	Light()
 	Light()
 		:	mType            (aiLightSource_UNDEFINED)
 		:	mType            (aiLightSource_UNDEFINED)
 		,	mAttConstant     (1.f)
 		,	mAttConstant     (1.f)
@@ -245,13 +245,13 @@ struct Node
 	std::vector<Transform> mTransforms;
 	std::vector<Transform> mTransforms;
 
 
 	/** Meshes at this node */
 	/** Meshes at this node */
-	std::vector<MeshInstance> mMeshes;    
+	std::vector<MeshInstance> mMeshes;
 
 
 	/** Lights at this node */
 	/** Lights at this node */
-	std::vector<LightInstance> mLights;  
+	std::vector<LightInstance> mLights;
 
 
 	/** Cameras at this node */
 	/** Cameras at this node */
-	std::vector<CameraInstance> mCameras; 
+	std::vector<CameraInstance> mCameras;
 
 
 	/** Node instances at this node */
 	/** Node instances at this node */
 	std::vector<NodeInstance> mNodeInstances;
 	std::vector<NodeInstance> mNodeInstances;
@@ -260,14 +260,14 @@ struct Node
 	std::string mPrimaryCamera;
 	std::string mPrimaryCamera;
 
 
 	//! Constructor. Begin with a zero parent
 	//! Constructor. Begin with a zero parent
-	Node() { 
+	Node() {
 		mParent = NULL;
 		mParent = NULL;
 	}
 	}
 
 
 	//! Destructor: delete all children subsequently
 	//! Destructor: delete all children subsequently
-	~Node() { 
-		for( std::vector<Node*>::iterator it = mChildren.begin(); it != mChildren.end(); ++it) 
-			delete *it; 
+	~Node() {
+		for( std::vector<Node*>::iterator it = mChildren.begin(); it != mChildren.end(); ++it)
+			delete *it;
 	}
 	}
 };
 };
 
 
@@ -286,15 +286,15 @@ struct Accessor
 	size_t mSize;    // size of an object, in elements (floats or strings, mostly 1)
 	size_t mSize;    // size of an object, in elements (floats or strings, mostly 1)
 	size_t mOffset;  // in number of values
 	size_t mOffset;  // in number of values
 	size_t mStride;  // Stride in number of values
 	size_t mStride;  // Stride in number of values
-	std::vector<std::string> mParams; // names of the data streams in the accessors. Empty string tells to ignore. 
+	std::vector<std::string> mParams; // names of the data streams in the accessors. Empty string tells to ignore.
 	size_t mSubOffset[4]; // Suboffset inside the object for the common 4 elements. For a vector, thats XYZ, for a color RGBA and so on.
 	size_t mSubOffset[4]; // Suboffset inside the object for the common 4 elements. For a vector, thats XYZ, for a color RGBA and so on.
 						  // For example, SubOffset[0] denotes which of the values inside the object is the vector X component.
 						  // For example, SubOffset[0] denotes which of the values inside the object is the vector X component.
 	std::string mSource;   // URL of the source array
 	std::string mSource;   // URL of the source array
 	mutable const Data* mData; // Pointer to the source array, if resolved. NULL else
 	mutable const Data* mData; // Pointer to the source array, if resolved. NULL else
 
 
-	Accessor() 
-	{ 
-		mCount = 0; mSize = 0; mOffset = 0; mStride = 0; mData = NULL; 
+	Accessor()
+	{
+		mCount = 0; mSize = 0; mOffset = 0; mStride = 0; mData = NULL;
 		mSubOffset[0] = mSubOffset[1] = mSubOffset[2] = mSubOffset[3] = 0;
 		mSubOffset[0] = mSubOffset[1] = mSubOffset[2] = mSubOffset[3] = 0;
 	}
 	}
 };
 };
@@ -332,15 +332,15 @@ struct Mesh
 		for (unsigned int i = 0; i < AI_MAX_NUMBER_OF_TEXTURECOORDS;++i)
 		for (unsigned int i = 0; i < AI_MAX_NUMBER_OF_TEXTURECOORDS;++i)
 			mNumUVComponents[i] = 2;
 			mNumUVComponents[i] = 2;
 	}
 	}
-    
+
     std::string mName;
     std::string mName;
 
 
 	// just to check if there's some sophisticated addressing involved...
 	// just to check if there's some sophisticated addressing involved...
 	// which we don't support, and therefore should warn about.
 	// which we don't support, and therefore should warn about.
-	std::string mVertexID; 
+	std::string mVertexID;
 
 
 	// Vertex data addressed by vertex indices
 	// Vertex data addressed by vertex indices
-	std::vector<InputChannel> mPerVertexData; 
+	std::vector<InputChannel> mPerVertexData;
 
 
 	// actual mesh data, assembled on encounter of a <p> element. Verbose format, not indexed
 	// actual mesh data, assembled on encounter of a <p> element. Verbose format, not indexed
 	std::vector<aiVector3D> mPositions;
 	std::vector<aiVector3D> mPositions;
@@ -355,8 +355,8 @@ struct Mesh
 	// Faces. Stored are only the number of vertices for each face.
 	// Faces. Stored are only the number of vertices for each face.
 	// 1 == point, 2 == line, 3 == triangle, 4+ == poly
 	// 1 == point, 2 == line, 3 == triangle, 4+ == poly
 	std::vector<size_t> mFaceSize;
 	std::vector<size_t> mFaceSize;
-	
-	// Position indices for all faces in the sequence given in mFaceSize - 
+
+	// Position indices for all faces in the sequence given in mFaceSize -
 	// necessary for bone weight assignment
 	// necessary for bone weight assignment
 	std::vector<size_t> mFacePosIndices;
 	std::vector<size_t> mFacePosIndices;
 
 
@@ -381,7 +381,7 @@ enum PrimitiveType
 struct Controller
 struct Controller
 {
 {
 	// the URL of the mesh deformed by the controller.
 	// the URL of the mesh deformed by the controller.
-	std::string mMeshId; 
+	std::string mMeshId;
 
 
 	// accessor URL of the joint names
 	// accessor URL of the joint names
 	std::string mJointNameSource;
 	std::string mJointNameSource;
@@ -392,7 +392,7 @@ struct Controller
 	// accessor URL of the joint inverse bind matrices
 	// accessor URL of the joint inverse bind matrices
 	std::string mJointOffsetMatrixSource;
 	std::string mJointOffsetMatrixSource;
 
 
-	// input channel: joint names. 
+	// input channel: joint names.
 	InputChannel mWeightInputJoints;
 	InputChannel mWeightInputJoints;
 	// input channel: joint weights
 	// input channel: joint weights
 	InputChannel mWeightInputWeights;
 	InputChannel mWeightInputWeights;
@@ -422,7 +422,7 @@ enum ParamType
 struct EffectParam
 struct EffectParam
 {
 {
 	ParamType mType;
 	ParamType mType;
-	std::string mReference; // to which other thing the param is referring to. 
+	std::string mReference; // to which other thing the param is referring to.
 };
 };
 
 
 /** Shading type supported by the standard effect spec of Collada */
 /** Shading type supported by the standard effect spec of Collada */
@@ -526,7 +526,7 @@ struct Effect
 	// ---------------------------------------------------------
 	// ---------------------------------------------------------
 	// Double-sided?
 	// Double-sided?
 	bool mDoubleSided, mWireframe, mFaceted;
 	bool mDoubleSided, mWireframe, mFaceted;
-	
+
 	Effect()
 	Effect()
 		: mShadeType    (Shade_Phong)
 		: mShadeType    (Shade_Phong)
 		, mEmissive		( 0, 0, 0, 1)
 		, mEmissive		( 0, 0, 0, 1)
@@ -543,7 +543,7 @@ struct Effect
 		, mDoubleSided	(false)
 		, mDoubleSided	(false)
 		, mWireframe    (false)
 		, mWireframe    (false)
 		, mFaceted      (false)
 		, mFaceted      (false)
-	{ 
+	{
 	}
 	}
 };
 };
 
 
@@ -566,8 +566,8 @@ struct Image
 /** An animation channel. */
 /** An animation channel. */
 struct AnimationChannel
 struct AnimationChannel
 {
 {
-	/** URL of the data to animate. Could be about anything, but we support only the 
-	 * "NodeID/TransformID.SubElement" notation 
+	/** URL of the data to animate. Could be about anything, but we support only the
+	 * "NodeID/TransformID.SubElement" notation
 	 */
 	 */
 	std::string mTarget;
 	std::string mTarget;
 
 

+ 63 - 63
code/ColladaLoader.cpp

@@ -7,8 +7,8 @@ Copyright (c) 2006-2015, assimp team
 
 
 All rights reserved.
 All rights reserved.
 
 
-Redistribution and use of this software in source and binary forms, 
-with or without modification, are permitted provided that the following 
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the following
 conditions are met:
 conditions are met:
 
 
 * Redistributions of source code must retain the above
 * Redistributions of source code must retain the above
@@ -25,16 +25,16 @@ contributors may be used to endorse or promote products
 derived from this software without specific prior
 derived from this software without specific prior
 written permission of the assimp team.
 written permission of the assimp team.
 
 
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+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
 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 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 
+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.
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 ---------------------------------------------------------------------------
 ---------------------------------------------------------------------------
 */
 */
@@ -74,7 +74,7 @@ static const aiImporterDesc desc = {
 	3,
 	3,
 	1,
 	1,
 	5,
 	5,
-	"dae" 
+	"dae"
 };
 };
 
 
 
 
@@ -93,12 +93,12 @@ ColladaLoader::~ColladaLoader()
 {}
 {}
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-// Returns whether the class can handle the format of the given file. 
+// Returns whether the class can handle the format of the given file.
 bool ColladaLoader::CanRead( const std::string& pFile, IOSystem* pIOHandler, bool checkSig) const
 bool ColladaLoader::CanRead( const std::string& pFile, IOSystem* pIOHandler, bool checkSig) const
 {
 {
-	// check file extension 
+	// check file extension
 	std::string extension = GetExtension(pFile);
 	std::string extension = GetExtension(pFile);
-	
+
 	if( extension == "dae")
 	if( extension == "dae")
 		return true;
 		return true;
 
 
@@ -132,7 +132,7 @@ const aiImporterDesc* ColladaLoader::GetInfo () const
 }
 }
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-// Imports the given file into the given scene structure. 
+// Imports the given file into the given scene structure.
 void ColladaLoader::InternReadFile( const std::string& pFile, aiScene* pScene, IOSystem* pIOHandler)
 void ColladaLoader::InternReadFile( const std::string& pFile, aiScene* pScene, IOSystem* pIOHandler)
 {
 {
 	mFileName = pFile;
 	mFileName = pFile;
@@ -170,21 +170,21 @@ void ColladaLoader::InternReadFile( const std::string& pFile, aiScene* pScene, I
 	FillMaterials(parser, pScene);
 	FillMaterials(parser, pScene);
 
 
         // Apply unitsize scale calculation
         // Apply unitsize scale calculation
-        pScene->mRootNode->mTransformation *= aiMatrix4x4(parser.mUnitSize, 0,  0,  0, 
+        pScene->mRootNode->mTransformation *= aiMatrix4x4(parser.mUnitSize, 0,  0,  0,
                                                           0,  parser.mUnitSize,  0,  0,
                                                           0,  parser.mUnitSize,  0,  0,
                                                           0,  0,  parser.mUnitSize,  0,
                                                           0,  0,  parser.mUnitSize,  0,
                                                           0,  0,  0,  1);
                                                           0,  0,  0,  1);
         if( !ignoreUpDirection ) {
         if( !ignoreUpDirection ) {
         // Convert to Y_UP, if different orientation
         // Convert to Y_UP, if different orientation
 		if( parser.mUpDirection == ColladaParser::UP_X)
 		if( parser.mUpDirection == ColladaParser::UP_X)
-			pScene->mRootNode->mTransformation *= aiMatrix4x4( 
-				 0, -1,  0,  0, 
+			pScene->mRootNode->mTransformation *= aiMatrix4x4(
+				 0, -1,  0,  0,
 				 1,  0,  0,  0,
 				 1,  0,  0,  0,
 				 0,  0,  1,  0,
 				 0,  0,  1,  0,
 				 0,  0,  0,  1);
 				 0,  0,  0,  1);
 		else if( parser.mUpDirection == ColladaParser::UP_Z)
 		else if( parser.mUpDirection == ColladaParser::UP_Z)
-			pScene->mRootNode->mTransformation *= aiMatrix4x4( 
-				 1,  0,  0,  0, 
+			pScene->mRootNode->mTransformation *= aiMatrix4x4(
+				 1,  0,  0,  0,
 				 0,  0,  1,  0,
 				 0,  0,  1,  0,
 				 0, -1,  0,  0,
 				 0, -1,  0,  0,
 				 0,  0,  0,  1);
 				 0,  0,  0,  1);
@@ -207,7 +207,7 @@ void ColladaLoader::InternReadFile( const std::string& pFile, aiScene* pScene, I
 
 
 	// If no meshes have been loaded, it's probably just an animated skeleton.
 	// If no meshes have been loaded, it's probably just an animated skeleton.
 	if (!pScene->mNumMeshes) {
 	if (!pScene->mNumMeshes) {
-	
+
 		if (!noSkeletonMesh) {
 		if (!noSkeletonMesh) {
 			SkeletonMeshBuilder hero(pScene);
 			SkeletonMeshBuilder hero(pScene);
 		}
 		}
@@ -282,9 +282,9 @@ void ColladaLoader::ResolveNodeInstances( const ColladaParser& pParser, const Co
 		if (!nd) {
 		if (!nd) {
 			nd = FindNode(pParser.mRootNode,(*it).mNode);
 			nd = FindNode(pParser.mRootNode,(*it).mNode);
 		}
 		}
-		if (!nd) 
+		if (!nd)
 			DefaultLogger::get()->error("Collada: Unable to resolve reference to instanced node " + (*it).mNode);
 			DefaultLogger::get()->error("Collada: Unable to resolve reference to instanced node " + (*it).mNode);
-		
+
 		else {
 		else {
 			//	attach this node to the list of children
 			//	attach this node to the list of children
 			resolved.push_back(nd);
 			resolved.push_back(nd);
@@ -320,7 +320,7 @@ void ColladaLoader::BuildLightsForNode( const ColladaParser& pParser, const Coll
 			continue;
 			continue;
 		}
 		}
 		const Collada::Light* srcLight = &srcLightIt->second;
 		const Collada::Light* srcLight = &srcLightIt->second;
-		
+
 		// now fill our ai data structure
 		// now fill our ai data structure
 		aiLight* out = new aiLight();
 		aiLight* out = new aiLight();
 		out->mName = pTarget->mName;
 		out->mName = pTarget->mName;
@@ -338,13 +338,13 @@ void ColladaLoader::BuildLightsForNode( const ColladaParser& pParser, const Coll
 
 
 		// convert falloff angle and falloff exponent in our representation, if given
 		// convert falloff angle and falloff exponent in our representation, if given
 		if (out->mType == aiLightSource_SPOT) {
 		if (out->mType == aiLightSource_SPOT) {
-			
+
 			out->mAngleInnerCone = AI_DEG_TO_RAD( srcLight->mFalloffAngle );
 			out->mAngleInnerCone = AI_DEG_TO_RAD( srcLight->mFalloffAngle );
 
 
-			// ... some extension magic. 
+			// ... some extension magic.
 			if (srcLight->mOuterAngle >= ASSIMP_COLLADA_LIGHT_ANGLE_NOT_SET*(1-1e-6f))
 			if (srcLight->mOuterAngle >= ASSIMP_COLLADA_LIGHT_ANGLE_NOT_SET*(1-1e-6f))
 			{
 			{
-				// ... some deprecation magic. 
+				// ... some deprecation magic.
 				if (srcLight->mPenumbraAngle >= ASSIMP_COLLADA_LIGHT_ANGLE_NOT_SET*(1-1e-6f))
 				if (srcLight->mPenumbraAngle >= ASSIMP_COLLADA_LIGHT_ANGLE_NOT_SET*(1-1e-6f))
 				{
 				{
 					// Need to rely on falloff_exponent. I don't know how to interpret it, so I need to guess ....
 					// Need to rely on falloff_exponent. I don't know how to interpret it, so I need to guess ....
@@ -397,13 +397,13 @@ void ColladaLoader::BuildCamerasForNode( const ColladaParser& pParser, const Col
 		out->mClipPlaneFar = srcCamera->mZFar;
 		out->mClipPlaneFar = srcCamera->mZFar;
 		out->mClipPlaneNear = srcCamera->mZNear;
 		out->mClipPlaneNear = srcCamera->mZNear;
 
 
-		// ... but for the rest some values are optional 
-		// and we need to compute the others in any combination. 
+		// ... but for the rest some values are optional
+		// and we need to compute the others in any combination.
 		 if (srcCamera->mAspect != 10e10f)
 		 if (srcCamera->mAspect != 10e10f)
 			out->mAspect = srcCamera->mAspect;
 			out->mAspect = srcCamera->mAspect;
 
 
 		if (srcCamera->mHorFov != 10e10f) {
 		if (srcCamera->mHorFov != 10e10f) {
-			out->mHorizontalFOV = srcCamera->mHorFov; 
+			out->mHorizontalFOV = srcCamera->mHorFov;
 
 
 			if (srcCamera->mVerFov != 10e10f && srcCamera->mAspect == 10e10f) {
 			if (srcCamera->mVerFov != 10e10f && srcCamera->mAspect == 10e10f) {
 				out->mAspect = tan(AI_DEG_TO_RAD(srcCamera->mHorFov)) /
 				out->mAspect = tan(AI_DEG_TO_RAD(srcCamera->mHorFov)) /
@@ -480,7 +480,7 @@ void ColladaLoader::BuildMeshesForNode( const ColladaParser& pParser, const Coll
 				table = &meshMatIt->second;
 				table = &meshMatIt->second;
 				meshMaterial = table->mMatName;
 				meshMaterial = table->mMatName;
 			}
 			}
-			else 
+			else
 			{
 			{
 				DefaultLogger::get()->warn( boost::str( boost::format( "Collada: No material specified for subgroup <%s> in geometry <%s>.") % submesh.mMaterial % mid.mMeshOrController));
 				DefaultLogger::get()->warn( boost::str( boost::format( "Collada: No material specified for subgroup <%s> in geometry <%s>.") % submesh.mMaterial % mid.mMeshOrController));
 				if( !mid.mMaterials.empty() )
 				if( !mid.mMaterials.empty() )
@@ -516,7 +516,7 @@ void ColladaLoader::BuildMeshesForNode( const ColladaParser& pParser, const Coll
 			std::map<ColladaMeshIndex, size_t>::const_iterator dstMeshIt = mMeshIndexByID.find( index);
 			std::map<ColladaMeshIndex, size_t>::const_iterator dstMeshIt = mMeshIndexByID.find( index);
 			if( dstMeshIt != mMeshIndexByID.end())	{
 			if( dstMeshIt != mMeshIndexByID.end())	{
 				newMeshRefs.push_back( dstMeshIt->second);
 				newMeshRefs.push_back( dstMeshIt->second);
-			} 
+			}
 			else
 			else
 			{
 			{
 				// else we have to add the mesh to the collection and store its newly assigned index at the node
 				// else we have to add the mesh to the collection and store its newly assigned index at the node
@@ -549,11 +549,11 @@ void ColladaLoader::BuildMeshesForNode( const ColladaParser& pParser, const Coll
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
 // Creates a mesh for the given ColladaMesh face subset and returns the newly created mesh
 // Creates a mesh for the given ColladaMesh face subset and returns the newly created mesh
-aiMesh* ColladaLoader::CreateMesh( const ColladaParser& pParser, const Collada::Mesh* pSrcMesh, const Collada::SubMesh& pSubMesh, 
+aiMesh* ColladaLoader::CreateMesh( const ColladaParser& pParser, const Collada::Mesh* pSrcMesh, const Collada::SubMesh& pSubMesh,
 	const Collada::Controller* pSrcController, size_t pStartVertex, size_t pStartFace)
 	const Collada::Controller* pSrcController, size_t pStartVertex, size_t pStartFace)
 {
 {
 	aiMesh* dstMesh = new aiMesh;
 	aiMesh* dstMesh = new aiMesh;
-    
+
     dstMesh->mName = pSrcMesh->mName;
     dstMesh->mName = pSrcMesh->mName;
 
 
 	// count the vertices addressed by its faces
 	// count the vertices addressed by its faces
@@ -563,11 +563,11 @@ aiMesh* ColladaLoader::CreateMesh( const ColladaParser& pParser, const Collada::
 	// copy positions
 	// copy positions
 	dstMesh->mNumVertices = numVertices;
 	dstMesh->mNumVertices = numVertices;
 	dstMesh->mVertices = new aiVector3D[numVertices];
 	dstMesh->mVertices = new aiVector3D[numVertices];
-	std::copy( pSrcMesh->mPositions.begin() + pStartVertex, pSrcMesh->mPositions.begin() + 
+	std::copy( pSrcMesh->mPositions.begin() + pStartVertex, pSrcMesh->mPositions.begin() +
 		pStartVertex + numVertices, dstMesh->mVertices);
 		pStartVertex + numVertices, dstMesh->mVertices);
 
 
-	// normals, if given. HACK: (thom) Due to the glorious Collada spec we never 
-	// know if we have the same number of normals as there are positions. So we 
+	// normals, if given. HACK: (thom) Due to the glorious Collada spec we never
+	// know if we have the same number of normals as there are positions. So we
 	// also ignore any vertex attribute if it has a different count
 	// also ignore any vertex attribute if it has a different count
 	if( pSrcMesh->mNormals.size() >= pStartVertex + numVertices)
 	if( pSrcMesh->mNormals.size() >= pStartVertex + numVertices)
 	{
 	{
@@ -576,19 +576,19 @@ aiMesh* ColladaLoader::CreateMesh( const ColladaParser& pParser, const Collada::
 			pStartVertex + numVertices, dstMesh->mNormals);
 			pStartVertex + numVertices, dstMesh->mNormals);
 	}
 	}
 
 
-	// tangents, if given. 
+	// tangents, if given.
 	if( pSrcMesh->mTangents.size() >= pStartVertex + numVertices)
 	if( pSrcMesh->mTangents.size() >= pStartVertex + numVertices)
 	{
 	{
 		dstMesh->mTangents = new aiVector3D[numVertices];
 		dstMesh->mTangents = new aiVector3D[numVertices];
-		std::copy( pSrcMesh->mTangents.begin() + pStartVertex, pSrcMesh->mTangents.begin() + 
+		std::copy( pSrcMesh->mTangents.begin() + pStartVertex, pSrcMesh->mTangents.begin() +
 			pStartVertex + numVertices, dstMesh->mTangents);
 			pStartVertex + numVertices, dstMesh->mTangents);
 	}
 	}
 
 
-	// bitangents, if given. 
+	// bitangents, if given.
 	if( pSrcMesh->mBitangents.size() >= pStartVertex + numVertices)
 	if( pSrcMesh->mBitangents.size() >= pStartVertex + numVertices)
 	{
 	{
 		dstMesh->mBitangents = new aiVector3D[numVertices];
 		dstMesh->mBitangents = new aiVector3D[numVertices];
-		std::copy( pSrcMesh->mBitangents.begin() + pStartVertex, pSrcMesh->mBitangents.begin() + 
+		std::copy( pSrcMesh->mBitangents.begin() + pStartVertex, pSrcMesh->mBitangents.begin() +
 			pStartVertex + numVertices, dstMesh->mBitangents);
 			pStartVertex + numVertices, dstMesh->mBitangents);
 	}
 	}
 
 
@@ -601,7 +601,7 @@ aiMesh* ColladaLoader::CreateMesh( const ColladaParser& pParser, const Collada::
 			dstMesh->mTextureCoords[real] = new aiVector3D[numVertices];
 			dstMesh->mTextureCoords[real] = new aiVector3D[numVertices];
 			for( size_t b = 0; b < numVertices; ++b)
 			for( size_t b = 0; b < numVertices; ++b)
 				dstMesh->mTextureCoords[real][b] = pSrcMesh->mTexCoords[a][pStartVertex+b];
 				dstMesh->mTextureCoords[real][b] = pSrcMesh->mTexCoords[a][pStartVertex+b];
-			
+
 			dstMesh->mNumUVComponents[real] = pSrcMesh->mNumUVComponents[a];
 			dstMesh->mNumUVComponents[real] = pSrcMesh->mNumUVComponents[a];
 			++real;
 			++real;
 		}
 		}
@@ -848,7 +848,7 @@ void ColladaLoader::StoreSceneMaterials( aiScene* pScene)
 }
 }
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-// Stores all animations 
+// Stores all animations
 void ColladaLoader::StoreAnimations( aiScene* pScene, const ColladaParser& pParser)
 void ColladaLoader::StoreAnimations( aiScene* pScene, const ColladaParser& pParser)
 {
 {
 	// recursivly collect all animations from the collada scene
 	// recursivly collect all animations from the collada scene
@@ -918,7 +918,7 @@ void ColladaLoader::StoreAnimations( aiScene* pScene, const ColladaParser& pPars
 }
 }
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-// Constructs the animations for the given source anim 
+// Constructs the animations for the given source anim
 void ColladaLoader::StoreAnimations( aiScene* pScene, const ColladaParser& pParser, const Collada::Animation* pSrcAnim, const std::string &pPrefix)
 void ColladaLoader::StoreAnimations( aiScene* pScene, const ColladaParser& pParser, const Collada::Animation* pSrcAnim, const std::string &pPrefix)
 {
 {
 	std::string animName = pPrefix.empty() ? pSrcAnim->mName : pPrefix + "_" + pSrcAnim->mName;
 	std::string animName = pPrefix.empty() ? pSrcAnim->mName : pPrefix + "_" + pSrcAnim->mName;
@@ -989,7 +989,7 @@ void ColladaLoader::CreateAnimation( aiScene* pScene, const ColladaParser& pPars
 					entry.mSubElement = 1;
 					entry.mSubElement = 1;
 				else if( subElement == "Z")
 				else if( subElement == "Z")
 					entry.mSubElement = 2;
 					entry.mSubElement = 2;
-				else 
+				else
 					DefaultLogger::get()->warn( boost::str( boost::format( "Unknown anim subelement <%s>. Ignoring") % subElement));
 					DefaultLogger::get()->warn( boost::str( boost::format( "Unknown anim subelement <%s>. Ignoring") % subElement));
 			} else
 			} else
 			{
 			{
@@ -1002,9 +1002,9 @@ void ColladaLoader::CreateAnimation( aiScene* pScene, const ColladaParser& pPars
 			{
 			{
 				entry.mTransformId = srcChannel.mTarget.substr(slashPos + 1, bracketPos - slashPos - 1);
 				entry.mTransformId = srcChannel.mTarget.substr(slashPos + 1, bracketPos - slashPos - 1);
 				std::string subElement = srcChannel.mTarget.substr(bracketPos);
 				std::string subElement = srcChannel.mTarget.substr(bracketPos);
-			
+
 				if (subElement == "(0)(0)")
 				if (subElement == "(0)(0)")
-					entry.mSubElement = 0; 
+					entry.mSubElement = 0;
 				else if (subElement == "(1)(0)")
 				else if (subElement == "(1)(0)")
 					entry.mSubElement = 1;
 					entry.mSubElement = 1;
 				else if (subElement == "(2)(0)")
 				else if (subElement == "(2)(0)")
@@ -1259,7 +1259,7 @@ void ColladaLoader::AddTexture ( aiMaterial& mat, const ColladaParser& pParser,
 	mat.AddProperty((float*)&sampler.mWeighting , 1,
 	mat.AddProperty((float*)&sampler.mWeighting , 1,
 		_AI_MATKEY_TEXBLEND_BASE, type, idx);
 		_AI_MATKEY_TEXBLEND_BASE, type, idx);
 
 
-	// UV source index ... if we didn't resolve the mapping, it is actually just 
+	// UV source index ... if we didn't resolve the mapping, it is actually just
 	// a guess but it works in most cases. We search for the frst occurence of a
 	// a guess but it works in most cases. We search for the frst occurence of a
 	// number in the channel name. We assume it is the zero-based index into the
 	// number in the channel name. We assume it is the zero-based index into the
 	// UV channel array of all corresponding meshes. It could also be one-based
 	// UV channel array of all corresponding meshes. It could also be one-based
@@ -1289,7 +1289,7 @@ void ColladaLoader::FillMaterials( const ColladaParser& pParser, aiScene* /*pSce
 	for (std::vector<std::pair<Collada::Effect*, aiMaterial*> >::iterator it = newMats.begin(),
 	for (std::vector<std::pair<Collada::Effect*, aiMaterial*> >::iterator it = newMats.begin(),
 		end = newMats.end(); it != end; ++it)
 		end = newMats.end(); it != end; ++it)
 	{
 	{
-		aiMaterial&  mat = (aiMaterial&)*it->second; 
+		aiMaterial&  mat = (aiMaterial&)*it->second;
 		Collada::Effect& effect = *it->first;
 		Collada::Effect& effect = *it->first;
 
 
 		// resolve shading mode
 		// resolve shading mode
@@ -1299,22 +1299,22 @@ void ColladaLoader::FillMaterials( const ColladaParser& pParser, aiScene* /*pSce
 		else {
 		else {
 			switch( effect.mShadeType)
 			switch( effect.mShadeType)
 			{
 			{
-			case Collada::Shade_Constant: 
-				shadeMode = aiShadingMode_NoShading; 
+			case Collada::Shade_Constant:
+				shadeMode = aiShadingMode_NoShading;
 				break;
 				break;
 			case Collada::Shade_Lambert:
 			case Collada::Shade_Lambert:
-				shadeMode = aiShadingMode_Gouraud; 
+				shadeMode = aiShadingMode_Gouraud;
 				break;
 				break;
-			case Collada::Shade_Blinn: 
+			case Collada::Shade_Blinn:
 				shadeMode = aiShadingMode_Blinn;
 				shadeMode = aiShadingMode_Blinn;
 				break;
 				break;
-			case Collada::Shade_Phong: 
-				shadeMode = aiShadingMode_Phong; 
+			case Collada::Shade_Phong:
+				shadeMode = aiShadingMode_Phong;
 				break;
 				break;
 
 
 			default:
 			default:
 				DefaultLogger::get()->warn("Collada: Unrecognized shading mode, using gouraud shading");
 				DefaultLogger::get()->warn("Collada: Unrecognized shading mode, using gouraud shading");
-				shadeMode = aiShadingMode_Gouraud; 
+				shadeMode = aiShadingMode_Gouraud;
 				break;
 				break;
 			}
 			}
 		}
 		}
@@ -1350,7 +1350,7 @@ void ColladaLoader::FillMaterials( const ColladaParser& pParser, aiScene* /*pSce
 			if(effect.mRGBTransparency) {
 			if(effect.mRGBTransparency) {
 				effect.mTransparency = 1.f - effect.mTransparent.a;
 				effect.mTransparency = 1.f - effect.mTransparent.a;
 			}
 			}
-			
+
 			// Global option
 			// Global option
 			if(invertTransparency) {
 			if(invertTransparency) {
 				effect.mTransparency = 1.f - effect.mTransparency;
 				effect.mTransparency = 1.f - effect.mTransparency;
@@ -1364,7 +1364,7 @@ void ColladaLoader::FillMaterials( const ColladaParser& pParser, aiScene* /*pSce
 		}
 		}
 
 
 		// add textures, if given
 		// add textures, if given
-		if( !effect.mTexAmbient.mName.empty()) 
+		if( !effect.mTexAmbient.mName.empty())
 			 /* It is merely a lightmap */
 			 /* It is merely a lightmap */
 			AddTexture( mat, pParser, effect, effect.mTexAmbient, aiTextureType_LIGHTMAP);
 			AddTexture( mat, pParser, effect, effect.mTexAmbient, aiTextureType_LIGHTMAP);
 
 
@@ -1455,16 +1455,16 @@ aiString ColladaLoader::FindFilenameForEffectTexture( const ColladaParser& pPars
 
 
 	// find the image referred by this name in the image library of the scene
 	// find the image referred by this name in the image library of the scene
 	ColladaParser::ImageLibrary::const_iterator imIt = pParser.mImageLibrary.find( name);
 	ColladaParser::ImageLibrary::const_iterator imIt = pParser.mImageLibrary.find( name);
-	if( imIt == pParser.mImageLibrary.end()) 
+	if( imIt == pParser.mImageLibrary.end())
 	{
 	{
-		throw DeadlyImportError( boost::str( boost::format( 
+		throw DeadlyImportError( boost::str( boost::format(
 			"Collada: Unable to resolve effect texture entry \"%s\", ended up at ID \"%s\".") % pName % name));
 			"Collada: Unable to resolve effect texture entry \"%s\", ended up at ID \"%s\".") % pName % name));
 	}
 	}
 
 
 	aiString result;
 	aiString result;
 
 
 	// if this is an embedded texture image setup an aiTexture for it
 	// if this is an embedded texture image setup an aiTexture for it
-	if (imIt->second.mFileName.empty()) 
+	if (imIt->second.mFileName.empty())
 	{
 	{
 		if (imIt->second.mImageData.empty())  {
 		if (imIt->second.mImageData.empty())  {
 			throw DeadlyImportError("Collada: Invalid texture, no data or file reference given");
 			throw DeadlyImportError("Collada: Invalid texture, no data or file reference given");
@@ -1491,7 +1491,7 @@ aiString ColladaLoader::FindFilenameForEffectTexture( const ColladaParser& pPars
 		// and add this texture to the list
 		// and add this texture to the list
 		mTextures.push_back(tex);
 		mTextures.push_back(tex);
 	}
 	}
-	else 
+	else
 	{
 	{
 		result.Set( imIt->second.mFileName );
 		result.Set( imIt->second.mFileName );
 		ConvertPath(result);
 		ConvertPath(result);
@@ -1507,14 +1507,14 @@ void ColladaLoader::ConvertPath (aiString& ss)
 	// For the moment we're just stripping the file:// away to make it work.
 	// For the moment we're just stripping the file:// away to make it work.
 	// Windoes doesn't seem to be able to find stuff like
 	// Windoes doesn't seem to be able to find stuff like
 	// 'file://..\LWO\LWO2\MappingModes\earthSpherical.jpg'
 	// 'file://..\LWO\LWO2\MappingModes\earthSpherical.jpg'
-	if (0 == strncmp(ss.data,"file://",7)) 
+	if (0 == strncmp(ss.data,"file://",7))
 	{
 	{
 		ss.length -= 7;
 		ss.length -= 7;
 		memmove(ss.data,ss.data+7,ss.length);
 		memmove(ss.data,ss.data+7,ss.length);
 		ss.data[ss.length] = '\0';
 		ss.data[ss.length] = '\0';
 	}
 	}
 
 
-  // Maxon Cinema Collada Export writes "file:///C:\andsoon" with three slashes... 
+  // Maxon Cinema Collada Export writes "file:///C:\andsoon" with three slashes...
   // I need to filter it without destroying linux paths starting with "/somewhere"
   // I need to filter it without destroying linux paths starting with "/somewhere"
   if( ss.data[0] == '/' && isalpha( ss.data[1]) && ss.data[2] == ':' )
   if( ss.data[0] == '/' && isalpha( ss.data[1]) && ss.data[2] == ':' )
   {
   {

+ 22 - 22
code/ColladaLoader.h

@@ -7,8 +7,8 @@ Open Asset Import Library (assimp)
 Copyright (c) 2006-2015, assimp team
 Copyright (c) 2006-2015, assimp team
 All rights reserved.
 All rights reserved.
 
 
-Redistribution and use of this software in source and binary forms, 
-with or without modification, are permitted provided that the 
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the
 following conditions are met:
 following conditions are met:
 
 
 * Redistributions of source code must retain the above
 * Redistributions of source code must retain the above
@@ -25,16 +25,16 @@ contributors may be used to endorse or promote products
 derived from this software without specific prior
 derived from this software without specific prior
 written permission of the assimp team.
 written permission of the assimp team.
 
 
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+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
 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 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 
+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.
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
@@ -60,17 +60,17 @@ struct ColladaMeshIndex
 	std::string mMeshID;
 	std::string mMeshID;
 	size_t mSubMesh;
 	size_t mSubMesh;
 	std::string mMaterial;
 	std::string mMaterial;
-	ColladaMeshIndex( const std::string& pMeshID, size_t pSubMesh, const std::string& pMaterial) 
+	ColladaMeshIndex( const std::string& pMeshID, size_t pSubMesh, const std::string& pMaterial)
 		: mMeshID( pMeshID), mSubMesh( pSubMesh), mMaterial( pMaterial)
 		: mMeshID( pMeshID), mSubMesh( pSubMesh), mMaterial( pMaterial)
 	{   }
 	{   }
 
 
 	bool operator < (const ColladaMeshIndex& p) const
 	bool operator < (const ColladaMeshIndex& p) const
 	{
 	{
-		if( mMeshID == p.mMeshID) 
+		if( mMeshID == p.mMeshID)
 		{
 		{
 			if( mSubMesh == p.mSubMesh)
 			if( mSubMesh == p.mSubMesh)
 				return mMaterial < p.mMaterial;
 				return mMaterial < p.mMaterial;
-			else 
+			else
 				return mSubMesh < p.mSubMesh;
 				return mSubMesh < p.mSubMesh;
 		} else
 		} else
 		{
 		{
@@ -80,7 +80,7 @@ struct ColladaMeshIndex
 };
 };
 
 
 /** Loader class to read Collada scenes. Collada is over-engineered to death, with every new iteration bringing
 /** Loader class to read Collada scenes. Collada is over-engineered to death, with every new iteration bringing
- * more useless stuff, so I limited the data to what I think is useful for games. 
+ * more useless stuff, so I limited the data to what I think is useful for games.
 */
 */
 class ColladaLoader : public BaseImporter
 class ColladaLoader : public BaseImporter
 {
 {
@@ -90,7 +90,7 @@ public:
 
 
 
 
 public:
 public:
-	/** Returns whether the class can handle the format of the given file. 
+	/** Returns whether the class can handle the format of the given file.
 	 * See BaseImporter::CanRead() for details.	*/
 	 * See BaseImporter::CanRead() for details.	*/
 	bool CanRead( const std::string& pFile, IOSystem* pIOHandler, bool checkSig) const;
 	bool CanRead( const std::string& pFile, IOSystem* pIOHandler, bool checkSig) const;
 
 
@@ -102,7 +102,7 @@ protected:
 
 
 	void SetupProperties(const Importer* pImp);
 	void SetupProperties(const Importer* pImp);
 
 
-	/** Imports the given file into the given scene structure. 
+	/** Imports the given file into the given scene structure.
 	 * See BaseImporter::InternReadFile() for details
 	 * See BaseImporter::InternReadFile() for details
 	 */
 	 */
 	void InternReadFile( const std::string& pFile, aiScene* pScene, IOSystem* pIOHandler);
 	void InternReadFile( const std::string& pFile, aiScene* pScene, IOSystem* pIOHandler);
@@ -115,19 +115,19 @@ protected:
 		std::vector<const Collada::Node*>& resolved);
 		std::vector<const Collada::Node*>& resolved);
 
 
 	/** Builds meshes for the given node and references them */
 	/** Builds meshes for the given node and references them */
-	void BuildMeshesForNode( const ColladaParser& pParser, const Collada::Node* pNode, 
+	void BuildMeshesForNode( const ColladaParser& pParser, const Collada::Node* pNode,
 		aiNode* pTarget);
 		aiNode* pTarget);
 
 
 	/** Creates a mesh for the given ColladaMesh face subset and returns the newly created mesh */
 	/** Creates a mesh for the given ColladaMesh face subset and returns the newly created mesh */
-	aiMesh* CreateMesh( const ColladaParser& pParser, const Collada::Mesh* pSrcMesh, const Collada::SubMesh& pSubMesh, 
+	aiMesh* CreateMesh( const ColladaParser& pParser, const Collada::Mesh* pSrcMesh, const Collada::SubMesh& pSubMesh,
 		const Collada::Controller* pSrcController, size_t pStartVertex, size_t pStartFace);
 		const Collada::Controller* pSrcController, size_t pStartVertex, size_t pStartFace);
 
 
 	/** Builds cameras for the given node and references them */
 	/** Builds cameras for the given node and references them */
-	void BuildCamerasForNode( const ColladaParser& pParser, const Collada::Node* pNode, 
+	void BuildCamerasForNode( const ColladaParser& pParser, const Collada::Node* pNode,
 		aiNode* pTarget);
 		aiNode* pTarget);
 
 
 	/** Builds lights for the given node and references them */
 	/** Builds lights for the given node and references them */
-	void BuildLightsForNode( const ColladaParser& pParser, const Collada::Node* pNode, 
+	void BuildLightsForNode( const ColladaParser& pParser, const Collada::Node* pNode,
 		aiNode* pTarget);
 		aiNode* pTarget);
 
 
 	/** Stores all meshes in the given scene */
 	/** Stores all meshes in the given scene */
@@ -145,7 +145,7 @@ protected:
 	/** Stores all textures in the given scene */
 	/** Stores all textures in the given scene */
 	void StoreSceneTextures( aiScene* pScene);
 	void StoreSceneTextures( aiScene* pScene);
 
 
-	/** Stores all animations 
+	/** Stores all animations
 	 * @param pScene target scene to store the anims
 	 * @param pScene target scene to store the anims
 	 */
 	 */
 	void StoreAnimations( aiScene* pScene, const ColladaParser& pParser);
 	void StoreAnimations( aiScene* pScene, const ColladaParser& pParser);
@@ -159,7 +159,7 @@ protected:
 
 
 	/** Constructs the animation for the given source anim */
 	/** Constructs the animation for the given source anim */
 	void CreateAnimation( aiScene* pScene, const ColladaParser& pParser, const Collada::Animation* pSrcAnim, const std::string& pName);
 	void CreateAnimation( aiScene* pScene, const ColladaParser& pParser, const Collada::Animation* pSrcAnim, const std::string& pName);
-	
+
 	/** Constructs materials from the collada material definitions */
 	/** Constructs materials from the collada material definitions */
 	void BuildMaterials( ColladaParser& pParser, aiScene* pScene);
 	void BuildMaterials( ColladaParser& pParser, aiScene* pScene);
 
 
@@ -177,7 +177,7 @@ protected:
 		aiTextureType type, unsigned int idx = 0);
 		aiTextureType type, unsigned int idx = 0);
 
 
 	/** Resolves the texture name for the given effect texture entry */
 	/** Resolves the texture name for the given effect texture entry */
-	aiString FindFilenameForEffectTexture( const ColladaParser& pParser, 
+	aiString FindFilenameForEffectTexture( const ColladaParser& pParser,
 		const Collada::Effect& pEffect, const std::string& pName);
 		const Collada::Effect& pEffect, const std::string& pName);
 
 
 	/** Converts a path read from a collada file to the usual representation */
 	/** Converts a path read from a collada file to the usual representation */

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 141 - 141
code/ColladaParser.cpp


+ 21 - 21
code/ColladaParser.h

@@ -5,8 +5,8 @@ Open Asset Import Library (assimp)
 Copyright (c) 2006-2015, assimp team
 Copyright (c) 2006-2015, assimp team
 All rights reserved.
 All rights reserved.
 
 
-Redistribution and use of this software in source and binary forms, 
-with or without modification, are permitted provided that the 
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the
 following conditions are met:
 following conditions are met:
 
 
 * Redistributions of source code must retain the above
 * Redistributions of source code must retain the above
@@ -23,23 +23,23 @@ contributors may be used to endorse or promote products
 derived from this software without specific prior
 derived from this software without specific prior
 written permission of the assimp team.
 written permission of the assimp team.
 
 
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+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
 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 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 
+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.
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
 */
 */
 
 
 /** @file ColladaParser.h
 /** @file ColladaParser.h
- *  @brief Defines the parser helper class for the collada loader 
+ *  @brief Defines the parser helper class for the collada loader
  */
  */
 
 
 #ifndef AI_COLLADAPARSER_H_INC
 #ifndef AI_COLLADAPARSER_H_INC
@@ -54,9 +54,9 @@ namespace Assimp
 {
 {
 
 
 // ------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------
-/** Parser helper class for the Collada loader. 
+/** Parser helper class for the Collada loader.
  *
  *
- *  Does all the XML reading and builds internal data structures from it, 
+ *  Does all the XML reading and builds internal data structures from it,
  *  but leaves the resolving of all the references to the loader.
  *  but leaves the resolving of all the references to the loader.
 */
 */
 class ColladaParser
 class ColladaParser
@@ -154,7 +154,7 @@ protected:
 	/** Reads a mesh from the geometry library */
 	/** Reads a mesh from the geometry library */
 	void ReadMesh( Collada::Mesh* pMesh);
 	void ReadMesh( Collada::Mesh* pMesh);
 
 
-	/** Reads a source element - a combination of raw data and an accessor defining 
+	/** Reads a source element - a combination of raw data and an accessor defining
 	 * things that should not be redefinable. Yes, that's another rant.
 	 * things that should not be redefinable. Yes, that's another rant.
 	 */
 	 */
 	void ReadSource();
 	void ReadSource();
@@ -164,7 +164,7 @@ protected:
 	 */
 	 */
 	void ReadDataArray();
 	void ReadDataArray();
 
 
-	/** Reads an accessor and stores it in the global library under the given ID - 
+	/** Reads an accessor and stores it in the global library under the given ID -
 	 * accessors use the ID of the parent <source> element
 	 * accessors use the ID of the parent <source> element
 	 */
 	 */
 	void ReadAccessor( const std::string& pID);
 	void ReadAccessor( const std::string& pID);
@@ -231,7 +231,7 @@ protected:
 	/** Tests for the closing tag of the given element, throws an exception if not found */
 	/** Tests for the closing tag of the given element, throws an exception if not found */
 	void TestClosing( const char* pName);
 	void TestClosing( const char* pName);
 
 
-	/** Checks the present element for the presence of the attribute, returns its index 
+	/** Checks the present element for the presence of the attribute, returns its index
 	    or throws an exception if not found */
 	    or throws an exception if not found */
 	int GetAttribute( const char* pAttr) const;
 	int GetAttribute( const char* pAttr) const;
 
 
@@ -239,7 +239,7 @@ protected:
 	    therefore useful for optional attributes */
 	    therefore useful for optional attributes */
 	int TestAttribute( const char* pAttr) const;
 	int TestAttribute( const char* pAttr) const;
 
 
-	/** Reads the text contents of an element, throws an exception if not given. 
+	/** Reads the text contents of an element, throws an exception if not given.
 	    Skips leading whitespace. */
 	    Skips leading whitespace. */
 	const char* GetTextContent();
 	const char* GetTextContent();
 
 
@@ -270,7 +270,7 @@ protected:
 	/** XML reader, member for everyday use */
 	/** XML reader, member for everyday use */
 	irr::io::IrrXMLReader* mReader;
 	irr::io::IrrXMLReader* mReader;
 
 
-	/** All data arrays found in the file by ID. Might be referred to by actually 
+	/** All data arrays found in the file by ID. Might be referred to by actually
 	    everyone. Collada, you are a steaming pile of indirection. */
 	    everyone. Collada, you are a steaming pile of indirection. */
 	typedef std::map<std::string, Collada::Data> DataLibrary;
 	typedef std::map<std::string, Collada::Data> DataLibrary;
 	DataLibrary mDataLibrary;
 	DataLibrary mDataLibrary;
@@ -311,7 +311,7 @@ protected:
 	typedef std::map<std::string, Collada::Controller> ControllerLibrary;
 	typedef std::map<std::string, Collada::Controller> ControllerLibrary;
 	ControllerLibrary mControllerLibrary;
 	ControllerLibrary mControllerLibrary;
 
 
-	/** Pointer to the root node. Don't delete, it just points to one of 
+	/** Pointer to the root node. Don't delete, it just points to one of
 	    the nodes in the node library. */
 	    the nodes in the node library. */
 	Collada::Node* mRootNode;
 	Collada::Node* mRootNode;
 
 
@@ -332,13 +332,13 @@ protected:
 // Check for element match
 // Check for element match
 inline bool ColladaParser::IsElement( const char* pName) const
 inline bool ColladaParser::IsElement( const char* pName) const
 {
 {
-	ai_assert( mReader->getNodeType() == irr::io::EXN_ELEMENT); 
-	return ::strcmp( mReader->getNodeName(), pName) == 0; 
+	ai_assert( mReader->getNodeType() == irr::io::EXN_ELEMENT);
+	return ::strcmp( mReader->getNodeName(), pName) == 0;
 }
 }
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
 // Finds the item in the given library by its reference, throws if not found
 // Finds the item in the given library by its reference, throws if not found
-template <typename Type> 
+template <typename Type>
 const Type& ColladaParser::ResolveLibraryReference( const std::map<std::string, Type>& pLibrary, const std::string& pURL) const
 const Type& ColladaParser::ResolveLibraryReference( const std::map<std::string, Type>& pLibrary, const std::string& pURL) const
 {
 {
 	typename std::map<std::string, Type>::const_iterator it = pLibrary.find( pURL);
 	typename std::map<std::string, Type>::const_iterator it = pLibrary.find( pURL);

+ 24 - 24
code/ComputeUVMappingProcess.cpp

@@ -5,8 +5,8 @@ Open Asset Import Library (assimp)
 Copyright (c) 2006-2015, assimp team
 Copyright (c) 2006-2015, assimp team
 All rights reserved.
 All rights reserved.
 
 
-Redistribution and use of this software in source and binary forms, 
-with or without modification, are permitted provided that the 
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the
 following conditions are met:
 following conditions are met:
 
 
 * Redistributions of source code must retain the above
 * Redistributions of source code must retain the above
@@ -23,16 +23,16 @@ following conditions are met:
   derived from this software without specific prior
   derived from this software without specific prior
   written permission of the assimp team.
   written permission of the assimp team.
 
 
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+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
 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 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 
+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.
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
@@ -96,7 +96,7 @@ inline unsigned int FindEmptyUVChannel (aiMesh* mesh)
 {
 {
 	for (unsigned int m = 0; m < AI_MAX_NUMBER_OF_TEXTURECOORDS;++m)
 	for (unsigned int m = 0; m < AI_MAX_NUMBER_OF_TEXTURECOORDS;++m)
 		if (!mesh->mTextureCoords[m])return m;
 		if (!mesh->mTextureCoords[m])return m;
-	
+
 	DefaultLogger::get()->error("Unable to compute UV coordinates, no free UV slot found");
 	DefaultLogger::get()->error("Unable to compute UV coordinates, no free UV slot found");
 	return UINT_MAX;
 	return UINT_MAX;
 }
 }
@@ -106,8 +106,8 @@ inline unsigned int FindEmptyUVChannel (aiMesh* mesh)
 void RemoveUVSeams (aiMesh* mesh, aiVector3D* out)
 void RemoveUVSeams (aiMesh* mesh, aiVector3D* out)
 {
 {
 	// TODO: just a very rough algorithm. I think it could be done
 	// TODO: just a very rough algorithm. I think it could be done
-	// much easier, but I don't know how and am currently too tired to 
-	// to think about a better solution. 
+	// much easier, but I don't know how and am currently too tired to
+	// to think about a better solution.
 
 
 	const static float LOWER_LIMIT = 0.1f;
 	const static float LOWER_LIMIT = 0.1f;
 	const static float UPPER_LIMIT = 0.9f;
 	const static float UPPER_LIMIT = 0.9f;
@@ -125,7 +125,7 @@ void RemoveUVSeams (aiMesh* mesh, aiVector3D* out)
 
 
 		// Check whether this face lies on a UV seam. We can just guess,
 		// Check whether this face lies on a UV seam. We can just guess,
 		// but the assumption that a face with at least one very small
 		// but the assumption that a face with at least one very small
-		// on the one side and one very large U coord on the other side 
+		// on the one side and one very large U coord on the other side
 		// lies on a UV seam should work for most cases.
 		// lies on a UV seam should work for most cases.
 		for (unsigned int n = 0; n < face.mNumIndices;++n)
 		for (unsigned int n = 0; n < face.mNumIndices;++n)
 		{
 		{
@@ -153,12 +153,12 @@ void RemoveUVSeams (aiMesh* mesh, aiVector3D* out)
 		{
 		{
 			for (unsigned int n = 0; n < face.mNumIndices;++n)
 			for (unsigned int n = 0; n < face.mNumIndices;++n)
 			{
 			{
-				// If the u value is over the upper limit and no other u 
+				// If the u value is over the upper limit and no other u
 				// value of that face is 0, round it to 0
 				// value of that face is 0, round it to 0
 				if (out[face.mIndices[n]].x > UPPER_LIMIT && !zero)
 				if (out[face.mIndices[n]].x > UPPER_LIMIT && !zero)
 					out[face.mIndices[n]].x = 0.f;
 					out[face.mIndices[n]].x = 0.f;
 
 
-				// If the u value is below the lower limit and no other u 
+				// If the u value is below the lower limit and no other u
 				// value of that face is 1, round it to 1
 				// value of that face is 1, round it to 1
 				else if (out[face.mIndices[n]].x < LOWER_LIMIT && !one)
 				else if (out[face.mIndices[n]].x < LOWER_LIMIT && !one)
 					out[face.mIndices[n]].x = 1.f;
 					out[face.mIndices[n]].x = 1.f;
@@ -166,7 +166,7 @@ void RemoveUVSeams (aiMesh* mesh, aiVector3D* out)
 				// The face contains both 0 and 1 as UV coords. This can occur
 				// The face contains both 0 and 1 as UV coords. This can occur
 				// for faces which have an edge that lies directly on the seam.
 				// for faces which have an edge that lies directly on the seam.
 				// Due to numerical inaccuracies one U coord becomes 0, the
 				// Due to numerical inaccuracies one U coord becomes 0, the
-				// other 1. But we do still have a third UV coord to determine 
+				// other 1. But we do still have a third UV coord to determine
 				// to which side we must round to.
 				// to which side we must round to.
 				else if (one && zero)
 				else if (one && zero)
 				{
 				{
@@ -188,7 +188,7 @@ void ComputeUVMappingProcess::ComputeSphereMapping(aiMesh* mesh,const aiVector3D
 
 
 	// If the axis is one of x,y,z run a faster code path. It's worth the extra effort ...
 	// If the axis is one of x,y,z run a faster code path. It's worth the extra effort ...
 	// currently the mapping axis will always be one of x,y,z, except if the
 	// currently the mapping axis will always be one of x,y,z, except if the
-	// PretransformVertices step is used (it transforms the meshes into worldspace, 
+	// PretransformVertices step is used (it transforms the meshes into worldspace,
 	// thus changing the mapping axis)
 	// thus changing the mapping axis)
 	if (axis * base_axis_x >= angle_epsilon)	{
 	if (axis * base_axis_x >= angle_epsilon)	{
 
 
@@ -200,7 +200,7 @@ void ComputeUVMappingProcess::ComputeSphereMapping(aiMesh* mesh,const aiVector3D
 		// x = cos(lon)*cos(lat)
 		// x = cos(lon)*cos(lat)
 		// y = sin(lon)*cos(lat)
 		// y = sin(lon)*cos(lat)
 		// z = sin(lat)
 		// z = sin(lat)
-		// 
+		//
 		// Thus we can derive:
 		// Thus we can derive:
 		// lat  = arcsin (z)
 		// lat  = arcsin (z)
 		// lon  = arctan (y/x)
 		// lon  = arctan (y/x)
@@ -238,8 +238,8 @@ void ComputeUVMappingProcess::ComputeSphereMapping(aiMesh* mesh,const aiVector3D
 				(asin  (diff.z) + AI_MATH_HALF_PI_F) / AI_MATH_PI_F, 0.f);
 				(asin  (diff.z) + AI_MATH_HALF_PI_F) / AI_MATH_PI_F, 0.f);
 		}
 		}
 	}
 	}
-	
-	
+
+
 	// Now find and remove UV seams. A seam occurs if a face has a tcoord
 	// Now find and remove UV seams. A seam occurs if a face has a tcoord
 	// close to zero on the one side, and a tcoord close to one on the
 	// close to zero on the one side, and a tcoord close to one on the
 	// other side.
 	// other side.
@@ -253,13 +253,13 @@ void ComputeUVMappingProcess::ComputeCylinderMapping(aiMesh* mesh,const aiVector
 
 
 	// If the axis is one of x,y,z run a faster code path. It's worth the extra effort ...
 	// If the axis is one of x,y,z run a faster code path. It's worth the extra effort ...
 	// currently the mapping axis will always be one of x,y,z, except if the
 	// currently the mapping axis will always be one of x,y,z, except if the
-	// PretransformVertices step is used (it transforms the meshes into worldspace, 
+	// PretransformVertices step is used (it transforms the meshes into worldspace,
 	// thus changing the mapping axis)
 	// thus changing the mapping axis)
 	if (axis * base_axis_x >= angle_epsilon)	{
 	if (axis * base_axis_x >= angle_epsilon)	{
 		FindMeshCenter(mesh, center, min, max);
 		FindMeshCenter(mesh, center, min, max);
 		const float diff = max.x - min.x;
 		const float diff = max.x - min.x;
 
 
-		// If the main axis is 'z', the z coordinate of a point 'p' is mapped 
+		// If the main axis is 'z', the z coordinate of a point 'p' is mapped
 		// directly to the texture V axis. The other axis is derived from
 		// directly to the texture V axis. The other axis is derived from
 		// the angle between ( p.x - c.x, p.y - c.y ) and (1,0), where
 		// the angle between ( p.x - c.x, p.y - c.y ) and (1,0), where
 		// 'c' is the center point of the mesh.
 		// 'c' is the center point of the mesh.
@@ -328,7 +328,7 @@ void ComputeUVMappingProcess::ComputePlaneMapping(aiMesh* mesh,const aiVector3D&
 
 
 	// If the axis is one of x,y,z run a faster code path. It's worth the extra effort ...
 	// If the axis is one of x,y,z run a faster code path. It's worth the extra effort ...
 	// currently the mapping axis will always be one of x,y,z, except if the
 	// currently the mapping axis will always be one of x,y,z, except if the
-	// PretransformVertices step is used (it transforms the meshes into worldspace, 
+	// PretransformVertices step is used (it transforms the meshes into worldspace,
 	// thus changing the mapping axis)
 	// thus changing the mapping axis)
 	if (axis * base_axis_x >= angle_epsilon)	{
 	if (axis * base_axis_x >= angle_epsilon)	{
 		FindMeshCenter(mesh, center, min, max);
 		FindMeshCenter(mesh, center, min, max);
@@ -386,7 +386,7 @@ void ComputeUVMappingProcess::ComputeBoxMapping( aiMesh*, aiVector3D* )
 }
 }
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-void ComputeUVMappingProcess::Execute( aiScene* pScene) 
+void ComputeUVMappingProcess::Execute( aiScene* pScene)
 {
 {
 	DefaultLogger::get()->debug("GenUVCoordsProcess begin");
 	DefaultLogger::get()->debug("GenUVCoordsProcess begin");
 	char buffer[1024];
 	char buffer[1024];

+ 10 - 10
code/ComputeUVMappingProcess.h

@@ -5,8 +5,8 @@ Open Asset Import Library (assimp)
 Copyright (c) 2006-2015, assimp team
 Copyright (c) 2006-2015, assimp team
 All rights reserved.
 All rights reserved.
 
 
-Redistribution and use of this software in source and binary forms, 
-with or without modification, are permitted provided that the 
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the
 following conditions are met:
 following conditions are met:
 
 
 * Redistributions of source code must retain the above
 * Redistributions of source code must retain the above
@@ -23,16 +23,16 @@ following conditions are met:
   derived from this software without specific prior
   derived from this software without specific prior
   written permission of the assimp team.
   written permission of the assimp team.
 
 
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+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
 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 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 
+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.
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
@@ -109,7 +109,7 @@ protected:
 	 *  @param axis Main axis
 	 *  @param axis Main axis
 	 *  @param out Receives output UV coordinates
 	 *  @param out Receives output UV coordinates
 	*/
 	*/
-	void ComputePlaneMapping(aiMesh* mesh,const aiVector3D& axis, 
+	void ComputePlaneMapping(aiMesh* mesh,const aiVector3D& axis,
 		aiVector3D* out);
 		aiVector3D* out);
 
 
 	// -------------------------------------------------------------------
 	// -------------------------------------------------------------------

+ 38 - 38
code/ConvertToLHProcess.cpp

@@ -7,8 +7,8 @@ Copyright (c) 2006-2015, assimp team
 
 
 All rights reserved.
 All rights reserved.
 
 
-Redistribution and use of this software in source and binary forms, 
-with or without modification, are permitted provided that the following 
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the following
 conditions are met:
 conditions are met:
 
 
 * Redistributions of source code must retain the above
 * Redistributions of source code must retain the above
@@ -25,16 +25,16 @@ conditions are met:
   derived from this software without specific prior
   derived from this software without specific prior
   written permission of the assimp team.
   written permission of the assimp team.
 
 
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+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
 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 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 
+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.
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 ---------------------------------------------------------------------------
 ---------------------------------------------------------------------------
 */
 */
@@ -85,7 +85,7 @@ void MakeLeftHandedProcess::Execute( aiScene* pScene)
 	ai_assert(pScene->mRootNode != NULL);
 	ai_assert(pScene->mRootNode != NULL);
 	DefaultLogger::get()->debug("MakeLeftHandedProcess begin");
 	DefaultLogger::get()->debug("MakeLeftHandedProcess begin");
 
 
-	// recursively convert all the nodes 
+	// recursively convert all the nodes
 	ProcessNode( pScene->mRootNode, aiMatrix4x4());
 	ProcessNode( pScene->mRootNode, aiMatrix4x4());
 
 
 	// process the meshes accordingly
 	// process the meshes accordingly
@@ -133,7 +133,7 @@ void MakeLeftHandedProcess::ProcessNode( aiNode* pNode, const aiMatrix4x4& pPare
 }
 }
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-// Converts a single mesh to left handed coordinates. 
+// Converts a single mesh to left handed coordinates.
 void MakeLeftHandedProcess::ProcessMesh( aiMesh* pMesh)
 void MakeLeftHandedProcess::ProcessMesh( aiMesh* pMesh)
 {
 {
 	// mirror positions, normals and stuff along the Z axis
 	// mirror positions, normals and stuff along the Z axis
@@ -141,7 +141,7 @@ void MakeLeftHandedProcess::ProcessMesh( aiMesh* pMesh)
 	{
 	{
 		pMesh->mVertices[a].z *= -1.0f;
 		pMesh->mVertices[a].z *= -1.0f;
 		if( pMesh->HasNormals())
 		if( pMesh->HasNormals())
-			pMesh->mNormals[a].z *= -1.0f;		
+			pMesh->mNormals[a].z *= -1.0f;
 		if( pMesh->HasTangentsAndBitangents())
 		if( pMesh->HasTangentsAndBitangents())
 		{
 		{
 			pMesh->mTangents[a].z *= -1.0f;
 			pMesh->mTangents[a].z *= -1.0f;
@@ -170,7 +170,7 @@ void MakeLeftHandedProcess::ProcessMesh( aiMesh* pMesh)
 }
 }
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-// Converts a single material to left handed coordinates. 
+// Converts a single material to left handed coordinates.
 void MakeLeftHandedProcess::ProcessMaterial( aiMaterial* _mat)
 void MakeLeftHandedProcess::ProcessMaterial( aiMaterial* _mat)
 {
 {
 	aiMaterial* mat = (aiMaterial*)_mat;
 	aiMaterial* mat = (aiMaterial*)_mat;
@@ -179,7 +179,7 @@ void MakeLeftHandedProcess::ProcessMaterial( aiMaterial* _mat)
 
 
 		// Mapping axis for UV mappings?
 		// Mapping axis for UV mappings?
 		if (!::strcmp( prop->mKey.data, "$tex.mapaxis"))	{
 		if (!::strcmp( prop->mKey.data, "$tex.mapaxis"))	{
-			ai_assert( prop->mDataLength >= sizeof(aiVector3D)); /* something is wrong with the validation if we end up here */ 
+			ai_assert( prop->mDataLength >= sizeof(aiVector3D)); /* something is wrong with the validation if we end up here */
 			aiVector3D* pff = (aiVector3D*)prop->mData;
 			aiVector3D* pff = (aiVector3D*)prop->mData;
 
 
 			pff->z *= -1.f;
 			pff->z *= -1.f;
@@ -188,27 +188,27 @@ void MakeLeftHandedProcess::ProcessMaterial( aiMaterial* _mat)
 }
 }
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-// Converts the given animation to LH coordinates. 
-void MakeLeftHandedProcess::ProcessAnimation( aiNodeAnim* pAnim) 
-{ 
-	// position keys 
-	for( unsigned int a = 0; a < pAnim->mNumPositionKeys; a++) 
-		pAnim->mPositionKeys[a].mValue.z *= -1.0f; 
-
-	// rotation keys 
-	for( unsigned int a = 0; a < pAnim->mNumRotationKeys; a++) 
-	{ 
-		/* That's the safe version, but the float errors add up. So we try the short version instead 
-		aiMatrix3x3 rotmat = pAnim->mRotationKeys[a].mValue.GetMatrix(); 
-		rotmat.a3 = -rotmat.a3; rotmat.b3 = -rotmat.b3; 
-		rotmat.c1 = -rotmat.c1; rotmat.c2 = -rotmat.c2; 
-		aiQuaternion rotquat( rotmat); 
-		pAnim->mRotationKeys[a].mValue = rotquat; 
-		*/ 
-		pAnim->mRotationKeys[a].mValue.x *= -1.0f; 
-		pAnim->mRotationKeys[a].mValue.y *= -1.0f; 
-	} 
-} 
+// Converts the given animation to LH coordinates.
+void MakeLeftHandedProcess::ProcessAnimation( aiNodeAnim* pAnim)
+{
+	// position keys
+	for( unsigned int a = 0; a < pAnim->mNumPositionKeys; a++)
+		pAnim->mPositionKeys[a].mValue.z *= -1.0f;
+
+	// rotation keys
+	for( unsigned int a = 0; a < pAnim->mNumRotationKeys; a++)
+	{
+		/* That's the safe version, but the float errors add up. So we try the short version instead
+		aiMatrix3x3 rotmat = pAnim->mRotationKeys[a].mValue.GetMatrix();
+		rotmat.a3 = -rotmat.a3; rotmat.b3 = -rotmat.b3;
+		rotmat.c1 = -rotmat.c1; rotmat.c2 = -rotmat.c2;
+		aiQuaternion rotquat( rotmat);
+		pAnim->mRotationKeys[a].mValue = rotquat;
+		*/
+		pAnim->mRotationKeys[a].mValue.x *= -1.0f;
+		pAnim->mRotationKeys[a].mValue.y *= -1.0f;
+	}
+}
 
 
 #endif // !!  ASSIMP_BUILD_NO_MAKELEFTHANDED_PROCESS
 #endif // !!  ASSIMP_BUILD_NO_MAKELEFTHANDED_PROCESS
 #ifndef  ASSIMP_BUILD_NO_FLIPUVS_PROCESS
 #ifndef  ASSIMP_BUILD_NO_FLIPUVS_PROCESS
@@ -245,7 +245,7 @@ void FlipUVsProcess::Execute( aiScene* pScene)
 }
 }
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-// Converts a single material 
+// Converts a single material
 void FlipUVsProcess::ProcessMaterial (aiMaterial* _mat)
 void FlipUVsProcess::ProcessMaterial (aiMaterial* _mat)
 {
 {
 	aiMaterial* mat = (aiMaterial*)_mat;
 	aiMaterial* mat = (aiMaterial*)_mat;
@@ -269,7 +269,7 @@ void FlipUVsProcess::ProcessMaterial (aiMaterial* _mat)
 }
 }
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-// Converts a single mesh 
+// Converts a single mesh
 void FlipUVsProcess::ProcessMesh( aiMesh* pMesh)
 void FlipUVsProcess::ProcessMesh( aiMesh* pMesh)
 {
 {
 	// mirror texture y coordinate
 	// mirror texture y coordinate
@@ -316,7 +316,7 @@ void FlipWindingOrderProcess::Execute( aiScene* pScene)
 }
 }
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-// Converts a single mesh 
+// Converts a single mesh
 void FlipWindingOrderProcess::ProcessMesh( aiMesh* pMesh)
 void FlipWindingOrderProcess::ProcessMesh( aiMesh* pMesh)
 {
 {
 	// invert the order of all faces in this mesh
 	// invert the order of all faces in this mesh

+ 15 - 15
code/ConvertToLHProcess.h

@@ -5,8 +5,8 @@ Open Asset Import Library (assimp)
 Copyright (c) 2006-2015, assimp team
 Copyright (c) 2006-2015, assimp team
 All rights reserved.
 All rights reserved.
 
 
-Redistribution and use of this software in source and binary forms, 
-with or without modification, are permitted provided that the 
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the
 following conditions are met:
 following conditions are met:
 
 
 * Redistributions of source code must retain the above
 * Redistributions of source code must retain the above
@@ -23,16 +23,16 @@ following conditions are met:
   derived from this software without specific prior
   derived from this software without specific prior
   written permission of the assimp team.
   written permission of the assimp team.
 
 
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+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
 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 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 
+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.
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
@@ -44,7 +44,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  *
  *  - LH to RH
  *  - LH to RH
  *  - UV origin upper-left to lower-left
  *  - UV origin upper-left to lower-left
- *  - face order cw to ccw 
+ *  - face order cw to ccw
  */
  */
 #ifndef AI_CONVERTTOLHPROCESS_H_INC
 #ifndef AI_CONVERTTOLHPROCESS_H_INC
 #define AI_CONVERTTOLHPROCESS_H_INC
 #define AI_CONVERTTOLHPROCESS_H_INC
@@ -61,9 +61,9 @@ namespace Assimp	{
 
 
 // -----------------------------------------------------------------------------------
 // -----------------------------------------------------------------------------------
 /** @brief The MakeLeftHandedProcess converts all imported data to a left-handed
 /** @brief The MakeLeftHandedProcess converts all imported data to a left-handed
- *   coordinate system. 
+ *   coordinate system.
  *
  *
- * This implies a mirroring of the Z axis of the coordinate system. But to keep 
+ * This implies a mirroring of the Z axis of the coordinate system. But to keep
  * transformation matrices free from reflections we shift the reflection to other
  * transformation matrices free from reflections we shift the reflection to other
  * places. We mirror the meshes and adapt the rotations.
  * places. We mirror the meshes and adapt the rotations.
  *
  *
@@ -71,7 +71,7 @@ namespace Assimp	{
  */
  */
 class MakeLeftHandedProcess : public BaseProcess
 class MakeLeftHandedProcess : public BaseProcess
 {
 {
-	
+
 
 
 public:
 public:
 	MakeLeftHandedProcess();
 	MakeLeftHandedProcess();
@@ -91,7 +91,7 @@ protected:
 	void ProcessNode( aiNode* pNode, const aiMatrix4x4& pParentGlobalRotation);
 	void ProcessNode( aiNode* pNode, const aiMatrix4x4& pParentGlobalRotation);
 
 
 	// -------------------------------------------------------------------
 	// -------------------------------------------------------------------
-	/** Converts a single mesh to left handed coordinates. 
+	/** Converts a single mesh to left handed coordinates.
 	 * This means that positions, normals and tangents are mirrored at
 	 * This means that positions, normals and tangents are mirrored at
 	 * the local Z axis and the order of all faces are inverted.
 	 * the local Z axis and the order of all faces are inverted.
 	 * @param pMesh The mesh to convert.
 	 * @param pMesh The mesh to convert.
@@ -105,7 +105,7 @@ protected:
 	void ProcessMaterial( aiMaterial* pMat);
 	void ProcessMaterial( aiMaterial* pMat);
 
 
 	// -------------------------------------------------------------------
 	// -------------------------------------------------------------------
-	/** Converts the given animation to LH coordinates. 
+	/** Converts the given animation to LH coordinates.
 	 * The rotation and translation keys are transformed, the scale keys
 	 * The rotation and translation keys are transformed, the scale keys
 	 * work in local space and can therefore be left untouched.
 	 * work in local space and can therefore be left untouched.
 	 * @param pAnim The bone animation to transform
 	 * @param pAnim The bone animation to transform

+ 11 - 11
code/DXFHelper.h

@@ -5,8 +5,8 @@ Open Asset Import Library (assimp)
 Copyright (c) 2006-2015, assimp team
 Copyright (c) 2006-2015, assimp team
 All rights reserved.
 All rights reserved.
 
 
-Redistribution and use of this software in source and binary forms, 
-with or without modification, are permitted provided that the 
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the
 following conditions are met:
 following conditions are met:
 
 
 * Redistributions of source code must retain the above
 * Redistributions of source code must retain the above
@@ -23,22 +23,22 @@ following conditions are met:
   derived from this software without specific prior
   derived from this software without specific prior
   written permission of the assimp team.
   written permission of the assimp team.
 
 
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+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
 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 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 
+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.
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
 */
 */
 
 
-/** @file  DXFHelper.h 
+/** @file  DXFHelper.h
  *  @brief Internal utilities for the DXF loader.
  *  @brief Internal utilities for the DXF loader.
  */
  */
 
 
@@ -180,7 +180,7 @@ struct PolyLine
 	PolyLine()
 	PolyLine()
 		: flags()
 		: flags()
 	{}
 	{}
-	
+
 	std::vector<aiVector3D> positions;
 	std::vector<aiVector3D> positions;
 	std::vector<aiColor4D>  colors;
 	std::vector<aiColor4D>  colors;
 	std::vector<unsigned int> indices;
 	std::vector<unsigned int> indices;

+ 47 - 47
code/DXFLoader.cpp

@@ -7,8 +7,8 @@ Copyright (c) 2006-2015, assimp team
 
 
 All rights reserved.
 All rights reserved.
 
 
-Redistribution and use of this software in source and binary forms, 
-with or without modification, are permitted provided that the following 
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the following
 conditions are met:
 conditions are met:
 
 
 * Redistributions of source code must retain the above
 * Redistributions of source code must retain the above
@@ -25,16 +25,16 @@ conditions are met:
   derived from this software without specific prior
   derived from this software without specific prior
   written permission of the assimp team.
   written permission of the assimp team.
 
 
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+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
 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 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 
+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.
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 ---------------------------------------------------------------------------
 ---------------------------------------------------------------------------
 */
 */
@@ -59,14 +59,14 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
 using namespace Assimp;
 using namespace Assimp;
 
 
-// AutoCAD Binary DXF<CR><LF><SUB><NULL> 
+// AutoCAD Binary DXF<CR><LF><SUB><NULL>
 #define AI_DXF_BINARY_IDENT ("AutoCAD Binary DXF\r\n\x1a\0")
 #define AI_DXF_BINARY_IDENT ("AutoCAD Binary DXF\r\n\x1a\0")
 #define AI_DXF_BINARY_IDENT_LEN (24)
 #define AI_DXF_BINARY_IDENT_LEN (24)
 
 
 // default vertex color that all uncolored vertices will receive
 // default vertex color that all uncolored vertices will receive
 #define AI_DXF_DEFAULT_COLOR aiColor4D(0.6f,0.6f,0.6f,0.6f)
 #define AI_DXF_DEFAULT_COLOR aiColor4D(0.6f,0.6f,0.6f,0.6f)
 
 
-// color indices for DXF - 16 are supported, the table is 
+// color indices for DXF - 16 are supported, the table is
 // taken directly from the DXF spec.
 // taken directly from the DXF spec.
 static aiColor4D g_aclrDxfIndexColors[] =
 static aiColor4D g_aclrDxfIndexColors[] =
 {
 {
@@ -101,7 +101,7 @@ static const aiImporterDesc desc = {
 	0,
 	0,
 	0,
 	0,
 	0,
 	0,
-	"dxf" 
+	"dxf"
 };
 };
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
@@ -110,12 +110,12 @@ DXFImporter::DXFImporter()
 {}
 {}
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-// Destructor, private as well 
+// Destructor, private as well
 DXFImporter::~DXFImporter()
 DXFImporter::~DXFImporter()
 {}
 {}
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-// Returns whether the class can handle the format of the given file. 
+// Returns whether the class can handle the format of the given file.
 bool DXFImporter::CanRead( const std::string& pFile, IOSystem* /*pIOHandler*/, bool /*checkSig*/) const
 bool DXFImporter::CanRead( const std::string& pFile, IOSystem* /*pIOHandler*/, bool /*checkSig*/) const
 {
 {
 	return SimpleExtensionCheck(pFile,"dxf");
 	return SimpleExtensionCheck(pFile,"dxf");
@@ -129,13 +129,13 @@ const aiImporterDesc* DXFImporter::GetInfo () const
 }
 }
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-// Imports the given file into the given scene structure. 
-void DXFImporter::InternReadFile( const std::string& pFile, 
-	aiScene* pScene, 
+// Imports the given file into the given scene structure.
+void DXFImporter::InternReadFile( const std::string& pFile,
+	aiScene* pScene,
 	IOSystem* pIOHandler)
 	IOSystem* pIOHandler)
 {
 {
 	boost::shared_ptr<IOStream> file = boost::shared_ptr<IOStream>( pIOHandler->Open( pFile) );
 	boost::shared_ptr<IOStream> file = boost::shared_ptr<IOStream>( pIOHandler->Open( pFile) );
-	
+
 	// Check whether we can read the file
 	// Check whether we can read the file
 	if( file.get() == NULL) {
 	if( file.get() == NULL) {
 		throw DeadlyImportError( "Failed to open DXF file " + pFile + "");
 		throw DeadlyImportError( "Failed to open DXF file " + pFile + "");
@@ -153,7 +153,7 @@ void DXFImporter::InternReadFile( const std::string& pFile,
 	// which will choose a suitable strategy.
 	// which will choose a suitable strategy.
 	file->Seek(0,aiOrigin_SET);
 	file->Seek(0,aiOrigin_SET);
 	StreamReaderLE stream( file );
 	StreamReaderLE stream( file );
-	
+
 	DXF::LineReader reader (stream);
 	DXF::LineReader reader (stream);
 	DXF::FileData output;
 	DXF::FileData output;
 
 
@@ -167,14 +167,14 @@ void DXFImporter::InternReadFile( const std::string& pFile,
 			ParseBlocks(reader,output);
 			ParseBlocks(reader,output);
 			continue;
 			continue;
 		}
 		}
-	
+
 		// primary entity table
 		// primary entity table
 		if (reader.Is(2,"ENTITIES")) {
 		if (reader.Is(2,"ENTITIES")) {
 			ParseEntities(reader,output);
 			ParseEntities(reader,output);
 			continue;
 			continue;
 		}
 		}
 
 
-		// skip unneeded sections entirely to avoid any problems with them 
+		// skip unneeded sections entirely to avoid any problems with them
 		// alltogether.
 		// alltogether.
 		else if (reader.Is(2,"CLASSES") || reader.Is(2,"TABLES")) {
 		else if (reader.Is(2,"CLASSES") || reader.Is(2,"TABLES")) {
 			SkipSection(reader);
 			SkipSection(reader);
@@ -239,7 +239,7 @@ void DXFImporter::ConvertMeshes(aiScene* pScene, DXF::FileData& output)
 	}
 	}
 
 
 	DXF::Block* entities = 0;
 	DXF::Block* entities = 0;
-	
+
 	// index blocks by name
 	// index blocks by name
 	DXF::BlockMap blocks_by_name;
 	DXF::BlockMap blocks_by_name;
 	BOOST_FOREACH (DXF::Block& bl, output.blocks) {
 	BOOST_FOREACH (DXF::Block& bl, output.blocks) {
@@ -296,7 +296,7 @@ void DXFImporter::ConvertMeshes(aiScene* pScene, DXF::FileData& output)
 		unsigned int cvert = 0,cface = 0;
 		unsigned int cvert = 0,cface = 0;
 		BOOST_FOREACH(const DXF::PolyLine* pl, corr[elem.second]){
 		BOOST_FOREACH(const DXF::PolyLine* pl, corr[elem.second]){
 			// sum over all faces since we need to 'verbosify' them.
 			// sum over all faces since we need to 'verbosify' them.
-			cvert += std::accumulate(pl->counts.begin(),pl->counts.end(),0); 
+			cvert += std::accumulate(pl->counts.begin(),pl->counts.end(),0);
 			cface += pl->counts.size();
 			cface += pl->counts.size();
 		}
 		}
 
 
@@ -371,7 +371,7 @@ void DXFImporter::ExpandBlockReferences(DXF::Block& bl,const DXF::BlockMap& bloc
 
 
 		// XXX this would be the place to implement recursive expansion if needed.
 		// XXX this would be the place to implement recursive expansion if needed.
 		const DXF::Block& bl_src = *(*it).second;
 		const DXF::Block& bl_src = *(*it).second;
-		
+
 		BOOST_FOREACH (boost::shared_ptr<const DXF::PolyLine> pl_in, bl_src.lines) {
 		BOOST_FOREACH (boost::shared_ptr<const DXF::PolyLine> pl_in, bl_src.lines) {
 			boost::shared_ptr<DXF::PolyLine> pl_out = boost::shared_ptr<DXF::PolyLine>(new DXF::PolyLine(*pl_in));
 			boost::shared_ptr<DXF::PolyLine> pl_out = boost::shared_ptr<DXF::PolyLine>(new DXF::PolyLine(*pl_in));
 
 
@@ -454,21 +454,21 @@ void DXFImporter::GenerateHierarchy(aiScene* pScene, DXF::FileData& /*output*/)
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
 void DXFImporter::SkipSection(DXF::LineReader& reader)
 void DXFImporter::SkipSection(DXF::LineReader& reader)
-{	
+{
 	for( ;!reader.End() && !reader.Is(0,"ENDSEC"); reader++);
 	for( ;!reader.End() && !reader.Is(0,"ENDSEC"); reader++);
 }
 }
 
 
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
 void DXFImporter::ParseHeader(DXF::LineReader& reader, DXF::FileData& /*output*/)
 void DXFImporter::ParseHeader(DXF::LineReader& reader, DXF::FileData& /*output*/)
-{	
+{
 	for( ;!reader.End() && !reader.Is(0,"ENDSEC"); reader++);
 	for( ;!reader.End() && !reader.Is(0,"ENDSEC"); reader++);
 }
 }
 
 
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
 void DXFImporter::ParseBlocks(DXF::LineReader& reader, DXF::FileData& output)
 void DXFImporter::ParseBlocks(DXF::LineReader& reader, DXF::FileData& output)
-{	
+{
 	while( !reader.End() && !reader.Is(0,"ENDSEC")) {
 	while( !reader.End() && !reader.Is(0,"ENDSEC")) {
 		if (reader.Is(0,"BLOCK")) {
 		if (reader.Is(0,"BLOCK")) {
 			ParseBlock(++reader,output);
 			ParseBlock(++reader,output);
@@ -485,7 +485,7 @@ void DXFImporter::ParseBlocks(DXF::LineReader& reader, DXF::FileData& output)
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
 void DXFImporter::ParseBlock(DXF::LineReader& reader, DXF::FileData& output)
 void DXFImporter::ParseBlock(DXF::LineReader& reader, DXF::FileData& output)
-{	
+{
 	// push a new block onto the stack.
 	// push a new block onto the stack.
 	output.blocks.push_back( DXF::Block() );
 	output.blocks.push_back( DXF::Block() );
 	DXF::Block& block = output.blocks.back();
 	DXF::Block& block = output.blocks.back();
@@ -532,7 +532,7 @@ void DXFImporter::ParseBlock(DXF::LineReader& reader, DXF::FileData& output)
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
 void DXFImporter::ParseEntities(DXF::LineReader& reader, DXF::FileData& output)
 void DXFImporter::ParseEntities(DXF::LineReader& reader, DXF::FileData& output)
-{	
+{
 	// push a new block onto the stack.
 	// push a new block onto the stack.
 	output.blocks.push_back( DXF::Block() );
 	output.blocks.push_back( DXF::Block() );
 	DXF::Block& block = output.blocks.back();
 	DXF::Block& block = output.blocks.back();
@@ -566,13 +566,13 @@ void DXFImporter::ParseEntities(DXF::LineReader& reader, DXF::FileData& output)
 
 
 
 
 void DXFImporter::ParseInsertion(DXF::LineReader& reader, DXF::FileData& output)
 void DXFImporter::ParseInsertion(DXF::LineReader& reader, DXF::FileData& output)
-{	
+{
 	output.blocks.back().insertions.push_back( DXF::InsertBlock() );
 	output.blocks.back().insertions.push_back( DXF::InsertBlock() );
 	DXF::InsertBlock& bl = output.blocks.back().insertions.back();
 	DXF::InsertBlock& bl = output.blocks.back().insertions.back();
 
 
 	while( !reader.End() && !reader.Is(0)) {
 	while( !reader.End() && !reader.Is(0)) {
 
 
-		switch(reader.GroupCode()) 
+		switch(reader.GroupCode())
 		{
 		{
 			// name of referenced block
 			// name of referenced block
 		case 2:
 		case 2:
@@ -623,7 +623,7 @@ void DXFImporter::ParsePolyLine(DXF::LineReader& reader, DXF::FileData& output)
 
 
 	unsigned int iguess = 0, vguess = 0;
 	unsigned int iguess = 0, vguess = 0;
 	while( !reader.End() && !reader.Is(0,"ENDSEC")) {
 	while( !reader.End() && !reader.Is(0,"ENDSEC")) {
-	
+
 		if (reader.Is(0,"VERTEX")) {
 		if (reader.Is(0,"VERTEX")) {
 			ParsePolyLineVertex(++reader,line);
 			ParsePolyLineVertex(++reader,line);
 			if (reader.Is(0,"SEQEND")) {
 			if (reader.Is(0,"SEQEND")) {
@@ -632,9 +632,9 @@ void DXFImporter::ParsePolyLine(DXF::LineReader& reader, DXF::FileData& output)
 			continue;
 			continue;
 		}
 		}
 
 
-		switch(reader.GroupCode())	
+		switch(reader.GroupCode())
 		{
 		{
-		// flags --- important that we know whether it is a 
+		// flags --- important that we know whether it is a
 		// polyface mesh or 'just' a line.
 		// polyface mesh or 'just' a line.
 		case 70:
 		case 70:
 			if (!line.flags)	{
 			if (!line.flags)	{
@@ -682,7 +682,7 @@ void DXFImporter::ParsePolyLine(DXF::LineReader& reader, DXF::FileData& output)
 				return;
 				return;
 		}
 		}
 
 
-		// if these numbers are wrong, parsing might have gone wild. 
+		// if these numbers are wrong, parsing might have gone wild.
 		// however, the docs state that applications are not required
 		// however, the docs state that applications are not required
 		// to set the 71 and 72 fields, respectively, to valid values.
 		// to set the 71 and 72 fields, respectively, to valid values.
 		// So just fire a warning.
 		// So just fire a warning.
@@ -752,10 +752,10 @@ void DXFImporter::ParsePolyLineVertex(DXF::LineReader& reader, DXF::PolyLine& li
 		case 30: out.z = reader.ValueAsFloat();break;
 		case 30: out.z = reader.ValueAsFloat();break;
 
 
 		// POLYFACE vertex indices
 		// POLYFACE vertex indices
-		case 71: 
+		case 71:
 		case 72:
 		case 72:
 		case 73:
 		case 73:
-		case 74: 
+		case 74:
 			if (cnti == 4) {
 			if (cnti == 4) {
 				DefaultLogger::get()->warn("DXF: more than 4 indices per face not supported; ignoring");
 				DefaultLogger::get()->warn("DXF: more than 4 indices per face not supported; ignoring");
 				break;
 				break;
@@ -764,14 +764,14 @@ void DXFImporter::ParsePolyLineVertex(DXF::LineReader& reader, DXF::PolyLine& li
 			break;
 			break;
 
 
 		// color
 		// color
-		case 62: 
-			clr = g_aclrDxfIndexColors[reader.ValueAsUnsignedInt() % AI_DXF_NUM_INDEX_COLORS]; 
+		case 62:
+			clr = g_aclrDxfIndexColors[reader.ValueAsUnsignedInt() % AI_DXF_NUM_INDEX_COLORS];
 			break;
 			break;
 		};
 		};
-	
+
 		reader++;
 		reader++;
 	}
 	}
-	
+
 	if (line.flags & DXF_POLYLINE_FLAG_POLYFACEMESH && !(flags & DXF_VERTEX_FLAG_PART_OF_POLYFACE)) {
 	if (line.flags & DXF_POLYLINE_FLAG_POLYFACEMESH && !(flags & DXF_VERTEX_FLAG_PART_OF_POLYFACE)) {
 		DefaultLogger::get()->warn("DXF: expected vertex to be part of a polyface but the 0x128 flag isn't set");
 		DefaultLogger::get()->warn("DXF: expected vertex to be part of a polyface but the 0x128 flag isn't set");
 	}
 	}
@@ -805,7 +805,7 @@ void DXFImporter::Parse3DFace(DXF::LineReader& reader, DXF::FileData& output)
 
 
 	aiVector3D vip[4];
 	aiVector3D vip[4];
 	aiColor4D  clr = AI_DXF_DEFAULT_COLOR;
 	aiColor4D  clr = AI_DXF_DEFAULT_COLOR;
-	
+
 	bool b[4] = {false,false,false,false};
 	bool b[4] = {false,false,false,false};
 	while( !reader.End() ) {
 	while( !reader.End() ) {
 
 
@@ -813,11 +813,11 @@ void DXFImporter::Parse3DFace(DXF::LineReader& reader, DXF::FileData& output)
 		if (reader.GroupCode() == 0) {
 		if (reader.GroupCode() == 0) {
 			break;
 			break;
 		}
 		}
-		switch (reader.GroupCode())	
+		switch (reader.GroupCode())
 		{
 		{
 
 
 		// 8 specifies the layer
 		// 8 specifies the layer
-		case 8:	
+		case 8:
 			line.layer = reader.Value();
 			line.layer = reader.Value();
 			break;
 			break;
 
 
@@ -882,8 +882,8 @@ void DXFImporter::Parse3DFace(DXF::LineReader& reader, DXF::FileData& output)
 			break;
 			break;
 
 
 		// color
 		// color
-		case 62: 
-			clr = g_aclrDxfIndexColors[reader.ValueAsUnsignedInt() % AI_DXF_NUM_INDEX_COLORS]; 
+		case 62:
+			clr = g_aclrDxfIndexColors[reader.ValueAsUnsignedInt() % AI_DXF_NUM_INDEX_COLORS];
 			break;
 			break;
 		};
 		};
 
 
@@ -895,7 +895,7 @@ void DXFImporter::Parse3DFace(DXF::LineReader& reader, DXF::FileData& output)
 	if (vip[3] == vip[2]) {
 	if (vip[3] == vip[2]) {
 		b[1] = false;
 		b[1] = false;
 	}
 	}
-	
+
 	// sanity checks to see if we got something meaningful
 	// sanity checks to see if we got something meaningful
 	if ((b[1] && !b[0]) || !b[2] || !b[3]) {
 	if ((b[1] && !b[0]) || !b[2] || !b[3]) {
 		DefaultLogger::get()->warn("DXF: unexpected vertex setup in 3DFACE/LINE/FACE entity; ignoring");
 		DefaultLogger::get()->warn("DXF: unexpected vertex setup in 3DFACE/LINE/FACE entity; ignoring");

+ 25 - 25
code/DXFLoader.h

@@ -5,8 +5,8 @@ Open Asset Import Library (assimp)
 Copyright (c) 2006-2015, assimp team
 Copyright (c) 2006-2015, assimp team
 All rights reserved.
 All rights reserved.
 
 
-Redistribution and use of this software in source and binary forms, 
-with or without modification, are permitted provided that the 
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the
 following conditions are met:
 following conditions are met:
 
 
 * Redistributions of source code must retain the above
 * Redistributions of source code must retain the above
@@ -23,22 +23,22 @@ following conditions are met:
   derived from this software without specific prior
   derived from this software without specific prior
   written permission of the assimp team.
   written permission of the assimp team.
 
 
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+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
 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 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 
+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.
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
 */
 */
 
 
-/** @file  DXFLoader.h 
+/** @file  DXFLoader.h
  *  @brief Declaration of the .dxf importer class.
  *  @brief Declaration of the .dxf importer class.
  */
  */
 #ifndef AI_DXFLOADER_H_INCLUDED
 #ifndef AI_DXFLOADER_H_INCLUDED
@@ -48,7 +48,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
 namespace Assimp	{
 namespace Assimp	{
 	namespace DXF {
 	namespace DXF {
-	
+
 		class LineReader;
 		class LineReader;
 		struct FileData;
 		struct FileData;
 		struct PolyLine;
 		struct PolyLine;
@@ -74,9 +74,9 @@ public:
 public:
 public:
 
 
 	// -------------------------------------------------------------------
 	// -------------------------------------------------------------------
-	/** Returns whether the class can handle the format of the given file. 
+	/** Returns whether the class can handle the format of the given file.
 	* See BaseImporter::CanRead() for details.	*/
 	* See BaseImporter::CanRead() for details.	*/
-	bool CanRead( const std::string& pFile, IOSystem* pIOHandler, 
+	bool CanRead( const std::string& pFile, IOSystem* pIOHandler,
 		bool checkSig) const;
 		bool checkSig) const;
 
 
 protected:
 protected:
@@ -87,10 +87,10 @@ protected:
 	const aiImporterDesc* GetInfo () const;
 	const aiImporterDesc* GetInfo () const;
 
 
 	// -------------------------------------------------------------------
 	// -------------------------------------------------------------------
-	/** Imports the given file into the given scene structure. 
+	/** Imports the given file into the given scene structure.
 	 * See BaseImporter::InternReadFile() for details */
 	 * See BaseImporter::InternReadFile() for details */
-	void InternReadFile( const std::string& pFile, 
-		aiScene* pScene, 
+	void InternReadFile( const std::string& pFile,
+		aiScene* pScene,
 		IOSystem* pIOHandler);
 		IOSystem* pIOHandler);
 
 
 private:
 private:
@@ -107,39 +107,39 @@ private:
 		DXF::FileData& output);
 		DXF::FileData& output);
 
 
 	// -----------------------------------------------------
 	// -----------------------------------------------------
-	void ParseBlocks(DXF::LineReader& reader, 
+	void ParseBlocks(DXF::LineReader& reader,
 		DXF::FileData& output);
 		DXF::FileData& output);
 
 
 	// -----------------------------------------------------
 	// -----------------------------------------------------
-	void ParseBlock(DXF::LineReader& reader, 
+	void ParseBlock(DXF::LineReader& reader,
 		DXF::FileData& output);
 		DXF::FileData& output);
 
 
 	// -----------------------------------------------------
 	// -----------------------------------------------------
-	void ParseInsertion(DXF::LineReader& reader, 
+	void ParseInsertion(DXF::LineReader& reader,
 		DXF::FileData& output);
 		DXF::FileData& output);
 
 
 	// -----------------------------------------------------
 	// -----------------------------------------------------
-	void ParsePolyLine(DXF::LineReader& reader, 
+	void ParsePolyLine(DXF::LineReader& reader,
 		DXF::FileData& output);
 		DXF::FileData& output);
 
 
 	// -----------------------------------------------------
 	// -----------------------------------------------------
-	void ParsePolyLineVertex(DXF::LineReader& reader, 
+	void ParsePolyLineVertex(DXF::LineReader& reader,
 		DXF::PolyLine& line);
 		DXF::PolyLine& line);
 
 
 	// -----------------------------------------------------
 	// -----------------------------------------------------
-	void Parse3DFace(DXF::LineReader& reader, 
+	void Parse3DFace(DXF::LineReader& reader,
 		DXF::FileData& output);
 		DXF::FileData& output);
 
 
 	// -----------------------------------------------------
 	// -----------------------------------------------------
-	void ConvertMeshes(aiScene* pScene, 
+	void ConvertMeshes(aiScene* pScene,
 		DXF::FileData& output);
 		DXF::FileData& output);
 
 
 	// -----------------------------------------------------
 	// -----------------------------------------------------
-	void GenerateHierarchy(aiScene* pScene, 
+	void GenerateHierarchy(aiScene* pScene,
 		DXF::FileData& output);
 		DXF::FileData& output);
 
 
 	// -----------------------------------------------------
 	// -----------------------------------------------------
-	void GenerateMaterials(aiScene* pScene, 
+	void GenerateMaterials(aiScene* pScene,
 		DXF::FileData& output);
 		DXF::FileData& output);
 
 
 	// -----------------------------------------------------
 	// -----------------------------------------------------

+ 44 - 44
code/DeboneProcess.cpp

@@ -5,8 +5,8 @@ Open Asset Import Library (assimp)
 Copyright (c) 2006-2015, assimp team
 Copyright (c) 2006-2015, assimp team
 All rights reserved.
 All rights reserved.
 
 
-Redistribution and use of this software in source and binary forms, 
-with or without modification, are permitted provided that the 
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the
 following conditions are met:
 following conditions are met:
 
 
 * Redistributions of source code must retain the above
 * Redistributions of source code must retain the above
@@ -23,16 +23,16 @@ following conditions are met:
   derived from this software without specific prior
   derived from this software without specific prior
   written permission of the assimp team.
   written permission of the assimp team.
 
 
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+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
 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 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 
+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.
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
@@ -79,7 +79,7 @@ bool DeboneProcess::IsActive( unsigned int pFlags) const
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
 // Executes the post processing step on the given imported data.
 // Executes the post processing step on the given imported data.
 void DeboneProcess::SetupProperties(const Importer* pImp)
 void DeboneProcess::SetupProperties(const Importer* pImp)
-{	
+{
 	// get the current value of the property
 	// get the current value of the property
 	mAllOrNone = pImp->GetPropertyInteger(AI_CONFIG_PP_DB_ALL_OR_NONE,0)?true:false;
 	mAllOrNone = pImp->GetPropertyInteger(AI_CONFIG_PP_DB_ALL_OR_NONE,0)?true:false;
 	mThreshold = pImp->GetPropertyFloat(AI_CONFIG_PP_DB_THRESHOLD,AI_DEBONE_THRESHOLD);
 	mThreshold = pImp->GetPropertyFloat(AI_CONFIG_PP_DB_THRESHOLD,AI_DEBONE_THRESHOLD);
@@ -95,12 +95,12 @@ void DeboneProcess::Execute( aiScene* pScene)
 		return;
 		return;
 	}
 	}
 
 
-	std::vector<bool> splitList(pScene->mNumMeshes); 
+	std::vector<bool> splitList(pScene->mNumMeshes);
 	for( unsigned int a = 0; a < pScene->mNumMeshes; a++) {
 	for( unsigned int a = 0; a < pScene->mNumMeshes; a++) {
 		splitList[a] = ConsiderMesh( pScene->mMeshes[a] );
 		splitList[a] = ConsiderMesh( pScene->mMeshes[a] );
 	}
 	}
 
 
-	int numSplits = 0; 
+	int numSplits = 0;
 
 
 	if(!!mNumBonesCanDoWithout && (!mAllOrNone||mNumBonesCanDoWithout==mNumBones))	{
 	if(!!mNumBonesCanDoWithout && (!mAllOrNone||mNumBonesCanDoWithout==mNumBones))	{
 		for(unsigned int a = 0; a < pScene->mNumMeshes; a++)	{
 		for(unsigned int a = 0; a < pScene->mNumMeshes; a++)	{
@@ -124,16 +124,16 @@ void DeboneProcess::Execute( aiScene* pScene)
 
 
 			std::vector<std::pair<aiMesh*,const aiBone*> > newMeshes;
 			std::vector<std::pair<aiMesh*,const aiBone*> > newMeshes;
 
 
-			if(splitList[a]) { 
+			if(splitList[a]) {
 				SplitMesh(srcMesh,newMeshes);
 				SplitMesh(srcMesh,newMeshes);
 			}
 			}
 
 
 			// mesh was split
 			// mesh was split
-			if(!newMeshes.empty())	{				
-				unsigned int out = 0, in = srcMesh->mNumBones;				
+			if(!newMeshes.empty())	{
+				unsigned int out = 0, in = srcMesh->mNumBones;
 
 
 				// store new meshes and indices of the new meshes
 				// store new meshes and indices of the new meshes
-				for(unsigned int b=0;b<newMeshes.size();b++)	{						
+				for(unsigned int b=0;b<newMeshes.size();b++)	{
 					const aiString *find = newMeshes[b].second?&newMeshes[b].second->mName:0;
 					const aiString *find = newMeshes[b].second?&newMeshes[b].second->mName:0;
 
 
 					aiNode *theNode = find?pScene->mRootNode->FindNode(*find):0;
 					aiNode *theNode = find?pScene->mRootNode->FindNode(*find):0;
@@ -144,7 +144,7 @@ void DeboneProcess::Execute( aiScene* pScene)
 
 
 					out+=newMeshes[b].first->mNumBones;
 					out+=newMeshes[b].first->mNumBones;
 				}
 				}
-						   
+
 				if(!DefaultLogger::isNullLogger()) {
 				if(!DefaultLogger::isNullLogger()) {
 					char buffer[1024];
 					char buffer[1024];
 					::sprintf(buffer,"Removed %u bones. Input bones: %u. Output bones: %u",in-out,in,out);
 					::sprintf(buffer,"Removed %u bones. Input bones: %u. Output bones: %u",in-out,in,out);
@@ -159,8 +159,8 @@ void DeboneProcess::Execute( aiScene* pScene)
 				mSubMeshIndices[a].push_back(std::pair<unsigned int,aiNode*>(meshes.size(),(aiNode*)0));
 				mSubMeshIndices[a].push_back(std::pair<unsigned int,aiNode*>(meshes.size(),(aiNode*)0));
 				meshes.push_back(srcMesh);
 				meshes.push_back(srcMesh);
 			}
 			}
-		}	
-			
+		}
+
 		// rebuild the scene's mesh array
 		// rebuild the scene's mesh array
 		pScene->mNumMeshes = meshes.size();
 		pScene->mNumMeshes = meshes.size();
 		delete [] pScene->mMeshes;
 		delete [] pScene->mMeshes;
@@ -207,14 +207,14 @@ bool DeboneProcess::ConsiderMesh(const aiMesh* pMesh)
 				if(vertexBones[vid]!=cUnowned)	{
 				if(vertexBones[vid]!=cUnowned)	{
 					if(vertexBones[vid]==i) //double entry
 					if(vertexBones[vid]==i) //double entry
 					{
 					{
-						DefaultLogger::get()->warn("Encountered double entry in bone weights");					
+						DefaultLogger::get()->warn("Encountered double entry in bone weights");
 					}
 					}
 					else //TODO: track attraction in order to break tie
 					else //TODO: track attraction in order to break tie
 					{
 					{
 						vertexBones[vid] = cCoowned;
 						vertexBones[vid] = cCoowned;
 					}
 					}
 				}
 				}
-				else vertexBones[vid] = i;			
+				else vertexBones[vid] = i;
 			}
 			}
 
 
 			if(!isBoneNecessary[i]) {
 			if(!isBoneNecessary[i]) {
@@ -235,8 +235,8 @@ bool DeboneProcess::ConsiderMesh(const aiMesh* pMesh)
 				unsigned int w = vertexBones[pMesh->mFaces[i].mIndices[j]];
 				unsigned int w = vertexBones[pMesh->mFaces[i].mIndices[j]];
 
 
 				if(v!=w)	{
 				if(v!=w)	{
-					if(v<pMesh->mNumBones) isBoneNecessary[v] = true; 
-					if(w<pMesh->mNumBones) isBoneNecessary[w] = true; 
+					if(v<pMesh->mNumBones) isBoneNecessary[v] = true;
+					if(w<pMesh->mNumBones) isBoneNecessary[w] = true;
 				}
 				}
 			}
 			}
 		}
 		}
@@ -244,10 +244,10 @@ bool DeboneProcess::ConsiderMesh(const aiMesh* pMesh)
 
 
 	for(unsigned int i=0;i<pMesh->mNumBones;i++)	{
 	for(unsigned int i=0;i<pMesh->mNumBones;i++)	{
 		if(!isBoneNecessary[i])	{
 		if(!isBoneNecessary[i])	{
-			mNumBonesCanDoWithout++; 
+			mNumBonesCanDoWithout++;
 			split = true;
 			split = true;
 		}
 		}
-		
+
 		mNumBones++;
 		mNumBones++;
 	}
 	}
 	return split;
 	return split;
@@ -279,14 +279,14 @@ void DeboneProcess::SplitMesh( const aiMesh* pMesh, std::vector< std::pair< aiMe
 				if(vertexBones[vid]!=cUnowned)  {
 				if(vertexBones[vid]!=cUnowned)  {
 					if(vertexBones[vid]==i) //double entry
 					if(vertexBones[vid]==i) //double entry
 					{
 					{
-						//DefaultLogger::get()->warn("Encountered double entry in bone weights");					
+						//DefaultLogger::get()->warn("Encountered double entry in bone weights");
 					}
 					}
 					else //TODO: track attraction in order to break tie
 					else //TODO: track attraction in order to break tie
 					{
 					{
 						vertexBones[vid] = cCoowned;
 						vertexBones[vid] = cCoowned;
 					}
 					}
 				}
 				}
-				else vertexBones[vid] = i;			
+				else vertexBones[vid] = i;
 			}
 			}
 
 
 			if(!isBoneNecessary[i]) {
 			if(!isBoneNecessary[i]) {
@@ -309,32 +309,32 @@ void DeboneProcess::SplitMesh( const aiMesh* pMesh, std::vector< std::pair< aiMe
 			unsigned int w = vertexBones[pMesh->mFaces[i].mIndices[j]];
 			unsigned int w = vertexBones[pMesh->mFaces[i].mIndices[j]];
 
 
 			if(v!=w)	{
 			if(v!=w)	{
-				if(v<pMesh->mNumBones) isBoneNecessary[v] = true; 
-				if(w<pMesh->mNumBones) isBoneNecessary[w] = true; 
+				if(v<pMesh->mNumBones) isBoneNecessary[v] = true;
+				if(w<pMesh->mNumBones) isBoneNecessary[w] = true;
 			}
 			}
 			else nInterstitial++;
 			else nInterstitial++;
 		}
 		}
 
 
-		if(v<pMesh->mNumBones &&nInterstitial==pMesh->mFaces[i].mNumIndices)	{				
+		if(v<pMesh->mNumBones &&nInterstitial==pMesh->mFaces[i].mNumIndices)	{
 			faceBones[i] = v; //primitive belongs to bone #v
 			faceBones[i] = v; //primitive belongs to bone #v
 			facesPerBone[v]++;
 			facesPerBone[v]++;
 		}
 		}
-		else nFacesUnowned++; 
+		else nFacesUnowned++;
 	}
 	}
 
 
 	// invalidate any "cojoined" faces
 	// invalidate any "cojoined" faces
 	for(unsigned int i=0;i<pMesh->mNumFaces;i++) {
 	for(unsigned int i=0;i<pMesh->mNumFaces;i++) {
-		if(faceBones[i]<pMesh->mNumBones&&isBoneNecessary[faceBones[i]]) 
+		if(faceBones[i]<pMesh->mNumBones&&isBoneNecessary[faceBones[i]])
 		{
 		{
 			ai_assert(facesPerBone[faceBones[i]]>0);
 			ai_assert(facesPerBone[faceBones[i]]>0);
-			facesPerBone[faceBones[i]]--; 
-			
-			nFacesUnowned++; 
-			faceBones[i] = cUnowned; 
+			facesPerBone[faceBones[i]]--;
+
+			nFacesUnowned++;
+			faceBones[i] = cUnowned;
 		}
 		}
 	}
 	}
 
 
-	if(nFacesUnowned) {	 	
+	if(nFacesUnowned) {
 		std::vector<unsigned int> subFaces;
 		std::vector<unsigned int> subFaces;
 
 
 		for(unsigned int i=0;i<pMesh->mNumFaces;i++)	{
 		for(unsigned int i=0;i<pMesh->mNumFaces;i++)	{
@@ -349,9 +349,9 @@ void DeboneProcess::SplitMesh( const aiMesh* pMesh, std::vector< std::pair< aiMe
 		poNewMeshes.push_back(push_pair);
 		poNewMeshes.push_back(push_pair);
 	}
 	}
 
 
-	for(unsigned int i=0;i<pMesh->mNumBones;i++) {			
+	for(unsigned int i=0;i<pMesh->mNumBones;i++) {
 
 
-		if(!isBoneNecessary[i]&&facesPerBone[i]>0)	{				
+		if(!isBoneNecessary[i]&&facesPerBone[i]>0)	{
 			std::vector<unsigned int> subFaces;
 			std::vector<unsigned int> subFaces;
 
 
 			for(unsigned int j=0;j<pMesh->mNumFaces;j++)	{
 			for(unsigned int j=0;j<pMesh->mNumFaces;j++)	{
@@ -367,7 +367,7 @@ void DeboneProcess::SplitMesh( const aiMesh* pMesh, std::vector< std::pair< aiMe
 			ApplyTransform(subMesh,pMesh->mBones[i]->mOffsetMatrix);
 			ApplyTransform(subMesh,pMesh->mBones[i]->mOffsetMatrix);
 			std::pair<aiMesh*,const aiBone*> push_pair(subMesh,pMesh->mBones[i]);
 			std::pair<aiMesh*,const aiBone*> push_pair(subMesh,pMesh->mBones[i]);
 
 
-			poNewMeshes.push_back(push_pair);		
+			poNewMeshes.push_back(push_pair);
 		}
 		}
 	}
 	}
 }
 }
@@ -377,13 +377,13 @@ void DeboneProcess::SplitMesh( const aiMesh* pMesh, std::vector< std::pair< aiMe
 void DeboneProcess::UpdateNode(aiNode* pNode) const
 void DeboneProcess::UpdateNode(aiNode* pNode) const
 {
 {
 	// rebuild the node's mesh index list
 	// rebuild the node's mesh index list
-	
+
 	std::vector<unsigned int> newMeshList;
 	std::vector<unsigned int> newMeshList;
 
 
 	// this will require two passes
 	// this will require two passes
 
 
 	unsigned int m = pNode->mNumMeshes, n = mSubMeshIndices.size();
 	unsigned int m = pNode->mNumMeshes, n = mSubMeshIndices.size();
-	
+
 	// first pass, look for meshes which have not moved
 	// first pass, look for meshes which have not moved
 
 
 	for(unsigned int a=0;a<m;a++)	{
 	for(unsigned int a=0;a<m;a++)	{
@@ -399,7 +399,7 @@ void DeboneProcess::UpdateNode(aiNode* pNode) const
 		}
 		}
 	}
 	}
 
 
-	// second pass, collect deboned meshes 
+	// second pass, collect deboned meshes
 
 
 	for(unsigned int a=0;a<n;a++)
 	for(unsigned int a=0;a<n;a++)
 	{
 	{
@@ -436,7 +436,7 @@ void DeboneProcess::ApplyTransform(aiMesh* mesh, const aiMatrix4x4& mat)const
 {
 {
 	// Check whether we need to transform the coordinates at all
 	// Check whether we need to transform the coordinates at all
 	if (!mat.IsIdentity()) {
 	if (!mat.IsIdentity()) {
-		
+
 		if (mesh->HasPositions()) {
 		if (mesh->HasPositions()) {
 			for (unsigned int i = 0; i < mesh->mNumVertices; ++i) {
 			for (unsigned int i = 0; i < mesh->mNumVertices; ++i) {
 				mesh->mVertices[i] = mat * mesh->mVertices[i];
 				mesh->mVertices[i] = mat * mesh->mVertices[i];

+ 15 - 15
code/DeboneProcess.h

@@ -5,8 +5,8 @@ Open Asset Import Library (assimp)
 Copyright (c) 2006-2015, assimp team
 Copyright (c) 2006-2015, assimp team
 All rights reserved.
 All rights reserved.
 
 
-Redistribution and use of this software in source and binary forms, 
-with or without modification, are permitted provided that the 
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the
 following conditions are met:
 following conditions are met:
 
 
 * Redistributions of source code must retain the above
 * Redistributions of source code must retain the above
@@ -23,16 +23,16 @@ following conditions are met:
   derived from this software without specific prior
   derived from this software without specific prior
   written permission of the assimp team.
   written permission of the assimp team.
 
 
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+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
 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 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 
+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.
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
@@ -59,9 +59,9 @@ namespace Assimp
 #endif // !! AI_DEBONE_THRESHOLD
 #endif // !! AI_DEBONE_THRESHOLD
 
 
 // ---------------------------------------------------------------------------
 // ---------------------------------------------------------------------------
-/** This post processing step removes bones nearly losslessly or according to 
+/** This post processing step removes bones nearly losslessly or according to
 * a configured threshold. In order to remove the bone, the primitives affected by
 * a configured threshold. In order to remove the bone, the primitives affected by
-* the bone are split from the mesh. The split off (new) mesh is boneless. At any 
+* the bone are split from the mesh. The split off (new) mesh is boneless. At any
 * point in time, bones without affect upon a given mesh are to be removed.
 * point in time, bones without affect upon a given mesh are to be removed.
 */
 */
 class DeboneProcess : public BaseProcess
 class DeboneProcess : public BaseProcess
@@ -74,9 +74,9 @@ public:
 public:
 public:
 	// -------------------------------------------------------------------
 	// -------------------------------------------------------------------
 	/** Returns whether the processing step is present in the given flag.
 	/** Returns whether the processing step is present in the given flag.
-	* @param pFlags The processing flags the importer was called with. 
+	* @param pFlags The processing flags the importer was called with.
 	*   A bitwise combination of #aiPostProcessSteps.
 	*   A bitwise combination of #aiPostProcessSteps.
-	* @return true if the process is present in this flag fields, 
+	* @return true if the process is present in this flag fields,
 	*   false if not.
 	*   false if not.
 	*/
 	*/
 	bool IsActive( unsigned int pFlags) const;
 	bool IsActive( unsigned int pFlags) const;
@@ -89,7 +89,7 @@ public:
 	void SetupProperties(const Importer* pImp);
 	void SetupProperties(const Importer* pImp);
 
 
 protected:
 protected:
-		
+
 	// -------------------------------------------------------------------
 	// -------------------------------------------------------------------
 	/** Executes the post processing step on the given imported data.
 	/** Executes the post processing step on the given imported data.
 	* At the moment a process is not supposed to fail.
 	* At the moment a process is not supposed to fail.
@@ -112,7 +112,7 @@ protected:
 	void UpdateNode(aiNode* pNode) const;
 	void UpdateNode(aiNode* pNode) const;
 
 
 	// -------------------------------------------------------------------
 	// -------------------------------------------------------------------
-	// Apply transformation to a mesh 
+	// Apply transformation to a mesh
 	void ApplyTransform(aiMesh* mesh, const aiMatrix4x4& mat)const;
 	void ApplyTransform(aiMesh* mesh, const aiMatrix4x4& mat)const;
 
 
 public:
 public:

+ 25 - 25
code/DefaultIOStream.cpp

@@ -7,8 +7,8 @@ Copyright (c) 2006-2015, assimp team
 
 
 All rights reserved.
 All rights reserved.
 
 
-Redistribution and use of this software in source and binary forms, 
-with or without modification, are permitted provided that the following 
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the following
 conditions are met:
 conditions are met:
 
 
 * Redistributions of source code must retain the above
 * Redistributions of source code must retain the above
@@ -25,21 +25,21 @@ conditions are met:
   derived from this software without specific prior
   derived from this software without specific prior
   written permission of the assimp team.
   written permission of the assimp team.
 
 
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+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
 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 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 
+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.
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 ---------------------------------------------------------------------------
 ---------------------------------------------------------------------------
 */
 */
 /** @file  DefaultIOStream.cpp
 /** @file  DefaultIOStream.cpp
- *  @brief Default File I/O implementation for #Importer 
+ *  @brief Default File I/O implementation for #Importer
  */
  */
 
 
 
 
@@ -60,8 +60,8 @@ DefaultIOStream::~DefaultIOStream()
 }
 }
 
 
 // ----------------------------------------------------------------------------------
 // ----------------------------------------------------------------------------------
-size_t DefaultIOStream::Read(void* pvBuffer, 
-	size_t pSize, 
+size_t DefaultIOStream::Read(void* pvBuffer,
+	size_t pSize,
 	size_t pCount)
 	size_t pCount)
 {
 {
 	ai_assert(NULL != pvBuffer && 0 != pSize && 0 != pCount);
 	ai_assert(NULL != pvBuffer && 0 != pSize && 0 != pCount);
@@ -69,7 +69,7 @@ size_t DefaultIOStream::Read(void* pvBuffer,
 }
 }
 
 
 // ----------------------------------------------------------------------------------
 // ----------------------------------------------------------------------------------
-size_t DefaultIOStream::Write(const void* pvBuffer, 
+size_t DefaultIOStream::Write(const void* pvBuffer,
 	size_t pSize,
 	size_t pSize,
 	size_t pCount)
 	size_t pCount)
 {
 {
@@ -86,7 +86,7 @@ aiReturn DefaultIOStream::Seek(size_t pOffset,
 	}
 	}
 
 
 	// Just to check whether our enum maps one to one with the CRT constants
 	// Just to check whether our enum maps one to one with the CRT constants
-	BOOST_STATIC_ASSERT(aiOrigin_CUR == SEEK_CUR && 
+	BOOST_STATIC_ASSERT(aiOrigin_CUR == SEEK_CUR &&
 		aiOrigin_END == SEEK_END && aiOrigin_SET == SEEK_SET);
 		aiOrigin_END == SEEK_END && aiOrigin_SET == SEEK_SET);
 
 
 	// do the seek
 	// do the seek
@@ -108,7 +108,7 @@ size_t DefaultIOStream::FileSize() const
 	if (! mFile || mFilename.empty()) {
 	if (! mFile || mFilename.empty()) {
 		return 0;
 		return 0;
 	}
 	}
-	
+
 	if (SIZE_MAX == cachedSize) {
 	if (SIZE_MAX == cachedSize) {
 
 
         // Although fseek/ftell would allow us to reuse the exising file handle here,
         // Although fseek/ftell would allow us to reuse the exising file handle here,
@@ -120,17 +120,17 @@ size_t DefaultIOStream::FileSize() const
         // See here for details:
         // See here for details:
         // https://www.securecoding.cert.org/confluence/display/seccode/FIO19-C.+Do+not+use+fseek()+and+ftell()+to+compute+the+size+of+a+regular+file
         // https://www.securecoding.cert.org/confluence/display/seccode/FIO19-C.+Do+not+use+fseek()+and+ftell()+to+compute+the+size+of+a+regular+file
 #if defined _WIN32 && !defined __GNUC__
 #if defined _WIN32 && !defined __GNUC__
-		struct __stat64 fileStat; 
-		int err = _stat64(  mFilename.c_str(), &fileStat ); 
-		if (0 != err) 
-			return 0; 
-		cachedSize = (size_t) (fileStat.st_size); 
+		struct __stat64 fileStat;
+		int err = _stat64(  mFilename.c_str(), &fileStat );
+		if (0 != err)
+			return 0;
+		cachedSize = (size_t) (fileStat.st_size);
 #else
 #else
-		struct stat fileStat; 
-		int err = stat(mFilename.c_str(), &fileStat ); 
-		if (0 != err) 
-			return 0; 
-		cachedSize = (size_t) (fileStat.st_size); 
+		struct stat fileStat;
+		int err = stat(mFilename.c_str(), &fileStat );
+		if (0 != err)
+			return 0;
+		cachedSize = (size_t) (fileStat.st_size);
 #endif
 #endif
 	}
 	}
 	return cachedSize;
 	return cachedSize;

+ 18 - 18
code/DefaultIOStream.h

@@ -5,8 +5,8 @@ Open Asset Import Library (assimp)
 Copyright (c) 2006-2015, assimp team
 Copyright (c) 2006-2015, assimp team
 All rights reserved.
 All rights reserved.
 
 
-Redistribution and use of this software in source and binary forms, 
-with or without modification, are permitted provided that the 
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the
 following conditions are met:
 following conditions are met:
 
 
 * Redistributions of source code must retain the above
 * Redistributions of source code must retain the above
@@ -23,16 +23,16 @@ following conditions are met:
   derived from this software without specific prior
   derived from this software without specific prior
   written permission of the assimp team.
   written permission of the assimp team.
 
 
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+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
 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 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 
+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.
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
@@ -58,13 +58,13 @@ namespace Assimp	{
 class DefaultIOStream : public IOStream
 class DefaultIOStream : public IOStream
 {
 {
 	friend class DefaultIOSystem;
 	friend class DefaultIOSystem;
-#if __ANDROID__ 
+#if __ANDROID__
 #if __ANDROID_API__ > 9
 #if __ANDROID_API__ > 9
 #if defined(AI_CONFIG_ANDROID_JNI_ASSIMP_MANAGER_SUPPORT)
 #if defined(AI_CONFIG_ANDROID_JNI_ASSIMP_MANAGER_SUPPORT)
     friend class AndroidJNIIOSystem;
     friend class AndroidJNIIOSystem;
 #endif // defined(AI_CONFIG_ANDROID_JNI_ASSIMP_MANAGER_SUPPORT)
 #endif // defined(AI_CONFIG_ANDROID_JNI_ASSIMP_MANAGER_SUPPORT)
 #endif // __ANDROID_API__ > 9
 #endif // __ANDROID_API__ > 9
-#endif // __ANDROID__ 
+#endif // __ANDROID__
 
 
 protected:
 protected:
 	DefaultIOStream();
 	DefaultIOStream();
@@ -76,14 +76,14 @@ public:
 
 
 	// -------------------------------------------------------------------
 	// -------------------------------------------------------------------
 	/// Read from stream
 	/// Read from stream
-    size_t Read(void* pvBuffer, 
-		size_t pSize, 
+    size_t Read(void* pvBuffer,
+		size_t pSize,
 		size_t pCount);
 		size_t pCount);
 
 
 
 
 	// -------------------------------------------------------------------
 	// -------------------------------------------------------------------
 	/// Write to stream
 	/// Write to stream
-    size_t Write(const void* pvBuffer, 
+    size_t Write(const void* pvBuffer,
 		size_t pSize,
 		size_t pSize,
 		size_t pCount);
 		size_t pCount);
 
 
@@ -116,8 +116,8 @@ private:
 
 
 
 
 // ----------------------------------------------------------------------------------
 // ----------------------------------------------------------------------------------
-inline DefaultIOStream::DefaultIOStream () : 
-	mFile		(NULL), 
+inline DefaultIOStream::DefaultIOStream () :
+	mFile		(NULL),
 	mFilename	(""),
 	mFilename	(""),
 	cachedSize	(SIZE_MAX)
 	cachedSize	(SIZE_MAX)
 {
 {
@@ -126,9 +126,9 @@ inline DefaultIOStream::DefaultIOStream () :
 
 
 
 
 // ----------------------------------------------------------------------------------
 // ----------------------------------------------------------------------------------
-inline DefaultIOStream::DefaultIOStream (FILE* pFile, 
+inline DefaultIOStream::DefaultIOStream (FILE* pFile,
 		const std::string &strFilename) :
 		const std::string &strFilename) :
-	mFile(pFile), 
+	mFile(pFile),
 	mFilename(strFilename),
 	mFilename(strFilename),
 	cachedSize	(SIZE_MAX)
 	cachedSize	(SIZE_MAX)
 {
 {

+ 16 - 16
code/DefaultIOSystem.cpp

@@ -7,8 +7,8 @@ Copyright (c) 2006-2015, assimp team
 
 
 All rights reserved.
 All rights reserved.
 
 
-Redistribution and use of this software in source and binary forms, 
-with or without modification, are permitted provided that the following 
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the following
 conditions are met:
 conditions are met:
 
 
 * Redistributions of source code must retain the above
 * Redistributions of source code must retain the above
@@ -25,16 +25,16 @@ conditions are met:
   derived from this software without specific prior
   derived from this software without specific prior
   written permission of the assimp team.
   written permission of the assimp team.
 
 
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+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
 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 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 
+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.
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 ---------------------------------------------------------------------------
 ---------------------------------------------------------------------------
 */
 */
@@ -57,14 +57,14 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 using namespace Assimp;
 using namespace Assimp;
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-// Constructor. 
+// Constructor.
 DefaultIOSystem::DefaultIOSystem()
 DefaultIOSystem::DefaultIOSystem()
 {
 {
 	// nothing to do here
 	// nothing to do here
 }
 }
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-// Destructor. 
+// Destructor.
 DefaultIOSystem::~DefaultIOSystem()
 DefaultIOSystem::~DefaultIOSystem()
 {
 {
 	// nothing to do here
 	// nothing to do here
@@ -90,7 +90,7 @@ IOStream* DefaultIOSystem::Open( const char* strFile, const char* strMode)
 	ai_assert(NULL != strMode);
 	ai_assert(NULL != strMode);
 
 
 	FILE* file = ::fopen( strFile, strMode);
 	FILE* file = ::fopen( strFile, strMode);
-	if( NULL == file) 
+	if( NULL == file)
 		return NULL;
 		return NULL;
 
 
 	return new DefaultIOStream(file, (std::string) strFile);
 	return new DefaultIOStream(file, (std::string) strFile);
@@ -122,7 +122,7 @@ bool IOSystem::ComparePaths (const char* one, const char* second) const
 }
 }
 
 
 // maximum path length
 // maximum path length
-// XXX http://insanecoding.blogspot.com/2007/11/pathmax-simply-isnt.html 
+// XXX http://insanecoding.blogspot.com/2007/11/pathmax-simply-isnt.html
 #ifdef PATH_MAX
 #ifdef PATH_MAX
 #	define PATHLIMIT PATH_MAX
 #	define PATHLIMIT PATH_MAX
 #else
 #else
@@ -140,13 +140,13 @@ inline void MakeAbsolutePath (const char* in, char* _out)
 #else
 #else
     	// use realpath
     	// use realpath
     	ret = realpath(in, _out);
     	ret = realpath(in, _out);
-#endif  
+#endif
 	if(!ret) {
 	if(!ret) {
 		// preserve the input path, maybe someone else is able to fix
 		// preserve the input path, maybe someone else is able to fix
 		// the path before it is accessed (e.g. our file system filter)
 		// the path before it is accessed (e.g. our file system filter)
 		DefaultLogger::get()->warn("Invalid path: "+std::string(in));
 		DefaultLogger::get()->warn("Invalid path: "+std::string(in));
 		strcpy(_out,in);
 		strcpy(_out,in);
-	}  
+	}
 }
 }
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
@@ -160,7 +160,7 @@ bool DefaultIOSystem::ComparePaths (const char* one, const char* second) const
 
 
 	char temp1[PATHLIMIT];
 	char temp1[PATHLIMIT];
 	char temp2[PATHLIMIT];
 	char temp2[PATHLIMIT];
-	
+
 	MakeAbsolutePath (one, temp1);
 	MakeAbsolutePath (one, temp1);
 	MakeAbsolutePath (second, temp2);
 	MakeAbsolutePath (second, temp2);
 
 

+ 10 - 10
code/DefaultIOSystem.h

@@ -5,8 +5,8 @@ Open Asset Import Library (assimp)
 Copyright (c) 2006-2015, assimp team
 Copyright (c) 2006-2015, assimp team
 All rights reserved.
 All rights reserved.
 
 
-Redistribution and use of this software in source and binary forms, 
-with or without modification, are permitted provided that the 
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the
 following conditions are met:
 following conditions are met:
 
 
 * Redistributions of source code must retain the above
 * Redistributions of source code must retain the above
@@ -23,16 +23,16 @@ following conditions are met:
   derived from this software without specific prior
   derived from this software without specific prior
   written permission of the assimp team.
   written permission of the assimp team.
 
 
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+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
 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 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 
+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.
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
@@ -76,7 +76,7 @@ public:
 	// -------------------------------------------------------------------
 	// -------------------------------------------------------------------
 	/** Compare two paths */
 	/** Compare two paths */
 	bool ComparePaths (const char* one, const char* second) const;
 	bool ComparePaths (const char* one, const char* second) const;
-	
+
 	/** @brief get the file name of a full filepath
 	/** @brief get the file name of a full filepath
 	 * example: /tmp/archive.tar.gz -> archive.tar.gz
 	 * example: /tmp/archive.tar.gz -> archive.tar.gz
 	 */
 	 */

+ 20 - 20
code/DefaultLogger.cpp

@@ -7,8 +7,8 @@ Copyright (c) 2006-2015, assimp team
 
 
 All rights reserved.
 All rights reserved.
 
 
-Redistribution and use of this software in source and binary forms, 
-with or without modification, are permitted provided that the following 
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the following
 conditions are met:
 conditions are met:
 
 
 * Redistributions of source code must retain the above
 * Redistributions of source code must retain the above
@@ -25,16 +25,16 @@ conditions are met:
   derived from this software without specific prior
   derived from this software without specific prior
   written permission of the assimp team.
   written permission of the assimp team.
 
 
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+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
 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 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 
+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.
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 ---------------------------------------------------------------------------
 ---------------------------------------------------------------------------
 */
 */
@@ -84,7 +84,7 @@ struct LogStreamInfo
 	{
 	{
 		// empty
 		// empty
 	}
 	}
-	
+
 	// Destructor
 	// Destructor
 	~LogStreamInfo()
 	~LogStreamInfo()
 	{
 	{
@@ -98,7 +98,7 @@ LogStream* LogStream::createDefaultStream(aiDefaultLogStream	streams,
 	const char* name /*= "AssimpLog.txt"*/,
 	const char* name /*= "AssimpLog.txt"*/,
 	IOSystem* io		    /*= NULL*/)
 	IOSystem* io		    /*= NULL*/)
 {
 {
-	switch (streams)	
+	switch (streams)
 	{
 	{
 		// This is a platform-specific feature
 		// This is a platform-specific feature
 	case aiDefaultLogStream_DEBUGGER:
 	case aiDefaultLogStream_DEBUGGER:
@@ -154,7 +154,7 @@ Logger *DefaultLogger::create(const char* name /*= "AssimpLog.txt"*/,
 	// Stream the log to CERR?
 	// Stream the log to CERR?
 	if (defStreams & aiDefaultLogStream_STDERR)
 	if (defStreams & aiDefaultLogStream_STDERR)
 		 m_pLogger->attachStream( LogStream::createDefaultStream(aiDefaultLogStream_STDERR));
 		 m_pLogger->attachStream( LogStream::createDefaultStream(aiDefaultLogStream_STDERR));
-	
+
 	// Stream the log to a file
 	// Stream the log to a file
 	if (defStreams & aiDefaultLogStream_FILE && name && *name)
 	if (defStreams & aiDefaultLogStream_FILE && name && *name)
 		m_pLogger->attachStream( LogStream::createDefaultStream(aiDefaultLogStream_FILE,name,io));
 		m_pLogger->attachStream( LogStream::createDefaultStream(aiDefaultLogStream_FILE,name,io));
@@ -176,17 +176,17 @@ void Logger::debug(const char* message)	{
 
 
 // ----------------------------------------------------------------------------------
 // ----------------------------------------------------------------------------------
 void Logger::info(const char* message)	{
 void Logger::info(const char* message)	{
-	
+
 	// SECURITY FIX: see above
 	// SECURITY FIX: see above
 	if (strlen(message)>MAX_LOG_MESSAGE_LENGTH) {
 	if (strlen(message)>MAX_LOG_MESSAGE_LENGTH) {
 		return;
 		return;
 	}
 	}
 	return OnInfo(message);
 	return OnInfo(message);
 }
 }
-	
+
 // ----------------------------------------------------------------------------------
 // ----------------------------------------------------------------------------------
 void Logger::warn(const char* message)	{
 void Logger::warn(const char* message)	{
-	
+
 	// SECURITY FIX: see above
 	// SECURITY FIX: see above
 	if (strlen(message)>MAX_LOG_MESSAGE_LENGTH) {
 	if (strlen(message)>MAX_LOG_MESSAGE_LENGTH) {
 		return;
 		return;
@@ -196,7 +196,7 @@ void Logger::warn(const char* message)	{
 
 
 // ----------------------------------------------------------------------------------
 // ----------------------------------------------------------------------------------
 void Logger::error(const char* message)	{
 void Logger::error(const char* message)	{
-	
+
 	// SECURITY FIX: see above
 	// SECURITY FIX: see above
 	if (strlen(message)>MAX_LOG_MESSAGE_LENGTH) {
 	if (strlen(message)>MAX_LOG_MESSAGE_LENGTH) {
 		return;
 		return;
@@ -310,7 +310,7 @@ bool DefaultLogger::attachStream( LogStream *pStream, unsigned int severity )
 			return true;
 			return true;
 		}
 		}
 	}
 	}
-	
+
 	LogStreamInfo *pInfo = new LogStreamInfo( severity, pStream );
 	LogStreamInfo *pInfo = new LogStreamInfo( severity, pStream );
 	m_StreamArray.push_back( pInfo );
 	m_StreamArray.push_back( pInfo );
 	return true;
 	return true;
@@ -326,7 +326,7 @@ bool DefaultLogger::detatchStream( LogStream *pStream, unsigned int severity )
 	if (0 == severity)	{
 	if (0 == severity)	{
 		severity = SeverityAll;
 		severity = SeverityAll;
 	}
 	}
-	
+
 	for ( StreamIt it = m_StreamArray.begin();
 	for ( StreamIt it = m_StreamArray.begin();
 		it != m_StreamArray.end();
 		it != m_StreamArray.end();
 		++it )
 		++it )
@@ -350,7 +350,7 @@ bool DefaultLogger::detatchStream( LogStream *pStream, unsigned int severity )
 
 
 // ----------------------------------------------------------------------------------
 // ----------------------------------------------------------------------------------
 //	Constructor
 //	Constructor
-DefaultLogger::DefaultLogger(LogSeverity severity) 
+DefaultLogger::DefaultLogger(LogSeverity severity)
 
 
 	:	Logger	( severity )
 	:	Logger	( severity )
 	,	noRepeatMsg	(false)
 	,	noRepeatMsg	(false)
@@ -371,7 +371,7 @@ DefaultLogger::~DefaultLogger()
 
 
 // ----------------------------------------------------------------------------------
 // ----------------------------------------------------------------------------------
 //	Writes message to stream
 //	Writes message to stream
-void DefaultLogger::WriteToStreams(const char *message, 
+void DefaultLogger::WriteToStreams(const char *message,
 	ErrorSeverity ErrorSev )
 	ErrorSeverity ErrorSev )
 {
 {
 	ai_assert(NULL != message);
 	ai_assert(NULL != message);

+ 12 - 12
code/DefaultProgressHandler.h

@@ -5,8 +5,8 @@ Open Asset Import Library (assimp)
 Copyright (c) 2006-2015, assimp team
 Copyright (c) 2006-2015, assimp team
 All rights reserved.
 All rights reserved.
 
 
-Redistribution and use of this software in source and binary forms, 
-with or without modification, are permitted provided that the 
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the
 following conditions are met:
 following conditions are met:
 
 
 * Redistributions of source code must retain the above
 * Redistributions of source code must retain the above
@@ -23,16 +23,16 @@ following conditions are met:
   derived from this software without specific prior
   derived from this software without specific prior
   written permission of the assimp team.
   written permission of the assimp team.
 
 
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+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
 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 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 
+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.
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
@@ -49,16 +49,16 @@ namespace Assimp	{
 
 
 // ------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------
 /** @brief Internal default implementation of the #ProgressHandler interface. */
 /** @brief Internal default implementation of the #ProgressHandler interface. */
-class DefaultProgressHandler 
+class DefaultProgressHandler
 	: public ProgressHandler	{
 	: public ProgressHandler	{
 
 
-	
+
 	virtual bool Update(float /*percentage*/) {
 	virtual bool Update(float /*percentage*/) {
 		return false;
 		return false;
 	}
 	}
 
 
 
 
-}; // !class DefaultProgressHandler 
+}; // !class DefaultProgressHandler
 } // Namespace Assimp
 } // Namespace Assimp
 
 
 #endif
 #endif

+ 9 - 9
code/Defines.h

@@ -5,8 +5,8 @@ Open Asset Import Library (assimp)
 Copyright (c) 2006-2012, assimp team
 Copyright (c) 2006-2012, assimp team
 All rights reserved.
 All rights reserved.
 
 
-Redistribution and use of this software in source and binary forms, 
-with or without modification, are permitted provided that the 
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the
 following conditions are met:
 following conditions are met:
 
 
 * Redistributions of source code must retain the above
 * Redistributions of source code must retain the above
@@ -23,16 +23,16 @@ following conditions are met:
   derived from this software without specific prior
   derived from this software without specific prior
   written permission of the assimp team.
   written permission of the assimp team.
 
 
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+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
 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 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 
+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.
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------

+ 10 - 10
code/Exceptional.h

@@ -5,8 +5,8 @@ Open Asset Import Library (assimp)
 Copyright (c) 2006-2008, assimp team
 Copyright (c) 2006-2008, assimp team
 All rights reserved.
 All rights reserved.
 
 
-Redistribution and use of this software in source and binary forms, 
-with or without modification, are permitted provided that the 
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the
 following conditions are met:
 following conditions are met:
 
 
 * Redistributions of source code must retain the above
 * Redistributions of source code must retain the above
@@ -23,16 +23,16 @@ following conditions are met:
   derived from this software without specific prior
   derived from this software without specific prior
   written permission of the assimp team.
   written permission of the assimp team.
 
 
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+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
 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 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 
+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.
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
@@ -50,7 +50,7 @@ using std::runtime_error;
 #endif
 #endif
 
 
 // ---------------------------------------------------------------------------
 // ---------------------------------------------------------------------------
-/** FOR IMPORTER PLUGINS ONLY: Simple exception class to be thrown if an 
+/** FOR IMPORTER PLUGINS ONLY: Simple exception class to be thrown if an
  *  unrecoverable error occurs while importing. Loading APIs return
  *  unrecoverable error occurs while importing. Loading APIs return
  *  NULL instead of a valid aiScene then.  */
  *  NULL instead of a valid aiScene then.  */
 class DeadlyImportError
 class DeadlyImportError

+ 36 - 36
code/Exporter.cpp

@@ -7,8 +7,8 @@ Copyright (c) 2006-2015, assimp team
 
 
 All rights reserved.
 All rights reserved.
 
 
-Redistribution and use of this software in source and binary forms, 
-with or without modification, are permitted provided that the following 
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the following
 conditions are met:
 conditions are met:
 
 
 * Redistributions of source code must retain the above
 * Redistributions of source code must retain the above
@@ -25,16 +25,16 @@ conditions are met:
   derived from this software without specific prior
   derived from this software without specific prior
   written permission of the assimp team.
   written permission of the assimp team.
 
 
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+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
 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 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 
+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.
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 ---------------------------------------------------------------------------
 ---------------------------------------------------------------------------
 */
 */
@@ -92,7 +92,7 @@ void ExportSceneAssxml(const char*, IOSystem*, const aiScene*, const ExportPrope
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
 // global array of all export formats which Assimp supports in its current build
 // global array of all export formats which Assimp supports in its current build
-Exporter::ExportFormatEntry gExporters[] = 
+Exporter::ExportFormatEntry gExporters[] =
 {
 {
 #ifndef ASSIMP_BUILD_NO_COLLADA_EXPORTER
 #ifndef ASSIMP_BUILD_NO_COLLADA_EXPORTER
 	Exporter::ExportFormatEntry( "collada", "COLLADA - Digital Asset Exchange Schema", "dae", &ExportSceneCollada),
 	Exporter::ExportFormatEntry( "collada", "COLLADA - Digital Asset Exchange Schema", "dae", &ExportSceneCollada),
@@ -108,21 +108,21 @@ Exporter::ExportFormatEntry gExporters[] =
 #endif
 #endif
 
 
 #ifndef ASSIMP_BUILD_NO_OBJ_EXPORTER
 #ifndef ASSIMP_BUILD_NO_OBJ_EXPORTER
-	Exporter::ExportFormatEntry( "obj", "Wavefront OBJ format", "obj", &ExportSceneObj, 
+	Exporter::ExportFormatEntry( "obj", "Wavefront OBJ format", "obj", &ExportSceneObj,
 		aiProcess_GenSmoothNormals /*| aiProcess_PreTransformVertices */),
 		aiProcess_GenSmoothNormals /*| aiProcess_PreTransformVertices */),
 #endif
 #endif
 
 
 #ifndef ASSIMP_BUILD_NO_STL_EXPORTER
 #ifndef ASSIMP_BUILD_NO_STL_EXPORTER
-	Exporter::ExportFormatEntry( "stl", "Stereolithography", "stl" , &ExportSceneSTL, 
+	Exporter::ExportFormatEntry( "stl", "Stereolithography", "stl" , &ExportSceneSTL,
 		aiProcess_Triangulate | aiProcess_GenNormals | aiProcess_PreTransformVertices
 		aiProcess_Triangulate | aiProcess_GenNormals | aiProcess_PreTransformVertices
 	),
 	),
-	Exporter::ExportFormatEntry( "stlb", "Stereolithography (binary)", "stl" , &ExportSceneSTLBinary, 
+	Exporter::ExportFormatEntry( "stlb", "Stereolithography (binary)", "stl" , &ExportSceneSTLBinary,
 		aiProcess_Triangulate | aiProcess_GenNormals | aiProcess_PreTransformVertices
 		aiProcess_Triangulate | aiProcess_GenNormals | aiProcess_PreTransformVertices
 	),
 	),
 #endif
 #endif
 
 
 #ifndef ASSIMP_BUILD_NO_PLY_EXPORTER
 #ifndef ASSIMP_BUILD_NO_PLY_EXPORTER
-	Exporter::ExportFormatEntry( "ply", "Stanford Polygon Library", "ply" , &ExportScenePly, 
+	Exporter::ExportFormatEntry( "ply", "Stanford Polygon Library", "ply" , &ExportScenePly,
 		aiProcess_PreTransformVertices
 		aiProcess_PreTransformVertices
 	),
 	),
 	Exporter::ExportFormatEntry( "plyb", "Stanford Polygon Library (binary)", "ply", &ExportScenePlyBinary,
 	Exporter::ExportFormatEntry( "plyb", "Stanford Polygon Library (binary)", "ply", &ExportScenePlyBinary,
@@ -162,7 +162,7 @@ public:
 		std::copy(gExporters,gExporters+ASSIMP_NUM_EXPORTERS,mExporters.begin());
 		std::copy(gExporters,gExporters+ASSIMP_NUM_EXPORTERS,mExporters.begin());
 	}
 	}
 
 
-	~ExporterPimpl() 
+	~ExporterPimpl()
 	{
 	{
 		delete blob;
 		delete blob;
 
 
@@ -173,7 +173,7 @@ public:
 	}
 	}
 
 
 public:
 public:
-		
+
 	aiExportDataBlob* blob;
 	aiExportDataBlob* blob;
 	boost::shared_ptr< Assimp::IOSystem > mIOSystem;
 	boost::shared_ptr< Assimp::IOSystem > mIOSystem;
 	bool mIsDefaultIOHandler;
 	bool mIsDefaultIOHandler;
@@ -199,7 +199,7 @@ using namespace Assimp;
 
 
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-Exporter :: Exporter() 
+Exporter :: Exporter()
 : pimpl(new ExporterPimpl())
 : pimpl(new ExporterPimpl())
 {
 {
 }
 }
@@ -263,7 +263,7 @@ const aiExportDataBlob* Exporter :: ExportToBlob(  const aiScene* pScene, const
 
 
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-bool IsVerboseFormat(const aiMesh* mesh) 
+bool IsVerboseFormat(const aiMesh* mesh)
 {
 {
 	// avoid slow vector<bool> specialization
 	// avoid slow vector<bool> specialization
 	std::vector<unsigned int> seen(mesh->mNumVertices,0);
 	std::vector<unsigned int> seen(mesh->mNumVertices,0);
@@ -281,7 +281,7 @@ bool IsVerboseFormat(const aiMesh* mesh)
 
 
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-bool IsVerboseFormat(const aiScene* pScene) 
+bool IsVerboseFormat(const aiScene* pScene)
 {
 {
 	for(unsigned int i = 0; i < pScene->mNumMeshes; ++i) {
 	for(unsigned int i = 0; i < pScene->mNumMeshes; ++i) {
 		if(!IsVerboseFormat(pScene->mMeshes[i])) {
 		if(!IsVerboseFormat(pScene->mMeshes[i])) {
@@ -301,7 +301,7 @@ aiReturn Exporter :: Export( const aiScene* pScene, const char* pFormatId, const
 	// format. They will likely not be aware that there is a flag in the scene to indicate
 	// format. They will likely not be aware that there is a flag in the scene to indicate
 	// this, however. To avoid surprises and bug reports, we check for duplicates in
 	// this, however. To avoid surprises and bug reports, we check for duplicates in
 	// meshes upfront.
 	// meshes upfront.
-	const bool is_verbose_format = !(pScene->mFlags & AI_SCENE_FLAGS_NON_VERBOSE_FORMAT) || IsVerboseFormat(pScene);	
+	const bool is_verbose_format = !(pScene->mFlags & AI_SCENE_FLAGS_NON_VERBOSE_FORMAT) || IsVerboseFormat(pScene);
 
 
 	pimpl->mError = "";
 	pimpl->mError = "";
 	for (size_t i = 0; i < pimpl->mExporters.size(); ++i) {
 	for (size_t i = 0; i < pimpl->mExporters.size(); ++i) {
@@ -310,7 +310,7 @@ aiReturn Exporter :: Export( const aiScene* pScene, const char* pFormatId, const
 
 
 			try {
 			try {
 
 
-				// Always create a full copy of the scene. We might optimize this one day, 
+				// Always create a full copy of the scene. We might optimize this one day,
 				// but for now it is the most pragmatic way.
 				// but for now it is the most pragmatic way.
 				aiScene* scenecopy_tmp;
 				aiScene* scenecopy_tmp;
 				SceneCombiner::CopyScene(&scenecopy_tmp,pScene);
 				SceneCombiner::CopyScene(&scenecopy_tmp,pScene);
@@ -339,7 +339,7 @@ aiReturn Exporter :: Export( const aiScene* pScene, const char* pFormatId, const
 				// we need to run the MakeVerboseFormat step first.
 				// we need to run the MakeVerboseFormat step first.
 				bool must_join_again = false;
 				bool must_join_again = false;
 				if (!is_verbose_format) {
 				if (!is_verbose_format) {
-					
+
 					bool verbosify = false;
 					bool verbosify = false;
 					for( unsigned int a = 0; a < pimpl->mPostProcessingSteps.size(); a++) {
 					for( unsigned int a = 0; a < pimpl->mPostProcessingSteps.size(); a++) {
 						BaseProcess* const p = pimpl->mPostProcessingSteps[a];
 						BaseProcess* const p = pimpl->mPostProcessingSteps[a];
@@ -370,7 +370,7 @@ aiReturn Exporter :: Export( const aiScene* pScene, const char* pFormatId, const
 							step.Execute(scenecopy.get());
 							step.Execute(scenecopy.get());
 						}
 						}
 					}
 					}
-					
+
 					{
 					{
 						FlipUVsProcess step;
 						FlipUVsProcess step;
 						if (step.IsActive(pp)) {
 						if (step.IsActive(pp)) {
@@ -389,9 +389,9 @@ aiReturn Exporter :: Export( const aiScene* pScene, const char* pFormatId, const
 					for( unsigned int a = 0; a < pimpl->mPostProcessingSteps.size(); a++) {
 					for( unsigned int a = 0; a < pimpl->mPostProcessingSteps.size(); a++) {
 						BaseProcess* const p = pimpl->mPostProcessingSteps[a];
 						BaseProcess* const p = pimpl->mPostProcessingSteps[a];
 
 
-						if (p->IsActive(pp) 
-							&& !dynamic_cast<FlipUVsProcess*>(p) 
-							&& !dynamic_cast<FlipWindingOrderProcess*>(p) 
+						if (p->IsActive(pp)
+							&& !dynamic_cast<FlipUVsProcess*>(p)
+							&& !dynamic_cast<FlipWindingOrderProcess*>(p)
 							&& !dynamic_cast<MakeLeftHandedProcess*>(p)) {
 							&& !dynamic_cast<MakeLeftHandedProcess*>(p)) {
 
 
 							p->Execute(scenecopy.get());
 							p->Execute(scenecopy.get());
@@ -443,14 +443,14 @@ void Exporter :: FreeBlob( )
 
 
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-const aiExportDataBlob* Exporter :: GetBlob() const 
+const aiExportDataBlob* Exporter :: GetBlob() const
 {
 {
 	return pimpl->blob;
 	return pimpl->blob;
 }
 }
 
 
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-const aiExportDataBlob* Exporter :: GetOrphanedBlob() const 
+const aiExportDataBlob* Exporter :: GetOrphanedBlob() const
 {
 {
 	const aiExportDataBlob* tmp = pimpl->blob;
 	const aiExportDataBlob* tmp = pimpl->blob;
 	pimpl->blob = NULL;
 	pimpl->blob = NULL;
@@ -459,18 +459,18 @@ const aiExportDataBlob* Exporter :: GetOrphanedBlob() const
 
 
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-size_t Exporter :: GetExportFormatCount() const 
+size_t Exporter :: GetExportFormatCount() const
 {
 {
 	return pimpl->mExporters.size();
 	return pimpl->mExporters.size();
 }
 }
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-const aiExportFormatDesc* Exporter :: GetExportFormatDescription( size_t pIndex ) const 
+const aiExportFormatDesc* Exporter :: GetExportFormatDescription( size_t pIndex ) const
 {
 {
 	if (pIndex >= GetExportFormatCount()) {
 	if (pIndex >= GetExportFormatCount()) {
 		return NULL;
 		return NULL;
 	}
 	}
-	
+
 	// Return from static storage if the requested index is built-in.
 	// Return from static storage if the requested index is built-in.
 	if (pIndex < sizeof(gExporters) / sizeof(gExporters[0])) {
 	if (pIndex < sizeof(gExporters) / sizeof(gExporters[0])) {
 		return &gExporters[pIndex].mDescription;
 		return &gExporters[pIndex].mDescription;
@@ -512,7 +512,7 @@ ExportProperties::ExportProperties(const ExportProperties &other)
    mStringProperties(other.mStringProperties),
    mStringProperties(other.mStringProperties),
    mMatrixProperties(other.mMatrixProperties)
    mMatrixProperties(other.mMatrixProperties)
 {
 {
-	
+
 }
 }
 
 
 
 
@@ -546,7 +546,7 @@ bool ExportProperties :: SetPropertyMatrix(const char* szName, const aiMatrix4x4
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
 // Get a configuration property
 // Get a configuration property
-int ExportProperties :: GetPropertyInteger(const char* szName, 
+int ExportProperties :: GetPropertyInteger(const char* szName,
 	int iErrorReturn /*= 0xffffffff*/) const
 	int iErrorReturn /*= 0xffffffff*/) const
 {
 {
 	return GetGenericProperty<int>(mIntProperties,szName,iErrorReturn);
 	return GetGenericProperty<int>(mIntProperties,szName,iErrorReturn);
@@ -554,7 +554,7 @@ int ExportProperties :: GetPropertyInteger(const char* szName,
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
 // Get a configuration property
 // Get a configuration property
-float ExportProperties :: GetPropertyFloat(const char* szName, 
+float ExportProperties :: GetPropertyFloat(const char* szName,
 	float iErrorReturn /*= 10e10*/) const
 	float iErrorReturn /*= 10e10*/) const
 {
 {
 	return GetGenericProperty<float>(mFloatProperties,szName,iErrorReturn);
 	return GetGenericProperty<float>(mFloatProperties,szName,iErrorReturn);
@@ -562,7 +562,7 @@ float ExportProperties :: GetPropertyFloat(const char* szName,
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
 // Get a configuration property
 // Get a configuration property
-const std::string ExportProperties :: GetPropertyString(const char* szName, 
+const std::string ExportProperties :: GetPropertyString(const char* szName,
 	const std::string& iErrorReturn /*= ""*/) const
 	const std::string& iErrorReturn /*= ""*/) const
 {
 {
 	return GetGenericProperty<std::string>(mStringProperties,szName,iErrorReturn);
 	return GetGenericProperty<std::string>(mStringProperties,szName,iErrorReturn);
@@ -570,7 +570,7 @@ const std::string ExportProperties :: GetPropertyString(const char* szName,
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
 // Has a configuration property
 // Has a configuration property
-const aiMatrix4x4 ExportProperties :: GetPropertyMatrix(const char* szName, 
+const aiMatrix4x4 ExportProperties :: GetPropertyMatrix(const char* szName,
 	const aiMatrix4x4& iErrorReturn /*= aiMatrix4x4()*/) const
 	const aiMatrix4x4& iErrorReturn /*= aiMatrix4x4()*/) const
 {
 {
 	return GetGenericProperty<aiMatrix4x4>(mMatrixProperties,szName,iErrorReturn);
 	return GetGenericProperty<aiMatrix4x4>(mMatrixProperties,szName,iErrorReturn);

+ 16 - 16
code/FBXAnimation.cpp

@@ -5,8 +5,8 @@ Open Asset Import Library (assimp)
 Copyright (c) 2006-2015, assimp team
 Copyright (c) 2006-2015, assimp team
 All rights reserved.
 All rights reserved.
 
 
-Redistribution and use of this software in source and binary forms, 
-with or without modification, are permitted provided that the 
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the
 following conditions are met:
 following conditions are met:
 
 
 * Redistributions of source code must retain the above
 * Redistributions of source code must retain the above
@@ -23,24 +23,24 @@ following conditions are met:
   derived from this software without specific prior
   derived from this software without specific prior
   written permission of the assimp team.
   written permission of the assimp team.
 
 
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+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
 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 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 
+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.
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
 */
 */
 
 
 /** @file  FBXAnimation.cpp
 /** @file  FBXAnimation.cpp
- *  @brief Assimp::FBX::AnimationCurve, Assimp::FBX::AnimationCurveNode, 
- *         Assimp::FBX::AnimationLayer, Assimp::FBX::AnimationStack 
+ *  @brief Assimp::FBX::AnimationCurve, Assimp::FBX::AnimationCurveNode,
+ *         Assimp::FBX::AnimationLayer, Assimp::FBX::AnimationStack
  */
  */
 
 
 #ifndef ASSIMP_BUILD_NO_FBX_IMPORTER
 #ifndef ASSIMP_BUILD_NO_FBX_IMPORTER
@@ -72,7 +72,7 @@ AnimationCurve::AnimationCurve(uint64_t id, const Element& element, const std::s
 	if(keys.size() != values.size()) {
 	if(keys.size() != values.size()) {
 		DOMError("the number of key times does not match the number of keyframe values",&KeyTime);
 		DOMError("the number of key times does not match the number of keyframe values",&KeyTime);
 	}
 	}
-	
+
 	// check if the key times are well-ordered
 	// check if the key times are well-ordered
 	if(!std::equal(keys.begin(), keys.end() - 1, keys.begin() + 1, std::less<KeyTimeList::value_type>())) {
 	if(!std::equal(keys.begin(), keys.end() - 1, keys.begin() + 1, std::less<KeyTimeList::value_type>())) {
 		DOMError("the keyframes are not in ascending order",&KeyTime);
 		DOMError("the keyframes are not in ascending order",&KeyTime);
@@ -98,14 +98,14 @@ AnimationCurve::~AnimationCurve()
 
 
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-AnimationCurveNode::AnimationCurveNode(uint64_t id, const Element& element, const std::string& name, const Document& doc, 
+AnimationCurveNode::AnimationCurveNode(uint64_t id, const Element& element, const std::string& name, const Document& doc,
 	const char* const * target_prop_whitelist /*= NULL*/, size_t whitelist_size /*= 0*/)
 	const char* const * target_prop_whitelist /*= NULL*/, size_t whitelist_size /*= 0*/)
 : Object(id, element, name)
 : Object(id, element, name)
 , target()
 , target()
 , doc(doc)
 , doc(doc)
 {
 {
 	const Scope& sc = GetRequiredScope(element);
 	const Scope& sc = GetRequiredScope(element);
-	
+
 	// find target node
 	// find target node
 	const char* whitelist[] = {"Model","NodeAttribute"};
 	const char* whitelist[] = {"Model","NodeAttribute"};
 	const std::vector<const Connection*>& conns = doc.GetConnectionsBySourceSequenced(ID(),whitelist,2);
 	const std::vector<const Connection*>& conns = doc.GetConnectionsBySourceSequenced(ID(),whitelist,2);
@@ -140,7 +140,7 @@ AnimationCurveNode::AnimationCurveNode(uint64_t id, const Element& element, cons
 
 
 		// XXX support constraints as DOM class
 		// XXX support constraints as DOM class
 		//ai_assert(dynamic_cast<const Model*>(ob) || dynamic_cast<const NodeAttribute*>(ob));
 		//ai_assert(dynamic_cast<const Model*>(ob) || dynamic_cast<const NodeAttribute*>(ob));
-		target = ob; 
+		target = ob;
 		if(!target) {
 		if(!target) {
 			continue;
 			continue;
 		}
 		}
@@ -218,7 +218,7 @@ AnimationLayer::~AnimationLayer()
 
 
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-AnimationCurveNodeList AnimationLayer::Nodes(const char* const * target_prop_whitelist /*= NULL*/, 
+AnimationCurveNodeList AnimationLayer::Nodes(const char* const * target_prop_whitelist /*= NULL*/,
 	size_t whitelist_size /*= 0*/) const
 	size_t whitelist_size /*= 0*/) const
 {
 {
 	AnimationCurveNodeList nodes;
 	AnimationCurveNodeList nodes;

+ 9 - 9
code/FBXCompileConfig.h

@@ -5,8 +5,8 @@ Open Asset Import Library (assimp)
 Copyright (c) 2006-2015, assimp team
 Copyright (c) 2006-2015, assimp team
 All rights reserved.
 All rights reserved.
 
 
-Redistribution and use of this software in source and binary forms, 
-with or without modification, are permitted provided that the 
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the
 following conditions are met:
 following conditions are met:
 
 
 * Redistributions of source code must retain the above
 * Redistributions of source code must retain the above
@@ -23,16 +23,16 @@ following conditions are met:
   derived from this software without specific prior
   derived from this software without specific prior
   written permission of the assimp team.
   written permission of the assimp team.
 
 
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+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
 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 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 
+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.
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 154 - 154
code/FBXConverter.cpp


+ 9 - 9
code/FBXConverter.h

@@ -5,8 +5,8 @@ Open Asset Import Library (assimp)
 Copyright (c) 2006-2015, assimp team
 Copyright (c) 2006-2015, assimp team
 All rights reserved.
 All rights reserved.
 
 
-Redistribution and use of this software in source and binary forms, 
-with or without modification, are permitted provided that the 
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the
 following conditions are met:
 following conditions are met:
 
 
 * Redistributions of source code must retain the above
 * Redistributions of source code must retain the above
@@ -23,16 +23,16 @@ following conditions are met:
   derived from this software without specific prior
   derived from this software without specific prior
   written permission of the assimp team.
   written permission of the assimp team.
 
 
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+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
 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 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 
+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.
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------

+ 10 - 10
code/FBXDeformer.cpp

@@ -5,8 +5,8 @@ Open Asset Import Library (assimp)
 Copyright (c) 2006-2015, assimp team
 Copyright (c) 2006-2015, assimp team
 All rights reserved.
 All rights reserved.
 
 
-Redistribution and use of this software in source and binary forms, 
-with or without modification, are permitted provided that the 
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the
 following conditions are met:
 following conditions are met:
 
 
 * Redistributions of source code must retain the above
 * Redistributions of source code must retain the above
@@ -23,16 +23,16 @@ following conditions are met:
   derived from this software without specific prior
   derived from this software without specific prior
   written permission of the assimp team.
   written permission of the assimp team.
 
 
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+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
 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 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 
+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.
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
@@ -139,7 +139,7 @@ Skin::Skin(uint64_t id, const Element& element, const Document& doc, const std::
 		accuracy = ParseTokenAsFloat(GetRequiredToken(*Link_DeformAcuracy,0));
 		accuracy = ParseTokenAsFloat(GetRequiredToken(*Link_DeformAcuracy,0));
 	}
 	}
 
 
-	// resolve assigned clusters 
+	// resolve assigned clusters
 	const std::vector<const Connection*>& conns = doc.GetConnectionsByDestinationSequenced(ID(),"Deformer");
 	const std::vector<const Connection*>& conns = doc.GetConnectionsByDestinationSequenced(ID(),"Deformer");
 
 
 	clusters.reserve(conns.size());
 	clusters.reserve(conns.size());

+ 31 - 31
code/FBXDocument.cpp

@@ -5,8 +5,8 @@ Open Asset Import Library (assimp)
 Copyright (c) 2006-2015, assimp team
 Copyright (c) 2006-2015, assimp team
 All rights reserved.
 All rights reserved.
 
 
-Redistribution and use of this software in source and binary forms, 
-with or without modification, are permitted provided that the 
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the
 following conditions are met:
 following conditions are met:
 
 
 * Redistributions of source code must retain the above
 * Redistributions of source code must retain the above
@@ -23,16 +23,16 @@ following conditions are met:
   derived from this software without specific prior
   derived from this software without specific prior
   written permission of the assimp team.
   written permission of the assimp team.
 
 
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+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
 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 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 
+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.
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
@@ -107,7 +107,7 @@ const Object* LazyObject::Get(bool dieOnError)
 	std::string name = ParseTokenAsString(*tokens[1],err);
 	std::string name = ParseTokenAsString(*tokens[1],err);
 	if (err) {
 	if (err) {
 		DOMError(err,&element);
 		DOMError(err,&element);
-	} 
+	}
 
 
 	// small fix for binary reading: binary fbx files don't use
 	// small fix for binary reading: binary fbx files don't use
 	// prefixes such as Model:: in front of their names. The
 	// prefixes such as Model:: in front of their names. The
@@ -125,7 +125,7 @@ const Object* LazyObject::Get(bool dieOnError)
 	const std::string classtag = ParseTokenAsString(*tokens[2],err);
 	const std::string classtag = ParseTokenAsString(*tokens[2],err);
 	if (err) {
 	if (err) {
 		DOMError(err,&element);
 		DOMError(err,&element);
-	} 
+	}
 
 
 	// prevent recursive calls
 	// prevent recursive calls
 	flags |= BEING_CONSTRUCTED;
 	flags |= BEING_CONSTRUCTED;
@@ -192,7 +192,7 @@ const Object* LazyObject::Get(bool dieOnError)
 		}
 		}
 		else if (!strncmp(obtype,"AnimationCurveNode",length)) {
 		else if (!strncmp(obtype,"AnimationCurveNode",length)) {
 			object.reset(new AnimationCurveNode(id,element,name,doc));
 			object.reset(new AnimationCurveNode(id,element,name,doc));
-		}	
+		}
 	}
 	}
 	catch(std::exception& ex) {
 	catch(std::exception& ex) {
 		flags &= ~BEING_CONSTRUCTED;
 		flags &= ~BEING_CONSTRUCTED;
@@ -236,7 +236,7 @@ Object::~Object()
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
 FileGlobalSettings::FileGlobalSettings(const Document& doc, boost::shared_ptr<const PropertyTable> props)
 FileGlobalSettings::FileGlobalSettings(const Document& doc, boost::shared_ptr<const PropertyTable> props)
 : props(props)
 : props(props)
-, doc(doc) 
+, doc(doc)
 {
 {
 
 
 }
 }
@@ -314,7 +314,7 @@ void Document::ReadHeader()
 				" trying to read it nevertheless");
 				" trying to read it nevertheless");
 		}
 		}
 	}
 	}
-	
+
 
 
 	const Element* const ecreator = shead["Creator"];
 	const Element* const ecreator = shead["Creator"];
 	if(ecreator) {
 	if(ecreator) {
@@ -372,10 +372,10 @@ void Document::ReadObjects()
 
 
 	const Scope& sobjects = *eobjects->Compound();
 	const Scope& sobjects = *eobjects->Compound();
 	BOOST_FOREACH(const ElementMap::value_type& el, sobjects.Elements()) {
 	BOOST_FOREACH(const ElementMap::value_type& el, sobjects.Elements()) {
-		
-		// extract ID 
+
+		// extract ID
 		const TokenList& tok = el.second->Tokens();
 		const TokenList& tok = el.second->Tokens();
-		
+
 		if (tok.empty()) {
 		if (tok.empty()) {
 			DOMError("expected ID after object key",el.second);
 			DOMError("expected ID after object key",el.second);
 		}
 		}
@@ -503,8 +503,8 @@ void Document::ReadConnections()
 
 
 		// add new connection
 		// add new connection
 		const Connection* const c = new Connection(insertionOrder++,src,dest,prop,*this);
 		const Connection* const c = new Connection(insertionOrder++,src,dest,prop,*this);
-		src_connections.insert(ConnectionMap::value_type(src,c));  
-		dest_connections.insert(ConnectionMap::value_type(dest,c));  
+		src_connections.insert(ConnectionMap::value_type(src,c));
+		dest_connections.insert(ConnectionMap::value_type(dest,c));
 	}
 	}
 }
 }
 
 
@@ -541,12 +541,12 @@ LazyObject* Document::GetObject(uint64_t id) const
 #define MAX_CLASSNAMES 6
 #define MAX_CLASSNAMES 6
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-std::vector<const Connection*> Document::GetConnectionsSequenced(uint64_t id, 
+std::vector<const Connection*> Document::GetConnectionsSequenced(uint64_t id,
 	const ConnectionMap& conns) const
 	const ConnectionMap& conns) const
 {
 {
 	std::vector<const Connection*> temp;
 	std::vector<const Connection*> temp;
 
 
-	const std::pair<ConnectionMap::const_iterator,ConnectionMap::const_iterator> range = 
+	const std::pair<ConnectionMap::const_iterator,ConnectionMap::const_iterator> range =
 		conns.equal_range(id);
 		conns.equal_range(id);
 
 
 	temp.reserve(std::distance(range.first,range.second));
 	temp.reserve(std::distance(range.first,range.second));
@@ -561,9 +561,9 @@ std::vector<const Connection*> Document::GetConnectionsSequenced(uint64_t id,
 
 
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-std::vector<const Connection*> Document::GetConnectionsSequenced(uint64_t id, bool is_src, 
-	const ConnectionMap& conns, 
-	const char* const* classnames, 
+std::vector<const Connection*> Document::GetConnectionsSequenced(uint64_t id, bool is_src,
+	const ConnectionMap& conns,
+	const char* const* classnames,
 	size_t count) const
 	size_t count) const
 
 
 {
 {
@@ -579,12 +579,12 @@ std::vector<const Connection*> Document::GetConnectionsSequenced(uint64_t id, bo
 
 
 	std::vector<const Connection*> temp;
 	std::vector<const Connection*> temp;
 
 
-	const std::pair<ConnectionMap::const_iterator,ConnectionMap::const_iterator> range = 
+	const std::pair<ConnectionMap::const_iterator,ConnectionMap::const_iterator> range =
 		conns.equal_range(id);
 		conns.equal_range(id);
 
 
 	temp.reserve(std::distance(range.first,range.second));
 	temp.reserve(std::distance(range.first,range.second));
 	for (ConnectionMap::const_iterator it = range.first; it != range.second; ++it) {
 	for (ConnectionMap::const_iterator it = range.first; it != range.second; ++it) {
-		const Token& key = (is_src 
+		const Token& key = (is_src
 			? (*it).second->LazyDestinationObject()
 			? (*it).second->LazyDestinationObject()
 			: (*it).second->LazySourceObject()
 			: (*it).second->LazySourceObject()
 		).GetElement().KeyToken();
 		).GetElement().KeyToken();
@@ -620,7 +620,7 @@ std::vector<const Connection*> Document::GetConnectionsBySourceSequenced(uint64_
 
 
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-std::vector<const Connection*> Document::GetConnectionsBySourceSequenced(uint64_t dest, 
+std::vector<const Connection*> Document::GetConnectionsBySourceSequenced(uint64_t dest,
 	const char* classname) const
 	const char* classname) const
 {
 {
 	const char* arr[] = {classname};
 	const char* arr[] = {classname};
@@ -630,7 +630,7 @@ std::vector<const Connection*> Document::GetConnectionsBySourceSequenced(uint64_
 
 
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-std::vector<const Connection*> Document::GetConnectionsBySourceSequenced(uint64_t source, 
+std::vector<const Connection*> Document::GetConnectionsBySourceSequenced(uint64_t source,
 	const char* const* classnames, size_t count) const
 	const char* const* classnames, size_t count) const
 {
 {
 	return GetConnectionsSequenced(source, true, ConnectionsBySource(),classnames, count);
 	return GetConnectionsSequenced(source, true, ConnectionsBySource(),classnames, count);
@@ -638,7 +638,7 @@ std::vector<const Connection*> Document::GetConnectionsBySourceSequenced(uint64_
 
 
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-std::vector<const Connection*> Document::GetConnectionsByDestinationSequenced(uint64_t dest, 
+std::vector<const Connection*> Document::GetConnectionsByDestinationSequenced(uint64_t dest,
 	const char* classname) const
 	const char* classname) const
 {
 {
 	const char* arr[] = {classname};
 	const char* arr[] = {classname};
@@ -654,7 +654,7 @@ std::vector<const Connection*> Document::GetConnectionsByDestinationSequenced(ui
 
 
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-std::vector<const Connection*> Document::GetConnectionsByDestinationSequenced(uint64_t dest, 
+std::vector<const Connection*> Document::GetConnectionsByDestinationSequenced(uint64_t dest,
 	const char* const* classnames, size_t count) const
 	const char* const* classnames, size_t count) const
 
 
 {
 {
@@ -663,7 +663,7 @@ std::vector<const Connection*> Document::GetConnectionsByDestinationSequenced(ui
 
 
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-Connection::Connection(uint64_t insertionOrder,  uint64_t src, uint64_t dest, const std::string& prop, 
+Connection::Connection(uint64_t insertionOrder,  uint64_t src, uint64_t dest, const std::string& prop,
 	const Document& doc)
 	const Document& doc)
 
 
 : insertionOrder(insertionOrder)
 : insertionOrder(insertionOrder)

+ 39 - 39
code/FBXDocument.h

@@ -5,8 +5,8 @@ Open Asset Import Library (assimp)
 Copyright (c) 2006-2015, assimp team
 Copyright (c) 2006-2015, assimp team
 All rights reserved.
 All rights reserved.
 
 
-Redistribution and use of this software in source and binary forms, 
-with or without modification, are permitted provided that the 
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the
 following conditions are met:
 following conditions are met:
 
 
 * Redistributions of source code must retain the above
 * Redistributions of source code must retain the above
@@ -23,16 +23,16 @@ following conditions are met:
   derived from this software without specific prior
   derived from this software without specific prior
   written permission of the assimp team.
   written permission of the assimp team.
 
 
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+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
 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 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 
+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.
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
@@ -96,7 +96,7 @@ public:
 
 
 	const Object* Get(bool dieOnError = false);
 	const Object* Get(bool dieOnError = false);
 
 
-	template <typename T> 
+	template <typename T>
 	const T* Get(bool dieOnError = false) {
 	const T* Get(bool dieOnError = false) {
 		const Object* const ob = Get(dieOnError);
 		const Object* const ob = Get(dieOnError);
 		return ob ? dynamic_cast<const T*>(ob) : NULL;
 		return ob ? dynamic_cast<const T*>(ob) : NULL;
@@ -373,12 +373,12 @@ public:
 public:
 public:
 
 
 	enum RotOrder
 	enum RotOrder
-	{ 
-		RotOrder_EulerXYZ = 0, 
-		RotOrder_EulerXZY, 
-		RotOrder_EulerYZX, 
-		RotOrder_EulerYXZ, 
-		RotOrder_EulerZXY, 
+	{
+		RotOrder_EulerXYZ = 0,
+		RotOrder_EulerXZY,
+		RotOrder_EulerYZX,
+		RotOrder_EulerYXZ,
+		RotOrder_EulerZXY,
 		RotOrder_EulerZYX,
 		RotOrder_EulerZYX,
 
 
 		RotOrder_SphericXYZ,
 		RotOrder_SphericXYZ,
@@ -566,7 +566,7 @@ public:
 		return *props.get();
 		return *props.get();
 	}
 	}
 
 
-	// return a 4-tuple 
+	// return a 4-tuple
 	const unsigned int* Crop() const {
 	const unsigned int* Crop() const {
 		return crop;
 		return crop;
 	}
 	}
@@ -753,9 +753,9 @@ public:
 	const std::vector<aiVector3D>& GetBinormals() const {
 	const std::vector<aiVector3D>& GetBinormals() const {
 		return binormals;
 		return binormals;
 	}
 	}
-	
+
 	/** Return list of faces - each entry denotes a face and specifies
 	/** Return list of faces - each entry denotes a face and specifies
-	 *  how many vertices it has. Vertices are taken from the 
+	 *  how many vertices it has. Vertices are taken from the
 	 *  vertex data arrays in sequential order. */
 	 *  vertex data arrays in sequential order. */
 	const std::vector<unsigned int>& GetFaceIndexCounts() const {
 	const std::vector<unsigned int>& GetFaceIndexCounts() const {
 		return faces;
 		return faces;
@@ -781,8 +781,8 @@ public:
 		static const std::vector<aiColor4D> empty;
 		static const std::vector<aiColor4D> empty;
 		return index >= AI_MAX_NUMBER_OF_COLOR_SETS ? empty : colors[index];
 		return index >= AI_MAX_NUMBER_OF_COLOR_SETS ? empty : colors[index];
 	}
 	}
-	
-	
+
+
 	/** Get per-face-vertex material assignments */
 	/** Get per-face-vertex material assignments */
 	const MatIndexArray& GetMaterialIndices() const {
 	const MatIndexArray& GetMaterialIndices() const {
 		return materials;
 		return materials;
@@ -810,7 +810,7 @@ public:
 	 *  This mapping is always unique. */
 	 *  This mapping is always unique. */
 	unsigned int FaceForVertexIndex(unsigned int in_index) const {
 	unsigned int FaceForVertexIndex(unsigned int in_index) const {
 		ai_assert(in_index < vertices.size());
 		ai_assert(in_index < vertices.size());
-	
+
 		// in the current conversion pattern this will only be needed if
 		// in the current conversion pattern this will only be needed if
 		// weights are present, so no need to always pre-compute this table
 		// weights are present, so no need to always pre-compute this table
 		if (facesVertexStartIndices.empty()) {
 		if (facesVertexStartIndices.empty()) {
@@ -827,7 +827,7 @@ public:
 			in_index
 			in_index
 		);
 		);
 
 
-		return static_cast<unsigned int>(std::distance(facesVertexStartIndices.begin(), it - 1)); 
+		return static_cast<unsigned int>(std::distance(facesVertexStartIndices.begin(), it - 1));
 	}
 	}
 
 
 public:
 public:
@@ -838,27 +838,27 @@ private:
 	void ReadLayerElement(const Scope& layerElement);
 	void ReadLayerElement(const Scope& layerElement);
 	void ReadVertexData(const std::string& type, int index, const Scope& source);
 	void ReadVertexData(const std::string& type, int index, const Scope& source);
 
 
-	void ReadVertexDataUV(std::vector<aiVector2D>& uv_out, const Scope& source, 
+	void ReadVertexDataUV(std::vector<aiVector2D>& uv_out, const Scope& source,
 		const std::string& MappingInformationType,
 		const std::string& MappingInformationType,
 		const std::string& ReferenceInformationType);
 		const std::string& ReferenceInformationType);
 
 
-	void ReadVertexDataNormals(std::vector<aiVector3D>& normals_out, const Scope& source, 
+	void ReadVertexDataNormals(std::vector<aiVector3D>& normals_out, const Scope& source,
 		const std::string& MappingInformationType,
 		const std::string& MappingInformationType,
 		const std::string& ReferenceInformationType);
 		const std::string& ReferenceInformationType);
 
 
-	void ReadVertexDataColors(std::vector<aiColor4D>& colors_out, const Scope& source, 
+	void ReadVertexDataColors(std::vector<aiColor4D>& colors_out, const Scope& source,
 		const std::string& MappingInformationType,
 		const std::string& MappingInformationType,
 		const std::string& ReferenceInformationType);
 		const std::string& ReferenceInformationType);
 
 
-	void ReadVertexDataTangents(std::vector<aiVector3D>& tangents_out, const Scope& source, 
+	void ReadVertexDataTangents(std::vector<aiVector3D>& tangents_out, const Scope& source,
 		const std::string& MappingInformationType,
 		const std::string& MappingInformationType,
 		const std::string& ReferenceInformationType);
 		const std::string& ReferenceInformationType);
 
 
-	void ReadVertexDataBinormals(std::vector<aiVector3D>& binormals_out, const Scope& source, 
+	void ReadVertexDataBinormals(std::vector<aiVector3D>& binormals_out, const Scope& source,
 		const std::string& MappingInformationType,
 		const std::string& MappingInformationType,
 		const std::string& ReferenceInformationType);
 		const std::string& ReferenceInformationType);
 
 
-	void ReadVertexDataMaterials(MatIndexArray& materials_out, const Scope& source, 
+	void ReadVertexDataMaterials(MatIndexArray& materials_out, const Scope& source,
 		const std::string& MappingInformationType,
 		const std::string& MappingInformationType,
 		const std::string& ReferenceInformationType);
 		const std::string& ReferenceInformationType);
 
 
@@ -902,7 +902,7 @@ public:
 	}
 	}
 
 
 
 
-	/** get list of keyframe values. 
+	/** get list of keyframe values.
 	  * Invariant: |GetKeys()| == |GetValues()| && |GetKeys()| > 0*/
 	  * Invariant: |GetKeys()| == |GetValues()| && |GetKeys()| > 0*/
 	const KeyValueList& GetValues() const {
 	const KeyValueList& GetValues() const {
 		return values;
 		return values;
@@ -990,7 +990,7 @@ class AnimationLayer : public Object
 {
 {
 public:
 public:
 
 
-	
+
 	AnimationLayer(uint64_t id, const Element& element, const std::string& name, const Document& doc);
 	AnimationLayer(uint64_t id, const Element& element, const std::string& name, const Document& doc);
 	~AnimationLayer();
 	~AnimationLayer();
 
 
@@ -1210,7 +1210,7 @@ public:
 	// during their entire lifetime (Document). FBX files have
 	// during their entire lifetime (Document). FBX files have
 	// up to many thousands of objects (most of which we never use),
 	// up to many thousands of objects (most of which we never use),
 	// so the memory overhead for them should be kept at a minimum.
 	// so the memory overhead for them should be kept at a minimum.
-	typedef std::map<uint64_t, LazyObject*> ObjectMap; 
+	typedef std::map<uint64_t, LazyObject*> ObjectMap;
 	typedef std::fbx_unordered_map<std::string, boost::shared_ptr<const PropertyTable> > PropertyTemplateMap;
 	typedef std::fbx_unordered_map<std::string, boost::shared_ptr<const PropertyTable> > PropertyTemplateMap;
 
 
 
 
@@ -1288,7 +1288,7 @@ private:
 
 
 
 
 /** DOM root for a FBX file */
 /** DOM root for a FBX file */
-class Document 
+class Document
 {
 {
 public:
 public:
 
 
@@ -1353,10 +1353,10 @@ public:
 	std::vector<const Connection*> GetConnectionsBySourceSequenced(uint64_t source, const char* classname) const;
 	std::vector<const Connection*> GetConnectionsBySourceSequenced(uint64_t source, const char* classname) const;
 	std::vector<const Connection*> GetConnectionsByDestinationSequenced(uint64_t dest, const char* classname) const;
 	std::vector<const Connection*> GetConnectionsByDestinationSequenced(uint64_t dest, const char* classname) const;
 
 
-	std::vector<const Connection*> GetConnectionsBySourceSequenced(uint64_t source, 
+	std::vector<const Connection*> GetConnectionsBySourceSequenced(uint64_t source,
 		const char* const* classnames, size_t count) const;
 		const char* const* classnames, size_t count) const;
-	std::vector<const Connection*> GetConnectionsByDestinationSequenced(uint64_t dest, 
-		const char* const* classnames, 
+	std::vector<const Connection*> GetConnectionsByDestinationSequenced(uint64_t dest,
+		const char* const* classnames,
 		size_t count) const;
 		size_t count) const;
 
 
 	const std::vector<const AnimationStack*>& AnimationStacks() const;
 	const std::vector<const AnimationStack*>& AnimationStacks() const;
@@ -1364,9 +1364,9 @@ public:
 private:
 private:
 
 
 	std::vector<const Connection*> GetConnectionsSequenced(uint64_t id, const ConnectionMap&) const;
 	std::vector<const Connection*> GetConnectionsSequenced(uint64_t id, const ConnectionMap&) const;
-	std::vector<const Connection*> GetConnectionsSequenced(uint64_t id, bool is_src, 
-		const ConnectionMap&, 
-		const char* const* classnames, 
+	std::vector<const Connection*> GetConnectionsSequenced(uint64_t id, bool is_src,
+		const ConnectionMap&,
+		const char* const* classnames,
 		size_t count) const;
 		size_t count) const;
 
 
 private:
 private:

+ 14 - 14
code/FBXDocumentUtil.cpp

@@ -5,8 +5,8 @@ Open Asset Import Library (assimp)
 Copyright (c) 2006-2015, assimp team
 Copyright (c) 2006-2015, assimp team
 All rights reserved.
 All rights reserved.
 
 
-Redistribution and use of this software in source and binary forms, 
-with or without modification, are permitted provided that the 
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the
 following conditions are met:
 following conditions are met:
 
 
 * Redistributions of source code must retain the above
 * Redistributions of source code must retain the above
@@ -23,16 +23,16 @@ following conditions are met:
   derived from this software without specific prior
   derived from this software without specific prior
   written permission of the assimp team.
   written permission of the assimp team.
 
 
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+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
 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 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 
+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.
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
@@ -95,10 +95,10 @@ void DOMWarning(const std::string& message, const Element* element /*= NULL*/)
 
 
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-// fetch a property table and the corresponding property template 
-boost::shared_ptr<const PropertyTable> GetPropertyTable(const Document& doc, 
-	const std::string& templateName, 
-	const Element &element, 
+// fetch a property table and the corresponding property template
+boost::shared_ptr<const PropertyTable> GetPropertyTable(const Document& doc,
+	const std::string& templateName,
+	const Element &element,
 	const Scope& sc,
 	const Scope& sc,
 	bool no_warn /*= false*/)
 	bool no_warn /*= false*/)
 {
 {
@@ -107,7 +107,7 @@ boost::shared_ptr<const PropertyTable> GetPropertyTable(const Document& doc,
 		static_cast<const PropertyTable*>(NULL));
 		static_cast<const PropertyTable*>(NULL));
 
 
 	if(templateName.length()) {
 	if(templateName.length()) {
-		PropertyTemplateMap::const_iterator it = doc.Templates().find(templateName); 
+		PropertyTemplateMap::const_iterator it = doc.Templates().find(templateName);
 		if(it != doc.Templates().end()) {
 		if(it != doc.Templates().end()) {
 			templateProps = (*it).second;
 			templateProps = (*it).second;
 		}
 		}

+ 18 - 18
code/FBXDocumentUtil.h

@@ -5,8 +5,8 @@ Open Asset Import Library (assimp)
 Copyright (c) 2006-2012, assimp team
 Copyright (c) 2006-2012, assimp team
 All rights reserved.
 All rights reserved.
 
 
-Redistribution and use of this software in source and binary forms, 
-with or without modification, are permitted provided that the 
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the
 following conditions are met:
 following conditions are met:
 
 
 * Redistributions of source code must retain the above
 * Redistributions of source code must retain the above
@@ -23,16 +23,16 @@ following conditions are met:
   derived from this software without specific prior
   derived from this software without specific prior
   written permission of the assimp team.
   written permission of the assimp team.
 
 
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+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
 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 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 
+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.
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
@@ -66,20 +66,20 @@ void DOMWarning(const std::string& message, const Token& token);
 void DOMWarning(const std::string& message, const Element* element = NULL);
 void DOMWarning(const std::string& message, const Element* element = NULL);
 
 
 
 
-// fetch a property table and the corresponding property template 
-boost::shared_ptr<const PropertyTable> GetPropertyTable(const Document& doc, 
-	const std::string& templateName, 
-	const Element &element, 
+// fetch a property table and the corresponding property template
+boost::shared_ptr<const PropertyTable> GetPropertyTable(const Document& doc,
+	const std::string& templateName,
+	const Element &element,
 	const Scope& sc,
 	const Scope& sc,
 	bool no_warn = false);
 	bool no_warn = false);
 
 
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
 template <typename T>
 template <typename T>
-inline const T* ProcessSimpleConnection(const Connection& con, 
-	bool is_object_property_conn, 
-	const char* name, 
-	const Element& element, 
+inline const T* ProcessSimpleConnection(const Connection& con,
+	bool is_object_property_conn,
+	const char* name,
+	const Element& element,
 	const char** propNameOut = NULL)
 	const char** propNameOut = NULL)
 {
 {
 	if (is_object_property_conn && !con.PropertyName().length()) {
 	if (is_object_property_conn && !con.PropertyName().length()) {
@@ -98,7 +98,7 @@ inline const T* ProcessSimpleConnection(const Connection& con,
 	}
 	}
 
 
 	if(is_object_property_conn && propNameOut) {
 	if(is_object_property_conn && propNameOut) {
-		// note: this is ok, the return value of PropertyValue() is guaranteed to 
+		// note: this is ok, the return value of PropertyValue() is guaranteed to
 		// remain valid and unchanged as long as the document exists.
 		// remain valid and unchanged as long as the document exists.
 		*propNameOut = con.PropertyName().c_str();
 		*propNameOut = con.PropertyName().c_str();
 	}
 	}

+ 14 - 14
code/FBXImportSettings.h

@@ -5,8 +5,8 @@ Open Asset Import Library (assimp)
 Copyright (c) 2006-2015, assimp team
 Copyright (c) 2006-2015, assimp team
 All rights reserved.
 All rights reserved.
 
 
-Redistribution and use of this software in source and binary forms, 
-with or without modification, are permitted provided that the 
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the
 following conditions are met:
 following conditions are met:
 
 
 * Redistributions of source code must retain the above
 * Redistributions of source code must retain the above
@@ -23,16 +23,16 @@ following conditions are met:
   derived from this software without specific prior
   derived from this software without specific prior
   written permission of the assimp team.
   written permission of the assimp team.
 
 
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+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
 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 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 
+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.
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
@@ -48,7 +48,7 @@ namespace Assimp {
 namespace FBX {
 namespace FBX {
 
 
 /** FBX import settings, parts of which are publicly accessible via their corresponding AI_CONFIG constants */
 /** FBX import settings, parts of which are publicly accessible via their corresponding AI_CONFIG constants */
-struct ImportSettings 
+struct ImportSettings
 {
 {
 	ImportSettings()
 	ImportSettings()
 		: strictMode(true)
 		: strictMode(true)
@@ -62,7 +62,7 @@ struct ImportSettings
 		, preservePivots(true)
 		, preservePivots(true)
 		, optimizeEmptyAnimationCurves(true)
 		, optimizeEmptyAnimationCurves(true)
 	{}
 	{}
- 
+
 
 
 	/** enable strict mode:
 	/** enable strict mode:
 	 *   - only accept fbx 2012, 2013 files
 	 *   - only accept fbx 2012, 2013 files
@@ -75,7 +75,7 @@ struct ImportSettings
 	/** specifies whether all geometry layers are read and scanned for
 	/** specifies whether all geometry layers are read and scanned for
 	  * usable data channels. The FBX spec indicates that many readers
 	  * usable data channels. The FBX spec indicates that many readers
 	  * will only read the first channel and that this is in some way
 	  * will only read the first channel and that this is in some way
-	  * the recommended way- in reality, however, it happens a lot that 
+	  * the recommended way- in reality, however, it happens a lot that
 	  * vertex data is spread among multiple layers. The default
 	  * vertex data is spread among multiple layers. The default
 	  * value for this option is true.*/
 	  * value for this option is true.*/
 	bool readAllLayers;
 	bool readAllLayers;
@@ -88,7 +88,7 @@ struct ImportSettings
 	bool readAllMaterials;
 	bool readAllMaterials;
 
 
 
 
-	/** import materials (true) or skip them and assign a default 
+	/** import materials (true) or skip them and assign a default
 	 *  material. The default value is true.*/
 	 *  material. The default value is true.*/
 	bool readMaterials;
 	bool readMaterials;
 
 
@@ -114,7 +114,7 @@ struct ImportSettings
 	 *
 	 *
 	 *  The naming scheme for the generated nodes is:
 	 *  The naming scheme for the generated nodes is:
 	 *    <OriginalName>_$AssimpFbx$_<TransformName>
 	 *    <OriginalName>_$AssimpFbx$_<TransformName>
-	 *  
+	 *
 	 *  where <TransformName> is one of
 	 *  where <TransformName> is one of
 	 *    RotationPivot
 	 *    RotationPivot
 	 *    RotationOffset
 	 *    RotationOffset

+ 15 - 15
code/FBXImporter.cpp

@@ -5,8 +5,8 @@ Open Asset Import Library (assimp)
 Copyright (c) 2006-2015, assimp team
 Copyright (c) 2006-2015, assimp team
 All rights reserved.
 All rights reserved.
 
 
-Redistribution and use of this software in source and binary forms, 
-with or without modification, are permitted provided that the 
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the
 following conditions are met:
 following conditions are met:
 
 
 * Redistributions of source code must retain the above
 * Redistributions of source code must retain the above
@@ -23,16 +23,16 @@ following conditions are met:
   derived from this software without specific prior
   derived from this software without specific prior
   written permission of the assimp team.
   written permission of the assimp team.
 
 
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+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
 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 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 
+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.
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
@@ -79,7 +79,7 @@ static const aiImporterDesc desc = {
 	0,
 	0,
 	0,
 	0,
 	0,
 	0,
-	"fbx" 
+	"fbx"
 };
 };
 }
 }
 
 
@@ -89,13 +89,13 @@ FBXImporter::FBXImporter()
 {}
 {}
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-// Destructor, private as well 
+// Destructor, private as well
 FBXImporter::~FBXImporter()
 FBXImporter::~FBXImporter()
 {
 {
 }
 }
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-// Returns whether the class can handle the format of the given file. 
+// Returns whether the class can handle the format of the given file.
 bool FBXImporter::CanRead( const std::string& pFile, IOSystem* pIOHandler, bool checkSig) const
 bool FBXImporter::CanRead( const std::string& pFile, IOSystem* pIOHandler, bool checkSig) const
 {
 {
 	const std::string& extension = GetExtension(pFile);
 	const std::string& extension = GetExtension(pFile);
@@ -136,8 +136,8 @@ void FBXImporter::SetupProperties(const Importer* pImp)
 
 
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-// Imports the given file into the given scene structure. 
-void FBXImporter::InternReadFile( const std::string& pFile, 
+// Imports the given file into the given scene structure.
+void FBXImporter::InternReadFile( const std::string& pFile,
 	aiScene* pScene, IOSystem* pIOHandler)
 	aiScene* pScene, IOSystem* pIOHandler)
 {
 {
 	boost::scoped_ptr<IOStream> stream(pIOHandler->Open(pFile,"rb"));
 	boost::scoped_ptr<IOStream> stream(pIOHandler->Open(pFile,"rb"));
@@ -170,7 +170,7 @@ void FBXImporter::InternReadFile( const std::string& pFile,
 			Tokenize(tokens,begin);
 			Tokenize(tokens,begin);
 		}
 		}
 
 
-		// use this information to construct a very rudimentary 
+		// use this information to construct a very rudimentary
 		// parse-tree representing the FBX scope structure
 		// parse-tree representing the FBX scope structure
 		Parser parser(tokens, is_binary);
 		Parser parser(tokens, is_binary);
 
 

+ 14 - 14
code/FBXImporter.h

@@ -5,8 +5,8 @@ Open Asset Import Library (assimp)
 Copyright (c) 2006-2015, assimp team
 Copyright (c) 2006-2015, assimp team
 All rights reserved.
 All rights reserved.
 
 
-Redistribution and use of this software in source and binary forms, 
-with or without modification, are permitted provided that the 
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the
 following conditions are met:
 following conditions are met:
 
 
 * Redistributions of source code must retain the above
 * Redistributions of source code must retain the above
@@ -23,16 +23,16 @@ following conditions are met:
   derived from this software without specific prior
   derived from this software without specific prior
   written permission of the assimp team.
   written permission of the assimp team.
 
 
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+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
 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 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 
+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.
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
@@ -50,7 +50,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include "FBXImportSettings.h"
 #include "FBXImportSettings.h"
 
 
 namespace Assimp	{
 namespace Assimp	{
-	
+
 	// TinyFormatter.h
 	// TinyFormatter.h
 	namespace Formatter {
 	namespace Formatter {
 		template <typename T,typename TR, typename A> class basic_formatter;
 		template <typename T,typename TR, typename A> class basic_formatter;
@@ -74,7 +74,7 @@ public:
 public:
 public:
 
 
 	// --------------------
 	// --------------------
-	bool CanRead( const std::string& pFile, 
+	bool CanRead( const std::string& pFile,
 		IOSystem* pIOHandler,
 		IOSystem* pIOHandler,
 		bool checkSig
 		bool checkSig
 	) const;
 	) const;
@@ -88,14 +88,14 @@ protected:
 	void SetupProperties(const Importer* pImp);
 	void SetupProperties(const Importer* pImp);
 
 
 	// --------------------
 	// --------------------
-	void InternReadFile( const std::string& pFile, 
-		aiScene* pScene, 
+	void InternReadFile( const std::string& pFile,
+		aiScene* pScene,
 		IOSystem* pIOHandler
 		IOSystem* pIOHandler
 	);
 	);
 
 
 private:
 private:
 
 
-	
+
 private:
 private:
 
 
 	FBX::ImportSettings settings;
 	FBX::ImportSettings settings;

+ 11 - 11
code/FBXMaterial.cpp

@@ -5,8 +5,8 @@ Open Asset Import Library (assimp)
 Copyright (c) 2006-2015, assimp team
 Copyright (c) 2006-2015, assimp team
 All rights reserved.
 All rights reserved.
 
 
-Redistribution and use of this software in source and binary forms, 
-with or without modification, are permitted provided that the 
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the
 following conditions are met:
 following conditions are met:
 
 
 * Redistributions of source code must retain the above
 * Redistributions of source code must retain the above
@@ -23,16 +23,16 @@ following conditions are met:
   derived from this software without specific prior
   derived from this software without specific prior
   written permission of the assimp team.
   written permission of the assimp team.
 
 
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+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
 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 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 
+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.
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
@@ -62,7 +62,7 @@ Material::Material(uint64_t id, const Element& element, const Document& doc, con
 : Object(id,element,name)
 : Object(id,element,name)
 {
 {
 	const Scope& sc = GetRequiredScope(element);
 	const Scope& sc = GetRequiredScope(element);
-	
+
 	const Element* const ShadingModel = sc["ShadingModel"];
 	const Element* const ShadingModel = sc["ShadingModel"];
 	const Element* const MultiLayer = sc["MultiLayer"];
 	const Element* const MultiLayer = sc["MultiLayer"];
 
 
@@ -218,7 +218,7 @@ LayeredTexture::LayeredTexture(uint64_t id, const Element& element, const Docume
 	const Element* const BlendModes = sc["BlendModes"];
 	const Element* const BlendModes = sc["BlendModes"];
 	const Element* const Alphas = sc["Alphas"];
 	const Element* const Alphas = sc["Alphas"];
 
 
-	
+
 	if(BlendModes!=0)
 	if(BlendModes!=0)
 	{
 	{
 		blendMode = (BlendMode)ParseTokenAsInt(GetRequiredToken(*BlendModes,0));
 		blendMode = (BlendMode)ParseTokenAsInt(GetRequiredToken(*BlendModes,0));

+ 31 - 31
code/FBXMeshGeometry.cpp

@@ -5,8 +5,8 @@ Open Asset Import Library (assimp)
 Copyright (c) 2006-2015, assimp team
 Copyright (c) 2006-2015, assimp team
 All rights reserved.
 All rights reserved.
 
 
-Redistribution and use of this software in source and binary forms, 
-with or without modification, are permitted provided that the 
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the
 following conditions are met:
 following conditions are met:
 
 
 * Redistributions of source code must retain the above
 * Redistributions of source code must retain the above
@@ -23,16 +23,16 @@ following conditions are met:
   derived from this software without specific prior
   derived from this software without specific prior
   written permission of the assimp team.
   written permission of the assimp team.
 
 
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+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
 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 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 
+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.
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
@@ -158,11 +158,11 @@ MeshGeometry::MeshGeometry(uint64_t id, const Element& element, const std::strin
 		const int absi = index < 0 ? (-index - 1) : index;
 		const int absi = index < 0 ? (-index - 1) : index;
 		mappings[mapping_offsets[absi] + mapping_counts[absi]++] = cursor++;
 		mappings[mapping_offsets[absi] + mapping_counts[absi]++] = cursor++;
 	}
 	}
-	
+
 	// if settings.readAllLayers is true:
 	// if settings.readAllLayers is true:
 	//  * read all layers, try to load as many vertex channels as possible
 	//  * read all layers, try to load as many vertex channels as possible
 	// if settings.readAllLayers is false:
 	// if settings.readAllLayers is false:
-	//  * read only the layer with index 0, but warn about any further layers 
+	//  * read only the layer with index 0, but warn about any further layers
 	for (ElementMap::const_iterator it = Layer.first; it != Layer.second; ++it) {
 	for (ElementMap::const_iterator it = Layer.first; it != Layer.second; ++it) {
 		const TokenList& tokens = (*it).second->Tokens();
 		const TokenList& tokens = (*it).second->Tokens();
 
 
@@ -223,7 +223,7 @@ void MeshGeometry::ReadLayerElement(const Scope& layerElement)
 		}
 		}
 	}
 	}
 
 
-	FBXImporter::LogError(Formatter::format("failed to resolve vertex layer element: ") 
+	FBXImporter::LogError(Formatter::format("failed to resolve vertex layer element: ")
 		<< type << ", index: " << typedIndex);
 		<< type << ", index: " << typedIndex);
 }
 }
 
 
@@ -238,10 +238,10 @@ void MeshGeometry::ReadVertexData(const std::string& type, int index, const Scop
 	const std::string& ReferenceInformationType = ParseTokenAsString(GetRequiredToken(
 	const std::string& ReferenceInformationType = ParseTokenAsString(GetRequiredToken(
 		GetRequiredElement(source,"ReferenceInformationType"),0)
 		GetRequiredElement(source,"ReferenceInformationType"),0)
 	);
 	);
-	
+
 	if (type == "LayerElementUV") {
 	if (type == "LayerElementUV") {
 		if(index >= AI_MAX_NUMBER_OF_TEXTURECOORDS) {
 		if(index >= AI_MAX_NUMBER_OF_TEXTURECOORDS) {
-			FBXImporter::LogError(Formatter::format("ignoring UV layer, maximum number of UV channels exceeded: ") 
+			FBXImporter::LogError(Formatter::format("ignoring UV layer, maximum number of UV channels exceeded: ")
 				<< index << " (limit is " << AI_MAX_NUMBER_OF_TEXTURECOORDS << ")" );
 				<< index << " (limit is " << AI_MAX_NUMBER_OF_TEXTURECOORDS << ")" );
 			return;
 			return;
 		}
 		}
@@ -319,7 +319,7 @@ void MeshGeometry::ReadVertexData(const std::string& type, int index, const Scop
 	}
 	}
 	else if (type == "LayerElementColor") {
 	else if (type == "LayerElementColor") {
 		if(index >= AI_MAX_NUMBER_OF_COLOR_SETS) {
 		if(index >= AI_MAX_NUMBER_OF_COLOR_SETS) {
-			FBXImporter::LogError(Formatter::format("ignoring vertex color layer, maximum number of color sets exceeded: ") 
+			FBXImporter::LogError(Formatter::format("ignoring vertex color layer, maximum number of color sets exceeded: ")
 				<< index << " (limit is " << AI_MAX_NUMBER_OF_COLOR_SETS << ")" );
 				<< index << " (limit is " << AI_MAX_NUMBER_OF_COLOR_SETS << ")" );
 			return;
 			return;
 		}
 		}
@@ -337,7 +337,7 @@ void MeshGeometry::ReadVertexData(const std::string& type, int index, const Scop
 // output is in polygon vertex order. This logic is used for reading normals, UVs, colors,
 // output is in polygon vertex order. This logic is used for reading normals, UVs, colors,
 // tangents ..
 // tangents ..
 template <typename T>
 template <typename T>
-void ResolveVertexDataArray(std::vector<T>& data_out, const Scope& source, 
+void ResolveVertexDataArray(std::vector<T>& data_out, const Scope& source,
 	const std::string& MappingInformationType,
 	const std::string& MappingInformationType,
 	const std::string& ReferenceInformationType,
 	const std::string& ReferenceInformationType,
 	const char* dataElementName,
 	const char* dataElementName,
@@ -353,7 +353,7 @@ void ResolveVertexDataArray(std::vector<T>& data_out, const Scope& source,
 	// handle permutations of Mapping and Reference type - it would be nice to
 	// handle permutations of Mapping and Reference type - it would be nice to
 	// deal with this more elegantly and with less redundancy, but right
 	// deal with this more elegantly and with less redundancy, but right
 	// now it seems unavoidable.
 	// now it seems unavoidable.
-	if (MappingInformationType == "ByVertice" && ReferenceInformationType == "Direct") {	
+	if (MappingInformationType == "ByVertice" && ReferenceInformationType == "Direct") {
 		data_out.resize(vertex_count);
 		data_out.resize(vertex_count);
 		for (size_t i = 0, e = tempUV.size(); i < e; ++i) {
 		for (size_t i = 0, e = tempUV.size(); i < e; ++i) {
 
 
@@ -363,7 +363,7 @@ void ResolveVertexDataArray(std::vector<T>& data_out, const Scope& source,
 			}
 			}
 		}
 		}
 	}
 	}
-	else if (MappingInformationType == "ByVertice" && ReferenceInformationType == "IndexToDirect") {	
+	else if (MappingInformationType == "ByVertice" && ReferenceInformationType == "IndexToDirect") {
 		data_out.resize(vertex_count);
 		data_out.resize(vertex_count);
 
 
 		std::vector<int> uvIndices;
 		std::vector<int> uvIndices;
@@ -380,9 +380,9 @@ void ResolveVertexDataArray(std::vector<T>& data_out, const Scope& source,
 			}
 			}
 		}
 		}
 	}
 	}
-	else if (MappingInformationType == "ByPolygonVertex" && ReferenceInformationType == "Direct") {	
+	else if (MappingInformationType == "ByPolygonVertex" && ReferenceInformationType == "Direct") {
 		if (tempUV.size() != vertex_count) {
 		if (tempUV.size() != vertex_count) {
-			FBXImporter::LogError(Formatter::format("length of input data unexpected for ByPolygon mapping: ") 
+			FBXImporter::LogError(Formatter::format("length of input data unexpected for ByPolygon mapping: ")
 				<< tempUV.size() << ", expected " << vertex_count
 				<< tempUV.size() << ", expected " << vertex_count
 			);
 			);
 			return;
 			return;
@@ -390,7 +390,7 @@ void ResolveVertexDataArray(std::vector<T>& data_out, const Scope& source,
 
 
 		data_out.swap(tempUV);
 		data_out.swap(tempUV);
 	}
 	}
-	else if (MappingInformationType == "ByPolygonVertex" && ReferenceInformationType == "IndexToDirect") {	
+	else if (MappingInformationType == "ByPolygonVertex" && ReferenceInformationType == "IndexToDirect") {
 		data_out.resize(vertex_count);
 		data_out.resize(vertex_count);
 
 
 		std::vector<int> uvIndices;
 		std::vector<int> uvIndices;
@@ -411,13 +411,13 @@ void ResolveVertexDataArray(std::vector<T>& data_out, const Scope& source,
 		}
 		}
 	}
 	}
 	else {
 	else {
-		FBXImporter::LogError(Formatter::format("ignoring vertex data channel, access type not implemented: ") 
+		FBXImporter::LogError(Formatter::format("ignoring vertex data channel, access type not implemented: ")
 			<< MappingInformationType << "," << ReferenceInformationType);
 			<< MappingInformationType << "," << ReferenceInformationType);
 	}
 	}
 }
 }
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-void MeshGeometry::ReadVertexDataNormals(std::vector<aiVector3D>& normals_out, const Scope& source, 
+void MeshGeometry::ReadVertexDataNormals(std::vector<aiVector3D>& normals_out, const Scope& source,
 	const std::string& MappingInformationType,
 	const std::string& MappingInformationType,
 	const std::string& ReferenceInformationType)
 	const std::string& ReferenceInformationType)
 {
 {
@@ -432,7 +432,7 @@ void MeshGeometry::ReadVertexDataNormals(std::vector<aiVector3D>& normals_out, c
 
 
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-void MeshGeometry::ReadVertexDataUV(std::vector<aiVector2D>& uv_out, const Scope& source, 
+void MeshGeometry::ReadVertexDataUV(std::vector<aiVector2D>& uv_out, const Scope& source,
 	const std::string& MappingInformationType,
 	const std::string& MappingInformationType,
 	const std::string& ReferenceInformationType)
 	const std::string& ReferenceInformationType)
 {
 {
@@ -447,7 +447,7 @@ void MeshGeometry::ReadVertexDataUV(std::vector<aiVector2D>& uv_out, const Scope
 
 
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-void MeshGeometry::ReadVertexDataColors(std::vector<aiColor4D>& colors_out, const Scope& source, 
+void MeshGeometry::ReadVertexDataColors(std::vector<aiColor4D>& colors_out, const Scope& source,
 	const std::string& MappingInformationType,
 	const std::string& MappingInformationType,
 	const std::string& ReferenceInformationType)
 	const std::string& ReferenceInformationType)
 {
 {
@@ -462,7 +462,7 @@ void MeshGeometry::ReadVertexDataColors(std::vector<aiColor4D>& colors_out, cons
 
 
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-void MeshGeometry::ReadVertexDataTangents(std::vector<aiVector3D>& tangents_out, const Scope& source, 
+void MeshGeometry::ReadVertexDataTangents(std::vector<aiVector3D>& tangents_out, const Scope& source,
 	const std::string& MappingInformationType,
 	const std::string& MappingInformationType,
 	const std::string& ReferenceInformationType)
 	const std::string& ReferenceInformationType)
 {
 {
@@ -478,7 +478,7 @@ void MeshGeometry::ReadVertexDataTangents(std::vector<aiVector3D>& tangents_out,
 
 
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-void MeshGeometry::ReadVertexDataBinormals(std::vector<aiVector3D>& binormals_out, const Scope& source, 
+void MeshGeometry::ReadVertexDataBinormals(std::vector<aiVector3D>& binormals_out, const Scope& source,
 	const std::string& MappingInformationType,
 	const std::string& MappingInformationType,
 	const std::string& ReferenceInformationType)
 	const std::string& ReferenceInformationType)
 {
 {
@@ -494,7 +494,7 @@ void MeshGeometry::ReadVertexDataBinormals(std::vector<aiVector3D>& binormals_ou
 
 
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
-void MeshGeometry::ReadVertexDataMaterials(std::vector<int>& materials_out, const Scope& source, 
+void MeshGeometry::ReadVertexDataMaterials(std::vector<int>& materials_out, const Scope& source,
 	const std::string& MappingInformationType,
 	const std::string& MappingInformationType,
 	const std::string& ReferenceInformationType)
 	const std::string& ReferenceInformationType)
 {
 {
@@ -516,21 +516,21 @@ void MeshGeometry::ReadVertexDataMaterials(std::vector<int>& materials_out, cons
 			FBXImporter::LogWarn(Formatter::format("expected only a single material index, ignoring all except the first one"));
 			FBXImporter::LogWarn(Formatter::format("expected only a single material index, ignoring all except the first one"));
 			materials_out.clear();
 			materials_out.clear();
 		}
 		}
- 
+
 		materials.assign(vertices.size(),materials_out[0]);
 		materials.assign(vertices.size(),materials_out[0]);
 	}
 	}
 	else if (MappingInformationType == "ByPolygon" && ReferenceInformationType == "IndexToDirect") {
 	else if (MappingInformationType == "ByPolygon" && ReferenceInformationType == "IndexToDirect") {
 		materials.resize(face_count);
 		materials.resize(face_count);
 
 
 		if(materials_out.size() != face_count) {
 		if(materials_out.size() != face_count) {
-			FBXImporter::LogError(Formatter::format("length of input data unexpected for ByPolygon mapping: ") 
+			FBXImporter::LogError(Formatter::format("length of input data unexpected for ByPolygon mapping: ")
 				<< materials_out.size() << ", expected " << face_count
 				<< materials_out.size() << ", expected " << face_count
 			);
 			);
 			return;
 			return;
 		}
 		}
 	}
 	}
 	else {
 	else {
-		FBXImporter::LogError(Formatter::format("ignoring material assignments, access type not implemented: ") 
+		FBXImporter::LogError(Formatter::format("ignoring material assignments, access type not implemented: ")
 			<< MappingInformationType << "," << ReferenceInformationType);
 			<< MappingInformationType << "," << ReferenceInformationType);
 	}
 	}
 }
 }

+ 10 - 10
code/FBXModel.cpp

@@ -5,8 +5,8 @@ Open Asset Import Library (assimp)
 Copyright (c) 2006-2015, assimp team
 Copyright (c) 2006-2015, assimp team
 All rights reserved.
 All rights reserved.
 
 
-Redistribution and use of this software in source and binary forms, 
-with or without modification, are permitted provided that the 
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the
 following conditions are met:
 following conditions are met:
 
 
 * Redistributions of source code must retain the above
 * Redistributions of source code must retain the above
@@ -23,16 +23,16 @@ following conditions are met:
   derived from this software without specific prior
   derived from this software without specific prior
   written permission of the assimp team.
   written permission of the assimp team.
 
 
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+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
 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 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 
+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.
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
@@ -139,7 +139,7 @@ bool Model::IsNull() const
 {
 {
 	const std::vector<const NodeAttribute*>& attrs = GetAttributes();
 	const std::vector<const NodeAttribute*>& attrs = GetAttributes();
 	BOOST_FOREACH(const NodeAttribute* att, attrs) {
 	BOOST_FOREACH(const NodeAttribute* att, attrs) {
-		
+
 		const Null* null_tag = dynamic_cast<const Null*>(att);
 		const Null* null_tag = dynamic_cast<const Null*>(att);
 		if(null_tag) {
 		if(null_tag) {
 			return true;
 			return true;

+ 9 - 9
code/FBXNodeAttribute.cpp

@@ -5,8 +5,8 @@ Open Asset Import Library (assimp)
 Copyright (c) 2006-2015, assimp team
 Copyright (c) 2006-2015, assimp team
 All rights reserved.
 All rights reserved.
 
 
-Redistribution and use of this software in source and binary forms, 
-with or without modification, are permitted provided that the 
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the
 following conditions are met:
 following conditions are met:
 
 
 * Redistributions of source code must retain the above
 * Redistributions of source code must retain the above
@@ -23,16 +23,16 @@ following conditions are met:
   derived from this software without specific prior
   derived from this software without specific prior
   written permission of the assimp team.
   written permission of the assimp team.
 
 
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+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
 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 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 
+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.
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------

+ 14 - 14
code/FBXParser.h

@@ -5,8 +5,8 @@ Open Asset Import Library (assimp)
 Copyright (c) 2006-2015, assimp team
 Copyright (c) 2006-2015, assimp team
 All rights reserved.
 All rights reserved.
 
 
-Redistribution and use of this software in source and binary forms, 
-with or without modification, are permitted provided that the 
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the
 following conditions are met:
 following conditions are met:
 
 
 * Redistributions of source code must retain the above
 * Redistributions of source code must retain the above
@@ -23,16 +23,16 @@ following conditions are met:
   derived from this software without specific prior
   derived from this software without specific prior
   written permission of the assimp team.
   written permission of the assimp team.
 
 
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+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
 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 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 
+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.
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
@@ -122,7 +122,7 @@ private:
  *  @verbatim
  *  @verbatim
  *    GlobalSettings:  {
  *    GlobalSettings:  {
  *        Version: 1000
  *        Version: 1000
- *        Properties70: 
+ *        Properties70:
  *        [...]
  *        [...]
  *    }
  *    }
  *  @endverbatim  */
  *  @endverbatim  */
@@ -157,10 +157,10 @@ private:
 
 
 /** FBX parsing class, takes a list of input tokens and generates a hierarchy
 /** FBX parsing class, takes a list of input tokens and generates a hierarchy
  *  of nested #Scope instances, representing the fbx DOM.*/
  *  of nested #Scope instances, representing the fbx DOM.*/
-class Parser 
+class Parser
 {
 {
 public:
 public:
-	
+
 	/** Parse given a token list. Does not take ownership of the tokens -
 	/** Parse given a token list. Does not take ownership of the tokens -
 	 *  the objects must persist during the entire parser lifetime */
 	 *  the objects must persist during the entire parser lifetime */
 	Parser (const TokenList& tokens,bool is_binary);
 	Parser (const TokenList& tokens,bool is_binary);
@@ -187,12 +187,12 @@ private:
 	TokenPtr LastToken() const;
 	TokenPtr LastToken() const;
 	TokenPtr CurrentToken() const;
 	TokenPtr CurrentToken() const;
 
 
-	
+
 
 
 private:
 private:
 
 
 	const TokenList& tokens;
 	const TokenList& tokens;
-	
+
 	TokenPtr last, current;
 	TokenPtr last, current;
 	TokenList::const_iterator cursor;
 	TokenList::const_iterator cursor;
 	boost::scoped_ptr<Scope> root;
 	boost::scoped_ptr<Scope> root;

+ 17 - 17
code/FBXProperties.cpp

@@ -5,8 +5,8 @@ Open Asset Import Library (assimp)
 Copyright (c) 2006-2015, assimp team
 Copyright (c) 2006-2015, assimp team
 All rights reserved.
 All rights reserved.
 
 
-Redistribution and use of this software in source and binary forms, 
-with or without modification, are permitted provided that the 
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the
 following conditions are met:
 following conditions are met:
 
 
 * Redistributions of source code must retain the above
 * Redistributions of source code must retain the above
@@ -23,16 +23,16 @@ following conditions are met:
   derived from this software without specific prior
   derived from this software without specific prior
   written permission of the assimp team.
   written permission of the assimp team.
 
 
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+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
 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 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 
+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.
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
@@ -94,12 +94,12 @@ Property* ReadTypedProperty(const Element& element)
 	else if (!strcmp(cs, "KTime")) {
 	else if (!strcmp(cs, "KTime")) {
 		return new TypedProperty<int64_t>(ParseTokenAsInt64(*tok[4]));
 		return new TypedProperty<int64_t>(ParseTokenAsInt64(*tok[4]));
 	}
 	}
-	else if (!strcmp(cs,"Vector3D") || 
-		!strcmp(cs,"ColorRGB") || 
-		!strcmp(cs,"Vector") || 
-		!strcmp(cs,"Color") || 
-		!strcmp(cs,"Lcl Translation") || 
-		!strcmp(cs,"Lcl Rotation") || 
+	else if (!strcmp(cs,"Vector3D") ||
+		!strcmp(cs,"ColorRGB") ||
+		!strcmp(cs,"Vector") ||
+		!strcmp(cs,"Color") ||
+		!strcmp(cs,"Lcl Translation") ||
+		!strcmp(cs,"Lcl Rotation") ||
 		!strcmp(cs,"Lcl Scaling")
 		!strcmp(cs,"Lcl Scaling")
 		) {
 		) {
 		return new TypedProperty<aiVector3D>(aiVector3D(
 		return new TypedProperty<aiVector3D>(aiVector3D(
@@ -200,7 +200,7 @@ const Property* PropertyTable::Get(const std::string& name) const
 			return NULL;
 			return NULL;
 		}
 		}
 	}
 	}
-	
+
 	return (*it).second;
 	return (*it).second;
 }
 }
 
 
@@ -218,7 +218,7 @@ DirectPropertyMap PropertyTable::GetUnparsedProperties() const
 		// Wrap the naked pointer (since the call site is required to acquire ownership)
 		// Wrap the naked pointer (since the call site is required to acquire ownership)
 		// std::unique_ptr from C++11 would be preferred both as a wrapper and a return value.
 		// std::unique_ptr from C++11 would be preferred both as a wrapper and a return value.
 		boost::shared_ptr<Property> prop = boost::shared_ptr<Property>(ReadTypedProperty(*element.second));
 		boost::shared_ptr<Property> prop = boost::shared_ptr<Property>(ReadTypedProperty(*element.second));
-			
+
 		// Element could not be read. Skip it.
 		// Element could not be read. Skip it.
 		if (!prop) continue;
 		if (!prop) continue;
 
 

+ 16 - 16
code/FBXProperties.h

@@ -5,8 +5,8 @@ Open Asset Import Library (assimp)
 Copyright (c) 2006-2015, assimp team
 Copyright (c) 2006-2015, assimp team
 All rights reserved.
 All rights reserved.
 
 
-Redistribution and use of this software in source and binary forms, 
-with or without modification, are permitted provided that the 
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the
 following conditions are met:
 following conditions are met:
 
 
 * Redistributions of source code must retain the above
 * Redistributions of source code must retain the above
@@ -23,23 +23,23 @@ following conditions are met:
   derived from this software without specific prior
   derived from this software without specific prior
   written permission of the assimp team.
   written permission of the assimp team.
 
 
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+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
 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 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 
+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.
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
 */
 */
 
 
 /** @file  FBXProperties.h
 /** @file  FBXProperties.h
- *  @brief FBX dynamic properties 
+ *  @brief FBX dynamic properties
  */
  */
 #ifndef INCLUDED_AI_FBX_PROPERTIES_H
 #ifndef INCLUDED_AI_FBX_PROPERTIES_H
 #define INCLUDED_AI_FBX_PROPERTIES_H
 #define INCLUDED_AI_FBX_PROPERTIES_H
@@ -87,7 +87,7 @@ class TypedProperty : public Property
 {
 {
 public:
 public:
 
 
-	TypedProperty(const T& value) 
+	TypedProperty(const T& value)
 		: value(value)
 		: value(value)
 	{
 	{
 	}
 	}
@@ -114,7 +114,7 @@ public:
 
 
 	// in-memory property table with no source element
 	// in-memory property table with no source element
 	PropertyTable();
 	PropertyTable();
-	
+
 	PropertyTable(const Element& element, boost::shared_ptr<const PropertyTable> templateProps);
 	PropertyTable(const Element& element, boost::shared_ptr<const PropertyTable> templateProps);
 	~PropertyTable();
 	~PropertyTable();
 
 
@@ -144,7 +144,7 @@ private:
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
 template <typename T>
 template <typename T>
-inline T PropertyGet(const PropertyTable& in, const std::string& name, 
+inline T PropertyGet(const PropertyTable& in, const std::string& name,
 	const T& defaultValue)
 	const T& defaultValue)
 {
 {
 	const Property* const prop = in.Get(name);
 	const Property* const prop = in.Get(name);
@@ -152,7 +152,7 @@ inline T PropertyGet(const PropertyTable& in, const std::string& name,
 		return defaultValue;
 		return defaultValue;
 	}
 	}
 
 
-	// strong typing, no need to be lenient 
+	// strong typing, no need to be lenient
 	const TypedProperty<T>* const tprop = prop->As< TypedProperty<T> >();
 	const TypedProperty<T>* const tprop = prop->As< TypedProperty<T> >();
 	if(!tprop) {
 	if(!tprop) {
 		return defaultValue;
 		return defaultValue;
@@ -164,7 +164,7 @@ inline T PropertyGet(const PropertyTable& in, const std::string& name,
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
 template <typename T>
 template <typename T>
-inline T PropertyGet(const PropertyTable& in, const std::string& name, 
+inline T PropertyGet(const PropertyTable& in, const std::string& name,
 	bool& result)
 	bool& result)
 {
 {
 	const Property* const prop = in.Get(name);
 	const Property* const prop = in.Get(name);
@@ -173,7 +173,7 @@ inline T PropertyGet(const PropertyTable& in, const std::string& name,
 		return T();
 		return T();
 	}
 	}
 
 
-	// strong typing, no need to be lenient 
+	// strong typing, no need to be lenient
 	const TypedProperty<T>* const tprop = prop->As< TypedProperty<T> >();
 	const TypedProperty<T>* const tprop = prop->As< TypedProperty<T> >();
 	if(!tprop) {
 	if(!tprop) {
 		result = false;
 		result = false;

+ 15 - 15
code/FBXTokenizer.cpp

@@ -5,8 +5,8 @@ Open Asset Import Library (assimp)
 Copyright (c) 2006-2015, assimp team
 Copyright (c) 2006-2015, assimp team
 All rights reserved.
 All rights reserved.
 
 
-Redistribution and use of this software in source and binary forms, 
-with or without modification, are permitted provided that the 
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the
 following conditions are met:
 following conditions are met:
 
 
 * Redistributions of source code must retain the above
 * Redistributions of source code must retain the above
@@ -23,16 +23,16 @@ following conditions are met:
   derived from this software without specific prior
   derived from this software without specific prior
   written permission of the assimp team.
   written permission of the assimp team.
 
 
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+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
 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 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 
+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.
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
@@ -93,11 +93,11 @@ AI_WONT_RETURN void TokenizeError(const std::string& message, unsigned int line,
 }
 }
 
 
 
 
-// process a potential data token up to 'cur', adding it to 'output_tokens'. 
+// process a potential data token up to 'cur', adding it to 'output_tokens'.
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
 void ProcessDataToken( TokenList& output_tokens, const char*& start, const char*& end,
 void ProcessDataToken( TokenList& output_tokens, const char*& start, const char*& end,
-					  unsigned int line, 
-					  unsigned int column, 
+					  unsigned int line,
+					  unsigned int column,
 					  TokenType type = TokenType_DATA,
 					  TokenType type = TokenType_DATA,
 					  bool must_have_token = false)
 					  bool must_have_token = false)
 {
 {
@@ -143,7 +143,7 @@ void Tokenize(TokenList& output_tokens, const char* input)
 	bool comment = false;
 	bool comment = false;
 	bool in_double_quotes = false;
 	bool in_double_quotes = false;
 	bool pending_data_token = false;
 	bool pending_data_token = false;
-	
+
 	const char* token_begin = NULL, *token_end = NULL;
 	const char* token_begin = NULL, *token_end = NULL;
 	for (const char* cur = input;*cur;column += (*cur == '\t' ? ASSIMP_FBX_TAB_WIDTH : 1), ++cur) {
 	for (const char* cur = input;*cur;column += (*cur == '\t' ? ASSIMP_FBX_TAB_WIDTH : 1), ++cur) {
 		const char c = *cur;
 		const char c = *cur;
@@ -194,7 +194,7 @@ void Tokenize(TokenList& output_tokens, const char* input)
 			ProcessDataToken(output_tokens,token_begin,token_end,line,column);
 			ProcessDataToken(output_tokens,token_begin,token_end,line,column);
 			output_tokens.push_back(new_Token(cur,cur+1,TokenType_CLOSE_BRACKET,line,column));
 			output_tokens.push_back(new_Token(cur,cur+1,TokenType_CLOSE_BRACKET,line,column));
 			continue;
 			continue;
-		
+
 		case ',':
 		case ',':
 			if (pending_data_token) {
 			if (pending_data_token) {
 				ProcessDataToken(output_tokens,token_begin,token_end,line,column,TokenType_DATA,true);
 				ProcessDataToken(output_tokens,token_begin,token_end,line,column,TokenType_DATA,true);
@@ -211,7 +211,7 @@ void Tokenize(TokenList& output_tokens, const char* input)
 			}
 			}
 			continue;
 			continue;
 		}
 		}
-		
+
 		if (IsSpaceOrNewLine(c)) {
 		if (IsSpaceOrNewLine(c)) {
 
 
 			if (token_begin) {
 			if (token_begin) {

+ 11 - 11
code/FBXTokenizer.h

@@ -5,8 +5,8 @@ Open Asset Import Library (assimp)
 Copyright (c) 2006-2015, assimp team
 Copyright (c) 2006-2015, assimp team
 All rights reserved.
 All rights reserved.
 
 
-Redistribution and use of this software in source and binary forms, 
-with or without modification, are permitted provided that the 
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the
 following conditions are met:
 following conditions are met:
 
 
 * Redistributions of source code must retain the above
 * Redistributions of source code must retain the above
@@ -23,16 +23,16 @@ following conditions are met:
   derived from this software without specific prior
   derived from this software without specific prior
   written permission of the assimp team.
   written permission of the assimp team.
 
 
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+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
 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 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 
+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.
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
@@ -59,7 +59,7 @@ enum TokenType
 {
 {
 	// {
 	// {
 	TokenType_OPEN_BRACKET = 0,
 	TokenType_OPEN_BRACKET = 0,
-	
+
 	// }
 	// }
 	TokenType_CLOSE_BRACKET,
 	TokenType_CLOSE_BRACKET,
 
 
@@ -82,7 +82,7 @@ enum TokenType
  *  classified by the #TokenType enumerated types.
  *  classified by the #TokenType enumerated types.
  *
  *
  *  Offers iterator protocol. Tokens are immutable. */
  *  Offers iterator protocol. Tokens are immutable. */
-class Token 
+class Token
 {
 {
 
 
 private:
 private:

+ 12 - 12
code/FBXUtil.cpp

@@ -5,8 +5,8 @@ Open Asset Import Library (assimp)
 Copyright (c) 2006-2015, assimp team
 Copyright (c) 2006-2015, assimp team
 All rights reserved.
 All rights reserved.
 
 
-Redistribution and use of this software in source and binary forms, 
-with or without modification, are permitted provided that the 
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the
 following conditions are met:
 following conditions are met:
 
 
 * Redistributions of source code must retain the above
 * Redistributions of source code must retain the above
@@ -23,16 +23,16 @@ following conditions are met:
   derived from this software without specific prior
   derived from this software without specific prior
   written permission of the assimp team.
   written permission of the assimp team.
 
 
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+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
 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 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 
+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.
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
 ----------------------------------------------------------------------
 ----------------------------------------------------------------------
@@ -59,7 +59,7 @@ const char* TokenTypeString(TokenType t)
 	switch(t) {
 	switch(t) {
 		case TokenType_OPEN_BRACKET:
 		case TokenType_OPEN_BRACKET:
 			return "TOK_OPEN_BRACKET";
 			return "TOK_OPEN_BRACKET";
-	
+
 		case TokenType_CLOSE_BRACKET:
 		case TokenType_CLOSE_BRACKET:
 			return "TOK_CLOSE_BRACKET";
 			return "TOK_CLOSE_BRACKET";
 
 
@@ -79,7 +79,7 @@ const char* TokenTypeString(TokenType t)
 	ai_assert(false);
 	ai_assert(false);
 	return "";
 	return "";
 }
 }
-	
+
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
 std::string AddOffset(const std::string& prefix, const std::string& text, unsigned int offset)
 std::string AddOffset(const std::string& prefix, const std::string& text, unsigned int offset)
@@ -102,7 +102,7 @@ std::string AddTokenText(const std::string& prefix, const std::string& text, con
 			", offset 0x", std::hex, tok->Offset(),") ",
 			", offset 0x", std::hex, tok->Offset(),") ",
 			text) );
 			text) );
 	}
 	}
-	
+
 	return static_cast<std::string>( (Formatter::format(),prefix,
 	return static_cast<std::string>( (Formatter::format(),prefix,
 		" (",TokenTypeString(tok->Type()),
 		" (",TokenTypeString(tok->Type()),
 		", line ",tok->Line(),
 		", line ",tok->Line(),

Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác