summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergey Dubitskiy <sergey.dubitskiy@nokia.com>2012-01-18 15:23:41 +1000
committerDanny Pope <daniel.pope@nokia.com>2012-02-01 03:27:34 +0100
commit1b96161d4d766c4c32a8becbf8f1377777eeeb1e (patch)
treec5947e902340a8c80ca326347ff414d34b22260b
parent42f09ac510d4f6d6f5641c9e1dc6fc5d87fe9c9f (diff)
Upgrade to AssImp library v2.0.863.
Also includes a new example. Task-number: QTBUG-22194. Change-Id: I8870edadff58f8103e3645574b635a3b83ce1d98 Reviewed-by: Danny Pope <daniel.pope@nokia.com>
-rw-r--r--3rdparty/assimp/README148
-rw-r--r--3rdparty/assimp/code/3DSConverter.cpp29
-rw-r--r--3rdparty/assimp/code/3DSHelper.h84
-rw-r--r--3rdparty/assimp/code/3DSLoader.cpp105
-rw-r--r--3rdparty/assimp/code/3DSLoader.h2
-rw-r--r--3rdparty/assimp/code/ACLoader.cpp2
-rw-r--r--3rdparty/assimp/code/ACLoader.h38
-rw-r--r--3rdparty/assimp/code/ASELoader.cpp176
-rw-r--r--3rdparty/assimp/code/ASELoader.h2
-rw-r--r--3rdparty/assimp/code/ASEParser.cpp70
-rw-r--r--3rdparty/assimp/code/ASEParser.h38
-rw-r--r--3rdparty/assimp/code/Assimp.cpp34
-rw-r--r--3rdparty/assimp/code/AssimpPCH.cpp18
-rw-r--r--3rdparty/assimp/code/AssimpPCH.h12
-rw-r--r--3rdparty/assimp/code/B3DImporter.cpp8
-rw-r--r--3rdparty/assimp/code/B3DImporter.h2
-rw-r--r--3rdparty/assimp/code/BVHLoader.cpp4
-rw-r--r--3rdparty/assimp/code/BVHLoader.h2
-rw-r--r--3rdparty/assimp/code/BaseImporter.cpp42
-rw-r--r--3rdparty/assimp/code/BaseImporter.h6
-rw-r--r--3rdparty/assimp/code/BaseProcess.cpp4
-rw-r--r--3rdparty/assimp/code/BaseProcess.h12
-rw-r--r--3rdparty/assimp/code/BlenderDNA.cpp8
-rw-r--r--3rdparty/assimp/code/BlenderDNA.h58
-rw-r--r--3rdparty/assimp/code/BlenderDNA.inl2
-rw-r--r--3rdparty/assimp/code/BlenderIntermediate.h34
-rw-r--r--3rdparty/assimp/code/BlenderLoader.cpp90
-rw-r--r--3rdparty/assimp/code/BlenderLoader.h2
-rw-r--r--3rdparty/assimp/code/BlenderModifier.cpp4
-rw-r--r--3rdparty/assimp/code/BlenderModifier.h10
-rw-r--r--3rdparty/assimp/code/BlenderScene.cpp55
-rw-r--r--3rdparty/assimp/code/BlenderScene.h124
-rw-r--r--3rdparty/assimp/code/BlenderSceneGen.h2
-rw-r--r--3rdparty/assimp/code/BoostWorkaround/boost/LICENSE_1_0.txt1
-rw-r--r--3rdparty/assimp/code/BoostWorkaround/boost/foreach.hpp2
-rw-r--r--3rdparty/assimp/code/BoostWorkaround/boost/format.hpp2
-rw-r--r--3rdparty/assimp/code/BoostWorkaround/boost/math/common_factor_rt.hpp4
-rw-r--r--3rdparty/assimp/code/BoostWorkaround/boost/scoped_array.hpp2
-rw-r--r--3rdparty/assimp/code/BoostWorkaround/boost/scoped_ptr.hpp2
-rw-r--r--3rdparty/assimp/code/BoostWorkaround/boost/shared_array.hpp14
-rw-r--r--3rdparty/assimp/code/BoostWorkaround/boost/shared_ptr.hpp14
-rw-r--r--3rdparty/assimp/code/BoostWorkaround/boost/static_assert.hpp2
-rw-r--r--3rdparty/assimp/code/BoostWorkaround/boost/timer.hpp10
-rw-r--r--3rdparty/assimp/code/BoostWorkaround/boost/tuple/tuple.hpp38
-rw-r--r--3rdparty/assimp/code/ByteSwap.h66
-rw-r--r--3rdparty/assimp/code/COBLoader.cpp52
-rw-r--r--3rdparty/assimp/code/COBLoader.h2
-rw-r--r--3rdparty/assimp/code/COBScene.h22
-rw-r--r--3rdparty/assimp/code/CSMLoader.cpp36
-rw-r--r--3rdparty/assimp/code/CSMLoader.h2
-rw-r--r--3rdparty/assimp/code/ColladaHelper.h64
-rw-r--r--3rdparty/assimp/code/ColladaLoader.cpp119
-rw-r--r--3rdparty/assimp/code/ColladaLoader.h2
-rw-r--r--3rdparty/assimp/code/ColladaParser.cpp57
-rw-r--r--3rdparty/assimp/code/ComputeUVMappingProcess.cpp48
-rw-r--r--3rdparty/assimp/code/ComputeUVMappingProcess.h6
-rw-r--r--3rdparty/assimp/code/ConvertToLHProcess.cpp10
-rw-r--r--3rdparty/assimp/code/ConvertToLHProcess.h2
-rw-r--r--3rdparty/assimp/code/DXFLoader.cpp78
-rw-r--r--3rdparty/assimp/code/DXFLoader.h4
-rw-r--r--3rdparty/assimp/code/DefaultIOStream.h20
-rw-r--r--3rdparty/assimp/code/DefaultIOSystem.cpp4
-rw-r--r--3rdparty/assimp/code/DefaultIOSystem.h2
-rw-r--r--3rdparty/assimp/code/DefaultLogger.cpp56
-rw-r--r--3rdparty/assimp/code/DefaultProgressHandler.h6
-rw-r--r--3rdparty/assimp/code/Exceptional.h12
-rw-r--r--3rdparty/assimp/code/FileLogStream.h12
-rw-r--r--3rdparty/assimp/code/FileSystemFilter.h10
-rw-r--r--3rdparty/assimp/code/FindDegenerates.h2
-rw-r--r--3rdparty/assimp/code/FindInstancesProcess.cpp2
-rw-r--r--3rdparty/assimp/code/FindInstancesProcess.h2
-rw-r--r--3rdparty/assimp/code/FindInvalidDataProcess.cpp48
-rw-r--r--3rdparty/assimp/code/FindInvalidDataProcess.h2
-rw-r--r--3rdparty/assimp/code/GenFaceNormalsProcess.cpp12
-rw-r--r--3rdparty/assimp/code/GenVertexNormalsProcess.cpp18
-rw-r--r--3rdparty/assimp/code/GenericProperty.h8
-rw-r--r--3rdparty/assimp/code/HMPFileData.h52
-rw-r--r--3rdparty/assimp/code/HMPLoader.cpp8
-rw-r--r--3rdparty/assimp/code/HalfLifeFileData.h84
-rw-r--r--3rdparty/assimp/code/IFF.h4
-rw-r--r--3rdparty/assimp/code/IRRLoader.cpp262
-rw-r--r--3rdparty/assimp/code/IRRLoader.h38
-rw-r--r--3rdparty/assimp/code/IRRMeshLoader.cpp78
-rw-r--r--3rdparty/assimp/code/IRRMeshLoader.h2
-rw-r--r--3rdparty/assimp/code/IRRShared.cpp6
-rw-r--r--3rdparty/assimp/code/IRRShared.h42
-rw-r--r--3rdparty/assimp/code/Importer.cpp186
-rw-r--r--3rdparty/assimp/code/ImproveCacheLocality.cpp40
-rw-r--r--3rdparty/assimp/code/JoinVerticesProcess.cpp55
-rw-r--r--3rdparty/assimp/code/LWOAnimation.cpp6
-rw-r--r--3rdparty/assimp/code/LWOAnimation.h12
-rw-r--r--3rdparty/assimp/code/LWOBLoader.cpp10
-rw-r--r--3rdparty/assimp/code/LWOFileData.h164
-rw-r--r--3rdparty/assimp/code/LWOLoader.cpp170
-rw-r--r--3rdparty/assimp/code/LWOLoader.h2
-rw-r--r--3rdparty/assimp/code/LWOMaterial.cpp70
-rw-r--r--3rdparty/assimp/code/LWSLoader.cpp6
-rw-r--r--3rdparty/assimp/code/LWSLoader.h22
-rw-r--r--3rdparty/assimp/code/LimitBoneWeightsProcess.cpp10
-rw-r--r--3rdparty/assimp/code/LimitBoneWeightsProcess.h2
-rw-r--r--3rdparty/assimp/code/LineSplitter.h4
-rw-r--r--3rdparty/assimp/code/MD2FileData.h34
-rw-r--r--3rdparty/assimp/code/MD2Loader.cpp30
-rw-r--r--3rdparty/assimp/code/MD2Loader.h4
-rw-r--r--3rdparty/assimp/code/MD2NormalTable.h4
-rw-r--r--3rdparty/assimp/code/MD3FileData.h54
-rw-r--r--3rdparty/assimp/code/MD3Loader.cpp34
-rw-r--r--3rdparty/assimp/code/MD3Loader.h12
-rw-r--r--3rdparty/assimp/code/MD4FileData.h30
-rw-r--r--3rdparty/assimp/code/MD5Loader.cpp40
-rw-r--r--3rdparty/assimp/code/MD5Loader.h2
-rw-r--r--3rdparty/assimp/code/MD5Parser.cpp78
-rw-r--r--3rdparty/assimp/code/MD5Parser.h14
-rw-r--r--3rdparty/assimp/code/MDCFileData.h16
-rw-r--r--3rdparty/assimp/code/MDCLoader.cpp22
-rw-r--r--3rdparty/assimp/code/MDCLoader.h4
-rw-r--r--3rdparty/assimp/code/MDLFileData.h206
-rw-r--r--3rdparty/assimp/code/MDLLoader.cpp284
-rw-r--r--3rdparty/assimp/code/MDLLoader.h8
-rw-r--r--3rdparty/assimp/code/MS3DLoader.cpp7
-rw-r--r--3rdparty/assimp/code/MS3DLoader.h6
-rw-r--r--3rdparty/assimp/code/MakeVerboseFormat.cpp2
-rw-r--r--3rdparty/assimp/code/MakeVerboseFormat.h2
-rw-r--r--3rdparty/assimp/code/MaterialSystem.cpp52
-rw-r--r--3rdparty/assimp/code/MaterialSystem.h2
-rw-r--r--3rdparty/assimp/code/MemoryIOWrapper.h14
-rw-r--r--3rdparty/assimp/code/NDOLoader.cpp8
-rw-r--r--3rdparty/assimp/code/NDOLoader.h2
-rw-r--r--3rdparty/assimp/code/NFFLoader.cpp30
-rw-r--r--3rdparty/assimp/code/NFFLoader.h26
-rw-r--r--3rdparty/assimp/code/OFFLoader.h4
-rw-r--r--3rdparty/assimp/code/ObjFileData.h130
-rw-r--r--3rdparty/assimp/code/ObjFileImporter.cpp28
-rw-r--r--3rdparty/assimp/code/ObjFileImporter.h38
-rw-r--r--3rdparty/assimp/code/ObjFileMtlImporter.cpp34
-rw-r--r--3rdparty/assimp/code/ObjFileMtlImporter.h36
-rw-r--r--3rdparty/assimp/code/ObjFileParser.cpp43
-rw-r--r--3rdparty/assimp/code/ObjFileParser.h46
-rw-r--r--3rdparty/assimp/code/ObjTools.h82
-rw-r--r--3rdparty/assimp/code/OgreImporter.cpp25
-rw-r--r--3rdparty/assimp/code/OgreImporter.h51
-rw-r--r--3rdparty/assimp/code/OgreImporterMaterial.cpp4
-rw-r--r--3rdparty/assimp/code/OptimizeGraph.cpp6
-rw-r--r--3rdparty/assimp/code/OptimizeGraph.h2
-rw-r--r--3rdparty/assimp/code/OptimizeMeshes.h8
-rw-r--r--3rdparty/assimp/code/PlyLoader.cpp110
-rw-r--r--3rdparty/assimp/code/PlyLoader.h2
-rw-r--r--3rdparty/assimp/code/PlyParser.h12
-rw-r--r--3rdparty/assimp/code/PretransformVertices.cpp26
-rw-r--r--3rdparty/assimp/code/PretransformVertices.h2
-rw-r--r--3rdparty/assimp/code/ProcessHelper.h32
-rw-r--r--3rdparty/assimp/code/Q3BSPFileData.h70
-rw-r--r--3rdparty/assimp/code/Q3BSPFileImporter.cpp56
-rw-r--r--3rdparty/assimp/code/Q3BSPFileImporter.h10
-rw-r--r--3rdparty/assimp/code/Q3BSPZipArchive.cpp22
-rw-r--r--3rdparty/assimp/code/Q3BSPZipArchive.h22
-rw-r--r--3rdparty/assimp/code/Q3DLoader.cpp6
-rw-r--r--3rdparty/assimp/code/Q3DLoader.h16
-rw-r--r--3rdparty/assimp/code/RawLoader.cpp2
-rw-r--r--3rdparty/assimp/code/RawLoader.h2
-rw-r--r--3rdparty/assimp/code/RemoveComments.cpp10
-rw-r--r--3rdparty/assimp/code/RemoveComments.h2
-rw-r--r--3rdparty/assimp/code/RemoveRedundantMaterials.cpp10
-rw-r--r--3rdparty/assimp/code/RemoveRedundantMaterials.h2
-rw-r--r--3rdparty/assimp/code/RemoveVCProcess.cpp2
-rw-r--r--3rdparty/assimp/code/RemoveVCProcess.h2
-rw-r--r--3rdparty/assimp/code/SGSpatialSort.h10
-rw-r--r--3rdparty/assimp/code/SMDLoader.cpp78
-rw-r--r--3rdparty/assimp/code/SMDLoader.h4
-rw-r--r--3rdparty/assimp/code/STLLoader.cpp26
-rw-r--r--3rdparty/assimp/code/STLLoader.h2
-rw-r--r--3rdparty/assimp/code/SceneCombiner.cpp116
-rw-r--r--3rdparty/assimp/code/SceneCombiner.h36
-rw-r--r--3rdparty/assimp/code/ScenePreprocessor.cpp32
-rw-r--r--3rdparty/assimp/code/ScenePreprocessor.h8
-rw-r--r--3rdparty/assimp/code/SkeletonMeshBuilder.h2
-rw-r--r--3rdparty/assimp/code/SortByPTypeProcess.cpp7
-rw-r--r--3rdparty/assimp/code/SortByPTypeProcess.h2
-rw-r--r--3rdparty/assimp/code/SpatialSort.cpp101
-rw-r--r--3rdparty/assimp/code/SpatialSort.h2
-rw-r--r--3rdparty/assimp/code/SplitLargeMeshes.cpp12
-rw-r--r--3rdparty/assimp/code/SplitLargeMeshes.h4
-rw-r--r--3rdparty/assimp/code/StandardShapes.cpp8
-rw-r--r--3rdparty/assimp/code/StandardShapes.h4
-rw-r--r--3rdparty/assimp/code/StdOStreamLogStream.h22
-rw-r--r--3rdparty/assimp/code/StreamReader.h47
-rw-r--r--3rdparty/assimp/code/StringComparison.h10
-rw-r--r--3rdparty/assimp/code/Subdivision.cpp16
-rw-r--r--3rdparty/assimp/code/Subdivision.h4
-rw-r--r--3rdparty/assimp/code/TargetAnimation.cpp16
-rw-r--r--3rdparty/assimp/code/TargetAnimation.h10
-rw-r--r--3rdparty/assimp/code/TerragenLoader.cpp6
-rw-r--r--3rdparty/assimp/code/TerragenLoader.h2
-rw-r--r--3rdparty/assimp/code/TextureTransform.cpp66
-rw-r--r--3rdparty/assimp/code/TextureTransform.h24
-rw-r--r--3rdparty/assimp/code/TinyFormatter.h2
-rw-r--r--3rdparty/assimp/code/TriangulateProcess.cpp22
-rw-r--r--3rdparty/assimp/code/UnrealLoader.cpp74
-rw-r--r--3rdparty/assimp/code/UnrealLoader.h16
-rw-r--r--3rdparty/assimp/code/ValidateDataStructure.cpp94
-rw-r--r--3rdparty/assimp/code/ValidateDataStructure.h2
-rw-r--r--3rdparty/assimp/code/Vertex.h2
-rw-r--r--3rdparty/assimp/code/VertexTriangleAdjacency.cpp10
-rw-r--r--3rdparty/assimp/code/VertexTriangleAdjacency.h2
-rw-r--r--3rdparty/assimp/code/Win32DebugLogStream.h20
-rw-r--r--3rdparty/assimp/code/XFileImporter.h4
-rw-r--r--3rdparty/assimp/code/XFileParser.cpp16
-rw-r--r--3rdparty/assimp/code/aiAssert.cpp2
-rw-r--r--3rdparty/assimp/code/assbin_chunks.h74
-rw-r--r--3rdparty/assimp/code/fast_atof.h2
-rw-r--r--3rdparty/assimp/code/irrXMLWrapper.h8
-rw-r--r--3rdparty/assimp/code/makefile111
-rw-r--r--3rdparty/assimp/code/makefile.mingw105
-rw-r--r--3rdparty/assimp/code/res/assimp.rc80
-rw-r--r--3rdparty/assimp/code/res/resource.h2
-rw-r--r--3rdparty/assimp/contrib/ConvertUTF/ConvertUTF.c12
-rw-r--r--3rdparty/assimp/contrib/ConvertUTF/ConvertUTF.h16
-rw-r--r--3rdparty/assimp/contrib/irrXML/heapsort.h6
-rw-r--r--3rdparty/assimp/contrib/irrXML/irrArray.h4
-rw-r--r--3rdparty/assimp/contrib/irrXML/irrString.h22
-rw-r--r--3rdparty/assimp/contrib/irrXML/irrTypes.h20
-rw-r--r--3rdparty/assimp/contrib/unzip/crypt.h1
-rw-r--r--3rdparty/assimp/contrib/unzip/ioapi.c55
-rw-r--r--3rdparty/assimp/contrib/unzip/unzip.h10
-rw-r--r--3rdparty/assimp/include/Compiler/poppack1.h4
-rw-r--r--3rdparty/assimp/include/Compiler/pushpack1.h16
-rw-r--r--3rdparty/assimp/include/DefaultLogger.h42
-rw-r--r--3rdparty/assimp/include/IOStream.h12
-rw-r--r--3rdparty/assimp/include/IOSystem.h8
-rw-r--r--3rdparty/assimp/include/LogStream.h10
-rw-r--r--3rdparty/assimp/include/Logger.h74
-rw-r--r--3rdparty/assimp/include/NullLogger.h16
-rw-r--r--3rdparty/assimp/include/ProgressHandler.h8
-rw-r--r--3rdparty/assimp/include/aiAnim.h26
-rw-r--r--3rdparty/assimp/include/aiAssert.h16
-rw-r--r--3rdparty/assimp/include/aiCamera.h12
-rw-r--r--3rdparty/assimp/include/aiColor4D.inl26
-rw-r--r--3rdparty/assimp/include/aiConfig.h66
-rw-r--r--3rdparty/assimp/include/aiLight.h8
-rw-r--r--3rdparty/assimp/include/aiMaterial.h300
-rw-r--r--3rdparty/assimp/include/aiMaterial.inl36
-rw-r--r--3rdparty/assimp/include/aiMatrix3x3.h4
-rw-r--r--3rdparty/assimp/include/aiMatrix3x3.inl4
-rw-r--r--3rdparty/assimp/include/aiMatrix4x4.h4
-rw-r--r--3rdparty/assimp/include/aiMatrix4x4.inl14
-rw-r--r--3rdparty/assimp/include/aiMesh.h36
-rw-r--r--3rdparty/assimp/include/aiPostProcess.h22
-rw-r--r--3rdparty/assimp/include/aiScene.h8
-rw-r--r--3rdparty/assimp/include/aiTexture.h2
-rw-r--r--3rdparty/assimp/include/aiTypes.h22
-rw-r--r--3rdparty/assimp/include/aiVector2D.h2
-rw-r--r--3rdparty/assimp/include/aiVector3D.inl18
-rw-r--r--3rdparty/assimp/include/assimp.hpp14
-rw-r--r--3rdparty/assimp/revision.h2
-rw-r--r--examples/quick3d/animations/animations.pro19
-rw-r--r--examples/quick3d/animations/animations.qrc7
-rw-r--r--examples/quick3d/animations/animations_qml.desktop7
-rw-r--r--examples/quick3d/animations/animations_qml.rc1
-rw-r--r--examples/quick3d/animations/main.cpp66
-rw-r--r--examples/quick3d/animations/qml/animations.qml57
-rwxr-xr-xexamples/quick3d/animations/qml/cube_rotated.dae561
-rw-r--r--examples/quick3d/animations/qml/stonewal.jpgbin0 -> 19550 bytes
-rw-r--r--examples/quick3d/animations/qtquick3d.icobin0 -> 67646 bytes
-rw-r--r--examples/quick3d/animations/qtquick3d.pngbin0 -> 4050 bytes
-rw-r--r--examples/quick3d/quick3d.pro1
-rw-r--r--src/plugins/sceneformats/assimp/qaiscenehandler.cpp80
266 files changed, 4526 insertions, 3997 deletions
diff --git a/3rdparty/assimp/README b/3rdparty/assimp/README
index 67c0c3084..e5592ffbb 100644
--- a/3rdparty/assimp/README
+++ b/3rdparty/assimp/README
@@ -1,71 +1,79 @@
-ASSIMP - Open Asset Import Library
-==================================
-
-v1.1 (April 2010)
-
-http://assimp.sourceforge.net/lib_html/index.html
-
-
-ASSIMP is a library to load and process geometric scenes from various
-data formats. It is tailored at typical game scenarios by supporting a
-node hierarchy, static or skinned meshes, materials, bone animations and
-potential texture data. The library is *not* designed for speed, it is
-primarily useful for importing assets from various sources once and
-storing it in a engine-specific format for easy and fast
-every-day-loading. ASSIMP is also able to apply various post processing
-steps to the imported data such as conversion to indexed meshes,
-calculation of normals or tangents/bitangents or conversion from
-right-handed to left-handed coordinate systems.
-
-ASSIMP currently supports the following file formats (note that some
-loaders lack some features of their formats because some file formats
-contain data not supported by ASSIMP, some stuff would require so much
-conversion work that it has not been implemented yet and some (most ...)
-formats lack proper specifications):
-
-
-Collada ( *.dae;*.xml )
-Biovision BVH ( *.bvh )
-3D Studio Max 3DS ( *.3ds )
-3D Studio Max ASE ( *.ase )
-Wavefront Object ( *.obj )
-Stanford Polygon Library ( *.ply )
-AutoCAD DXF ( *.dxf ) 2
-Neutral File Format ( *.nff )
-Sense8 WorldToolkit ( *.nff )
-Valve Model ( *.smd,*.vta ) 3
-Quake I ( *.mdl )
-Quake II ( *.md2 )
-Quake III ( *.md3 )
-RtCW ( *.mdc )
-Doom 3 ( *.md5mesh;*.md5anim;*.md5camera )
-DirectX X ( *.x ).
-Quick3D ( *.q3o;*q3s ).
-Raw Triangles ( *.raw ).
-AC3D ( *.ac ).
-Stereolithography ( *.stl ).
-Autodesk DXF ( *.dxf ).
-Irrlicht Mesh ( *.irrmesh;*.xml ).
-Irrlicht Scene ( *.irr;*.xml ).
-Object File Format ( *.off ).
-Terragen Terrain ( *.ter )
-3D GameStudio Model ( *.mdl )
-3D GameStudio Terrain ( *.hmp )
-Ogre (*.mesh.xml, *.skeleton.xml, *.material)3
-Milkshape 3D ( *.ms3d )
-LightWave Model ( *.lwo )
-LightWave Scene ( *.lws )
-Modo Model ( *.lxo )
-CharacterStudio Motion ( *.csm )
-Stanford Ply ( *.ply )
-TrueSpace ( *.cob, *.scn )
-
-See the Importer Notes Page for informations, what a specific importer
-can do and what not. Note that although this paper claims to be the
-official documentation,
-http://assimp.sourceforge.net/main_features_formats.html
-is usually the most up-to-date list of file formats supported by the library.
-
-3: These formats support animations, but ASSIMP doesn't yet support them
-(or they're buggy)
+ Open Asset Import Library (Assimp) Readme
+ -----------------------------------------
+Here you can find information regarding Open Asset Import Library:
+
+ 1. Overview
+ 1.1 Supported file formats
+ 1.2 File structure
+ 2. Build the Asset Import Library
+ 3. Help
+ 4. License
+
+
+
+1. Overview
+1.1 Supported file formats
+
+The Asset Import Library provides a lot of model formats:
+ - 3DS
+ - ASE
+ - DXF
+ - HMP
+ - MD2
+ - MD3
+ - MD5
+ - MDC
+ - MDL
+ - NFF
+ - PLY
+ - STL
+ - X
+ - LWO
+ - OBJ
+ - SMD
+
+ - Collada
+
+ - LWO
+
+ - Ogre XML
+
+ - partly LWS
+
+ - .. + many more, see http://assimp.sourceforge.net/main_features_formats.html for a full list.
+
+
+1.2 Repository structure
+
+Open Asset Import Library is implemented in C++ and provides a C-interface. The directory structure is:
+
+ /bin Binaries of the Asset Import Library.
+ /code Code of the Asset Import Library.
+ /contrib Third-party-libraries used by the Asset Import Library.
+ /doc Documentation (doxygen generated and data structure as a xml file)
+ /include Public headers.
+ /lib Static library location for Windows.
+ /obj Object file location for Windows.
+ /port Ports to other languages.
+
+ /test Unit- and regression tests, model test suite.
+ /tools Tools (viewer, command line `assimp`).
+ /workspaces Build enviroments for vc,xcode,...
+
+
+
+2. Build the Asset Import Library
+
+Take a look into the INSTALL file.
+
+
+
+3. Help
+
+For more help go to http://assimp.sourceforge.net/ (or, for germans, http://www.zfx.info). Or take a look into the doc-folder, which contains the doxygen-generated documentation in HTMl format (CHMs for Windows are as well contained in some distributions and located right here in the root folder).
+
+
+4. License
+
+The license of the Asset Import Library is based on the BSD-License. It is contained in the LICENSE file.
diff --git a/3rdparty/assimp/code/3DSConverter.cpp b/3rdparty/assimp/code/3DSConverter.cpp
index f4bd56f18..351d0cca9 100644
--- a/3rdparty/assimp/code/3DSConverter.cpp
+++ b/3rdparty/assimp/code/3DSConverter.cpp
@@ -75,11 +75,11 @@ void Discreet3DSImporter::ReplaceDefaultMaterial()
mScene->mMaterials[i].mDiffuse.r !=
mScene->mMaterials[i].mDiffuse.b)continue;
- if (mScene->mMaterials[i].sTexDiffuse.mMapName.length() != 0 ||
- mScene->mMaterials[i].sTexBump.mMapName.length() != 0 ||
- mScene->mMaterials[i].sTexOpacity.mMapName.length() != 0 ||
- mScene->mMaterials[i].sTexEmissive.mMapName.length() != 0 ||
- mScene->mMaterials[i].sTexSpecular.mMapName.length() != 0 ||
+ if (mScene->mMaterials[i].sTexDiffuse.mMapName.length() != 0 ||
+ mScene->mMaterials[i].sTexBump.mMapName.length() != 0 ||
+ mScene->mMaterials[i].sTexOpacity.mMapName.length() != 0 ||
+ mScene->mMaterials[i].sTexEmissive.mMapName.length() != 0 ||
+ mScene->mMaterials[i].sTexSpecular.mMapName.length() != 0 ||
mScene->mMaterials[i].sTexShininess.mMapName.length() != 0 )
{
continue;
@@ -334,7 +334,7 @@ void Discreet3DSImporter::ConvertMaterial(D3DS::Material& oldMat,
CopyTexture(mat,oldMat.sTexReflective, aiTextureType_REFLECTION);
// Store the name of the material itself, too
- if ( oldMat.mName.length()) {
+ if ( oldMat.mName.length()) {
aiString tex;
tex.Set( oldMat.mName);
mat.AddProperty( &tex, AI_MATKEY_NAME);
@@ -352,7 +352,7 @@ void Discreet3DSImporter::ConvertMeshes(aiScene* pcOut)
aiString name;
// we need to split all meshes by their materials
- for (std::vector<D3DS::Mesh>::iterator i = mScene->mMeshes.begin(); i != mScene->mMeshes.end();++i) {
+ for (std::vector<D3DS::Mesh>::iterator i = mScene->mMeshes.begin(); i != mScene->mMeshes.end();++i) {
boost::scoped_array< std::vector<unsigned int> > aiSplit(new std::vector<unsigned int>[mScene->mMaterials.size()]);
name.length = ASSIMP_itoa10(name.data,num++);
@@ -366,7 +366,7 @@ void Discreet3DSImporter::ConvertMeshes(aiScene* pcOut)
// now generate submeshes
for (unsigned int p = 0; p < mScene->mMaterials.size();++p)
{
- if (aiSplit[p].empty()) {
+ if (aiSplit[p].empty()) {
continue;
}
aiMesh* meshOut = new aiMesh();
@@ -374,8 +374,8 @@ void Discreet3DSImporter::ConvertMeshes(aiScene* pcOut)
std::string name_parts((*i).mName);
name_parts.append("::");
name_parts.append(mScene->mMaterials.at(p).mName);
-
meshOut->mName.Set(name_parts);
+
meshOut->mPrimitiveTypes = aiPrimitiveType_TRIANGLE;
// be sure to setup the correct material index
@@ -438,7 +438,7 @@ void Discreet3DSImporter::ConvertMeshes(aiScene* pcOut)
// ------------------------------------------------------------------------------------------------
// Add a node to the scenegraph and setup its final transformation
void Discreet3DSImporter::AddNodeToGraph(aiScene* pcSOut,aiNode* pcOut,
- D3DS::Node* pcIn, aiMatrix4x4& /* absTrafo */)
+ D3DS::Node* pcIn, aiMatrix4x4& absTrafo)
{
std::vector<unsigned int> iArray;
iArray.reserve(3);
@@ -468,7 +468,7 @@ void Discreet3DSImporter::AddNodeToGraph(aiScene* pcSOut,aiNode* pcOut,
pcOut->mNumMeshes = (unsigned int)iArray.size();
pcOut->mMeshes = new unsigned int[iArray.size()];
- for (unsigned int i = 0;i < iArray.size();++i) {
+ for (unsigned int i = 0;i < iArray.size();++i) {
const unsigned int iIndex = iArray[i];
aiMesh* const mesh = pcSOut->mMeshes[iIndex];
@@ -496,7 +496,7 @@ void Discreet3DSImporter::AddNodeToGraph(aiScene* pcSOut,aiNode* pcOut,
// Handle pivot point
if (pivot.x || pivot.y || pivot.z)
{
- for (pvCurrent = mesh->mVertices;pvCurrent != pvEnd;++pvCurrent) {
+ for (pvCurrent = mesh->mVertices;pvCurrent != pvEnd;++pvCurrent) {
*pvCurrent -= pivot;
}
}
@@ -615,12 +615,12 @@ void Discreet3DSImporter::AddNodeToGraph(aiScene* pcSOut,aiNode* pcOut,
// Cameras or lights define their transformation in their parent node and in the
// corresponding light or camera chunks. However, we read and process the latter
// to to be able to return valid cameras/lights even if no scenegraph is given.
- for (unsigned int n = 0; n < pcSOut->mNumCameras;++n) {
+ for (unsigned int n = 0; n < pcSOut->mNumCameras;++n) {
if (pcSOut->mCameras[n]->mName == pcOut->mName) {
pcSOut->mCameras[n]->mLookAt = aiVector3D(0.f,0.f,1.f);
}
}
- for (unsigned int n = 0; n < pcSOut->mNumLights;++n) {
+ for (unsigned int n = 0; n < pcSOut->mNumLights;++n) {
if (pcSOut->mLights[n]->mName == pcOut->mName) {
pcSOut->mLights[n]->mDirection = aiVector3D(0.f,0.f,1.f);
}
@@ -741,7 +741,6 @@ void Discreet3DSImporter::GenerateNodeGraph(aiScene* pcOut)
// Build a name for the node
pcNode->mName.length = sprintf(pcNode->mName.data,"3DSMesh_%i",i);
- //fprintf(stderr, "XXXX created dummy node: %s\n", pcNode->mName.data);
}
// Build dummy nodes for all cameras
diff --git a/3rdparty/assimp/code/3DSHelper.h b/3rdparty/assimp/code/3DSHelper.h
index db37415fd..90da85c6e 100644
--- a/3rdparty/assimp/code/3DSHelper.h
+++ b/3rdparty/assimp/code/3DSHelper.h
@@ -47,8 +47,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "SpatialSort.h"
#include "SmoothingGroups.h"
-namespace Assimp {
-namespace D3DS {
+namespace Assimp {
+namespace D3DS {
#include "./../include/Compiler/pushpack1.h"
@@ -66,8 +66,8 @@ public:
//! data structure for a single chunk in a .3ds file
struct Chunk
{
- uint16_t Flag;
- uint32_t Size;
+ uint16_t Flag;
+ uint32_t Size;
} PACK_STRUCT;
@@ -112,16 +112,16 @@ public:
// ********************************************************************
// Basic chunks which can be found everywhere in the file
- CHUNK_VERSION = 0x0002,
- CHUNK_RGBF = 0x0010, // float4 R; float4 G; float4 B
- CHUNK_RGBB = 0x0011, // int1 R; int1 G; int B
+ CHUNK_VERSION = 0x0002,
+ CHUNK_RGBF = 0x0010, // float4 R; float4 G; float4 B
+ CHUNK_RGBB = 0x0011, // int1 R; int1 G; int B
// Linear color values (gamma = 2.2?)
- CHUNK_LINRGBF = 0x0013, // float4 R; float4 G; float4 B
- CHUNK_LINRGBB = 0x0012, // int1 R; int1 G; int B
+ CHUNK_LINRGBF = 0x0013, // float4 R; float4 G; float4 B
+ CHUNK_LINRGBB = 0x0012, // int1 R; int1 G; int B
- CHUNK_PERCENTW = 0x0030, // int2 percentage
- CHUNK_PERCENTF = 0x0031, // float4 percentage
+ CHUNK_PERCENTW = 0x0030, // int2 percentage
+ CHUNK_PERCENTF = 0x0031, // float4 percentage
// ********************************************************************
// Prj master chunk
@@ -209,7 +209,7 @@ public:
// followed by percentage chunk (?)
CHUNK_MAT_SELF_ILLUM = 0xA080,
- // Always followed by percentage chunk (?)
+ // Always followed by percentage chunk (?)
CHUNK_MAT_SELF_ILPCT = 0xA084,
// Always followed by percentage chunk
@@ -242,14 +242,14 @@ public:
// Scaling in U/V direction.
// (need to gen separate UV coordinate set
// and do this by hand)
- CHUNK_MAT_MAP_USCALE = 0xA354,
- CHUNK_MAT_MAP_VSCALE = 0xA356,
+ CHUNK_MAT_MAP_USCALE = 0xA354,
+ CHUNK_MAT_MAP_VSCALE = 0xA356,
// Translation in U/V direction.
// (need to gen separate UV coordinate set
// and do this by hand)
- CHUNK_MAT_MAP_UOFFSET = 0xA358,
- CHUNK_MAT_MAP_VOFFSET = 0xA35a,
+ CHUNK_MAT_MAP_UOFFSET = 0xA358,
+ CHUNK_MAT_MAP_VOFFSET = 0xA35a,
// UV-coordinates rotation around the z-axis
// Assumed to be in radians.
@@ -266,10 +266,10 @@ public:
// ********************************************************************
// Main keyframer chunk. Contains translation/rotation/scaling data
- CHUNK_KEYFRAMER = 0xB000,
+ CHUNK_KEYFRAMER = 0xB000,
// Supported sub chunks
- CHUNK_TRACKINFO = 0xB002,
+ CHUNK_TRACKINFO = 0xB002,
CHUNK_TRACKOBJNAME = 0xB010,
CHUNK_TRACKDUMMYOBJNAME = 0xB011,
CHUNK_TRACKPIVOT = 0xB013,
@@ -284,14 +284,14 @@ public:
CHUNK_TRACKMORPH = 0xB026,
CHUNK_TRACKHIDE = 0xB029,
CHUNK_OBJNUMBER = 0xB030,
- CHUNK_TRACKCAMERA = 0xB003,
- CHUNK_TRACKFOV = 0xB023,
- CHUNK_TRACKROLL = 0xB024,
- CHUNK_TRACKCAMTGT = 0xB004,
- CHUNK_TRACKLIGHT = 0xB005,
- CHUNK_TRACKLIGTGT = 0xB006,
- CHUNK_TRACKSPOTL = 0xB007,
- CHUNK_FRAMES = 0xB008,
+ CHUNK_TRACKCAMERA = 0xB003,
+ CHUNK_TRACKFOV = 0xB023,
+ CHUNK_TRACKROLL = 0xB024,
+ CHUNK_TRACKCAMTGT = 0xB004,
+ CHUNK_TRACKLIGHT = 0xB005,
+ CHUNK_TRACKLIGTGT = 0xB006,
+ CHUNK_TRACKSPOTL = 0xB007,
+ CHUNK_FRAMES = 0xB008,
// ********************************************************************
// light sub-chunks
@@ -320,13 +320,13 @@ struct Texture
{
//! Default constructor
Texture()
- : mOffsetU (0.0f)
- , mOffsetV (0.0f)
- , mScaleU (1.0f)
- , mScaleV (1.0f)
- , mRotation (0.0f)
- , mMapMode (aiTextureMapMode_Wrap)
- , iUVSrc (0)
+ : mOffsetU (0.0f)
+ , mOffsetV (0.0f)
+ , mScaleU (1.0f)
+ , mScaleV (1.0f)
+ , mRotation (0.0f)
+ , mMapMode (aiTextureMapMode_Wrap)
+ , iUVSrc (0)
{
mTextureBlend = get_qnan();
}
@@ -361,13 +361,13 @@ struct Material
//! Default constructor. Builds a default name for the material
Material()
:
- mDiffuse (0.6f,0.6f,0.6f), // FIX ... we won't want object to be black
- mSpecularExponent (0.0f),
- mShininessStrength (1.0f),
+ mDiffuse (0.6f,0.6f,0.6f), // FIX ... we won't want object to be black
+ mSpecularExponent (0.0f),
+ mShininessStrength (1.0f),
mShading(Discreet3DS::Gouraud),
- mTransparency (1.0f),
- mBumpHeight (1.0f),
- mTwoSided (false)
+ mTransparency (1.0f),
+ mBumpHeight (1.0f),
+ mTwoSided (false)
{
static int iCnt = 0;
@@ -451,7 +451,7 @@ struct Mesh : public MeshWithSmoothingGroups<D3DS::Face>
struct aiFloatKey
{
double mTime; ///< The time of this key
- float mValue; ///< The value of this key
+ float mValue; ///< The value of this key
#ifdef __cplusplus
@@ -479,8 +479,8 @@ struct Node
{
Node()
- : mHierarchyPos (0)
- , mHierarchyIndex (0)
+ : mHierarchyPos (0)
+ , mHierarchyIndex (0)
{
static int iCnt = 0;
diff --git a/3rdparty/assimp/code/3DSLoader.cpp b/3rdparty/assimp/code/3DSLoader.cpp
index eb69bd5db..169256b2c 100644
--- a/3rdparty/assimp/code/3DSLoader.cpp
+++ b/3rdparty/assimp/code/3DSLoader.cpp
@@ -64,7 +64,7 @@ using namespace Assimp;
} \
Discreet3DS::Chunk chunk; \
ReadChunk(&chunk); \
- int chunkSize = chunk.Size-sizeof(Discreet3DS::Chunk); \
+ int chunkSize = chunk.Size-sizeof(Discreet3DS::Chunk); \
const int oldReadLimit = stream->GetReadLimit(); \
stream->SetReadLimit(stream->GetCurrentPos() + chunkSize); \
@@ -117,7 +117,7 @@ void Discreet3DSImporter::GetExtensionList(std::set<std::string>& extensions)
// ------------------------------------------------------------------------------------------------
// Setup configuration properties
-void Discreet3DSImporter::SetupProperties(const Importer* /* pImp */)
+void Discreet3DSImporter::SetupProperties(const Importer* pImp)
{
// nothing to be done for the moment
}
@@ -159,7 +159,7 @@ void Discreet3DSImporter::InternReadFile( const std::string& pFile,
// vectors from the smoothing groups we read from the
// file.
for (std::vector<D3DS::Mesh>::iterator i = mScene->mMeshes.begin(),
- end = mScene->mMeshes.end(); i != end;++i) {
+ end = mScene->mMeshes.end(); i != end;++i) {
CheckIndices(*i);
MakeUnique (*i);
ComputeNormalsWithSmoothingsGroups<D3DS::Face>(*i);
@@ -353,8 +353,6 @@ void Discreet3DSImporter::ParseObjectChunk()
ASSIMP_3DS_END_CHUNK();
}
-#include <QtCore/qstring.h>
-
// ------------------------------------------------------------------------------------------------
void Discreet3DSImporter::ParseChunk(const char* name, unsigned int num)
{
@@ -553,12 +551,12 @@ void Discreet3DSImporter::ParseKeyframeChunk()
// Little helper function for ParseHierarchyChunk
void Discreet3DSImporter::InverseNodeSearch(D3DS::Node* pcNode,D3DS::Node* pcCurrent)
{
- if (!pcCurrent) {
+ if (!pcCurrent) {
mRootNode->push_back(pcNode);
return;
}
- if (pcCurrent->mHierarchyPos == pcNode->mHierarchyPos) {
+ if (pcCurrent->mHierarchyPos == pcNode->mHierarchyPos) {
if (pcCurrent->mParent) {
pcCurrent->mParent->push_back(pcNode);
}
@@ -574,7 +572,7 @@ D3DS::Node* FindNode(D3DS::Node* root, const std::string& name)
{
if (root->mName == name)
return root;
- for (std::vector<D3DS::Node*>::iterator it = root->mChildren.begin();it != root->mChildren.end(); ++it) {
+ for (std::vector<D3DS::Node*>::iterator it = root->mChildren.begin();it != root->mChildren.end(); ++it) {
D3DS::Node* nd;
if (( nd = FindNode(*it,name)))
return nd;
@@ -596,7 +594,7 @@ void Discreet3DSImporter::SkipTCBInfo()
{
unsigned int flags = stream->GetI2();
- if (!flags) {
+ if (!flags) {
// Currently we can't do anything with these values. They occur
// quite rare, so it wouldn't be worth the effort implementing
// them. 3DS ist not really suitable for complex animations,
@@ -664,19 +662,19 @@ void Discreet3DSImporter::ParseHierarchyChunk(uint16_t parent)
pcNode->mHierarchyIndex = mLastNodeIndex;
// And find a proper position in the graph for it
- if (mCurrentNode && mCurrentNode->mHierarchyPos == hierarchy) {
+ if (mCurrentNode && mCurrentNode->mHierarchyPos == hierarchy) {
// add to the parent of the last touched node
mCurrentNode->mParent->push_back(pcNode);
mLastNodeIndex++;
}
- else if (hierarchy >= mLastNodeIndex) {
+ else if (hierarchy >= mLastNodeIndex) {
// place it at the current position in the hierarchy
mCurrentNode->push_back(pcNode);
mLastNodeIndex = hierarchy;
}
- else {
+ else {
// need to go back to the specified position in the hierarchy.
InverseNodeSearch(pcNode,mCurrentNode);
mLastNodeIndex++;
@@ -691,10 +689,10 @@ void Discreet3DSImporter::ParseHierarchyChunk(uint16_t parent)
// This is the "real" name of a $$$DUMMY object
{
const char* sz = (const char*) stream->GetPtr();
- while (stream->GetI1()) {};
+ while (stream->GetI1());
// If object name is DUMMY, take this one instead
- if (mCurrentNode->mName == "$$$DUMMY") {
+ if (mCurrentNode->mName == "$$$DUMMY") {
//DefaultLogger::get()->warn("3DS: Skipping dummy object name for non-dummy object");
mCurrentNode->mName = std::string(sz);
break;
@@ -728,13 +726,13 @@ void Discreet3DSImporter::ParseHierarchyChunk(uint16_t parent)
// This could also be meant as the target position for
// (targeted) lights and cameras
std::vector<aiVectorKey>* l;
- if ( Discreet3DS::CHUNK_TRACKCAMTGT == parent || Discreet3DS::CHUNK_TRACKLIGTGT == parent) {
+ if ( Discreet3DS::CHUNK_TRACKCAMTGT == parent || Discreet3DS::CHUNK_TRACKLIGTGT == parent) {
l = & mCurrentNode->aTargetPositionKeys;
}
else l = & mCurrentNode->aPositionKeys;
l->reserve(numFrames);
- for (unsigned int i = 0; i < numFrames;++i) {
+ for (unsigned int i = 0; i < numFrames;++i) {
const unsigned int fidx = stream->GetI4();
// Setup a new position key
@@ -755,7 +753,7 @@ void Discreet3DSImporter::ParseHierarchyChunk(uint16_t parent)
}
// Sort all keys with ascending time values and remove duplicates?
- if (sortKeys) {
+ if (sortKeys) {
std::stable_sort(l->begin(),l->end());
l->erase ( std::unique (l->begin(),l->end(),&KeyUniqueCompare<aiVectorKey>), l->end() );
}}
@@ -767,7 +765,7 @@ void Discreet3DSImporter::ParseHierarchyChunk(uint16_t parent)
case Discreet3DS::CHUNK_TRACKROLL:
{
// roll keys are accepted for cameras only
- if (parent != Discreet3DS::CHUNK_TRACKCAMERA) {
+ if (parent != Discreet3DS::CHUNK_TRACKCAMERA) {
DefaultLogger::get()->warn("3DS: Ignoring roll track for non-camera object");
break;
}
@@ -777,7 +775,7 @@ void Discreet3DSImporter::ParseHierarchyChunk(uint16_t parent)
stream->IncPtr(10);
const unsigned int numFrames = stream->GetI4();
l->reserve(numFrames);
- for (unsigned int i = 0; i < numFrames;++i) {
+ for (unsigned int i = 0; i < numFrames;++i) {
const unsigned int fidx = stream->GetI4();
// Setup a new position key
@@ -797,7 +795,7 @@ void Discreet3DSImporter::ParseHierarchyChunk(uint16_t parent)
}
// Sort all keys with ascending time values and remove duplicates?
- if (sortKeys) {
+ if (sortKeys) {
std::stable_sort(l->begin(),l->end());
l->erase ( std::unique (l->begin(),l->end(),&KeyUniqueCompare<aiFloatKey>), l->end() );
}}
@@ -825,7 +823,7 @@ void Discreet3DSImporter::ParseHierarchyChunk(uint16_t parent)
std::vector<aiQuatKey>* l = &mCurrentNode->aRotationKeys;
l->reserve(numFrames);
- for (unsigned int i = 0; i < numFrames;++i) {
+ for (unsigned int i = 0; i < numFrames;++i) {
const unsigned int fidx = stream->GetI4();
SkipTCBInfo();
@@ -853,7 +851,7 @@ void Discreet3DSImporter::ParseHierarchyChunk(uint16_t parent)
l->push_back(v);
}
// Sort all keys with ascending time values and remove duplicates?
- if (sortKeys) {
+ if (sortKeys) {
std::stable_sort(l->begin(),l->end());
l->erase ( std::unique (l->begin(),l->end(),&KeyUniqueCompare<aiQuatKey>), l->end() );
}}
@@ -871,7 +869,7 @@ void Discreet3DSImporter::ParseHierarchyChunk(uint16_t parent)
std::vector<aiVectorKey>* l = &mCurrentNode->aScalingKeys;
l->reserve(numFrames);
- for (unsigned int i = 0; i < numFrames;++i) {
+ for (unsigned int i = 0; i < numFrames;++i) {
const unsigned int fidx = stream->GetI4();
SkipTCBInfo();
@@ -896,7 +894,7 @@ void Discreet3DSImporter::ParseHierarchyChunk(uint16_t parent)
l->push_back(v);
}
// Sort all keys with ascending time values and remove duplicates?
- if (sortKeys) {
+ if (sortKeys) {
std::stable_sort(l->begin(),l->end());
l->erase ( std::unique (l->begin(),l->end(),&KeyUniqueCompare<aiVectorKey>), l->end() );
}}
@@ -923,7 +921,7 @@ void Discreet3DSImporter::ParseFaceChunk()
// This is the list of smoothing groups - a bitfield for every face.
// Up to 32 smoothing groups assigned to a single face.
unsigned int num = chunkSize/4, m = 0;
- for (std::vector<D3DS::Face>::iterator i = mMesh.mFaces.begin(); m != num;++i, ++m) {
+ for (std::vector<D3DS::Face>::iterator i = mMesh.mFaces.begin(); m != num;++i, ++m) {
// nth bit is set for nth smoothing group
(*i).iSmoothGroup = stream->GetI4();
}}
@@ -933,28 +931,28 @@ void Discreet3DSImporter::ParseFaceChunk()
{
// at fist an asciiz with the material name
const char* sz = (const char*)stream->GetPtr();
- while (stream->GetI1()) {};
+ while (stream->GetI1());
// find the index of the material
unsigned int idx = 0xcdcdcdcd, cnt = 0;
- for (std::vector<D3DS::Material>::const_iterator i = mScene->mMaterials.begin();i != mScene->mMaterials.end();++i,++cnt) {
+ for (std::vector<D3DS::Material>::const_iterator i = mScene->mMaterials.begin();i != mScene->mMaterials.end();++i,++cnt) {
// use case independent comparisons. hopefully it will work.
- if ((*i).mName.length() && !ASSIMP_stricmp(sz, (*i).mName.c_str())) {
+ if ((*i).mName.length() && !ASSIMP_stricmp(sz, (*i).mName.c_str())) {
idx = cnt;
break;
}
}
- if (0xcdcdcdcd == idx) {
+ if (0xcdcdcdcd == idx) {
DefaultLogger::get()->error(std::string("3DS: Unknown material: ") + sz);
}
// Now continue and read all material indices
cnt = (uint16_t)stream->GetI2();
- for (unsigned int i = 0; i < cnt;++i) {
+ for (unsigned int i = 0; i < cnt;++i) {
unsigned int fidx = (uint16_t)stream->GetI2();
// check range
- if (fidx >= mMesh.mFaceMaterials.size()) {
+ if (fidx >= mMesh.mFaceMaterials.size()) {
DefaultLogger::get()->error("3DS: Invalid face index in face material list");
}
else mMesh.mFaceMaterials[fidx] = idx;
@@ -977,20 +975,20 @@ void Discreet3DSImporter::ParseMeshChunk()
switch (chunk.Flag)
{
case Discreet3DS::CHUNK_VERTLIST:
- {
+ {
// This is the list of all vertices in the current mesh
int num = (int)(uint16_t)stream->GetI2();
mMesh.mPositions.reserve(num);
- while (num-- > 0) {
+ while (num-- > 0) {
aiVector3D v;
v.x = stream->GetF4();
v.y = stream->GetF4();
v.z = stream->GetF4();
mMesh.mPositions.push_back(v);
}}
- break;
+ break;
case Discreet3DS::CHUNK_TRMATRIX:
- {
+ {
// This is the RLEATIVE transformation matrix of the current mesh. Vertices are
// pretransformed by this matrix wonder.
mMesh.mMat.a1 = stream->GetF4();
@@ -1005,28 +1003,28 @@ void Discreet3DSImporter::ParseMeshChunk()
mMesh.mMat.a4 = stream->GetF4();
mMesh.mMat.b4 = stream->GetF4();
mMesh.mMat.c4 = stream->GetF4();
- }
- break;
+ }
+ break;
case Discreet3DS::CHUNK_MAPLIST:
- {
+ {
// This is the list of all UV coords in the current mesh
int num = (int)(uint16_t)stream->GetI2();
mMesh.mTexCoords.reserve(num);
- while (num-- > 0) {
+ while (num-- > 0) {
aiVector3D v;
v.x = stream->GetF4();
v.y = stream->GetF4();
mMesh.mTexCoords.push_back(v);
}}
- break;
+ break;
case Discreet3DS::CHUNK_FACELIST:
- {
+ {
// This is the list of all faces in the current mesh
int num = (int)(uint16_t)stream->GetI2();
mMesh.mFaces.reserve(num);
- while (num-- > 0) {
+ while (num-- > 0) {
// 3DS faces are ALWAYS triangles
mMesh.mFaces.push_back(D3DS::Face());
D3DS::Face& sFace = mMesh.mFaces.back();
@@ -1046,9 +1044,8 @@ void Discreet3DSImporter::ParseMeshChunk()
chunkSize = stream->GetRemainingSizeToLimit();
if ( chunkSize > (int) sizeof(Discreet3DS::Chunk ) )
ParseFaceChunk();
- }
-
- break;
+ }
+ break;
};
ASSIMP_3DS_END_CHUNK();
}
@@ -1069,7 +1066,7 @@ void Discreet3DSImporter::ParseMaterialChunk()
while (stream->GetI1())
++cnt;
- if (!cnt) {
+ if (!cnt) {
// This may not be, we use the default name instead
DefaultLogger::get()->error("3DS: Empty material name");
}
@@ -1082,7 +1079,7 @@ void Discreet3DSImporter::ParseMaterialChunk()
// This is the diffuse material color
aiColor3D* pc = &mScene->mMaterials.back().mDiffuse;
ParseColorChunk(pc);
- if (is_qnan(pc->r)) {
+ if (is_qnan(pc->r)) {
// color chunk is invalid. Simply ignore it
DefaultLogger::get()->error("3DS: Unable to read DIFFUSE chunk");
pc->r = pc->g = pc->b = 1.0f;
@@ -1094,7 +1091,7 @@ void Discreet3DSImporter::ParseMaterialChunk()
// This is the specular material color
aiColor3D* pc = &mScene->mMaterials.back().mSpecular;
ParseColorChunk(pc);
- if (is_qnan(pc->r)) {
+ if (is_qnan(pc->r)) {
// color chunk is invalid. Simply ignore it
DefaultLogger::get()->error("3DS: Unable to read SPECULAR chunk");
pc->r = pc->g = pc->b = 1.0f;
@@ -1106,7 +1103,7 @@ void Discreet3DSImporter::ParseMaterialChunk()
// This is the ambient material color
aiColor3D* pc = &mScene->mMaterials.back().mAmbient;
ParseColorChunk(pc);
- if (is_qnan(pc->r)) {
+ if (is_qnan(pc->r)) {
// color chunk is invalid. Simply ignore it
DefaultLogger::get()->error("3DS: Unable to read AMBIENT chunk");
pc->r = pc->g = pc->b = 0.0f;
@@ -1118,7 +1115,7 @@ void Discreet3DSImporter::ParseMaterialChunk()
// This is the emissive material color
aiColor3D* pc = &mScene->mMaterials.back().mEmissive;
ParseColorChunk(pc);
- if (is_qnan(pc->r)) {
+ if (is_qnan(pc->r)) {
// color chunk is invalid. Simply ignore it
DefaultLogger::get()->error("3DS: Unable to read EMISSIVE chunk");
pc->r = pc->g = pc->b = 0.0f;
@@ -1333,7 +1330,7 @@ void Discreet3DSImporter::ParseColorChunk(aiColor3D* out,
bGamma = true;
case Discreet3DS::CHUNK_RGBF:
- if (sizeof(float) * 3 > diff) {
+ if (sizeof(float) * 3 > diff) {
*out = clrError;
return;
}
@@ -1345,7 +1342,7 @@ void Discreet3DSImporter::ParseColorChunk(aiColor3D* out,
case Discreet3DS::CHUNK_LINRGBB:
bGamma = true;
case Discreet3DS::CHUNK_RGBB:
- if (sizeof(char) * 3 > diff) {
+ if (sizeof(char) * 3 > diff) {
*out = clrError;
return;
}
@@ -1356,7 +1353,7 @@ void Discreet3DSImporter::ParseColorChunk(aiColor3D* out,
// Percentage chunks are accepted, too.
case Discreet3DS::CHUNK_PERCENTF:
- if (acceptPercent && 4 <= diff) {
+ if (acceptPercent && 4 <= diff) {
out->g = out->b = out->r = stream->GetF4();
break;
}
@@ -1364,7 +1361,7 @@ void Discreet3DSImporter::ParseColorChunk(aiColor3D* out,
return;
case Discreet3DS::CHUNK_PERCENTW:
- if (acceptPercent && 1 <= diff) {
+ if (acceptPercent && 1 <= diff) {
out->g = out->b = out->r = (float)(uint8_t)stream->GetI1() / 255.0f;
break;
}
diff --git a/3rdparty/assimp/code/3DSLoader.h b/3rdparty/assimp/code/3DSLoader.h
index 3fd3aee3b..133a7c8ef 100644
--- a/3rdparty/assimp/code/3DSLoader.h
+++ b/3rdparty/assimp/code/3DSLoader.h
@@ -51,7 +51,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
struct aiNode;
#include "3DSHelper.h"
-namespace Assimp {
+namespace Assimp {
class MaterialHelper;
using namespace D3DS;
diff --git a/3rdparty/assimp/code/ACLoader.cpp b/3rdparty/assimp/code/ACLoader.cpp
index 318e2bfe8..c0fd31788 100644
--- a/3rdparty/assimp/code/ACLoader.cpp
+++ b/3rdparty/assimp/code/ACLoader.cpp
@@ -655,7 +655,7 @@ aiNode* AC3DImporter::ConvertObjectSection(Object& object,
// Now apply catmull clark subdivision if necessary. We split meshes into
// materials which is not done by AC3D during smoothing, so we need to
// collect all meshes using the same material group.
- if (object.subDiv) {
+ if (object.subDiv) {
if (configEvalSubdivision) {
boost::scoped_ptr<Subdivider> div(Subdivider::Create(Subdivider::CATMULL_CLARKE));
DefaultLogger::get()->info("AC3D: Evaluating subdivision surface: "+object.name);
diff --git a/3rdparty/assimp/code/ACLoader.h b/3rdparty/assimp/code/ACLoader.h
index 0f994710c..f11d6b4af 100644
--- a/3rdparty/assimp/code/ACLoader.h
+++ b/3rdparty/assimp/code/ACLoader.h
@@ -49,7 +49,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "BaseImporter.h"
#include "../include/aiTypes.h"
-namespace Assimp {
+namespace Assimp {
// ---------------------------------------------------------------------------
/** AC3D (*.ac) importer class
@@ -70,10 +70,10 @@ protected:
struct Material
{
Material()
- : rgb (0.6f,0.6f,0.6f)
- , spec (1.f,1.f,1.f)
- , shin (0.f)
- , trans (0.f)
+ : rgb (0.6f,0.6f,0.6f)
+ , spec (1.f,1.f,1.f)
+ , shin (0.f)
+ , trans (0.f)
{}
// base color of the material
@@ -102,8 +102,8 @@ protected:
struct Surface
{
Surface()
- : mat (0)
- , flags (0)
+ : mat (0)
+ , flags (0)
{}
unsigned int mat,flags;
@@ -116,18 +116,18 @@ protected:
struct Object
{
Object()
- : type (World)
- , name( "" )
- , children()
- , texture( "" )
- , texRepeat( 1.f, 1.f )
- , texOffset( 0.0f, 0.0f )
- , rotation()
- , translation()
- , vertices()
- , surfaces()
- , numRefs (0)
- , subDiv (0)
+ : type (World)
+ , name( "" )
+ , children()
+ , texture( "" )
+ , texRepeat( 1.f, 1.f )
+ , texOffset( 0.0f, 0.0f )
+ , rotation()
+ , translation()
+ , vertices()
+ , surfaces()
+ , numRefs (0)
+ , subDiv (0)
{}
// Type description
diff --git a/3rdparty/assimp/code/ASELoader.cpp b/3rdparty/assimp/code/ASELoader.cpp
index 6f63c8942..fc3df8b9d 100644
--- a/3rdparty/assimp/code/ASELoader.cpp
+++ b/3rdparty/assimp/code/ASELoader.cpp
@@ -127,7 +127,7 @@ void ASEImporter::InternReadFile( const std::string& pFile,
// ------------------------------------------------------------------
unsigned int defaultFormat;
std::string::size_type s = pFile.length()-1;
- switch (pFile.c_str()[s]) {
+ switch (pFile.c_str()[s]) {
case 'C':
case 'c':
@@ -146,7 +146,7 @@ void ASEImporter::InternReadFile( const std::string& pFile,
// Check whether we god at least one mesh. If we did - generate
// materials and copy meshes.
// ------------------------------------------------------------------
- if ( !mParser->m_vMeshes.empty()) {
+ if ( !mParser->m_vMeshes.empty()) {
// If absolutely no material has been loaded from the file
// we need to generate a default material
@@ -156,7 +156,7 @@ void ASEImporter::InternReadFile( const std::string& pFile,
bool tookNormals = false;
std::vector<aiMesh*> avOutMeshes;
avOutMeshes.reserve(mParser->m_vMeshes.size()*2);
- for (std::vector<ASE::Mesh>::iterator i = mParser->m_vMeshes.begin();i != mParser->m_vMeshes.end();++i) {
+ for (std::vector<ASE::Mesh>::iterator i = mParser->m_vMeshes.begin();i != mParser->m_vMeshes.end();++i) {
if ((*i).bSkip) {
continue;
}
@@ -170,7 +170,7 @@ void ASEImporter::InternReadFile( const std::string& pFile,
// Convert all meshes to aiMesh objects
ConvertMeshes(*i,avOutMeshes);
}
- if (tookNormals) {
+ if (tookNormals) {
DefaultLogger::get()->debug("ASE: Taking normals from the file. Use "
"the AI_CONFIG_IMPORT_ASE_RECONSTRUCT_NORMALS setting if you "
"experience problems");
@@ -230,7 +230,7 @@ void ASEImporter::InternReadFile( const std::string& pFile,
// to build a mesh for the animation skeleton
// FIXME: very strange results
// ------------------------------------------------------------------
- if (!pScene->mNumMeshes) {
+ if (!pScene->mNumMeshes) {
pScene->mFlags |= AI_SCENE_FLAGS_INCOMPLETE;
SkeletonMeshBuilder skeleton(pScene);
}
@@ -243,12 +243,12 @@ void ASEImporter::GenerateDefaultMaterial()
bool bHas = false;
for (std::vector<ASE::Mesh>::iterator i = mParser->m_vMeshes.begin();i != mParser->m_vMeshes.end();++i) {
if ((*i).bSkip)continue;
- if (ASE::Face::DEFAULT_MATINDEX == (*i).iMaterialIndex) {
+ if (ASE::Face::DEFAULT_MATINDEX == (*i).iMaterialIndex) {
(*i).iMaterialIndex = (unsigned int)mParser->m_vMaterials.size();
bHas = true;
}
}
- if (bHas || mParser->m_vMaterials.empty()) {
+ if (bHas || mParser->m_vMaterials.empty()) {
// add a simple material without submaterials to the parser's list
mParser->m_vMaterials.push_back ( ASE::Material() );
ASE::Material& mat = mParser->m_vMaterials.back();
@@ -267,18 +267,18 @@ void ASEImporter::BuildAnimations(const std::vector<BaseNode*>& nodes)
// check whether we have at least one mesh which has animations
std::vector<ASE::BaseNode*>::const_iterator i = nodes.begin();
unsigned int iNum = 0;
- for (;i != nodes.end();++i) {
+ for (;i != nodes.end();++i) {
// TODO: Implement Bezier & TCB support
- if ((*i)->mAnim.mPositionType != ASE::Animation::TRACK) {
+ if ((*i)->mAnim.mPositionType != ASE::Animation::TRACK) {
DefaultLogger::get()->warn("ASE: Position controller uses Bezier/TCB keys. "
"This is not supported.");
}
- if ((*i)->mAnim.mRotationType != ASE::Animation::TRACK) {
+ if ((*i)->mAnim.mRotationType != ASE::Animation::TRACK) {
DefaultLogger::get()->warn("ASE: Rotation controller uses Bezier/TCB keys. "
"This is not supported.");
}
- if ((*i)->mAnim.mScalingType != ASE::Animation::TRACK) {
+ if ((*i)->mAnim.mScalingType != ASE::Animation::TRACK) {
DefaultLogger::get()->warn("ASE: Position controller uses Bezier/TCB keys. "
"This is not supported.");
}
@@ -293,7 +293,7 @@ void ASEImporter::BuildAnimations(const std::vector<BaseNode*>& nodes)
++iNum;
}
}
- if (iNum) {
+ if (iNum) {
// Generate a new animation channel and setup everything for it
pcScene->mNumAnimations = 1;
pcScene->mAnimations = new aiAnimation*[1];
@@ -305,10 +305,10 @@ void ASEImporter::BuildAnimations(const std::vector<BaseNode*>& nodes)
iNum = 0;
// 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) {
ASE::BaseNode* me = *i;
- if ( me->mTargetAnim.akeyPositions.size() > 1 && is_not_qnan( me->mTargetPosition.x )) {
+ if ( me->mTargetAnim.akeyPositions.size() > 1 && is_not_qnan( me->mTargetPosition.x )) {
// Generate an extra channel for the camera/light target.
// BuildNodes() does also generate an extra node, named
// <baseName>.Target.
@@ -338,7 +338,7 @@ void ASEImporter::BuildAnimations(const std::vector<BaseNode*>& nodes)
nd->mNumPositionKeys * sizeof(aiVectorKey));
}
- if (me->mAnim.akeyPositions.size() > 1 || me->mAnim.akeyRotations.size() > 1 || me->mAnim.akeyScaling.size() > 1) {
+ if (me->mAnim.akeyPositions.size() > 1 || me->mAnim.akeyRotations.size() > 1 || me->mAnim.akeyScaling.size() > 1) {
// Begin a new node animation channel for this node
aiNodeAnim* nd = pcAnim->mChannels[iNum++] = new aiNodeAnim();
nd->mNodeName.Set(me->mName);
@@ -354,7 +354,7 @@ void ASEImporter::BuildAnimations(const std::vector<BaseNode*>& nodes)
nd->mNumPositionKeys * sizeof(aiVectorKey));
}
// copy rotation keys
- if (me->mAnim.akeyRotations.size() > 1 ) {
+ if (me->mAnim.akeyRotations.size() > 1 ) {
// Allocate the key array and fill it
nd->mNumRotationKeys = (unsigned int) me->mAnim.akeyRotations.size();
nd->mRotationKeys = new aiQuatKey[nd->mNumRotationKeys];
@@ -369,10 +369,10 @@ void ASEImporter::BuildAnimations(const std::vector<BaseNode*>& nodes)
// --------------------------------------------------------------------
aiQuaternion cur;
- for (unsigned int a = 0; a < nd->mNumRotationKeys;++a) {
+ for (unsigned int a = 0; a < nd->mNumRotationKeys;++a) {
aiQuatKey q = me->mAnim.akeyRotations[a];
- if (mParser->iFileFormat > 110) {
+ if (mParser->iFileFormat > 110) {
cur = (a ? cur*q.mValue : q.mValue);
q.mValue = cur.Normalize();
}
@@ -383,7 +383,7 @@ void ASEImporter::BuildAnimations(const std::vector<BaseNode*>& nodes)
}
}
// copy scaling keys
- if (me->mAnim.akeyScaling.size() > 1 ) {
+ if (me->mAnim.akeyScaling.size() > 1 ) {
// Allocate the key array and fill it
nd->mNumScalingKeys = (unsigned int) me->mAnim.akeyScaling.size();
nd->mScalingKeys = new aiVectorKey[nd->mNumScalingKeys];
@@ -400,11 +400,11 @@ void ASEImporter::BuildAnimations(const std::vector<BaseNode*>& nodes)
// Build output cameras
void ASEImporter::BuildCameras()
{
- if (!mParser->m_vCameras.empty()) {
+ if (!mParser->m_vCameras.empty()) {
pcScene->mNumCameras = (unsigned int)mParser->m_vCameras.size();
pcScene->mCameras = new aiCamera*[pcScene->mNumCameras];
- for (unsigned int i = 0; i < pcScene->mNumCameras;++i) {
+ for (unsigned int i = 0; i < pcScene->mNumCameras;++i) {
aiCamera* out = pcScene->mCameras[i] = new aiCamera();
ASE::Camera& in = mParser->m_vCameras[i];
@@ -422,11 +422,11 @@ void ASEImporter::BuildCameras()
// Build output lights
void ASEImporter::BuildLights()
{
- if (!mParser->m_vLights.empty()) {
+ if (!mParser->m_vLights.empty()) {
pcScene->mNumLights = (unsigned int)mParser->m_vLights.size();
pcScene->mLights = new aiLight*[pcScene->mNumLights];
- for (unsigned int i = 0; i < pcScene->mNumLights;++i) {
+ for (unsigned int i = 0; i < pcScene->mNumLights;++i) {
aiLight* out = pcScene->mLights[i] = new aiLight();
ASE::Light& in = mParser->m_vLights[i];
@@ -470,7 +470,7 @@ void ASEImporter::AddNodes(const std::vector<BaseNode*>& nodes,
// Add meshes to a given node
void ASEImporter::AddMeshes(const ASE::BaseNode* snode,aiNode* node)
{
- for (unsigned int i = 0; i < pcScene->mNumMeshes;++i) {
+ for (unsigned int i = 0; i < pcScene->mNumMeshes;++i) {
// Get the name of the mesh (the mesh instance has been temporarily stored in the third vertex color)
const aiMesh* pcMesh = pcScene->mMeshes[i];
const ASE::Mesh* mesh = (const ASE::Mesh*)pcMesh->mColors[2];
@@ -480,13 +480,13 @@ void ASEImporter::AddMeshes(const ASE::BaseNode* snode,aiNode* node)
}
}
- if (node->mNumMeshes) {
+ if (node->mNumMeshes) {
node->mMeshes = new unsigned int[node->mNumMeshes];
- for (unsigned int i = 0, p = 0; i < pcScene->mNumMeshes;++i) {
+ for (unsigned int i = 0, p = 0; i < pcScene->mNumMeshes;++i) {
const aiMesh* pcMesh = pcScene->mMeshes[i];
const ASE::Mesh* mesh = (const ASE::Mesh*)pcMesh->mColors[2];
- if (mesh == snode) {
+ if (mesh == snode) {
node->mMeshes[p++] = i;
// Transform all vertices of the mesh back into their local space ->
@@ -496,20 +496,20 @@ void ASEImporter::AddMeshes(const ASE::BaseNode* snode,aiNode* node)
aiVector3D* pvCurPtr = pcMesh->mVertices;
const aiVector3D* pvEndPtr = pvCurPtr + pcMesh->mNumVertices;
- while (pvCurPtr != pvEndPtr) {
+ while (pvCurPtr != pvEndPtr) {
*pvCurPtr = m * (*pvCurPtr);
pvCurPtr++;
}
// Do the same for the normal vectors, if we have them.
// As always, inverse transpose.
- if (pcMesh->mNormals) {
+ if (pcMesh->mNormals) {
aiMatrix3x3 m3 = aiMatrix3x3( mesh->mTransform );
m3.Transpose();
pvCurPtr = pcMesh->mNormals;
pvEndPtr = pvCurPtr + pcMesh->mNumVertices;
- while (pvCurPtr != pvEndPtr) {
+ while (pvCurPtr != pvEndPtr) {
*pvCurPtr = m3 * (*pvCurPtr);
pvCurPtr++;
}
@@ -535,7 +535,7 @@ void ASEImporter::AddNodes (const std::vector<BaseNode*>& nodes,
// which has *us* as parent.
for (std::vector<BaseNode*>::const_iterator it = nodes.begin(), end = nodes.end(); it != end; ++it) {
const BaseNode* snode = *it;
- if (szName) {
+ if (szName) {
if (len != snode->mParent.length() || ::strcmp(szName,snode->mParent.c_str()))
continue;
}
@@ -562,7 +562,7 @@ void ASEImporter::AddNodes (const std::vector<BaseNode*>& nodes,
}
// Further processing depends on the type of the node
- if (snode->mType == ASE::BaseNode::Mesh) {
+ if (snode->mType == ASE::BaseNode::Mesh) {
// If the type of this node is "Mesh" we need to search
// the list of output meshes in the data structure for
// all those that belonged to this node once. This is
@@ -570,13 +570,13 @@ void ASEImporter::AddNodes (const std::vector<BaseNode*>& nodes,
// be used when this code is refactored next.
AddMeshes(snode,node);
}
- else if (is_not_qnan( snode->mTargetPosition.x )) {
+ else if (is_not_qnan( snode->mTargetPosition.x )) {
// If this is a target camera or light we generate a small
// child node which marks the position of the camera
// target (the direction information is contained in *this*
// node's animation track but the exact target position
// would be lost otherwise)
- if (!node->mNumChildren) {
+ if (!node->mNumChildren) {
node->mChildren = new aiNode*[1];
}
@@ -605,7 +605,7 @@ void ASEImporter::AddNodes (const std::vector<BaseNode*>& nodes,
// Allocate enough space for the child nodes
// We allocate one slot more in case this is a target camera/light
pcParent->mNumChildren = (unsigned int)apcNodes.size();
- if (pcParent->mNumChildren) {
+ if (pcParent->mNumChildren) {
pcParent->mChildren = new aiNode*[apcNodes.size()+1 /* PLUS ONE !!! */];
// now build all nodes for our nice new children
@@ -617,7 +617,7 @@ void ASEImporter::AddNodes (const std::vector<BaseNode*>& nodes,
// ------------------------------------------------------------------------------------------------
// Build the output node graph
-void ASEImporter::BuildNodes(std::vector<BaseNode*>& nodes) {
+void ASEImporter::BuildNodes(std::vector<BaseNode*>& nodes) {
ai_assert(NULL != pcScene);
// allocate the one and only root node
@@ -631,7 +631,7 @@ void ASEImporter::BuildNodes(std::vector<BaseNode*>& nodes) {
ch->mParent = root;
// Change the transformation matrix of all nodes
- for (std::vector<BaseNode*>::iterator it = nodes.begin(), end = nodes.end();it != end; ++it) {
+ for (std::vector<BaseNode*>::iterator it = nodes.begin(), end = nodes.end();it != end; ++it) {
aiMatrix4x4& m = (*it)->mTransform;
m.Transpose(); // row-order vs column-order
}
@@ -642,7 +642,7 @@ void ASEImporter::BuildNodes(std::vector<BaseNode*>& nodes) {
// now iterate through al nodes and find those that have not yet
// been added to the nodegraph (= their parent could not be recognized)
std::vector<const BaseNode*> aiList;
- for (std::vector<BaseNode*>::iterator it = nodes.begin(), end = nodes.end();it != end; ++it) {
+ for (std::vector<BaseNode*>::iterator it = nodes.begin(), end = nodes.end();it != end; ++it) {
if ((*it)->mProcessed) {
continue;
}
@@ -657,18 +657,18 @@ void ASEImporter::BuildNodes(std::vector<BaseNode*>& nodes) {
continue;
}
- if ((*it2)->mName == (*it)->mParent) {
+ if ((*it2)->mName == (*it)->mParent) {
bKnowParent = true;
break;
}
}
- if (!bKnowParent) {
+ if (!bKnowParent) {
aiList.push_back(*it);
}
}
// Are there ane orphaned nodes?
- if (!aiList.empty()) {
+ if (!aiList.empty()) {
std::vector<aiNode*> apcNodes;
apcNodes.reserve(aiList.size() + pcScene->mRootNode->mNumChildren);
@@ -676,7 +676,7 @@ void ASEImporter::BuildNodes(std::vector<BaseNode*>& nodes) {
apcNodes.push_back(pcScene->mRootNode->mChildren[i]);
delete[] pcScene->mRootNode->mChildren;
- 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;
// The parent is not known, so we can assume that we must add
@@ -713,7 +713,7 @@ void ASEImporter::BuildNodes(std::vector<BaseNode*>& nodes) {
// ------------------------------------------------------------------------------------------------
// Convert the imported data to the internal verbose representation
-void ASEImporter::BuildUniqueRepresentation(ASE::Mesh& mesh) {
+void ASEImporter::BuildUniqueRepresentation(ASE::Mesh& mesh) {
// allocate output storage
std::vector<aiVector3D> mPositions;
std::vector<aiVector3D> amTexCoords[AI_MAX_NUMBER_OF_TEXTURECOORDS];
@@ -725,49 +725,49 @@ void ASEImporter::BuildUniqueRepresentation(ASE::Mesh& mesh) {
mPositions.resize(iSize);
// optional texture coordinates
- for (unsigned int i = 0; i < AI_MAX_NUMBER_OF_TEXTURECOORDS;++i) {
- if (!mesh.amTexCoords[i].empty()) {
+ for (unsigned int i = 0; i < AI_MAX_NUMBER_OF_TEXTURECOORDS;++i) {
+ if (!mesh.amTexCoords[i].empty()) {
amTexCoords[i].resize(iSize);
}
}
// optional vertex colors
- if (!mesh.mVertexColors.empty()) {
+ if (!mesh.mVertexColors.empty()) {
mVertexColors.resize(iSize);
}
// optional vertex normals (vertex normals can simply be copied)
- if (!mesh.mNormals.empty()) {
+ if (!mesh.mNormals.empty()) {
mNormals.resize(iSize);
}
// bone vertices. There is no need to change the bone list
- if (!mesh.mBoneVertices.empty()) {
+ if (!mesh.mBoneVertices.empty()) {
mBoneVertices.resize(iSize);
}
// iterate through all faces in the mesh
unsigned int iCurrent = 0, fi = 0;
- for (std::vector<ASE::Face>::iterator i = mesh.mFaces.begin();i != mesh.mFaces.end();++i,++fi) {
+ for (std::vector<ASE::Face>::iterator i = mesh.mFaces.begin();i != mesh.mFaces.end();++i,++fi) {
for (unsigned int n = 0; n < 3;++n,++iCurrent)
{
mPositions[iCurrent] = mesh.mPositions[(*i).mIndices[n]];
// add texture coordinates
- for (unsigned int c = 0; c < AI_MAX_NUMBER_OF_TEXTURECOORDS;++c) {
+ for (unsigned int c = 0; c < AI_MAX_NUMBER_OF_TEXTURECOORDS;++c) {
if (mesh.amTexCoords[c].empty())break;
amTexCoords[c][iCurrent] = mesh.amTexCoords[c][(*i).amUVIndices[c][n]];
}
// add vertex colors
- if (!mesh.mVertexColors.empty()) {
+ if (!mesh.mVertexColors.empty()) {
mVertexColors[iCurrent] = mesh.mVertexColors[(*i).mColorIndices[n]];
}
// add normal vectors
- if (!mesh.mNormals.empty()) {
+ if (!mesh.mNormals.empty()) {
mNormals[iCurrent] = mesh.mNormals[fi*3+n];
mNormals[iCurrent].Normalize();
}
// handle bone vertices
- if ((*i).mIndices[n] < mesh.mBoneVertices.size()) {
+ if ((*i).mIndices[n] < mesh.mBoneVertices.size()) {
// (sometimes this will cause bone verts to be duplicated
// however, I' quite sure Schrompf' JoinVerticesStep
// will fix that again ...)
@@ -813,7 +813,7 @@ void ASEImporter::ConvertMaterial(ASE::Material& mat)
mat.pcInstance = new MaterialHelper();
// At first add the base ambient color of the
- // scene to the material
+ // scene to the material
mat.mAmbient.r += mParser->m_clrAmbient.r;
mat.mAmbient.g += mParser->m_clrAmbient.g;
mat.mAmbient.b += mParser->m_clrAmbient.b;
@@ -907,7 +907,7 @@ void ASEImporter::ConvertMaterial(ASE::Material& mat)
CopyASETexture(*mat.pcInstance,mat.sTexShininess, aiTextureType_SHININESS);
// store the name of the material itself, too
- if ( mat.mName.length() > 0) {
+ if ( mat.mName.length() > 0) {
aiString tex;tex.Set( mat.mName);
mat.pcInstance->AddProperty( &tex, AI_MATKEY_NAME);
}
@@ -919,20 +919,20 @@ void ASEImporter::ConvertMaterial(ASE::Material& mat)
void ASEImporter::ConvertMeshes(ASE::Mesh& mesh, std::vector<aiMesh*>& avOutMeshes)
{
// validate the material index of the mesh
- if (mesh.iMaterialIndex >= mParser->m_vMaterials.size()) {
+ if (mesh.iMaterialIndex >= mParser->m_vMaterials.size()) {
mesh.iMaterialIndex = (unsigned int)mParser->m_vMaterials.size()-1;
DefaultLogger::get()->warn("Material index is out of range");
}
// If the material the mesh is assigned to is consisting of submeshes, split it
- if (!mParser->m_vMaterials[mesh.iMaterialIndex].avSubMaterials.empty()) {
+ if (!mParser->m_vMaterials[mesh.iMaterialIndex].avSubMaterials.empty()) {
std::vector<ASE::Material> vSubMaterials = mParser->
m_vMaterials[mesh.iMaterialIndex].avSubMaterials;
std::vector<unsigned int>* aiSplit = new std::vector<unsigned int>[vSubMaterials.size()];
// build a list of all faces per submaterial
- for (unsigned int i = 0; i < mesh.mFaces.size();++i) {
+ for (unsigned int i = 0; i < mesh.mFaces.size();++i) {
// check range
if (mesh.mFaces[i].iMaterial >= vSubMaterials.size()) {
DefaultLogger::get()->warn("Submaterial index is out of range");
@@ -944,8 +944,8 @@ void ASEImporter::ConvertMeshes(ASE::Mesh& mesh, std::vector<aiMesh*>& avOutMesh
}
// now generate submeshes
- for (unsigned int p = 0; p < vSubMaterials.size();++p) {
- if (!aiSplit[p].empty()) {
+ for (unsigned int p = 0; p < vSubMaterials.size();++p) {
+ if (!aiSplit[p].empty()) {
aiMesh* p_pcOut = new aiMesh();
p_pcOut->mPrimitiveTypes = aiPrimitiveType_TRIANGLE;
@@ -969,7 +969,7 @@ void ASEImporter::ConvertMeshes(ASE::Mesh& mesh, std::vector<aiMesh*>& avOutMesh
// receive output vertex weights
std::vector<std::pair<unsigned int, float> > *avOutputBones = NULL;
- if (!mesh.mBones.empty()) {
+ if (!mesh.mBones.empty()) {
avOutputBones = new std::vector<std::pair<unsigned int, float> >[mesh.mBones.size()];
}
@@ -977,17 +977,17 @@ void ASEImporter::ConvertMeshes(ASE::Mesh& mesh, std::vector<aiMesh*>& avOutMesh
p_pcOut->mFaces = new aiFace[p_pcOut->mNumFaces];
unsigned int iBase = 0,iIndex;
- if (p_pcOut->mNumVertices) {
+ if (p_pcOut->mNumVertices) {
p_pcOut->mVertices = new aiVector3D[p_pcOut->mNumVertices];
p_pcOut->mNormals = new aiVector3D[p_pcOut->mNumVertices];
- for (unsigned int q = 0; q < aiSplit[p].size();++q) {
+ for (unsigned int q = 0; q < aiSplit[p].size();++q) {
iIndex = aiSplit[p][q];
p_pcOut->mFaces[q].mIndices = new unsigned int[3];
p_pcOut->mFaces[q].mNumIndices = 3;
- for (unsigned int t = 0; t < 3;++t, ++iBase) {
+ for (unsigned int t = 0; t < 3;++t, ++iBase) {
const uint32_t iIndex2 = mesh.mFaces[iIndex].mIndices[t];
p_pcOut->mVertices[iBase] = mesh.mPositions [iIndex2];
@@ -996,11 +996,11 @@ void ASEImporter::ConvertMeshes(ASE::Mesh& mesh, std::vector<aiMesh*>& avOutMesh
// convert bones, if existing
if (!mesh.mBones.empty()) {
// check whether there is a vertex weight for this vertex index
- if (iIndex2 < mesh.mBoneVertices.size()) {
+ if (iIndex2 < mesh.mBoneVertices.size()) {
for (std::vector<std::pair<int,float> >::const_iterator
blubb = mesh.mBoneVertices[iIndex2].mBoneWeights.begin();
- blubb != mesh.mBoneVertices[iIndex2].mBoneWeights.end();++blubb) {
+ blubb != mesh.mBoneVertices[iIndex2].mBoneWeights.end();++blubb) {
// NOTE: illegal cases have already been filtered out
avOutputBones[(*blubb).first].push_back(std::pair<unsigned int, float>(
@@ -1018,9 +1018,9 @@ void ASEImporter::ConvertMeshes(ASE::Mesh& mesh, std::vector<aiMesh*>& avOutMesh
{
p_pcOut->mTextureCoords[c] = new aiVector3D[p_pcOut->mNumVertices];
iBase = 0;
- for (unsigned int q = 0; q < aiSplit[p].size();++q) {
+ for (unsigned int q = 0; q < aiSplit[p].size();++q) {
iIndex = aiSplit[p][q];
- for (unsigned int t = 0; t < 3;++t) {
+ for (unsigned int t = 0; t < 3;++t) {
p_pcOut->mTextureCoords[c][iBase++] = mesh.amTexCoords[c][mesh.mFaces[iIndex].mIndices[t]];
}
}
@@ -1033,15 +1033,15 @@ void ASEImporter::ConvertMeshes(ASE::Mesh& mesh, std::vector<aiMesh*>& avOutMesh
if (!mesh.mVertexColors.empty()){
p_pcOut->mColors[0] = new aiColor4D[p_pcOut->mNumVertices];
iBase = 0;
- for (unsigned int q = 0; q < aiSplit[p].size();++q) {
+ for (unsigned int q = 0; q < aiSplit[p].size();++q) {
iIndex = aiSplit[p][q];
- for (unsigned int t = 0; t < 3;++t) {
+ for (unsigned int t = 0; t < 3;++t) {
p_pcOut->mColors[0][iBase++] = mesh.mVertexColors[mesh.mFaces[iIndex].mIndices[t]];
}
}
}
// Copy bones
- if (!mesh.mBones.empty()) {
+ if (!mesh.mBones.empty()) {
p_pcOut->mNumBones = 0;
for (unsigned int mrspock = 0; mrspock < mesh.mBones.size();++mrspock)
if (!avOutputBones[mrspock].empty())p_pcOut->mNumBones++;
@@ -1050,7 +1050,7 @@ void ASEImporter::ConvertMeshes(ASE::Mesh& mesh, std::vector<aiMesh*>& avOutMesh
aiBone** pcBone = p_pcOut->mBones;
for (unsigned int mrspock = 0; mrspock < mesh.mBones.size();++mrspock)
{
- if (!avOutputBones[mrspock].empty()) {
+ if (!avOutputBones[mrspock].empty()) {
// we will need this bone. add it to the output mesh and
// add all per-vertex weights
aiBone* pc = *pcBone = new aiBone();
@@ -1100,7 +1100,7 @@ void ASEImporter::ConvertMeshes(ASE::Mesh& mesh, std::vector<aiMesh*>& avOutMesh
// If the mesh hasn't faces or vertices, there are two cases
// possible: 1. the model is invalid. 2. This is a dummy
// helper object which we are going to remove later ...
- if (mesh.mFaces.empty() || mesh.mPositions.empty()) {
+ if (mesh.mFaces.empty() || mesh.mPositions.empty()) {
return;
}
@@ -1122,8 +1122,8 @@ void ASEImporter::ConvertMeshes(ASE::Mesh& mesh, std::vector<aiMesh*>& avOutMesh
mesh.mNormals.size() * sizeof(aiVector3D));
// copy texture coordinates
- for (unsigned int c = 0; c < AI_MAX_NUMBER_OF_TEXTURECOORDS;++c) {
- if (!mesh.amTexCoords[c].empty()) {
+ for (unsigned int c = 0; c < AI_MAX_NUMBER_OF_TEXTURECOORDS;++c) {
+ if (!mesh.amTexCoords[c].empty()) {
p_pcOut->mTextureCoords[c] = new aiVector3D[mesh.amTexCoords[c].size()];
memcpy(p_pcOut->mTextureCoords[c],&mesh.amTexCoords[c][0],
mesh.amTexCoords[c].size() * sizeof(aiVector3D));
@@ -1134,14 +1134,14 @@ void ASEImporter::ConvertMeshes(ASE::Mesh& mesh, std::vector<aiMesh*>& avOutMesh
}
// copy vertex colors
- if (!mesh.mVertexColors.empty()) {
+ if (!mesh.mVertexColors.empty()) {
p_pcOut->mColors[0] = new aiColor4D[mesh.mVertexColors.size()];
memcpy(p_pcOut->mColors[0],&mesh.mVertexColors[0],
mesh.mVertexColors.size() * sizeof(aiColor4D));
}
// copy faces
- for (unsigned int iFace = 0; iFace < p_pcOut->mNumFaces;++iFace) {
+ for (unsigned int iFace = 0; iFace < p_pcOut->mNumFaces;++iFace) {
p_pcOut->mFaces[iFace].mNumIndices = 3;
p_pcOut->mFaces[iFace].mIndices = new unsigned int[3];
@@ -1152,13 +1152,13 @@ void ASEImporter::ConvertMeshes(ASE::Mesh& mesh, std::vector<aiMesh*>& avOutMesh
}
// copy vertex bones
- if (!mesh.mBones.empty() && !mesh.mBoneVertices.empty()) {
+ if (!mesh.mBones.empty() && !mesh.mBoneVertices.empty()) {
std::vector<aiVertexWeight>* avBonesOut = new std::vector<aiVertexWeight>[mesh.mBones.size()];
// find all vertex weights for this bone
unsigned int quak = 0;
for (std::vector<BoneVertex>::const_iterator harrypotter = mesh.mBoneVertices.begin();
- harrypotter != mesh.mBoneVertices.end();++harrypotter,++quak) {
+ harrypotter != mesh.mBoneVertices.end();++harrypotter,++quak) {
for (std::vector<std::pair<int,float> >::const_iterator
ronaldweasley = (*harrypotter).mBoneWeights.begin();
@@ -1178,8 +1178,8 @@ void ASEImporter::ConvertMeshes(ASE::Mesh& mesh, std::vector<aiMesh*>& avOutMesh
p_pcOut->mBones = new aiBone*[p_pcOut->mNumBones];
aiBone** pcBone = p_pcOut->mBones;
- for (unsigned int jfkennedy = 0; jfkennedy < mesh.mBones.size();++jfkennedy) {
- if (!avBonesOut[jfkennedy].empty()) {
+ for (unsigned int jfkennedy = 0; jfkennedy < mesh.mBones.size();++jfkennedy) {
+ if (!avBonesOut[jfkennedy].empty()) {
aiBone* pc = *pcBone = new aiBone();
pc->mName.Set(mesh.mBones[jfkennedy].mName);
pc->mNumWeights = (unsigned int)avBonesOut[jfkennedy].size();
@@ -1206,7 +1206,7 @@ void ASEImporter::BuildMaterialIndices()
for (unsigned int iMat = 0; iMat < mParser->m_vMaterials.size();++iMat)
{
ASE::Material& mat = mParser->m_vMaterials[iMat];
- if (mat.bNeed) {
+ if (mat.bNeed) {
// Convert it to the aiMaterial layout
ConvertMaterial(mat);
++pcScene->mNumMaterials;
@@ -1214,7 +1214,7 @@ void ASEImporter::BuildMaterialIndices()
for (unsigned int iSubMat = 0; iSubMat < mat.avSubMaterials.size();++iSubMat)
{
ASE::Material& submat = mat.avSubMaterials[iSubMat];
- if (submat.bNeed) {
+ if (submat.bNeed) {
// Convert it to the aiMaterial layout
ConvertMaterial(submat);
++pcScene->mNumMaterials;
@@ -1251,9 +1251,9 @@ void ASEImporter::BuildMaterialIndices()
}
iNum++;
}
- for (unsigned int iSubMat = 0; iSubMat < mat.avSubMaterials.size();++iSubMat) {
+ for (unsigned int iSubMat = 0; iSubMat < mat.avSubMaterials.size();++iSubMat) {
ASE::Material& submat = mat.avSubMaterials[iSubMat];
- if (submat.bNeed) {
+ if (submat.bNeed) {
ai_assert(NULL != submat.pcInstance);
pcScene->mMaterials[iNum] = submat.pcInstance;
@@ -1262,10 +1262,10 @@ void ASEImporter::BuildMaterialIndices()
// Iterate through all meshes and search for one which is using
// this sub-level material index
- for (unsigned int iMesh = 0; iMesh < pcScene->mNumMeshes;++iMesh) {
+ for (unsigned int iMesh = 0; iMesh < pcScene->mNumMeshes;++iMesh) {
aiMesh* mesh = pcScene->mMeshes[iMesh];
- if (iSubMat == mesh->mMaterialIndex && iMat == (uintptr_t)mesh->mColors[3]) {
+ if (iSubMat == mesh->mMaterialIndex && iMat == (uintptr_t)mesh->mColors[3]) {
mesh->mMaterialIndex = iNum;
mesh->mColors[3] = NULL;
}
@@ -1281,7 +1281,7 @@ void ASEImporter::BuildMaterialIndices()
// ------------------------------------------------------------------------------------------------
// Generate normal vectors basing on smoothing groups
-bool ASEImporter::GenerateNormals(ASE::Mesh& mesh) {
+bool ASEImporter::GenerateNormals(ASE::Mesh& mesh) {
if (!mesh.mNormals.empty() && !configRecomputeNormals)
{
diff --git a/3rdparty/assimp/code/ASELoader.h b/3rdparty/assimp/code/ASELoader.h
index 884e7df84..5a117ba2f 100644
--- a/3rdparty/assimp/code/ASELoader.h
+++ b/3rdparty/assimp/code/ASELoader.h
@@ -57,7 +57,7 @@ class MaterialHelper;
/** Importer class for the 3DS ASE ASCII format.
*
*/
-class ASEImporter : public BaseImporter {
+class ASEImporter : public BaseImporter {
friend class Importer;
protected:
diff --git a/3rdparty/assimp/code/ASEParser.cpp b/3rdparty/assimp/code/ASEParser.cpp
index 0b3584a2e..a37fb869d 100644
--- a/3rdparty/assimp/code/ASEParser.cpp
+++ b/3rdparty/assimp/code/ASEParser.cpp
@@ -79,7 +79,7 @@ using namespace Assimp::ASE;
{ \
return; \
} \
- if (IsLineEnd(*filePtr) && !bLastWasEndLine) \
+ if(IsLineEnd(*filePtr) && !bLastWasEndLine) \
{ \
++iLineNumber; \
bLastWasEndLine = true; \
@@ -107,7 +107,7 @@ using namespace Assimp::ASE;
LogError("Encountered unexpected EOL while parsing a " msg \
" chunk (Level " level ")"); \
} \
- if (IsLineEnd(*filePtr) && !bLastWasEndLine) \
+ if(IsLineEnd(*filePtr) && !bLastWasEndLine) \
{ \
++iLineNumber; \
bLastWasEndLine = true; \
@@ -230,7 +230,7 @@ bool Parser::SkipSection()
LogWarning("Unable to parse block: Unexpected EOF, closing bracket \'}\' was expected [#1]");
return false;
}
- else if (IsLineEnd(*filePtr))++iLineNumber;
+ else if(IsLineEnd(*filePtr))++iLineNumber;
++filePtr;
}
}
@@ -353,7 +353,7 @@ void Parser::ParseLV1SoftSkinBlock()
<number of vertices>
[for <number of vertices> times:]
- <number of weights> [for <number of weights> times:] <bone name> <weight>
+ <number of weights> [for <number of weights> times:] <bone name> <weight>
}
FORMAT END
@@ -361,14 +361,14 @@ void Parser::ParseLV1SoftSkinBlock()
// **************************************************************
while (true)
{
- if (*filePtr == '}' ) {++filePtr;return;}
- else if (*filePtr == '\0') return;
- else if (*filePtr == '{' ) ++filePtr;
+ if (*filePtr == '}' ) {++filePtr;return;}
+ else if (*filePtr == '\0') return;
+ else if (*filePtr == '{' ) ++filePtr;
else // if (!IsSpace(*filePtr) && !IsLineEnd(*filePtr))
{
- ASE::Mesh* curMesh = NULL;
- unsigned int numVerts = 0;
+ ASE::Mesh* curMesh = NULL;
+ unsigned int numVerts = 0;
const char* sz = filePtr;
while (!IsSpaceOrNewLine(*filePtr))++filePtr;
@@ -749,7 +749,7 @@ void Parser::ParseLV3MapBlock(Texture& map)
if (TokenMatch(filePtr,"MAP_CLASS" ,9))
{
std::string temp;
- if (!ParseString(temp,"*MAP_CLASS"))
+ if(!ParseString(temp,"*MAP_CLASS"))
SkipToNextToken();
if (temp != "Bitmap")
{
@@ -761,7 +761,7 @@ void Parser::ParseLV3MapBlock(Texture& map)
// path to the texture
if (parsePath && TokenMatch(filePtr,"BITMAP" ,6))
{
- if (!ParseString(map.mMapName,"*BITMAP"))
+ if(!ParseString(map.mMapName,"*BITMAP"))
SkipToNextToken();
if (map.mMapName == "None")
@@ -870,14 +870,14 @@ void Parser::ParseLV1ObjectBlock(ASE::BaseNode& node)
// name of the mesh/node
if (TokenMatch(filePtr,"NODE_NAME" ,9))
{
- if (!ParseString(node.mName,"*NODE_NAME"))
+ if(!ParseString(node.mName,"*NODE_NAME"))
SkipToNextToken();
continue;
}
// name of the parent of the node
if (TokenMatch(filePtr,"NODE_PARENT" ,11) )
{
- if (!ParseString(node.mParent,"*NODE_PARENT"))
+ if(!ParseString(node.mParent,"*NODE_PARENT"))
SkipToNextToken();
continue;
}
@@ -1055,7 +1055,7 @@ void Parser::ParseLV2AnimationBlock(ASE::BaseNode& mesh)
if (TokenMatch(filePtr,"NODE_NAME" ,9))
{
std::string temp;
- if (!ParseString(temp,"*NODE_NAME"))
+ if(!ParseString(temp,"*NODE_NAME"))
SkipToNextToken();
// If the name of the node contains .target it
@@ -1132,7 +1132,7 @@ void Parser::ParseLV3ScaleAnimationBlock(ASE::Animation& anim)
bool b = false;
// For the moment we're just reading the three floats -
- // we ignore the dditional information for bezier's and TCBs
+ // we ignore the ádditional information for bezier's and TCBs
// simple scaling keyframe
if (TokenMatch(filePtr,"CONTROL_SCALE_SAMPLE" ,20))
@@ -1178,7 +1178,7 @@ void Parser::ParseLV3PosAnimationBlock(ASE::Animation& anim)
bool b = false;
// For the moment we're just reading the three floats -
- // we ignore the dditional information for bezier's and TCBs
+ // we ignore the ádditional information for bezier's and TCBs
// simple scaling keyframe
if (TokenMatch(filePtr,"CONTROL_POS_SAMPLE" ,18))
@@ -1224,7 +1224,7 @@ void Parser::ParseLV3RotAnimationBlock(ASE::Animation& anim)
bool b = false;
// For the moment we're just reading the floats -
- // we ignore the dditional information for bezier's and TCBs
+ // we ignore the ádditional information for bezier's and TCBs
// simple scaling keyframe
if (TokenMatch(filePtr,"CONTROL_ROT_SAMPLE" ,18))
@@ -1273,7 +1273,7 @@ void Parser::ParseLV2NodeTransformBlock(ASE::BaseNode& mesh)
if (TokenMatch(filePtr,"NODE_NAME" ,9))
{
std::string temp;
- if (!ParseString(temp,"*NODE_NAME"))
+ if(!ParseString(temp,"*NODE_NAME"))
SkipToNextToken();
std::string::size_type s;
@@ -1561,7 +1561,7 @@ void Parser::ParseLV4MeshBones(unsigned int iNumBones,ASE::Mesh& mesh)
if (TokenMatch(filePtr,"MESH_BONE_NAME" ,16))
{
// parse an index ...
- if (SkipSpaces(&filePtr))
+ if(SkipSpaces(&filePtr))
{
unsigned int iIndex = strtol10(filePtr,&filePtr);
if (iIndex >= iNumBones)
@@ -1894,10 +1894,10 @@ void Parser::ParseLV3MeshNormalListBlock(ASE::Mesh& sMesh)
// Smooth the vertex and face normals together. The result
// will be edgy then, but otherwise everything would be soft ...
- while (true) {
- if ('*' == *filePtr) {
+ while (true) {
+ if ('*' == *filePtr) {
++filePtr;
- if (faceIdx != 0xffffffff && TokenMatch(filePtr,"MESH_VERTEXNORMAL",17)) {
+ if (faceIdx != 0xffffffff && TokenMatch(filePtr,"MESH_VERTEXNORMAL",17)) {
aiVector3D vNormal;
ParseLV4MeshFloatTriple(&vNormal.x,index);
if (faceIdx >= sMesh.mFaces.size())
@@ -1911,7 +1911,7 @@ void Parser::ParseLV3MeshNormalListBlock(ASE::Mesh& sMesh)
index = 1;
else if (index == face.mIndices[2])
index = 2;
- else {
+ else {
DefaultLogger::get()->error("ASE: Invalid vertex index in MESH_VERTEXNORMAL section");
continue;
}
@@ -1919,11 +1919,11 @@ void Parser::ParseLV3MeshNormalListBlock(ASE::Mesh& sMesh)
sMesh.mNormals[faceIdx*3+index] += vNormal;
continue;
}
- if (TokenMatch(filePtr,"MESH_FACENORMAL",15)) {
+ if (TokenMatch(filePtr,"MESH_FACENORMAL",15)) {
aiVector3D vNormal;
ParseLV4MeshFloatTriple(&vNormal.x,faceIdx);
- if (faceIdx >= sMesh.mFaces.size()) {
+ if (faceIdx >= sMesh.mFaces.size()) {
DefaultLogger::get()->error("ASE: Invalid vertex index in MESH_FACENORMAL section");
continue;
}
@@ -1943,7 +1943,7 @@ void Parser::ParseLV3MeshNormalListBlock(ASE::Mesh& sMesh)
void Parser::ParseLV4MeshFace(ASE::Face& out)
{
// skip spaces and tabs
- if (!SkipSpaces(&filePtr))
+ if(!SkipSpaces(&filePtr))
{
LogWarning("Unable to parse *MESH_FACE Element: Unexpected EOL [#1]");
SkipToNextToken();
@@ -1954,7 +1954,7 @@ void Parser::ParseLV4MeshFace(ASE::Face& out)
out.iFace = strtol10(filePtr,&filePtr);
// next character should be ':'
- if (!SkipSpaces(&filePtr))
+ if(!SkipSpaces(&filePtr))
{
// FIX: there are some ASE files which haven't got : here ....
LogWarning("Unable to parse *MESH_FACE Element: Unexpected EOL. \':\' expected [#2]");
@@ -1962,13 +1962,13 @@ void Parser::ParseLV4MeshFace(ASE::Face& out)
return;
}
// FIX: There are some ASE files which haven't got ':' here
- if (':' == *filePtr)++filePtr;
+ if(':' == *filePtr)++filePtr;
// Parse all mesh indices
for (unsigned int i = 0; i < 3;++i)
{
unsigned int iIndex = 0;
- if (!SkipSpaces(&filePtr))
+ if(!SkipSpaces(&filePtr))
{
LogWarning("Unable to parse *MESH_FACE Element: Unexpected EOL");
SkipToNextToken();
@@ -1996,7 +1996,7 @@ void Parser::ParseLV4MeshFace(ASE::Face& out)
++filePtr;
// next character should be ':'
- if (!SkipSpaces(&filePtr) || ':' != *filePtr)
+ if(!SkipSpaces(&filePtr) || ':' != *filePtr)
{
LogWarning("Unable to parse *MESH_FACE Element: "
"Unexpected EOL. \':\' expected [#2]");
@@ -2005,7 +2005,7 @@ void Parser::ParseLV4MeshFace(ASE::Face& out)
}
++filePtr;
- if (!SkipSpaces(&filePtr))
+ if(!SkipSpaces(&filePtr))
{
LogWarning("Unable to parse *MESH_FACE Element: Unexpected EOL. "
"Vertex index ecpected [#4]");
@@ -2030,7 +2030,7 @@ void Parser::ParseLV4MeshFace(ASE::Face& out)
// parse the smoothing group of the face
if (TokenMatch(filePtr,"*MESH_SMOOTHING",15))
{
- if (!SkipSpaces(&filePtr))
+ if(!SkipSpaces(&filePtr))
{
LogWarning("Unable to parse *MESH_SMOOTHING Element: "
"Unexpected EOL. Smoothing group(s) expected [#5]");
@@ -2069,7 +2069,7 @@ void Parser::ParseLV4MeshFace(ASE::Face& out)
if (TokenMatch(filePtr,"*MESH_MTLID",11))
{
- if (!SkipSpaces(&filePtr))
+ if(!SkipSpaces(&filePtr))
{
LogWarning("Unable to parse *MESH_MTLID Element: Unexpected EOL. "
"Material index expected [#6]");
@@ -2122,7 +2122,7 @@ void Parser::ParseLV4MeshFloatTriple(float* apOut)
void Parser::ParseLV4MeshFloat(float& fOut)
{
// skip spaces and tabs
- if (!SkipSpaces(&filePtr))
+ if(!SkipSpaces(&filePtr))
{
// LOG
LogWarning("Unable to parse float: unexpected EOL [#1]");
@@ -2137,7 +2137,7 @@ void Parser::ParseLV4MeshFloat(float& fOut)
void Parser::ParseLV4MeshLong(unsigned int& iOut)
{
// Skip spaces and tabs
- if (!SkipSpaces(&filePtr))
+ if(!SkipSpaces(&filePtr))
{
// LOG
LogWarning("Unable to parse long: unexpected EOL [#1]");
diff --git a/3rdparty/assimp/code/ASEParser.h b/3rdparty/assimp/code/ASEParser.h
index a221a8e81..57fb6c553 100644
--- a/3rdparty/assimp/code/ASEParser.h
+++ b/3rdparty/assimp/code/ASEParser.h
@@ -60,8 +60,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// ASE is quite similar to 3ds. We can reuse some structures
#include "3DSLoader.h"
-namespace Assimp {
-namespace ASE {
+namespace Assimp {
+namespace ASE {
using namespace D3DS;
@@ -139,7 +139,7 @@ struct Bone
//! Construction from an existing name
Bone( const std::string& name)
- : mName (name)
+ : mName (name)
{}
//! Name of the bone
@@ -167,13 +167,13 @@ struct Animation
{
TRACK = 0x0,
BEZIER = 0x1,
- TCB = 0x2
+ TCB = 0x2
} mRotationType, mScalingType, mPositionType;
Animation()
- : mRotationType (TRACK)
- , mScalingType (TRACK)
- , mPositionType (TRACK)
+ : mRotationType (TRACK)
+ , mScalingType (TRACK)
+ , mPositionType (TRACK)
{}
//! List of track rotation keyframes
@@ -217,8 +217,8 @@ struct BaseNode
//! Constructor. Creates a default name for the node
BaseNode(Type _mType)
- : mType (_mType)
- , mProcessed (false)
+ : mType (_mType)
+ , mProcessed (false)
{
// generate a default name for the node
static int iCnt = 0;
@@ -264,8 +264,8 @@ struct Mesh : public MeshWithSmoothingGroups<ASE::Face>, public BaseNode
{
//! Constructor.
Mesh()
- : BaseNode (BaseNode::Mesh)
- , bSkip (false)
+ : BaseNode (BaseNode::Mesh)
+ , bSkip (false)
{
// use 2 texture vertex components by default
for (unsigned int c = 0; c < AI_MAX_NUMBER_OF_TEXTURECOORDS;++c)
@@ -311,12 +311,12 @@ struct Light : public BaseNode
//! Constructor.
Light()
- : BaseNode (BaseNode::Light)
+ : BaseNode (BaseNode::Light)
, mLightType (OMNI)
- , mColor (1.f,1.f,1.f)
+ , mColor (1.f,1.f,1.f)
, mIntensity (1.f) // light is white by default
- , mAngle (45.f)
- , mFalloff (0.f)
+ , mAngle (45.f)
+ , mFalloff (0.f)
{
}
@@ -339,7 +339,7 @@ struct Camera : public BaseNode
//! Constructor
Camera()
- : BaseNode (BaseNode::Camera)
+ : BaseNode (BaseNode::Camera)
, mFOV (0.75f) // in radians
, mNear (0.1f)
, mFar (1000.f) // could be zero
@@ -357,7 +357,7 @@ struct Dummy : public BaseNode
{
//! Constructor
Dummy()
- : BaseNode (BaseNode::Dummy)
+ : BaseNode (BaseNode::Dummy)
{
}
};
@@ -367,8 +367,8 @@ struct Dummy : public BaseNode
#define AI_ASE_OLD_FILE_FORMAT 110
// Internally we're a little bit more tolerant
-#define AI_ASE_IS_NEW_FILE_FORMAT() (iFileFormat >= 200)
-#define AI_ASE_IS_OLD_FILE_FORMAT() (iFileFormat < 200)
+#define AI_ASE_IS_NEW_FILE_FORMAT() (iFileFormat >= 200)
+#define AI_ASE_IS_OLD_FILE_FORMAT() (iFileFormat < 200)
// -------------------------------------------------------------------------------
/** \brief Class to parse ASE files
diff --git a/3rdparty/assimp/code/Assimp.cpp b/3rdparty/assimp/code/Assimp.cpp
index c00dc63b7..e2a1f2f7b 100644
--- a/3rdparty/assimp/code/Assimp.cpp
+++ b/3rdparty/assimp/code/Assimp.cpp
@@ -50,8 +50,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// ------------------------------------------------------------------------------------------------
#ifdef AI_C_THREADSAFE
-# include <boost/thread/thread.hpp>
-# include <boost/thread/mutex.hpp>
+# include <boost/thread/thread.hpp>
+# include <boost/thread/mutex.hpp>
#endif
// ------------------------------------------------------------------------------------------------
using namespace Assimp;
@@ -91,7 +91,7 @@ namespace Assimp
/** Configuration properties */
static ImporterPimpl::IntPropertyMap gIntProperties;
static ImporterPimpl::FloatPropertyMap gFloatProperties;
-static ImporterPimpl::StringPropertyMap gStringProperties;
+static ImporterPimpl::StringPropertyMap gStringProperties;
#ifdef AI_C_THREADSAFE
/** Global mutex to manage the access to the importer map */
@@ -146,7 +146,7 @@ public:
}
// ...................................................................
- size_t FileSize() const {
+ size_t FileSize() const {
return mFile->FileSizeProc(mFile);
}
@@ -215,11 +215,11 @@ class LogToCallbackRedirector : public LogStream
{
public:
LogToCallbackRedirector(const aiLogStream& s)
- : stream (s) {
+ : stream (s) {
ai_assert(NULL != s.callback);
}
- ~LogToCallbackRedirector() {
+ ~LogToCallbackRedirector() {
#ifdef AI_C_THREADSAFE
boost::mutex::scoped_lock lock(gLogStreamMutex);
#endif
@@ -238,7 +238,7 @@ public:
}
/** @copydoc LogStream::write */
- void write(const char* message) {
+ void write(const char* message) {
stream.callback(message,stream.user);
}
@@ -287,7 +287,7 @@ const aiScene* aiImportFileEx( const char* pFile, unsigned int pFlags,
#endif
// setup a custom IO system if necessary
- if (pFS) {
+ if (pFS) {
imp->SetIOHandler( new CIOSystemWrapper (pFS) );
}
@@ -295,13 +295,13 @@ const aiScene* aiImportFileEx( const char* pFile, unsigned int pFlags,
scene = imp->ReadFile( pFile, pFlags);
// if succeeded, place it in the collection of active processes
- if ( scene) {
+ if ( scene) {
#ifdef AI_C_THREADSAFE
lock.lock();
#endif
gActiveImports[scene] = imp;
}
- else {
+ else {
// if failed, extract error code and destroy the import
gLastErrorString = imp->GetErrorString();
delete imp;
@@ -343,13 +343,13 @@ const aiScene* aiImportFileFromMemory(
scene = imp->ReadFileFromMemory( pBuffer, pLength, pFlags,pHint);
// if succeeded, place it in the collection of active processes
- if ( scene) {
+ if ( scene) {
#ifdef AI_C_THREADSAFE
lock.lock();
#endif
gActiveImports[scene] = imp;
}
- else {
+ else {
// if failed, extract error code and destroy the import
gLastErrorString = imp->GetErrorString();
delete imp;
@@ -376,7 +376,7 @@ void aiReleaseImport( const aiScene* pScene)
// find the importer associated with this data
ImporterMap::iterator it = gActiveImports.find( pScene);
// it should be there... else the user is playing fools with us
- if ( it == gActiveImports.end()) {
+ if ( it == gActiveImports.end()) {
ReportSceneNotFoundError();
return;
}
@@ -402,7 +402,7 @@ ASSIMP_API const aiScene* aiApplyPostProcessing(const aiScene* pScene,
// find the importer associated with this data
ImporterMap::iterator it = gActiveImports.find( pScene);
// it should be there... else the user is playing fools with us
- if ( it == gActiveImports.end()) {
+ if ( it == gActiveImports.end()) {
ReportSceneNotFoundError();
return NULL;
}
@@ -483,7 +483,7 @@ ASSIMP_API aiReturn aiDetachLogStream( const aiLogStream* stream)
// find the logstream associated with this data
LogStreamMap::iterator it = gActiveLogStreams.find( *stream);
// it should be there... else the user is playing fools with us
- if ( it == gActiveLogStreams.end()) {
+ if ( it == gActiveLogStreams.end()) {
return AI_FAILURE;
}
DefaultLogger::get()->detatchStream( it->second );
@@ -542,7 +542,7 @@ aiBool aiIsExtensionSupported(const char* szExtension)
boost::mutex::scoped_lock lock(gMutex);
#endif
- if (!gActiveImports.empty()) {
+ if (!gActiveImports.empty()) {
return ((*(gActiveImports.begin())).second->IsExtensionSupported( szExtension )) ? AI_TRUE : AI_FALSE;
}
@@ -589,7 +589,7 @@ void aiGetMemoryRequirements(const C_STRUCT aiScene* pIn,
// find the importer associated with this data
ImporterMap::iterator it = gActiveImports.find( pIn);
// it should be there... else the user is playing fools with us
- if ( it == gActiveImports.end()) {
+ if ( it == gActiveImports.end()) {
ReportSceneNotFoundError();
return;
}
diff --git a/3rdparty/assimp/code/AssimpPCH.cpp b/3rdparty/assimp/code/AssimpPCH.cpp
index 5ccfb4efe..cdc007c56 100644
--- a/3rdparty/assimp/code/AssimpPCH.cpp
+++ b/3rdparty/assimp/code/AssimpPCH.cpp
@@ -11,32 +11,32 @@ static const char* LEGAL_INFORMATION =
"Open Asset Import Library (Assimp).\n"
"A free C/C++ library to import various 3D file formats into applications\n\n"
-"(c) ASSIMP Development Team, 2008-2010\n"
-"License: 3-clause BSD license\n"
-"Website: http://assimp.sourceforge.net\n"
+"(c) 2008-2010, ASSIMP Development Team\n"
+"License under the terms and conditions of the 3-clause BSD license\n"
+"http://assimp.sourceforge.net\n"
;
// ------------------------------------------------------------------------------------------------
// Get legal string
-ASSIMP_API const char* aiGetLegalString () {
+ASSIMP_API const char* aiGetLegalString () {
return LEGAL_INFORMATION;
}
// ------------------------------------------------------------------------------------------------
// Get Assimp minor version
-ASSIMP_API unsigned int aiGetVersionMinor () {
- return 1;
+ASSIMP_API unsigned int aiGetVersionMinor () {
+ return 0;
}
// ------------------------------------------------------------------------------------------------
// Get Assimp major version
-ASSIMP_API unsigned int aiGetVersionMajor () {
- return 1;
+ASSIMP_API unsigned int aiGetVersionMajor () {
+ return 2;
}
// ------------------------------------------------------------------------------------------------
// Get flags used for compilation
-ASSIMP_API unsigned int aiGetCompileFlags () {
+ASSIMP_API unsigned int aiGetCompileFlags () {
unsigned int flags = 0;
diff --git a/3rdparty/assimp/code/AssimpPCH.h b/3rdparty/assimp/code/AssimpPCH.h
index 779f681cc..a0eb1faec 100644
--- a/3rdparty/assimp/code/AssimpPCH.h
+++ b/3rdparty/assimp/code/AssimpPCH.h
@@ -57,9 +57,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
/* Include our stdint.h replacement header for MSVC, take the global header for gcc/mingw
*/
#ifdef _MSC_VER
-# include "pstdint.h"
+# include "pstdint.h"
#else
-# include <stdint.h>
+# include <stdint.h>
#endif
/* Undefine the min/max macros defined by some platform headers (namely Windows.h) to
@@ -76,23 +76,23 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
/* Helper macro to set a pointer to NULL in debug builds
*/
#if (defined _DEBUG)
-# define AI_DEBUG_INVALIDATE_PTR(x) x = NULL;
+# define AI_DEBUG_INVALIDATE_PTR(x) x = NULL;
#else
-# define AI_DEBUG_INVALIDATE_PTR(x)
+# define AI_DEBUG_INVALIDATE_PTR(x)
#endif
/* Beginning with MSVC8 some C string manipulation functions are mapped to their _safe_
* counterparts (e.g. _itoa_s). This avoids a lot of trouble with deprecation warnings.
*/
#if _MSC_VER >= 1400 && !(defined _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES)
-# define _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES 1
+# define _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES 1
#endif
/* size_t to unsigned int, possible loss of data. The compiler is right with his warning
* but this loss of data won't be a problem for us. So shut up, little boy.
*/
#ifdef _MSC_VER
-# pragma warning (disable : 4267)
+# pragma warning (disable : 4267)
#endif
// ----------------------------------------------------------------------------------------
diff --git a/3rdparty/assimp/code/B3DImporter.cpp b/3rdparty/assimp/code/B3DImporter.cpp
index 0609c2752..983d0db5a 100644
--- a/3rdparty/assimp/code/B3DImporter.cpp
+++ b/3rdparty/assimp/code/B3DImporter.cpp
@@ -56,13 +56,13 @@ using namespace std;
// (fixme, Aramis) quick workaround to get rid of all those signed to unsigned warnings
#ifdef _MSC_VER
-# pragma warning (disable: 4018)
+# pragma warning (disable: 4018)
#endif
//#define DEBUG_B3D
// ------------------------------------------------------------------------------------------------
-bool B3DImporter::CanRead( const std::string& pFile, IOSystem* /* pIOHandler */, bool /* checkSig */) const{
+bool B3DImporter::CanRead( const std::string& pFile, IOSystem* pIOHandler, bool checkSig) const{
size_t pos=pFile.find_last_of( '.' );
if ( pos==string::npos ) return false;
@@ -197,7 +197,7 @@ string B3DImporter::ReadChunk(){
tag+=char( ReadByte() );
}
#ifdef DEBUG_B3D
-// cout<<"ReadChunk:"<<tag<<endl;
+// cout<<"ReadChunk:"<<tag<<endl;
#endif
unsigned sz=(unsigned)ReadInt();
_stack.push_back( _pos+sz );
@@ -320,7 +320,7 @@ void B3DImporter::ReadVRTS(){
if ( _vflags & 1 ) v.normal=ReadVec3();
- if ( _vflags & 2 ) ReadQuat(); //skip v 4bytes...
+ if ( _vflags & 2 ) ReadQuat(); //skip v 4bytes...
for ( int i=0;i<_tcsets;++i ){
float t[4]={0,0,0,0};
diff --git a/3rdparty/assimp/code/B3DImporter.h b/3rdparty/assimp/code/B3DImporter.h
index 302e33dd5..fa627694f 100644
--- a/3rdparty/assimp/code/B3DImporter.h
+++ b/3rdparty/assimp/code/B3DImporter.h
@@ -105,7 +105,7 @@ private:
void ReadBB3D( aiScene *scene );
unsigned _pos;
-// unsigned _size;
+// unsigned _size;
std::vector<unsigned char> _buf;
std::vector<unsigned> _stack;
diff --git a/3rdparty/assimp/code/BVHLoader.cpp b/3rdparty/assimp/code/BVHLoader.cpp
index 801714677..8272ce62a 100644
--- a/3rdparty/assimp/code/BVHLoader.cpp
+++ b/3rdparty/assimp/code/BVHLoader.cpp
@@ -290,7 +290,7 @@ void BVHLoader::ReadNodeChannels( BVHLoader::Node& pNode)
// ------------------------------------------------------------------------------------------------
// Reads the motion data
-void BVHLoader::ReadMotion( aiScene* /* pScene */)
+void BVHLoader::ReadMotion( aiScene* pScene)
{
// Read number of frames
std::string tokenFrames = GetNextToken();
@@ -480,7 +480,7 @@ void BVHLoader::CreateAnimation( aiScene* pScene)
switch (node.mChannels[rotOffset+channel])
{
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;
case Channel_RotationZ: aiMatrix4x4::RotationZ( angle, temp); rotMatrix *= aiMatrix3x3( temp); break;
default: throw DeadlyImportError( "Unexpected animation channel setup at node " + nodeName );
}
diff --git a/3rdparty/assimp/code/BVHLoader.h b/3rdparty/assimp/code/BVHLoader.h
index dce8f5f71..74800a187 100644
--- a/3rdparty/assimp/code/BVHLoader.h
+++ b/3rdparty/assimp/code/BVHLoader.h
@@ -94,7 +94,7 @@ protected:
public:
/** 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;
protected:
diff --git a/3rdparty/assimp/code/BaseImporter.cpp b/3rdparty/assimp/code/BaseImporter.cpp
index cd2de111a..064226790 100644
--- a/3rdparty/assimp/code/BaseImporter.cpp
+++ b/3rdparty/assimp/code/BaseImporter.cpp
@@ -85,7 +85,7 @@ aiScene* BaseImporter::ReadFile(const Importer* pImp, const std::string& pFile,
{
InternReadFile( pFile, sc, &filter);
- } catch( const std::exception& err ) {
+ } catch( const std::exception& err ) {
// extract error description
mErrorText = err.what();
DefaultLogger::get()->error(mErrorText);
@@ -98,24 +98,24 @@ aiScene* BaseImporter::ReadFile(const Importer* pImp, const std::string& pFile,
}
// ------------------------------------------------------------------------------------------------
-void BaseImporter::SetupProperties(const Importer* /* pImp */)
+void BaseImporter::SetupProperties(const Importer* pImp)
{
// the default implementation does nothing
}
// ------------------------------------------------------------------------------------------------
/*static*/ bool BaseImporter::SearchFileHeaderForToken(IOSystem* pIOHandler,
- const std::string& pFile,
- const char** tokens,
- unsigned int numTokens,
- unsigned int searchBytes /* = 200 */)
+ const std::string& pFile,
+ const char** tokens,
+ unsigned int numTokens,
+ unsigned int searchBytes /* = 200 */)
{
ai_assert(NULL != tokens && 0 != numTokens && 0 != searchBytes);
if (!pIOHandler)
return false;
boost::scoped_ptr<IOStream> pStream (pIOHandler->Open(pFile));
- if (pStream.get() ) {
+ if (pStream.get() ) {
// read 200 characters from the file
boost::scoped_array<char> _buffer (new char[searchBytes+1 /* for the '\0' */]);
char* buffer = _buffer.get();
@@ -130,17 +130,17 @@ void BaseImporter::SetupProperties(const Importer* /* pImp */)
// It is not a proper handling of unicode files here ...
// ehm ... but it works in most cases.
char* cur = buffer,*cur2 = buffer,*end = &buffer[read];
- while (cur != end) {
+ while (cur != end) {
if (*cur)
*cur2++ = *cur;
++cur;
}
*cur2 = '\0';
- for (unsigned int i = 0; i < numTokens;++i) {
+ for (unsigned int i = 0; i < numTokens;++i) {
ai_assert(NULL != tokens[i]);
- if (::strstr(buffer,tokens[i])) {
+ if (::strstr(buffer,tokens[i])) {
DefaultLogger::get()->debug(std::string("Found positive match for header keyword: ") + tokens[i]);
return true;
}
@@ -208,7 +208,7 @@ void BaseImporter::SetupProperties(const Importer* /* pImp */)
};
magic = reinterpret_cast<const char*>(_magic);
boost::scoped_ptr<IOStream> pStream (pIOHandler->Open(pFile));
- if (pStream.get() ) {
+ if (pStream.get() ) {
// skip to offset
pStream->Seek(offset,aiOrigin_SET);
@@ -402,7 +402,7 @@ namespace Assimp
struct Assimp::BatchData
{
BatchData()
- : next_id(0xffff)
+ : next_id(0xffff)
{}
// IO system to be used for all imports
@@ -437,7 +437,7 @@ BatchLoader::BatchLoader(IOSystem* pIO)
BatchLoader::~BatchLoader()
{
// delete all scenes wthat have not been polled by the user
- for (std::list<LoadRequest>::iterator it = data->requests.begin();it != data->requests.end(); ++it) {
+ for (std::list<LoadRequest>::iterator it = data->requests.begin();it != data->requests.end(); ++it) {
delete (*it).scene;
}
@@ -448,17 +448,17 @@ BatchLoader::~BatchLoader()
// ------------------------------------------------------------------------------------------------
-unsigned int BatchLoader::AddLoadRequest (const std::string& file,
+unsigned int BatchLoader::AddLoadRequest (const std::string& file,
unsigned int steps /*= 0*/, const PropertyMap* map /*= NULL*/)
{
ai_assert(!file.empty());
// check whether we have this loading request already
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) {
// Call IOSystem's path comparison function here
- if (data->pIOSystem->ComparePaths((*it).file,file)) {
+ if (data->pIOSystem->ComparePaths((*it).file,file)) {
if (map) {
if (!((*it).map == *map))
@@ -478,14 +478,14 @@ unsigned int BatchLoader::AddLoadRequest (const std::string& file,
}
// ------------------------------------------------------------------------------------------------
-aiScene* BatchLoader::GetImport (unsigned int which)
+aiScene* BatchLoader::GetImport (unsigned int which)
{
- for (std::list<LoadRequest>::iterator it = data->requests.begin();it != data->requests.end(); ++it) {
+ for (std::list<LoadRequest>::iterator it = data->requests.begin();it != data->requests.end(); ++it) {
- if ((*it).id == which && (*it).loaded) {
+ if ((*it).id == which && (*it).loaded) {
aiScene* sc = (*it).scene;
- if (!(--(*it).refCnt)) {
+ if (!(--(*it).refCnt)) {
data->requests.erase(it);
}
return sc;
@@ -498,7 +498,7 @@ aiScene* BatchLoader::GetImport (unsigned int which)
void BatchLoader::LoadAll()
{
// no threaded implementation for the moment
- for (std::list<LoadRequest>::iterator it = data->requests.begin();it != data->requests.end(); ++it) {
+ for (std::list<LoadRequest>::iterator it = data->requests.begin();it != data->requests.end(); ++it) {
// force validation in debug builds
unsigned int pp = (*it).flags;
#ifdef _DEBUG
diff --git a/3rdparty/assimp/code/BaseImporter.h b/3rdparty/assimp/code/BaseImporter.h
index 9da05713a..39ac3bf58 100644
--- a/3rdparty/assimp/code/BaseImporter.h
+++ b/3rdparty/assimp/code/BaseImporter.h
@@ -51,7 +51,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
struct aiScene;
-namespace Assimp {
+namespace Assimp {
class IOSystem;
class Importer;
@@ -327,7 +327,7 @@ public: // static utilities
*/
static bool SearchFileHeaderForToken(
IOSystem* pIOSystem,
- const std::string& file,
+ const std::string& file,
const char** tokens,
unsigned int numTokens,
unsigned int searchBytes = 200);
@@ -462,7 +462,7 @@ public:
* @return 'Load request channel' - an unique ID that can later
* be used to access the imported file data.
* @see GetImport */
- unsigned int AddLoadRequest (
+ unsigned int AddLoadRequest (
const std::string& file,
unsigned int steps = 0,
const PropertyMap* map = NULL
diff --git a/3rdparty/assimp/code/BaseProcess.cpp b/3rdparty/assimp/code/BaseProcess.cpp
index c5970fba1..ce8fbce96 100644
--- a/3rdparty/assimp/code/BaseProcess.cpp
+++ b/3rdparty/assimp/code/BaseProcess.cpp
@@ -77,7 +77,7 @@ void BaseProcess::ExecuteOnScene( Importer* pImp)
{
Execute(pImp->pimpl->mScene);
- } catch( const std::exception& err ) {
+ } catch( const std::exception& err ) {
// extract error description
pImp->pimpl->mErrorString = err.what();
@@ -90,7 +90,7 @@ void BaseProcess::ExecuteOnScene( Importer* pImp)
}
// ------------------------------------------------------------------------------------------------
-void BaseProcess::SetupProperties(const Importer* /* pImp */)
+void BaseProcess::SetupProperties(const Importer* pImp)
{
// the default implementation does nothing
}
diff --git a/3rdparty/assimp/code/BaseProcess.h b/3rdparty/assimp/code/BaseProcess.h
index cd8bda0cf..6d32d441d 100644
--- a/3rdparty/assimp/code/BaseProcess.h
+++ b/3rdparty/assimp/code/BaseProcess.h
@@ -49,7 +49,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
struct aiScene;
-namespace Assimp {
+namespace Assimp {
class Importer;
@@ -161,17 +161,17 @@ public:
}
//! Remove a property of a specific type
- void RemoveProperty( const char* name) {
+ void RemoveProperty( const char* name) {
SetGenericPropertyPtr<Base>(pmap,name,NULL);
}
private:
- void AddProperty( const char* name, Base* data) {
+ void AddProperty( const char* name, Base* data) {
SetGenericPropertyPtr<Base>(pmap,name,data);
}
- Base* GetPropertyInternal( const char* name) const {
+ Base* GetPropertyInternal( const char* name) const {
return GetGenericProperty<Base*>(pmap,name,NULL);
}
@@ -263,14 +263,14 @@ public:
* allows multiple postprocess steps to share data.
* @param sh May be NULL
*/
- inline void SetSharedData(SharedPostProcessInfo* sh) {
+ inline void SetSharedData(SharedPostProcessInfo* sh) {
shared = sh;
}
// -------------------------------------------------------------------
/** Get the shared data that is assigned to the step.
*/
- inline SharedPostProcessInfo* GetSharedData() {
+ inline SharedPostProcessInfo* GetSharedData() {
return shared;
}
diff --git a/3rdparty/assimp/code/BlenderDNA.cpp b/3rdparty/assimp/code/BlenderDNA.cpp
index 5206ab130..f7cf8e65e 100644
--- a/3rdparty/assimp/code/BlenderDNA.cpp
+++ b/3rdparty/assimp/code/BlenderDNA.cpp
@@ -92,7 +92,7 @@ void DNAParser :: Parse ()
}
// type dictionary
- for (;stream.GetCurrentPos() & 0x3; stream.GetI1()) {};
+ for (;stream.GetCurrentPos() & 0x3; stream.GetI1());
if (!match4(stream,"TYPE")) {
throw DeadlyImportError("BlenderDNA: Expected TYPE field");
}
@@ -105,7 +105,7 @@ void DNAParser :: Parse ()
}
// type length dictionary
- for (;stream.GetCurrentPos() & 0x3; stream.GetI1()) {};
+ for (;stream.GetCurrentPos() & 0x3; stream.GetI1());
if (!match4(stream,"TLEN")) {
throw DeadlyImportError("BlenderDNA: Expected TLEN field");
}
@@ -115,7 +115,7 @@ void DNAParser :: Parse ()
}
// structures dictionary
- for (;stream.GetCurrentPos() & 0x3; stream.GetI1()) {};
+ for (;stream.GetCurrentPos() & 0x3; stream.GetI1());
if (!match4(stream,"STRC")) {
throw DeadlyImportError("BlenderDNA: Expected STRC field");
}
@@ -288,7 +288,7 @@ boost::shared_ptr< ElemBase > DNA :: ConvertBlobToStructure(
// ------------------------------------------------------------------------------------------------
DNA::FactoryPair DNA :: GetBlobToStructureConverter(
const Structure& structure,
- const FileDatabase& /* db */
+ const FileDatabase& db
) const
{
std::map<std::string, FactoryPair>::const_iterator it = converters.find(structure.name);
diff --git a/3rdparty/assimp/code/BlenderDNA.h b/3rdparty/assimp/code/BlenderDNA.h
index 4e4b9e906..3e24c60b7 100644
--- a/3rdparty/assimp/code/BlenderDNA.h
+++ b/3rdparty/assimp/code/BlenderDNA.h
@@ -50,12 +50,12 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// enable verbose log output. really verbose, so be careful.
#ifdef _DEBUG
-# define ASSIMP_BUILD_BLENDER_DEBUG
+# define ASSIMP_BUILD_BLENDER_DEBUG
#endif
// #define ASSIMP_BUILD_BLENDER_NO_STATS
-namespace Assimp {
+namespace Assimp {
template <bool,bool> class StreamReader;
typedef StreamReader<true,true> StreamReaderAny;
@@ -186,7 +186,7 @@ enum ErrorPolicy
};
#ifdef ASSIMP_BUILD_BLENDER_DEBUG
-# define ErrorPolicy_Igno ErrorPolicy_Warn
+# define ErrorPolicy_Igno ErrorPolicy_Warn
#endif
// -------------------------------------------------------------------------------
@@ -204,7 +204,7 @@ class Structure
public:
Structure()
- : cache_idx(-1)
+ : cache_idx(-1)
{}
public:
@@ -376,13 +376,21 @@ template <> struct Structure :: _defaultInitializer<ErrorPolicy_Warn> {
template <> struct Structure :: _defaultInitializer<ErrorPolicy_Fail> {
template <typename T>
- void operator ()(T& /*out*/,const char* = "") {
+ void operator ()(T& out,const char* = "") {
// obviously, it is crucial that _DefaultInitializer is used
// only from within a catch clause.
throw;
}
};
+// -------------------------------------------------------------------------------------------------------
+template <> inline void Structure :: ResolvePointer<boost::shared_ptr,ElemBase>(boost::shared_ptr<ElemBase>& out,
+ const Pointer & ptrval,
+ const FileDatabase& db,
+ const Field& f
+ ) const;
+
+
// -------------------------------------------------------------------------------
/** Represents the full data structure information for a single BLEND file.
* This data is extracted from the DNA1 chunk in the file.
@@ -487,12 +495,12 @@ public:
};
// special converters for primitive types
-template <> inline void Structure :: Convert<int> (int& dest,const FileDatabase& db) const;
-template <> inline void Structure :: Convert<short> (short& dest,const FileDatabase& db) const;
-template <> inline void Structure :: Convert<char> (char& dest,const FileDatabase& db) const;
-template <> inline void Structure :: Convert<float> (float& dest,const FileDatabase& db) const;
-template <> inline void Structure :: Convert<double> (double& dest,const FileDatabase& db) const;
-template <> inline void Structure :: Convert<Pointer> (Pointer& dest,const FileDatabase& db) const;
+template <> inline void Structure :: Convert<int> (int& dest,const FileDatabase& db) const;
+template <> inline void Structure :: Convert<short> (short& dest,const FileDatabase& db) const;
+template <> inline void Structure :: Convert<char> (char& dest,const FileDatabase& db) const;
+template <> inline void Structure :: Convert<float> (float& dest,const FileDatabase& db) const;
+template <> inline void Structure :: Convert<double> (double& dest,const FileDatabase& db) const;
+template <> inline void Structure :: Convert<Pointer> (Pointer& dest,const FileDatabase& db) const;
// -------------------------------------------------------------------------------
/** Describes a master file block header. Each master file sections holds n
@@ -584,11 +592,11 @@ class Statistics {
public:
Statistics ()
- : fields_read ()
- , pointers_resolved ()
- , cache_hits ()
-// , blocks_read ()
- , cached_objects ()
+ : fields_read ()
+ , pointers_resolved ()
+ , cache_hits ()
+// , blocks_read ()
+ , cached_objects ()
{}
public:
@@ -673,12 +681,12 @@ public:
ObjectCache(const FileDatabase&) {}
- template <typename T> void get(const Structure&, vector<T>& /*t*/, const Pointer&) {}
+ template <typename T> void get(const Structure&, vector<T>&t, const Pointer&) {}
template <typename T> void set(const Structure&, const vector<T>&, const Pointer&) {}
};
#ifdef _MSC_VER
-# pragma warning(disable:4355)
+# pragma warning(disable:4355)
#endif
// -------------------------------------------------------------------------------
@@ -693,9 +701,9 @@ public:
FileDatabase()
- : _cacheArrays(*this)
+ : next_cache_idx()
+ , _cacheArrays(*this)
, _cache(*this)
- , next_cache_idx()
{}
public:
@@ -719,12 +727,12 @@ public:
// arrays of objects are never cached because we can't easily
// ensure their proper destruction.
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 {
return _cache;
}
template <typename T>
- ObjectCache<vector>& cache(vector<T>& /*in*/) const {
+ ObjectCache<vector>& cache(vector<T>& in) const {
return _cacheArrays;
}
@@ -742,7 +750,7 @@ private:
};
#ifdef _MSC_VER
-# pragma warning(default:4355)
+# pragma warning(default:4355)
#endif
// -------------------------------------------------------------------------------
@@ -782,11 +790,11 @@ private:
FileDatabase& db;
};
-// -------------------------------------------------------------------------------------------------------
+//--------------------------------------------------------------------------------
template <> inline void Structure :: ResolvePointer<boost::shared_ptr,ElemBase>(boost::shared_ptr<ElemBase>& out,
const Pointer & ptrval,
const FileDatabase& db,
- const Field& /* f */
+ const Field& /* f */
) const
{
// Special case when the data type needs to be determined at runtime.
diff --git a/3rdparty/assimp/code/BlenderDNA.inl b/3rdparty/assimp/code/BlenderDNA.inl
index e640f7398..511e7878c 100644
--- a/3rdparty/assimp/code/BlenderDNA.inl
+++ b/3rdparty/assimp/code/BlenderDNA.inl
@@ -45,7 +45,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef INCLUDED_AI_BLEND_DNA_INL
#define INCLUDED_AI_BLEND_DNA_INL
-namespace Assimp {
+namespace Assimp {
namespace Blender {
//--------------------------------------------------------------------------------
diff --git a/3rdparty/assimp/code/BlenderIntermediate.h b/3rdparty/assimp/code/BlenderIntermediate.h
index e8c969e9e..99e0e64e0 100644
--- a/3rdparty/assimp/code/BlenderIntermediate.h
+++ b/3rdparty/assimp/code/BlenderIntermediate.h
@@ -59,7 +59,7 @@ namespace Blender {
/** Mini smart-array to avoid pulling in even more boost stuff. usable with vector and deque */
// --------------------------------------------------------------------
template <template <typename,typename> class TCLASS, typename T>
- struct TempArray {
+ struct TempArray {
typedef TCLASS< T*,std::allocator<T*> > mywrap;
TempArray() {
@@ -116,7 +116,7 @@ namespace Blender {
};
#ifdef _MSC_VER
-# pragma warning(disable:4351)
+# pragma warning(disable:4351)
#endif
// --------------------------------------------------------------------
/** ConversionData acts as intermediate storage location for
@@ -151,26 +151,26 @@ namespace Blender {
const FileDatabase& db;
};
#ifdef _MSC_VER
-# pragma warning(default:4351)
+# pragma warning(default:4351)
#endif
// ------------------------------------------------------------------------------------------------
inline const char* GetTextureTypeDisplayString(Tex::Type 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";
+ 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:
break;
}
diff --git a/3rdparty/assimp/code/BlenderLoader.cpp b/3rdparty/assimp/code/BlenderLoader.cpp
index 47f3e58d3..3d587b0f1 100644
--- a/3rdparty/assimp/code/BlenderLoader.cpp
+++ b/3rdparty/assimp/code/BlenderLoader.cpp
@@ -57,20 +57,21 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// zlib is needed for compressed blend files
#ifndef ASSIMP_BUILD_NO_COMPRESSED_BLEND
-# ifdef ASSIMP_BUILD_NO_OWN_ZLIB
-# include <zlib.h>
-# else
-# include "../contrib/zlib/zlib.h"
-# endif
+# ifdef ASSIMP_BUILD_NO_OWN_ZLIB
+# include <zlib.h>
+# else
+# include "../contrib/zlib/zlib.h"
+# endif
#endif
using namespace Assimp;
using namespace Assimp::Blender;
using namespace Assimp::Formatter;
+
static const aiLoaderDesc blenderDesc = {
"Blender 3D Importer \nhttp://www.blender3d.org",
- "Alexander Gessler <alexander.gessler@gmx.net>",
+ "Assimp Team",
"",
"",
aiLoaderFlags_SupportBinaryFlavour | aiLoaderFlags_Experimental,
@@ -80,6 +81,7 @@ static const aiLoaderDesc blenderDesc = {
50
};
+
// ------------------------------------------------------------------------------------------------
// Constructor to be privately used by Importer
BlenderImporter::BlenderImporter()
@@ -102,7 +104,7 @@ bool BlenderImporter::CanRead( const std::string& pFile, IOSystem* pIOHandler, b
return true;
}
- else if ((!extension.length() || checkSig) && pIOHandler) {
+ else if ((!extension.length() || checkSig) && pIOHandler) {
// note: this won't catch compressed files
const char* tokens[] = {"BLENDER"};
return SearchFileHeaderForToken(pIOHandler,pFile,tokens,1);
@@ -126,7 +128,7 @@ const aiLoaderDesc& BlenderImporter::GetInfo () const
// ------------------------------------------------------------------------------------------------
// Setup configuration properties for the loader
-void BlenderImporter::SetupProperties(const Importer* /* pImp */)
+void BlenderImporter::SetupProperties(const Importer* pImp)
{
// nothing to be done for the moment
}
@@ -309,10 +311,10 @@ void BlenderImporter::ExtractScene(Scene& out, const FileDatabase& file)
#ifndef ASSIMP_BUILD_BLENDER_NO_STATS
DefaultLogger::get()->info((format(),
- "(Stats) Fields read: " ,file.stats().fields_read,
- ", pointers resolved: " ,file.stats().pointers_resolved,
+ "(Stats) Fields read: " ,file.stats().fields_read,
+ ", 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
}
@@ -397,9 +399,9 @@ void BlenderImporter::ConvertBlendFile(aiScene* out, const Scene& in,const FileD
}
// ------------------------------------------------------------------------------------------------
-void BlenderImporter::ResolveImage(MaterialHelper* out, const Material* /* mat */, const MTex* /*tex*/, const Image* img, ConversionData& conv_data)
+void BlenderImporter::ResolveImage(MaterialHelper* out, const Material* mat, const MTex* tex, const Image* img, ConversionData& conv_data)
{
- // mat; tex; conv_data;
+ mat; tex; conv_data;
aiString name;
// check if the file contents are bundled with the BLEND file
@@ -442,9 +444,9 @@ void BlenderImporter::ResolveImage(MaterialHelper* out, const Material* /* mat *
}
// ------------------------------------------------------------------------------------------------
-void BlenderImporter::AddSentinelTexture(MaterialHelper* out, const Material* /*mat*/, const MTex* tex, ConversionData& conv_data)
+void BlenderImporter::AddSentinelTexture(MaterialHelper* out, const Material* mat, const MTex* tex, ConversionData& conv_data)
{
- // mat; tex; conv_data;
+ mat; tex; conv_data;
aiString name;
name.length = sprintf(name.data, "Procedural,num=%i,type=%s",conv_data.sentinel_cnt++,
@@ -469,28 +471,28 @@ void BlenderImporter::ResolveTexture(MaterialHelper* out, const Material* mat, c
switch( rtex->type )
{
// 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?
- 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);
AddSentinelTexture(out, mat, tex, conv_data);
break;
- case Tex::Type_IMAGE :
+ case Tex::Type_IMAGE :
if (!rtex->ima) {
LogError("A texture claims to be an Image, but no image reference is given");
break;
@@ -599,7 +601,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
)
{
@@ -705,7 +707,7 @@ void BlenderImporter::ConvertMesh(const Scene& /* in */, const Object* /* obj */
++vo;
++vn;
- // if (f.mNumIndices >= 2) {
+ // if (f.mNumIndices >= 2) {
if (mf.v2 >= mesh->totvert) {
ThrowException("Vertex index v2 out of range");
}
@@ -723,7 +725,7 @@ void BlenderImporter::ConvertMesh(const Scene& /* in */, const Object* /* obj */
if (mf.v3 >= mesh->totvert) {
ThrowException("Vertex index v3 out of range");
}
- // if (f.mNumIndices >= 3) {
+ // if (f.mNumIndices >= 3) {
v = &mesh->mvert[mf.v3];
vo->x = v->co[0];
vo->y = v->co[1];
@@ -738,7 +740,7 @@ void BlenderImporter::ConvertMesh(const Scene& /* in */, const Object* /* obj */
if (mf.v4 >= mesh->totvert) {
ThrowException("Vertex index v4 out of range");
}
- // if (f.mNumIndices >= 4) {
+ // if (f.mNumIndices >= 4) {
if (mf.v4) {
v = &mesh->mvert[mf.v4];
vo->x = v->co[0];
@@ -755,9 +757,9 @@ void BlenderImporter::ConvertMesh(const Scene& /* in */, const Object* /* obj */
}
else out->mPrimitiveTypes |= aiPrimitiveType_TRIANGLE;
- // }
- // }
- // }
+ // }
+ // }
+ // }
}
// collect texture coordinates, they're stored in a separate per-face buffer
@@ -838,7 +840,7 @@ void BlenderImporter::ConvertMesh(const Scene& /* in */, const Object* /* obj */
vo->b = col->b;
vo->a = col->a;
}
- for (unsigned int n = f.mNumIndices; n < 4; ++n) {};
+ for (unsigned int n = f.mNumIndices; n < 4; ++n);
}
}
@@ -846,7 +848,7 @@ void BlenderImporter::ConvertMesh(const Scene& /* in */, const Object* /* obj */
}
// ------------------------------------------------------------------------------------------------
-aiCamera* BlenderImporter::ConvertCamera(const Scene& /* in */, const Object* /* obj */, const Camera* /* mesh */, ConversionData& /* conv_data */)
+aiCamera* BlenderImporter::ConvertCamera(const Scene& in, const Object* obj, const Camera* mesh, ConversionData& conv_data)
{
ScopeGuard<aiCamera> out(new aiCamera());
@@ -854,7 +856,7 @@ aiCamera* BlenderImporter::ConvertCamera(const Scene& /* in */, const Object* /*
}
// ------------------------------------------------------------------------------------------------
-aiLight* BlenderImporter::ConvertLight(const Scene& /* in */, const Object* /* obj */, const Lamp* /* mesh */, ConversionData& /* conv_data */)
+aiLight* BlenderImporter::ConvertLight(const Scene& in, const Object* obj, const Lamp* mesh, ConversionData& conv_data)
{
ScopeGuard<aiLight> out(new aiLight());
@@ -981,22 +983,22 @@ aiNode* BlenderImporter::ConvertNode(const Scene& in, const Object* obj, Convers
}
// ------------------------------------------------------------------------------------------------
-/*static*/ void BlenderImporter::LogWarn(const Formatter::format& message) {
+/*static*/ void BlenderImporter::LogWarn(const Formatter::format& message) {
DefaultLogger::get()->warn(std::string("BLEND: ")+=message);
}
// ------------------------------------------------------------------------------------------------
-/*static*/ void BlenderImporter::LogError(const Formatter::format& message) {
+/*static*/ void BlenderImporter::LogError(const Formatter::format& message) {
DefaultLogger::get()->error(std::string("BLEND: ")+=message);
}
// ------------------------------------------------------------------------------------------------
-/*static*/ void BlenderImporter::LogInfo(const Formatter::format& message) {
+/*static*/ void BlenderImporter::LogInfo(const Formatter::format& message) {
DefaultLogger::get()->info(std::string("BLEND: ")+=message);
}
// ------------------------------------------------------------------------------------------------
-/*static*/ void BlenderImporter::LogDebug(const Formatter::format& message) {
+/*static*/ void BlenderImporter::LogDebug(const Formatter::format& message) {
DefaultLogger::get()->debug(std::string("BLEND: ")+=message);
}
diff --git a/3rdparty/assimp/code/BlenderLoader.h b/3rdparty/assimp/code/BlenderLoader.h
index 0439b9abb..ee95de836 100644
--- a/3rdparty/assimp/code/BlenderLoader.h
+++ b/3rdparty/assimp/code/BlenderLoader.h
@@ -45,7 +45,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define INCLUDED_AI_BLEND_LOADER_H
#include "BaseImporter.h"
-namespace Assimp {
+namespace Assimp {
// TinyFormatter.h
namespace Formatter {
diff --git a/3rdparty/assimp/code/BlenderModifier.cpp b/3rdparty/assimp/code/BlenderModifier.cpp
index eb3795a84..64711346a 100644
--- a/3rdparty/assimp/code/BlenderModifier.cpp
+++ b/3rdparty/assimp/code/BlenderModifier.cpp
@@ -178,7 +178,7 @@ bool BlenderModifier_Mirror :: IsActive (const ModifierData& modin)
// ------------------------------------------------------------------------------------------------
void BlenderModifier_Mirror :: DoIt(aiNode& out, ConversionData& conv_data, const ElemBase& orig_modifier,
- const Scene& /* in */,
+ const Scene& in,
const Object& orig_object )
{
// hijacking the ABI, see the big note in BlenderModifierShowcase::ApplyModifiers()
@@ -271,7 +271,7 @@ bool BlenderModifier_Subdivision :: IsActive (const ModifierData& modin)
// ------------------------------------------------------------------------------------------------
void BlenderModifier_Subdivision :: DoIt(aiNode& out, ConversionData& conv_data, const ElemBase& orig_modifier,
- const Scene& /* in */,
+ const Scene& in,
const Object& orig_object )
{
// hijacking the ABI, see the big note in BlenderModifierShowcase::ApplyModifiers()
diff --git a/3rdparty/assimp/code/BlenderModifier.h b/3rdparty/assimp/code/BlenderModifier.h
index 43e503fbc..c5e6bd430 100644
--- a/3rdparty/assimp/code/BlenderModifier.h
+++ b/3rdparty/assimp/code/BlenderModifier.h
@@ -64,7 +64,7 @@ public:
// --------------------
/** Check if *this* modifier is active, given a ModifierData& block.*/
- virtual bool IsActive( const ModifierData& /* modin */) {
+ virtual bool IsActive( const ModifierData& modin) {
return false;
}
@@ -72,11 +72,11 @@ public:
/** Apply the modifier to a given output node. The original data used
* to construct the node is given as well. Not called unless IsActive()
* was called and gave positive response. */
- virtual void DoIt(aiNode& /* out */,
- ConversionData& /* conv_data */,
+ virtual void DoIt(aiNode& out,
+ ConversionData& conv_data,
const ElemBase& orig_modifier,
- const Scene& /* in */,
- const Object& /* orig_object */
+ const Scene& in,
+ const Object& orig_object
) {
DefaultLogger::get()->warn((Formatter::format("This modifier is not supported, skipping: "),orig_modifier.dna_type));
return;
diff --git a/3rdparty/assimp/code/BlenderScene.cpp b/3rdparty/assimp/code/BlenderScene.cpp
index dd45f1a9e..f8d13e177 100644
--- a/3rdparty/assimp/code/BlenderScene.cpp
+++ b/3rdparty/assimp/code/BlenderScene.cpp
@@ -561,34 +561,35 @@ template <> void Structure :: Convert<MirrorModifierData> (
//--------------------------------------------------------------------------------
void DNA::RegisterConverters() {
- converters["Object"] = DNA::FactoryPair( static_cast<AllocProcPtr>(&Structure::Allocate<Object>), static_cast<ConvertProcPtr>(&Structure::Convert<Object>) );
- converters["Group"] = DNA::FactoryPair( static_cast<AllocProcPtr>(&Structure::Allocate<Group>), static_cast<ConvertProcPtr>(&Structure::Convert<Group>) );
- converters["MTex"] = DNA::FactoryPair( static_cast<AllocProcPtr>(&Structure::Allocate<MTex>), static_cast<ConvertProcPtr>(&Structure::Convert<MTex>) );
- converters["TFace"] = DNA::FactoryPair( static_cast<AllocProcPtr>(&Structure::Allocate<TFace>), static_cast<ConvertProcPtr>(&Structure::Convert<TFace>) );
+
+ converters["Object"] = DNA::FactoryPair( static_cast<AllocProcPtr>(&Structure::Allocate<Object>), static_cast<ConvertProcPtr>(&Structure::Convert<Object>) );
+ converters["Group"] = DNA::FactoryPair( static_cast<AllocProcPtr>(&Structure::Allocate<Group>), static_cast<ConvertProcPtr>(&Structure::Convert<Group>) );
+ converters["MTex"] = DNA::FactoryPair( static_cast<AllocProcPtr>(&Structure::Allocate<MTex>), static_cast<ConvertProcPtr>(&Structure::Convert<MTex>) );
+ converters["TFace"] = DNA::FactoryPair( static_cast<AllocProcPtr>(&Structure::Allocate<TFace>), static_cast<ConvertProcPtr>(&Structure::Convert<TFace>) );
converters["SubsurfModifierData"] = DNA::FactoryPair( static_cast<AllocProcPtr>(&Structure::Allocate<SubsurfModifierData>), static_cast<ConvertProcPtr>(&Structure::Convert<SubsurfModifierData>) );
- converters["MFace"] = DNA::FactoryPair( static_cast<AllocProcPtr>(&Structure::Allocate<MFace>), static_cast<ConvertProcPtr>(&Structure::Convert<MFace>) );
- converters["Lamp"] = DNA::FactoryPair( static_cast<AllocProcPtr>(&Structure::Allocate<Lamp>), static_cast<ConvertProcPtr>(&Structure::Convert<Lamp>) );
- converters["MDeformWeight"] = DNA::FactoryPair( static_cast<AllocProcPtr>(&Structure::Allocate<MDeformWeight>), static_cast<ConvertProcPtr>(&Structure::Convert<MDeformWeight>) );
- converters["PackedFile"] = DNA::FactoryPair( static_cast<AllocProcPtr>(&Structure::Allocate<PackedFile>), static_cast<ConvertProcPtr>(&Structure::Convert<PackedFile>) );
- converters["Base"] = DNA::FactoryPair( static_cast<AllocProcPtr>(&Structure::Allocate<Base>), static_cast<ConvertProcPtr>(&Structure::Convert<Base>) );
- converters["MTFace"] = DNA::FactoryPair( static_cast<AllocProcPtr>(&Structure::Allocate<MTFace>), static_cast<ConvertProcPtr>(&Structure::Convert<MTFace>) );
- converters["Material"] = DNA::FactoryPair( static_cast<AllocProcPtr>(&Structure::Allocate<Material>), static_cast<ConvertProcPtr>(&Structure::Convert<Material>) );
- converters["Mesh"] = DNA::FactoryPair( static_cast<AllocProcPtr>(&Structure::Allocate<Mesh>), static_cast<ConvertProcPtr>(&Structure::Convert<Mesh>) );
- converters["MDeformVert"] = DNA::FactoryPair( static_cast<AllocProcPtr>(&Structure::Allocate<MDeformVert>), static_cast<ConvertProcPtr>(&Structure::Convert<MDeformVert>) );
- converters["World"] = DNA::FactoryPair( static_cast<AllocProcPtr>(&Structure::Allocate<World>), static_cast<ConvertProcPtr>(&Structure::Convert<World>) );
- converters["MVert"] = DNA::FactoryPair( static_cast<AllocProcPtr>(&Structure::Allocate<MVert>), static_cast<ConvertProcPtr>(&Structure::Convert<MVert>) );
- converters["MEdge"] = DNA::FactoryPair( static_cast<AllocProcPtr>(&Structure::Allocate<MEdge>), static_cast<ConvertProcPtr>(&Structure::Convert<MEdge>) );
- converters["GroupObject"] = DNA::FactoryPair( static_cast<AllocProcPtr>(&Structure::Allocate<GroupObject>), static_cast<ConvertProcPtr>(&Structure::Convert<GroupObject>) );
- converters["ListBase"] = DNA::FactoryPair( static_cast<AllocProcPtr>(&Structure::Allocate<ListBase>), static_cast<ConvertProcPtr>(&Structure::Convert<ListBase>) );
- converters["ModifierData"] = DNA::FactoryPair( static_cast<AllocProcPtr>(&Structure::Allocate<ModifierData>), static_cast<ConvertProcPtr>(&Structure::Convert<ModifierData>) );
- converters["ID"] = DNA::FactoryPair( static_cast<AllocProcPtr>(&Structure::Allocate<ID>), static_cast<ConvertProcPtr>(&Structure::Convert<ID>) );
- converters["MCol"] = DNA::FactoryPair( static_cast<AllocProcPtr>(&Structure::Allocate<MCol>), static_cast<ConvertProcPtr>(&Structure::Convert<MCol>) );
- converters["Image"] = DNA::FactoryPair( static_cast<AllocProcPtr>(&Structure::Allocate<Image>), static_cast<ConvertProcPtr>(&Structure::Convert<Image>) );
- converters["Scene"] = DNA::FactoryPair( static_cast<AllocProcPtr>(&Structure::Allocate<Scene>), static_cast<ConvertProcPtr>(&Structure::Convert<Scene>) );
- converters["Library"] = DNA::FactoryPair( static_cast<AllocProcPtr>(&Structure::Allocate<Library>), static_cast<ConvertProcPtr>(&Structure::Convert<Library>) );
- converters["Tex"] = DNA::FactoryPair( static_cast<AllocProcPtr>(&Structure::Allocate<Tex>), static_cast<ConvertProcPtr>(&Structure::Convert<Tex>) );
- converters["Camera"] = DNA::FactoryPair( static_cast<AllocProcPtr>(&Structure::Allocate<Camera>), static_cast<ConvertProcPtr>(&Structure::Convert<Camera>) );
- converters["MirrorModifierData"] = DNA::FactoryPair( static_cast<AllocProcPtr>(&Structure::Allocate<MirrorModifierData>), static_cast<ConvertProcPtr>(&Structure::Convert<MirrorModifierData>) );
+ converters["MFace"] = DNA::FactoryPair( static_cast<AllocProcPtr>(&Structure::Allocate<MFace>), static_cast<ConvertProcPtr>(&Structure::Convert<MFace>) );
+ converters["Lamp"] = DNA::FactoryPair( static_cast<AllocProcPtr>(&Structure::Allocate<Lamp>), static_cast<ConvertProcPtr>(&Structure::Convert<Lamp>) );
+ converters["MDeformWeight"] = DNA::FactoryPair( static_cast<AllocProcPtr>(&Structure::Allocate<MDeformWeight>), static_cast<ConvertProcPtr>(&Structure::Convert<MDeformWeight>) );
+ converters["PackedFile"] = DNA::FactoryPair( static_cast<AllocProcPtr>(&Structure::Allocate<PackedFile>), static_cast<ConvertProcPtr>(&Structure::Convert<PackedFile>) );
+ converters["Base"] = DNA::FactoryPair( static_cast<AllocProcPtr>(&Structure::Allocate<Base>), static_cast<ConvertProcPtr>(&Structure::Convert<Base>) );
+ converters["MTFace"] = DNA::FactoryPair( static_cast<AllocProcPtr>(&Structure::Allocate<MTFace>), static_cast<ConvertProcPtr>(&Structure::Convert<MTFace>) );
+ converters["Material"] = DNA::FactoryPair( static_cast<AllocProcPtr>(&Structure::Allocate<Material>), static_cast<ConvertProcPtr>(&Structure::Convert<Material>) );
+ converters["Mesh"] = DNA::FactoryPair( static_cast<AllocProcPtr>(&Structure::Allocate<Mesh>), static_cast<ConvertProcPtr>(&Structure::Convert<Mesh>) );
+ converters["MDeformVert"] = DNA::FactoryPair( static_cast<AllocProcPtr>(&Structure::Allocate<MDeformVert>), static_cast<ConvertProcPtr>(&Structure::Convert<MDeformVert>) );
+ converters["World"] = DNA::FactoryPair( static_cast<AllocProcPtr>(&Structure::Allocate<World>), static_cast<ConvertProcPtr>(&Structure::Convert<World>) );
+ converters["MVert"] = DNA::FactoryPair( static_cast<AllocProcPtr>(&Structure::Allocate<MVert>), static_cast<ConvertProcPtr>(&Structure::Convert<MVert>) );
+ converters["MEdge"] = DNA::FactoryPair( static_cast<AllocProcPtr>(&Structure::Allocate<MEdge>), static_cast<ConvertProcPtr>(&Structure::Convert<MEdge>) );
+ converters["GroupObject"] = DNA::FactoryPair( static_cast<AllocProcPtr>(&Structure::Allocate<GroupObject>), static_cast<ConvertProcPtr>(&Structure::Convert<GroupObject>) );
+ converters["ListBase"] = DNA::FactoryPair( static_cast<AllocProcPtr>(&Structure::Allocate<ListBase>), static_cast<ConvertProcPtr>(&Structure::Convert<ListBase>) );
+ converters["ModifierData"] = DNA::FactoryPair( static_cast<AllocProcPtr>(&Structure::Allocate<ModifierData>), static_cast<ConvertProcPtr>(&Structure::Convert<ModifierData>) );
+ converters["ID"] = DNA::FactoryPair( static_cast<AllocProcPtr>(&Structure::Allocate<ID>), static_cast<ConvertProcPtr>(&Structure::Convert<ID>) );
+ converters["MCol"] = DNA::FactoryPair( static_cast<AllocProcPtr>(&Structure::Allocate<MCol>), static_cast<ConvertProcPtr>(&Structure::Convert<MCol>) );
+ converters["Image"] = DNA::FactoryPair( static_cast<AllocProcPtr>(&Structure::Allocate<Image>), static_cast<ConvertProcPtr>(&Structure::Convert<Image>) );
+ converters["Scene"] = DNA::FactoryPair( static_cast<AllocProcPtr>(&Structure::Allocate<Scene>), static_cast<ConvertProcPtr>(&Structure::Convert<Scene>) );
+ converters["Library"] = DNA::FactoryPair( static_cast<AllocProcPtr>(&Structure::Allocate<Library>), static_cast<ConvertProcPtr>(&Structure::Convert<Library>) );
+ converters["Tex"] = DNA::FactoryPair( static_cast<AllocProcPtr>(&Structure::Allocate<Tex>), static_cast<ConvertProcPtr>(&Structure::Convert<Tex>) );
+ converters["Camera"] = DNA::FactoryPair( static_cast<AllocProcPtr>(&Structure::Allocate<Camera>), static_cast<ConvertProcPtr>(&Structure::Convert<Camera>) );
+ converters["MirrorModifierData"] = DNA::FactoryPair( static_cast<AllocProcPtr>(&Structure::Allocate<MirrorModifierData>), static_cast<ConvertProcPtr>(&Structure::Convert<MirrorModifierData>) );
}
diff --git a/3rdparty/assimp/code/BlenderScene.h b/3rdparty/assimp/code/BlenderScene.h
index 58d6adddb..5cfb7092f 100644
--- a/3rdparty/assimp/code/BlenderScene.h
+++ b/3rdparty/assimp/code/BlenderScene.h
@@ -44,7 +44,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef INCLUDED_AI_BLEND_SCENE_H
#define INCLUDED_AI_BLEND_SCENE_H
-namespace Assimp {
+namespace Assimp {
namespace Blender {
// Minor parts of this file are extracts from blender data structures,
@@ -63,7 +63,7 @@ namespace Assimp {
//
// * Structures may include the primitive types char, int, short,
// 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.
//
// * Structures may aggregate other structures, unless not defined
@@ -262,8 +262,8 @@ struct Library : ElemBase {
// -------------------------------------------------------------------------------
struct Camera : ElemBase {
enum Type {
- Type_PERSP = 0
- ,Type_ORTHO = 1
+ Type_PERSP = 0
+ ,Type_ORTHO = 1
};
ID id FAIL;
@@ -287,20 +287,20 @@ struct Camera : ElemBase {
struct Lamp : ElemBase {
enum FalloffType {
- FalloffType_Constant = 0x0
- ,FalloffType_InvLinear = 0x1
- ,FalloffType_InvSquare = 0x2
- //,FalloffType_Curve = 0x3
- //,FalloffType_Sliders = 0x4
+ FalloffType_Constant = 0x0
+ ,FalloffType_InvLinear = 0x1
+ ,FalloffType_InvSquare = 0x2
+ //,FalloffType_Curve = 0x3
+ //,FalloffType_Sliders = 0x4
};
enum Type {
- Type_Local = 0x0
- ,Type_Sun = 0x1
- ,Type_Spot = 0x2
- ,Type_Hemi = 0x3
- ,Type_Area = 0x4
- //,Type_YFPhoton = 0x5
+ Type_Local = 0x0
+ ,Type_Sun = 0x1
+ ,Type_Spot = 0x2
+ ,Type_Hemi = 0x3
+ ,Type_Area = 0x4
+ //,Type_YFPhoton = 0x5
};
ID id FAIL;
@@ -422,7 +422,7 @@ struct SubsurfModifierData : ElemBase {
enum Flags {
// some ommitted
- FLAGS_SubsurfUV =1<<3
+ FLAGS_SubsurfUV =1<<3
};
ModifierData modifier FAIL;
@@ -457,18 +457,18 @@ struct Object : ElemBase {
ID id FAIL;
enum Type {
- Type_EMPTY = 0
- ,Type_MESH = 1
- ,Type_CURVE = 2
- ,Type_SURF = 3
- ,Type_FONT = 4
- ,Type_MBALL = 5
-
- ,Type_LAMP = 10
- ,Type_CAMERA = 11
-
- ,Type_WAVE = 21
- ,Type_LATTICE = 22
+ Type_EMPTY = 0
+ ,Type_MESH = 1
+ ,Type_CURVE = 2
+ ,Type_SURF = 3
+ ,Type_FONT = 4
+ ,Type_MBALL = 5
+
+ ,Type_LAMP = 10
+ ,Type_CAMERA = 11
+
+ ,Type_WAVE = 21
+ ,Type_LATTICE = 22
};
Type type FAIL;
@@ -539,21 +539,21 @@ struct Tex : ElemBase {
// actually, the only texture type we support is Type_IMAGE
enum Type {
- Type_CLOUDS = 1
- ,Type_WOOD = 2
- ,Type_MARBLE = 3
- ,Type_MAGIC = 4
- ,Type_BLEND = 5
- ,Type_STUCCI = 6
- ,Type_NOISE = 7
- ,Type_IMAGE = 8
- ,Type_PLUGIN = 9
- ,Type_ENVMAP = 10
- ,Type_MUSGRAVE = 11
- ,Type_VORONOI = 12
- ,Type_DISTNOISE = 13
- ,Type_POINTDENSITY = 14
- ,Type_VOXELDATA = 15
+ Type_CLOUDS = 1
+ ,Type_WOOD = 2
+ ,Type_MARBLE = 3
+ ,Type_MAGIC = 4
+ ,Type_BLEND = 5
+ ,Type_STUCCI = 6
+ ,Type_NOISE = 7
+ ,Type_IMAGE = 8
+ ,Type_PLUGIN = 9
+ ,Type_ENVMAP = 10
+ ,Type_MUSGRAVE = 11
+ ,Type_VORONOI = 12
+ ,Type_DISTNOISE = 13
+ ,Type_POINTDENSITY = 14
+ ,Type_VOXELDATA = 15
};
ID id FAIL;
@@ -619,28 +619,28 @@ struct MTex : ElemBase {
};
enum Flag {
- Flag_RGBTOINT = 0x1
- ,Flag_STENCIL = 0x2
- ,Flag_NEGATIVE = 0x4
- ,Flag_ALPHAMIX = 0x8
- ,Flag_VIEWSPACE = 0x10
+ Flag_RGBTOINT = 0x1
+ ,Flag_STENCIL = 0x2
+ ,Flag_NEGATIVE = 0x4
+ ,Flag_ALPHAMIX = 0x8
+ ,Flag_VIEWSPACE = 0x10
};
enum BlendType {
- BlendType_BLEND = 0
- ,BlendType_MUL = 1
- ,BlendType_ADD = 2
- ,BlendType_SUB = 3
- ,BlendType_DIV = 4
- ,BlendType_DARK = 5
- ,BlendType_DIFF = 6
- ,BlendType_LIGHT = 7
- ,BlendType_SCREEN = 8
- ,BlendType_OVERLAY = 9
- ,BlendType_BLEND_HUE = 10
- ,BlendType_BLEND_SAT = 11
- ,BlendType_BLEND_VAL = 12
- ,BlendType_BLEND_COLOR = 13
+ BlendType_BLEND = 0
+ ,BlendType_MUL = 1
+ ,BlendType_ADD = 2
+ ,BlendType_SUB = 3
+ ,BlendType_DIV = 4
+ ,BlendType_DARK = 5
+ ,BlendType_DIFF = 6
+ ,BlendType_LIGHT = 7
+ ,BlendType_SCREEN = 8
+ ,BlendType_OVERLAY = 9
+ ,BlendType_BLEND_HUE = 10
+ ,BlendType_BLEND_SAT = 11
+ ,BlendType_BLEND_VAL = 12
+ ,BlendType_BLEND_COLOR = 13
};
// short texco, mapto, maptoneg;
diff --git a/3rdparty/assimp/code/BlenderSceneGen.h b/3rdparty/assimp/code/BlenderSceneGen.h
index 0a7096e5f..3ef5d341d 100644
--- a/3rdparty/assimp/code/BlenderSceneGen.h
+++ b/3rdparty/assimp/code/BlenderSceneGen.h
@@ -44,7 +44,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef INCLUDED_AI_BLEND_SCENEGEN_H
#define INCLUDED_AI_BLEND_SCENEGEN_H
-namespace Assimp {
+namespace Assimp {
namespace Blender {
diff --git a/3rdparty/assimp/code/BoostWorkaround/boost/LICENSE_1_0.txt b/3rdparty/assimp/code/BoostWorkaround/boost/LICENSE_1_0.txt
index 7925d62e6..36b7cd93c 100644
--- a/3rdparty/assimp/code/BoostWorkaround/boost/LICENSE_1_0.txt
+++ b/3rdparty/assimp/code/BoostWorkaround/boost/LICENSE_1_0.txt
@@ -21,4 +21,3 @@ SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
-
diff --git a/3rdparty/assimp/code/BoostWorkaround/boost/foreach.hpp b/3rdparty/assimp/code/BoostWorkaround/boost/foreach.hpp
index dfb05bdf5..e244cd57e 100644
--- a/3rdparty/assimp/code/BoostWorkaround/boost/foreach.hpp
+++ b/3rdparty/assimp/code/BoostWorkaround/boost/foreach.hpp
@@ -85,7 +85,7 @@ typename T::reference deref(auto_any_base const& cur, T&)
if (boost::foreach_detail::auto_any_base const& b = boost::foreach_detail::begin(container)) {} else \
if (boost::foreach_detail::auto_any_base const& e = boost::foreach_detail::end(container)) {} else \
for (;!boost::foreach_detail::done(b,e,container); boost::foreach_detail::next(b,container)) \
- if (bool ugly_and_unique_break = false) {} else \
+ if (bool ugly_and_unique_break = false) {} else \
for (item = boost::foreach_detail::deref(b,container); !ugly_and_unique_break; ugly_and_unique_break = true)
} // end boost
diff --git a/3rdparty/assimp/code/BoostWorkaround/boost/format.hpp b/3rdparty/assimp/code/BoostWorkaround/boost/format.hpp
index b7d956b29..0afae4ddf 100644
--- a/3rdparty/assimp/code/BoostWorkaround/boost/format.hpp
+++ b/3rdparty/assimp/code/BoostWorkaround/boost/format.hpp
@@ -75,7 +75,7 @@ namespace boost
#else
-# error "format.h was already included"
+# error "format.h was already included"
#endif //
#endif // !! AI_BOOST_FORMAT_DUMMY_INCLUDED
diff --git a/3rdparty/assimp/code/BoostWorkaround/boost/math/common_factor_rt.hpp b/3rdparty/assimp/code/BoostWorkaround/boost/math/common_factor_rt.hpp
index 8b07f69b4..76dd9b109 100644
--- a/3rdparty/assimp/code/BoostWorkaround/boost/math/common_factor_rt.hpp
+++ b/3rdparty/assimp/code/BoostWorkaround/boost/math/common_factor_rt.hpp
@@ -4,8 +4,8 @@
#define BOOST_MATH_COMMON_FACTOR_RT_HPP
-namespace boost {
-namespace math {
+namespace boost {
+namespace math {
// TODO: use binary GCD for unsigned integers ....
template < typename IntegerType >
diff --git a/3rdparty/assimp/code/BoostWorkaround/boost/scoped_array.hpp b/3rdparty/assimp/code/BoostWorkaround/boost/scoped_array.hpp
index cd7398193..ebb97171b 100644
--- a/3rdparty/assimp/code/BoostWorkaround/boost/scoped_array.hpp
+++ b/3rdparty/assimp/code/BoostWorkaround/boost/scoped_array.hpp
@@ -73,7 +73,7 @@ inline void swap(scoped_array<T> & a, scoped_array<T> & b)
} // end of namespace boost
#else
-# error "scoped_array.h was already included"
+# error "scoped_array.h was already included"
#endif
#endif // __AI_BOOST_SCOPED_ARRAY_INCLUDED
diff --git a/3rdparty/assimp/code/BoostWorkaround/boost/scoped_ptr.hpp b/3rdparty/assimp/code/BoostWorkaround/boost/scoped_ptr.hpp
index 84021a829..1ddee564a 100644
--- a/3rdparty/assimp/code/BoostWorkaround/boost/scoped_ptr.hpp
+++ b/3rdparty/assimp/code/BoostWorkaround/boost/scoped_ptr.hpp
@@ -73,7 +73,7 @@ inline void swap(scoped_ptr<T> & a, scoped_ptr<T> & b)
} // end of namespace boost
#else
-# error "scoped_ptr.h was already included"
+# error "scoped_ptr.h was already included"
#endif
#endif // __AI_BOOST_SCOPED_PTR_INCLUDED
diff --git a/3rdparty/assimp/code/BoostWorkaround/boost/shared_array.hpp b/3rdparty/assimp/code/BoostWorkaround/boost/shared_array.hpp
index 7f604ae08..ad58bd0d4 100644
--- a/3rdparty/assimp/code/BoostWorkaround/boost/shared_array.hpp
+++ b/3rdparty/assimp/code/BoostWorkaround/boost/shared_array.hpp
@@ -111,7 +111,7 @@ public:
// automatic destruction of the wrapped object when all
// references are freed.
- ~shared_array() {
+ ~shared_array() {
if (ctr) {
ctr = ctr->decref(ptr);
}
@@ -143,11 +143,11 @@ public:
}
// pointer access
- inline operator T*() {
+ inline operator T*() {
return ptr;
}
- inline T* operator-> () const {
+ inline T* operator-> () const {
return ptr;
}
@@ -160,7 +160,7 @@ public:
return ptr[index];
}
- inline const T* get() const {
+ inline const T* get() const {
return ptr;
}
@@ -176,7 +176,7 @@ public:
return ctr->get();
}
- inline void reset (T* t = 0) {
+ inline void reset (T* t = 0) {
if (ctr) {
ctr->decref(ptr);
}
@@ -184,7 +184,7 @@ public:
ctr = ptr?new array_detail::controller():NULL;
}
- void swap(shared_array & b) {
+ void swap(shared_array & b) {
std::swap(ptr, b.ptr);
std::swap(ctr, b.ctr);
}
@@ -223,6 +223,6 @@ bool operator< (const shared_array<T>& a, const shared_array<T>& b) {
} // end of namespace boost
#else
-# error "shared_array.h was already included"
+# error "shared_array.h was already included"
#endif
#endif // INCLUDED_AI_BOOST_SHARED_ARRAY
diff --git a/3rdparty/assimp/code/BoostWorkaround/boost/shared_ptr.hpp b/3rdparty/assimp/code/BoostWorkaround/boost/shared_ptr.hpp
index f0dd44911..e5f430c2a 100644
--- a/3rdparty/assimp/code/BoostWorkaround/boost/shared_ptr.hpp
+++ b/3rdparty/assimp/code/BoostWorkaround/boost/shared_ptr.hpp
@@ -115,7 +115,7 @@ public:
// automatic destruction of the wrapped object when all
// references are freed.
- ~shared_ptr() {
+ ~shared_ptr() {
if (ctr) {
ctr = ctr->decref(ptr);
}
@@ -147,11 +147,11 @@ public:
}
// pointer access
- inline operator T*() {
+ inline operator T*() {
return ptr;
}
- inline T* operator-> () const {
+ inline T* operator-> () const {
return ptr;
}
@@ -160,7 +160,7 @@ public:
return ptr;
}
- inline const T* get() const {
+ inline const T* get() const {
return ptr;
}
@@ -176,7 +176,7 @@ public:
return ctr->get();
}
- inline void reset (T* t = 0) {
+ inline void reset (T* t = 0) {
if (ctr) {
ctr->decref(ptr);
}
@@ -184,7 +184,7 @@ public:
ctr = ptr?new detail::controller():NULL;
}
- void swap(shared_ptr & b) {
+ void swap(shared_ptr & b) {
std::swap(ptr, b.ptr);
std::swap(ctr, b.ctr);
}
@@ -252,6 +252,6 @@ inline shared_ptr<T> const_pointer_cast( shared_ptr<U> ptr)
} // end of namespace boost
#else
-# error "shared_ptr.h was already included"
+# error "shared_ptr.h was already included"
#endif
#endif // INCLUDED_AI_BOOST_SCOPED_PTR
diff --git a/3rdparty/assimp/code/BoostWorkaround/boost/static_assert.hpp b/3rdparty/assimp/code/BoostWorkaround/boost/static_assert.hpp
index 4ee728bae..4b6489a79 100644
--- a/3rdparty/assimp/code/BoostWorkaround/boost/static_assert.hpp
+++ b/3rdparty/assimp/code/BoostWorkaround/boost/static_assert.hpp
@@ -14,7 +14,7 @@ namespace boost {
#define BOOST_STATIC_ASSERT(eval) \
-{boost::detail::static_assertion_failure<(eval)> assert_dummy; (void)assert_dummy;}
+{boost::detail::static_assertion_failure<(eval)> assert_dummy;assert_dummy;}
#endif
#endif // !! AI_BOOST_STATIC_ASSERT_INCLUDED
diff --git a/3rdparty/assimp/code/BoostWorkaround/boost/timer.hpp b/3rdparty/assimp/code/BoostWorkaround/boost/timer.hpp
index edf2df88b..df93b25f6 100644
--- a/3rdparty/assimp/code/BoostWorkaround/boost/timer.hpp
+++ b/3rdparty/assimp/code/BoostWorkaround/boost/timer.hpp
@@ -19,22 +19,12 @@
//#include <boost/config.hpp>
#include <ctime>
-#include <time.h>
//#include <boost/limits.hpp>
# ifdef BOOST_NO_STDC_NAMESPACE
namespace std { using ::clock_t; using ::clock; }
# endif
-//symbian workarounds for CLOCKS_PER_SEC
-#ifndef CLOCKS_PER_SEC
-#ifndef __CLK_TCK
-# warning CLOCKS_PER_SEC is undefined... defaulting to 100 (as per RVCT time.h)
-# define CLOCKS_PER_SEC 100
-#else
-# define CLOCKS_PER_SEC __CLK_TCK
-#endif
-#endif
namespace boost {
diff --git a/3rdparty/assimp/code/BoostWorkaround/boost/tuple/tuple.hpp b/3rdparty/assimp/code/BoostWorkaround/boost/tuple/tuple.hpp
index afd37bd79..d23f28a98 100644
--- a/3rdparty/assimp/code/BoostWorkaround/boost/tuple/tuple.hpp
+++ b/3rdparty/assimp/code/BoostWorkaround/boost/tuple/tuple.hpp
@@ -4,8 +4,8 @@
#ifndef BOOST_TUPLE_INCLUDED
#define BOOST_TUPLE_INCLUDED
-namespace boost {
- namespace detail {
+namespace boost {
+ namespace detail {
// Represents an empty tuple slot (up to 5 supported)
struct nulltype {};
@@ -29,13 +29,13 @@ namespace boost {
// Helper to obtain the type of a tuple element
template <typename T, unsigned NIDX, typename TNEXT, unsigned N /*= 0*/>
- struct type_getter {
+ struct type_getter {
typedef type_getter<typename TNEXT::type,NIDX+1,typename TNEXT::next_type,N> next_elem_getter;
typedef typename next_elem_getter::type type;
};
template <typename T, unsigned NIDX, typename TNEXT >
- struct type_getter <T,NIDX,TNEXT,NIDX> {
+ struct type_getter <T,NIDX,TNEXT,NIDX> {
typedef T type;
};
@@ -74,7 +74,7 @@ namespace boost {
// Explicit cast
template <typename T2, typename TNEXT2 >
- operator list_elem<T2,NIDX,TNEXT2> () const {
+ operator list_elem<T2,NIDX,TNEXT2> () const {
list_elem<T2,NIDX,TNEXT2> ret;
ret.me = (T2)me;
ret.next = next;
@@ -82,7 +82,7 @@ namespace boost {
}
// Recursively compare two elements (last element returns always true)
- bool operator == (const list_elem& s) const {
+ bool operator == (const list_elem& s) const {
return (me == s.me && next == s.next);
}
};
@@ -90,7 +90,7 @@ namespace boost {
// Represents a non-used tuple element - the very last element processed
template <typename TNEXT, unsigned NIDX >
struct list_elem<nulltype,NIDX,TNEXT> : list_elem_base<nulltype,NIDX,TNEXT> {
- template <unsigned N, bool IS_CONST = true> struct value_getter {
+ template <unsigned N, bool IS_CONST = true> struct value_getter {
/* just dummy members to produce readable error messages */
tuple_component_idx_out_of_bounds operator () (typename ConstIf<IS_CONST,list_elem>::t& me);
};
@@ -100,12 +100,12 @@ namespace boost {
};
// dummy
- list_elem& operator = (const list_elem& other) {
+ list_elem& operator = (const list_elem& other) {
return *this;
}
// dummy
- bool operator == (const list_elem& other) {
+ bool operator == (const list_elem& other) {
return true;
}
};
@@ -117,7 +117,7 @@ namespace boost {
// NOTE: This can't be a nested class as the compiler won't accept a full or
// partial specialization of a nested class of a non-specialized template
template <typename T, unsigned NIDX, typename TNEXT, bool IS_CONST, unsigned N>
- struct value_getter {
+ struct value_getter {
// calling list_elem
typedef list_elem<T,NIDX,TNEXT> outer_elem;
@@ -135,7 +135,7 @@ namespace boost {
};
template <typename T, unsigned NIDX, typename TNEXT, bool IS_CONST>
- struct value_getter <T,NIDX,TNEXT,IS_CONST,NIDX> {
+ struct value_getter <T,NIDX,TNEXT,IS_CONST,NIDX> {
typedef list_elem<T,NIDX,TNEXT> outer_elem;
typename ConstIf<IS_CONST,T>::t& operator () (typename ConstIf<IS_CONST,outer_elem >::t& me) {
@@ -150,7 +150,7 @@ namespace boost {
typename T2 = detail::nulltype,
typename T3 = detail::nulltype,
typename T4 = detail::nulltype>
- class tuple {
+ class tuple {
template <typename T0b,
typename T1b,
@@ -174,29 +174,29 @@ namespace boost {
// Get a specific tuple element
template <unsigned N>
- typename detail::type_getter<T0,0,typename very_long::next_type, N>::type& get () {
+ typename detail::type_getter<T0,0,typename very_long::next_type, N>::type& get () {
return m.get<N>();
}
// ... and the const version
template <unsigned N>
- typename const detail::type_getter<T0,0,typename very_long::next_type, N>::type& get () const {
+ typename const detail::type_getter<T0,0,typename very_long::next_type, N>::type& get () const {
return m.get<N>();
}
// comparison operators
- bool operator== (const tuple& other) const {
+ bool operator== (const tuple& other) const {
return m == other.m;
}
// ... and the other way round
- bool operator!= (const tuple& other) const {
+ bool operator!= (const tuple& other) const {
return !(m == other.m);
}
// cast to another tuple - all single elements must be convertible
- template < typename T0, typename T1,typename T2,
+ template < typename T0, typename T1,typename T2,
typename T3, typename T4>
operator tuple <T0,T1,T2,T3,T4> () const {
@@ -209,14 +209,14 @@ namespace boost {
// Another way to access an element ...
template <unsigned N,typename T0,typename T1,typename T2,typename T3,typename T4>
inline typename tuple<T0,T1,T2,T3,T4>::very_long::type_getter<N>::type& get (
- tuple<T0,T1,T2,T3,T4>& m) {
+ tuple<T0,T1,T2,T3,T4>& m) {
return m.get<N>();
}
// ... and the const version
template <unsigned N,typename T0,typename T1,typename T2,typename T3,typename T4>
inline const typename tuple<T0,T1,T2,T3,T4>::very_long::type_getter<N>::type& get (
- const tuple<T0,T1,T2,T3,T4>& m) {
+ const tuple<T0,T1,T2,T3,T4>& m) {
return m.get<N>();
}
diff --git a/3rdparty/assimp/code/ByteSwap.h b/3rdparty/assimp/code/ByteSwap.h
index 86ce9791e..c61b96df4 100644
--- a/3rdparty/assimp/code/ByteSwap.h
+++ b/3rdparty/assimp/code/ByteSwap.h
@@ -50,7 +50,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <stdlib.h>
#endif
-namespace Assimp {
+namespace Assimp {
// --------------------------------------------------------------------------------------
/** Defines some useful byte order swap routines.
*
@@ -205,39 +205,39 @@ template <typename T> struct ByteSwap::_swapper<T,8> {
// ByteSwap macros for BigEndian/LittleEndian support
// --------------------------------------------------------------------------------------
#if (defined AI_BUILD_BIG_ENDIAN)
-# define AI_LE(t) (t)
-# define AI_BE(t) ByteSwap::Swapped(t)
-# define AI_LSWAP2(p)
-# define AI_LSWAP4(p)
-# define AI_LSWAP8(p)
-# define AI_LSWAP2P(p)
-# define AI_LSWAP4P(p)
-# define AI_LSWAP8P(p)
-# define LE_NCONST const
-# define AI_SWAP2(p) ByteSwap::Swap2(&(p))
-# define AI_SWAP4(p) ByteSwap::Swap4(&(p))
-# define AI_SWAP8(p) ByteSwap::Swap8(&(p))
-# define AI_SWAP2P(p) ByteSwap::Swap2((p))
-# define AI_SWAP4P(p) ByteSwap::Swap4((p))
-# define AI_SWAP8P(p) ByteSwap::Swap8((p))
-# define BE_NCONST
+# define AI_LE(t) (t)
+# define AI_BE(t) ByteSwap::Swapped(t)
+# define AI_LSWAP2(p)
+# define AI_LSWAP4(p)
+# define AI_LSWAP8(p)
+# define AI_LSWAP2P(p)
+# define AI_LSWAP4P(p)
+# define AI_LSWAP8P(p)
+# define LE_NCONST const
+# define AI_SWAP2(p) ByteSwap::Swap2(&(p))
+# define AI_SWAP4(p) ByteSwap::Swap4(&(p))
+# define AI_SWAP8(p) ByteSwap::Swap8(&(p))
+# define AI_SWAP2P(p) ByteSwap::Swap2((p))
+# define AI_SWAP4P(p) ByteSwap::Swap4((p))
+# define AI_SWAP8P(p) ByteSwap::Swap8((p))
+# define BE_NCONST
#else
-# define AI_BE(t) (t)
-# define AI_LE(t) ByteSwap::Swapped(t)
-# define AI_SWAP2(p)
-# define AI_SWAP4(p)
-# define AI_SWAP8(p)
-# define AI_SWAP2P(p)
-# define AI_SWAP4P(p)
-# define AI_SWAP8P(p)
-# define BE_NCONST const
-# define AI_LSWAP2(p) ByteSwap::Swap2(&(p))
-# define AI_LSWAP4(p) ByteSwap::Swap4(&(p))
-# define AI_LSWAP8(p) ByteSwap::Swap8(&(p))
-# define AI_LSWAP2P(p) ByteSwap::Swap2((p))
-# define AI_LSWAP4P(p) ByteSwap::Swap4((p))
-# define AI_LSWAP8P(p) ByteSwap::Swap8((p))
-# define LE_NCONST
+# define AI_BE(t) (t)
+# define AI_LE(t) ByteSwap::Swapped(t)
+# define AI_SWAP2(p)
+# define AI_SWAP4(p)
+# define AI_SWAP8(p)
+# define AI_SWAP2P(p)
+# define AI_SWAP4P(p)
+# define AI_SWAP8P(p)
+# define BE_NCONST const
+# define AI_LSWAP2(p) ByteSwap::Swap2(&(p))
+# define AI_LSWAP4(p) ByteSwap::Swap4(&(p))
+# define AI_LSWAP8(p) ByteSwap::Swap8(&(p))
+# define AI_LSWAP2P(p) ByteSwap::Swap2((p))
+# define AI_LSWAP4P(p) ByteSwap::Swap4((p))
+# define AI_LSWAP8P(p) ByteSwap::Swap8((p))
+# define LE_NCONST
#endif
diff --git a/3rdparty/assimp/code/COBLoader.cpp b/3rdparty/assimp/code/COBLoader.cpp
index 9639fc6bd..7079b3596 100644
--- a/3rdparty/assimp/code/COBLoader.cpp
+++ b/3rdparty/assimp/code/COBLoader.cpp
@@ -91,7 +91,7 @@ bool COBImporter::CanRead( const std::string& pFile, IOSystem* pIOHandler, bool
return true;
}
- else if ((!extension.length() || checkSig) && pIOHandler) {
+ else if ((!extension.length() || checkSig) && pIOHandler) {
const char* tokens[] = {"Caligary"};
return SearchFileHeaderForToken(pIOHandler,pFile,tokens,1);
}
@@ -108,7 +108,7 @@ void COBImporter::GetExtensionList(std::set<std::string>& app)
// ------------------------------------------------------------------------------------------------
// Setup configuration properties for the loader
-void COBImporter::SetupProperties(const Importer* /*pImp*/)
+void COBImporter::SetupProperties(const Importer* pImp)
{
// nothing to be done for the moment
}
@@ -229,7 +229,7 @@ aiNode* COBImporter::BuildNodes(const Node& root,const Scene& scin,aiScene* fill
typedef std::pair<unsigned int,Mesh::FaceRefList> Entry;
for_each(const Entry& reflist,ndmesh.temp_map) {
- { // create mesh
+ { // create mesh
size_t n = 0;
for_each(Face* f, reflist.second) {
n += f->indices.size();
@@ -270,7 +270,7 @@ aiNode* COBImporter::BuildNodes(const Node& root,const Scene& scin,aiScene* fill
}
}
outmesh->mMaterialIndex = fill->mNumMaterials;
- }{ // create material
+ }{ // create material
const Material* min = NULL;
for_each(const Material& m, scin.materials) {
if (m.parent_id == ndmesh.id && m.matnum == reflist.first) {
@@ -296,7 +296,7 @@ aiNode* COBImporter::BuildNodes(const Node& root,const Scene& scin,aiScene* fill
mat->AddProperty(&tmp,1,AI_MATKEY_ENABLE_WIREFRAME);
}
- { int shader;
+ { int shader;
switch(min->shader)
{
case Material::FLAT:
@@ -439,7 +439,7 @@ void COBImporter::ReadChunkInfo_Ascii(ChunkInfo& out, const LineSplitter& splitt
splitter.get_tokens(all_tokens);
out.version = (all_tokens[1][1]-'0')*100+(all_tokens[1][3]-'0')*10+(all_tokens[1][4]-'0');
- out.id = strtol10(all_tokens[3]);
+ out.id = strtol10(all_tokens[3]);
out.parent_id = strtol10(all_tokens[5]);
out.size = strtol10s(all_tokens[7]);
}
@@ -465,47 +465,47 @@ void COBImporter::UnsupportedChunk_Ascii(LineSplitter& splitter, const ChunkInfo
}
// ------------------------------------------------------------------------------------------------
-void COBImporter::LogWarn_Ascii(const LineSplitter& splitter, const format& message) {
+void COBImporter::LogWarn_Ascii(const LineSplitter& splitter, const format& message) {
LogWarn_Ascii(message << " [at line "<< splitter.get_index()<<"]");
}
// ------------------------------------------------------------------------------------------------
-void COBImporter::LogError_Ascii(const LineSplitter& splitter, const format& message) {
+void COBImporter::LogError_Ascii(const LineSplitter& splitter, const format& message) {
LogError_Ascii(message << " [at line "<< splitter.get_index()<<"]");
}
// ------------------------------------------------------------------------------------------------
-void COBImporter::LogInfo_Ascii(const LineSplitter& splitter, const format& message) {
+void COBImporter::LogInfo_Ascii(const LineSplitter& splitter, const format& message) {
LogInfo_Ascii(message << " [at line "<< splitter.get_index()<<"]");
}
// ------------------------------------------------------------------------------------------------
-void COBImporter::LogDebug_Ascii(const LineSplitter& splitter, const format& message) {
+void COBImporter::LogDebug_Ascii(const LineSplitter& splitter, const format& message) {
LogDebug_Ascii(message << " [at line "<< splitter.get_index()<<"]");
}
// ------------------------------------------------------------------------------------------------
-void COBImporter::LogWarn_Ascii(const Formatter::format& message) {
+void COBImporter::LogWarn_Ascii(const Formatter::format& message) {
DefaultLogger::get()->warn(std::string("COB: ")+=message);
}
// ------------------------------------------------------------------------------------------------
-void COBImporter::LogError_Ascii(const Formatter::format& message) {
+void COBImporter::LogError_Ascii(const Formatter::format& message) {
DefaultLogger::get()->error(std::string("COB: ")+=message);
}
// ------------------------------------------------------------------------------------------------
-void COBImporter::LogInfo_Ascii(const Formatter::format& message) {
+void COBImporter::LogInfo_Ascii(const Formatter::format& message) {
DefaultLogger::get()->info(std::string("COB: ")+=message);
}
// ------------------------------------------------------------------------------------------------
-void COBImporter::LogDebug_Ascii(const Formatter::format& message) {
+void COBImporter::LogDebug_Ascii(const Formatter::format& message) {
DefaultLogger::get()->debug(std::string("COB: ")+=message);
}
// ------------------------------------------------------------------------------------------------
-void COBImporter::ReadBasicNodeInfo_Ascii(Node& msh, LineSplitter& splitter, const ChunkInfo& /*nfo*/)
+void COBImporter::ReadBasicNodeInfo_Ascii(Node& msh, LineSplitter& splitter, const ChunkInfo& nfo)
{
for (;splitter;++splitter) {
if (splitter.match_start("Name")) {
@@ -602,11 +602,11 @@ void COBImporter::ReadMat1_Ascii(Scene& out, LineSplitter& splitter, const Chunk
const char* tokens[10];
splitter.get_tokens(tokens);
- mat.alpha = fast_atof( tokens[1] );
- mat.ka = fast_atof( tokens[3] );
- mat.ks = fast_atof( tokens[5] );
- mat.exp = fast_atof( tokens[7] );
- mat.ior = fast_atof( tokens[9] );
+ mat.alpha = fast_atof( tokens[1] );
+ mat.ka = fast_atof( tokens[3] );
+ mat.ks = fast_atof( tokens[5] );
+ mat.exp = fast_atof( tokens[7] );
+ mat.ior = fast_atof( tokens[9] );
}
// ------------------------------------------------------------------------------------------------
@@ -639,7 +639,7 @@ void COBImporter::ReadUnit_Ascii(Scene& out, LineSplitter& splitter, const Chunk
}
// ------------------------------------------------------------------------------------------------
-void COBImporter::ReadChan_Ascii(Scene& /*out*/, LineSplitter& splitter, const ChunkInfo& nfo)
+void COBImporter::ReadChan_Ascii(Scene& out, LineSplitter& splitter, const ChunkInfo& nfo)
{
if (nfo.version > 8) {
return UnsupportedChunk_Ascii(splitter,nfo,"Chan");
@@ -850,7 +850,7 @@ void COBImporter::ReadPolH_Ascii(Scene& out, LineSplitter& splitter, const Chunk
}
// ------------------------------------------------------------------------------------------------
-void COBImporter::ReadBitM_Ascii(Scene& /*out*/, LineSplitter& splitter, const ChunkInfo& nfo)
+void COBImporter::ReadBitM_Ascii(Scene& out, LineSplitter& splitter, const ChunkInfo& nfo)
{
if (nfo.version > 1) {
return UnsupportedChunk_Ascii(splitter,nfo,"BitM");
@@ -873,7 +873,7 @@ void COBImporter::ReadBitM_Ascii(Scene& /*out*/, LineSplitter& splitter, const C
Bitmap::BitmapHeader data;
char opaq[sizeof Bitmap::BitmapHeader()];
};*/
-// ReadHexOctets(opaq,head,(++splitter)[1]);
+// ReadHexOctets(opaq,head,(++splitter)[1]);
}
// ------------------------------------------------------------------------------------------------
@@ -886,7 +886,7 @@ void COBImporter::ReadString_Binary(std::string& out, StreamReaderLE& reader)
}
// ------------------------------------------------------------------------------------------------
-void COBImporter::ReadBasicNodeInfo_Binary(Node& msh, StreamReaderLE& reader, const ChunkInfo& /*nfo*/)
+void COBImporter::ReadBasicNodeInfo_Binary(Node& msh, StreamReaderLE& reader, const ChunkInfo& nfo)
{
const unsigned int dupes = reader.GetI2();
ReadString_Binary(msh.name,reader);
@@ -982,7 +982,7 @@ void COBImporter::ReadBinaryFile(Scene& out, StreamReaderLE* reader)
else if (type == "Mat1") {
ReadMat1_Binary(out,*reader,nfo);
}
- /* else if (type == "Bone") {
+ /* else if (type == "Bone") {
ReadBone_Binary(out,*reader,nfo);
}
else if (type == "Chan") {
@@ -1077,7 +1077,7 @@ void COBImporter::ReadPolH_Binary(COB::Scene& out, StreamReaderLE& reader, const
}
// ------------------------------------------------------------------------------------------------
-void COBImporter::ReadBitM_Binary(COB::Scene& /*out*/, StreamReaderLE& reader, const ChunkInfo& nfo)
+void COBImporter::ReadBitM_Binary(COB::Scene& out, StreamReaderLE& reader, const ChunkInfo& nfo)
{
if (nfo.version > 1) {
return UnsupportedChunk_Binary(reader,nfo,"BitM");
diff --git a/3rdparty/assimp/code/COBLoader.h b/3rdparty/assimp/code/COBLoader.h
index 976fc6081..55e484b31 100644
--- a/3rdparty/assimp/code/COBLoader.h
+++ b/3rdparty/assimp/code/COBLoader.h
@@ -45,7 +45,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define INCLUDED_AI_COB_LOADER_H
#include "BaseImporter.h"
-namespace Assimp {
+namespace Assimp {
class LineSplitter;
// TinyFormatter.h
diff --git a/3rdparty/assimp/code/COBScene.h b/3rdparty/assimp/code/COBScene.h
index 2ce054b6e..794ee1376 100644
--- a/3rdparty/assimp/code/COBScene.h
+++ b/3rdparty/assimp/code/COBScene.h
@@ -47,7 +47,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <boost/shared_ptr.hpp>
#include "BaseImporter.h"
-namespace Assimp {
+namespace Assimp {
namespace COB {
// ------------------
@@ -74,10 +74,10 @@ struct ChunkInfo
enum {NO_SIZE=0xffffffff};
ChunkInfo ()
- : id (0)
- , parent_id (0)
- , version (0)
- , size (NO_SIZE)
+ : id (0)
+ , parent_id (0)
+ , version (0)
+ , size (NO_SIZE)
{}
// Id of this chunk, unique within file
@@ -92,18 +92,6 @@ struct ChunkInfo
// chunk size in bytes, only relevant for binary files
// NO_SIZE is also valid.
unsigned int size;
-/*
- ChunkInfo& ChunkInfo::operator=(const ChunkInfo &rhs) {
- // Only do assignment if RHS is a different object from this.
- if (this != &rhs) {
- this->id=rhs.id;
- this->parent_id=rhs.parent_id;
- this->version=rhs.version;
- this->size=rhs.size;
- }
-
- return *this;
- }*/
};
// ------------------
diff --git a/3rdparty/assimp/code/CSMLoader.cpp b/3rdparty/assimp/code/CSMLoader.cpp
index 5e91fea35..2348c7380 100644
--- a/3rdparty/assimp/code/CSMLoader.cpp
+++ b/3rdparty/assimp/code/CSMLoader.cpp
@@ -90,7 +90,7 @@ void CSMImporter::GetExtensionList(std::set<std::string>& extensions)
// ------------------------------------------------------------------------------------------------
// Setup configuration properties for the loader
-void CSMImporter::SetupProperties(const Importer* /*pImp*/)
+void CSMImporter::SetupProperties(const Importer* pImp)
{
// nothing to be done for the moment
}
@@ -116,31 +116,31 @@ void CSMImporter::InternReadFile( const std::string& pFile,
int first = 0, last = 0x00ffffff;
// now process the file and look out for '$' sections
- while (1) {
+ while (1) {
SkipSpaces(&buffer);
if ('\0' == *buffer)
break;
- if ('$' == *buffer) {
+ if ('$' == *buffer) {
++buffer;
- if (TokenMatchI(buffer,"firstframe",10)) {
+ if (TokenMatchI(buffer,"firstframe",10)) {
SkipSpaces(&buffer);
first = strtol10s(buffer,&buffer);
}
- else if (TokenMatchI(buffer,"lastframe",9)) {
+ else if (TokenMatchI(buffer,"lastframe",9)) {
SkipSpaces(&buffer);
last = strtol10s(buffer,&buffer);
}
- else if (TokenMatchI(buffer,"rate",4)) {
+ else if (TokenMatchI(buffer,"rate",4)) {
SkipSpaces(&buffer);
float d;
buffer = fast_atof_move(buffer,d);
anim->mTicksPerSecond = d;
}
- else if (TokenMatchI(buffer,"order",5)) {
+ else if (TokenMatchI(buffer,"order",5)) {
std::vector< aiNodeAnim* > anims_temp;
anims_temp.reserve(30);
- while (1) {
+ while (1) {
SkipSpaces(&buffer);
if (IsLineEnd(*buffer) && SkipSpacesAndLineEnd(&buffer) && *buffer == '$')
break; // next section
@@ -165,7 +165,7 @@ void CSMImporter::InternReadFile( const std::string& pFile,
anim->mChannels = new aiNodeAnim*[anim->mNumChannels];
::memcpy(anim->mChannels,&anims_temp[0],sizeof(aiNodeAnim*)*anim->mNumChannels);
}
- else if (TokenMatchI(buffer,"points",6)) {
+ else if (TokenMatchI(buffer,"points",6)) {
if (!anim->mNumChannels)
throw DeadlyImportError("CSM: \'$order\' section is required to appear prior to \'$points\'");
@@ -182,9 +182,9 @@ void CSMImporter::InternReadFile( const std::string& pFile,
unsigned int filled = 0;
// Now read all point data.
- while (1) {
+ while (1) {
SkipSpaces(&buffer);
- if (IsLineEnd(*buffer) && (!SkipSpacesAndLineEnd(&buffer) || *buffer == '$')) {
+ if (IsLineEnd(*buffer) && (!SkipSpacesAndLineEnd(&buffer) || *buffer == '$')) {
break; // next section
}
@@ -192,10 +192,10 @@ void CSMImporter::InternReadFile( const std::string& pFile,
const int frame = ::strtol10(buffer,&buffer);
last = std::max(frame,last);
first = std::min(frame,last);
- for (unsigned int i = 0; i < anim->mNumChannels;++i) {
+ for (unsigned int i = 0; i < anim->mNumChannels;++i) {
aiNodeAnim* s = anim->mChannels[i];
- if (s->mNumPositionKeys == alloc) { /* need to reallocate? */
+ if (s->mNumPositionKeys == alloc) { /* need to reallocate? */
aiVectorKey* old = s->mPositionKeys;
s->mPositionKeys = new aiVectorKey[s->mNumPositionKeys = alloc*2];
@@ -207,11 +207,11 @@ void CSMImporter::InternReadFile( const std::string& pFile,
if (!SkipSpacesAndLineEnd(&buffer))
throw DeadlyImportError("CSM: Unexpected EOF occured reading sample x coord");
- if (TokenMatchI(buffer, "DROPOUT", 7)) {
+ if (TokenMatchI(buffer, "DROPOUT", 7)) {
// seems this is invalid marker data; at least the doc says it's possible
DefaultLogger::get()->warn("CSM: Encountered invalid marker data (DROPOUT)");
}
- else {
+ else {
aiVectorKey* sub = s->mPositionKeys + s->mNumPositionKeys;
sub->mTime = (double)frame;
buffer = fast_atof_move(buffer, (float&)sub->mValue.x);
@@ -235,14 +235,14 @@ void CSMImporter::InternReadFile( const std::string& pFile,
++filled;
}
// all channels must be complete in order to continue safely.
- for (unsigned int i = 0; i < anim->mNumChannels;++i) {
+ for (unsigned int i = 0; i < anim->mNumChannels;++i) {
if (!anim->mChannels[i]->mNumPositionKeys)
throw DeadlyImportError("CSM: Invalid marker track");
}
}
}
- else {
+ else {
// advance to the next line
SkipLine(&buffer);
}
@@ -258,7 +258,7 @@ void CSMImporter::InternReadFile( const std::string& pFile,
pScene->mRootNode->mNumChildren = 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];
aiNode* nd = pScene->mRootNode->mChildren[i] = new aiNode();
diff --git a/3rdparty/assimp/code/CSMLoader.h b/3rdparty/assimp/code/CSMLoader.h
index f3d1c458d..2b5e8e639 100644
--- a/3rdparty/assimp/code/CSMLoader.h
+++ b/3rdparty/assimp/code/CSMLoader.h
@@ -43,7 +43,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef INCLUDED_AI_CSM_LOADER_H
#define INCLUDED_AI_CSM_LOADER_H
-namespace Assimp {
+namespace Assimp {
// ---------------------------------------------------------------------------
/** Importer class to load MOCAPs in CharacterStudio Motion format.
diff --git a/3rdparty/assimp/code/ColladaHelper.h b/3rdparty/assimp/code/ColladaHelper.h
index ddf149903..355571f04 100644
--- a/3rdparty/assimp/code/ColladaHelper.h
+++ b/3rdparty/assimp/code/ColladaHelper.h
@@ -43,8 +43,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef AI_COLLADAHELPER_H_INC
#define AI_COLLADAHELPER_H_INC
-namespace Assimp {
-namespace Collada {
+namespace Assimp {
+namespace Collada {
/** Collada file versions which evolved during the years ... */
enum FormatVersion
@@ -91,12 +91,12 @@ struct Transform
struct Camera
{
Camera()
- : mOrtho (false)
- , mHorFov (10e10f)
- , mVerFov (10e10f)
- , mAspect (10e10f)
- , mZNear (0.1f)
- , mZFar (1000.f)
+ : mOrtho (false)
+ , mHorFov (10e10f)
+ , mVerFov (10e10f)
+ , mAspect (10e10f)
+ , mZNear (0.1f)
+ , mZFar (1000.f)
{}
// Name of camera
@@ -124,14 +124,14 @@ struct Camera
struct Light
{
Light()
- : mAttConstant (1.f)
- , mAttLinear (0.f)
- , mAttQuadratic (0.f)
- , mFalloffAngle (180.f)
- , mFalloffExponent (0.f)
- , mPenumbraAngle (10e10f)
- , mOuterAngle (10e10f)
- , mIntensity (1.f)
+ : mAttConstant (1.f)
+ , mAttLinear (0.f)
+ , mAttQuadratic (0.f)
+ , mFalloffAngle (180.f)
+ , mFalloffExponent (0.f)
+ , mPenumbraAngle (10e10f)
+ , mOuterAngle (10e10f)
+ , mIntensity (1.f)
{}
//! Type of the light source aiLightSourceType + ambient
@@ -162,7 +162,7 @@ struct Light
struct InputSemanticMapEntry
{
InputSemanticMapEntry()
- : mSet (0)
+ : mSet (0)
{}
//! Index of set, optional
@@ -297,7 +297,7 @@ struct Face
struct InputChannel
{
InputType mType; // Type of the data
- size_t mIndex; // Optional index, if multiple sets of the same data type are given
+ size_t mIndex; // Optional index, if multiple sets of the same data type are given
size_t mOffset; // Index offset in the indices array of per-face indices. Don't ask, can't explain that any better.
std::string mAccessor; // ID of the accessor where to read the actual values from.
mutable const Accessor* mResolved; // Pointer to the accessor, if resolved. NULL else
@@ -424,14 +424,14 @@ enum ShadeType
struct Sampler
{
Sampler()
- : mWrapU (true)
- , mWrapV (true)
- , mMirrorU ()
- , mMirrorV ()
- , mOp (aiTextureOp_Multiply)
- , mUVId (0xffffffff)
- , mWeighting (1.f)
- , mMixWithPrevious (1.f)
+ : mWrapU (true)
+ , mWrapV (true)
+ , mMirrorU ()
+ , mMirrorV ()
+ , mOp (aiTextureOp_Multiply)
+ , mUVId (0xffffffff)
+ , mWeighting (1.f)
+ , mMixWithPrevious (1.f)
{}
/** Name of image reference
@@ -512,16 +512,16 @@ struct Effect
Effect()
: mShadeType (Shade_Phong)
- , mEmissive ( 0, 0, 0, 1)
- , mAmbient ( 0.1f, 0.1f, 0.1f, 1)
- , mDiffuse ( 0.6f, 0.6f, 0.6f, 1)
- , mSpecular ( 0.4f, 0.4f, 0.4f, 1)
- , mTransparent ( 0, 0, 0, 1)
+ , mEmissive ( 0, 0, 0, 1)
+ , mAmbient ( 0.1f, 0.1f, 0.1f, 1)
+ , mDiffuse ( 0.6f, 0.6f, 0.6f, 1)
+ , mSpecular ( 0.4f, 0.4f, 0.4f, 1)
+ , mTransparent ( 0, 0, 0, 1)
, mShininess (10.0f)
, mRefractIndex (1.f)
, mReflectivity (1.f)
, mTransparency (0.f)
- , mDoubleSided (false)
+ , mDoubleSided (false)
, mWireframe (false)
, mFaceted (false)
{
diff --git a/3rdparty/assimp/code/ColladaLoader.cpp b/3rdparty/assimp/code/ColladaLoader.cpp
index c3f0a7874..7f7ce8048 100644
--- a/3rdparty/assimp/code/ColladaLoader.cpp
+++ b/3rdparty/assimp/code/ColladaLoader.cpp
@@ -77,7 +77,7 @@ bool ColladaLoader::CanRead( const std::string& pFile, IOSystem* pIOHandler, boo
return true;
// XML - too generic, we need to open the file and search for typical keywords
- if ( extension == "xml" || !extension.length() || checkSig) {
+ if ( extension == "xml" || !extension.length() || checkSig) {
/* If CanRead() is called in order to check whether we
* support a specific file extension in general pIOHandler
* might be NULL and it's our duty to return true here.
@@ -242,7 +242,7 @@ void ColladaLoader::ResolveNodeInstances( const ColladaParser& pParser, const Co
DefaultLogger::get()->error("Collada: Unable to resolve reference to instanced node " + (*it).mNode);
else {
- // attach this node to the list of children
+ // attach this node to the list of children
resolved.push_back(nd);
}
}
@@ -370,7 +370,7 @@ void ColladaLoader::BuildCamerasForNode( const ColladaParser& pParser, const Col
tan(AI_DEG_TO_RAD(srcCamera->mVerFov));
}
}
- else if (srcCamera->mAspect != 10e10f && srcCamera->mVerFov != 10e10f) {
+ else if (srcCamera->mAspect != 10e10f && srcCamera->mVerFov != 10e10f) {
out->mHorizontalFOV = 2.0f * AI_RAD_TO_DEG(atan(srcCamera->mAspect *
tan(AI_DEG_TO_RAD(srcCamera->mVerFov) * 0.5f)));
}
@@ -431,16 +431,21 @@ void ColladaLoader::BuildMeshesForNode( const ColladaParser& pParser, const Coll
continue;
// find material assigned to this submesh
+ std::string meshMaterial;
std::map<std::string, Collada::SemanticMappingTable >::const_iterator meshMatIt = mid.mMaterials.find( submesh.mMaterial);
- const Collada::SemanticMappingTable* table;
+ const Collada::SemanticMappingTable* table = NULL;
if ( meshMatIt != mid.mMaterials.end())
+ {
table = &meshMatIt->second;
- else {
- table = NULL;
+ meshMaterial = table->mMatName;
+ }
+ else
+ {
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() )
+ meshMaterial = mid.mMaterials.begin()->second.mMatName;
}
- const std::string& meshMaterial = table ? table->mMatName : "";
// OK ... here the *real* fun starts ... we have the vertex-input-to-effect-semantic-table
// given. The only mapping stuff which we do actually support is the UV channel.
@@ -469,7 +474,7 @@ void ColladaLoader::BuildMeshesForNode( const ColladaParser& pParser, const Coll
// if we already have the mesh at the library, just add its index to the node's array
std::map<ColladaMeshIndex, size_t>::const_iterator dstMeshIt = mMeshIndexByID.find( index);
- if ( dstMeshIt != mMeshIndexByID.end()) {
+ if ( dstMeshIt != mMeshIndexByID.end()) {
newMeshRefs.push_back( dstMeshIt->second);
}
else
@@ -585,8 +590,8 @@ aiMesh* ColladaLoader::CreateMesh( const ColladaParser& pParser, const Collada::
if ( pSrcController)
{
// refuse if the vertex count does not match
-// if ( pSrcController->mWeightCounts.size() != dstMesh->mNumVertices)
-// throw DeadlyImportError( "Joint Controller vertex count does not match mesh vertex count");
+// if ( pSrcController->mWeightCounts.size() != dstMesh->mNumVertices)
+// throw DeadlyImportError( "Joint Controller vertex count does not match mesh vertex count");
// resolve references - joint names
const Collada::Accessor& jointNamesAcc = pParser.ResolveLibraryReference( pParser.mAccessorLibrary, pSrcController->mJointNameSource);
@@ -639,14 +644,14 @@ aiMesh* ColladaLoader::CreateMesh( const ColladaParser& pParser, const Collada::
float weight = ReadFloat( weightsAcc, weights, vertexIndex, 0);
- // one day I gonna kill that XSI Collada exporter
- if ( weight > 0.0f)
- {
- aiVertexWeight w;
- w.mVertexId = a - pStartVertex;
- w.mWeight = weight;
- dstBones[jointIndex].push_back( w);
- }
+ // one day I gonna kill that XSI Collada exporter
+ if ( weight > 0.0f)
+ {
+ aiVertexWeight w;
+ w.mVertexId = a - pStartVertex;
+ w.mWeight = weight;
+ dstBones[jointIndex].push_back( w);
+ }
}
}
@@ -685,41 +690,41 @@ aiMesh* ColladaLoader::CreateMesh( const ColladaParser& pParser, const Collada::
bone->mWeights = new aiVertexWeight[bone->mNumWeights];
std::copy( dstBones[a].begin(), dstBones[a].end(), bone->mWeights);
- // apply bind shape matrix to offset matrix
- aiMatrix4x4 bindShapeMatrix;
- bindShapeMatrix.a1 = pSrcController->mBindShapeMatrix[0];
- bindShapeMatrix.a2 = pSrcController->mBindShapeMatrix[1];
- bindShapeMatrix.a3 = pSrcController->mBindShapeMatrix[2];
- bindShapeMatrix.a4 = pSrcController->mBindShapeMatrix[3];
- bindShapeMatrix.b1 = pSrcController->mBindShapeMatrix[4];
- bindShapeMatrix.b2 = pSrcController->mBindShapeMatrix[5];
- bindShapeMatrix.b3 = pSrcController->mBindShapeMatrix[6];
- bindShapeMatrix.b4 = pSrcController->mBindShapeMatrix[7];
- bindShapeMatrix.c1 = pSrcController->mBindShapeMatrix[8];
- bindShapeMatrix.c2 = pSrcController->mBindShapeMatrix[9];
- bindShapeMatrix.c3 = pSrcController->mBindShapeMatrix[10];
- bindShapeMatrix.c4 = pSrcController->mBindShapeMatrix[11];
- bindShapeMatrix.d1 = pSrcController->mBindShapeMatrix[12];
- bindShapeMatrix.d2 = pSrcController->mBindShapeMatrix[13];
- bindShapeMatrix.d3 = pSrcController->mBindShapeMatrix[14];
- bindShapeMatrix.d4 = pSrcController->mBindShapeMatrix[15];
- bone->mOffsetMatrix *= bindShapeMatrix;
-
- // HACK: (thom) Some exporters address the bone nodes by SID, others address them by ID or even name.
- // Therefore I added a little name replacement here: I search for the bone's node by either name, ID or SID,
- // and replace the bone's name by the node's name so that the user can use the standard
- // find-by-name method to associate nodes with bones.
- const Collada::Node* bnode = FindNode( pParser.mRootNode, bone->mName.data);
- if ( !bnode)
- bnode = FindNodeBySID( pParser.mRootNode, bone->mName.data);
-
- // assign the name that we would have assigned for the source node
- if ( bnode)
- bone->mName.Set( FindNameForNode( bnode));
- else
- DefaultLogger::get()->warn( boost::str( boost::format( "ColladaLoader::CreateMesh(): could not find corresponding node for joint \"%s\".") % bone->mName.data));
-
- // and insert bone
+ // apply bind shape matrix to offset matrix
+ aiMatrix4x4 bindShapeMatrix;
+ bindShapeMatrix.a1 = pSrcController->mBindShapeMatrix[0];
+ bindShapeMatrix.a2 = pSrcController->mBindShapeMatrix[1];
+ bindShapeMatrix.a3 = pSrcController->mBindShapeMatrix[2];
+ bindShapeMatrix.a4 = pSrcController->mBindShapeMatrix[3];
+ bindShapeMatrix.b1 = pSrcController->mBindShapeMatrix[4];
+ bindShapeMatrix.b2 = pSrcController->mBindShapeMatrix[5];
+ bindShapeMatrix.b3 = pSrcController->mBindShapeMatrix[6];
+ bindShapeMatrix.b4 = pSrcController->mBindShapeMatrix[7];
+ bindShapeMatrix.c1 = pSrcController->mBindShapeMatrix[8];
+ bindShapeMatrix.c2 = pSrcController->mBindShapeMatrix[9];
+ bindShapeMatrix.c3 = pSrcController->mBindShapeMatrix[10];
+ bindShapeMatrix.c4 = pSrcController->mBindShapeMatrix[11];
+ bindShapeMatrix.d1 = pSrcController->mBindShapeMatrix[12];
+ bindShapeMatrix.d2 = pSrcController->mBindShapeMatrix[13];
+ bindShapeMatrix.d3 = pSrcController->mBindShapeMatrix[14];
+ bindShapeMatrix.d4 = pSrcController->mBindShapeMatrix[15];
+ bone->mOffsetMatrix *= bindShapeMatrix;
+
+ // HACK: (thom) Some exporters address the bone nodes by SID, others address them by ID or even name.
+ // Therefore I added a little name replacement here: I search for the bone's node by either name, ID or SID,
+ // and replace the bone's name by the node's name so that the user can use the standard
+ // find-by-name method to associate nodes with bones.
+ const Collada::Node* bnode = FindNode( pParser.mRootNode, bone->mName.data);
+ if ( !bnode)
+ bnode = FindNodeBySID( pParser.mRootNode, bone->mName.data);
+
+ // assign the name that we would have assigned for the source node
+ if ( bnode)
+ bone->mName.Set( FindNameForNode( bnode));
+ else
+ DefaultLogger::get()->warn( boost::str( boost::format( "ColladaLoader::CreateMesh(): could not find corresponding node for joint \"%s\".") % bone->mName.data));
+
+ // and insert bone
dstMesh->mBones[boneCount++] = bone;
}
}
@@ -894,7 +899,7 @@ void ColladaLoader::CreateAnimation( aiScene* pScene, const ColladaParser& pPars
// find the collada node corresponding to the aiNode
const Collada::Node* srcNode = FindNode( pParser.mRootNode, nodeName);
-// ai_assert( srcNode != NULL);
+// ai_assert( srcNode != NULL);
if ( !srcNode)
continue;
@@ -1174,7 +1179,7 @@ void ColladaLoader::AddTexture ( Assimp::MaterialHelper& mat, const ColladaParse
// ------------------------------------------------------------------------------------------------
// Fills materials from the collada material definitions
-void ColladaLoader::FillMaterials( const ColladaParser& pParser, aiScene* /*pScene*/)
+void ColladaLoader::FillMaterials( const ColladaParser& pParser, aiScene* pScene)
{
for (std::vector<std::pair<Collada::Effect*, aiMaterial*> >::iterator it = newMats.begin(),
end = newMats.end(); it != end; ++it)
@@ -1222,7 +1227,7 @@ void ColladaLoader::FillMaterials( const ColladaParser& pParser, aiScene* /*pSce
mat.AddProperty( &effect.mAmbient, 1,AI_MATKEY_COLOR_AMBIENT);
mat.AddProperty( &effect.mDiffuse, 1, AI_MATKEY_COLOR_DIFFUSE);
mat.AddProperty( &effect.mSpecular, 1,AI_MATKEY_COLOR_SPECULAR);
- mat.AddProperty( &effect.mEmissive, 1, AI_MATKEY_COLOR_EMISSIVE);
+ mat.AddProperty( &effect.mEmissive, 1, AI_MATKEY_COLOR_EMISSIVE);
mat.AddProperty( &effect.mTransparent, 1, AI_MATKEY_COLOR_TRANSPARENT);
mat.AddProperty( &effect.mReflective, 1, AI_MATKEY_COLOR_REFLECTIVE);
@@ -1266,7 +1271,7 @@ void ColladaLoader::FillMaterials( const ColladaParser& pParser, aiScene* /*pSce
// ------------------------------------------------------------------------------------------------
// Constructs materials from the collada material definitions
-void ColladaLoader::BuildMaterials( const ColladaParser& pParser, aiScene* /*pScene*/)
+void ColladaLoader::BuildMaterials( const ColladaParser& pParser, aiScene* pScene)
{
newMats.reserve(pParser.mMaterialLibrary.size());
diff --git a/3rdparty/assimp/code/ColladaLoader.h b/3rdparty/assimp/code/ColladaLoader.h
index 1fcdff1e1..72439eb90 100644
--- a/3rdparty/assimp/code/ColladaLoader.h
+++ b/3rdparty/assimp/code/ColladaLoader.h
@@ -89,7 +89,7 @@ protected:
public:
/** 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;
protected:
diff --git a/3rdparty/assimp/code/ColladaParser.cpp b/3rdparty/assimp/code/ColladaParser.cpp
index e2dfffbcb..2513b9297 100644
--- a/3rdparty/assimp/code/ColladaParser.cpp
+++ b/3rdparty/assimp/code/ColladaParser.cpp
@@ -870,7 +870,7 @@ void ColladaParser::ReadLightLibrary()
SkipElement();
}
}
- else if ( mReader->getNodeType() == irr::io::EXN_ELEMENT_END) {
+ else if ( mReader->getNodeType() == irr::io::EXN_ELEMENT_END) {
if ( strcmp( mReader->getNodeName(), "library_lights") != 0)
ThrowException( "Expected end of \"library_lights\" element.");
@@ -909,7 +909,7 @@ void ColladaParser::ReadCameraLibrary()
SkipElement();
}
}
- else if ( mReader->getNodeType() == irr::io::EXN_ELEMENT_END) {
+ else if ( mReader->getNodeType() == irr::io::EXN_ELEMENT_END) {
if ( strcmp( mReader->getNodeName(), "library_cameras") != 0)
ThrowException( "Expected end of \"library_cameras\" element.");
@@ -1146,7 +1146,7 @@ void ColladaParser::ReadEffectProfileCommon( Collada::Effect& pEffect)
{
if ( mReader->getNodeType() == irr::io::EXN_ELEMENT)
{
- if ( IsElement( "newparam")) {
+ if ( IsElement( "newparam")) {
// save ID
int attrSID = GetAttribute( "sid");
std::string sid = mReader->getAttributeValue( attrSID);
@@ -1208,11 +1208,11 @@ void ColladaParser::ReadEffectProfileCommon( Collada::Effect& pEffect)
// MAX3D extensions
// -------------------------------------------------------
- else if ( IsElement( "wireframe")) {
+ else if ( IsElement( "wireframe")) {
pEffect.mWireframe = ReadBoolFromTextContent();
TestClosing( "wireframe");
}
- else if ( IsElement( "faceted")) {
+ else if ( IsElement( "faceted")) {
pEffect.mFaceted = ReadBoolFromTextContent();
TestClosing( "faceted");
}
@@ -1245,43 +1245,43 @@ void ColladaParser::ReadSamplerProperties( Sampler& out )
// MAYA extensions
// -------------------------------------------------------
- if ( IsElement( "wrapU")) {
+ if ( IsElement( "wrapU")) {
out.mWrapU = ReadBoolFromTextContent();
TestClosing( "wrapU");
}
- else if ( IsElement( "wrapV")) {
+ else if ( IsElement( "wrapV")) {
out.mWrapU = ReadBoolFromTextContent();
TestClosing( "wrapV");
}
- else if ( IsElement( "mirrorU")) {
+ else if ( IsElement( "mirrorU")) {
out.mMirrorU = ReadBoolFromTextContent();
TestClosing( "mirrorU");
}
- else if ( IsElement( "mirrorV")) {
+ else if ( IsElement( "mirrorV")) {
out.mMirrorU = ReadBoolFromTextContent();
TestClosing( "mirrorV");
}
- else if ( IsElement( "repeatU")) {
+ else if ( IsElement( "repeatU")) {
out.mTransform.mScaling.x = ReadFloatFromTextContent();
TestClosing( "repeatU");
}
- else if ( IsElement( "repeatV")) {
+ else if ( IsElement( "repeatV")) {
out.mTransform.mScaling.y = ReadFloatFromTextContent();
TestClosing( "repeatV");
}
- else if ( IsElement( "offsetU")) {
+ else if ( IsElement( "offsetU")) {
out.mTransform.mTranslation.x = ReadFloatFromTextContent();
TestClosing( "offsetU");
}
- else if ( IsElement( "offsetV")) {
+ else if ( IsElement( "offsetV")) {
out.mTransform.mTranslation.x = ReadFloatFromTextContent();
TestClosing( "offsetV");
}
- else if ( IsElement( "rotateUV")) {
+ else if ( IsElement( "rotateUV")) {
out.mTransform.mRotation = ReadFloatFromTextContent();
TestClosing( "rotateUV");
}
- else if ( IsElement( "blend_mode")) {
+ else if ( IsElement( "blend_mode")) {
const char* sz = GetTextContent();
// http://www.feelingsoftware.com/content/view/55/72/lang,en/
@@ -1302,17 +1302,17 @@ void ColladaParser::ReadSamplerProperties( Sampler& out )
}
// OKINO extensions
// -------------------------------------------------------
- else if ( IsElement( "weighting")) {
+ else if ( IsElement( "weighting")) {
out.mWeighting = ReadFloatFromTextContent();
TestClosing( "weighting");
}
- else if ( IsElement( "mix_with_previous_layer")) {
+ else if ( IsElement( "mix_with_previous_layer")) {
out.mMixWithPrevious = ReadFloatFromTextContent();
TestClosing( "mix_with_previous_layer");
}
// MAX3D extensions
// -------------------------------------------------------
- else if ( IsElement( "amount")) {
+ else if ( IsElement( "amount")) {
out.mWeighting = ReadFloatFromTextContent();
TestClosing( "amount");
}
@@ -1753,14 +1753,14 @@ void ColladaParser::ReadAccessor( const std::string& pID)
else if ( name == "S") acc.mSubOffset[0] = acc.mParams.size();
else if ( name == "T") acc.mSubOffset[1] = acc.mParams.size();
else if ( name == "P") acc.mSubOffset[2] = acc.mParams.size();
- // else if ( name == "Q") acc.mSubOffset[3] = acc.mParams.size();
+ // else if ( name == "Q") acc.mSubOffset[3] = acc.mParams.size();
/* 4D uv coordinates are not supported in Assimp */
/* Generic extra data, interpreted as UV data, too*/
else if ( name == "U") acc.mSubOffset[0] = acc.mParams.size();
else if ( name == "V") acc.mSubOffset[1] = acc.mParams.size();
//else
- // DefaultLogger::get()->warn( boost::str( boost::format( "Unknown accessor parameter \"%s\". Ignoring data channel.") % name));
+ // DefaultLogger::get()->warn( boost::str( boost::format( "Unknown accessor parameter \"%s\". Ignoring data channel.") % name));
}
// read data type
@@ -2198,7 +2198,7 @@ void ColladaParser::ExtractDataObjectFromChannel( const InputChannel& pInput, si
pMesh->mTexCoords[pInput.mIndex].push_back( aiVector3D( obj[0], obj[1], obj[2]));
if (0 != acc.mSubOffset[2] || 0 != acc.mSubOffset[3]) /* hack ... consider cleaner solution */
pMesh->mNumUVComponents[pInput.mIndex]=3;
- } else
+ } else
{
DefaultLogger::get()->error("Collada: too many texture coordinate sets. Skipping.");
}
@@ -2457,7 +2457,7 @@ void ColladaParser::ReadMaterialVertexInputBinding( Collada::SemanticMappingTabl
{
while ( mReader->read())
{
- if ( mReader->getNodeType() == irr::io::EXN_ELEMENT) {
+ if ( mReader->getNodeType() == irr::io::EXN_ELEMENT) {
if ( IsElement( "bind_vertex_input"))
{
Collada::InputSemanticMapEntry vn;
@@ -2481,7 +2481,7 @@ void ColladaParser::ReadMaterialVertexInputBinding( Collada::SemanticMappingTabl
DefaultLogger::get()->warn("Collada: Found unsupported <bind> element");
}
}
- else if ( mReader->getNodeType() == irr::io::EXN_ELEMENT_END) {
+ else if ( mReader->getNodeType() == irr::io::EXN_ELEMENT_END) {
if ( strcmp( mReader->getNodeName(), "instance_material") == 0)
break;
}
@@ -2551,7 +2551,7 @@ void ColladaParser::ReadScene()
while ( mReader->read())
{
- if ( mReader->getNodeType() == irr::io::EXN_ELEMENT) {
+ if ( mReader->getNodeType() == irr::io::EXN_ELEMENT) {
if ( IsElement( "instance_visual_scene"))
{
// should be the first and only occurence
@@ -2569,7 +2569,7 @@ void ColladaParser::ReadScene()
if ( sit == mNodeLibrary.end())
ThrowException( "Unable to resolve visual_scene reference \"" + std::string(url) + "\".");
mRootNode = sit->second;
- } else {
+ } else {
SkipElement();
}
}
@@ -2633,7 +2633,11 @@ void ColladaParser::TestOpening( const char* pName)
// Tests for the closing tag of the given element, throws an exception if not found
void ColladaParser::TestClosing( const char* pName)
{
- // read closing tag
+ // check if we're already on the closing tag and return right away
+ if ( mReader->getNodeType() == irr::io::EXN_ELEMENT_END && strcmp( mReader->getNodeName(), pName) == 0)
+ return;
+
+ // if not, read some more
if ( !mReader->read())
ThrowException( boost::str( boost::format( "Unexpected end of file while reading end of \"%s\" element.") % pName));
// whitespace in front is ok, just read again if found
@@ -2641,6 +2645,7 @@ void ColladaParser::TestClosing( const char* pName)
if ( !mReader->read())
ThrowException( boost::str( boost::format( "Unexpected end of file while reading end of \"%s\" element.") % pName));
+ // but this has the be the closing tag, or we're lost
if ( mReader->getNodeType() != irr::io::EXN_ELEMENT_END || strcmp( mReader->getNodeName(), pName) != 0)
ThrowException( boost::str( boost::format( "Expected end of \"%s\" element.") % pName));
}
diff --git a/3rdparty/assimp/code/ComputeUVMappingProcess.cpp b/3rdparty/assimp/code/ComputeUVMappingProcess.cpp
index 8fdbf69b1..68b75bae2 100644
--- a/3rdparty/assimp/code/ComputeUVMappingProcess.cpp
+++ b/3rdparty/assimp/code/ComputeUVMappingProcess.cpp
@@ -73,7 +73,7 @@ ComputeUVMappingProcess::~ComputeUVMappingProcess()
// Returns whether the processing step is present in the given flag field.
bool ComputeUVMappingProcess::IsActive( unsigned int pFlags) const
{
- return (pFlags & aiProcess_GenUVCoords) != 0;
+ return (pFlags & aiProcess_GenUVCoords) != 0;
}
// ------------------------------------------------------------------------------------------------
@@ -190,7 +190,7 @@ void ComputeUVMappingProcess::ComputeSphereMapping(aiMesh* mesh,const aiVector3D
// 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,
// thus changing the mapping axis)
- if (axis * base_axis_x >= angle_epsilon) {
+ if (axis * base_axis_x >= angle_epsilon) {
// For each point get a normalized projection vector in the sphere,
// get its longitude and latitude and map them to their respective
@@ -204,35 +204,35 @@ void ComputeUVMappingProcess::ComputeSphereMapping(aiMesh* mesh,const aiVector3D
// Thus we can derive:
// lat = arcsin (z)
// lon = arctan (y/x)
- for (unsigned int pnt = 0; pnt < mesh->mNumVertices;++pnt) {
+ for (unsigned int pnt = 0; pnt < mesh->mNumVertices;++pnt) {
const aiVector3D diff = (mesh->mVertices[pnt]-center).Normalize();
out[pnt] = aiVector3D((atan2 (diff.z, diff.y) + AI_MATH_PI_F ) / AI_MATH_TWO_PI_F,
(asin (diff.x) + AI_MATH_HALF_PI_F) / AI_MATH_PI_F, 0.f);
}
}
- else if (axis * base_axis_y >= angle_epsilon) {
+ else if (axis * base_axis_y >= angle_epsilon) {
// ... just the same again
- for (unsigned int pnt = 0; pnt < mesh->mNumVertices;++pnt) {
+ for (unsigned int pnt = 0; pnt < mesh->mNumVertices;++pnt) {
const aiVector3D diff = (mesh->mVertices[pnt]-center).Normalize();
out[pnt] = aiVector3D((atan2 (diff.x, diff.z) + AI_MATH_PI_F ) / AI_MATH_TWO_PI_F,
(asin (diff.y) + AI_MATH_HALF_PI_F) / AI_MATH_PI_F, 0.f);
}
}
- else if (axis * base_axis_z >= angle_epsilon) {
+ else if (axis * base_axis_z >= angle_epsilon) {
// ... just the same again
- for (unsigned int pnt = 0; pnt < mesh->mNumVertices;++pnt) {
+ for (unsigned int pnt = 0; pnt < mesh->mNumVertices;++pnt) {
const aiVector3D diff = (mesh->mVertices[pnt]-center).Normalize();
out[pnt] = aiVector3D((atan2 (diff.y, diff.x) + AI_MATH_PI_F ) / AI_MATH_TWO_PI_F,
(asin (diff.z) + AI_MATH_HALF_PI_F) / AI_MATH_PI_F, 0.f);
}
}
// slower code path in case the mapping axis is not one of the coordinate system axes
- else {
+ else {
aiMatrix4x4 mTrafo;
aiMatrix4x4::FromToMatrix(axis,base_axis_y,mTrafo);
// again the same, except we're applying a transformation now
- for (unsigned int pnt = 0; pnt < mesh->mNumVertices;++pnt) {
+ for (unsigned int pnt = 0; pnt < mesh->mNumVertices;++pnt) {
const aiVector3D diff = ((mTrafo*mesh->mVertices[pnt])-center).Normalize();
out[pnt] = aiVector3D((atan2 (diff.y, diff.x) + AI_MATH_PI_F ) / AI_MATH_TWO_PI_F,
(asin (diff.z) + AI_MATH_HALF_PI_F) / AI_MATH_PI_F, 0.f);
@@ -255,7 +255,7 @@ void ComputeUVMappingProcess::ComputeCylinderMapping(aiMesh* mesh,const aiVector
// 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,
// thus changing the mapping axis)
- if (axis * base_axis_x >= angle_epsilon) {
+ if (axis * base_axis_x >= angle_epsilon) {
FindMeshCenter(mesh, center, min, max);
const float diff = max.x - min.x;
@@ -263,7 +263,7 @@ void ComputeUVMappingProcess::ComputeCylinderMapping(aiMesh* mesh,const aiVector
// 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
// 'c' is the center point of the mesh.
- for (unsigned int pnt = 0; pnt < mesh->mNumVertices;++pnt) {
+ for (unsigned int pnt = 0; pnt < mesh->mNumVertices;++pnt) {
const aiVector3D& pos = mesh->mVertices[pnt];
aiVector3D& uv = out[pnt];
@@ -271,12 +271,12 @@ void ComputeUVMappingProcess::ComputeCylinderMapping(aiMesh* mesh,const aiVector
uv.x = (atan2 ( pos.z - center.z, pos.y - center.y) +(float)AI_MATH_PI ) / (float)AI_MATH_TWO_PI;
}
}
- else if (axis * base_axis_y >= angle_epsilon) {
+ else if (axis * base_axis_y >= angle_epsilon) {
FindMeshCenter(mesh, center, min, max);
const float diff = max.y - min.y;
// just the same ...
- for (unsigned int pnt = 0; pnt < mesh->mNumVertices;++pnt) {
+ for (unsigned int pnt = 0; pnt < mesh->mNumVertices;++pnt) {
const aiVector3D& pos = mesh->mVertices[pnt];
aiVector3D& uv = out[pnt];
@@ -284,12 +284,12 @@ void ComputeUVMappingProcess::ComputeCylinderMapping(aiMesh* mesh,const aiVector
uv.x = (atan2 ( pos.x - center.x, pos.z - center.z) +(float)AI_MATH_PI ) / (float)AI_MATH_TWO_PI;
}
}
- else if (axis * base_axis_z >= angle_epsilon) {
+ else if (axis * base_axis_z >= angle_epsilon) {
FindMeshCenter(mesh, center, min, max);
const float diff = max.z - min.z;
// just the same ...
- for (unsigned int pnt = 0; pnt < mesh->mNumVertices;++pnt) {
+ for (unsigned int pnt = 0; pnt < mesh->mNumVertices;++pnt) {
const aiVector3D& pos = mesh->mVertices[pnt];
aiVector3D& uv = out[pnt];
@@ -330,32 +330,32 @@ void ComputeUVMappingProcess::ComputePlaneMapping(aiMesh* mesh,const aiVector3D&
// 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,
// thus changing the mapping axis)
- if (axis * base_axis_x >= angle_epsilon) {
+ if (axis * base_axis_x >= angle_epsilon) {
FindMeshCenter(mesh, center, min, max);
diffu = max.z - min.z;
diffv = max.y - min.y;
- for (unsigned int pnt = 0; pnt < mesh->mNumVertices;++pnt) {
+ for (unsigned int pnt = 0; pnt < mesh->mNumVertices;++pnt) {
const aiVector3D& pos = mesh->mVertices[pnt];
out[pnt].Set((pos.z - min.z) / diffu,(pos.y - min.y) / diffv);
}
}
- else if (axis * base_axis_y >= angle_epsilon) {
+ else if (axis * base_axis_y >= angle_epsilon) {
FindMeshCenter(mesh, center, min, max);
diffu = max.x - min.x;
diffv = max.z - min.z;
- for (unsigned int pnt = 0; pnt < mesh->mNumVertices;++pnt) {
+ for (unsigned int pnt = 0; pnt < mesh->mNumVertices;++pnt) {
const aiVector3D& pos = mesh->mVertices[pnt];
out[pnt].Set((pos.x - min.x) / diffu,(pos.z - min.z) / diffv);
}
}
- else if (axis * base_axis_z >= angle_epsilon) {
+ else if (axis * base_axis_z >= angle_epsilon) {
FindMeshCenter(mesh, center, min, max);
diffu = max.y - min.y;
diffv = max.z - min.z;
- for (unsigned int pnt = 0; pnt < mesh->mNumVertices;++pnt) {
+ for (unsigned int pnt = 0; pnt < mesh->mNumVertices;++pnt) {
const aiVector3D& pos = mesh->mVertices[pnt];
out[pnt].Set((pos.y - min.y) / diffu,(pos.x - min.x) / diffv);
}
@@ -370,7 +370,7 @@ void ComputeUVMappingProcess::ComputePlaneMapping(aiMesh* mesh,const aiVector3D&
diffv = max.z - min.z;
// again the same, except we're applying a transformation now
- for (unsigned int pnt = 0; pnt < mesh->mNumVertices;++pnt) {
+ for (unsigned int pnt = 0; pnt < mesh->mNumVertices;++pnt) {
const aiVector3D pos = mTrafo * mesh->mVertices[pnt];
out[pnt].Set((pos.x - min.x) / diffu,(pos.z - min.z) / diffv);
}
@@ -380,7 +380,7 @@ void ComputeUVMappingProcess::ComputePlaneMapping(aiMesh* mesh,const aiVector3D&
}
// ------------------------------------------------------------------------------------------------
-void ComputeUVMappingProcess::ComputeBoxMapping(aiMesh* /*mesh*/, aiVector3D* /*out*/)
+void ComputeUVMappingProcess::ComputeBoxMapping(aiMesh* mesh, aiVector3D* out)
{
DefaultLogger::get()->error("Mapping type currently not implemented");
}
@@ -431,7 +431,7 @@ void ComputeUVMappingProcess::Execute( aiScene* pScene)
if (prop2->mSemantic != prop->mSemantic || prop2->mIndex != prop->mIndex)
continue;
- if ( !::strcmp( prop2->mKey.data, "$tex.mapaxis")) {
+ if ( !::strcmp( prop2->mKey.data, "$tex.mapaxis")) {
info.axis = *((aiVector3D*)prop2->mData);
break;
}
diff --git a/3rdparty/assimp/code/ComputeUVMappingProcess.h b/3rdparty/assimp/code/ComputeUVMappingProcess.h
index 795cc9fa5..412c641ab 100644
--- a/3rdparty/assimp/code/ComputeUVMappingProcess.h
+++ b/3rdparty/assimp/code/ComputeUVMappingProcess.h
@@ -128,9 +128,9 @@ private:
struct MappingInfo
{
MappingInfo(aiTextureMapping _type)
- : type (_type)
- , axis (0.f,1.f,0.f)
- , uv (0u)
+ : type (_type)
+ , axis (0.f,1.f,0.f)
+ , uv (0u)
{}
aiTextureMapping type;
diff --git a/3rdparty/assimp/code/ConvertToLHProcess.cpp b/3rdparty/assimp/code/ConvertToLHProcess.cpp
index d598ffd18..f4c72245a 100644
--- a/3rdparty/assimp/code/ConvertToLHProcess.cpp
+++ b/3rdparty/assimp/code/ConvertToLHProcess.cpp
@@ -167,11 +167,11 @@ void MakeLeftHandedProcess::ProcessMesh( aiMesh* pMesh)
void MakeLeftHandedProcess::ProcessMaterial( aiMaterial* _mat)
{
MaterialHelper* mat = (MaterialHelper*)_mat;
- for (unsigned int a = 0; a < mat->mNumProperties;++a) {
+ for (unsigned int a = 0; a < mat->mNumProperties;++a) {
aiMaterialProperty* prop = mat->mProperties[a];
// 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 */
aiVector3D* pff = (aiVector3D*)prop->mData;
@@ -242,11 +242,11 @@ void FlipUVsProcess::Execute( aiScene* pScene)
void FlipUVsProcess::ProcessMaterial (aiMaterial* _mat)
{
MaterialHelper* mat = (MaterialHelper*)_mat;
- for (unsigned int a = 0; a < mat->mNumProperties;++a) {
+ for (unsigned int a = 0; a < mat->mNumProperties;++a) {
aiMaterialProperty* prop = mat->mProperties[a];
// UV transformation key?
- if (!::strcmp( prop->mKey.data, "$tex.uvtrafo")) {
+ if (!::strcmp( prop->mKey.data, "$tex.uvtrafo")) {
ai_assert( prop->mDataLength >= sizeof(aiUVTransform)); /* something is wrong with the validation if we end up here */
aiUVTransform* uv = (aiUVTransform*)prop->mData;
@@ -262,7 +262,7 @@ void FlipUVsProcess::ProcessMaterial (aiMaterial* _mat)
void FlipUVsProcess::ProcessMesh( aiMesh* pMesh)
{
// mirror texture y coordinate
- for ( unsigned int a = 0; a < AI_MAX_NUMBER_OF_TEXTURECOORDS; a++) {
+ for ( unsigned int a = 0; a < AI_MAX_NUMBER_OF_TEXTURECOORDS; a++) {
if ( !pMesh->HasTextureCoords( a))
break;
diff --git a/3rdparty/assimp/code/ConvertToLHProcess.h b/3rdparty/assimp/code/ConvertToLHProcess.h
index f953c39a6..25bf178bc 100644
--- a/3rdparty/assimp/code/ConvertToLHProcess.h
+++ b/3rdparty/assimp/code/ConvertToLHProcess.h
@@ -55,7 +55,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
struct aiMesh;
struct aiNodeAnim;
-namespace Assimp {
+namespace Assimp {
// -----------------------------------------------------------------------------------
/** @brief The MakeLeftHandedProcess converts all imported data to a left-handed
diff --git a/3rdparty/assimp/code/DXFLoader.cpp b/3rdparty/assimp/code/DXFLoader.cpp
index 27ed471f3..fc68ee887 100644
--- a/3rdparty/assimp/code/DXFLoader.cpp
+++ b/3rdparty/assimp/code/DXFLoader.cpp
@@ -94,7 +94,7 @@ DXFImporter::~DXFImporter()
// ------------------------------------------------------------------------------------------------
// 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");
}
@@ -114,7 +114,7 @@ bool DXFImporter::GetNextLine()
return false;
if (!SkipSpaces(&buffer))
return GetNextLine();
- else if (*buffer == '{') {
+ else if (*buffer == '{') {
// some strange meta data ...
while (true)
{
@@ -133,7 +133,7 @@ bool DXFImporter::GetNextLine()
// Get the next token in the file
bool DXFImporter::GetNextToken()
{
- if (bRepeat) {
+ if (bRepeat) {
bRepeat = false;
return true;
}
@@ -178,9 +178,9 @@ void DXFImporter::InternReadFile( const std::string& pFile,
throw DeadlyImportError("DXF: Binary files are not supported at the moment");
// now get all lines of the file
- while (GetNextToken()) {
+ while (GetNextToken()) {
- if (2 == groupCode) {
+ if (2 == groupCode) {
// ENTITIES and BLOCKS sections - skip the whole rest, no need to waste our time with them
if (!::strcmp(cursor,"ENTITIES") || !::strcmp(cursor,"BLOCKS")) {
@@ -190,15 +190,15 @@ void DXFImporter::InternReadFile( const std::string& pFile,
}
// other sections - skip them to make sure there will be no name conflicts
- else {
- while ( GetNextToken()) {
+ else {
+ while ( GetNextToken()) {
if (!::strcmp(cursor,"ENDSEC"))
break;
}
}
}
// print comment strings
- else if (999 == groupCode) {
+ else if (999 == groupCode) {
DefaultLogger::get()->info(std::string( cursor ));
}
else if (!groupCode && !::strcmp(cursor,"EOF"))
@@ -206,7 +206,7 @@ void DXFImporter::InternReadFile( const std::string& pFile,
}
// find out how many valud layers we have
- for (std::vector<LayerInfo>::const_iterator it = mLayers.begin(),end = mLayers.end(); it != end;++it) {
+ for (std::vector<LayerInfo>::const_iterator it = mLayers.begin(),end = mLayers.end(); it != end;++it) {
if (!(*it).vPositions.empty())
++pScene->mNumMeshes;
}
@@ -228,7 +228,7 @@ void DXFImporter::InternReadFile( const std::string& pFile,
// check whether we need vertex colors here
aiColor4D* clrOut = NULL;
const aiColor4D* clr = NULL;
- for (std::vector<aiColor4D>::const_iterator it2 = (*it).vColors.begin(), end2 = (*it).vColors.end();it2 != end2; ++it2) {
+ for (std::vector<aiColor4D>::const_iterator it2 = (*it).vColors.begin(), end2 = (*it).vColors.end();it2 != end2; ++it2) {
if ((*it2).r == (*it2).r) /* qnan? */ {
clrOut = pMesh->mColors[0] = new aiColor4D[vPositions.size()];
@@ -246,22 +246,22 @@ void DXFImporter::InternReadFile( const std::string& pFile,
aiVector3D* vpOut = pMesh->mVertices = new aiVector3D[vPositions.size()];
const aiVector3D* vp = &vPositions[0];
- for (unsigned int i = 0; i < pMesh->mNumFaces;++i) {
+ for (unsigned int i = 0; i < pMesh->mNumFaces;++i) {
aiFace& face = pMesh->mFaces[i];
// check whether we need four, three or two indices here
- if (vp[1] == vp[2]) {
+ if (vp[1] == vp[2]) {
face.mNumIndices = 2;
}
- else if (vp[3] == vp[2]) {
+ else if (vp[3] == vp[2]) {
face.mNumIndices = 3;
}
else face.mNumIndices = 4;
face.mIndices = new unsigned int[face.mNumIndices];
- for (unsigned int a = 0; a < face.mNumIndices;++a) {
+ for (unsigned int a = 0; a < face.mNumIndices;++a) {
*vpOut++ = vp[a];
- if (clr) {
+ if (clr) {
if (is_not_qnan( clr[a].r )) {
*clrOut = clr[a];
}
@@ -277,14 +277,14 @@ void DXFImporter::InternReadFile( const std::string& pFile,
pScene->mRootNode = new aiNode();
pScene->mRootNode->mName.Set("<DXF_ROOT>");
- if (1 == pScene->mNumMeshes) {
+ if (1 == pScene->mNumMeshes) {
pScene->mRootNode->mMeshes = new unsigned int[ pScene->mRootNode->mNumMeshes = 1 ];
pScene->mRootNode->mMeshes[0] = 0;
}
else
{
pScene->mRootNode->mChildren = new aiNode*[ pScene->mRootNode->mNumChildren = pScene->mNumMeshes ];
- for (m = 0; m < pScene->mRootNode->mNumChildren;++m) {
+ for (m = 0; m < pScene->mRootNode->mNumChildren;++m) {
aiNode* p = pScene->mRootNode->mChildren[m] = new aiNode();
p->mName.length = ::strlen( mLayers[m].name );
strcpy(p->mName.data, mLayers[m].name);
@@ -324,8 +324,8 @@ void DXFImporter::InternReadFile( const std::string& pFile,
// ------------------------------------------------------------------------------------------------
bool DXFImporter::ParseEntities()
{
- while (GetNextToken()) {
- if (!groupCode) {
+ while (GetNextToken()) {
+ if (!groupCode) {
if (!::strcmp(cursor,"3DFACE") || !::strcmp(cursor,"LINE") || !::strcmp(cursor,"3DLINE")){
//http://sourceforge.net/tracker/index.php?func=detail&aid=2970566&group_id=226462&atid=1067632
Parse3DFace();
@@ -346,13 +346,13 @@ bool DXFImporter::ParseEntities()
// ------------------------------------------------------------------------------------------------
void DXFImporter::SetLayer(LayerInfo*& out)
{
- for (std::vector<LayerInfo>::iterator it = mLayers.begin(),end = mLayers.end();it != end;++it) {
- if (!::strcmp( (*it).name, cursor )) {
+ for (std::vector<LayerInfo>::iterator it = mLayers.begin(),end = mLayers.end();it != end;++it) {
+ if (!::strcmp( (*it).name, cursor )) {
out = &(*it);
break;
}
}
- if (!out) {
+ if (!out) {
// we don't have this layer yet
mLayers.push_back(LayerInfo());
out = &mLayers.back();
@@ -363,7 +363,7 @@ void DXFImporter::SetLayer(LayerInfo*& out)
// ------------------------------------------------------------------------------------------------
void DXFImporter::SetDefaultLayer(LayerInfo*& out)
{
- if (!mDefaultLayer) {
+ if (!mDefaultLayer) {
mLayers.push_back(LayerInfo());
mDefaultLayer = &mLayers.back();
}
@@ -381,22 +381,22 @@ bool DXFImporter::ParsePolyLine()
std::vector<unsigned int> indices;
unsigned int flags = 0;
- while (GetNextToken()) {
+ while (GetNextToken()) {
switch (groupCode)
{
case 0:
{
- if (!::strcmp(cursor,"VERTEX")) {
+ if (!::strcmp(cursor,"VERTEX")) {
aiVector3D v;aiColor4D clr(g_clrInvalid);
unsigned int idx[4] = {0xffffffff,0xffffffff,0xffffffff,0xffffffff};
ParsePolyLineVertex(v, clr, idx);
- if (0xffffffff == idx[0]) {
+ if (0xffffffff == idx[0]) {
positions.push_back(v);
colors.push_back(clr);
}
- else {
+ else {
// check whether we have a fourth coordinate
- if (0xffffffff == idx[3]) {
+ if (0xffffffff == idx[3]) {
idx[3] = idx[2];
}
@@ -406,7 +406,7 @@ bool DXFImporter::ParsePolyLine()
}
bRepeat = true;
}
- else if (!::strcmp(cursor,"ENDSEQ")) {
+ else if (!::strcmp(cursor,"ENDSEQ")) {
ret = true;
}
break;
@@ -415,7 +415,7 @@ bool DXFImporter::ParsePolyLine()
// flags --- important that we know whether it is a polyface mesh
case 70:
{
- if (!flags) {
+ if (!flags) {
flags = strtol10(cursor);
}
break;
@@ -443,12 +443,12 @@ bool DXFImporter::ParsePolyLine()
}
}
}
- if (!(flags & 64)) {
+ if (!(flags & 64)) {
DefaultLogger::get()->warn("DXF: Only polyface meshes are currently supported");
return ret;
}
- if (positions.size() < 3 || indices.size() < 3) {
+ if (positions.size() < 3 || indices.size() < 3) {
DefaultLogger::get()->warn("DXF: Unable to parse POLYLINE element - not enough vertices");
return ret;
}
@@ -463,9 +463,9 @@ bool DXFImporter::ParsePolyLine()
out->vColors.reserve(flags);
// generate unique vertices
- for (std::vector<unsigned int>::const_iterator it = indices.begin(), end = indices.end();it != end; ++it) {
+ for (std::vector<unsigned int>::const_iterator it = indices.begin(), end = indices.end();it != end; ++it) {
unsigned int idx = *it;
- if (idx > positions.size() || !idx) {
+ if (idx > positions.size() || !idx) {
DefaultLogger::get()->error("DXF: Polyface mesh index os out of range");
idx = (unsigned int) positions.size();
}
@@ -480,7 +480,7 @@ bool DXFImporter::ParsePolyLine()
bool DXFImporter::ParsePolyLineVertex(aiVector3D& out,aiColor4D& clr, unsigned int* outIdx)
{
bool ret = false;
- while (GetNextToken()) {
+ while (GetNextToken()) {
switch (groupCode)
{
case 0: ret = true;
@@ -502,7 +502,7 @@ bool DXFImporter::ParsePolyLineVertex(aiVector3D& out,aiColor4D& clr, unsigned i
case 71: outIdx[0] = strtol10(cursor);break;
case 72: outIdx[1] = strtol10(cursor);break;
case 73: outIdx[2] = strtol10(cursor);break;
- // case 74: outIdx[3] = strtol10(cursor);break;
+ // case 74: outIdx[3] = strtol10(cursor);break;
// color
case 62: clr = g_aclrDxfIndexColors[strtol10(cursor) % AI_DXF_NUM_INDEX_COLORS]; break;
@@ -526,14 +526,14 @@ bool DXFImporter::Parse3DFace()
// this is also used for for parsing line entities
bool bThird = false;
- while (GetNextToken()) {
- switch (groupCode) {
+ while (GetNextToken()) {
+ switch (groupCode) {
case 0:
ret = true;
break;
// 8 specifies the layer
- case 8: {
+ case 8: {
SetLayer(out);
break;
}
diff --git a/3rdparty/assimp/code/DXFLoader.h b/3rdparty/assimp/code/DXFLoader.h
index 88b47ad37..9ae16ed59 100644
--- a/3rdparty/assimp/code/DXFLoader.h
+++ b/3rdparty/assimp/code/DXFLoader.h
@@ -46,7 +46,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "BaseImporter.h"
-namespace Assimp {
+namespace Assimp {
// ---------------------------------------------------------------------------
/** DXF importer class
@@ -86,7 +86,7 @@ public:
// -------------------------------------------------------------------
/** 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;
diff --git a/3rdparty/assimp/code/DefaultIOStream.h b/3rdparty/assimp/code/DefaultIOStream.h
index fef7565f3..1fdaa33be 100644
--- a/3rdparty/assimp/code/DefaultIOStream.h
+++ b/3rdparty/assimp/code/DefaultIOStream.h
@@ -45,11 +45,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <stdio.h>
#include "../include/IOStream.h"
-namespace Assimp {
+namespace Assimp {
// ----------------------------------------------------------------------------------
-//! @class DefaultIOStream
-//! @brief Default IO implementation, use standard IO operations
+//! @class DefaultIOStream
+//! @brief Default IO implementation, use standard IO operations
//! @note An instance of this class can exist without a valid file handle
//! attached to it. All calls fail, but the instance can nevertheless be
//! used with no restrictions.
@@ -96,10 +96,10 @@ public:
void Flush();
private:
- //! File datastructure, using clib
+ //! File datastructure, using clib
FILE* mFile;
- //! Filename
- std::string mFilename;
+ //! Filename
+ std::string mFilename;
//! Cached file size
mutable size_t cachedSize;
@@ -108,9 +108,9 @@ private:
// ----------------------------------------------------------------------------------
inline DefaultIOStream::DefaultIOStream () :
- mFile (NULL),
- mFilename (""),
- cachedSize (0xffffffff)
+ mFile (NULL),
+ mFilename (""),
+ cachedSize (0xffffffff)
{
// empty
}
@@ -121,7 +121,7 @@ inline DefaultIOStream::DefaultIOStream (FILE* pFile,
const std::string &strFilename) :
mFile(pFile),
mFilename(strFilename),
- cachedSize (0xffffffff)
+ cachedSize (0xffffffff)
{
// empty
}
diff --git a/3rdparty/assimp/code/DefaultIOSystem.cpp b/3rdparty/assimp/code/DefaultIOSystem.cpp
index 436caa82e..f09f710b9 100644
--- a/3rdparty/assimp/code/DefaultIOSystem.cpp
+++ b/3rdparty/assimp/code/DefaultIOSystem.cpp
@@ -121,9 +121,9 @@ bool IOSystem::ComparePaths (const char* one, const char* second) const
// maximum path length
// XXX http://insanecoding.blogspot.com/2007/11/pathmax-simply-isnt.html
#ifdef PATH_MAX
-# define PATHLIMIT PATH_MAX
+# define PATHLIMIT PATH_MAX
#else
-# define PATHLIMIT 4096
+# define PATHLIMIT 4096
#endif
// ------------------------------------------------------------------------------------------------
diff --git a/3rdparty/assimp/code/DefaultIOSystem.h b/3rdparty/assimp/code/DefaultIOSystem.h
index ef481b3c8..3c3601754 100644
--- a/3rdparty/assimp/code/DefaultIOSystem.h
+++ b/3rdparty/assimp/code/DefaultIOSystem.h
@@ -44,7 +44,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "../include/IOSystem.h"
-namespace Assimp {
+namespace Assimp {
// ---------------------------------------------------------------------------
/** Default implementation of IOSystem using the standard C file functions */
diff --git a/3rdparty/assimp/code/DefaultLogger.cpp b/3rdparty/assimp/code/DefaultLogger.cpp
index 02ae0582c..7951468e4 100644
--- a/3rdparty/assimp/code/DefaultLogger.cpp
+++ b/3rdparty/assimp/code/DefaultLogger.cpp
@@ -52,13 +52,13 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "FileLogStream.h"
#ifndef ASSIMP_BUILD_SINGLETHREADED
-# include <boost/thread/thread.hpp>
-# include <boost/thread/mutex.hpp>
+# include <boost/thread/thread.hpp>
+# include <boost/thread/mutex.hpp>
boost::mutex loggerMutex;
#endif
-namespace Assimp {
+namespace Assimp {
// ----------------------------------------------------------------------------------
NullLogger DefaultLogger::s_pNullLogger;
@@ -88,9 +88,9 @@ struct LogStreamInfo
// ----------------------------------------------------------------------------------
// Construct a default log stream
-LogStream* LogStream::createDefaultStream(aiDefaultLogStream streams,
+LogStream* LogStream::createDefaultStream(aiDefaultLogStream streams,
const char* name /*= "AssimpLog.txt"*/,
- IOSystem* io /*= NULL*/)
+ IOSystem* io /*= NULL*/)
{
switch (streams)
{
@@ -120,11 +120,11 @@ LogStream* LogStream::createDefaultStream(aiDefaultLogStream streams,
}
// ----------------------------------------------------------------------------------
-// Creates the only singleton instance
+// Creates the only singleton instance
Logger *DefaultLogger::create(const char* name /*= "AssimpLog.txt"*/,
LogSeverity severity /*= NORMAL*/,
unsigned int defStreams /*= aiDefaultLogStream_DEBUGGER | aiDefaultLogStream_FILE*/,
- IOSystem* io /*= NULL*/)
+ IOSystem* io /*= NULL*/)
{
// enter the mutex here to avoid concurrency problems
#ifndef ASSIMP_BUILD_SINGLETHREADED
@@ -157,7 +157,7 @@ Logger *DefaultLogger::create(const char* name /*= "AssimpLog.txt"*/,
}
// ----------------------------------------------------------------------------------
-void Logger::debug(const std::string &message) {
+void Logger::debug(const std::string &message) {
// SECURITY FIX: otherwise it's easy to produce overruns ...
if (message.length()>MAX_LOG_MESSAGE_LENGTH) {
@@ -168,7 +168,7 @@ void Logger::debug(const std::string &message) {
}
// ----------------------------------------------------------------------------------
-void Logger::info(const std::string &message) {
+void Logger::info(const std::string &message) {
// SECURITY FIX: otherwise it's easy to produce overruns ...
if (message.length()>MAX_LOG_MESSAGE_LENGTH) {
@@ -179,7 +179,7 @@ void Logger::info(const std::string &message) {
}
// ----------------------------------------------------------------------------------
-void Logger::warn(const std::string &message) {
+void Logger::warn(const std::string &message) {
// SECURITY FIX: otherwise it's easy to produce overruns ...
if (message.length()>MAX_LOG_MESSAGE_LENGTH) {
@@ -190,7 +190,7 @@ void Logger::warn(const std::string &message) {
}
// ----------------------------------------------------------------------------------
-void Logger::error(const std::string &message) {
+void Logger::error(const std::string &message) {
// SECURITY FIX: otherwise it's easy to produce overruns ...
if (message.length()>MAX_LOG_MESSAGE_LENGTH) {
@@ -222,14 +222,14 @@ bool DefaultLogger::isNullLogger()
}
// ----------------------------------------------------------------------------------
-// Singleton getter
+// Singleton getter
Logger *DefaultLogger::get()
{
return m_pLogger;
}
// ----------------------------------------------------------------------------------
-// Kills the only instance
+// Kills the only instance
void DefaultLogger::kill()
{
// enter the mutex here to avoid concurrency problems
@@ -243,7 +243,7 @@ void DefaultLogger::kill()
}
// ----------------------------------------------------------------------------------
-// Debug message
+// Debug message
void DefaultLogger::OnDebug( const char* message )
{
if ( m_Severity == Logger::NORMAL )
@@ -256,7 +256,7 @@ void DefaultLogger::OnDebug( const char* message )
}
// ----------------------------------------------------------------------------------
-// Logs an info
+// Logs an info
void DefaultLogger::OnInfo( const char* message )
{
char msg[MAX_LOG_MESSAGE_LENGTH*2];
@@ -266,7 +266,7 @@ void DefaultLogger::OnInfo( const char* message )
}
// ----------------------------------------------------------------------------------
-// Logs a warning
+// Logs a warning
void DefaultLogger::OnWarn( const char* message )
{
char msg[MAX_LOG_MESSAGE_LENGTH*2];
@@ -276,7 +276,7 @@ void DefaultLogger::OnWarn( const char* message )
}
// ----------------------------------------------------------------------------------
-// Logs an error
+// Logs an error
void DefaultLogger::OnError( const char* message )
{
char msg[MAX_LOG_MESSAGE_LENGTH*2];
@@ -286,13 +286,13 @@ void DefaultLogger::OnError( const char* message )
}
// ----------------------------------------------------------------------------------
-// Attachs a new stream
+// Attachs a new stream
bool DefaultLogger::attachStream( LogStream *pStream, unsigned int severity )
{
if (!pStream)
return false;
- if (0 == severity) {
+ if (0 == severity) {
severity = Logger::INFO | Logger::ERR | Logger::WARN | Logger::DEBUGGING;
}
@@ -313,13 +313,13 @@ bool DefaultLogger::attachStream( LogStream *pStream, unsigned int severity )
}
// ----------------------------------------------------------------------------------
-// Detatch a stream
+// Detatch a stream
bool DefaultLogger::detatchStream( LogStream *pStream, unsigned int severity )
{
if (!pStream)
return false;
- if (0 == severity) {
+ if (0 == severity) {
severity = Logger::INFO | Logger::ERR | Logger::WARN | Logger::DEBUGGING;
}
@@ -345,18 +345,18 @@ bool DefaultLogger::detatchStream( LogStream *pStream, unsigned int severity )
}
// ----------------------------------------------------------------------------------
-// Constructor
+// Constructor
DefaultLogger::DefaultLogger(LogSeverity severity)
- : Logger ( severity )
- , noRepeatMsg (false)
- , lastLen( 0 )
+ : Logger ( severity )
+ , noRepeatMsg (false)
+ , lastLen( 0 )
{
lastMsg[0] = '\0';
}
// ----------------------------------------------------------------------------------
-// Destructor
+// Destructor
DefaultLogger::~DefaultLogger()
{
for ( StreamIt it = m_StreamArray.begin(); it != m_StreamArray.end(); ++it ) {
@@ -366,7 +366,7 @@ DefaultLogger::~DefaultLogger()
}
// ----------------------------------------------------------------------------------
-// Writes message to stream
+// Writes message to stream
void DefaultLogger::WriteToStreams(const char *message,
ErrorSeverity ErrorSev )
{
@@ -403,7 +403,7 @@ void DefaultLogger::WriteToStreams(const char *message,
}
// ----------------------------------------------------------------------------------
-// Returns thread id, if not supported only a zero will be returned.
+// Returns thread id, if not supported only a zero will be returned.
unsigned int DefaultLogger::GetThreadID()
{
// fixme: we can get this value via boost::threads
diff --git a/3rdparty/assimp/code/DefaultProgressHandler.h b/3rdparty/assimp/code/DefaultProgressHandler.h
index 852f54cb1..9b379dfac 100644
--- a/3rdparty/assimp/code/DefaultProgressHandler.h
+++ b/3rdparty/assimp/code/DefaultProgressHandler.h
@@ -45,15 +45,15 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define INCLUDED_AI_DEFAULTPROGRESSHANDLER_H
#include "../include/ProgressHandler.h"
-namespace Assimp {
+namespace Assimp {
// ------------------------------------------------------------------------------------
/** @brief Internal default implementation of the #ProgressHandler interface. */
class ASSIMP_API DefaultProgressHandler
- : public ProgressHandler {
+ : public ProgressHandler {
- virtual bool Update(float /*percentage*/) {
+ virtual bool Update(float percentage) {
return false;
}
diff --git a/3rdparty/assimp/code/Exceptional.h b/3rdparty/assimp/code/Exceptional.h
index e9f93186b..ab9c28756 100644
--- a/3rdparty/assimp/code/Exceptional.h
+++ b/3rdparty/assimp/code/Exceptional.h
@@ -45,7 +45,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using std::runtime_error;
#ifdef _MSC_VER
-# pragma warning(disable : 4275)
+# pragma warning(disable : 4275)
#endif
// ---------------------------------------------------------------------------
@@ -66,12 +66,12 @@ private:
};
#ifdef _MSC_VER
-# pragma warning(default : 4275)
+# pragma warning(default : 4275)
#endif
// ---------------------------------------------------------------------------
template <typename T>
-struct ExceptionSwallower {
+struct ExceptionSwallower {
T operator ()() const {
return T();
}
@@ -79,7 +79,7 @@ struct ExceptionSwallower {
// ---------------------------------------------------------------------------
template <typename T>
-struct ExceptionSwallower<T*> {
+struct ExceptionSwallower<T*> {
T* operator ()() const {
return NULL;
}
@@ -87,7 +87,7 @@ struct ExceptionSwallower<T*> {
// ---------------------------------------------------------------------------
template <>
-struct ExceptionSwallower<aiReturn> {
+struct ExceptionSwallower<aiReturn> {
aiReturn operator ()() const {
try {
throw;
@@ -103,7 +103,7 @@ struct ExceptionSwallower<aiReturn> {
// ---------------------------------------------------------------------------
template <>
-struct ExceptionSwallower<void> {
+struct ExceptionSwallower<void> {
void operator ()() const {
return;
}
diff --git a/3rdparty/assimp/code/FileLogStream.h b/3rdparty/assimp/code/FileLogStream.h
index 605ed509e..15b8da7be 100644
--- a/3rdparty/assimp/code/FileLogStream.h
+++ b/3rdparty/assimp/code/FileLogStream.h
@@ -4,11 +4,11 @@
#include "../include/LogStream.h"
#include "../include/IOStream.h"
-namespace Assimp {
+namespace Assimp {
// ----------------------------------------------------------------------------------
-/** @class FileLogStream
- * @brief Logstream to write into a file.
+/** @class FileLogStream
+ * @brief Logstream to write into a file.
*/
class FileLogStream :
public LogStream
@@ -23,7 +23,7 @@ private:
};
// ----------------------------------------------------------------------------------
-// Constructor
+// Constructor
inline FileLogStream::FileLogStream( const char* file, IOSystem* io ) :
m_pStream(NULL)
{
@@ -40,7 +40,7 @@ inline FileLogStream::FileLogStream( const char* file, IOSystem* io ) :
}
// ----------------------------------------------------------------------------------
-// Destructor
+// Destructor
inline FileLogStream::~FileLogStream()
{
// The virtual d'tor should destroy the underlying file
@@ -48,7 +48,7 @@ inline FileLogStream::~FileLogStream()
}
// ----------------------------------------------------------------------------------
-// Write method
+// Write method
inline void FileLogStream::write( const char* message )
{
if (m_pStream != NULL)
diff --git a/3rdparty/assimp/code/FileSystemFilter.h b/3rdparty/assimp/code/FileSystemFilter.h
index a23c84125..cc3b4a687 100644
--- a/3rdparty/assimp/code/FileSystemFilter.h
+++ b/3rdparty/assimp/code/FileSystemFilter.h
@@ -48,7 +48,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "../include/IOSystem.h"
#include "fast_atof.h"
#include "ParsingUtils.h"
-namespace Assimp {
+namespace Assimp {
// ---------------------------------------------------------------------------
/** File system filter
@@ -66,12 +66,12 @@ public:
// Determine base directory
base = src_file;
std::string::size_type ss2;
- if (std::string::npos != (ss2 = base.find_last_of("\\/"))) {
+ if (std::string::npos != (ss2 = base.find_last_of("\\/"))) {
base.erase(ss2,base.length()-ss2);
}
else {
base = "";
- // return;
+ // return;
}
// make sure the directory is terminated properly
@@ -100,7 +100,7 @@ public:
std::string tmp = pFile;
// Currently this IOSystem is also used to open THE ONE FILE.
- if (tmp != src_file) {
+ if (tmp != src_file) {
BuildPath(tmp);
Cleanup(tmp);
}
@@ -125,7 +125,7 @@ public:
// First try the unchanged path
IOStream* s = wrapped->Open(pFile,pMode);
- if (!s) {
+ if (!s) {
std::string tmp = pFile;
// Try to convert between absolute and relative paths
diff --git a/3rdparty/assimp/code/FindDegenerates.h b/3rdparty/assimp/code/FindDegenerates.h
index a4417919b..daa5cf93d 100644
--- a/3rdparty/assimp/code/FindDegenerates.h
+++ b/3rdparty/assimp/code/FindDegenerates.h
@@ -47,7 +47,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "../include/aiMesh.h"
class FindDegeneratesProcessTest;
-namespace Assimp {
+namespace Assimp {
// ---------------------------------------------------------------------------
diff --git a/3rdparty/assimp/code/FindInstancesProcess.cpp b/3rdparty/assimp/code/FindInstancesProcess.cpp
index 537f2ea4a..f5956891e 100644
--- a/3rdparty/assimp/code/FindInstancesProcess.cpp
+++ b/3rdparty/assimp/code/FindInstancesProcess.cpp
@@ -51,7 +51,7 @@ using namespace Assimp;
// ------------------------------------------------------------------------------------------------
// Constructor to be privately used by Importer
FindInstancesProcess::FindInstancesProcess()
-: configSpeedFlag (false)
+: configSpeedFlag (false)
{}
// ------------------------------------------------------------------------------------------------
diff --git a/3rdparty/assimp/code/FindInstancesProcess.h b/3rdparty/assimp/code/FindInstancesProcess.h
index bba2cada1..3b329a153 100644
--- a/3rdparty/assimp/code/FindInstancesProcess.h
+++ b/3rdparty/assimp/code/FindInstancesProcess.h
@@ -48,7 +48,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "ProcessHelper.h"
class FindInstancesProcessTest;
-namespace Assimp {
+namespace Assimp {
// -------------------------------------------------------------------------------
/** @brief Get a pseudo(!)-hash representing a mesh.
diff --git a/3rdparty/assimp/code/FindInvalidDataProcess.cpp b/3rdparty/assimp/code/FindInvalidDataProcess.cpp
index 4e2d3cbdd..ad4ab75e4 100644
--- a/3rdparty/assimp/code/FindInvalidDataProcess.cpp
+++ b/3rdparty/assimp/code/FindInvalidDataProcess.cpp
@@ -85,18 +85,18 @@ void FindInvalidDataProcess::SetupProperties(const Importer* pImp)
// Update mesh references in the node graph
void UpdateMeshReferences(aiNode* node, const std::vector<unsigned int>& meshMapping)
{
- if (node->mNumMeshes) {
+ if (node->mNumMeshes) {
unsigned int out = 0;
- for (unsigned int a = 0; a < node->mNumMeshes;++a) {
+ for (unsigned int a = 0; a < node->mNumMeshes;++a) {
register unsigned int ref = node->mMeshes[a];
- if (0xffffffff != (ref = meshMapping[ref])) {
+ if (0xffffffff != (ref = meshMapping[ref])) {
node->mMeshes[out++] = ref;
}
}
// just let the members that are unused, that's much cheaper
// than a full array realloc'n'copy party ...
- if (!(node->mNumMeshes = out)) {
+ if (!(node->mNumMeshes = out)) {
delete[] node->mMeshes;
node->mMeshes = NULL;
@@ -119,13 +119,13 @@ void FindInvalidDataProcess::Execute( aiScene* pScene)
unsigned int real = 0;
// Process meshes
- for ( unsigned int a = 0; a < pScene->mNumMeshes; a++) {
+ for ( unsigned int a = 0; a < pScene->mNumMeshes; a++) {
int result;
- if ((result = ProcessMesh( pScene->mMeshes[a]))) {
+ if ((result = ProcessMesh( pScene->mMeshes[a]))) {
out = true;
- if (2 == result) {
+ if (2 == result) {
// remove this mesh
delete pScene->mMeshes[a];
AI_DEBUG_INVALIDATE_PTR(pScene->mMeshes[a]);
@@ -144,8 +144,8 @@ void FindInvalidDataProcess::Execute( aiScene* pScene)
}
- if (out) {
- if ( real != pScene->mNumMeshes) {
+ if (out) {
+ if ( real != pScene->mNumMeshes) {
if (!real) {
throw DeadlyImportError("No meshes remaining");
}
@@ -177,7 +177,7 @@ inline const char* ValidateArrayContents<aiVector3D>(const aiVector3D* arr, unsi
{
bool b = false;
unsigned int cnt = 0;
- for (unsigned int i = 0; i < size;++i) {
+ for (unsigned int i = 0; i < size;++i) {
if (dirtyMask.size() && dirtyMask[i]) {
continue;
@@ -185,10 +185,10 @@ inline const char* ValidateArrayContents<aiVector3D>(const aiVector3D* arr, unsi
++cnt;
const aiVector3D& v = arr[i];
- if (is_special_float(v.x) || is_special_float(v.y) || is_special_float(v.z)) {
+ if (is_special_float(v.x) || is_special_float(v.y) || is_special_float(v.z)) {
return "INF/NAN was found in a vector component";
}
- if (!mayBeZero && !v.x && !v.y && !v.z ) {
+ if (!mayBeZero && !v.x && !v.y && !v.z ) {
return "Found zero-length vector";
}
if (i && v != arr[i-1])b = true;
@@ -205,7 +205,7 @@ inline bool ProcessArray(T*& in, unsigned int num,const char* name,
const std::vector<bool>& dirtyMask, bool mayBeIdentical = false, bool mayBeZero = true)
{
const char* err = ValidateArrayContents(in,num,dirtyMask,mayBeIdentical,mayBeZero);
- if (err) {
+ if (err) {
DefaultLogger::get()->error(std::string("FindInvalidDataProcess fails on mesh ") + name + ": " + err);
delete[] in;
@@ -226,7 +226,7 @@ AI_FORCE_INLINE bool EpsilonCompare(float n, float s, float epsilon) {
// ------------------------------------------------------------------------------------------------
template <>
-bool EpsilonCompare<aiVectorKey>(const aiVectorKey& n, const aiVectorKey& s, float epsilon) {
+bool EpsilonCompare<aiVectorKey>(const aiVectorKey& n, const aiVectorKey& s, float epsilon) {
return
EpsilonCompare(n.mValue.x,s.mValue.x,epsilon) &&
EpsilonCompare(n.mValue.y,s.mValue.y,epsilon) &&
@@ -235,7 +235,7 @@ bool EpsilonCompare<aiVectorKey>(const aiVectorKey& n, const aiVectorKey& s, flo
// ------------------------------------------------------------------------------------------------
template <>
-bool EpsilonCompare<aiQuatKey>(const aiQuatKey& n, const aiQuatKey& s, float epsilon) {
+bool EpsilonCompare<aiQuatKey>(const aiQuatKey& n, const aiQuatKey& s, float epsilon) {
return
EpsilonCompare(n.mValue.x,s.mValue.x,epsilon) &&
EpsilonCompare(n.mValue.y,s.mValue.y,epsilon) &&
@@ -338,7 +338,7 @@ int FindInvalidDataProcess::ProcessMesh (aiMesh* pMesh)
// Ignore elements that are not referenced by vertices.
// (they are, for example, caused by the FindDegenerates step)
- for (unsigned int m = 0; m < pMesh->mNumFaces;++m) {
+ for (unsigned int m = 0; m < pMesh->mNumFaces;++m) {
const aiFace& f = pMesh->mFaces[m];
for (unsigned int i = 0; i < f.mNumIndices;++i) {
@@ -347,17 +347,17 @@ int FindInvalidDataProcess::ProcessMesh (aiMesh* pMesh)
}
// Process vertex positions
- if (pMesh->mVertices && ProcessArray(pMesh->mVertices,pMesh->mNumVertices,"positions",dirtyMask)) {
+ if (pMesh->mVertices && ProcessArray(pMesh->mVertices,pMesh->mNumVertices,"positions",dirtyMask)) {
DefaultLogger::get()->error("Deleting mesh: Unable to continue without vertex positions");
return 2;
}
// process texture coordinates
- for (unsigned int i = 0; i < AI_MAX_NUMBER_OF_TEXTURECOORDS && pMesh->mTextureCoords[i];++i) {
- if (ProcessArray(pMesh->mTextureCoords[i],pMesh->mNumVertices,"uvcoords",dirtyMask)) {
+ for (unsigned int i = 0; i < AI_MAX_NUMBER_OF_TEXTURECOORDS && pMesh->mTextureCoords[i];++i) {
+ if (ProcessArray(pMesh->mTextureCoords[i],pMesh->mNumVertices,"uvcoords",dirtyMask)) {
// delete all subsequent texture coordinate sets.
- for (unsigned int a = i+1; a < AI_MAX_NUMBER_OF_TEXTURECOORDS;++a) {
+ for (unsigned int a = i+1; a < AI_MAX_NUMBER_OF_TEXTURECOORDS;++a) {
delete[] pMesh->mTextureCoords[a]; pMesh->mTextureCoords[a] = NULL;
}
ret = true;
@@ -368,7 +368,7 @@ int FindInvalidDataProcess::ProcessMesh (aiMesh* pMesh)
// they are invalid or not.
// Normals and tangents are undefined for point and line faces.
- if (pMesh->mNormals || pMesh->mTangents) {
+ if (pMesh->mNormals || pMesh->mTangents) {
if (aiPrimitiveType_POINT & pMesh->mPrimitiveTypes ||
aiPrimitiveType_LINE & pMesh->mPrimitiveTypes)
@@ -381,7 +381,7 @@ int FindInvalidDataProcess::ProcessMesh (aiMesh* pMesh)
{
const aiFace& f = pMesh->mFaces[m];
- if (f.mNumIndices < 3) {
+ if (f.mNumIndices < 3) {
dirtyMask[f.mIndices[0]] = true;
if (f.mNumIndices == 2) {
@@ -401,13 +401,13 @@ int FindInvalidDataProcess::ProcessMesh (aiMesh* pMesh)
ret = true;
// Process mesh tangents
- if (pMesh->mTangents && ProcessArray(pMesh->mTangents,pMesh->mNumVertices,"tangents",dirtyMask)) {
+ if (pMesh->mTangents && ProcessArray(pMesh->mTangents,pMesh->mNumVertices,"tangents",dirtyMask)) {
delete[] pMesh->mBitangents; pMesh->mBitangents = NULL;
ret = true;
}
// Process mesh bitangents
- if (pMesh->mBitangents && ProcessArray(pMesh->mBitangents,pMesh->mNumVertices,"bitangents",dirtyMask)) {
+ if (pMesh->mBitangents && ProcessArray(pMesh->mBitangents,pMesh->mNumVertices,"bitangents",dirtyMask)) {
delete[] pMesh->mTangents; pMesh->mTangents = NULL;
ret = true;
}
diff --git a/3rdparty/assimp/code/FindInvalidDataProcess.h b/3rdparty/assimp/code/FindInvalidDataProcess.h
index 304a0ff26..0cdf15877 100644
--- a/3rdparty/assimp/code/FindInvalidDataProcess.h
+++ b/3rdparty/assimp/code/FindInvalidDataProcess.h
@@ -48,7 +48,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
struct aiMesh;
class FindInvalidDataProcessTest;
-namespace Assimp {
+namespace Assimp {
// ---------------------------------------------------------------------------
/** The FindInvalidData postprocessing step. It searches the mesh data
diff --git a/3rdparty/assimp/code/GenFaceNormalsProcess.cpp b/3rdparty/assimp/code/GenFaceNormalsProcess.cpp
index f0987c85d..f4baca6ae 100644
--- a/3rdparty/assimp/code/GenFaceNormalsProcess.cpp
+++ b/3rdparty/assimp/code/GenFaceNormalsProcess.cpp
@@ -67,7 +67,7 @@ GenFaceNormalsProcess::~GenFaceNormalsProcess()
// Returns whether the processing step is present in the given flag field.
bool GenFaceNormalsProcess::IsActive( unsigned int pFlags) const
{
- return (pFlags & aiProcess_GenNormals) != 0;
+ return (pFlags & aiProcess_GenNormals) != 0;
}
// ------------------------------------------------------------------------------------------------
@@ -81,12 +81,12 @@ void GenFaceNormalsProcess::Execute( aiScene* pScene)
}
bool bHas = false;
- for ( unsigned int a = 0; a < pScene->mNumMeshes; a++) {
+ for ( unsigned int a = 0; a < pScene->mNumMeshes; a++) {
if (this->GenMeshFaceNormals( pScene->mMeshes[a])) {
bHas = true;
}
}
- if (bHas) {
+ if (bHas) {
DefaultLogger::get()->info("GenFaceNormalsProcess finished. "
"Face normals have been calculated");
}
@@ -105,7 +105,7 @@ bool GenFaceNormalsProcess::GenMeshFaceNormals (aiMesh* pMesh)
// If the mesh consists of lines and/or points but not of
// triangles or higher-order polygons the normal vectors
// are undefined.
- if (!(pMesh->mPrimitiveTypes & (aiPrimitiveType_TRIANGLE | aiPrimitiveType_POLYGON))) {
+ if (!(pMesh->mPrimitiveTypes & (aiPrimitiveType_TRIANGLE | aiPrimitiveType_POLYGON))) {
DefaultLogger::get()->info("Normal vectors are undefined for line and point meshes");
return false;
}
@@ -115,9 +115,9 @@ bool GenFaceNormalsProcess::GenMeshFaceNormals (aiMesh* pMesh)
const float qnan = get_qnan();
// iterate through all faces and compute per-face normals but store them per-vertex.
- for ( unsigned int a = 0; a < pMesh->mNumFaces; a++) {
+ for ( unsigned int a = 0; a < pMesh->mNumFaces; a++) {
const aiFace& face = pMesh->mFaces[a];
- if (face.mNumIndices < 3) {
+ if (face.mNumIndices < 3) {
// either a point or a line -> no well-defined normal vector
for (unsigned int i = 0;i < face.mNumIndices;++i) {
pMesh->mNormals[face.mIndices[i]] = qnan;
diff --git a/3rdparty/assimp/code/GenVertexNormalsProcess.cpp b/3rdparty/assimp/code/GenVertexNormalsProcess.cpp
index 260ad68fd..e8be8709f 100644
--- a/3rdparty/assimp/code/GenVertexNormalsProcess.cpp
+++ b/3rdparty/assimp/code/GenVertexNormalsProcess.cpp
@@ -97,7 +97,7 @@ void GenVertexNormalsProcess::Execute( aiScene* pScene)
bHas = true;
}
- if (bHas) {
+ if (bHas) {
DefaultLogger::get()->info("GenVertexNormalsProcess finished. "
"Vertex normals have been calculated");
}
@@ -151,7 +151,7 @@ bool GenVertexNormalsProcess::GenMeshVertexNormals (aiMesh* pMesh, unsigned int
SpatialSort* vertexFinder = NULL;
SpatialSort _vertexFinder;
float posEpsilon = 1e-5f;
- if (shared) {
+ if (shared) {
std::vector<std::pair<SpatialSort,float> >* avf;
shared->GetProperty(AI_SPP_SPATIAL_SORT,avf);
if (avf)
@@ -161,7 +161,7 @@ bool GenVertexNormalsProcess::GenMeshVertexNormals (aiMesh* pMesh, unsigned int
posEpsilon = blubb.second;
}
}
- if (!vertexFinder) {
+ if (!vertexFinder) {
_vertexFinder.Fill(pMesh->mVertices, pMesh->mNumVertices, sizeof( aiVector3D));
vertexFinder = &_vertexFinder;
posEpsilon = ComputePositionEpsilon(pMesh);
@@ -169,19 +169,19 @@ bool GenVertexNormalsProcess::GenMeshVertexNormals (aiMesh* pMesh, unsigned int
std::vector<unsigned int> verticesFound;
aiVector3D* pcNew = new aiVector3D[pMesh->mNumVertices];
- if (configMaxAngle >= AI_DEG_TO_RAD( 175.f )) {
+ if (configMaxAngle >= AI_DEG_TO_RAD( 175.f )) {
// There is no angle limit. Thus all vertices with positions close
// to each other will receive the same vertex normal. This allows us
// to optimize the whole algorithm a little bit ...
std::vector<bool> abHad(pMesh->mNumVertices,false);
- for (unsigned int i = 0; i < pMesh->mNumVertices;++i) {
+ for (unsigned int i = 0; i < pMesh->mNumVertices;++i) {
if (abHad[i])continue;
// Get all vertices that share this one ...
vertexFinder->FindPositions( pMesh->mVertices[i], posEpsilon, verticesFound);
aiVector3D pcNor;
- for (unsigned int a = 0; a < verticesFound.size(); ++a) {
+ for (unsigned int a = 0; a < verticesFound.size(); ++a) {
const aiVector3D& v = pMesh->mNormals[verticesFound[a]];
if (is_not_qnan(v.x))pcNor += v;
}
@@ -198,14 +198,14 @@ bool GenVertexNormalsProcess::GenMeshVertexNormals (aiMesh* pMesh, unsigned int
}
// Slower code path if a smooth angle is set. There are many ways to achieve
// the effect, this one is the most straightforward one.
- else {
+ else {
const float fLimit = ::cos(configMaxAngle);
- for (unsigned int i = 0; i < pMesh->mNumVertices;++i) {
+ for (unsigned int i = 0; i < pMesh->mNumVertices;++i) {
// Get all vertices that share this one ...
vertexFinder->FindPositions( pMesh->mVertices[i] , posEpsilon, verticesFound);
aiVector3D pcNor;
- for (unsigned int a = 0; a < verticesFound.size(); ++a) {
+ for (unsigned int a = 0; a < verticesFound.size(); ++a) {
const aiVector3D& v = pMesh->mNormals[verticesFound[a]];
// check whether the angle between the two normals is not too large
diff --git a/3rdparty/assimp/code/GenericProperty.h b/3rdparty/assimp/code/GenericProperty.h
index c64d392fe..ccc504a66 100644
--- a/3rdparty/assimp/code/GenericProperty.h
+++ b/3rdparty/assimp/code/GenericProperty.h
@@ -53,7 +53,7 @@ inline void SetGenericProperty(std::map< unsigned int, T >& list,
const uint32_t hash = SuperFastHash(szName);
typename std::map<unsigned int, T>::iterator it = list.find(hash);
- if (it == list.end()) {
+ if (it == list.end()) {
if (bWasExisting)
*bWasExisting = false;
list.insert(std::pair<unsigned int, T>( hash, value ));
@@ -90,18 +90,18 @@ inline void SetGenericPropertyPtr(std::map< unsigned int, T* >& list,
const uint32_t hash = SuperFastHash(szName);
typename std::map<unsigned int, T*>::iterator it = list.find(hash);
- if (it == list.end()) {
+ if (it == list.end()) {
if (bWasExisting)
*bWasExisting = false;
list.insert(std::pair<unsigned int,T*>( hash, value ));
return;
}
- if ((*it).second != value) {
+ if ((*it).second != value) {
delete (*it).second;
(*it).second = value;
}
- if (!value) {
+ if (!value) {
list.erase(it);
}
if (bWasExisting)
diff --git a/3rdparty/assimp/code/HMPFileData.h b/3rdparty/assimp/code/HMPFileData.h
index 5ac01bd9b..2d372a063 100644
--- a/3rdparty/assimp/code/HMPFileData.h
+++ b/3rdparty/assimp/code/HMPFileData.h
@@ -41,20 +41,20 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//! @file Data structures for the 3D Game Studio Heightmap format (HMP)
//!
-namespace Assimp {
-namespace HMP {
+namespace Assimp {
+namespace HMP {
#include "./../include/Compiler/pushpack1.h"
// to make it easier for us, we test the magic word against both "endianesses"
-#define AI_HMP_MAGIC_NUMBER_BE_4 AI_MAKE_MAGIC("HMP4")
-#define AI_HMP_MAGIC_NUMBER_LE_4 AI_MAKE_MAGIC("4PMH")
+#define AI_HMP_MAGIC_NUMBER_BE_4 AI_MAKE_MAGIC("HMP4")
+#define AI_HMP_MAGIC_NUMBER_LE_4 AI_MAKE_MAGIC("4PMH")
-#define AI_HMP_MAGIC_NUMBER_BE_5 AI_MAKE_MAGIC("HMP5")
-#define AI_HMP_MAGIC_NUMBER_LE_5 AI_MAKE_MAGIC("5PMH")
+#define AI_HMP_MAGIC_NUMBER_BE_5 AI_MAKE_MAGIC("HMP5")
+#define AI_HMP_MAGIC_NUMBER_LE_5 AI_MAKE_MAGIC("5PMH")
-#define AI_HMP_MAGIC_NUMBER_BE_7 AI_MAKE_MAGIC("HMP7")
-#define AI_HMP_MAGIC_NUMBER_LE_7 AI_MAKE_MAGIC("7PMH")
+#define AI_HMP_MAGIC_NUMBER_BE_7 AI_MAKE_MAGIC("HMP7")
+#define AI_HMP_MAGIC_NUMBER_LE_7 AI_MAKE_MAGIC("7PMH")
// ---------------------------------------------------------------------------
/** Data structure for the header of a HMP5 file.
@@ -62,41 +62,41 @@ namespace HMP {
*/
struct Header_HMP5
{
- int8_t ident[4]; // "HMP5"
- int32_t version;
+ int8_t ident[4]; // "HMP5"
+ int32_t version;
// ignored
- float scale[3];
- float scale_origin[3];
- float boundingradius;
+ float scale[3];
+ float scale_origin[3];
+ float boundingradius;
//! Size of one triangle in x direction
- float ftrisize_x;
+ float ftrisize_x;
//! Size of one triangle in y direction
- float ftrisize_y;
+ float ftrisize_y;
//! Number of vertices in x direction
- float fnumverts_x;
+ float fnumverts_x;
//! Number of skins in the file
- int32_t numskins;
+ int32_t numskins;
// can ignore this?
- int32_t skinwidth;
- int32_t skinheight;
+ int32_t skinwidth;
+ int32_t skinheight;
//!Number of vertices in the file
- int32_t numverts;
+ int32_t numverts;
// ignored and zero
- int32_t numtris;
+ int32_t numtris;
//! only one supported ...
- int32_t numframes;
+ int32_t numframes;
//! Always 0 ...
- int32_t num_stverts;
- int32_t flags;
- float size;
+ int32_t num_stverts;
+ int32_t flags;
+ float size;
} PACK_STRUCT;
// ---------------------------------------------------------------------------
@@ -124,7 +124,7 @@ struct Vertex_HMP5
*/
struct Vertex_HMP7
{
- uint16_t z;
+ uint16_t z;
int8_t normal_x,normal_y;
} PACK_STRUCT;
diff --git a/3rdparty/assimp/code/HMPLoader.cpp b/3rdparty/assimp/code/HMPLoader.cpp
index f9323687b..dc4dea152 100644
--- a/3rdparty/assimp/code/HMPLoader.cpp
+++ b/3rdparty/assimp/code/HMPLoader.cpp
@@ -384,8 +384,8 @@ void HMPImporter::CreateOutputFaceList(unsigned int width,unsigned int height)
// Build the terrain square
unsigned int iCurrent = 0;
- for (unsigned int y = 0; y < height-1;++y) {
- for (unsigned int x = 0; x < width-1;++x,++pcFaceOut) {
+ for (unsigned int y = 0; y < height-1;++y) {
+ for (unsigned int x = 0; x < width-1;++x,++pcFaceOut) {
pcFaceOut->mNumIndices = 4;
pcFaceOut->mIndices = new unsigned int[4];
@@ -485,8 +485,8 @@ void HMPImporter::GenerateTextureCoords(
const float fY = (1.0f / height) + (1.0f / height) / (height-1);
const float fX = (1.0f / width) + (1.0f / width) / (width-1);
- for (unsigned int y = 0; y < height;++y) {
- for (unsigned int x = 0; x < width;++x,++uv) {
+ for (unsigned int y = 0; y < height;++y) {
+ for (unsigned int x = 0; x < width;++x,++uv) {
uv->y = fY*y;
uv->x = fX*x;
uv->z = 0.0f;
diff --git a/3rdparty/assimp/code/HalfLifeFileData.h b/3rdparty/assimp/code/HalfLifeFileData.h
index ab2cbbd54..b12adf6ad 100644
--- a/3rdparty/assimp/code/HalfLifeFileData.h
+++ b/3rdparty/assimp/code/HalfLifeFileData.h
@@ -53,14 +53,14 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "MDLFileData.h"
-namespace Assimp {
-namespace MDL {
+namespace Assimp {
+namespace MDL {
// magic bytes used in Half Life 2 MDL models
-#define AI_MDL_MAGIC_NUMBER_BE_HL2a AI_MAKE_MAGIC("IDST")
-#define AI_MDL_MAGIC_NUMBER_LE_HL2a AI_MAKE_MAGIC("TSDI")
-#define AI_MDL_MAGIC_NUMBER_BE_HL2b AI_MAKE_MAGIC("IDSQ")
-#define AI_MDL_MAGIC_NUMBER_LE_HL2b AI_MAKE_MAGIC("QSDI")
+#define AI_MDL_MAGIC_NUMBER_BE_HL2a AI_MAKE_MAGIC("IDST")
+#define AI_MDL_MAGIC_NUMBER_LE_HL2a AI_MAKE_MAGIC("TSDI")
+#define AI_MDL_MAGIC_NUMBER_BE_HL2b AI_MAKE_MAGIC("IDSQ")
+#define AI_MDL_MAGIC_NUMBER_LE_HL2b AI_MAKE_MAGIC("QSDI")
// ---------------------------------------------------------------------------
/** \struct Header_HL2
@@ -70,76 +70,76 @@ namespace MDL {
struct Header_HL2
{
//! magic number: "IDST"/"IDSQ"
- char ident[4];
+ char ident[4];
//! Version number
- int32_t version;
+ int32_t version;
//! Original file name in pak ?
- char name[64];
+ char name[64];
//! Length of file name/length of file?
- int32_t length;
+ int32_t length;
//! For viewer, ignored
- aiVector3D eyeposition;
- aiVector3D min;
- aiVector3D max;
+ aiVector3D eyeposition;
+ aiVector3D min;
+ aiVector3D max;
//! AABB of the model
- aiVector3D bbmin;
- aiVector3D bbmax;
+ aiVector3D bbmin;
+ aiVector3D bbmax;
// File flags
- int32_t flags;
+ int32_t flags;
//! NUmber of bones contained in the file
- int32_t numbones;
- int32_t boneindex;
+ int32_t numbones;
+ int32_t boneindex;
//! Number of bone controllers for bone animation
- int32_t numbonecontrollers;
- int32_t bonecontrollerindex;
+ int32_t numbonecontrollers;
+ int32_t bonecontrollerindex;
//! More bounding boxes ...
- int32_t numhitboxes;
- int32_t hitboxindex;
+ int32_t numhitboxes;
+ int32_t hitboxindex;
//! Animation sequences in the file
- int32_t numseq;
- int32_t seqindex;
+ int32_t numseq;
+ int32_t seqindex;
//! Loaded sequences. Ignored
- int32_t numseqgroups;
- int32_t seqgroupindex;
+ int32_t numseqgroups;
+ int32_t seqgroupindex;
//! Raw texture data
- int32_t numtextures;
- int32_t textureindex;
- int32_t texturedataindex;
+ int32_t numtextures;
+ int32_t textureindex;
+ int32_t texturedataindex;
//! Number of skins (=textures?)
- int32_t numskinref;
- int32_t numskinfamilies;
- int32_t skinindex;
+ int32_t numskinref;
+ int32_t numskinfamilies;
+ int32_t skinindex;
//! Number of parts
- int32_t numbodyparts;
- int32_t bodypartindex;
+ int32_t numbodyparts;
+ int32_t bodypartindex;
//! attachable points for gameplay and physics
- int32_t numattachments;
- int32_t attachmentindex;
+ int32_t numattachments;
+ int32_t attachmentindex;
//! Table of sound effects associated with the model
- int32_t soundtable;
- int32_t soundindex;
- int32_t soundgroups;
- int32_t soundgroupindex;
+ int32_t soundtable;
+ int32_t soundindex;
+ int32_t soundgroups;
+ int32_t soundgroupindex;
//! Number of animation transitions
- int32_t numtransitions;
- int32_t transitionindex;
+ int32_t numtransitions;
+ int32_t transitionindex;
} PACK_STRUCT;
#include "./../include/Compiler/poppack1.h"
diff --git a/3rdparty/assimp/code/IFF.h b/3rdparty/assimp/code/IFF.h
index e1bfa2103..91d56b347 100644
--- a/3rdparty/assimp/code/IFF.h
+++ b/3rdparty/assimp/code/IFF.h
@@ -9,8 +9,8 @@
#include "ByteSwap.h"
-namespace Assimp {
-namespace IFF {
+namespace Assimp {
+namespace IFF {
#include "./../include/Compiler/pushpack1.h"
diff --git a/3rdparty/assimp/code/IRRLoader.cpp b/3rdparty/assimp/code/IRRLoader.cpp
index 20a94c09e..1498c9eea 100644
--- a/3rdparty/assimp/code/IRRLoader.cpp
+++ b/3rdparty/assimp/code/IRRLoader.cpp
@@ -109,7 +109,7 @@ void IRRImporter::SetupProperties(const Importer* pImp)
{
// read the output frame rate of all node animation channels
fps = pImp->GetPropertyInteger(AI_CONFIG_IMPORT_IRR_ANIM_FPS,100);
- if (fps < 10.) {
+ if (fps < 10.) {
DefaultLogger::get()->error("IRR: Invalid FPS configuration");
fps = 100;
}
@@ -169,7 +169,7 @@ aiMesh* IRRImporter::BuildSingleQuadMesh(const SkyboxVertex& v1,
void IRRImporter::BuildSkybox(std::vector<aiMesh*>& meshes, std::vector<aiMaterial*> materials)
{
// Update the material of the skybox - replace the name and disable shading for skyboxes.
- for (unsigned int i = 0; i < 6;++i) {
+ for (unsigned int i = 0; i < 6;++i) {
MaterialHelper* out = ( MaterialHelper* ) (*(materials.end()-(6-i)));
aiString s;
@@ -241,7 +241,7 @@ void IRRImporter::CopyMaterial(std::vector<aiMaterial*>& materials,
unsigned int& defMatIdx,
aiMesh* mesh)
{
- if (inmaterials.empty()) {
+ if (inmaterials.empty()) {
// Do we have a default material? If not we need to create one
if (0xffffffff == defMatIdx)
{
@@ -258,7 +258,7 @@ void IRRImporter::CopyMaterial(std::vector<aiMaterial*>& materials,
mesh->mMaterialIndex = defMatIdx;
return;
}
- else if (inmaterials.size() > 1) {
+ else if (inmaterials.size() > 1) {
DefaultLogger::get()->info("IRR: Skipping additional materials");
}
@@ -298,15 +298,15 @@ void IRRImporter::ComputeAnimations(Node* root, aiNode* real, std::vector<aiNode
return;
}
unsigned int total = 0;
- for (std::list<Animator>::iterator it = root->animators.begin();it != root->animators.end(); ++it) {
- if ((*it).type == Animator::UNKNOWN || (*it).type == Animator::OTHER) {
+ for (std::list<Animator>::iterator it = root->animators.begin();it != root->animators.end(); ++it) {
+ if ((*it).type == Animator::UNKNOWN || (*it).type == Animator::OTHER) {
DefaultLogger::get()->warn("IRR: Skipping unknown or unsupported animator");
continue;
}
++total;
}
if (!total)return;
- else if (1 == total) {
+ else if (1 == total) {
DefaultLogger::get()->warn("IRR: Adding dummy nodes to simulate multiple animators");
}
@@ -321,7 +321,7 @@ void IRRImporter::ComputeAnimations(Node* root, aiNode* real, std::vector<aiNode
Animator& in = *it ;
aiNodeAnim* anim = new aiNodeAnim();
- if (cur != total-1) {
+ if (cur != total-1) {
// Build a new name - a prefix instead of a suffix because it is
// easier to check against
anim->mNodeName.length = ::sprintf(anim->mNodeName.data,
@@ -349,7 +349,7 @@ void IRRImporter::ComputeAnimations(Node* root, aiNode* real, std::vector<aiNode
else anim->mNodeName.Set(root->name);
++cur;
- switch (in.type) {
+ switch (in.type) {
case Animator::ROTATION:
{
// -----------------------------------------------------
@@ -444,7 +444,7 @@ void IRRImporter::ComputeAnimations(Node* root, aiNode* real, std::vector<aiNode
// from Irrlicht, what else should we do than copying it?
aiVector3D vecU,vecV;
- if (in.direction.y) {
+ if (in.direction.y) {
vecV = aiVector3D(50,0,0) ^ in.direction;
}
else vecV = aiVector3D(0,50,00) ^ in.direction;
@@ -452,7 +452,7 @@ void IRRImporter::ComputeAnimations(Node* root, aiNode* real, std::vector<aiNode
vecU = (vecV ^ in.direction).Normalize();
// build the output keys
- for (unsigned int i = 0; i < anim->mNumPositionKeys;++i) {
+ for (unsigned int i = 0; i < anim->mNumPositionKeys;++i) {
aiVectorKey& key = anim->mPositionKeys[i];
key.mTime = i * tdelta;
@@ -481,7 +481,7 @@ void IRRImporter::ComputeAnimations(Node* root, aiNode* real, std::vector<aiNode
const double timeFactor = lengthOfWay / in.timeForWay;
// build the output keys
- for (unsigned int i = 0; i < anim->mNumPositionKeys;++i) {
+ for (unsigned int i = 0; i < anim->mNumPositionKeys;++i) {
aiVectorKey& key = anim->mPositionKeys[i];
key.mTime = i * tdelta;
key.mValue = in.circleCenter + diff * float(timeFactor * key.mTime);
@@ -494,14 +494,14 @@ void IRRImporter::ComputeAnimations(Node* root, aiNode* real, std::vector<aiNode
// repeat outside the defined time range
anim->mPostState = anim->mPreState = aiAnimBehaviour_REPEAT;
const int size = (int)in.splineKeys.size();
- if (!size) {
+ if (!size) {
// We have no point in the spline. That's bad. Really bad.
DefaultLogger::get()->warn("IRR: Spline animators with no points defined");
delete anim;anim = NULL;
break;
}
- else if (size == 1) {
+ else if (size == 1) {
// We have just one point in the spline so we don't need the full calculation
anim->mNumPositionKeys = 1;
anim->mPositionKeys = new aiVectorKey[anim->mNumPositionKeys];
@@ -555,7 +555,7 @@ void IRRImporter::ComputeAnimations(Node* root, aiNode* real, std::vector<aiNode
// UNKNOWN , OTHER
break;
};
- if (anim) {
+ if (anim) {
anims.push_back(anim);
++total;
}
@@ -576,7 +576,7 @@ void SetupMapping (MaterialHelper* mat, aiTextureMapping mode, const aiVector3D&
for (unsigned int i = 0; i < mat->mNumProperties;++i)
{
aiMaterialProperty* prop = mat->mProperties[i];
- if (!::strcmp( prop->mKey.data, "$tex.file")) {
+ if (!::strcmp( prop->mKey.data, "$tex.file")) {
// Setup the mapping key
aiMaterialProperty* m = new aiMaterialProperty();
m->mKey.Set("$tex.mapping");
@@ -592,7 +592,7 @@ void SetupMapping (MaterialHelper* mat, aiTextureMapping mode, const aiVector3D&
p.push_back(m);
// Setup the mapping axis
- if (mode == aiTextureMapping_CYLINDER || mode == aiTextureMapping_PLANE || mode == aiTextureMapping_SPHERE) {
+ if (mode == aiTextureMapping_CYLINDER || mode == aiTextureMapping_PLANE || mode == aiTextureMapping_SPHERE) {
m = new aiMaterialProperty();
m->mKey.Set("$tex.mapaxis");
m->mIndex = prop->mIndex;
@@ -605,7 +605,7 @@ void SetupMapping (MaterialHelper* mat, aiTextureMapping mode, const aiVector3D&
p.push_back(m);
}
}
- else if (! ::strcmp( prop->mKey.data, "$tex.uvwsrc")) {
+ else if (! ::strcmp( prop->mKey.data, "$tex.uvwsrc")) {
delete mat->mProperties[i];
}
else p.push_back(prop);
@@ -614,7 +614,7 @@ void SetupMapping (MaterialHelper* mat, aiTextureMapping mode, const aiVector3D&
if (p.empty())return;
// rebuild the output array
- if (p.size() > mat->mNumAllocated) {
+ if (p.size() > mat->mNumAllocated) {
delete[] mat->mProperties;
mat->mProperties = new aiMaterialProperty*[p.size()*2];
@@ -630,8 +630,8 @@ void IRRImporter::GenerateGraph(Node* root,aiNode* rootOut ,aiScene* scene,
std::vector<aiMesh*>& meshes,
std::vector<aiNodeAnim*>& anims,
std::vector<AttachmentInfo>& attach,
- std::vector<aiMaterial*>& materials,
- unsigned int& defMatIdx)
+ std::vector<aiMaterial*>& materials,
+ unsigned int& defMatIdx)
{
unsigned int oldMeshSize = (unsigned int)meshes.size();
//unsigned int meshTrafoAssign = 0;
@@ -649,7 +649,7 @@ void IRRImporter::GenerateGraph(Node* root,aiNode* rootOut ,aiScene* scene,
// the list of all scenes to be attached to the
// graph we're currently building
aiScene* scene = batch.GetImport(root->id);
- if (!scene) {
+ if (!scene) {
DefaultLogger::get()->error("IRR: Unable to load external file: " + root->meshPath);
break;
}
@@ -660,13 +660,13 @@ void IRRImporter::GenerateGraph(Node* root,aiNode* rootOut ,aiScene* scene,
// don't execute any pp-steps on the file, the numbers
// should be equal. If they are not, we can impossibly
// do this ...
- if (root->materials.size() != (unsigned int)scene->mNumMaterials) {
+ if (root->materials.size() != (unsigned int)scene->mNumMaterials) {
DefaultLogger::get()->warn("IRR: Failed to match imported materials "
"with the materials found in the IRR scene file");
break;
}
- for (unsigned int i = 0; i < scene->mNumMaterials;++i) {
+ for (unsigned int i = 0; i < scene->mNumMaterials;++i) {
// Delete the old material, we don't need it anymore
delete scene->mMaterials[i];
@@ -677,7 +677,7 @@ void IRRImporter::GenerateGraph(Node* root,aiNode* rootOut ,aiScene* scene,
// NOTE: Each mesh should have exactly one material assigned,
// but we do it in a separate loop if this behaviour changes
// in future.
- for (unsigned int i = 0; i < scene->mNumMeshes;++i) {
+ for (unsigned int i = 0; i < scene->mNumMeshes;++i) {
// Process material flags
aiMesh* mesh = scene->mMeshes[i];
@@ -692,14 +692,14 @@ void IRRImporter::GenerateGraph(Node* root,aiNode* rootOut ,aiScene* scene,
if (mesh->HasVertexColors(0) && src.second & AI_IRRMESH_MAT_trans_vertex_alpha)
{
bool bdo = true;
- for (unsigned int a = 1; a < mesh->mNumVertices;++a) {
+ for (unsigned int a = 1; a < mesh->mNumVertices;++a) {
- if (mesh->mColors[0][a].a != mesh->mColors[0][a-1].a) {
+ if (mesh->mColors[0][a].a != mesh->mColors[0][a-1].a) {
bdo = false;
break;
}
}
- if (bdo) {
+ if (bdo) {
DefaultLogger::get()->info("IRR: Replacing mesh vertex alpha with common opacity");
for (unsigned int a = 0; a < mesh->mNumVertices;++a)
@@ -713,13 +713,13 @@ void IRRImporter::GenerateGraph(Node* root,aiNode* rootOut ,aiScene* scene,
// (either lightmap, normalmap, 2layered material) we need to
// setup the correct UV index for it. The texture can either
// be diffuse (lightmap & 2layer) or a normal map (normal & parallax)
- if (mesh->HasTextureCoords(1)) {
+ if (mesh->HasTextureCoords(1)) {
int idx = 1;
- if (src.second & (AI_IRRMESH_MAT_solid_2layer | AI_IRRMESH_MAT_lightmap)) {
+ if (src.second & (AI_IRRMESH_MAT_solid_2layer | AI_IRRMESH_MAT_lightmap)) {
mat->AddProperty(&idx,1,AI_MATKEY_UVWSRC_DIFFUSE(0));
}
- else if (src.second & AI_IRRMESH_MAT_normalmap_solid) {
+ else if (src.second & AI_IRRMESH_MAT_normalmap_solid) {
mat->AddProperty(&idx,1,AI_MATKEY_UVWSRC_NORMALS(0));
}
}
@@ -819,12 +819,12 @@ void IRRImporter::GenerateGraph(Node* root,aiNode* rootOut ,aiScene* scene,
// Check whether we added a mesh (or more than one ...). In this case
// we'll also need to attach it to the node
- if (oldMeshSize != (unsigned int) meshes.size()) {
+ if (oldMeshSize != (unsigned int) meshes.size()) {
rootOut->mNumMeshes = (unsigned int)meshes.size() - oldMeshSize;
rootOut->mMeshes = new unsigned int[rootOut->mNumMeshes];
- for (unsigned int a = 0; a < rootOut->mNumMeshes;++a) {
+ for (unsigned int a = 0; a < rootOut->mNumMeshes;++a) {
rootOut->mMeshes[a] = oldMeshSize+a;
}
}
@@ -861,10 +861,10 @@ void IRRImporter::GenerateGraph(Node* root,aiNode* rootOut ,aiScene* scene,
// Add all children recursively. First allocate enough storage
// for them, then call us again
rootOut->mNumChildren = (unsigned int)root->children.size();
- if (rootOut->mNumChildren) {
+ if (rootOut->mNumChildren) {
rootOut->mChildren = new aiNode*[rootOut->mNumChildren];
- for (unsigned int i = 0; i < rootOut->mNumChildren;++i) {
+ for (unsigned int i = 0; i < rootOut->mNumChildren;++i) {
aiNode* node = rootOut->mChildren[i] = new aiNode();
node->mParent = rootOut;
@@ -908,7 +908,7 @@ void IRRImporter::InternReadFile( const std::string& pFile,
// Batch loader used to load external models
BatchLoader batch(pIOHandler);
-// batch.SetBasePath(pFile);
+// batch.SetBasePath(pFile);
cameras.reserve(5);
lights.reserve(5);
@@ -917,11 +917,11 @@ void IRRImporter::InternReadFile( const std::string& pFile,
unsigned int guessedAnimCnt = 0, guessedMeshCnt = 0, guessedMatCnt = 0;
// Parse the XML file
- while (reader->read()) {
- switch (reader->getNodeType()) {
+ while (reader->read()) {
+ switch (reader->getNodeType()) {
case EXN_ELEMENT:
- if (!ASSIMP_stricmp(reader->getNodeName(),"node")) {
+ if (!ASSIMP_stricmp(reader->getNodeName(),"node")) {
// ***********************************************************************
/* What we're going to do with the node depends
* on its type:
@@ -944,20 +944,20 @@ void IRRImporter::InternReadFile( const std::string& pFile,
// ***********************************************************************
const char* sz = reader->getAttributeValueSafe("type");
Node* nd;
- if (!ASSIMP_stricmp(sz,"mesh") || !ASSIMP_stricmp(sz,"octTree")) {
+ if (!ASSIMP_stricmp(sz,"mesh") || !ASSIMP_stricmp(sz,"octTree")) {
// OctTree's and meshes are treated equally
nd = new Node(Node::MESH);
}
- else if (!ASSIMP_stricmp(sz,"cube")) {
+ else if (!ASSIMP_stricmp(sz,"cube")) {
nd = new Node(Node::CUBE);
++guessedMeshCnt;
// meshes.push_back(StandardShapes::MakeMesh(&StandardShapes::MakeHexahedron));
}
- else if (!ASSIMP_stricmp(sz,"skybox")) {
+ else if (!ASSIMP_stricmp(sz,"skybox")) {
nd = new Node(Node::SKYBOX);
guessedMeshCnt += 6;
}
- else if (!ASSIMP_stricmp(sz,"camera")) {
+ else if (!ASSIMP_stricmp(sz,"camera")) {
nd = new Node(Node::CAMERA);
// Setup a temporary name for the camera
@@ -965,7 +965,7 @@ void IRRImporter::InternReadFile( const std::string& pFile,
cam->mName.Set( nd->name );
cameras.push_back(cam);
}
- else if (!ASSIMP_stricmp(sz,"light")) {
+ else if (!ASSIMP_stricmp(sz,"light")) {
nd = new Node(Node::LIGHT);
// Setup a temporary name for the light
@@ -973,25 +973,25 @@ void IRRImporter::InternReadFile( const std::string& pFile,
cam->mName.Set( nd->name );
lights.push_back(cam);
}
- else if (!ASSIMP_stricmp(sz,"sphere")) {
+ else if (!ASSIMP_stricmp(sz,"sphere")) {
nd = new Node(Node::SPHERE);
++guessedMeshCnt;
}
- else if (!ASSIMP_stricmp(sz,"animatedMesh")) {
+ else if (!ASSIMP_stricmp(sz,"animatedMesh")) {
nd = new Node(Node::ANIMMESH);
}
- else if (!ASSIMP_stricmp(sz,"empty")) {
+ else if (!ASSIMP_stricmp(sz,"empty")) {
nd = new Node(Node::DUMMY);
}
- else if (!ASSIMP_stricmp(sz,"terrain")) {
+ else if (!ASSIMP_stricmp(sz,"terrain")) {
nd = new Node(Node::TERRAIN);
}
- else if (!ASSIMP_stricmp(sz,"billBoard")) {
+ else if (!ASSIMP_stricmp(sz,"billBoard")) {
// We don't support billboards, so ignore them
DefaultLogger::get()->error("IRR: Billboards are not supported by Assimp");
nd = new Node(Node::DUMMY);
}
- else {
+ else {
DefaultLogger::get()->warn("IRR: Found unknown node: " + std::string(sz));
/* We skip the contents of nodes we don't know.
@@ -1007,17 +1007,17 @@ void IRRImporter::InternReadFile( const std::string& pFile,
nd->parent = curParent;
curParent->children.push_back(nd);
}
- else if (!ASSIMP_stricmp(reader->getNodeName(),"materials")) {
+ else if (!ASSIMP_stricmp(reader->getNodeName(),"materials")) {
inMaterials = true;
}
- else if (!ASSIMP_stricmp(reader->getNodeName(),"animators")) {
+ else if (!ASSIMP_stricmp(reader->getNodeName(),"animators")) {
inAnimator = true;
}
- else if (!ASSIMP_stricmp(reader->getNodeName(),"attributes")) {
+ else if (!ASSIMP_stricmp(reader->getNodeName(),"attributes")) {
/* We should have a valid node here
* FIX: no ... the scene root node is also contained in an attributes block
*/
- if (!curNode) {
+ if (!curNode) {
#if 0
DefaultLogger::get()->error("IRR: Encountered <attributes> element, but "
"there is no node active");
@@ -1028,7 +1028,7 @@ void IRRImporter::InternReadFile( const std::string& pFile,
Animator* curAnim = NULL;
// Materials can occur for nearly any type of node
- if (inMaterials && curNode->type != Node::DUMMY) {
+ if (inMaterials && curNode->type != Node::DUMMY) {
/* This is a material description - parse it!
*/
curNode->materials.push_back(std::pair< aiMaterial*, unsigned int > () );
@@ -1039,7 +1039,7 @@ void IRRImporter::InternReadFile( const std::string& pFile,
++guessedMatCnt;
continue;
}
- else if (inAnimator) {
+ else if (inAnimator) {
/* This is an animation path - add a new animator
* to the list.
*/
@@ -1052,21 +1052,21 @@ void IRRImporter::InternReadFile( const std::string& pFile,
/* Parse all elements in the attributes block
* and process them.
*/
- while (reader->read()) {
- if (reader->getNodeType() == EXN_ELEMENT) {
- if (!ASSIMP_stricmp(reader->getNodeName(),"vector3d")) {
+ while (reader->read()) {
+ if (reader->getNodeType() == EXN_ELEMENT) {
+ if (!ASSIMP_stricmp(reader->getNodeName(),"vector3d")) {
VectorProperty prop;
ReadVectorProperty(prop);
- if (inAnimator) {
- if (curAnim->type == Animator::ROTATION && prop.name == "Rotation") {
+ if (inAnimator) {
+ if (curAnim->type == Animator::ROTATION && prop.name == "Rotation") {
// We store the rotation euler angles in 'direction'
curAnim->direction = prop.value;
}
- else if (curAnim->type == Animator::FOLLOW_SPLINE) {
+ else if (curAnim->type == Animator::FOLLOW_SPLINE) {
// Check whether the vector follows the PointN naming scheme,
// here N is the ONE-based index of the point
- if (prop.name.length() >= 6 && prop.name.substr(0,5) == "Point") {
+ if (prop.name.length() >= 6 && prop.name.substr(0,5) == "Point") {
// Add a new key to the list
curAnim->splineKeys.push_back(aiVectorKey());
aiVectorKey& key = curAnim->splineKeys.back();
@@ -1076,158 +1076,158 @@ void IRRImporter::InternReadFile( const std::string& pFile,
key.mTime = strtol10(&prop.name[5]);
}
}
- else if (curAnim->type == Animator::FLY_CIRCLE) {
- if (prop.name == "Center") {
+ else if (curAnim->type == Animator::FLY_CIRCLE) {
+ if (prop.name == "Center") {
curAnim->circleCenter = prop.value;
}
- else if (prop.name == "Direction") {
+ else if (prop.name == "Direction") {
curAnim->direction = prop.value;
// From Irrlicht's source - a workaround for backward compatibility with Irrlicht 1.1
- if (curAnim->direction == aiVector3D()) {
+ if (curAnim->direction == aiVector3D()) {
curAnim->direction = aiVector3D(0.f,1.f,0.f);
}
else curAnim->direction.Normalize();
}
}
- else if (curAnim->type == Animator::FLY_STRAIGHT) {
- if (prop.name == "Start") {
+ else if (curAnim->type == Animator::FLY_STRAIGHT) {
+ if (prop.name == "Start") {
// We reuse the field here
curAnim->circleCenter = prop.value;
}
- else if (prop.name == "End") {
+ else if (prop.name == "End") {
// We reuse the field here
curAnim->direction = prop.value;
}
}
}
- else {
- if (prop.name == "Position") {
+ else {
+ if (prop.name == "Position") {
curNode->position = prop.value;
}
- else if (prop.name == "Rotation") {
+ else if (prop.name == "Rotation") {
curNode->rotation = prop.value;
}
- else if (prop.name == "Scale") {
+ else if (prop.name == "Scale") {
curNode->scaling = prop.value;
}
else if (Node::CAMERA == curNode->type)
{
aiCamera* cam = cameras.back();
- if (prop.name == "Target") {
+ if (prop.name == "Target") {
cam->mLookAt = prop.value;
}
- else if (prop.name == "UpVector") {
+ else if (prop.name == "UpVector") {
cam->mUp = prop.value;
}
}
}
}
- else if (!ASSIMP_stricmp(reader->getNodeName(),"bool")) {
+ else if (!ASSIMP_stricmp(reader->getNodeName(),"bool")) {
BoolProperty prop;
ReadBoolProperty(prop);
- if (inAnimator && curAnim->type == Animator::FLY_CIRCLE && prop.name == "Loop") {
+ if (inAnimator && curAnim->type == Animator::FLY_CIRCLE && prop.name == "Loop") {
curAnim->loop = prop.value;
}
}
- else if (!ASSIMP_stricmp(reader->getNodeName(),"float")) {
+ else if (!ASSIMP_stricmp(reader->getNodeName(),"float")) {
FloatProperty prop;
ReadFloatProperty(prop);
- if (inAnimator) {
+ if (inAnimator) {
// The speed property exists for several animators
- if (prop.name == "Speed") {
+ if (prop.name == "Speed") {
curAnim->speed = prop.value;
}
- else if (curAnim->type == Animator::FLY_CIRCLE && prop.name == "Radius") {
+ else if (curAnim->type == Animator::FLY_CIRCLE && prop.name == "Radius") {
curAnim->circleRadius = prop.value;
}
- else if (curAnim->type == Animator::FOLLOW_SPLINE && prop.name == "Tightness") {
+ else if (curAnim->type == Animator::FOLLOW_SPLINE && prop.name == "Tightness") {
curAnim->tightness = prop.value;
}
}
- else {
- if (prop.name == "FramesPerSecond" && Node::ANIMMESH == curNode->type) {
+ else {
+ if (prop.name == "FramesPerSecond" && Node::ANIMMESH == curNode->type) {
curNode->framesPerSecond = prop.value;
}
- else if (Node::CAMERA == curNode->type) {
+ else if (Node::CAMERA == curNode->type) {
/* This is the vertical, not the horizontal FOV.
* We need to compute the right FOV from the
* screen aspect which we don't know yet.
*/
- if (prop.name == "Fovy") {
+ if (prop.name == "Fovy") {
cameras.back()->mHorizontalFOV = prop.value;
}
- else if (prop.name == "Aspect") {
+ else if (prop.name == "Aspect") {
cameras.back()->mAspect = prop.value;
}
- else if (prop.name == "ZNear") {
+ else if (prop.name == "ZNear") {
cameras.back()->mClipPlaneNear = prop.value;
}
- else if (prop.name == "ZFar") {
+ else if (prop.name == "ZFar") {
cameras.back()->mClipPlaneFar = prop.value;
}
}
- else if (Node::LIGHT == curNode->type) {
+ else if (Node::LIGHT == curNode->type) {
/* Additional light information
*/
- if (prop.name == "Attenuation") {
+ if (prop.name == "Attenuation") {
lights.back()->mAttenuationLinear = prop.value;
}
- else if (prop.name == "OuterCone") {
+ else if (prop.name == "OuterCone") {
lights.back()->mAngleOuterCone = AI_DEG_TO_RAD( prop.value );
}
- else if (prop.name == "InnerCone") {
+ else if (prop.name == "InnerCone") {
lights.back()->mAngleInnerCone = AI_DEG_TO_RAD( prop.value );
}
}
// radius of the sphere to be generated -
// or alternatively, size of the cube
else if ((Node::SPHERE == curNode->type && prop.name == "Radius")
- || (Node::CUBE == curNode->type && prop.name == "Size" )) {
+ || (Node::CUBE == curNode->type && prop.name == "Size" )) {
curNode->sphereRadius = prop.value;
}
}
}
- else if (!ASSIMP_stricmp(reader->getNodeName(),"int")) {
+ else if (!ASSIMP_stricmp(reader->getNodeName(),"int")) {
IntProperty prop;
ReadIntProperty(prop);
- if (inAnimator) {
- if (curAnim->type == Animator::FLY_STRAIGHT && prop.name == "TimeForWay") {
+ if (inAnimator) {
+ if (curAnim->type == Animator::FLY_STRAIGHT && prop.name == "TimeForWay") {
curAnim->timeForWay = prop.value;
}
}
- else {
+ else {
// sphere polgon numbers in each direction
- if (Node::SPHERE == curNode->type) {
+ if (Node::SPHERE == curNode->type) {
- if (prop.name == "PolyCountX") {
+ if (prop.name == "PolyCountX") {
curNode->spherePolyCountX = prop.value;
}
- else if (prop.name == "PolyCountY") {
+ else if (prop.name == "PolyCountY") {
curNode->spherePolyCountY = prop.value;
}
}
}
}
- else if (!ASSIMP_stricmp(reader->getNodeName(),"string") ||!ASSIMP_stricmp(reader->getNodeName(),"enum")) {
+ else if (!ASSIMP_stricmp(reader->getNodeName(),"string") ||!ASSIMP_stricmp(reader->getNodeName(),"enum")) {
StringProperty prop;
ReadStringProperty(prop);
- if (prop.value.length()) {
- if (prop.name == "Name") {
+ if (prop.value.length()) {
+ if (prop.name == "Name") {
curNode->name = prop.value;
/* If we're either a camera or a light source
* we need to update the name in the aiLight/
* aiCamera structure, too.
*/
- if (Node::CAMERA == curNode->type) {
+ if (Node::CAMERA == curNode->type) {
cameras.back()->mName.Set(prop.value);
}
- else if (Node::LIGHT == curNode->type) {
+ else if (Node::LIGHT == curNode->type) {
lights.back()->mName.Set(prop.value);
}
}
@@ -1262,7 +1262,7 @@ void IRRImporter::InternReadFile( const std::string& pFile,
/* If the mesh is a static one remove all animations from the impor data
*/
- if (Node::ANIMMESH != curNode->type) {
+ if (Node::ANIMMESH != curNode->type) {
pp |= aiProcess_RemoveComponent;
SetGenericProperty<int>(map.ints,AI_CONFIG_PP_RVC_FLAGS,
aiComponent_ANIMATIONS | aiComponent_BONEWEIGHTS);
@@ -1276,7 +1276,7 @@ void IRRImporter::InternReadFile( const std::string& pFile,
*/
const std::string extension = GetExtension(prop.value);
- if ("irr" == extension) {
+ if ("irr" == extension) {
DefaultLogger::get()->error("IRR: Can't load another IRR file recursively");
}
else
@@ -1288,19 +1288,19 @@ void IRRImporter::InternReadFile( const std::string& pFile,
else if (inAnimator && prop.name == "Type")
{
// type of the animator
- if (prop.value == "rotation") {
+ if (prop.value == "rotation") {
curAnim->type = Animator::ROTATION;
}
- else if (prop.value == "flyCircle") {
+ else if (prop.value == "flyCircle") {
curAnim->type = Animator::FLY_CIRCLE;
}
- else if (prop.value == "flyStraight") {
+ else if (prop.value == "flyStraight") {
curAnim->type = Animator::FLY_CIRCLE;
}
- else if (prop.value == "followSpline") {
+ else if (prop.value == "followSpline") {
curAnim->type = Animator::FOLLOW_SPLINE;
}
- else {
+ else {
DefaultLogger::get()->warn("IRR: Ignoring unknown animator: "
+ prop.value);
@@ -1310,7 +1310,7 @@ void IRRImporter::InternReadFile( const std::string& pFile,
}
}
}
- else if (reader->getNodeType() == EXN_ELEMENT_END && !ASSIMP_stricmp(reader->getNodeName(),"attributes")) {
+ else if (reader->getNodeType() == EXN_ELEMENT_END && !ASSIMP_stricmp(reader->getNodeName(),"attributes")) {
break;
}
}
@@ -1320,11 +1320,11 @@ void IRRImporter::InternReadFile( const std::string& pFile,
case EXN_ELEMENT_END:
// If we reached the end of a node, we need to continue processing its parent
- if (!ASSIMP_stricmp(reader->getNodeName(),"node")) {
- if (!curNode) {
+ if (!ASSIMP_stricmp(reader->getNodeName(),"node")) {
+ if (!curNode) {
// currently is no node set. We need to go
// back in the node hierarchy
- if (!curParent) {
+ if (!curParent) {
curParent = root;
DefaultLogger::get()->error("IRR: Too many closing <node> elements");
}
@@ -1333,10 +1333,10 @@ void IRRImporter::InternReadFile( const std::string& pFile,
else curNode = NULL;
}
// clear all flags
- else if (!ASSIMP_stricmp(reader->getNodeName(),"materials")) {
+ else if (!ASSIMP_stricmp(reader->getNodeName(),"materials")) {
inMaterials = false;
}
- else if (!ASSIMP_stricmp(reader->getNodeName(),"animators")) {
+ else if (!ASSIMP_stricmp(reader->getNodeName(),"animators")) {
inAnimator = false;
}
break;
@@ -1349,11 +1349,11 @@ void IRRImporter::InternReadFile( const std::string& pFile,
/* Now iterate through all cameras and compute their final (horizontal) FOV
*/
- for (std::vector<aiCamera*>::iterator it = cameras.begin(), end = cameras.end();it != end; ++it) {
+ for (std::vector<aiCamera*>::iterator it = cameras.begin(), end = cameras.end();it != end; ++it) {
aiCamera* cam = *it;
// screen aspect could be missing
- if (cam->mAspect) {
+ if (cam->mAspect) {
cam->mHorizontalFOV *= cam->mAspect;
}
else DefaultLogger::get()->warn("IRR: Camera aspect is not given, can't compute horizontal FOV");
@@ -1369,7 +1369,7 @@ void IRRImporter::InternReadFile( const std::string& pFile,
/* Copy the cameras to the output array
*/
- if (!cameras.empty()) {
+ if (!cameras.empty()) {
tempScene->mNumCameras = (unsigned int)cameras.size();
tempScene->mCameras = new aiCamera*[tempScene->mNumCameras];
::memcpy(tempScene->mCameras,&cameras[0],sizeof(void*)*tempScene->mNumCameras);
@@ -1377,17 +1377,17 @@ void IRRImporter::InternReadFile( const std::string& pFile,
/* Copy the light sources to the output array
*/
- if (!lights.empty()) {
+ if (!lights.empty()) {
tempScene->mNumLights = (unsigned int)lights.size();
tempScene->mLights = new aiLight*[tempScene->mNumLights];
::memcpy(tempScene->mLights,&lights[0],sizeof(void*)*tempScene->mNumLights);
}
// temporary data
- std::vector< aiNodeAnim*> anims;
- std::vector< aiMaterial*> materials;
- std::vector< AttachmentInfo > attach;
- std::vector<aiMesh*> meshes;
+ std::vector< aiNodeAnim*> anims;
+ std::vector< aiMaterial*> materials;
+ std::vector< AttachmentInfo > attach;
+ std::vector<aiMesh*> meshes;
// try to guess how much storage we'll need
anims.reserve (guessedAnimCnt + (guessedAnimCnt >> 2));
@@ -1421,7 +1421,7 @@ void IRRImporter::InternReadFile( const std::string& pFile,
an->mChannels = new aiNodeAnim*[an->mNumChannels];
::memcpy(an->mChannels, & anims [0], sizeof(void*)*an->mNumChannels);
}
- if (!meshes.empty()) {
+ if (!meshes.empty()) {
// copy all meshes to the temporary scene
tempScene->mNumMeshes = (unsigned int)meshes.size();
tempScene->mMeshes = new aiMesh*[tempScene->mNumMeshes];
@@ -1431,7 +1431,7 @@ void IRRImporter::InternReadFile( const std::string& pFile,
/* Copy all materials to the output array
*/
- if (!materials.empty()) {
+ if (!materials.empty()) {
tempScene->mNumMaterials = (unsigned int)materials.size();
tempScene->mMaterials = new aiMaterial*[tempScene->mNumMaterials];
::memcpy(tempScene->mMaterials,&materials[0],sizeof(void*)*
@@ -1450,7 +1450,7 @@ void IRRImporter::InternReadFile( const std::string& pFile,
* scene flag. This is necessary if we failed to load all
* models from external files
*/
- if (!pScene->mNumMeshes || !pScene->mNumMaterials) {
+ if (!pScene->mNumMeshes || !pScene->mNumMaterials) {
DefaultLogger::get()->warn("IRR: No meshes loaded, setting AI_SCENE_FLAGS_INCOMPLETE");
pScene->mFlags |= AI_SCENE_FLAGS_INCOMPLETE;
}
diff --git a/3rdparty/assimp/code/IRRLoader.h b/3rdparty/assimp/code/IRRLoader.h
index 569d59db8..bfe40ec7f 100644
--- a/3rdparty/assimp/code/IRRLoader.h
+++ b/3rdparty/assimp/code/IRRLoader.h
@@ -49,7 +49,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "IRRShared.h"
#include "SceneCombiner.h"
-namespace Assimp {
+namespace Assimp {
// ---------------------------------------------------------------------------
@@ -106,7 +106,7 @@ private:
// Type of the animator
enum AT
{
- UNKNOWN = 0x0,
+ UNKNOWN = 0x0,
ROTATION = 0x1,
FLY_CIRCLE = 0x2,
FLY_STRAIGHT = 0x3,
@@ -116,13 +116,13 @@ private:
} type;
Animator(AT t = UNKNOWN)
- : type (t)
- , speed (0.001f)
- , direction (0.f,1.f,0.f)
- , circleRadius (1.f)
- , tightness (0.5f)
- , loop (true)
- , timeForWay (100)
+ : type (t)
+ , speed (0.001f)
+ , direction (0.f,1.f,0.f)
+ , circleRadius (1.f)
+ , tightness (0.5f)
+ , loop (true)
+ , timeForWay (100)
{
}
@@ -166,12 +166,12 @@ private:
} type;
Node(ET t)
- : type (t)
- , scaling (1.f,1.f,1.f) // assume uniform scaling by default
- , framesPerSecond (0.f)
- , sphereRadius (1.f)
- , spherePolyCountX (100)
- , spherePolyCountY (100)
+ : type (t)
+ , scaling (1.f,1.f,1.f) // assume uniform scaling by default
+ , framesPerSecond (0.f)
+ , sphereRadius (1.f)
+ , spherePolyCountX (100)
+ , spherePolyCountY (100)
{
// Generate a default name for the node
@@ -233,9 +233,9 @@ private:
float nx, float ny, float nz,
float uvx, float uvy)
- : position (px,py,pz)
- , normal (nx,ny,nz)
- , uv (uvx,uvy,0.f)
+ : position (px,py,pz)
+ , normal (nx,ny,nz)
+ , uv (uvx,uvy,0.f)
{}
aiVector3D position, normal, uv;
@@ -282,7 +282,7 @@ private:
* @param defMatIdx Default material index - 0xffffffff if not there
* @param mesh Mesh to work on
*/
- void CopyMaterial(std::vector<aiMaterial*>& materials,
+ void CopyMaterial(std::vector<aiMaterial*>& materials,
std::vector< std::pair<aiMaterial*, unsigned int> >& inmaterials,
unsigned int& defMatIdx,
aiMesh* mesh);
diff --git a/3rdparty/assimp/code/IRRMeshLoader.cpp b/3rdparty/assimp/code/IRRMeshLoader.cpp
index 69e29a5be..6d67e2251 100644
--- a/3rdparty/assimp/code/IRRMeshLoader.cpp
+++ b/3rdparty/assimp/code/IRRMeshLoader.cpp
@@ -116,8 +116,8 @@ void IRRMeshImporter::InternReadFile( const std::string& pFile,
meshes.reserve (5);
// temporary data - current mesh buffer
- aiMaterial* curMat = NULL;
- aiMesh* curMesh = NULL;
+ aiMaterial* curMat = NULL;
+ aiMesh* curMesh = NULL;
unsigned int curMatFlags;
std::vector<aiVector3D> curVertices,curNormals,curTangents,curBitangents;
@@ -130,18 +130,18 @@ void IRRMeshImporter::InternReadFile( const std::string& pFile,
bool useColors = false;
// Parse the XML file
- while (reader->read()) {
- switch (reader->getNodeType()) {
+ while (reader->read()) {
+ switch (reader->getNodeType()) {
case EXN_ELEMENT:
- if (!ASSIMP_stricmp(reader->getNodeName(),"buffer") && (curMat || curMesh)) {
+ if (!ASSIMP_stricmp(reader->getNodeName(),"buffer") && (curMat || curMesh)) {
// end of previous buffer. A material and a mesh should be there
- if ( !curMat || !curMesh) {
+ if ( !curMat || !curMesh) {
DefaultLogger::get()->error("IRRMESH: A buffer must contain a mesh and a material");
delete curMat;
delete curMesh;
}
- else {
+ else {
materials.push_back(curMat);
meshes.push_back(curMesh);
}
@@ -158,8 +158,8 @@ void IRRMeshImporter::InternReadFile( const std::string& pFile,
}
- if (!ASSIMP_stricmp(reader->getNodeName(),"material")) {
- if (curMat) {
+ if (!ASSIMP_stricmp(reader->getNodeName(),"material")) {
+ if (curMat) {
DefaultLogger::get()->warn("IRRMESH: Only one material description per buffer, please");
delete curMat;curMat = NULL;
}
@@ -169,7 +169,7 @@ void IRRMeshImporter::InternReadFile( const std::string& pFile,
{
int num = reader->getAttributeValueAsInt("vertexCount");
- if (!num) {
+ if (!num) {
// This is possible ... remove the mesh from the list and skip further reading
DefaultLogger::get()->warn("IRRMESH: Found mesh with zero vertices");
@@ -187,11 +187,11 @@ void IRRMeshImporter::InternReadFile( const std::string& pFile,
// Determine the file format
const char* t = reader->getAttributeValueSafe("type");
- if (!ASSIMP_stricmp("2tcoords", t)) {
+ if (!ASSIMP_stricmp("2tcoords", t)) {
curUV2s.reserve (num);
vertexFormat = 1;
- if (curMatFlags & AI_IRRMESH_EXTRA_2ND_TEXTURE) {
+ if (curMatFlags & AI_IRRMESH_EXTRA_2ND_TEXTURE) {
// *********************************************************
// We have a second texture! So use this UV channel
// for it. The 2nd texture can be either a normal
@@ -212,20 +212,20 @@ void IRRMeshImporter::InternReadFile( const std::string& pFile,
}
}
}
- else if (!ASSIMP_stricmp("tangents", t)) {
+ else if (!ASSIMP_stricmp("tangents", t)) {
curTangents.reserve (num);
curBitangents.reserve (num);
vertexFormat = 2;
}
- else if (ASSIMP_stricmp("standard", t)) {
+ else if (ASSIMP_stricmp("standard", t)) {
delete curMat;
DefaultLogger::get()->warn("IRRMESH: Unknown vertex format");
}
else vertexFormat = 0;
textMeaning = 1;
}
- else if (!ASSIMP_stricmp(reader->getNodeName(),"indices")) {
- if (curVertices.empty() && curMat) {
+ else if (!ASSIMP_stricmp(reader->getNodeName(),"indices")) {
+ if (curVertices.empty() && curMat) {
delete curMat;
throw DeadlyImportError("IRRMESH: indices must come after vertices");
}
@@ -237,7 +237,7 @@ void IRRMeshImporter::InternReadFile( const std::string& pFile,
// allocate storage for all faces
curMesh->mNumVertices = reader->getAttributeValueAsInt("indexCount");
- if (!curMesh->mNumVertices) {
+ if (!curMesh->mNumVertices) {
// This is possible ... remove the mesh from the list and skip further reading
DefaultLogger::get()->warn("IRRMESH: Found mesh with zero indices");
@@ -251,7 +251,7 @@ void IRRMeshImporter::InternReadFile( const std::string& pFile,
continue;
}
- if (curMesh->mNumVertices % 3) {
+ if (curMesh->mNumVertices % 3) {
DefaultLogger::get()->warn("IRRMESH: Number if indices isn't divisible by 3");
}
@@ -265,22 +265,22 @@ void IRRMeshImporter::InternReadFile( const std::string& pFile,
// allocate storage for all vertices
curMesh->mVertices = new aiVector3D[curMesh->mNumVertices];
- if (curNormals.size() == curVertices.size()) {
+ if (curNormals.size() == curVertices.size()) {
curMesh->mNormals = new aiVector3D[curMesh->mNumVertices];
}
- if (curTangents.size() == curVertices.size()) {
+ if (curTangents.size() == curVertices.size()) {
curMesh->mTangents = new aiVector3D[curMesh->mNumVertices];
}
- if (curBitangents.size() == curVertices.size()) {
+ if (curBitangents.size() == curVertices.size()) {
curMesh->mBitangents = new aiVector3D[curMesh->mNumVertices];
}
- if (curColors.size() == curVertices.size() && useColors) {
+ if (curColors.size() == curVertices.size() && useColors) {
curMesh->mColors[0] = new aiColor4D[curMesh->mNumVertices];
}
- if (curUVs.size() == curVertices.size()) {
+ if (curUVs.size() == curVertices.size()) {
curMesh->mTextureCoords[0] = new aiVector3D[curMesh->mNumVertices];
}
- if (curUV2s.size() == curVertices.size()) {
+ if (curUV2s.size() == curVertices.size()) {
curMesh->mTextureCoords[1] = new aiVector3D[curMesh->mNumVertices];
}
}
@@ -289,11 +289,11 @@ void IRRMeshImporter::InternReadFile( const std::string& pFile,
case EXN_TEXT:
{
const char* sz = reader->getNodeData();
- if (textMeaning == 1) {
+ if (textMeaning == 1) {
textMeaning = 0;
// read vertices
- do {
+ do {
SkipSpacesAndLineEnd(&sz);
aiVector3D temp;aiColor4D c;
@@ -341,7 +341,7 @@ void IRRMeshImporter::InternReadFile( const std::string& pFile,
curUVs.push_back(temp);
// read the (optional) second UV coordinate set
- if (vertexFormat == 1) {
+ if (vertexFormat == 1) {
sz = fast_atof_move(sz,(float&)temp.x);
SkipSpaces(&sz);
@@ -350,7 +350,7 @@ void IRRMeshImporter::InternReadFile( const std::string& pFile,
curUV2s.push_back(temp);
}
// read optional tangent and bitangent vectors
- else if (vertexFormat == 2) {
+ else if (vertexFormat == 2) {
// tangents
sz = fast_atof_move(sz,(float&)temp.x);
SkipSpaces(&sz);
@@ -384,7 +384,7 @@ void IRRMeshImporter::InternReadFile( const std::string& pFile,
while (SkipLine(&sz));
}
- else if (textMeaning == 2) {
+ else if (textMeaning == 2) {
textMeaning = 0;
// read indices
@@ -401,18 +401,18 @@ void IRRMeshImporter::InternReadFile( const std::string& pFile,
unsigned int curIdx = 0;
unsigned int total = 0;
- while (SkipSpacesAndLineEnd(&sz)) {
- if (curFace >= faceEnd) {
+ while (SkipSpacesAndLineEnd(&sz)) {
+ if (curFace >= faceEnd) {
DefaultLogger::get()->error("IRRMESH: Too many indices");
break;
}
- if (!curIdx) {
+ if (!curIdx) {
curFace->mNumIndices = 3;
curFace->mIndices = new unsigned int[3];
}
unsigned int idx = strtol10(sz,&sz);
- if (idx >= curVertices.size()) {
+ if (idx >= curVertices.size()) {
DefaultLogger::get()->error("IRRMESH: Index out of range");
idx = 0;
}
@@ -427,7 +427,7 @@ void IRRMeshImporter::InternReadFile( const std::string& pFile,
if (pcT0)*pcT0++ = curUVs[idx];
if (pcT1)*pcT1++ = curUV2s[idx];
- if (++curIdx == 3) {
+ if (++curIdx == 3) {
++curFace;
curIdx = 0;
}
@@ -437,7 +437,7 @@ void IRRMeshImporter::InternReadFile( const std::string& pFile,
DefaultLogger::get()->error("IRRMESH: Not enough indices");
// Finish processing the mesh - do some small material workarounds
- if (curMatFlags & AI_IRRMESH_MAT_trans_vertex_alpha && !useColors) {
+ if (curMatFlags & AI_IRRMESH_MAT_trans_vertex_alpha && !useColors) {
// Take the opacity value of the current material
// from the common vertex color alpha
MaterialHelper* mat = (MaterialHelper*)curMat;
@@ -455,13 +455,13 @@ void IRRMeshImporter::InternReadFile( const std::string& pFile,
}
// End of the last buffer. A material and a mesh should be there
- if (curMat || curMesh) {
- if ( !curMat || !curMesh) {
+ if (curMat || curMesh) {
+ if ( !curMat || !curMesh) {
DefaultLogger::get()->error("IRRMESH: A buffer must contain a mesh and a material");
delete curMat;
delete curMesh;
}
- else {
+ else {
materials.push_back(curMat);
meshes.push_back(curMesh);
}
@@ -474,7 +474,7 @@ void IRRMeshImporter::InternReadFile( const std::string& pFile,
// now generate the output scene
pScene->mNumMeshes = (unsigned int)meshes.size();
pScene->mMeshes = new aiMesh*[pScene->mNumMeshes];
- for (unsigned int i = 0; i < pScene->mNumMeshes;++i) {
+ for (unsigned int i = 0; i < pScene->mNumMeshes;++i) {
pScene->mMeshes[i] = meshes[i];
// clean this value ...
diff --git a/3rdparty/assimp/code/IRRMeshLoader.h b/3rdparty/assimp/code/IRRMeshLoader.h
index 06dde8334..e5a94dffe 100644
--- a/3rdparty/assimp/code/IRRMeshLoader.h
+++ b/3rdparty/assimp/code/IRRMeshLoader.h
@@ -48,7 +48,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "BaseImporter.h"
#include "IRRShared.h"
-namespace Assimp {
+namespace Assimp {
// ---------------------------------------------------------------------------
/** IrrMesh importer class.
diff --git a/3rdparty/assimp/code/IRRShared.cpp b/3rdparty/assimp/code/IRRShared.cpp
index 89aced7ae..d30107057 100644
--- a/3rdparty/assimp/code/IRRShared.cpp
+++ b/3rdparty/assimp/code/IRRShared.cpp
@@ -367,7 +367,7 @@ aiMaterial* IrrlichtBase::ParseMaterial(unsigned int& matFlags)
else if (prop.name == "Texture2" && cnt == 1)
{
// 2-layer material lightmapped?
- if (matFlags & AI_IRRMESH_MAT_lightmap) {
+ if (matFlags & AI_IRRMESH_MAT_lightmap) {
++cnt;
s.Set(prop.value);
mat->AddProperty(&s,AI_MATKEY_TEXTURE_LIGHTMAP(0));
@@ -376,7 +376,7 @@ aiMaterial* IrrlichtBase::ParseMaterial(unsigned int& matFlags)
matFlags |= AI_IRRMESH_EXTRA_2ND_TEXTURE;
}
// alternatively: normal or parallax mapping
- else if (matFlags & AI_IRRMESH_MAT_normalmap_solid) {
+ else if (matFlags & AI_IRRMESH_MAT_normalmap_solid) {
++cnt;
s.Set(prop.value);
mat->AddProperty(&s,AI_MATKEY_TEXTURE_NORMALS(0));
@@ -385,7 +385,7 @@ aiMaterial* IrrlichtBase::ParseMaterial(unsigned int& matFlags)
matFlags |= AI_IRRMESH_EXTRA_2ND_TEXTURE;
}
// or just as second diffuse texture
- else if (matFlags & AI_IRRMESH_MAT_solid_2layer) {
+ else if (matFlags & AI_IRRMESH_MAT_solid_2layer) {
++cnt;
s.Set(prop.value);
mat->AddProperty(&s,AI_MATKEY_TEXTURE_DIFFUSE(1));
diff --git a/3rdparty/assimp/code/IRRShared.h b/3rdparty/assimp/code/IRRShared.h
index 03e0c78bd..e40813367 100644
--- a/3rdparty/assimp/code/IRRShared.h
+++ b/3rdparty/assimp/code/IRRShared.h
@@ -10,7 +10,7 @@
#include "irrXMLWrapper.h"
#include "BaseImporter.h"
-namespace Assimp {
+namespace Assimp {
/** @brief Matrix to convert from Assimp to IRR and backwards
@@ -19,35 +19,35 @@ extern const aiMatrix4x4 AI_TO_IRR_MATRIX;
// Default: 0 = solid, one texture
-#define AI_IRRMESH_MAT_solid_2layer 0x10000
+#define AI_IRRMESH_MAT_solid_2layer 0x10000
// Transparency flags
-#define AI_IRRMESH_MAT_trans_vertex_alpha 0x1
-#define AI_IRRMESH_MAT_trans_add 0x2
+#define AI_IRRMESH_MAT_trans_vertex_alpha 0x1
+#define AI_IRRMESH_MAT_trans_add 0x2
// Lightmapping flags
-#define AI_IRRMESH_MAT_lightmap 0x2
-#define AI_IRRMESH_MAT_lightmap_m2 (AI_IRRMESH_MAT_lightmap|0x4)
-#define AI_IRRMESH_MAT_lightmap_m4 (AI_IRRMESH_MAT_lightmap|0x8)
-#define AI_IRRMESH_MAT_lightmap_light (AI_IRRMESH_MAT_lightmap|0x10)
-#define AI_IRRMESH_MAT_lightmap_light_m2 (AI_IRRMESH_MAT_lightmap|0x20)
-#define AI_IRRMESH_MAT_lightmap_light_m4 (AI_IRRMESH_MAT_lightmap|0x40)
-#define AI_IRRMESH_MAT_lightmap_add (AI_IRRMESH_MAT_lightmap|0x80)
+#define AI_IRRMESH_MAT_lightmap 0x2
+#define AI_IRRMESH_MAT_lightmap_m2 (AI_IRRMESH_MAT_lightmap|0x4)
+#define AI_IRRMESH_MAT_lightmap_m4 (AI_IRRMESH_MAT_lightmap|0x8)
+#define AI_IRRMESH_MAT_lightmap_light (AI_IRRMESH_MAT_lightmap|0x10)
+#define AI_IRRMESH_MAT_lightmap_light_m2 (AI_IRRMESH_MAT_lightmap|0x20)
+#define AI_IRRMESH_MAT_lightmap_light_m4 (AI_IRRMESH_MAT_lightmap|0x40)
+#define AI_IRRMESH_MAT_lightmap_add (AI_IRRMESH_MAT_lightmap|0x80)
// Standard NormalMap (or Parallax map, they're treated equally)
-#define AI_IRRMESH_MAT_normalmap_solid (0x100)
+#define AI_IRRMESH_MAT_normalmap_solid (0x100)
// Normal map combined with vertex alpha
-#define AI_IRRMESH_MAT_normalmap_tva \
+#define AI_IRRMESH_MAT_normalmap_tva \
(AI_IRRMESH_MAT_normalmap_solid | AI_IRRMESH_MAT_trans_vertex_alpha)
// Normal map combined with additive transparency
-#define AI_IRRMESH_MAT_normalmap_ta \
+#define AI_IRRMESH_MAT_normalmap_ta \
(AI_IRRMESH_MAT_normalmap_solid | AI_IRRMESH_MAT_trans_add)
// Special flag. It indicates a second texture has been found
// Its type depends ... either a normal textue or a normal map
-#define AI_IRRMESH_EXTRA_2ND_TEXTURE 0x100000
+#define AI_IRRMESH_EXTRA_2ND_TEXTURE 0x100000
// ---------------------------------------------------------------------------
/** Base class for the Irr and IrrMesh importers.
@@ -68,12 +68,12 @@ protected:
T value;
};
- typedef Property<uint32_t> HexProperty;
- typedef Property<std::string> StringProperty;
- typedef Property<bool> BoolProperty;
- typedef Property<float> FloatProperty;
- typedef Property<aiVector3D> VectorProperty;
- typedef Property<int> IntProperty;
+ typedef Property<uint32_t> HexProperty;
+ typedef Property<std::string> StringProperty;
+ typedef Property<bool> BoolProperty;
+ typedef Property<float> FloatProperty;
+ typedef Property<aiVector3D> VectorProperty;
+ typedef Property<int> IntProperty;
/** XML reader instance
*/
diff --git a/3rdparty/assimp/code/Importer.cpp b/3rdparty/assimp/code/Importer.cpp
index 722049509..3f158360f 100644
--- a/3rdparty/assimp/code/Importer.cpp
+++ b/3rdparty/assimp/code/Importer.cpp
@@ -80,182 +80,182 @@ using namespace Assimp::Formatter;
// (include_new_importers_here)
// ------------------------------------------------------------------------------------------------
#ifndef ASSIMP_BUILD_NO_X_IMPORTER
-# include "XFileImporter.h"
+# include "XFileImporter.h"
#endif
#ifndef ASSIMP_BUILD_NO_3DS_IMPORTER
-# include "3DSLoader.h"
+# include "3DSLoader.h"
#endif
#ifndef ASSIMP_BUILD_NO_MD3_IMPORTER
-# include "MD3Loader.h"
+# include "MD3Loader.h"
#endif
#ifndef ASSIMP_BUILD_NO_MDL_IMPORTER
-# include "MDLLoader.h"
+# include "MDLLoader.h"
#endif
#ifndef ASSIMP_BUILD_NO_MD2_IMPORTER
-# include "MD2Loader.h"
+# include "MD2Loader.h"
#endif
#ifndef ASSIMP_BUILD_NO_PLY_IMPORTER
-# include "PlyLoader.h"
+# include "PlyLoader.h"
#endif
#ifndef ASSIMP_BUILD_NO_ASE_IMPORTER
-# include "ASELoader.h"
+# include "ASELoader.h"
#endif
#ifndef ASSIMP_BUILD_NO_OBJ_IMPORTER
-# include "ObjFileImporter.h"
+# include "ObjFileImporter.h"
#endif
#ifndef ASSIMP_BUILD_NO_HMP_IMPORTER
-# include "HMPLoader.h"
+# include "HMPLoader.h"
#endif
#ifndef ASSIMP_BUILD_NO_SMD_IMPORTER
-# include "SMDLoader.h"
+# include "SMDLoader.h"
#endif
#ifndef ASSIMP_BUILD_NO_MDC_IMPORTER
-# include "MDCLoader.h"
+# include "MDCLoader.h"
#endif
#ifndef ASSIMP_BUILD_NO_MD5_IMPORTER
-# include "MD5Loader.h"
+# include "MD5Loader.h"
#endif
#ifndef ASSIMP_BUILD_NO_STL_IMPORTER
-# include "STLLoader.h"
+# include "STLLoader.h"
#endif
#ifndef ASSIMP_BUILD_NO_LWO_IMPORTER
-# include "LWOLoader.h"
+# include "LWOLoader.h"
#endif
#ifndef ASSIMP_BUILD_NO_DXF_IMPORTER
-# include "DXFLoader.h"
+# include "DXFLoader.h"
#endif
#ifndef ASSIMP_BUILD_NO_NFF_IMPORTER
-# include "NFFLoader.h"
+# include "NFFLoader.h"
#endif
#ifndef ASSIMP_BUILD_NO_RAW_IMPORTER
-# include "RawLoader.h"
+# include "RawLoader.h"
#endif
#ifndef ASSIMP_BUILD_NO_OFF_IMPORTER
-# include "OFFLoader.h"
+# include "OFFLoader.h"
#endif
#ifndef ASSIMP_BUILD_NO_AC_IMPORTER
-# include "ACLoader.h"
+# include "ACLoader.h"
#endif
#ifndef ASSIMP_BUILD_NO_BVH_IMPORTER
-# include "BVHLoader.h"
+# include "BVHLoader.h"
#endif
#ifndef ASSIMP_BUILD_NO_IRRMESH_IMPORTER
-# include "IRRMeshLoader.h"
+# include "IRRMeshLoader.h"
#endif
#ifndef ASSIMP_BUILD_NO_IRR_IMPORTER
-# include "IRRLoader.h"
+# include "IRRLoader.h"
#endif
#ifndef ASSIMP_BUILD_NO_Q3D_IMPORTER
-# include "Q3DLoader.h"
+# include "Q3DLoader.h"
#endif
#ifndef ASSIMP_BUILD_NO_B3D_IMPORTER
-# include "B3DImporter.h"
+# include "B3DImporter.h"
#endif
#ifndef ASSIMP_BUILD_NO_COLLADA_IMPORTER
-# include "ColladaLoader.h"
+# include "ColladaLoader.h"
#endif
#ifndef ASSIMP_BUILD_NO_TERRAGEN_IMPORTER
-# include "TerragenLoader.h"
+# include "TerragenLoader.h"
#endif
#ifndef ASSIMP_BUILD_NO_CSM_IMPORTER
-# include "CSMLoader.h"
+# include "CSMLoader.h"
#endif
#ifndef ASSIMP_BUILD_NO_3D_IMPORTER
-# include "UnrealLoader.h"
+# include "UnrealLoader.h"
#endif
#ifndef ASSIMP_BUILD_NO_LWS_IMPORTER
-# include "LWSLoader.h"
+# include "LWSLoader.h"
#endif
#ifndef ASSIMP_BUILD_NO_OGRE_IMPORTER
-# include "OgreImporter.h"
+# include "OgreImporter.h"
#endif
#ifndef ASSIMP_BUILD_NO_MS3D_IMPORTER
-# include "MS3DLoader.h"
+# include "MS3DLoader.h"
#endif
#ifndef ASSIMP_BUILD_NO_COB_IMPORTER
-# include "COBLoader.h"
+# include "COBLoader.h"
#endif
#ifndef ASSIMP_BUILD_NO_BLEND_IMPORTER
-# include "BlenderLoader.h"
+# include "BlenderLoader.h"
#endif
//#ifndef ASSIMP_BUILD_NO_SWORDOFMOONLIGHT_IMPORTER
-//# include "SomLoader.h"
+//# include "SomLoader.h"
//#endif
#ifndef ASSIMP_BUILD_NO_Q3BSP_IMPORTER
-# include "Q3BSPFileImporter.h"
+# include "Q3BSPFileImporter.h"
#endif
#ifndef ASSIMP_BUILD_NO_NDO_IMPORTER
-# include "NDOLoader.h"
+# include "NDOLoader.h"
#endif
// ------------------------------------------------------------------------------------------------
// Post processing-Steps
// ------------------------------------------------------------------------------------------------
#ifndef ASSIMP_BUILD_NO_CALCTANGENTS_PROCESS
-# include "CalcTangentsProcess.h"
+# include "CalcTangentsProcess.h"
#endif
#ifndef ASSIMP_BUILD_NO_JOINVERTICES_PROCESS
-# include "JoinVerticesProcess.h"
+# include "JoinVerticesProcess.h"
#endif
#if !(defined ASSIMP_BUILD_NO_MAKELEFTHANDED_PROCESS && defined ASSIMP_BUILD_NO_FLIPUVS_PROCESS && defined ASSIMP_BUILD_NO_FLIPWINDINGORDER_PROCESS)
-# include "ConvertToLHProcess.h"
+# include "ConvertToLHProcess.h"
#endif
#ifndef ASSIMP_BUILD_NO_TRIANGULATE_PROCESS
-# include "TriangulateProcess.h"
+# include "TriangulateProcess.h"
#endif
#ifndef ASSIMP_BUILD_NO_GENFACENORMALS_PROCESS
-# include "GenFaceNormalsProcess.h"
+# include "GenFaceNormalsProcess.h"
#endif
#ifndef ASSIMP_BUILD_NO_GENVERTEXNORMALS_PROCESS
-# include "GenVertexNormalsProcess.h"
+# include "GenVertexNormalsProcess.h"
#endif
#ifndef ASSIMP_BUILD_NO_REMOVEVC_PROCESS
-# include "RemoveVCProcess.h"
+# include "RemoveVCProcess.h"
#endif
#ifndef ASSIMP_BUILD_NO_SPLITLARGEMESHES_PROCESS
-# include "SplitLargeMeshes.h"
+# include "SplitLargeMeshes.h"
#endif
#ifndef ASSIMP_BUILD_NO_PRETRANSFORMVERTICES_PROCESS
-# include "PretransformVertices.h"
+# include "PretransformVertices.h"
#endif
#ifndef ASSIMP_BUILD_NO_LIMITBONEWEIGHTS_PROCESS
-# include "LimitBoneWeightsProcess.h"
+# include "LimitBoneWeightsProcess.h"
#endif
#ifndef ASSIMP_BUILD_NO_VALIDATEDS_PROCESS
-# include "ValidateDataStructure.h"
+# include "ValidateDataStructure.h"
#endif
#ifndef ASSIMP_BUILD_NO_IMPROVECACHELOCALITY_PROCESS
-# include "ImproveCacheLocality.h"
+# include "ImproveCacheLocality.h"
#endif
#ifndef ASSIMP_BUILD_NO_FIXINFACINGNORMALS_PROCESS
-# include "FixNormalsStep.h"
+# include "FixNormalsStep.h"
#endif
#ifndef ASSIMP_BUILD_NO_REMOVE_REDUNDANTMATERIALS_PROCESS
-# include "RemoveRedundantMaterials.h"
+# include "RemoveRedundantMaterials.h"
#endif
#ifndef ASSIMP_BUILD_NO_FINDINVALIDDATA_PROCESS
-# include "FindInvalidDataProcess.h"
+# include "FindInvalidDataProcess.h"
#endif
#ifndef ASSIMP_BUILD_NO_FINDDEGENERATES_PROCESS
-# include "FindDegenerates.h"
+# include "FindDegenerates.h"
#endif
#ifndef ASSIMP_BUILD_NO_SORTBYPTYPE_PROCESS
-# include "SortByPTypeProcess.h"
+# include "SortByPTypeProcess.h"
#endif
#ifndef ASSIMP_BUILD_NO_GENUVCOORDS_PROCESS
-# include "ComputeUVMappingProcess.h"
+# include "ComputeUVMappingProcess.h"
#endif
#ifndef ASSIMP_BUILD_NO_TRANSFORMTEXCOORDS_PROCESS
-# include "TextureTransform.h"
+# include "TextureTransform.h"
#endif
#ifndef ASSIMP_BUILD_NO_FINDINSTANCES_PROCESS
-# include "FindInstancesProcess.h"
+# include "FindInstancesProcess.h"
#endif
#ifndef ASSIMP_BUILD_NO_OPTIMIZEMESHES_PROCESS
-# include "OptimizeMeshes.h"
+# include "OptimizeMeshes.h"
#endif
#ifndef ASSIMP_BUILD_NO_OPTIMIZEGRAPH_PROCESS
-# include "OptimizeGraph.h"
+# include "OptimizeGraph.h"
#endif
using namespace Assimp;
@@ -267,37 +267,37 @@ using namespace Assimp::Intern;
// utilize our DLL heap.
// See http://www.gotw.ca/publications/mill15.htm
// ------------------------------------------------------------------------------------------------
-void* AllocateFromAssimpHeap::operator new ( size_t num_bytes) {
+void* AllocateFromAssimpHeap::operator new ( size_t num_bytes) {
return ::operator new(num_bytes);
}
-void* AllocateFromAssimpHeap::operator new ( size_t num_bytes, const std::nothrow_t& ) throw() {
- try {
+void* AllocateFromAssimpHeap::operator new ( size_t num_bytes, const std::nothrow_t& ) throw() {
+ try {
return AllocateFromAssimpHeap::operator new( num_bytes );
}
- catch( ... ) {
+ catch( ... ) {
return NULL;
}
}
-void AllocateFromAssimpHeap::operator delete ( void* data) {
+void AllocateFromAssimpHeap::operator delete ( void* data) {
return ::operator delete(data);
}
-void* AllocateFromAssimpHeap::operator new[] ( size_t num_bytes) {
+void* AllocateFromAssimpHeap::operator new[] ( size_t num_bytes) {
return ::operator new[](num_bytes);
}
void* AllocateFromAssimpHeap::operator new[] ( size_t num_bytes, const std::nothrow_t& ) throw() {
- try {
+ try {
return AllocateFromAssimpHeap::operator new[]( num_bytes );
}
- catch( ... ) {
+ catch( ... ) {
return NULL;
}
}
-void AllocateFromAssimpHeap::operator delete[] ( void* data) {
+void AllocateFromAssimpHeap::operator delete[] ( void* data) {
return ::operator delete[](data);
}
@@ -424,7 +424,7 @@ Importer::Importer()
pimpl->mImporter.push_back( new BlenderImporter());
#endif
//#if (!defined ASSIMP_BUILD_NO_SWORDOFMOONLIGHT_IMPORTER)
-// pimpl->mImporter.push_back( new SomImporter());
+// pimpl->mImporter.push_back( new SomImporter());
//#endif
#if (!defined ASSIMP_BUILD_NO_Q3BSP_IMPORTER)
pimpl->mImporter.push_back( new Q3BSPFileImporter() );
@@ -527,7 +527,7 @@ Importer::Importer()
pimpl->mPPShared = new SharedPostProcessInfo();
for (std::vector<BaseProcess*>::iterator it = pimpl->mPostProcessingSteps.begin();
it != pimpl->mPostProcessingSteps.end();
- ++it) {
+ ++it) {
(*it)->SetSharedData(pimpl->mPPShared);
}
@@ -630,7 +630,7 @@ aiReturn Importer::UnregisterLoader(BaseImporter* pImp)
std::vector<BaseImporter*>::iterator it = std::find(pimpl->mImporter.begin(),
pimpl->mImporter.end(),pImp);
- if (it != pimpl->mImporter.end()) {
+ if (it != pimpl->mImporter.end()) {
pimpl->mImporter.erase(it);
std::set<std::string> st;
@@ -657,7 +657,7 @@ aiReturn Importer::UnregisterPPStep(BaseProcess* pImp)
std::vector<BaseProcess*>::iterator it = std::find(pimpl->mPostProcessingSteps.begin(),
pimpl->mPostProcessingSteps.end(),pImp);
- if (it != pimpl->mPostProcessingSteps.end()) {
+ if (it != pimpl->mPostProcessingSteps.end()) {
pimpl->mPostProcessingSteps.erase(it);
DefaultLogger::get()->info("Unregistering custom post-processing step");
return AI_SUCCESS;
@@ -743,11 +743,11 @@ bool Importer::IsDefaultProgressHandler() const
// Validate post process step flags
bool _ValidateFlags(unsigned int pFlags)
{
- if (pFlags & aiProcess_GenSmoothNormals && pFlags & aiProcess_GenNormals) {
+ if (pFlags & aiProcess_GenSmoothNormals && pFlags & aiProcess_GenNormals) {
DefaultLogger::get()->error("#aiProcess_GenSmoothNormals and #aiProcess_GenNormals are incompatible");
return false;
}
- if (pFlags & aiProcess_OptimizeGraph && pFlags & aiProcess_PreTransformVertices) {
+ if (pFlags & aiProcess_OptimizeGraph && pFlags & aiProcess_PreTransformVertices) {
DefaultLogger::get()->error("#aiProcess_OptimizeGraph and #aiProcess_PreTransformVertices are incompatible");
return false;
}
@@ -827,7 +827,7 @@ bool Importer::ValidateFlags(unsigned int pFlags) const
if (pFlags & mask) {
bool have = false;
- for ( unsigned int a = 0; a < pimpl->mPostProcessingSteps.size(); a++) {
+ for ( unsigned int a = 0; a < pimpl->mPostProcessingSteps.size(); a++) {
if (pimpl->mPostProcessingSteps[a]-> IsActive(mask) ) {
have = true;
@@ -907,9 +907,9 @@ void WriteLogOpening(const std::string& file)
#elif defined(ASSIMP_BUILD_PPC_32BIT_ARCHITECTURE)
<< " ppc32"
#elif defined(ASSIMP_BUILD_ARM_32BIT_ARCHITECTURE)
- << " arm32"
+ << " arm32"
#else
-# error unknown architecture
+# error unknown architecture
#endif
#if defined(_MSC_VER)
@@ -917,7 +917,7 @@ void WriteLogOpening(const std::string& file)
#elif defined(__GNUC__)
<< " gcc"
#else
-# warning unknown compiler
+# warning unknown compiler
#endif
#ifndef NDEBUG
@@ -951,14 +951,14 @@ const aiScene* Importer::ReadFile( const char* _pFile, unsigned int pFlags)
{
// Check whether this Importer instance has already loaded
// a scene. In this case we need to delete the old one
- if (pimpl->mScene) {
+ if (pimpl->mScene) {
DefaultLogger::get()->debug("(Deleting previous scene)");
FreeScene();
}
// First check if the file is accessable at all
- if ( !pimpl->mIOHandler->Exists( pFile)) {
+ if ( !pimpl->mIOHandler->Exists( pFile)) {
pimpl->mErrorString = "Unable to open file \"" + pFile + "\".";
DefaultLogger::get()->error(pimpl->mErrorString);
@@ -972,7 +972,7 @@ const aiScene* Importer::ReadFile( const char* _pFile, unsigned int pFlags)
// Find an worker class which can handle the file
BaseImporter* imp = NULL;
- for ( unsigned int a = 0; a < pimpl->mImporter.size(); a++) {
+ for ( unsigned int a = 0; a < pimpl->mImporter.size(); a++) {
if ( pimpl->mImporter[a]->CanRead( pFile, pimpl->mIOHandler, false)) {
imp = pimpl->mImporter[a];
@@ -980,12 +980,12 @@ const aiScene* Importer::ReadFile( const char* _pFile, unsigned int pFlags)
}
}
- if (!imp) {
+ if (!imp) {
// not so bad yet ... try format auto detection.
const std::string::size_type s = pFile.find_last_of('.');
if (s != std::string::npos) {
DefaultLogger::get()->info("File extension now known, trying signature-based detection");
- for ( unsigned int a = 0; a < pimpl->mImporter.size(); a++) {
+ for ( unsigned int a = 0; a < pimpl->mImporter.size(); a++) {
if ( pimpl->mImporter[a]->CanRead( pFile, pimpl->mIOHandler, true)) {
imp = pimpl->mImporter[a];
@@ -994,7 +994,7 @@ const aiScene* Importer::ReadFile( const char* _pFile, unsigned int pFlags)
}
}
// Put a proper error message if no suitable importer was found
- if ( !imp) {
+ if ( !imp) {
pimpl->mErrorString = "No suitable reader found for the file format of file \"" + pFile + "\".";
DefaultLogger::get()->error(pimpl->mErrorString);
return NULL;
@@ -1017,7 +1017,7 @@ const aiScene* Importer::ReadFile( const char* _pFile, unsigned int pFlags)
}
// If successful, apply all active post processing steps to the imported data
- if ( pimpl->mScene) {
+ if ( pimpl->mScene) {
#ifndef ASSIMP_BUILD_NO_VALIDATEDS_PROCESS
// The ValidateDS process is an exception. It is executed first, even before ScenePreprocessor is called.
@@ -1062,7 +1062,7 @@ const aiScene* Importer::ReadFile( const char* _pFile, unsigned int pFlags)
#ifdef ASSIMP_CATCH_GLOBAL_EXCEPTIONS
catch (std::exception &e)
{
-#if (defined _MSC_VER) && (defined _CPPRTTI)
+#if (defined _MSC_VER) && (defined _CPPRTTI)
// if we have RTTI get the full name of the exception that occured
pimpl->mErrorString = std::string(typeid( e ).name()) + ": " + e.what();
#else
@@ -1126,16 +1126,16 @@ const aiScene* Importer::ApplyPostProcessing(unsigned int pFlags)
#endif // ! DEBUG
boost::scoped_ptr<Profiler> profiler(GetPropertyInteger(AI_CONFIG_GLOB_MEASURE_TIME,0)?new Profiler():NULL);
- for ( unsigned int a = 0; a < pimpl->mPostProcessingSteps.size(); a++) {
+ for ( unsigned int a = 0; a < pimpl->mPostProcessingSteps.size(); a++) {
BaseProcess* process = pimpl->mPostProcessingSteps[a];
- if ( process->IsActive( pFlags)) {
+ if ( process->IsActive( pFlags)) {
if (profiler) {
profiler->BeginRegion("postprocess");
}
- process->ExecuteOnScene ( this );
+ process->ExecuteOnScene ( this );
pimpl->mProgressHandler->Update();
if (profiler) {
@@ -1152,12 +1152,12 @@ const aiScene* Importer::ApplyPostProcessing(unsigned int pFlags)
#endif // no validation
// If the extra verbose mode is active, execute the ValidateDataStructureStep again - after each step
- if (pimpl->bExtraVerbose) {
+ if (pimpl->bExtraVerbose) {
DefaultLogger::get()->debug("Verbose Import: revalidating data structures");
ValidateDSProcess ds;
ds.ExecuteOnScene (this);
- if ( !pimpl->mScene) {
+ if ( !pimpl->mScene) {
DefaultLogger::get()->error("Verbose Import: failed to revalidate data structures");
break;
}
@@ -1188,7 +1188,7 @@ BaseImporter* Importer::FindLoader (const char* szExtension) const
ASSIMP_BEGIN_EXCEPTION_REGION();
// skip over wildcard and dot characters at string head --
- for (;*szExtension == '*' || *szExtension == '.'; ++szExtension) {};
+ for (;*szExtension == '*' || *szExtension == '.'; ++szExtension);
std::string ext(szExtension);
if (ext.empty()) {
@@ -1197,7 +1197,7 @@ BaseImporter* Importer::FindLoader (const char* szExtension) const
std::transform(ext.begin(),ext.end(), ext.begin(), tolower);
std::set<std::string> str;
- for (std::vector<BaseImporter*>::const_iterator i = pimpl->mImporter.begin();i != pimpl->mImporter.end();++i) {
+ for (std::vector<BaseImporter*>::const_iterator i = pimpl->mImporter.begin();i != pimpl->mImporter.end();++i) {
str.clear();
(*i)->GetExtensionList(str);
@@ -1217,7 +1217,7 @@ void Importer::GetExtensionList(aiString& szOut) const
{
ASSIMP_BEGIN_EXCEPTION_REGION();
std::set<std::string> str;
- for (std::vector<BaseImporter*>::const_iterator i = pimpl->mImporter.begin();i != pimpl->mImporter.end();++i) {
+ for (std::vector<BaseImporter*>::const_iterator i = pimpl->mImporter.begin();i != pimpl->mImporter.end();++i) {
(*i)->GetExtensionList(str);
}
diff --git a/3rdparty/assimp/code/ImproveCacheLocality.cpp b/3rdparty/assimp/code/ImproveCacheLocality.cpp
index a25d88789..268914077 100644
--- a/3rdparty/assimp/code/ImproveCacheLocality.cpp
+++ b/3rdparty/assimp/code/ImproveCacheLocality.cpp
@@ -126,7 +126,7 @@ float ImproveCacheLocalityProcess::ProcessMesh( aiMesh* pMesh, unsigned int mesh
if (!pMesh->HasFaces() || !pMesh->HasPositions())
return 0.f;
- if (pMesh->mPrimitiveTypes != aiPrimitiveType_TRIANGLE) {
+ if (pMesh->mPrimitiveTypes != aiPrimitiveType_TRIANGLE) {
DefaultLogger::get()->error("This algorithm works on triangle meshes only");
return 0.f;
}
@@ -135,7 +135,7 @@ float ImproveCacheLocalityProcess::ProcessMesh( aiMesh* pMesh, unsigned int mesh
const aiFace* const pcEnd = pMesh->mFaces+pMesh->mNumFaces;
// Input ACMR is for logging purposes only
- if (!DefaultLogger::isNullLogger()) {
+ if (!DefaultLogger::isNullLogger()) {
unsigned int* piFIFOStack = new unsigned int[configCacheDepth];
memset(piFIFOStack,0xff,configCacheDepth*sizeof(unsigned int));
@@ -144,19 +144,19 @@ float ImproveCacheLocalityProcess::ProcessMesh( aiMesh* pMesh, unsigned int mesh
// count the number of cache misses
unsigned int iCacheMisses = 0;
- for (const aiFace* pcFace = pMesh->mFaces;pcFace != pcEnd;++pcFace) {
+ for (const aiFace* pcFace = pMesh->mFaces;pcFace != pcEnd;++pcFace) {
for (unsigned int qq = 0; qq < 3;++qq) {
bool bInCache = false;
- for (unsigned int* pp = piFIFOStack;pp < piCurEnd;++pp) {
- if (*pp == pcFace->mIndices[qq]) {
+ for (unsigned int* pp = piFIFOStack;pp < piCurEnd;++pp) {
+ if (*pp == pcFace->mIndices[qq]) {
// the vertex is in cache
bInCache = true;
break;
}
}
- if (!bInCache) {
+ if (!bInCache) {
++iCacheMisses;
if (piCurEnd == piCur) {
piCur = piFIFOStack;
@@ -167,7 +167,7 @@ float ImproveCacheLocalityProcess::ProcessMesh( aiMesh* pMesh, unsigned int mesh
}
delete[] piFIFOStack;
fACMR = (float)iCacheMisses / pMesh->mNumFaces;
- if (3.0 == fACMR) {
+ if (3.0 == fACMR) {
char szBuff[128]; // should be sufficiently large in every case
// the JoinIdenticalVertices process has not been executed on this
@@ -250,22 +250,22 @@ float ImproveCacheLocalityProcess::ProcessMesh( aiMesh* pMesh, unsigned int mesh
int ivdx = 0;
int ics = 1;
int iStampCnt = configCacheDepth+1;
- while (ivdx >= 0) {
+ while (ivdx >= 0) {
unsigned int icnt = piNumTriPtrNoModify[ivdx];
unsigned int* piList = adj.GetAdjacentTriangles(ivdx);
unsigned int* piCurCandidate = piCandidates;
// get all triangles in the neighborhood
- for (unsigned int tri = 0; tri < icnt;++tri) {
+ for (unsigned int tri = 0; tri < icnt;++tri) {
// if they have not yet been emitted, add them to the output IB
const unsigned int fidx = *piList++;
- if (!abEmitted[fidx]) {
+ if (!abEmitted[fidx]) {
// so iterate through all vertices of the current triangle
const aiFace* pcFace = &pMesh->mFaces[ fidx ];
- for (unsigned int* p = pcFace->mIndices, *p2 = pcFace->mIndices+3;p != p2;++p) {
+ for (unsigned int* p = pcFace->mIndices, *p2 = pcFace->mIndices+3;p != p2;++p) {
const unsigned int dp = *p;
// the current vertex won't have any free triangles after this step
@@ -300,11 +300,11 @@ float ImproveCacheLocalityProcess::ProcessMesh( aiMesh* pMesh, unsigned int mesh
// get next fanning vertex
ivdx = -1;
int max_priority = -1;
- for (unsigned int* piCur = piCandidates;piCur != piCurCandidate;++piCur) {
+ for (unsigned int* piCur = piCandidates;piCur != piCurCandidate;++piCur) {
register const unsigned int dp = *piCur;
// must have live triangles
- if (piNumTriPtr[dp] > 0) {
+ if (piNumTriPtr[dp] > 0) {
int priority = 0;
// will the vertex be in cache, even after fanning occurs?
@@ -321,24 +321,24 @@ float ImproveCacheLocalityProcess::ProcessMesh( aiMesh* pMesh, unsigned int mesh
}
}
// did we reach a dead end?
- if (-1 == ivdx) {
+ if (-1 == ivdx) {
// need to get a non-local vertex for which we have a good chance that it is still
// in the cache ...
- while (!sDeadEndVStack.empty()) {
+ while (!sDeadEndVStack.empty()) {
unsigned int iCachedIdx = sDeadEndVStack.top();
sDeadEndVStack.pop();
- if (piNumTriPtr[ iCachedIdx ] > 0) {
+ if (piNumTriPtr[ iCachedIdx ] > 0) {
ivdx = iCachedIdx;
break;
}
}
- if (-1 == ivdx) {
+ if (-1 == ivdx) {
// well, there isn't such a vertex. Simply get the next vertex in input order and
// hope it is not too bad ...
- while (ics < (int)pMesh->mNumVertices) {
+ while (ics < (int)pMesh->mNumVertices) {
++ics;
- if (piNumTriPtr[ics] > 0) {
+ if (piNumTriPtr[ics] > 0) {
ivdx = ics;
break;
}
@@ -363,7 +363,7 @@ float ImproveCacheLocalityProcess::ProcessMesh( aiMesh* pMesh, unsigned int mesh
}
// sort the output index buffer back to the input array
piCSIter = piIBOutput;
- for (aiFace* pcFace = pMesh->mFaces; pcFace != pcEnd;++pcFace) {
+ for (aiFace* pcFace = pMesh->mFaces; pcFace != pcEnd;++pcFace) {
pcFace->mIndices[0] = *piCSIter++;
pcFace->mIndices[1] = *piCSIter++;
pcFace->mIndices[2] = *piCSIter++;
diff --git a/3rdparty/assimp/code/JoinVerticesProcess.cpp b/3rdparty/assimp/code/JoinVerticesProcess.cpp
index 9ecd38920..acc98cb80 100644
--- a/3rdparty/assimp/code/JoinVerticesProcess.cpp
+++ b/3rdparty/assimp/code/JoinVerticesProcess.cpp
@@ -43,7 +43,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* for all imported meshes
*/
-#include <QtCore/qdebug.h>
#include "AssimpPCH.h"
#ifndef ASSIMP_BUILD_NO_JOINVERTICES_PROCESS
@@ -57,7 +56,7 @@ using namespace Assimp;
// Constructor to be privately used by Importer
JoinVerticesProcess::JoinVerticesProcess()
{
- // nothing to do here
+ // nothing to do here
}
// ------------------------------------------------------------------------------------------------
@@ -82,14 +81,15 @@ void JoinVerticesProcess::Execute( aiScene* pScene)
// get the total number of vertices BEFORE the step is executed
int iNumOldVertices = 0;
if (!DefaultLogger::isNullLogger()) {
- for ( unsigned int a = 0; a < pScene->mNumMeshes; a++) {
- iNumOldVertices += pScene->mMeshes[a]->mNumVertices;
+ for ( unsigned int a = 0; a < pScene->mNumMeshes; a++) {
+ iNumOldVertices += pScene->mMeshes[a]->mNumVertices;
}
}
+
// execute the step
int iNumVertices = 0;
for ( unsigned int a = 0; a < pScene->mNumMeshes; a++)
- iNumVertices += ProcessMesh( pScene->mMeshes[a],a);
+ iNumVertices += ProcessMesh( pScene->mMeshes[a],a);
// if logging is active, print detailed statistics
if (!DefaultLogger::isNullLogger())
@@ -125,23 +125,13 @@ int JoinVerticesProcess::ProcessMesh( aiMesh* pMesh, unsigned int meshIndex)
// We'll never have more vertices afterwards.
std::vector<Vertex> uniqueVertices;
-
-#ifndef __GCCE__
-#ifndef __arm__
- try {
- uniqueVertices.reserve( pMesh->mNumVertices);
- } catch (...) {
- qWarning("Unable to reserve vertex space");
- return 0;
- }
-#endif
-#endif
+ uniqueVertices.reserve( pMesh->mNumVertices);
// For each vertex the index of the vertex it was replaced by.
// Since the maximal number of vertices is 2^31-1, the most significand bit can be used to mark
- // whether a new vertex was created for the index (true) or if it was replaced by an existing
- // unique vertex (false). This saves an additional std::vector<bool> and greatly enhances
- // branching performance.
+ // whether a new vertex was created for the index (true) or if it was replaced by an existing
+ // unique vertex (false). This saves an additional std::vector<bool> and greatly enhances
+ // branching performance.
BOOST_STATIC_ASSERT(AI_MAX_VERTICES == 0x7fffffff);
std::vector<unsigned int> replaceIndex( pMesh->mNumVertices, 0xffffffff);
@@ -153,16 +143,16 @@ int JoinVerticesProcess::ProcessMesh( aiMesh* pMesh, unsigned int meshIndex)
SpatialSort _vertexFinder;
typedef std::pair<SpatialSort,float> SpatPair;
- if (shared) {
+ if (shared) {
std::vector<SpatPair >* avf;
shared->GetProperty(AI_SPP_SPATIAL_SORT,avf);
- if (avf) {
+ if (avf) {
SpatPair& blubb = (*avf)[meshIndex];
vertexFinder = &blubb.first;
posEpsilonSqr = blubb.second;
}
}
- if (!vertexFinder) {
+ if (!vertexFinder) {
// bad, need to compute it.
_vertexFinder.Fill(pMesh->mVertices, pMesh->mNumVertices, sizeof( aiVector3D));
vertexFinder = &_vertexFinder;
@@ -179,16 +169,16 @@ int JoinVerticesProcess::ProcessMesh( aiMesh* pMesh, unsigned int meshIndex)
// Run an optimized code path if we don't have multiple UVs or vertex colors.
// This should yield false in more than 99% of all imports ...
const bool complex = (
- pMesh->mTextureCoords[1] ||
- pMesh->mTextureCoords[2] ||
- pMesh->mTextureCoords[3] ||
- pMesh->mColors[0] ||
- pMesh->mColors[1] ||
- pMesh->mColors[2] ||
+ pMesh->mTextureCoords[1] ||
+ pMesh->mTextureCoords[2] ||
+ pMesh->mTextureCoords[3] ||
+ pMesh->mColors[0] ||
+ pMesh->mColors[1] ||
+ pMesh->mColors[2] ||
pMesh->mColors[3] );
// Now check each vertex if it brings something new to the table
- for ( unsigned int a = 0; a < pMesh->mNumVertices; a++) {
+ for ( unsigned int a = 0; a < pMesh->mNumVertices; a++) {
// collect the vertex data
Vertex v(pMesh,a);
@@ -197,7 +187,8 @@ int JoinVerticesProcess::ProcessMesh( aiMesh* pMesh, unsigned int meshIndex)
unsigned int matchIndex = 0xffffffff;
// check all unique vertices close to the position if this vertex is already present among them
- for ( unsigned int b = 0; b < verticesFound.size(); b++) {
+ for ( unsigned int b = 0; b < verticesFound.size(); b++) {
+
const unsigned int vidx = verticesFound[b];
const unsigned int uidx = replaceIndex[ vidx];
if ( uidx & 0x80000000)
@@ -260,7 +251,7 @@ int JoinVerticesProcess::ProcessMesh( aiMesh* pMesh, unsigned int meshIndex)
}
}
- if (!DefaultLogger::isNullLogger() && DefaultLogger::get()->getLogSeverity() == Logger::VERBOSE) {
+ if (!DefaultLogger::isNullLogger() && DefaultLogger::get()->getLogSeverity() == Logger::VERBOSE) {
DefaultLogger::get()->debug((Formatter::format(),
"Mesh ",meshIndex,
" (",
@@ -339,7 +330,7 @@ int JoinVerticesProcess::ProcessMesh( aiMesh* pMesh, unsigned int meshIndex)
for ( unsigned int a = 0; a < pMesh->mNumFaces; a++)
{
aiFace& face = pMesh->mFaces[a];
- for ( unsigned int b = 0; b < face.mNumIndices; b++) {
+ for ( unsigned int b = 0; b < face.mNumIndices; b++) {
face.mIndices[b] = replaceIndex[face.mIndices[b]] & ~0x80000000;
}
}
diff --git a/3rdparty/assimp/code/LWOAnimation.cpp b/3rdparty/assimp/code/LWOAnimation.cpp
index dcf2ac793..128fd6d6d 100644
--- a/3rdparty/assimp/code/LWOAnimation.cpp
+++ b/3rdparty/assimp/code/LWOAnimation.cpp
@@ -334,7 +334,7 @@ void AnimResolver::SubsampleAnimTrack(std::vector<aiVectorKey>& /*out*/,
//ai_assert(out.empty() && sample_delta);
//const double time_start = out.back().mTime;
-// for ()
+// for ()
}
// ------------------------------------------------------------------------------------------------
@@ -481,7 +481,7 @@ void AnimResolver::GetKeys(std::vector<aiVectorKey>& out,
InterpolateTrack(out,fill,(*cur_x).time);
}
}
- else if ((*cur_z).time <= (*cur_y).time && !end_z) {
+ else if ((*cur_z).time <= (*cur_y).time && !end_z) {
InterpolateTrack(out,fill,(*cur_z).time);
}
else if (!end_y) {
@@ -516,7 +516,7 @@ void AnimResolver::GetKeys(std::vector<aiVectorKey>& out,
// ------------------------------------------------------------------------------------------------
// Extract animation channel
-void AnimResolver::ExtractAnimChannel(aiNodeAnim** out, unsigned int /*flags = 0*/)
+void AnimResolver::ExtractAnimChannel(aiNodeAnim** out, unsigned int flags /*= 0*/)
{
*out = NULL;
diff --git a/3rdparty/assimp/code/LWOAnimation.h b/3rdparty/assimp/code/LWOAnimation.h
index 0fa96691d..cb376f238 100644
--- a/3rdparty/assimp/code/LWOAnimation.h
+++ b/3rdparty/assimp/code/LWOAnimation.h
@@ -107,7 +107,7 @@ enum PrePostBehaviour
struct Key
{
Key()
- : inter (IT_LINE)
+ : inter (IT_LINE)
{}
//! Current time
@@ -135,12 +135,12 @@ struct Key
struct Envelope
{
Envelope()
- : type (EnvelopeType_Unknown)
- , pre (PrePostBehaviour_Constant)
- , post (PrePostBehaviour_Constant)
+ : type (EnvelopeType_Unknown)
+ , pre (PrePostBehaviour_Constant)
+ , post (PrePostBehaviour_Constant)
- , old_first (0)
- , old_last (0)
+ , old_first (0)
+ , old_last (0)
{}
//! Index of this envelope
diff --git a/3rdparty/assimp/code/LWOBLoader.cpp b/3rdparty/assimp/code/LWOBLoader.cpp
index 339fcec53..c4704ca72 100644
--- a/3rdparty/assimp/code/LWOBLoader.cpp
+++ b/3rdparty/assimp/code/LWOBLoader.cpp
@@ -108,8 +108,8 @@ void LWOImporter::LoadLWOBFile()
void LWOImporter::LoadLWOBPolygons(unsigned int length)
{
// first find out how many faces and vertices we'll finally need
- LE_NCONST uint16_t* const end = (LE_NCONST uint16_t*)(mFileBuffer+length);
- LE_NCONST uint16_t* cursor = (LE_NCONST uint16_t*)mFileBuffer;
+ LE_NCONST uint16_t* const end = (LE_NCONST uint16_t*)(mFileBuffer+length);
+ LE_NCONST uint16_t* cursor = (LE_NCONST uint16_t*)mFileBuffer;
// perform endianess conversions
#ifndef AI_BUILD_BIG_ENDIAN
@@ -231,7 +231,7 @@ void LWOImporter::LoadLWOBSurface(unsigned int size)
GetS0(surf.mName,size);
bool runnning = true;
- while (runnning) {
+ while (runnning) {
if (mFileBuffer + 6 >= end)
break;
@@ -351,7 +351,7 @@ void LWOImporter::LoadLWOBSurface(unsigned int size)
// texture path
case AI_LWO_TIMG:
{
- if (pTex) {
+ if (pTex) {
GetS0(pTex->mFileName,head->length);
}
else DefaultLogger::get()->warn("LWOB: Unexpected TIMG chunk");
@@ -361,7 +361,7 @@ void LWOImporter::LoadLWOBSurface(unsigned int size)
case AI_LWO_TVAL:
{
AI_LWO_VALIDATE_CHUNK_LENGTH(head->length,TVAL,1);
- if (pTex) {
+ if (pTex) {
pTex->mStrength = (float)GetU1()/ 255.f;
}
else DefaultLogger::get()->warn("LWOB: Unexpected TVAL chunk");
diff --git a/3rdparty/assimp/code/LWOFileData.h b/3rdparty/assimp/code/LWOFileData.h
index 562f2f3dd..fd58c850a 100644
--- a/3rdparty/assimp/code/LWOFileData.h
+++ b/3rdparty/assimp/code/LWOFileData.h
@@ -263,20 +263,20 @@ struct Face : public aiFace
{
//! Default construction
Face()
- : surfaceIndex (0)
- , smoothGroup (0)
- , type (AI_LWO_FACE)
+ : surfaceIndex (0)
+ , smoothGroup (0)
+ , type (AI_LWO_FACE)
{}
//! Construction from given type
Face(uint32_t _type)
- : surfaceIndex (0)
- , smoothGroup (0)
- , type (_type)
+ : surfaceIndex (0)
+ , smoothGroup (0)
+ , type (_type)
{}
//! Copy construction
- Face(const Face& f) : aiFace() {
+ Face(const Face& f) {
*this = f;
}
@@ -291,10 +291,10 @@ struct Face : public aiFace
//! Assignment operator
- Face& operator=(const LWO::Face& f) {
+ Face& operator=(const LWO::Face& f) {
aiFace::operator =(f);
- surfaceIndex = f.surfaceIndex;
- smoothGroup = f.smoothGroup;
+ surfaceIndex = f.surfaceIndex;
+ smoothGroup = f.smoothGroup;
type = f.type;
return *this;
}
@@ -395,56 +395,56 @@ struct Texture
// we write the enum values out here to make debugging easier ...
enum BlendType
{
- Normal = 0,
- Subtractive = 1,
- Difference = 2,
- Multiply = 3,
- Divide = 4,
- Alpha = 5,
- TextureDispl = 6,
- Additive = 7
+ Normal = 0,
+ Subtractive = 1,
+ Difference = 2,
+ Multiply = 3,
+ Divide = 4,
+ Alpha = 5,
+ TextureDispl = 6,
+ Additive = 7
};
enum MappingMode
{
- Planar = 0,
- Cylindrical = 1,
- Spherical = 2,
- Cubic = 3,
- FrontProjection = 4,
- UV = 5
+ Planar = 0,
+ Cylindrical = 1,
+ Spherical = 2,
+ Cubic = 3,
+ FrontProjection = 4,
+ UV = 5
};
enum Axes
{
- AXIS_X = 0,
- AXIS_Y = 1,
- AXIS_Z = 2
+ AXIS_X = 0,
+ AXIS_Y = 1,
+ AXIS_Z = 2
};
enum Wrap
{
- RESET = 0,
- REPEAT = 1,
- MIRROR = 2,
- EDGE = 3
+ RESET = 0,
+ REPEAT = 1,
+ MIRROR = 2,
+ EDGE = 3
};
Texture()
: mClipIdx(0xffffffff)
- , mStrength (1.0f)
- , mUVChannelIndex ("unknown")
- , mRealUVIndex (0xffffffff)
- , enabled (true)
- , blendType (Additive)
- , bCanUse (true)
- , mapMode (UV)
- , majorAxis (AXIS_X)
- , wrapAmountH (1.0f)
- , wrapAmountW (1.0f)
- , wrapModeWidth (REPEAT)
- , wrapModeHeight (REPEAT)
- , ordinal ("\x00")
+ , mStrength (1.0f)
+ , mUVChannelIndex ("unknown")
+ , mRealUVIndex (0xffffffff)
+ , enabled (true)
+ , blendType (Additive)
+ , bCanUse (true)
+ , mapMode (UV)
+ , majorAxis (AXIS_X)
+ , wrapAmountH (1.0f)
+ , wrapAmountW (1.0f)
+ , wrapModeWidth (REPEAT)
+ , wrapModeHeight (REPEAT)
+ , ordinal ("\x00")
{}
//! File name of the texture
@@ -498,8 +498,8 @@ struct Clip
} type;
Clip()
- : type (UNSUPPORTED)
- , idx (0)
+ : type (UNSUPPORTED)
+ , idx (0)
, negate (false)
{}
@@ -525,9 +525,9 @@ struct Clip
struct Shader
{
Shader()
- : ordinal ("\x00")
- , functionName ("unknown")
- , enabled (true)
+ : ordinal ("\x00")
+ , functionName ("unknown")
+ , enabled (true)
{}
std::string ordinal;
@@ -535,8 +535,8 @@ struct Shader
bool enabled;
};
-typedef std::list < Texture > TextureList;
-typedef std::list < Shader > ShaderList;
+typedef std::list < Texture > TextureList;
+typedef std::list < Shader > ShaderList;
// ---------------------------------------------------------------------------
/** \brief Data structure for a LWO file surface (= material)
@@ -544,20 +544,20 @@ typedef std::list < Shader > ShaderList;
struct Surface
{
Surface()
- : mColor (0.78431f,0.78431f,0.78431f)
- , bDoubleSided (false)
- , mDiffuseValue (1.f)
- , mSpecularValue (0.f)
- , mTransparency (0.f)
- , mGlossiness (0.4f)
- , mLuminosity (0.f)
- , mColorHighlights (0.f)
- , mMaximumSmoothAngle (0.f) // 0 == not specified, no smoothing
- , mVCMap ("")
- , mVCMapType (AI_LWO_RGBA)
- , mIOR (1.f) // vakuum
- , mBumpIntensity (1.f)
- , mWireframe (false)
+ : mColor (0.78431f,0.78431f,0.78431f)
+ , bDoubleSided (false)
+ , mDiffuseValue (1.f)
+ , mSpecularValue (0.f)
+ , mTransparency (0.f)
+ , mGlossiness (0.4f)
+ , mLuminosity (0.f)
+ , mColorHighlights (0.f)
+ , mMaximumSmoothAngle (0.f) // 0 == not specified, no smoothing
+ , mVCMap ("")
+ , mVCMapType (AI_LWO_RGBA)
+ , mIOR (1.f) // vakuum
+ , mBumpIntensity (1.f)
+ , mWireframe (false)
, mAdditiveTransparency (0.f)
{}
@@ -615,17 +615,17 @@ struct Surface
// some typedefs ... to make life with loader monsters like this easier
-typedef std::vector < aiVector3D > PointList;
-typedef std::vector < LWO::Face > FaceList;
-typedef std::vector < LWO::Surface > SurfaceList;
-typedef std::vector < std::string > TagList;
-typedef std::vector < unsigned int > TagMappingTable;
-typedef std::vector < unsigned int > ReferrerList;
-typedef std::vector < WeightChannel > WeightChannelList;
-typedef std::vector < VColorChannel > VColorChannelList;
-typedef std::vector < UVChannel > UVChannelList;
-typedef std::vector < Clip > ClipList;
-typedef std::vector < Envelope > EnvelopeList;
+typedef std::vector < aiVector3D > PointList;
+typedef std::vector < LWO::Face > FaceList;
+typedef std::vector < LWO::Surface > SurfaceList;
+typedef std::vector < std::string > TagList;
+typedef std::vector < unsigned int > TagMappingTable;
+typedef std::vector < unsigned int > ReferrerList;
+typedef std::vector < WeightChannel > WeightChannelList;
+typedef std::vector < VColorChannel > VColorChannelList;
+typedef std::vector < UVChannel > UVChannelList;
+typedef std::vector < Clip > ClipList;
+typedef std::vector < Envelope > EnvelopeList;
typedef std::vector < unsigned int > SortedRep;
// ---------------------------------------------------------------------------
@@ -634,11 +634,11 @@ typedef std::vector < unsigned int > SortedRep;
struct Layer
{
Layer()
- : mFaceIDXOfs (0)
- , mPointIDXOfs (0)
- , mParent (0x0)
- , mIndex (0xffff)
- , skip (false)
+ : mFaceIDXOfs (0)
+ , mPointIDXOfs (0)
+ , mParent (0x0)
+ , mIndex (0xffff)
+ , skip (false)
{}
/** Temporary point list from the file */
@@ -689,7 +689,7 @@ struct Layer
bool skip;
};
-typedef std::list<LWO::Layer> LayerList;
+typedef std::list<LWO::Layer> LayerList;
}}
diff --git a/3rdparty/assimp/code/LWOLoader.cpp b/3rdparty/assimp/code/LWOLoader.cpp
index b19ffe698..33c84960e 100644
--- a/3rdparty/assimp/code/LWOLoader.cpp
+++ b/3rdparty/assimp/code/LWOLoader.cpp
@@ -129,15 +129,15 @@ void LWOImporter::InternReadFile( const std::string& pFile,
// Create temporary storage on the stack but store pointers to it in the class
// instance. Therefore everything will be destructed properly if an exception
// is thrown and we needn't take care of that.
- LayerList _mLayers;
- SurfaceList _mSurfaces;
- TagList _mTags;
+ LayerList _mLayers;
+ SurfaceList _mSurfaces;
+ TagList _mTags;
TagMappingTable _mMapping;
- mLayers = &_mLayers;
- mTags = &_mTags;
- mMapping = &_mMapping;
- mSurfaces = &_mSurfaces;
+ mLayers = &_mLayers;
+ mTags = &_mTags;
+ mMapping = &_mMapping;
+ mSurfaces = &_mSurfaces;
// Allocate a default layer (layer indices are 1-based from now)
mLayers->push_back(Layer());
@@ -145,7 +145,7 @@ void LWOImporter::InternReadFile( const std::string& pFile,
mCurLayer->mName = "<LWODefault>";
// old lightwave file format (prior to v6)
- if (AI_LWO_FOURCC_LWOB == fileType) {
+ if (AI_LWO_FOURCC_LWOB == fileType) {
DefaultLogger::get()->info("LWO file format: LWOB (<= LightWave 5.5)");
mIsLWO2 = false;
@@ -153,12 +153,12 @@ void LWOImporter::InternReadFile( const std::string& pFile,
LoadLWOBFile();
}
// New lightwave format
- else if (AI_LWO_FOURCC_LWO2 == fileType) {
+ else if (AI_LWO_FOURCC_LWO2 == fileType) {
mIsLXOB = false;
DefaultLogger::get()->info("LWO file format: LWO2 (>= LightWave 6)");
}
// MODO file format
- else if (AI_LWO_FOURCC_LXOB == fileType) {
+ else if (AI_LWO_FOURCC_LXOB == fileType) {
mIsLXOB = true;
DefaultLogger::get()->info("LWO file format: LXOB (Modo)");
}
@@ -174,7 +174,7 @@ void LWOImporter::InternReadFile( const std::string& pFile,
throw DeadlyImportError(std::string("Unknown LWO sub format: ") + szBuff);
}
- if (AI_LWO_FOURCC_LWOB != fileType) {
+ if (AI_LWO_FOURCC_LWOB != fileType) {
mIsLWO2 = true;
LoadLWO2File();
@@ -184,7 +184,7 @@ void LWOImporter::InternReadFile( const std::string& pFile,
if (0xffffffff != configLayerIndex && configLayerIndex > mLayers->size())
throw DeadlyImportError("LWO2: The requested layer was not found");
- if (configLayerName.length() && !hasNamedLayer) {
+ if (configLayerName.length() && !hasNamedLayer) {
throw DeadlyImportError("LWO2: Unable to find the requested layer: "
+ configLayerName);
}
@@ -201,20 +201,20 @@ void LWOImporter::InternReadFile( const std::string& pFile,
apcMeshes.reserve(mLayers->size()*std::min(((unsigned int)mSurfaces->size()/2u), 1u));
unsigned int iDefaultSurface = 0xffffffff; // index of the default surface
- for (LayerList::iterator lit = mLayers->begin(), lend = mLayers->end();lit != lend;++lit) {
+ for (LayerList::iterator lit = mLayers->begin(), lend = mLayers->end();lit != lend;++lit) {
LWO::Layer& layer = *lit;
if (layer.skip)
continue;
// I don't know whether there could be dummy layers, but it would be possible
const unsigned int meshStart = (unsigned int)apcMeshes.size();
- if (!layer.mFaces.empty() && !layer.mTempPoints.empty()) {
+ if (!layer.mFaces.empty() && !layer.mTempPoints.empty()) {
// now sort all faces by the surfaces assigned to them
std::vector<SortedRep> pSorted(mSurfaces->size()+1);
unsigned int i = 0;
- for (FaceList::iterator it = layer.mFaces.begin(), end = layer.mFaces.end();it != end;++it,++i) {
+ for (FaceList::iterator it = layer.mFaces.begin(), end = layer.mFaces.end();it != end;++it,++i) {
// Check whether we support this face's type
if ((*it).type != AI_LWO_FACE && (*it).type != AI_LWO_PTCH &&
(*it).type != AI_LWO_BONE && (*it).type != AI_LWO_SUBD) {
@@ -227,8 +227,8 @@ void LWOImporter::InternReadFile( const std::string& pFile,
DefaultLogger::get()->warn("LWO: Invalid face surface index");
idx = 0xffffffff;
}
- if (0xffffffff == idx || 0xffffffff == (idx = _mMapping[idx])) {
- if (0xffffffff == iDefaultSurface) {
+ if (0xffffffff == idx || 0xffffffff == (idx = _mMapping[idx])) {
+ if (0xffffffff == iDefaultSurface) {
iDefaultSurface = (unsigned int)mSurfaces->size();
mSurfaces->push_back(LWO::Surface());
LWO::Surface& surf = mSurfaces->back();
@@ -242,7 +242,7 @@ void LWOImporter::InternReadFile( const std::string& pFile,
if (0xffffffff == iDefaultSurface) {
pSorted.erase(pSorted.end()-1);
}
- for (unsigned int p = 0,i = 0;i < mSurfaces->size();++i) {
+ for (unsigned int p = 0,i = 0;i < mSurfaces->size();++i) {
SortedRep& sorted = pSorted[i];
if (sorted.empty())
continue;
@@ -254,7 +254,7 @@ void LWOImporter::InternReadFile( const std::string& pFile,
// count the number of vertices
SortedRep::const_iterator it = sorted.begin(), end = sorted.end();
- for (;it != end;++it) {
+ for (;it != end;++it) {
mesh->mNumVertices += layer.mFaces[*it].mNumIndices;
}
@@ -279,7 +279,7 @@ void LWOImporter::InternReadFile( const std::string& pFile,
// allocate storage for UV and CV channels
aiVector3D* pvUV[AI_MAX_NUMBER_OF_TEXTURECOORDS];
- for (unsigned int mui = 0; mui < AI_MAX_NUMBER_OF_TEXTURECOORDS;++mui ) {
+ for (unsigned int mui = 0; mui < AI_MAX_NUMBER_OF_TEXTURECOORDS;++mui ) {
if (0xffffffff == vUVChannelIndices[mui])
break;
@@ -293,7 +293,7 @@ void LWOImporter::InternReadFile( const std::string& pFile,
nrm = mesh->mNormals = new aiVector3D[mesh->mNumVertices];
aiColor4D* pvVC[AI_MAX_NUMBER_OF_COLOR_SETS];
- for (unsigned int mui = 0; mui < AI_MAX_NUMBER_OF_COLOR_SETS;++mui) {
+ for (unsigned int mui = 0; mui < AI_MAX_NUMBER_OF_COLOR_SETS;++mui) {
if (0xffffffff == vVColorIndices[mui])break;
pvVC[mui] = mesh->mColors[mui] = new aiColor4D[mesh->mNumVertices];
}
@@ -306,17 +306,17 @@ void LWOImporter::InternReadFile( const std::string& pFile,
// now convert all faces
unsigned int vert = 0;
std::vector<unsigned int>::iterator outIt = smoothingGroups.begin();
- for (it = sorted.begin(); it != end;++it,++outIt) {
+ for (it = sorted.begin(); it != end;++it,++outIt) {
const LWO::Face& face = layer.mFaces[*it];
*outIt = face.smoothGroup;
// copy all vertices
- for (unsigned int q = 0; q < face.mNumIndices;++q,++vert) {
+ for (unsigned int q = 0; q < face.mNumIndices;++q,++vert) {
register unsigned int idx = face.mIndices[q];
*pv++ = layer.mTempPoints[idx] /*- layer.mPivot*/;
// process UV coordinates
- for (unsigned int w = 0; w < AI_MAX_NUMBER_OF_TEXTURECOORDS;++w) {
+ for (unsigned int w = 0; w < AI_MAX_NUMBER_OF_TEXTURECOORDS;++w) {
if (0xffffffff == vUVChannelIndices[w])
break;
aiVector3D*& pp = pvUV[w];
@@ -327,14 +327,14 @@ void LWOImporter::InternReadFile( const std::string& pFile,
}
// process normals (MODO extension)
- if (nrm) {
+ if (nrm) {
*nrm = ((aiVector3D*)&layer.mNormals.rawData[0])[idx];
nrm->z *= -1.f;
++nrm;
}
// process vertex colors
- for (unsigned int w = 0; w < AI_MAX_NUMBER_OF_COLOR_SETS;++w) {
+ for (unsigned int w = 0; w < AI_MAX_NUMBER_OF_COLOR_SETS;++w) {
if (0xffffffff == vVColorIndices[w])
break;
*pvVC[w] = ((aiColor4D*)&layer.mVColorChannels[vVColorIndices[w]].rawData[0])[idx];
@@ -363,7 +363,7 @@ void LWOImporter::InternReadFile( const std::string& pFile,
pf++;
}
- if (!mesh->mNormals) {
+ if (!mesh->mNormals) {
// Compute normal vectors for the mesh - we can't use our GenSmoothNormal-
// Step here since it wouldn't handle smoothing groups correctly for LWO.
// So we use a separate implementation.
@@ -396,7 +396,7 @@ void LWOImporter::InternReadFile( const std::string& pFile,
// The RemoveRedundantMaterials step will clean this up later
pScene->mMaterials = new aiMaterial*[pScene->mNumMaterials = (unsigned int)mSurfaces->size()];
- for (unsigned int mat = 0; mat < pScene->mNumMaterials;++mat) {
+ for (unsigned int mat = 0; mat < pScene->mNumMaterials;++mat) {
MaterialHelper* pcMat = new MaterialHelper();
pScene->mMaterials[mat] = pcMat;
ConvertMaterial((*mSurfaces)[mat],pcMat);
@@ -424,13 +424,13 @@ void LWOImporter::ComputeNormals(aiMesh* mesh, const std::vector<unsigned int>&
// ... in some cases that's already enough
if (!surface.mMaximumSmoothAngle)
out = mesh->mNormals;
- else {
+ else {
faceNormals.resize(mesh->mNumVertices);
out = &faceNormals[0];
}
aiFace* begin = mesh->mFaces, *const end = mesh->mFaces+mesh->mNumFaces;
- for (; begin != end; ++begin) {
+ for (; begin != end; ++begin) {
aiFace& face = *begin;
// LWO doc: "the normal is defined as the cross product of the first and last edges"
@@ -464,10 +464,10 @@ void LWOImporter::ComputeNormals(aiMesh* mesh, const std::vector<unsigned int>&
// Generate vertex normals. We have O(logn) for the binary lookup, which we need
// for n elements, thus the EXPECTED complexity is O(nlogn)
- if (surface.mMaximumSmoothAngle < 3.f && !configSpeedFlag) {
+ if (surface.mMaximumSmoothAngle < 3.f && !configSpeedFlag) {
const float fLimit = cos(surface.mMaximumSmoothAngle);
- for ( begin = mesh->mFaces, it = smoothingGroups.begin(); begin != end; ++begin, ++it) {
+ for ( begin = mesh->mFaces, it = smoothingGroups.begin(); begin != end; ++begin, ++it) {
const aiFace& face = *begin;
unsigned int* beginIdx = face.mIndices, *const endIdx = face.mIndices+face.mNumIndices;
for (; beginIdx != endIdx; ++beginIdx)
@@ -477,7 +477,7 @@ void LWOImporter::ComputeNormals(aiMesh* mesh, const std::vector<unsigned int>&
std::vector<unsigned int>::const_iterator a, end = poResult.end();
aiVector3D vNormals;
- for (a = poResult.begin();a != end;++a) {
+ for (a = poResult.begin();a != end;++a) {
const aiVector3D& v = faceNormals[*a];
if (v * faceNormals[idx] < fLimit)
continue;
@@ -488,9 +488,9 @@ void LWOImporter::ComputeNormals(aiMesh* mesh, const std::vector<unsigned int>&
}
}
// faster code path in case there is no smooth angle
- else {
+ else {
std::vector<bool> vertexDone(mesh->mNumVertices,false);
- for ( begin = mesh->mFaces, it = smoothingGroups.begin(); begin != end; ++begin, ++it) {
+ for ( begin = mesh->mFaces, it = smoothingGroups.begin(); begin != end; ++begin, ++it) {
const aiFace& face = *begin;
unsigned int* beginIdx = face.mIndices, *const endIdx = face.mIndices+face.mNumIndices;
for (; beginIdx != endIdx; ++beginIdx)
@@ -502,12 +502,12 @@ void LWOImporter::ComputeNormals(aiMesh* mesh, const std::vector<unsigned int>&
std::vector<unsigned int>::const_iterator a, end = poResult.end();
aiVector3D vNormals;
- for (a = poResult.begin();a != end;++a) {
+ for (a = poResult.begin();a != end;++a) {
const aiVector3D& v = faceNormals[*a];
vNormals += v;
}
vNormals.Normalize();
- for (a = poResult.begin();a != end;++a) {
+ for (a = poResult.begin();a != end;++a) {
mesh->mNormals[*a] = vNormals;
vertexDone[*a] = true;
}
@@ -519,7 +519,7 @@ void LWOImporter::ComputeNormals(aiMesh* mesh, const std::vector<unsigned int>&
// ------------------------------------------------------------------------------------------------
void LWOImporter::AddChildren(aiNode* node, uint16_t parent, std::vector<aiNode*>& apcNodes)
{
- for (std::vector<aiNode*>::iterator it = apcNodes.begin(); it != apcNodes.end(); ++it) {
+ for (std::vector<aiNode*>::iterator it = apcNodes.begin(); it != apcNodes.end(); ++it) {
if (*it) {
LWO::Layer* layer = (LWO::Layer*)(*it)->mParent;
if (layer->mParent == parent && layer->mIndex != parent)
@@ -527,14 +527,14 @@ void LWOImporter::AddChildren(aiNode* node, uint16_t parent, std::vector<aiNode*
}
}
- if (node->mNumChildren) {
+ if (node->mNumChildren) {
unsigned int p = 0;
node->mChildren = new aiNode* [ node->mNumChildren ];
- for (std::vector<aiNode*>::iterator it = apcNodes.begin(); it != apcNodes.end(); ++it) {
+ for (std::vector<aiNode*>::iterator it = apcNodes.begin(); it != apcNodes.end(); ++it) {
if (*it) {
LWO::Layer* layer = (LWO::Layer*)(*it)->mParent;
- if (layer->mParent == parent && layer->mIndex != parent) {
+ if (layer->mParent == parent && layer->mIndex != parent) {
aiNode* nd = node->mChildren[p++] = *it;
nd->mParent = node;
@@ -568,7 +568,7 @@ void LWOImporter::GenerateNodeGraph(std::vector<aiNode*>& apcNodes)
++extra;
}
- if (extra) {
+ if (extra) {
const unsigned int newSize = extra + pScene->mRootNode->mNumChildren;
aiNode** const apcNewNodes = new aiNode*[newSize];
if ((extra = root->mNumChildren))
@@ -593,7 +593,7 @@ void LWOImporter::GenerateNodeGraph(std::vector<aiNode*>& apcNodes)
throw DeadlyImportError("LWO: Unable to build a valid node graph");
// Remove a single root node with no meshes assigned to it ...
- if (1 == pScene->mRootNode->mNumChildren) {
+ if (1 == pScene->mRootNode->mNumChildren) {
aiNode* pc = pScene->mRootNode->mChildren[0];
pc->mParent = pScene->mRootNode->mChildren[0] = NULL;
delete pScene->mRootNode;
@@ -613,13 +613,13 @@ void LWOImporter::ResolveTags()
{
// --- this function is used for both LWO2 and LWOB
mMapping->resize(mTags->size(),0xffffffff);
- for (unsigned int a = 0; a < mTags->size();++a) {
+ for (unsigned int a = 0; a < mTags->size();++a) {
const std::string& c = (*mTags)[a];
- for (unsigned int i = 0; i < mSurfaces->size();++i) {
+ for (unsigned int i = 0; i < mSurfaces->size();++i) {
const std::string& d = (*mSurfaces)[i].mName;
- if (!ASSIMP_stricmp(c,d)) {
+ if (!ASSIMP_stricmp(c,d)) {
(*mMapping)[a] = i;
break;
@@ -631,12 +631,12 @@ void LWOImporter::ResolveTags()
// ------------------------------------------------------------------------------------------------
void LWOImporter::ResolveClips()
{
- for ( unsigned int i = 0; i < mClips.size();++i) {
+ for ( unsigned int i = 0; i < mClips.size();++i) {
Clip& clip = mClips[i];
- if (Clip::REF == clip.type) {
+ if (Clip::REF == clip.type) {
- if (clip.clipRef >= mClips.size()) {
+ if (clip.clipRef >= mClips.size()) {
DefaultLogger::get()->error("LWO2: Clip referrer index is out of range");
clip.clipRef = 0;
}
@@ -647,7 +647,7 @@ void LWOImporter::ResolveClips()
clip.type = Clip::UNSUPPORTED;
}
- else {
+ else {
clip.path = dest.path;
clip.type = dest.type;
}
@@ -659,7 +659,7 @@ void LWOImporter::ResolveClips()
void LWOImporter::AdjustTexturePath(std::string& out)
{
// --- this function is used for both LWO2 and LWOB
- if (!mIsLWO2 && ::strstr(out.c_str(), "(sequence)")) {
+ if (!mIsLWO2 && ::strstr(out.c_str(), "(sequence)")) {
// remove the (sequence) and append 000
DefaultLogger::get()->info("LWOB: Sequence of animated texture found. It will be ignored");
@@ -668,7 +668,7 @@ void LWOImporter::AdjustTexturePath(std::string& out)
// format: drive:path/file - we just need to insert a slash after the drive
std::string::size_type n = out.find_first_of(':');
- if (std::string::npos != n) {
+ if (std::string::npos != n) {
out.insert(n+1,"/");
}
}
@@ -704,12 +704,12 @@ void LWOImporter::LoadLWOPoints(unsigned int length)
register unsigned int regularSize = (unsigned int)mCurLayer->mTempPoints.size() + length / 12;
if (mIsLWO2)
{
- mCurLayer->mTempPoints.reserve ( regularSize + (regularSize>>2u) );
- mCurLayer->mTempPoints.resize ( regularSize );
+ mCurLayer->mTempPoints.reserve ( regularSize + (regularSize>>2u) );
+ mCurLayer->mTempPoints.resize ( regularSize );
// initialize all point referrers with the default values
- mCurLayer->mPointReferrers.reserve ( regularSize + (regularSize>>2u) );
- mCurLayer->mPointReferrers.resize ( regularSize, 0xffffffff );
+ mCurLayer->mPointReferrers.reserve ( regularSize + (regularSize>>2u) );
+ mCurLayer->mPointReferrers.resize ( regularSize, 0xffffffff );
}
else mCurLayer->mTempPoints.resize( regularSize );
@@ -724,7 +724,7 @@ void LWOImporter::LoadLWOPoints(unsigned int length)
// ------------------------------------------------------------------------------------------------
void LWOImporter::LoadLWO2Polygons(unsigned int length)
{
- LE_NCONST uint16_t* const end = (LE_NCONST uint16_t*)(mFileBuffer+length);
+ LE_NCONST uint16_t* const end = (LE_NCONST uint16_t*)(mFileBuffer+length);
const uint32_t type = GetU4();
// Determine the type of the polygons
@@ -758,7 +758,7 @@ void LWOImporter::LoadLWO2Polygons(unsigned int length)
CountVertsAndFacesLWO2(iNumVertices,iNumFaces,cursor,end);
// allocate the output array and copy face indices
- if (iNumFaces) {
+ if (iNumFaces) {
cursor = (uint16_t*)mFileBuffer;
mCurLayer->mFaces.resize(iNumFaces,LWO::Face(type));
@@ -788,7 +788,7 @@ void LWOImporter::CopyFaceIndicesLWO2(FaceList::iterator& it,
uint16_t*& cursor,
const uint16_t* const end)
{
- while (cursor < end) {
+ while (cursor < end) {
LWO::Face& face = *it++;;
if ((face.mNumIndices = (*cursor++) & 0x03FF)) /* byte swapping has already been done */ {
@@ -819,17 +819,17 @@ void LWOImporter::LoadLWO2PolygonTags(unsigned int length)
if (type != AI_LWO_SURF && type != AI_LWO_SMGP)
return;
- while (mFileBuffer < end) {
+ while (mFileBuffer < end) {
unsigned int i = ReadVSizedIntLWO2(mFileBuffer) + mCurLayer->mFaceIDXOfs;
unsigned int j = GetU2();
- if (i >= mCurLayer->mFaces.size()) {
+ if (i >= mCurLayer->mFaces.size()) {
DefaultLogger::get()->warn("LWO2: face index in PTAG is out of range");
continue;
}
- switch (type) {
+ switch (type) {
case AI_LWO_SURF:
mCurLayer->mFaces[i].surfaceIndex = j;
@@ -845,9 +845,9 @@ void LWOImporter::LoadLWO2PolygonTags(unsigned int length)
template <class T>
VMapEntry* FindEntry(std::vector< T >& list,const std::string& name, bool perPoly)
{
- for (typename std::vector< T >::iterator it = list.begin(), end = list.end();it != end; ++it) {
- if ((*it).name == name) {
- if (!perPoly) {
+ for (typename std::vector< T >::iterator it = list.begin(), end = list.end();it != end; ++it) {
+ if ((*it).name == name) {
+ if (!perPoly) {
DefaultLogger::get()->warn("LWO2: Found two VMAP sections with equal names");
}
return &(*it);
@@ -877,7 +877,7 @@ inline void CreateNewEntry(T& chan, unsigned int srcIdx)
template <class T>
inline void CreateNewEntry(std::vector< T >& list, unsigned int srcIdx)
{
- for (typename std::vector< T >::iterator it = list.begin(), end = list.end();it != end;++it) {
+ for (typename std::vector< T >::iterator it = list.begin(), end = list.end();it != end;++it) {
CreateNewEntry( *it, srcIdx );
}
}
@@ -887,7 +887,7 @@ inline void LWOImporter::DoRecursiveVMAPAssignment(VMapEntry* base, unsigned int
unsigned int idx, float* data)
{
ai_assert(NULL != data);
- LWO::ReferrerList& refList = mCurLayer->mPointReferrers;
+ LWO::ReferrerList& refList = mCurLayer->mPointReferrers;
unsigned int i;
base->abAssigned[idx] = true;
@@ -903,7 +903,7 @@ inline void LWOImporter::DoRecursiveVMAPAssignment(VMapEntry* base, unsigned int
// ------------------------------------------------------------------------------------------------
inline void AddToSingleLinkedList(ReferrerList& refList, unsigned int srcIdx, unsigned int destIdx)
{
- if (0xffffffff == refList[srcIdx]) {
+ if (0xffffffff == refList[srcIdx]) {
refList[srcIdx] = destIdx;
return;
}
@@ -929,7 +929,7 @@ void LWOImporter::LoadLWO2VertexMap(unsigned int length, bool perPoly)
switch (type)
{
case AI_LWO_TXUV:
- if (dims != 2) {
+ if (dims != 2) {
DefaultLogger::get()->warn("LWO2: Skipping UV channel \'"
+ name + "\' with !2 components");
return;
@@ -938,7 +938,7 @@ void LWOImporter::LoadLWO2VertexMap(unsigned int length, bool perPoly)
break;
case AI_LWO_WGHT:
case AI_LWO_MNVW:
- if (dims != 1) {
+ if (dims != 1) {
DefaultLogger::get()->warn("LWO2: Skipping Weight Channel \'"
+ name + "\' with !1 components");
return;
@@ -948,7 +948,7 @@ void LWOImporter::LoadLWO2VertexMap(unsigned int length, bool perPoly)
break;
case AI_LWO_RGB:
case AI_LWO_RGBA:
- if (dims != 3 && dims != 4) {
+ if (dims != 3 && dims != 4) {
DefaultLogger::get()->warn("LWO2: Skipping Color Map \'"
+ name + "\' with a dimension > 4 or < 3");
return;
@@ -988,7 +988,7 @@ void LWOImporter::LoadLWO2VertexMap(unsigned int length, bool perPoly)
type = std::min(dims,base->dims);
const unsigned int diff = (dims - type)<<2u;
- LWO::FaceList& list = mCurLayer->mFaces;
+ LWO::FaceList& list = mCurLayer->mFaces;
LWO::PointList& pointList = mCurLayer->mTempPoints;
LWO::ReferrerList& refList = mCurLayer->mPointReferrers;
@@ -997,20 +997,20 @@ void LWOImporter::LoadLWO2VertexMap(unsigned int length, bool perPoly)
const unsigned int numPoints = (unsigned int)pointList.size();
const unsigned int numFaces = (unsigned int)list.size();
- while (mFileBuffer < end) {
+ while (mFileBuffer < end) {
unsigned int idx = ReadVSizedIntLWO2(mFileBuffer) + mCurLayer->mPointIDXOfs;
- if (idx >= numPoints) {
+ if (idx >= numPoints) {
DefaultLogger::get()->warn("LWO2: Failure evaluating VMAP/VMAD entry \'" + name + "\', vertex index is out of range");
mFileBuffer += base->dims<<2u;
continue;
}
- if (perPoly) {
+ if (perPoly) {
unsigned int polyIdx = ReadVSizedIntLWO2(mFileBuffer) + mCurLayer->mFaceIDXOfs;
- if (base->abAssigned[idx]) {
+ if (base->abAssigned[idx]) {
// we have already a VMAP entry for this vertex - thus
// we need to duplicate the corresponding polygon.
- if (polyIdx >= numFaces) {
+ if (polyIdx >= numFaces) {
DefaultLogger::get()->warn("LWO2: Failure evaluating VMAD entry \'" + name + "\', polygon index is out of range");
mFileBuffer += base->dims<<2u;
continue;
@@ -1021,7 +1021,7 @@ void LWOImporter::LoadLWO2VertexMap(unsigned int length, bool perPoly)
// generate a new unique vertex for the corresponding index - but only
// if we can find the index in the face
bool had = false;
- for (unsigned int i = 0; i < src.mNumIndices;++i) {
+ for (unsigned int i = 0; i < src.mNumIndices;++i) {
unsigned int srcIdx = src.mIndices[i], tmp = idx;
do {
@@ -1044,10 +1044,10 @@ void LWOImporter::LoadLWO2VertexMap(unsigned int length, bool perPoly)
AddToSingleLinkedList(refList,srcIdx,src.mIndices[i]);
pointList.push_back(pointList[srcIdx]);
- CreateNewEntry(mCurLayer->mVColorChannels, srcIdx );
- CreateNewEntry(mCurLayer->mUVChannels, srcIdx );
- CreateNewEntry(mCurLayer->mWeightChannels, srcIdx );
- CreateNewEntry(mCurLayer->mSWeightChannels, srcIdx );
+ CreateNewEntry(mCurLayer->mVColorChannels, srcIdx );
+ CreateNewEntry(mCurLayer->mUVChannels, srcIdx );
+ CreateNewEntry(mCurLayer->mWeightChannels, srcIdx );
+ CreateNewEntry(mCurLayer->mSWeightChannels, srcIdx );
CreateNewEntry(mCurLayer->mNormals, srcIdx );
}
if (!had) {
@@ -1279,7 +1279,7 @@ void LWOImporter::LoadLWO2File()
// Continue loading this layer or ignore it? Check the layer index property
// NOTE: The first layer is the default layer, so the layer index is one-based now
- if (0xffffffff != configLayerIndex && configLayerIndex != mLayers->size()-1) {
+ if (0xffffffff != configLayerIndex && configLayerIndex != mLayers->size()-1) {
skip = true;
}
else skip = false;
@@ -1296,14 +1296,14 @@ void LWOImporter::LoadLWO2File()
GetS0(layer.mName,head->length-16);
// if the name is empty, generate a default name
- if (layer.mName.empty()) {
+ if (layer.mName.empty()) {
char buffer[128]; // should be sufficiently large
::sprintf(buffer,"Layer_%i", iUnnamed++);
layer.mName = buffer;
}
// load this layer or ignore it? Check the layer name property
- if (configLayerName.length() && configLayerName != layer.mName) {
+ if (configLayerName.length() && configLayerName != layer.mName) {
skip = true;
}
else hasNamedLayer = true;
diff --git a/3rdparty/assimp/code/LWOLoader.h b/3rdparty/assimp/code/LWOLoader.h
index 0c186d087..629ec072e 100644
--- a/3rdparty/assimp/code/LWOLoader.h
+++ b/3rdparty/assimp/code/LWOLoader.h
@@ -52,7 +52,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
struct aiTexture;
struct aiNode;
-namespace Assimp {
+namespace Assimp {
using namespace LWO;
// ---------------------------------------------------------------------------
diff --git a/3rdparty/assimp/code/LWOMaterial.cpp b/3rdparty/assimp/code/LWOMaterial.cpp
index 8af631af6..f23a5ecc3 100644
--- a/3rdparty/assimp/code/LWOMaterial.cpp
+++ b/3rdparty/assimp/code/LWOMaterial.cpp
@@ -90,7 +90,7 @@ bool LWOImporter::HandleTextures(MaterialHelper* pcMat, const TextureList& in, a
aiString s;
bool ret = false;
- for (TextureList::const_iterator it = in.begin(), end = in.end();it != end;++it) {
+ for (TextureList::const_iterator it = in.begin(), end = in.end();it != end;++it) {
if (!(*it).enabled || !(*it).bCanUse)
continue;
ret = true;
@@ -120,7 +120,7 @@ bool LWOImporter::HandleTextures(MaterialHelper* pcMat, const TextureList& in, a
break;
case LWO::Texture::UV:
{
- if ( 0xffffffff == (*it).mRealUVIndex ) {
+ if( 0xffffffff == (*it).mRealUVIndex ) {
// We have no UV index for this texture, so we can't display it
continue;
}
@@ -136,10 +136,10 @@ bool LWOImporter::HandleTextures(MaterialHelper* pcMat, const TextureList& in, a
ai_assert(false);
};
- if (mapping != aiTextureMapping_UV) {
+ if (mapping != aiTextureMapping_UV) {
// Setup the main axis
aiVector3D v;
- switch ((*it).majorAxis) {
+ switch ((*it).majorAxis) {
case Texture::AXIS_X:
v = aiVector3D(1.f,0.f,0.f);
break;
@@ -154,7 +154,7 @@ bool LWOImporter::HandleTextures(MaterialHelper* pcMat, const TextureList& in, a
pcMat->AddProperty(&v,1,AI_MATKEY_TEXMAP_AXIS(type,cur));
// Setup UV scalings for cylindric and spherical projections
- if (mapping == aiTextureMapping_CYLINDER || mapping == aiTextureMapping_SPHERE) {
+ if (mapping == aiTextureMapping_CYLINDER || mapping == aiTextureMapping_SPHERE) {
aiUVTransform trafo;
trafo.mScaling.x = (*it).wrapAmountW;
trafo.mScaling.y = (*it).wrapAmountH;
@@ -167,16 +167,16 @@ bool LWOImporter::HandleTextures(MaterialHelper* pcMat, const TextureList& in, a
// The older LWOB format does not use indirect references to clips.
// The file name of a texture is directly specified in the tex chunk.
- if (mIsLWO2) {
+ if (mIsLWO2) {
// find the corresponding clip
ClipList::iterator clip = mClips.begin();
temp = (*it).mClipIdx;
- for (ClipList::iterator end = mClips.end(); clip != end; ++clip) {
+ for (ClipList::iterator end = mClips.end(); clip != end; ++clip) {
if ((*clip).idx == temp)
break;
}
- if (mClips.end() == clip) {
+ if (mClips.end() == clip) {
DefaultLogger::get()->error("LWO2: Clip index is out of bounds");
temp = 0;
@@ -189,7 +189,7 @@ bool LWOImporter::HandleTextures(MaterialHelper* pcMat, const TextureList& in, a
//continue;
}
else {
- if (Clip::UNSUPPORTED == (*clip).type) {
+ if (Clip::UNSUPPORTED == (*clip).type) {
DefaultLogger::get()->error("LWO2: Clip type is not supported");
continue;
}
@@ -283,7 +283,7 @@ void LWOImporter::ConvertMaterial(const LWO::Surface& surf,MaterialHelper* pcMat
if (surf.mSpecularValue && surf.mGlossiness)
{
float fGloss;
- if (mIsLWO2) {
+ if (mIsLWO2) {
fGloss = pow( surf.mGlossiness*10.0f+2.0f, 2.0f);
}
else
@@ -314,14 +314,14 @@ void LWOImporter::ConvertMaterial(const LWO::Surface& surf,MaterialHelper* pcMat
pcMat->AddProperty<aiColor3D>(&clr,1,AI_MATKEY_COLOR_EMISSIVE);
// opacity ... either additive or default-blended, please
- if (0.f != surf.mAdditiveTransparency) {
+ if (0.f != surf.mAdditiveTransparency) {
const int add = aiBlendMode_Additive;
pcMat->AddProperty(&surf.mAdditiveTransparency,1,AI_MATKEY_OPACITY);
pcMat->AddProperty(&add,1,AI_MATKEY_BLEND_FUNC);
}
- else if (10e10f != surf.mTransparency) {
+ else if (10e10f != surf.mTransparency) {
const int def = aiBlendMode_Default;
const float f = 1.0f-surf.mTransparency;
pcMat->AddProperty(&f,1,AI_MATKEY_OPACITY);
@@ -341,16 +341,16 @@ void LWOImporter::ConvertMaterial(const LWO::Surface& surf,MaterialHelper* pcMat
// Now we need to know which shader to use .. iterate through the shader list of
// the surface and search for a name which we know ...
- for (ShaderList::const_iterator it = surf.mShaders.begin(), end = surf.mShaders.end();it != end;++it) {
+ for (ShaderList::const_iterator it = surf.mShaders.begin(), end = surf.mShaders.end();it != end;++it) {
//if (!(*it).enabled)continue;
- if ((*it).functionName == "LW_SuperCelShader" || (*it).functionName == "AH_CelShader") {
+ if ((*it).functionName == "LW_SuperCelShader" || (*it).functionName == "AH_CelShader") {
DefaultLogger::get()->info("LWO2: Mapping LW_SuperCelShader/AH_CelShader to aiShadingMode_Toon");
m = aiShadingMode_Toon;
break;
}
- else if ((*it).functionName == "LW_RealFresnel" || (*it).functionName == "LW_FastFresnel") {
+ else if ((*it).functionName == "LW_RealFresnel" || (*it).functionName == "LW_FastFresnel") {
DefaultLogger::get()->info("LWO2: Mapping LW_RealFresnel/LW_FastFresnel to aiShadingMode_Fresnel");
m = aiShadingMode_Fresnel;
@@ -376,13 +376,13 @@ void LWOImporter::ConvertMaterial(const LWO::Surface& surf,MaterialHelper* pcMat
// ------------------------------------------------------------------------------------------------
char LWOImporter::FindUVChannels(LWO::TextureList& list,
- LWO::Layer& /*layer*/,LWO::UVChannel& uv, unsigned int next)
+ LWO::Layer& layer,LWO::UVChannel& uv, unsigned int next)
{
char ret = 0;
- for (TextureList::iterator it = list.begin(), end = list.end();it != end;++it) {
+ for (TextureList::iterator it = list.begin(), end = list.end();it != end;++it) {
// Ignore textures with non-UV mappings for the moment.
- if (!(*it).enabled || !(*it).bCanUse || (*it).mapMode != LWO::Texture::UV) {
+ if (!(*it).enabled || !(*it).bCanUse || (*it).mapMode != LWO::Texture::UV) {
continue;
}
@@ -413,10 +413,10 @@ void LWOImporter::FindUVChannels(LWO::Surface& surf,
unsigned int next = 0, extra = 0, num_extra = 0;
// Check whether we have an UV entry != 0 for one of the faces in 'sorted'
- for (unsigned int i = 0; i < layer.mUVChannels.size();++i) {
+ for (unsigned int i = 0; i < layer.mUVChannels.size();++i) {
LWO::UVChannel& uv = layer.mUVChannels[i];
- for (LWO::SortedRep::const_iterator it = sorted.begin(); it != sorted.end(); ++it) {
+ for (LWO::SortedRep::const_iterator it = sorted.begin(); it != sorted.end(); ++it) {
LWO::Face& face = layer.mFaces[*it];
@@ -456,7 +456,7 @@ void LWOImporter::FindUVChannels(LWO::Surface& surf,
}
else {
- // Bh ... seems not to be used at all. Push to end if enough space is available.
+ // Bäh ... seems not to be used at all. Push to end if enough space is available.
out[extra++] = i;
++num_extra;
}
@@ -479,7 +479,7 @@ void LWOImporter::FindVCChannels(const LWO::Surface& surf, LWO::SortedRep& sorte
unsigned int next = 0;
// Check whether we have an vc entry != 0 for one of the faces in 'sorted'
- for (unsigned int i = 0; i < layer.mVColorChannels.size();++i) {
+ for (unsigned int i = 0; i < layer.mVColorChannels.size();++i) {
const LWO::VColorChannel& vc = layer.mVColorChannels[i];
if (surf.mVCMap == vc.name) {
@@ -492,7 +492,7 @@ void LWOImporter::FindVCChannels(const LWO::Surface& surf, LWO::SortedRep& sorte
}
else {
- for (LWO::SortedRep::iterator it = sorted.begin(); it != sorted.end(); ++it) {
+ for (LWO::SortedRep::iterator it = sorted.begin(); it != sorted.end(); ++it) {
const LWO::Face& face = layer.mFaces[*it];
for (unsigned int n = 0; n < face.mNumIndices; ++n) {
@@ -563,7 +563,7 @@ void LWOImporter::LoadLWO2ImageMap(unsigned int size, LWO::Texture& tex )
}
// ------------------------------------------------------------------------------------------------
-void LWOImporter::LoadLWO2Procedural(unsigned int /*size*/, LWO::Texture& tex )
+void LWOImporter::LoadLWO2Procedural(unsigned int size, LWO::Texture& tex )
{
// --- not supported at the moment
DefaultLogger::get()->error("LWO2: Found procedural texture, this is not supported");
@@ -571,7 +571,7 @@ void LWOImporter::LoadLWO2Procedural(unsigned int /*size*/, LWO::Texture& tex )
}
// ------------------------------------------------------------------------------------------------
-void LWOImporter::LoadLWO2Gradient(unsigned int /*size*/, LWO::Texture& tex )
+void LWOImporter::LoadLWO2Gradient(unsigned int size, LWO::Texture& tex )
{
// --- not supported at the moment
DefaultLogger::get()->error("LWO2: Found gradient texture, this is not supported");
@@ -666,8 +666,8 @@ void LWOImporter::LoadLWO2TextureBlock(LE_NCONST IFF::SubChunkHeader* head, unsi
}
// now attach the texture to the parent surface - sort by ordinal string
- for (TextureList::iterator it = listRef->begin();it != listRef->end(); ++it) {
- if (::strcmp(tex.ordinal.c_str(),(*it).ordinal.c_str()) < 0) {
+ for (TextureList::iterator it = listRef->begin();it != listRef->end(); ++it) {
+ if (::strcmp(tex.ordinal.c_str(),(*it).ordinal.c_str()) < 0) {
listRef->insert(it,tex);
return;
}
@@ -676,7 +676,7 @@ void LWOImporter::LoadLWO2TextureBlock(LE_NCONST IFF::SubChunkHeader* head, unsi
}
// ------------------------------------------------------------------------------------------------
-void LWOImporter::LoadLWO2ShaderBlock(LE_NCONST IFF::SubChunkHeader* /*head*/, unsigned int size )
+void LWOImporter::LoadLWO2ShaderBlock(LE_NCONST IFF::SubChunkHeader* head, unsigned int size )
{
LE_NCONST uint8_t* const end = mFileBuffer + size;
@@ -717,8 +717,8 @@ void LWOImporter::LoadLWO2ShaderBlock(LE_NCONST IFF::SubChunkHeader* /*head*/, u
}
// now attach the shader to the parent surface - sort by ordinal string
- for (ShaderList::iterator it = surf.mShaders.begin();it != surf.mShaders.end(); ++it) {
- if (::strcmp(shader.ordinal.c_str(),(*it).ordinal.c_str()) < 0) {
+ for (ShaderList::iterator it = surf.mShaders.begin();it != surf.mShaders.end(); ++it) {
+ if (::strcmp(shader.ordinal.c_str(),(*it).ordinal.c_str()) < 0) {
surf.mShaders.insert(it,shader);
return;
}
@@ -739,10 +739,10 @@ void LWOImporter::LoadLWO2Surface(unsigned int size)
// check whether this surface was derived from any other surface
std::string derived;
GetS0(derived,(unsigned int)(end - mFileBuffer));
- if (derived.length()) {
+ if (derived.length()) {
// yes, find this surface
- for (SurfaceList::iterator it = mSurfaces->begin(), end = mSurfaces->end()-1; it != end; ++it) {
- if ((*it).mName == derived) {
+ for (SurfaceList::iterator it = mSurfaces->begin(), end = mSurfaces->end()-1; it != end; ++it) {
+ if ((*it).mName == derived) {
// we have it ...
surf = *it;
derived.clear();break;
@@ -859,9 +859,9 @@ void LWOImporter::LoadLWO2Surface(unsigned int size)
case AI_LWO_VCOL:
{
AI_LWO_VALIDATE_CHUNK_LENGTH(head->length,VCOL,12);
- surf.mDiffuseValue *= GetF4(); // strength
+ surf.mDiffuseValue *= GetF4(); // strength
ReadVSizedIntLWO2(mFileBuffer); // skip envelope
- surf.mVCMapType = GetU4(); // type of the channel
+ surf.mVCMapType = GetU4(); // type of the channel
// name of the channel
GetS0(surf.mVCMap, (unsigned int) (next - mFileBuffer ));
diff --git a/3rdparty/assimp/code/LWSLoader.cpp b/3rdparty/assimp/code/LWSLoader.cpp
index d0034b8cd..6a22b1112 100644
--- a/3rdparty/assimp/code/LWSLoader.cpp
+++ b/3rdparty/assimp/code/LWSLoader.cpp
@@ -241,7 +241,7 @@ void LWSImporter::ReadEnvelope_Old(
std::list< LWS::Element >::const_iterator& it,
const std::list< LWS::Element >::const_iterator& end,
LWS::NodeDesc& nodes,
- unsigned int /*version*/)
+ unsigned int version)
{
unsigned int num,sub_num;
if (++it == end)goto unexpected_end;
@@ -287,7 +287,7 @@ void LWSImporter::SetupNodeName(aiNode* nd, LWS::NodeDesc& src)
// the name depends on the type. We break LWS's strange naming convention
// and return human-readable, but still machine-parsable and unique, strings.
- if (src.type == LWS::NodeDesc::OBJECT) {
+ if (src.type == LWS::NodeDesc::OBJECT) {
if (src.path.length()) {
std::string::size_type s = src.path.find_last_of("\\/");
@@ -484,7 +484,7 @@ void LWSImporter::InternReadFile( const std::string& pFile, aiScene* pScene,
// Construct a Batchimporter to read more files recursively
BatchLoader batch(pIOHandler);
-// batch.SetBasePath(pFile);
+// batch.SetBasePath(pFile);
// Construct an array to receive the flat output graph
std::list<LWS::NodeDesc> nodes;
diff --git a/3rdparty/assimp/code/LWSLoader.h b/3rdparty/assimp/code/LWSLoader.h
index 40eb525a1..e9266dd4b 100644
--- a/3rdparty/assimp/code/LWSLoader.h
+++ b/3rdparty/assimp/code/LWSLoader.h
@@ -47,8 +47,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "LWOFileData.h"
#include "SceneCombiner.h"
-namespace Assimp {
- namespace LWS {
+namespace Assimp {
+ namespace LWS {
// ---------------------------------------------------------------------------
/** Represents an element in a LWS file.
@@ -78,15 +78,15 @@ public:
struct NodeDesc
{
NodeDesc()
- : number (0)
- , parent (0)
- , name ("")
- , lightColor (1.f,1.f,1.f)
- , lightIntensity (1.f)
- , lightType (0)
- , lightFalloffType (0)
- , lightConeAngle (45.f)
- , parent_resolved (NULL)
+ : number (0)
+ , parent (0)
+ , name ("")
+ , lightColor (1.f,1.f,1.f)
+ , lightIntensity (1.f)
+ , lightType (0)
+ , lightFalloffType (0)
+ , lightConeAngle (45.f)
+ , parent_resolved (NULL)
{}
enum {
diff --git a/3rdparty/assimp/code/LimitBoneWeightsProcess.cpp b/3rdparty/assimp/code/LimitBoneWeightsProcess.cpp
index e919567de..ebb18a308 100644
--- a/3rdparty/assimp/code/LimitBoneWeightsProcess.cpp
+++ b/3rdparty/assimp/code/LimitBoneWeightsProcess.cpp
@@ -137,7 +137,7 @@ void LimitBoneWeightsProcess::ProcessMesh( aiMesh* pMesh)
it->mWeight /= sum;
}
- if (bChanged) {
+ if (bChanged) {
// rebuild the vertex weight array for all bones
typedef std::vector< std::vector< aiVertexWeight > > WeightsPerBone;
WeightsPerBone boneWeights( pMesh->mNumBones);
@@ -164,7 +164,7 @@ void LimitBoneWeightsProcess::ProcessMesh( aiMesh* pMesh)
// the number of weights did not change, but the weight values did.
// if ( bw.size() == bone->mNumWeights)
- // continue;
+ // continue;
// FIX (Aramis, 07|21|08)
// It is possible that all weights of a bone have been removed.
@@ -181,12 +181,12 @@ void LimitBoneWeightsProcess::ProcessMesh( aiMesh* pMesh)
::memcpy( bone->mWeights, &bw[0], bw.size() * sizeof( aiVertexWeight));
}
- if (bChanged) {
+ if (bChanged) {
// the number of new bones is smaller than before, so we can reuse the old array
aiBone** ppcCur = pMesh->mBones;aiBone** ppcSrc = ppcCur;
- for (std::vector<bool>::const_iterator iter = abNoNeed.begin();iter != abNoNeed.end() ;++iter) {
- if (*iter) {
+ for (std::vector<bool>::const_iterator iter = abNoNeed.begin();iter != abNoNeed.end() ;++iter) {
+ if (*iter) {
delete *ppcSrc;
--pMesh->mNumBones;
}
diff --git a/3rdparty/assimp/code/LimitBoneWeightsProcess.h b/3rdparty/assimp/code/LimitBoneWeightsProcess.h
index 91007d3e2..99b72ef91 100644
--- a/3rdparty/assimp/code/LimitBoneWeightsProcess.h
+++ b/3rdparty/assimp/code/LimitBoneWeightsProcess.h
@@ -59,7 +59,7 @@ namespace Assimp
// **********************************************************
#if (!defined AI_LMW_MAX_WEIGHTS)
-# define AI_LMW_MAX_WEIGHTS 0x4
+# define AI_LMW_MAX_WEIGHTS 0x4
#endif // !! AI_LMW_MAX_WEIGHTS
// ---------------------------------------------------------------------------
diff --git a/3rdparty/assimp/code/LineSplitter.h b/3rdparty/assimp/code/LineSplitter.h
index 47f69d827..61f5b34b9 100644
--- a/3rdparty/assimp/code/LineSplitter.h
+++ b/3rdparty/assimp/code/LineSplitter.h
@@ -109,7 +109,7 @@ public:
cur.clear(); // I will kill you if you deallocate.
while (stream.GetRemainingSize() && (s = stream.GetI1(),1)) {
if (s == '\n' || s == '\r') {
- while (stream.GetRemainingSize() && ((s = stream.GetI1()) == ' ' || s == '\r' || s == '\n')) {};
+ while (stream.GetRemainingSize() && ((s = stream.GetI1()) == ' ' || s == '\r' || s == '\n'));
if (stream.GetRemainingSize()) {
stream.IncPtr(-1);
}
@@ -153,7 +153,7 @@ public:
}
tokens[i] = s;
- for (;*s && !IsSpace(*s); ++s) {};
+ for (;*s && !IsSpace(*s); ++s);
SkipSpaces(&s);
}
}
diff --git a/3rdparty/assimp/code/MD2FileData.h b/3rdparty/assimp/code/MD2FileData.h
index 661e176ce..864374704 100644
--- a/3rdparty/assimp/code/MD2FileData.h
+++ b/3rdparty/assimp/code/MD2FileData.h
@@ -51,23 +51,23 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "./../include/Compiler/pushpack1.h"
-namespace Assimp {
-namespace MD2 {
+namespace Assimp {
+namespace MD2 {
// to make it easier for us, we test the magic word against both "endianesses"
-#define AI_MD2_MAGIC_NUMBER_BE AI_MAKE_MAGIC("IDP2")
-#define AI_MD2_MAGIC_NUMBER_LE AI_MAKE_MAGIC("2PDI")
+#define AI_MD2_MAGIC_NUMBER_BE AI_MAKE_MAGIC("IDP2")
+#define AI_MD2_MAGIC_NUMBER_LE AI_MAKE_MAGIC("2PDI")
// common limitations
-#define AI_MD2_VERSION 15
-#define AI_MD2_MAXQPATH 64
-#define AI_MD2_MAX_FRAMES 512
-#define AI_MD2_MAX_SKINS 32
-#define AI_MD2_MAX_VERTS 2048
-#define AI_MD2_MAX_TRIANGLES 4096
+#define AI_MD2_VERSION 15
+#define AI_MD2_MAXQPATH 64
+#define AI_MD2_MAX_FRAMES 512
+#define AI_MD2_MAX_SKINS 32
+#define AI_MD2_MAX_VERTS 2048
+#define AI_MD2_MAX_TRIANGLES 4096
// ---------------------------------------------------------------------------
-/** \brief Data structure for the MD2 main header
+/** \brief Data structure for the MD2 main header
*/
struct Header
{
@@ -92,7 +92,7 @@ struct Header
} PACK_STRUCT;
// ---------------------------------------------------------------------------
-/** \brief Data structure for a MD2 OpenGl draw command
+/** \brief Data structure for a MD2 OpenGl draw command
*/
struct GLCommand
{
@@ -101,7 +101,7 @@ struct GLCommand
} PACK_STRUCT;
// ---------------------------------------------------------------------------
-/** \brief Data structure for a MD2 triangle
+/** \brief Data structure for a MD2 triangle
*/
struct Triangle
{
@@ -110,7 +110,7 @@ struct Triangle
} PACK_STRUCT;
// ---------------------------------------------------------------------------
-/** \brief Data structure for a MD2 vertex
+/** \brief Data structure for a MD2 vertex
*/
struct Vertex
{
@@ -119,7 +119,7 @@ struct Vertex
} PACK_STRUCT;
// ---------------------------------------------------------------------------
-/** \brief Data structure for a MD2 frame
+/** \brief Data structure for a MD2 frame
*/
struct Frame
{
@@ -130,7 +130,7 @@ struct Frame
} PACK_STRUCT;
// ---------------------------------------------------------------------------
-/** \brief Data structure for a MD2 texture coordinate
+/** \brief Data structure for a MD2 texture coordinate
*/
struct TexCoord
{
@@ -139,7 +139,7 @@ struct TexCoord
} PACK_STRUCT;
// ---------------------------------------------------------------------------
-/** \brief Data structure for a MD2 skin
+/** \brief Data structure for a MD2 skin
*/
struct Skin
{
diff --git a/3rdparty/assimp/code/MD2Loader.cpp b/3rdparty/assimp/code/MD2Loader.cpp
index cb85c9da3..ad7960f9a 100644
--- a/3rdparty/assimp/code/MD2Loader.cpp
+++ b/3rdparty/assimp/code/MD2Loader.cpp
@@ -54,7 +54,7 @@ using namespace Assimp::MD2;
// helper macro to determine the size of an array
#if (!defined ARRAYSIZE)
-# define ARRAYSIZE(_array) (int(sizeof(_array) / sizeof(_array[0])))
+# define ARRAYSIZE(_array) (int(sizeof(_array) / sizeof(_array[0])))
#endif
// ------------------------------------------------------------------------------------------------
@@ -62,7 +62,7 @@ using namespace Assimp::MD2;
void MD2::LookupNormalIndex(uint8_t iNormalIndex,aiVector3D& vOut)
{
// make sure the normal index has a valid value
- if (iNormalIndex >= ARRAYSIZE(g_avNormals)) {
+ if (iNormalIndex >= ARRAYSIZE(g_avNormals)) {
DefaultLogger::get()->warn("Index overflow in Quake II normal vector list");
iNormalIndex = ARRAYSIZE(g_avNormals) - 1;
}
@@ -146,11 +146,11 @@ void MD2Importer::ValidateHeader( )
if (m_pcHeader->offsetEnd > (uint32_t)fileSize)
throw DeadlyImportError( "Invalid md2 file: File is too small");
- if (m_pcHeader->offsetSkins + m_pcHeader->numSkins * sizeof (MD2::Skin) >= fileSize ||
- m_pcHeader->offsetTexCoords + m_pcHeader->numTexCoords * sizeof (MD2::TexCoord) >= fileSize ||
- m_pcHeader->offsetTriangles + m_pcHeader->numTriangles * sizeof (MD2::Triangle) >= fileSize ||
- m_pcHeader->offsetFrames + m_pcHeader->numFrames * sizeof (MD2::Frame) >= fileSize ||
- m_pcHeader->offsetEnd > fileSize)
+ if (m_pcHeader->offsetSkins + m_pcHeader->numSkins * sizeof (MD2::Skin) >= fileSize ||
+ m_pcHeader->offsetTexCoords + m_pcHeader->numTexCoords * sizeof (MD2::TexCoord) >= fileSize ||
+ m_pcHeader->offsetTriangles + m_pcHeader->numTriangles * sizeof (MD2::Triangle) >= fileSize ||
+ m_pcHeader->offsetFrames + m_pcHeader->numFrames * sizeof (MD2::Frame) >= fileSize ||
+ m_pcHeader->offsetEnd > fileSize)
{
throw DeadlyImportError("Invalid MD2 header: some offsets are outside the file");
}
@@ -310,7 +310,7 @@ void MD2Importer::InternReadFile( const std::string& pFile,
DefaultLogger::get()->warn("Texture file name has zero length. It will be skipped.");
}
}
- else {
+ else {
// apply a default material
aiColor3D clr;
clr.b = clr.g = clr.r = 0.6f;
@@ -337,14 +337,14 @@ void MD2Importer::InternReadFile( const std::string& pFile,
unsigned int iCurrent = 0;
float fDivisorU = 1.0f,fDivisorV = 1.0f;
- if (m_pcHeader->numTexCoords) {
+ if (m_pcHeader->numTexCoords) {
// allocate storage for texture coordinates, too
pcMesh->mTextureCoords[0] = new aiVector3D[pcMesh->mNumVertices];
pcMesh->mNumUVComponents[0] = 2;
// check whether the skin width or height are zero (this would
// cause a division through zero)
- if (!m_pcHeader->skinWidth) {
+ if (!m_pcHeader->skinWidth) {
DefaultLogger::get()->error("MD2: No valid skin width given");
}
else fDivisorU = (float)m_pcHeader->skinWidth;
@@ -354,7 +354,7 @@ void MD2Importer::InternReadFile( const std::string& pFile,
else fDivisorV = (float)m_pcHeader->skinHeight;
}
- for (unsigned int i = 0; i < (unsigned int)m_pcHeader->numTriangles;++i) {
+ for (unsigned int i = 0; i < (unsigned int)m_pcHeader->numTriangles;++i) {
// Allocate the face
pScene->mMeshes[0]->mFaces[i].mIndices = new unsigned int[3];
pScene->mMeshes[0]->mFaces[i].mNumIndices = 3;
@@ -362,11 +362,11 @@ void MD2Importer::InternReadFile( const std::string& pFile,
// copy texture coordinates
// check whether they are different from the previous value at this index.
// In this case, create a full separate set of vertices/normals/texcoords
- for (unsigned int c = 0; c < 3;++c,++iCurrent) {
+ for (unsigned int c = 0; c < 3;++c,++iCurrent) {
// validate vertex indices
register unsigned int iIndex = (unsigned int)pcTriangles[i].vertexIndices[c];
- if (iIndex >= m_pcHeader->numVertices) {
+ if (iIndex >= m_pcHeader->numVertices) {
DefaultLogger::get()->error("MD2: Vertex index is outside the allowed range");
iIndex = m_pcHeader->numVertices-1;
}
@@ -391,10 +391,10 @@ void MD2Importer::InternReadFile( const std::string& pFile,
std::swap((float&)vNormal.z,(float&)vNormal.y);
std::swap((float&)vec.z,(float&)vec.y);
- if (m_pcHeader->numTexCoords) {
+ if (m_pcHeader->numTexCoords) {
// validate texture coordinates
iIndex = pcTriangles[i].textureIndices[c];
- if (iIndex >= m_pcHeader->numTexCoords) {
+ if (iIndex >= m_pcHeader->numTexCoords) {
DefaultLogger::get()->error("MD2: UV index is outside the allowed range");
iIndex = m_pcHeader->numTexCoords-1;
}
diff --git a/3rdparty/assimp/code/MD2Loader.h b/3rdparty/assimp/code/MD2Loader.h
index fe8755800..5a646b8dc 100644
--- a/3rdparty/assimp/code/MD2Loader.h
+++ b/3rdparty/assimp/code/MD2Loader.h
@@ -50,7 +50,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
struct aiNode;
#include "MD2FileData.h"
-namespace Assimp {
+namespace Assimp {
class MaterialHelper;
using namespace MD2;
@@ -73,7 +73,7 @@ public:
// -------------------------------------------------------------------
/** 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;
diff --git a/3rdparty/assimp/code/MD2NormalTable.h b/3rdparty/assimp/code/MD2NormalTable.h
index 9c795c2d6..288fb4a17 100644
--- a/3rdparty/assimp/code/MD2NormalTable.h
+++ b/3rdparty/assimp/code/MD2NormalTable.h
@@ -39,10 +39,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/*
- * @file Slightly modified version of the anorms.h header file
+ * @file Slightly modified version of the anorms.h header file
* released by ID software with the Quake 2 source code.
*
- * Table of normals used by MD2 models
+ * Table of normals used by MD2 models
*/
#ifndef AI_MDL_NORMALTABLE_H_INC
diff --git a/3rdparty/assimp/code/MD3FileData.h b/3rdparty/assimp/code/MD3FileData.h
index 0c092bcb1..edc34d2f7 100644
--- a/3rdparty/assimp/code/MD3FileData.h
+++ b/3rdparty/assimp/code/MD3FileData.h
@@ -56,26 +56,26 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "./../include/Compiler/pushpack1.h"
-namespace Assimp {
-namespace MD3 {
+namespace Assimp {
+namespace MD3 {
// to make it easier for us, we test the magic word against both "endianesses"
-#define AI_MD3_MAGIC_NUMBER_BE AI_MAKE_MAGIC("IDP3")
-#define AI_MD3_MAGIC_NUMBER_LE AI_MAKE_MAGIC("3PDI")
+#define AI_MD3_MAGIC_NUMBER_BE AI_MAKE_MAGIC("IDP3")
+#define AI_MD3_MAGIC_NUMBER_LE AI_MAKE_MAGIC("3PDI")
// common limitations
-#define AI_MD3_VERSION 15
-#define AI_MD3_MAXQPATH 64
-#define AI_MD3_MAXFRAME 16
-#define AI_MD3_MAX_FRAMES 1024
-#define AI_MD3_MAX_TAGS 16
-#define AI_MD3_MAX_SURFACES 32
-#define AI_MD3_MAX_SHADERS 256
-#define AI_MD3_MAX_VERTS 4096
-#define AI_MD3_MAX_TRIANGLES 8192
+#define AI_MD3_VERSION 15
+#define AI_MD3_MAXQPATH 64
+#define AI_MD3_MAXFRAME 16
+#define AI_MD3_MAX_FRAMES 1024
+#define AI_MD3_MAX_TAGS 16
+#define AI_MD3_MAX_SURFACES 32
+#define AI_MD3_MAX_SHADERS 256
+#define AI_MD3_MAX_VERTS 4096
+#define AI_MD3_MAX_TRIANGLES 8192
// master scale factor for all vertices in a MD3 model
-#define AI_MD3_XYZ_SCALE (1.0f/64.0f)
+#define AI_MD3_XYZ_SCALE (1.0f/64.0f)
// -------------------------------------------------------------------------------
/** @brief Data structure for the MD3 main header
@@ -249,12 +249,12 @@ struct Vertex
#include "./../include/Compiler/poppack1.h"
// -------------------------------------------------------------------------------
-/** @brief Unpack a Q3 16 bit vector to its full float3 representation
+/** @brief Unpack a Q3 16 bit vector to its full float3 representation
*
- * @param p_iNormal Input normal vector in latitude/longitude form
- * @param p_afOut Pointer to an array of three floats to receive the result
+ * @param p_iNormal Input normal vector in latitude/longitude form
+ * @param p_afOut Pointer to an array of three floats to receive the result
*
- * @note This has been taken from q3 source (misc_model.c)
+ * @note This has been taken from q3 source (misc_model.c)
*/
inline void LatLngNormalToVec3(uint16_t p_iNormal, float* p_afOut)
{
@@ -271,11 +271,11 @@ inline void LatLngNormalToVec3(uint16_t p_iNormal, float* p_afOut)
// -------------------------------------------------------------------------------
-/** @brief Pack a Q3 normal into 16bit latitute/longitude representation
- * @param p_vIn Input vector
- * @param p_iOut Output normal
+/** @brief Pack a Q3 normal into 16bit latitute/longitude representation
+ * @param p_vIn Input vector
+ * @param p_iOut Output normal
*
- * @note This has been taken from q3 source (mathlib.c)
+ * @note This has been taken from q3 source (mathlib.c)
*/
inline void Vec3NormalToLatLng( const aiVector3D& p_vIn, uint16_t& p_iOut )
{
@@ -285,17 +285,17 @@ inline void Vec3NormalToLatLng( const aiVector3D& p_vIn, uint16_t& p_iOut )
if ( p_vIn[2] > 0.0f )
{
((unsigned char*)&p_iOut)[0] = 0;
- ((unsigned char*)&p_iOut)[1] = 0; // lat = 0, long = 0
+ ((unsigned char*)&p_iOut)[1] = 0; // lat = 0, long = 0
}
else
{
((unsigned char*)&p_iOut)[0] = 128;
- ((unsigned char*)&p_iOut)[1] = 0; // lat = 0, long = 128
+ ((unsigned char*)&p_iOut)[1] = 0; // lat = 0, long = 128
}
}
else
{
- int a, b;
+ int a, b;
a = int(57.2957795f * ( atan2f( p_vIn[1], p_vIn[0] ) ) * (255.0f / 360.0f ));
a &= 0xff;
@@ -303,8 +303,8 @@ inline void Vec3NormalToLatLng( const aiVector3D& p_vIn, uint16_t& p_iOut )
b = int(57.2957795f * ( acosf( p_vIn[2] ) ) * ( 255.0f / 360.0f ));
b &= 0xff;
- ((unsigned char*)&p_iOut)[0] = b; // longitude
- ((unsigned char*)&p_iOut)[1] = a; // lattitude
+ ((unsigned char*)&p_iOut)[0] = b; // longitude
+ ((unsigned char*)&p_iOut)[1] = a; // lattitude
}
}
diff --git a/3rdparty/assimp/code/MD3Loader.cpp b/3rdparty/assimp/code/MD3Loader.cpp
index 0e37afc5d..fe1e68a16 100644
--- a/3rdparty/assimp/code/MD3Loader.cpp
+++ b/3rdparty/assimp/code/MD3Loader.cpp
@@ -391,10 +391,10 @@ void MD3Importer::ValidateSurfaceHeaderOffsets(const MD3::Surface* pcSurf)
const int32_t ofs = int32_t((const unsigned char*)pcSurf-this->mBuffer);
// Check whether all data chunks are inside the valid range
- if (pcSurf->OFS_TRIANGLES + ofs + pcSurf->NUM_TRIANGLES * sizeof(MD3::Triangle) > fileSize ||
+ if (pcSurf->OFS_TRIANGLES + ofs + pcSurf->NUM_TRIANGLES * sizeof(MD3::Triangle) > fileSize ||
pcSurf->OFS_SHADERS + ofs + pcSurf->NUM_SHADER * sizeof(MD3::Shader) > fileSize ||
pcSurf->OFS_ST + ofs + pcSurf->NUM_VERTICES * sizeof(MD3::TexCoord) > fileSize ||
- pcSurf->OFS_XYZNORMAL + ofs + pcSurf->NUM_VERTICES * sizeof(MD3::Vertex) > fileSize) {
+ pcSurf->OFS_XYZNORMAL + ofs + pcSurf->NUM_VERTICES * sizeof(MD3::Vertex) > fileSize) {
throw DeadlyImportError("Invalid MD3 surface header: some offsets are outside the file");
}
@@ -655,7 +655,7 @@ void MD3Importer::ConvertPath(const char* texture_name, const char* header_name,
// HACK: If the paths starts with "models", ignore the
// next two hierarchy levels, it specifies just the model name.
// Ignored by Q3, it might be not equal to the real model location.
- if (end2) {
+ if (end2) {
size_t len2;
const size_t len1 = (size_t)(end1 - header_name);
@@ -783,7 +783,7 @@ void MD3Importer::InternReadFile( const std::string& pFile,
// Read all surfaces from the file
unsigned int iNum = pcHeader->NUM_SURFACES;
unsigned int iNumMaterials = 0;
- while (iNum-- > 0) {
+ while (iNum-- > 0) {
// Ensure correct endianess
#ifdef AI_BUILD_BIG_ENDIAN
@@ -847,7 +847,7 @@ void MD3Importer::InternReadFile( const std::string& pFile,
}
// Get the first shader (= texture?) assigned to the surface
- if (!texture_name && pcSurfaces->NUM_SHADER) {
+ if (!texture_name && pcSurfaces->NUM_SHADER) {
texture_name = pcShaders->NAME;
}
@@ -898,10 +898,10 @@ void MD3Importer::InternReadFile( const std::string& pFile,
if (!shader) {
// Setup dummy texture file name to ensure UV coordinates are kept during postprocessing
aiString szString;
- if (convertedPath.length()) {
+ if (convertedPath.length()) {
szString.Set(convertedPath);
}
- else {
+ else {
DefaultLogger::get()->warn("Texture file name has zero length. Using default name");
szString.Set("dummy_texture.bmp");
}
@@ -921,7 +921,7 @@ void MD3Importer::InternReadFile( const std::string& pFile,
// Ensure correct endianess
#ifdef AI_BUILD_BIG_ENDIAN
- for (uint32_t i = 0; i < pcSurfaces->NUM_VERTICES;++i) {
+ for (uint32_t i = 0; i < pcSurfaces->NUM_VERTICES;++i) {
AI_SWAP2( pcVertices[i].NORMAL );
AI_SWAP2( pcVertices[i].X );
AI_SWAP2( pcVertices[i].Y );
@@ -930,7 +930,7 @@ void MD3Importer::InternReadFile( const std::string& pFile,
AI_SWAP4( pcUVs[i].U );
AI_SWAP4( pcUVs[i].U );
}
- for (uint32_t i = 0; i < pcSurfaces->NUM_TRIANGLES;++i) {
+ for (uint32_t i = 0; i < pcSurfaces->NUM_TRIANGLES;++i) {
AI_SWAP4(pcTriangles[i].INDEXES[0]);
AI_SWAP4(pcTriangles[i].INDEXES[1]);
AI_SWAP4(pcTriangles[i].INDEXES[2]);
@@ -941,22 +941,22 @@ void MD3Importer::InternReadFile( const std::string& pFile,
// Fill mesh information
pcMesh->mPrimitiveTypes = aiPrimitiveType_TRIANGLE;
- pcMesh->mNumVertices = pcSurfaces->NUM_TRIANGLES*3;
- pcMesh->mNumFaces = pcSurfaces->NUM_TRIANGLES;
- pcMesh->mFaces = new aiFace[pcSurfaces->NUM_TRIANGLES];
- pcMesh->mNormals = new aiVector3D[pcMesh->mNumVertices];
- pcMesh->mVertices = new aiVector3D[pcMesh->mNumVertices];
- pcMesh->mTextureCoords[0] = new aiVector3D[pcMesh->mNumVertices];
+ pcMesh->mNumVertices = pcSurfaces->NUM_TRIANGLES*3;
+ pcMesh->mNumFaces = pcSurfaces->NUM_TRIANGLES;
+ pcMesh->mFaces = new aiFace[pcSurfaces->NUM_TRIANGLES];
+ pcMesh->mNormals = new aiVector3D[pcMesh->mNumVertices];
+ pcMesh->mVertices = new aiVector3D[pcMesh->mNumVertices];
+ pcMesh->mTextureCoords[0] = new aiVector3D[pcMesh->mNumVertices];
pcMesh->mNumUVComponents[0] = 2;
// Fill in all triangles
unsigned int iCurrent = 0;
- for (unsigned int i = 0; i < (unsigned int)pcSurfaces->NUM_TRIANGLES;++i) {
+ for (unsigned int i = 0; i < (unsigned int)pcSurfaces->NUM_TRIANGLES;++i) {
pcMesh->mFaces[i].mIndices = new unsigned int[3];
pcMesh->mFaces[i].mNumIndices = 3;
//unsigned int iTemp = iCurrent;
- for (unsigned int c = 0; c < 3;++c,++iCurrent) {
+ for (unsigned int c = 0; c < 3;++c,++iCurrent) {
pcMesh->mFaces[i].mIndices[c] = iCurrent;
// Read vertices
diff --git a/3rdparty/assimp/code/MD3Loader.h b/3rdparty/assimp/code/MD3Loader.h
index e4a65a529..f2d07834d 100644
--- a/3rdparty/assimp/code/MD3Loader.h
+++ b/3rdparty/assimp/code/MD3Loader.h
@@ -50,7 +50,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "../include/aiTypes.h"
#include "MD3FileData.h"
-namespace Assimp {
+namespace Assimp {
class MaterialHelper;
using namespace MD3;
@@ -120,9 +120,9 @@ enum AlphaTestFunc
struct ShaderMapBlock
{
ShaderMapBlock()
- : blend_src (BLEND_NONE)
- , blend_dest (BLEND_NONE)
- , alpha_test (AT_NONE)
+ : blend_src (BLEND_NONE)
+ , blend_dest (BLEND_NONE)
+ , alpha_test (AT_NONE)
{}
//! Name of referenced map
@@ -145,7 +145,7 @@ struct ShaderMapBlock
struct ShaderDataBlock
{
ShaderDataBlock()
- : cull (CULL_CW)
+ : cull (CULL_CW)
{}
//! Name of referenced data element
@@ -224,7 +224,7 @@ public:
// -------------------------------------------------------------------
/** 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;
diff --git a/3rdparty/assimp/code/MD4FileData.h b/3rdparty/assimp/code/MD4FileData.h
index 4e97e92b3..c61665c2a 100644
--- a/3rdparty/assimp/code/MD4FileData.h
+++ b/3rdparty/assimp/code/MD4FileData.h
@@ -50,13 +50,13 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "../include/aiMesh.h"
#include "../include/aiAnim.h"
-#if defined(_MSC_VER) || defined(__BORLANDC__) || defined (__BCPLUSPLUS__)
-# pragma pack(push,1)
-# define PACK_STRUCT
+#if defined(_MSC_VER) || defined(__BORLANDC__) || defined (__BCPLUSPLUS__)
+# pragma pack(push,1)
+# define PACK_STRUCT
#elif defined( __GNUC__ )
-# define PACK_STRUCT __attribute__((packed))
+# define PACK_STRUCT __attribute__((packed))
#else
-# error Compiler not supported
+# error Compiler not supported
#endif
@@ -66,17 +66,17 @@ namespace Assimp
namespace MD4
{
-#define AI_MD4_MAGIC_NUMBER_BE 'IDP4'
-#define AI_MD4_MAGIC_NUMBER_LE '4PDI'
+#define AI_MD4_MAGIC_NUMBER_BE 'IDP4'
+#define AI_MD4_MAGIC_NUMBER_LE '4PDI'
// common limitations
-#define AI_MD4_VERSION 4
-#define AI_MD4_MAXQPATH 64
-#define AI_MD4_MAX_FRAMES 2028
-#define AI_MD4_MAX_SURFACES 32
-#define AI_MD4_MAX_BONES 256
-#define AI_MD4_MAX_VERTS 4096
-#define AI_MD4_MAX_TRIANGLES 8192
+#define AI_MD4_VERSION 4
+#define AI_MD4_MAXQPATH 64
+#define AI_MD4_MAX_FRAMES 2028
+#define AI_MD4_MAX_SURFACES 32
+#define AI_MD4_MAX_BONES 256
+#define AI_MD4_MAX_VERTS 4096
+#define AI_MD4_MAX_TRIANGLES 8192
// ---------------------------------------------------------------------------
/** \brief Data structure for the MD4 main header
@@ -207,7 +207,7 @@ struct Frame
// reset packing to the original value
#if defined(_MSC_VER) || defined(__BORLANDC__) || defined (__BCPLUSPLUS__)
-# pragma pack( pop )
+# pragma pack( pop )
#endif
#undef PACK_STRUCT
diff --git a/3rdparty/assimp/code/MD5Loader.cpp b/3rdparty/assimp/code/MD5Loader.cpp
index d18077421..897bb2ab9 100644
--- a/3rdparty/assimp/code/MD5Loader.cpp
+++ b/3rdparty/assimp/code/MD5Loader.cpp
@@ -78,7 +78,7 @@ bool MD5Importer::CanRead( const std::string& pFile, IOSystem* pIOHandler, bool
if (extension == "md5anim" || extension == "md5mesh" || extension == "md5camera")
return true;
- else if (!extension.length() || checkSig) {
+ else if (!extension.length() || checkSig) {
if (!pIOHandler)
return true;
const char* tokens[] = {"MD5Version"};
@@ -210,7 +210,7 @@ void MD5Importer::MakeDataUnique (MD5::MeshDesc& meshSrc)
if (face.mIndices[0] >= meshSrc.mVertices.size())
throw DeadlyImportError("MD5MESH: Invalid vertex index");
- if (abHad[face.mIndices[i]]) {
+ if (abHad[face.mIndices[i]]) {
// generate a new vertex
meshSrc.mVertices[iNewIndex] = meshSrc.mVertices[face.mIndices[i]];
face.mIndices[i] = iNewIndex++;
@@ -229,16 +229,16 @@ void MD5Importer::AttachChilds_Mesh(int iParentID,aiNode* piParent, BoneList& bo
ai_assert(NULL != piParent && !piParent->mNumChildren);
// First find out how many children we'll have
- for (int i = 0; i < (int)bones.size();++i) {
- if (iParentID != i && bones[i].mParentIndex == iParentID) {
+ for (int i = 0; i < (int)bones.size();++i) {
+ if (iParentID != i && bones[i].mParentIndex == iParentID) {
++piParent->mNumChildren;
}
}
- if (piParent->mNumChildren) {
+ if (piParent->mNumChildren) {
piParent->mChildren = new aiNode*[piParent->mNumChildren];
- for (int i = 0; i < (int)bones.size();++i) {
+ for (int i = 0; i < (int)bones.size();++i) {
// (avoid infinite recursion)
- if (iParentID != i && bones[i].mParentIndex == iParentID) {
+ if (iParentID != i && bones[i].mParentIndex == iParentID) {
aiNode* pc;
// setup a new node
*piParent->mChildren++ = pc = new aiNode();
@@ -263,7 +263,7 @@ void MD5Importer::AttachChilds_Mesh(int iParentID,aiNode* piParent, BoneList& bo
// the transformations for each bone are absolute, so we need to multiply them
// with the inverse of the absolute matrix of the parent joint
- if (-1 != iParentID) {
+ if (-1 != iParentID) {
pc->mTransformation = bones[iParentID].mInvTransform * pc->mTransformation;
}
@@ -283,14 +283,14 @@ void MD5Importer::AttachChilds_Anim(int iParentID,aiNode* piParent, AnimBoneList
ai_assert(NULL != piParent && !piParent->mNumChildren);
// First find out how many children we'll have
- for (int i = 0; i < (int)bones.size();++i) {
- if (iParentID != i && bones[i].mParentIndex == iParentID) {
+ for (int i = 0; i < (int)bones.size();++i) {
+ if (iParentID != i && bones[i].mParentIndex == iParentID) {
++piParent->mNumChildren;
}
}
- if (piParent->mNumChildren) {
+ if (piParent->mNumChildren) {
piParent->mChildren = new aiNode*[piParent->mNumChildren];
- for (int i = 0; i < (int)bones.size();++i) {
+ for (int i = 0; i < (int)bones.size();++i) {
// (avoid infinite recursion)
if (iParentID != i && bones[i].mParentIndex == iParentID)
{
@@ -324,7 +324,7 @@ void MD5Importer::LoadMD5MeshFile ()
boost::scoped_ptr<IOStream> file( pIOHandler->Open( pFile, "rb"));
// Check whether we can read from the file
- if ( file.get() == NULL) {
+ if ( file.get() == NULL) {
DefaultLogger::get()->warn("Failed to read MD5MESH file: " + pFile);
return;
}
@@ -454,7 +454,7 @@ void MD5Importer::LoadMD5MeshFile ()
}
// process bone weights
- for (unsigned int jub = (*iter).mFirstWeight, w = jub; w < jub + (*iter).mNumWeights;++w) {
+ for (unsigned int jub = (*iter).mFirstWeight, w = jub; w < jub + (*iter).mNumWeights;++w) {
if (w >= meshSrc.mWeights.size())
throw DeadlyImportError("MD5MESH: Invalid weight index");
@@ -488,7 +488,7 @@ void MD5Importer::LoadMD5MeshFile ()
// (however, take care that the aiFace destructor doesn't delete the mIndices array)
mesh->mNumFaces = (unsigned int)meshSrc.mFaces.size();
mesh->mFaces = new aiFace[mesh->mNumFaces];
- for (unsigned int c = 0; c < mesh->mNumFaces;++c) {
+ for (unsigned int c = 0; c < mesh->mNumFaces;++c) {
mesh->mFaces[c].mNumIndices = 3;
mesh->mFaces[c].mIndices = meshSrc.mFaces[c].mIndices;
meshSrc.mFaces[c].mIndices = NULL;
@@ -540,7 +540,7 @@ void MD5Importer::LoadMD5AnimFile ()
boost::scoped_ptr<IOStream> file( pIOHandler->Open( pFile, "rb"));
// Check whether we can read from the file
- if ( file.get() == NULL) {
+ if ( file.get() == NULL) {
DefaultLogger::get()->warn("Failed to read MD5ANIM file: " + pFile);
return;
}
@@ -554,7 +554,7 @@ void MD5Importer::LoadMD5AnimFile ()
// generate and fill the output animation
if (animParser.mAnimatedBones.empty() || animParser.mFrames.empty() ||
- animParser.mBaseFrames.size() != animParser.mAnimatedBones.size()) {
+ animParser.mBaseFrames.size() != animParser.mAnimatedBones.size()) {
DefaultLogger::get()->error("MD5ANIM: No frames or animated bones loaded");
}
@@ -565,7 +565,7 @@ void MD5Importer::LoadMD5AnimFile ()
aiAnimation* anim = pScene->mAnimations[0] = new aiAnimation();
anim->mNumChannels = (unsigned int)animParser.mAnimatedBones.size();
anim->mChannels = new aiNodeAnim*[anim->mNumChannels];
- for (unsigned int i = 0; i < anim->mNumChannels;++i) {
+ for (unsigned int i = 0; i < anim->mNumChannels;++i) {
aiNodeAnim* node = anim->mChannels[i] = new aiNodeAnim();
node->mNodeName = aiString( animParser.mAnimatedBones[i].mName );
@@ -584,7 +584,7 @@ void MD5Importer::LoadMD5AnimFile ()
{
// now process all values in there ... read all joints
MD5::BaseFrameDesc* pcBaseFrame = &animParser.mBaseFrames[0];
- for (AnimBoneList::const_iterator iter2 = animParser.mAnimatedBones.begin(); iter2 != animParser.mAnimatedBones.end();++iter2,
+ for (AnimBoneList::const_iterator iter2 = animParser.mAnimatedBones.begin(); iter2 != animParser.mAnimatedBones.end();++iter2,
++pcAnimNode,++pcBaseFrame)
{
if ((*iter2).iFirstKeyIndex >= (*iter).mValues.size()) {
@@ -655,7 +655,7 @@ void MD5Importer::LoadMD5CameraFile ()
boost::scoped_ptr<IOStream> file( pIOHandler->Open( pFile, "rb"));
// Check whether we can read from the file
- if ( file.get() == NULL) {
+ if ( file.get() == NULL) {
throw DeadlyImportError("Failed to read MD5CAMERA file: " + pFile);
}
bHadMD5Camera = true;
diff --git a/3rdparty/assimp/code/MD5Loader.h b/3rdparty/assimp/code/MD5Loader.h
index 0677eef97..d56cefb1b 100644
--- a/3rdparty/assimp/code/MD5Loader.h
+++ b/3rdparty/assimp/code/MD5Loader.h
@@ -51,7 +51,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "../include/aiTypes.h"
-namespace Assimp {
+namespace Assimp {
class IOStream;
using namespace Assimp::MD5;
diff --git a/3rdparty/assimp/code/MD5Parser.cpp b/3rdparty/assimp/code/MD5Parser.cpp
index 5541b2994..d5b89399a 100644
--- a/3rdparty/assimp/code/MD5Parser.cpp
+++ b/3rdparty/assimp/code/MD5Parser.cpp
@@ -71,15 +71,15 @@ MD5Parser::MD5Parser(char* _buffer, unsigned int _fileSize )
// and read all sections until we're finished
bool running = true;
- while (running) {
+ while (running) {
mSections.push_back(Section());
Section& sec = mSections.back();
- if (!ParseSection(sec)) {
+ if (!ParseSection(sec)) {
break;
}
}
- if ( !DefaultLogger::isNullLogger()) {
+ if ( !DefaultLogger::isNullLogger()) {
char szBuffer[128]; // should be sufficiently large
::sprintf(szBuffer,"MD5Parser end. Parsed %i sections",(int)mSections.size());
DefaultLogger::get()->debug(szBuffer);
@@ -110,12 +110,12 @@ void MD5Parser::ParseHeader()
{
// parse and validate the file version
SkipSpaces();
- if (!TokenMatch(buffer,"MD5Version",10)) {
+ if (!TokenMatch(buffer,"MD5Version",10)) {
ReportError("Invalid MD5 file: MD5Version tag has not been found");
}
SkipSpaces();
unsigned int iVer = ::strtol10(buffer,(const char**)&buffer);
- if (10 != iVer) {
+ if (10 != iVer) {
ReportError("MD5 version tag is unknown (10 is expected)");
}
SkipLine();
@@ -123,7 +123,7 @@ void MD5Parser::ParseHeader()
// print the command line options to the console
// FIX: can break the log length limit, so we need to be careful
char* sz = buffer;
- while (!IsLineEnd( *buffer++)) {};
+ while (!IsLineEnd( *buffer++));
DefaultLogger::get()->info(std::string(sz,std::min((uintptr_t)MAX_LOG_MESSAGE_LENGTH, (uintptr_t)(buffer-sz))));
SkipSpacesAndLineEnd();
}
@@ -142,8 +142,8 @@ bool MD5Parser::ParseSection(Section& out)
SkipSpaces();
bool running = true;
- while (running) {
- if ('{' == *buffer) {
+ while (running) {
+ if ('{' == *buffer) {
// it is a normal section so read all lines
buffer++;
bool run = true;
@@ -152,7 +152,7 @@ bool MD5Parser::ParseSection(Section& out)
if (!SkipSpacesAndLineEnd()) {
return false; // seems this was the last section
}
- if ('}' == *buffer) {
+ if ('}' == *buffer) {
buffer++;
break;
}
@@ -172,10 +172,10 @@ bool MD5Parser::ParseSection(Section& out)
}
break;
}
- else if (!IsSpaceOrNewLine(*buffer)) {
+ else if (!IsSpaceOrNewLine(*buffer)) {
// it is an element at global scope. Parse its value and go on
sz = buffer;
- while (!IsSpaceOrNewLine( *buffer++)) {};
+ while (!IsSpaceOrNewLine( *buffer++));
out.mGlobalValue = std::string(sz,(uintptr_t)(buffer-sz));
continue;
}
@@ -188,7 +188,7 @@ bool MD5Parser::ParseSection(Section& out)
// Some dirty macros just because they're so funny and easy to debug
// skip all spaces ... handle EOL correctly
-#define AI_MD5_SKIP_SPACES() if (!SkipSpaces(&sz)) \
+#define AI_MD5_SKIP_SPACES() if (!SkipSpaces(&sz)) \
MD5Parser::ReportWarning("Unexpected end of line",(*eit).iLineNumber);
// read a triple float in brackets: (1.0 1.0 1.0)
@@ -232,14 +232,14 @@ MD5MeshParser::MD5MeshParser(SectionList& mSections)
// now parse all sections
for (SectionList::const_iterator iter = mSections.begin(), iterEnd = mSections.end();iter != iterEnd;++iter){
- if ( (*iter).mName == "numMeshes") {
+ if ( (*iter).mName == "numMeshes") {
mMeshes.reserve(::strtol10((*iter).mGlobalValue.c_str()));
}
- else if ( (*iter).mName == "numJoints") {
+ else if ( (*iter).mName == "numJoints") {
mJoints.reserve(::strtol10((*iter).mGlobalValue.c_str()));
}
- else if ((*iter).mName == "joints") {
- // "origin" -1 ( -0.000000 0.016430 -0.006044 ) ( 0.707107 0.000000 0.707107 )
+ else if ((*iter).mName == "joints") {
+ // "origin" -1 ( -0.000000 0.016430 -0.006044 ) ( 0.707107 0.000000 0.707107 )
for (ElementList::const_iterator eit = (*iter).mElements.begin(), eitEnd = (*iter).mElements.end();eit != eitEnd; ++eit){
mJoints.push_back(BoneDesc());
BoneDesc& desc = mJoints.back();
@@ -255,7 +255,7 @@ MD5MeshParser::MD5MeshParser(SectionList& mSections)
AI_MD5_READ_TRIPLE(desc.mRotationQuat); // normalized quaternion, so w is not there
}
}
- else if ((*iter).mName == "mesh") {
+ else if ((*iter).mName == "mesh") {
mMeshes.push_back(MeshDesc());
MeshDesc& desc = mMeshes.back();
@@ -263,28 +263,28 @@ MD5MeshParser::MD5MeshParser(SectionList& mSections)
const char* sz = (*eit).szStart;
// shader attribute
- if (TokenMatch(sz,"shader",6)) {
+ if (TokenMatch(sz,"shader",6)) {
AI_MD5_SKIP_SPACES();
AI_MD5_PARSE_STRING(desc.mShader);
}
// numverts attribute
- else if (TokenMatch(sz,"numverts",8)) {
+ else if (TokenMatch(sz,"numverts",8)) {
AI_MD5_SKIP_SPACES();
desc.mVertices.resize(strtol10(sz));
}
// numtris attribute
- else if (TokenMatch(sz,"numtris",7)) {
+ else if (TokenMatch(sz,"numtris",7)) {
AI_MD5_SKIP_SPACES();
desc.mFaces.resize(strtol10(sz));
}
// numweights attribute
- else if (TokenMatch(sz,"numweights",10)) {
+ else if (TokenMatch(sz,"numweights",10)) {
AI_MD5_SKIP_SPACES();
desc.mWeights.resize(strtol10(sz));
}
// vert attribute
// "vert 0 ( 0.394531 0.513672 ) 0 1"
- else if (TokenMatch(sz,"vert",4)) {
+ else if (TokenMatch(sz,"vert",4)) {
AI_MD5_SKIP_SPACES();
const unsigned int idx = ::strtol10(sz,&sz);
AI_MD5_SKIP_SPACES();
@@ -316,14 +316,14 @@ MD5MeshParser::MD5MeshParser(SectionList& mSections)
aiFace& face = desc.mFaces[idx];
face.mIndices = new unsigned int[face.mNumIndices = 3];
- for (unsigned int i = 0; i < 3;++i) {
+ for (unsigned int i = 0; i < 3;++i) {
AI_MD5_SKIP_SPACES();
face.mIndices[i] = strtol10(sz,&sz);
}
}
// weight attribute
// "weight 362 5 0.500000 ( -3.553583 11.893474 9.719339 )"
- else if (TokenMatch(sz,"weight",6)) {
+ else if (TokenMatch(sz,"weight",6)) {
AI_MD5_SKIP_SPACES();
const unsigned int idx = strtol10(sz,&sz);
AI_MD5_SKIP_SPACES();
@@ -351,8 +351,8 @@ MD5AnimParser::MD5AnimParser(SectionList& mSections)
fFrameRate = 24.0f;
mNumAnimatedComponents = 0xffffffff;
for (SectionList::const_iterator iter = mSections.begin(), iterEnd = mSections.end();iter != iterEnd;++iter) {
- if ((*iter).mName == "hierarchy") {
- // "sheath" 0 63 6
+ if ((*iter).mName == "hierarchy") {
+ // "sheath" 0 63 6
for (ElementList::const_iterator eit = (*iter).mElements.begin(), eitEnd = (*iter).mElements.end();eit != eitEnd; ++eit) {
mAnimatedBones.push_back ( AnimBoneDesc () );
AnimBoneDesc& desc = mAnimatedBones.back();
@@ -375,7 +375,7 @@ MD5AnimParser::MD5AnimParser(SectionList& mSections)
desc.iFirstKeyIndex = ::strtol10(sz,&sz);
}
}
- else if ((*iter).mName == "baseframe") {
+ else if ((*iter).mName == "baseframe") {
// ( -0.000000 0.016430 -0.006044 ) ( 0.707107 0.000242 0.707107 )
for (ElementList::const_iterator eit = (*iter).mElements.begin(), eitEnd = (*iter).mElements.end(); eit != eitEnd; ++eit) {
const char* sz = (*eit).szStart;
@@ -387,8 +387,8 @@ MD5AnimParser::MD5AnimParser(SectionList& mSections)
AI_MD5_READ_TRIPLE(desc.vRotationQuat);
}
}
- else if ((*iter).mName == "frame") {
- if (!(*iter).mGlobalValue.length()) {
+ else if ((*iter).mName == "frame") {
+ if (!(*iter).mGlobalValue.length()) {
MD5Parser::ReportWarning("A frame section must have a frame index",(*iter).iLineNumber);
continue;
}
@@ -404,16 +404,16 @@ MD5AnimParser::MD5AnimParser(SectionList& mSections)
// now read all elements (continous list of floats)
for (ElementList::const_iterator eit = (*iter).mElements.begin(), eitEnd = (*iter).mElements.end(); eit != eitEnd; ++eit){
const char* sz = (*eit).szStart;
- while (SkipSpacesAndLineEnd(&sz)) {
+ while (SkipSpacesAndLineEnd(&sz)) {
float f;sz = fast_atof_move(sz,f);
desc.mValues.push_back(f);
}
}
}
- else if ((*iter).mName == "numFrames") {
+ else if ((*iter).mName == "numFrames") {
mFrames.reserve(strtol10((*iter).mGlobalValue.c_str()));
}
- else if ((*iter).mName == "numJoints") {
+ else if ((*iter).mName == "numJoints") {
const unsigned int num = strtol10((*iter).mGlobalValue.c_str());
mAnimatedBones.reserve(num);
@@ -421,10 +421,10 @@ MD5AnimParser::MD5AnimParser(SectionList& mSections)
if (0xffffffff == mNumAnimatedComponents)
mNumAnimatedComponents = num * 6;
}
- else if ((*iter).mName == "numAnimatedComponents") {
+ else if ((*iter).mName == "numAnimatedComponents") {
mAnimatedBones.reserve( strtol10((*iter).mGlobalValue.c_str()));
}
- else if ((*iter).mName == "frameRate") {
+ else if ((*iter).mName == "frameRate") {
fast_atof_move((*iter).mGlobalValue.c_str(),fFrameRate);
}
}
@@ -439,21 +439,21 @@ MD5CameraParser::MD5CameraParser(SectionList& mSections)
fFrameRate = 24.0f;
for (SectionList::const_iterator iter = mSections.begin(), iterEnd = mSections.end();iter != iterEnd;++iter) {
- if ((*iter).mName == "numFrames") {
+ if ((*iter).mName == "numFrames") {
frames.reserve(strtol10((*iter).mGlobalValue.c_str()));
}
- else if ((*iter).mName == "frameRate") {
+ else if ((*iter).mName == "frameRate") {
fFrameRate = fast_atof ((*iter).mGlobalValue.c_str());
}
- else if ((*iter).mName == "numCuts") {
+ else if ((*iter).mName == "numCuts") {
cuts.reserve(strtol10((*iter).mGlobalValue.c_str()));
}
- else if ((*iter).mName == "cuts") {
+ else if ((*iter).mName == "cuts") {
for (ElementList::const_iterator eit = (*iter).mElements.begin(), eitEnd = (*iter).mElements.end(); eit != eitEnd; ++eit){
cuts.push_back(strtol10((*eit).szStart)+1);
}
}
- else if ((*iter).mName == "camera") {
+ else if ((*iter).mName == "camera") {
for (ElementList::const_iterator eit = (*iter).mElements.begin(), eitEnd = (*iter).mElements.end(); eit != eitEnd; ++eit){
const char* sz = (*eit).szStart;
diff --git a/3rdparty/assimp/code/MD5Parser.h b/3rdparty/assimp/code/MD5Parser.h
index 33a0e4d87..afb5db8e3 100644
--- a/3rdparty/assimp/code/MD5Parser.h
+++ b/3rdparty/assimp/code/MD5Parser.h
@@ -51,8 +51,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
struct aiFace;
-namespace Assimp {
-namespace MD5 {
+namespace Assimp {
+namespace MD5 {
// ---------------------------------------------------------------------------
/** Represents a single element in a MD5 file
@@ -191,8 +191,8 @@ typedef std::vector< FrameDesc > FrameList;
struct VertexDesc
{
VertexDesc()
- : mFirstWeight (0)
- , mNumWeights (0)
+ : mFirstWeight (0)
+ , mNumWeights (0)
{}
//! UV cordinate of the vertex
@@ -425,10 +425,10 @@ private:
{
bool bHad = false;
bool running = true;
- while (running) {
- if ( *in == '\r' || *in == '\n') {
+ while (running) {
+ if ( *in == '\r' || *in == '\n') {
// we open files in binary mode, so there could be \r\n sequences ...
- if (!bHad) {
+ if (!bHad) {
bHad = true;
++lineNumber;
}
diff --git a/3rdparty/assimp/code/MDCFileData.h b/3rdparty/assimp/code/MDCFileData.h
index 3208c3fa9..6c33880c6 100644
--- a/3rdparty/assimp/code/MDCFileData.h
+++ b/3rdparty/assimp/code/MDCFileData.h
@@ -61,17 +61,17 @@ namespace MDC {
// to make it easier for us, we test the magic word against both "endianesses"
-#define AI_MDC_MAGIC_NUMBER_BE AI_MAKE_MAGIC("CPDI")
-#define AI_MDC_MAGIC_NUMBER_LE AI_MAKE_MAGIC("IDPC")
+#define AI_MDC_MAGIC_NUMBER_BE AI_MAKE_MAGIC("CPDI")
+#define AI_MDC_MAGIC_NUMBER_LE AI_MAKE_MAGIC("IDPC")
// common limitations
-#define AI_MDC_VERSION 2
-#define AI_MDC_MAXQPATH 64
-#define AI_MDC_MAX_BONES 128
+#define AI_MDC_VERSION 2
+#define AI_MDC_MAXQPATH 64
+#define AI_MDC_MAX_BONES 128
-#define AI_MDC_CVERT_BIAS 127.0f
-#define AI_MDC_DELTA_SCALING 4.0f
-#define AI_MDC_BASE_SCALING (1.0f / 64.0f)
+#define AI_MDC_CVERT_BIAS 127.0f
+#define AI_MDC_DELTA_SCALING 4.0f
+#define AI_MDC_BASE_SCALING (1.0f / 64.0f)
// ---------------------------------------------------------------------------
diff --git a/3rdparty/assimp/code/MDCLoader.cpp b/3rdparty/assimp/code/MDCLoader.cpp
index 077f3b0a0..9e022cf10 100644
--- a/3rdparty/assimp/code/MDCLoader.cpp
+++ b/3rdparty/assimp/code/MDCLoader.cpp
@@ -168,13 +168,13 @@ void MDCImporter::ValidateSurfaceHeader(BE_NCONST MDC::Surface* pcSurf)
const unsigned int iMax = this->fileSize - (unsigned int)((int8_t*)pcSurf-(int8_t*)pcHeader);
- if (pcSurf->ulOffsetBaseVerts + pcSurf->ulNumVertices * sizeof(MDC::BaseVertex) > iMax ||
- (pcSurf->ulNumCompFrames && pcSurf->ulOffsetCompVerts + pcSurf->ulNumVertices * sizeof(MDC::CompressedVertex) > iMax) ||
- pcSurf->ulOffsetTriangles + pcSurf->ulNumTriangles * sizeof(MDC::Triangle) > iMax ||
- pcSurf->ulOffsetTexCoords + pcSurf->ulNumVertices * sizeof(MDC::TexturCoord) > iMax ||
- pcSurf->ulOffsetShaders + pcSurf->ulNumShaders * sizeof(MDC::Shader) > iMax ||
- pcSurf->ulOffsetFrameBaseFrames + pcSurf->ulNumBaseFrames * 2 > iMax ||
- (pcSurf->ulNumCompFrames && pcSurf->ulOffsetFrameCompFrames + pcSurf->ulNumCompFrames * 2 > iMax))
+ if (pcSurf->ulOffsetBaseVerts + pcSurf->ulNumVertices * sizeof(MDC::BaseVertex) > iMax ||
+ (pcSurf->ulNumCompFrames && pcSurf->ulOffsetCompVerts + pcSurf->ulNumVertices * sizeof(MDC::CompressedVertex) > iMax) ||
+ pcSurf->ulOffsetTriangles + pcSurf->ulNumTriangles * sizeof(MDC::Triangle) > iMax ||
+ pcSurf->ulOffsetTexCoords + pcSurf->ulNumVertices * sizeof(MDC::TexturCoord) > iMax ||
+ pcSurf->ulOffsetShaders + pcSurf->ulNumShaders * sizeof(MDC::Shader) > iMax ||
+ pcSurf->ulOffsetFrameBaseFrames + pcSurf->ulNumBaseFrames * 2 > iMax ||
+ (pcSurf->ulNumCompFrames && pcSurf->ulOffsetFrameCompFrames + pcSurf->ulNumCompFrames * 2 > iMax))
{
throw DeadlyImportError("Some of the offset values in the MDC surface header "
"are invalid and point somewhere behind the file.");
@@ -285,10 +285,10 @@ void MDCImporter::InternReadFile(
else pcMesh->mMaterialIndex = iDefaultMatIndex;
// allocate output storage for the mesh
- aiVector3D* pcVertCur = pcMesh->mVertices = new aiVector3D[pcMesh->mNumVertices];
- aiVector3D* pcNorCur = pcMesh->mNormals = new aiVector3D[pcMesh->mNumVertices];
- aiVector3D* pcUVCur = pcMesh->mTextureCoords[0] = new aiVector3D[pcMesh->mNumVertices];
- aiFace* pcFaceCur = pcMesh->mFaces = new aiFace[pcMesh->mNumFaces];
+ aiVector3D* pcVertCur = pcMesh->mVertices = new aiVector3D[pcMesh->mNumVertices];
+ aiVector3D* pcNorCur = pcMesh->mNormals = new aiVector3D[pcMesh->mNumVertices];
+ aiVector3D* pcUVCur = pcMesh->mTextureCoords[0] = new aiVector3D[pcMesh->mNumVertices];
+ aiFace* pcFaceCur = pcMesh->mFaces = new aiFace[pcMesh->mNumFaces];
// create all vertices/faces
BE_NCONST MDC::Triangle* pcTriangle = (BE_NCONST MDC::Triangle*)
diff --git a/3rdparty/assimp/code/MDCLoader.h b/3rdparty/assimp/code/MDCLoader.h
index 4cabf09f9..f97efc73e 100644
--- a/3rdparty/assimp/code/MDCLoader.h
+++ b/3rdparty/assimp/code/MDCLoader.h
@@ -50,7 +50,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "MDCFileData.h"
#include "ByteSwap.h"
-namespace Assimp {
+namespace Assimp {
using namespace MDC;
// ---------------------------------------------------------------------------
@@ -71,7 +71,7 @@ public:
// -------------------------------------------------------------------
/** 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;
diff --git a/3rdparty/assimp/code/MDLFileData.h b/3rdparty/assimp/code/MDLFileData.h
index 098cb8dce..b1791d4b3 100644
--- a/3rdparty/assimp/code/MDLFileData.h
+++ b/3rdparty/assimp/code/MDLFileData.h
@@ -54,57 +54,57 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "./../include/Compiler/pushpack1.h"
-namespace Assimp {
-namespace MDL {
+namespace Assimp {
+namespace MDL {
// -------------------------------------------------------------------------------------
// to make it easier for us, we test the magic word against both "endianesses"
// magic bytes used in Quake 1 MDL meshes
-#define AI_MDL_MAGIC_NUMBER_BE AI_MAKE_MAGIC("IDPO")
-#define AI_MDL_MAGIC_NUMBER_LE AI_MAKE_MAGIC("OPDI")
+#define AI_MDL_MAGIC_NUMBER_BE AI_MAKE_MAGIC("IDPO")
+#define AI_MDL_MAGIC_NUMBER_LE AI_MAKE_MAGIC("OPDI")
// magic bytes used in GameStudio A<very low> MDL meshes
-#define AI_MDL_MAGIC_NUMBER_BE_GS3 AI_MAKE_MAGIC("MDL2")
-#define AI_MDL_MAGIC_NUMBER_LE_GS3 AI_MAKE_MAGIC("2LDM")
+#define AI_MDL_MAGIC_NUMBER_BE_GS3 AI_MAKE_MAGIC("MDL2")
+#define AI_MDL_MAGIC_NUMBER_LE_GS3 AI_MAKE_MAGIC("2LDM")
// magic bytes used in GameStudio A4 MDL meshes
-#define AI_MDL_MAGIC_NUMBER_BE_GS4 AI_MAKE_MAGIC("MDL3")
-#define AI_MDL_MAGIC_NUMBER_LE_GS4 AI_MAKE_MAGIC("3LDM")
+#define AI_MDL_MAGIC_NUMBER_BE_GS4 AI_MAKE_MAGIC("MDL3")
+#define AI_MDL_MAGIC_NUMBER_LE_GS4 AI_MAKE_MAGIC("3LDM")
// magic bytes used in GameStudio A5+ MDL meshes
-#define AI_MDL_MAGIC_NUMBER_BE_GS5a AI_MAKE_MAGIC("MDL4")
-#define AI_MDL_MAGIC_NUMBER_LE_GS5a AI_MAKE_MAGIC("4LDM")
-#define AI_MDL_MAGIC_NUMBER_BE_GS5b AI_MAKE_MAGIC("MDL5")
-#define AI_MDL_MAGIC_NUMBER_LE_GS5b AI_MAKE_MAGIC("5LDM")
+#define AI_MDL_MAGIC_NUMBER_BE_GS5a AI_MAKE_MAGIC("MDL4")
+#define AI_MDL_MAGIC_NUMBER_LE_GS5a AI_MAKE_MAGIC("4LDM")
+#define AI_MDL_MAGIC_NUMBER_BE_GS5b AI_MAKE_MAGIC("MDL5")
+#define AI_MDL_MAGIC_NUMBER_LE_GS5b AI_MAKE_MAGIC("5LDM")
// magic bytes used in GameStudio A7+ MDL meshes
-#define AI_MDL_MAGIC_NUMBER_BE_GS7 AI_MAKE_MAGIC("MDL7")
-#define AI_MDL_MAGIC_NUMBER_LE_GS7 AI_MAKE_MAGIC("7LDM")
+#define AI_MDL_MAGIC_NUMBER_BE_GS7 AI_MAKE_MAGIC("MDL7")
+#define AI_MDL_MAGIC_NUMBER_LE_GS7 AI_MAKE_MAGIC("7LDM")
// common limitations for Quake1 meshes. The loader does not check them,
// (however it warns) but models should not exceed these limits.
#if (!defined AI_MDL_VERSION)
-# define AI_MDL_VERSION 6
+# define AI_MDL_VERSION 6
#endif
#if (!defined AI_MDL_MAX_FRAMES)
-# define AI_MDL_MAX_FRAMES 256
+# define AI_MDL_MAX_FRAMES 256
#endif
#if (!defined AI_MDL_MAX_UVS)
-# define AI_MDL_MAX_UVS 1024
+# define AI_MDL_MAX_UVS 1024
#endif
#if (!defined AI_MDL_MAX_VERTS)
-# define AI_MDL_MAX_VERTS 1024
+# define AI_MDL_MAX_VERTS 1024
#endif
#if (!defined AI_MDL_MAX_TRIANGLES)
-# define AI_MDL_MAX_TRIANGLES 2048
+# define AI_MDL_MAX_TRIANGLES 2048
#endif
// material key that is set for dummy materials that are
// just referencing another material
#if (!defined AI_MDL7_REFERRER_MATERIAL)
-# define AI_MDL7_REFERRER_MATERIAL "&&&referrer&&&",0,0
+# define AI_MDL7_REFERRER_MATERIAL "&&&referrer&&&",0,0
#endif
// -------------------------------------------------------------------------------------
@@ -168,25 +168,25 @@ struct Header
struct Header_MDL7
{
//! magic number: "MDL7"
- char ident[4];
+ char ident[4];
//! Version number. Ignored
- int32_t version;
+ int32_t version;
//! Number of bones in file
- uint32_t bones_num;
+ uint32_t bones_num;
//! Number of groups in file
- uint32_t groups_num;
+ uint32_t groups_num;
//! Size of data in the file
- uint32_t data_size;
+ uint32_t data_size;
//! Ignored. Used to store entity specific information
- int32_t entlump_size;
+ int32_t entlump_size;
//! Ignored. Used to store MED related data
- int32_t medlump_size;
+ int32_t medlump_size;
//! Size of the Bone_MDL7 data structure used in the file
uint16_t bone_stc_size;
@@ -241,19 +241,19 @@ struct Bone_MDL7
} PACK_STRUCT;
#if (!defined AI_MDL7_BONE_STRUCT_SIZE__NAME_IS_20_CHARS)
-# define AI_MDL7_BONE_STRUCT_SIZE__NAME_IS_20_CHARS (16 + 20)
+# define AI_MDL7_BONE_STRUCT_SIZE__NAME_IS_20_CHARS (16 + 20)
#endif
#if (!defined AI_MDL7_BONE_STRUCT_SIZE__NAME_IS_32_CHARS)
-# define AI_MDL7_BONE_STRUCT_SIZE__NAME_IS_32_CHARS (16 + 32)
+# define AI_MDL7_BONE_STRUCT_SIZE__NAME_IS_32_CHARS (16 + 32)
#endif
#if (!defined AI_MDL7_BONE_STRUCT_SIZE__NAME_IS_NOT_THERE)
-# define AI_MDL7_BONE_STRUCT_SIZE__NAME_IS_NOT_THERE (16)
+# define AI_MDL7_BONE_STRUCT_SIZE__NAME_IS_NOT_THERE (16)
#endif
#if (!defined AI_MDL7_MAX_GROUPNAMESIZE)
-# define AI_MDL7_MAX_GROUPNAMESIZE 16
+# define AI_MDL7_MAX_GROUPNAMESIZE 16
#endif // ! AI_MDL7_MAX_GROUPNAMESIZE
// -------------------------------------------------------------------------------------
@@ -263,39 +263,39 @@ struct Bone_MDL7
struct Group_MDL7
{
//! = '1' -> triangle based Mesh
- unsigned char typ;
+ unsigned char typ;
- int8_t deformers;
- int8_t max_weights;
- int8_t _unused_;
+ int8_t deformers;
+ int8_t max_weights;
+ int8_t _unused_;
//! size of data for this group in bytes ( MD7_GROUP stc. included).
- int32_t groupdata_size;
- char name[AI_MDL7_MAX_GROUPNAMESIZE];
+ int32_t groupdata_size;
+ char name[AI_MDL7_MAX_GROUPNAMESIZE];
//! Number of skins
- int32_t numskins;
+ int32_t numskins;
//! Number of texture coordinates
- int32_t num_stpts;
+ int32_t num_stpts;
//! Number of triangles
- int32_t numtris;
+ int32_t numtris;
//! Number of vertices
- int32_t numverts;
+ int32_t numverts;
//! Number of frames
- int32_t numframes;
+ int32_t numframes;
} PACK_STRUCT;
-#define AI_MDL7_SKINTYPE_MIPFLAG 0x08
-#define AI_MDL7_SKINTYPE_MATERIAL 0x10
-#define AI_MDL7_SKINTYPE_MATERIAL_ASCDEF 0x20
-#define AI_MDL7_SKINTYPE_RGBFLAG 0x80
+#define AI_MDL7_SKINTYPE_MIPFLAG 0x08
+#define AI_MDL7_SKINTYPE_MATERIAL 0x10
+#define AI_MDL7_SKINTYPE_MATERIAL_ASCDEF 0x20
+#define AI_MDL7_SKINTYPE_RGBFLAG 0x80
#if (!defined AI_MDL7_MAX_BONENAMESIZE)
-# define AI_MDL7_MAX_BONENAMESIZE 20
+# define AI_MDL7_MAX_BONENAMESIZE 20
#endif // !! AI_MDL7_MAX_BONENAMESIZE
// -------------------------------------------------------------------------------------
@@ -304,12 +304,12 @@ struct Group_MDL7
*/
struct Deformer_MDL7
{
- int8_t deformer_version; // 0
- int8_t deformer_typ; // 0 - bones
- int8_t _unused_[2];
- int32_t group_index;
- int32_t elements;
- int32_t deformerdata_size;
+ int8_t deformer_version; // 0
+ int8_t deformer_typ; // 0 - bones
+ int8_t _unused_[2];
+ int32_t group_index;
+ int32_t elements;
+ int32_t deformerdata_size;
} PACK_STRUCT;
@@ -320,9 +320,9 @@ struct Deformer_MDL7
struct DeformerElement_MDL7
{
//! bei deformer_typ==0 (==bones) element_index == bone index
- int32_t element_index;
- char element_name[AI_MDL7_MAX_BONENAMESIZE];
- int32_t weights;
+ int32_t element_index;
+ char element_name[AI_MDL7_MAX_BONENAMESIZE];
+ int32_t weights;
} PACK_STRUCT;
@@ -333,8 +333,8 @@ struct DeformerElement_MDL7
struct DeformerWeight_MDL7
{
//! for deformer_typ==0 (==bones) index == vertex index
- int32_t index;
- float weight;
+ int32_t index;
+ float weight;
} PACK_STRUCT;
@@ -357,19 +357,19 @@ struct ColorValue_MDL7
struct Material_MDL7
{
//! Diffuse base color of the material
- ColorValue_MDL7 Diffuse;
+ ColorValue_MDL7 Diffuse;
//! Ambient base color of the material
- ColorValue_MDL7 Ambient;
+ ColorValue_MDL7 Ambient;
//! Specular base color of the material
- ColorValue_MDL7 Specular;
+ ColorValue_MDL7 Specular;
//! Emissive base color of the material
- ColorValue_MDL7 Emissive;
+ ColorValue_MDL7 Emissive;
//! Phong power
- float Power;
+ float Power;
} PACK_STRUCT;
@@ -410,7 +410,7 @@ struct Skin_MDL5
// maximum length of texture file name
#if (!defined AI_MDL7_MAX_TEXNAMESIZE)
-# define AI_MDL7_MAX_TEXNAMESIZE 0x10
+# define AI_MDL7_MAX_TEXNAMESIZE 0x10
#endif
// ---------------------------------------------------------------------------
@@ -419,11 +419,11 @@ struct Skin_MDL5
*/
struct Skin_MDL7
{
- uint8_t typ;
- int8_t _unused_[3];
- int32_t width;
- int32_t height;
- char texture_name[AI_MDL7_MAX_TEXNAMESIZE];
+ uint8_t typ;
+ int8_t _unused_[3];
+ int32_t width;
+ int32_t height;
+ char texture_name[AI_MDL7_MAX_TEXNAMESIZE];
} PACK_STRUCT;
// -------------------------------------------------------------------------------------
@@ -520,10 +520,10 @@ struct TexCoord_MDL7
struct SkinSet_MDL7
{
//! Index into the UV coordinate list
- uint16_t st_index[3]; // size 6
+ uint16_t st_index[3]; // size 6
//! Material index
- int32_t material; // size 4
+ int32_t material; // size 4
} PACK_STRUCT;
// -------------------------------------------------------------------------------------
@@ -559,28 +559,28 @@ struct Triangle_MDL3
struct Triangle_MDL7
{
//! Vertex indices
- uint16_t v_index[3]; // size 6
+ uint16_t v_index[3]; // size 6
//! Two skinsets. The second will be used for multi-texturing
SkinSet_MDL7 skinsets[2];
} PACK_STRUCT;
#if (!defined AI_MDL7_TRIANGLE_STD_SIZE_ONE_UV)
-# define AI_MDL7_TRIANGLE_STD_SIZE_ONE_UV (6+sizeof(SkinSet_MDL7)-sizeof(uint32_t))
+# define AI_MDL7_TRIANGLE_STD_SIZE_ONE_UV (6+sizeof(SkinSet_MDL7)-sizeof(uint32_t))
#endif
#if (!defined AI_MDL7_TRIANGLE_STD_SIZE_ONE_UV_WITH_MATINDEX)
-# define AI_MDL7_TRIANGLE_STD_SIZE_ONE_UV_WITH_MATINDEX (6+sizeof(SkinSet_MDL7))
+# define AI_MDL7_TRIANGLE_STD_SIZE_ONE_UV_WITH_MATINDEX (6+sizeof(SkinSet_MDL7))
#endif
#if (!defined AI_MDL7_TRIANGLE_STD_SIZE_TWO_UV)
-# define AI_MDL7_TRIANGLE_STD_SIZE_TWO_UV (6+2*sizeof(SkinSet_MDL7))
+# define AI_MDL7_TRIANGLE_STD_SIZE_TWO_UV (6+2*sizeof(SkinSet_MDL7))
#endif
// Helper constants for Triangle::facesfront
#if (!defined AI_MDL_BACKFACE)
-# define AI_MDL_BACKFACE 0x0
+# define AI_MDL_BACKFACE 0x0
#endif
#if (!defined AI_MDL_FRONTFACE)
-# define AI_MDL_FRONTFACE 0x1
+# define AI_MDL_FRONTFACE 0x1
#endif
// -------------------------------------------------------------------------------------
@@ -602,8 +602,8 @@ struct Vertex_MDL4
uint8_t unused;
} PACK_STRUCT;
-#define AI_MDL7_FRAMEVERTEX120503_STCSIZE 16
-#define AI_MDL7_FRAMEVERTEX030305_STCSIZE 26
+#define AI_MDL7_FRAMEVERTEX120503_STCSIZE 16
+#define AI_MDL7_FRAMEVERTEX030305_STCSIZE 26
// -------------------------------------------------------------------------------------
/** \struct Vertex_MDL7
@@ -611,8 +611,8 @@ struct Vertex_MDL4
*/
struct Vertex_MDL7
{
- float x,y,z;
- uint16_t vertindex; // = bone index
+ float x,y,z;
+ uint16_t vertindex; // = bone index
union {
uint8_t norm162index;
float norm[3];
@@ -627,7 +627,7 @@ struct Vertex_MDL7
struct BoneTransform_MDL7
{
//! 4*3
- float m [4*4];
+ float m [4*4];
//! the index of this vertex, 0.. header::bones_num - 1
uint16_t bone_index;
@@ -638,7 +638,7 @@ struct BoneTransform_MDL7
} PACK_STRUCT;
-#define AI_MDL7_MAX_FRAMENAMESIZE 16
+#define AI_MDL7_MAX_FRAMENAMESIZE 16
// -------------------------------------------------------------------------------------
@@ -647,9 +647,9 @@ struct BoneTransform_MDL7
*/
struct Frame_MDL7
{
- char frame_name[AI_MDL7_MAX_FRAMENAMESIZE];
- uint32_t vertices_count;
- uint32_t transmatrix_count;
+ char frame_name[AI_MDL7_MAX_FRAMENAMESIZE];
+ uint32_t vertices_count;
+ uint32_t transmatrix_count;
};
@@ -814,7 +814,7 @@ struct IntFrameInfo_MDL7
unsigned int iIndex;
//! Points to the header of the frame
- BE_NCONST MDL::Frame_MDL7* pcFrame;
+ BE_NCONST MDL::Frame_MDL7* pcFrame;
};
// -------------------------------------------------------------------------------------
@@ -823,33 +823,33 @@ struct IntGroupInfo_MDL7
{
//! Default constructor
IntGroupInfo_MDL7()
- : iIndex(0)
- , pcGroup(NULL)
- , pcGroupUVs(NULL)
- , pcGroupTris(NULL)
- , pcGroupVerts(NULL)
+ : iIndex(0)
+ , pcGroup(NULL)
+ , pcGroupUVs(NULL)
+ , pcGroupTris(NULL)
+ , pcGroupVerts(NULL)
{}
//! Construction from an existing group header
IntGroupInfo_MDL7(BE_NCONST MDL::Group_MDL7* _pcGroup, unsigned int _iIndex)
- : iIndex(_iIndex)
- , pcGroup(_pcGroup)
+ : iIndex(_iIndex)
+ , pcGroup(_pcGroup)
{}
//! Index of the group
unsigned int iIndex;
//! Points to the header of the group
- BE_NCONST MDL::Group_MDL7* pcGroup;
+ BE_NCONST MDL::Group_MDL7* pcGroup;
//! Points to the beginning of the uv coordinate section
- BE_NCONST MDL::TexCoord_MDL7* pcGroupUVs;
+ BE_NCONST MDL::TexCoord_MDL7* pcGroupUVs;
//! Points to the beginning of the triangle section
- BE_NCONST MDL::Triangle_MDL7* pcGroupTris;
+ BE_NCONST MDL::Triangle_MDL7* pcGroupTris;
//! Points to the beginning of the vertex section
- BE_NCONST MDL::Vertex_MDL7* pcGroupVerts;
+ BE_NCONST MDL::Vertex_MDL7* pcGroupVerts;
};
// -------------------------------------------------------------------------------------
@@ -864,19 +864,19 @@ struct IntGroupData_MDL7
MDL::IntFace_MDL7* pcFaces;
//! Array of vertex positions
- std::vector<aiVector3D> vPositions;
+ std::vector<aiVector3D> vPositions;
//! Array of vertex normals
- std::vector<aiVector3D> vNormals;
+ std::vector<aiVector3D> vNormals;
//! Array of bones indices
- std::vector<unsigned int> aiBones;
+ std::vector<unsigned int> aiBones;
//! First UV coordinate set
- std::vector<aiVector3D> vTextureCoords1;
+ std::vector<aiVector3D> vTextureCoords1;
//! Optional second UV coordinate set
- std::vector<aiVector3D> vTextureCoords2;
+ std::vector<aiVector3D> vTextureCoords2;
//! Specifies whether there are two texture
//! coordinate sets required
diff --git a/3rdparty/assimp/code/MDLLoader.cpp b/3rdparty/assimp/code/MDLLoader.cpp
index 5ee9d8509..775e04c36 100644
--- a/3rdparty/assimp/code/MDLLoader.cpp
+++ b/3rdparty/assimp/code/MDLLoader.cpp
@@ -56,13 +56,13 @@ using namespace Assimp;
// ------------------------------------------------------------------------------------------------
// Ugly stuff ... nevermind
-#define _AI_MDL7_ACCESS(_data, _index, _limit, _type) \
+#define _AI_MDL7_ACCESS(_data, _index, _limit, _type) \
(*((const _type*)(((const char*)_data) + _index * _limit)))
-#define _AI_MDL7_ACCESS_PTR(_data, _index, _limit, _type) \
+#define _AI_MDL7_ACCESS_PTR(_data, _index, _limit, _type) \
((BE_NCONST _type*)(((const char*)_data) + _index * _limit))
-#define _AI_MDL7_ACCESS_VERT(_data, _index, _limit) \
+#define _AI_MDL7_ACCESS_VERT(_data, _index, _limit) \
_AI_MDL7_ACCESS(_data,_index,_limit,MDL::Vertex_MDL7)
// ------------------------------------------------------------------------------------------------
@@ -106,7 +106,7 @@ void MDLImporter::SetupProperties(const Importer* pImp)
// The
// AI_CONFIG_IMPORT_MDL_KEYFRAME option overrides the
// AI_CONFIG_IMPORT_GLOBAL_KEYFRAME option.
- if (0xffffffff == configFrameID) {
+ if(0xffffffff == configFrameID) {
configFrameID = pImp->GetPropertyInteger(AI_CONFIG_IMPORT_GLOBAL_KEYFRAME,0);
}
@@ -131,14 +131,14 @@ void MDLImporter::InternReadFile( const std::string& pFile,
boost::scoped_ptr<IOStream> file( pIOHandler->Open( pFile));
// Check whether we can read from the file
- if ( file.get() == NULL) {
+ if( file.get() == NULL) {
throw DeadlyImportError( "Failed to open MDL file " + pFile + ".");
}
// This should work for all other types of MDL files, too ...
// the quake header is one of the smallest, afaik
iFileSize = (unsigned int)file->FileSize();
- if ( iFileSize < sizeof(MDL::Header)) {
+ if( iFileSize < sizeof(MDL::Header)) {
throw DeadlyImportError( "MDL File is too small.");
}
@@ -156,42 +156,42 @@ void MDLImporter::InternReadFile( const std::string& pFile,
// Determine the file subtype and call the appropriate member function
// Original Quake1 format
- if (AI_MDL_MAGIC_NUMBER_BE == iMagicWord || AI_MDL_MAGIC_NUMBER_LE == iMagicWord) {
+ if (AI_MDL_MAGIC_NUMBER_BE == iMagicWord || AI_MDL_MAGIC_NUMBER_LE == iMagicWord) {
DefaultLogger::get()->debug("MDL subtype: Quake 1, magic word is IDPO");
iGSFileVersion = 0;
InternReadFile_Quake1();
}
// GameStudio A<old> MDL2 format - used by some test models that come with 3DGS
- else if (AI_MDL_MAGIC_NUMBER_BE_GS3 == iMagicWord || AI_MDL_MAGIC_NUMBER_LE_GS3 == iMagicWord) {
+ else if (AI_MDL_MAGIC_NUMBER_BE_GS3 == iMagicWord || AI_MDL_MAGIC_NUMBER_LE_GS3 == iMagicWord) {
DefaultLogger::get()->debug("MDL subtype: 3D GameStudio A2, magic word is MDL2");
iGSFileVersion = 2;
InternReadFile_Quake1();
}
// GameStudio A4 MDL3 format
- else if (AI_MDL_MAGIC_NUMBER_BE_GS4 == iMagicWord || AI_MDL_MAGIC_NUMBER_LE_GS4 == iMagicWord) {
+ else if (AI_MDL_MAGIC_NUMBER_BE_GS4 == iMagicWord || AI_MDL_MAGIC_NUMBER_LE_GS4 == iMagicWord) {
DefaultLogger::get()->debug("MDL subtype: 3D GameStudio A4, magic word is MDL3");
iGSFileVersion = 3;
InternReadFile_3DGS_MDL345();
}
// GameStudio A5+ MDL4 format
- else if (AI_MDL_MAGIC_NUMBER_BE_GS5a == iMagicWord || AI_MDL_MAGIC_NUMBER_LE_GS5a == iMagicWord) {
+ else if (AI_MDL_MAGIC_NUMBER_BE_GS5a == iMagicWord || AI_MDL_MAGIC_NUMBER_LE_GS5a == iMagicWord) {
DefaultLogger::get()->debug("MDL subtype: 3D GameStudio A4, magic word is MDL4");
iGSFileVersion = 4;
InternReadFile_3DGS_MDL345();
}
// GameStudio A5+ MDL5 format
- else if (AI_MDL_MAGIC_NUMBER_BE_GS5b == iMagicWord || AI_MDL_MAGIC_NUMBER_LE_GS5b == iMagicWord) {
+ else if (AI_MDL_MAGIC_NUMBER_BE_GS5b == iMagicWord || AI_MDL_MAGIC_NUMBER_LE_GS5b == iMagicWord) {
DefaultLogger::get()->debug("MDL subtype: 3D GameStudio A5, magic word is MDL5");
iGSFileVersion = 5;
InternReadFile_3DGS_MDL345();
}
// GameStudio A7 MDL7 format
- else if (AI_MDL_MAGIC_NUMBER_BE_GS7 == iMagicWord || AI_MDL_MAGIC_NUMBER_LE_GS7 == iMagicWord) {
+ else if (AI_MDL_MAGIC_NUMBER_BE_GS7 == iMagicWord || AI_MDL_MAGIC_NUMBER_LE_GS7 == iMagicWord) {
DefaultLogger::get()->debug("MDL subtype: 3D GameStudio A7, magic word is MDL7");
iGSFileVersion = 7;
InternReadFile_3DGS_MDL7();
}
- // IDST/IDSQ Format (CS:S/HL, etc ...)
+ // IDST/IDSQ Format (CS:S/HL², etc ...)
else if (AI_MDL_MAGIC_NUMBER_BE_HL2a == iMagicWord || AI_MDL_MAGIC_NUMBER_LE_HL2a == iMagicWord ||
AI_MDL_MAGIC_NUMBER_BE_HL2b == iMagicWord || AI_MDL_MAGIC_NUMBER_LE_HL2b == iMagicWord)
{
@@ -199,7 +199,7 @@ void MDLImporter::InternReadFile( const std::string& pFile,
iGSFileVersion = 0;
InternReadFile_HL2();
}
- else {
+ else {
// print the magic word to the log file
throw DeadlyImportError( "Unknown MDL subformat " + pFile +
". Magic word (" + std::string((char*)&iMagicWord,4) + ") is not known");
@@ -235,8 +235,8 @@ void MDLImporter::SizeCheck(const void* szPos, const char* szFile, unsigned int
{
// remove a directory if there is one
const char* szFilePtr = ::strrchr(szFile,'\\');
- if (!szFilePtr) {
- if (!(szFilePtr = ::strrchr(szFile,'/')))
+ if (!szFilePtr) {
+ if(!(szFilePtr = ::strrchr(szFile,'/')))
szFilePtr = szFile;
}
if (szFilePtr)++szFilePtr;
@@ -279,7 +279,7 @@ void MDLImporter::ValidateHeader_Quake1(const MDL::Header* pcHeader)
if (!this->iGSFileVersion && pcHeader->version != AI_MDL_VERSION)
DefaultLogger::get()->warn("Quake 1 MDL model has an unknown version: AI_MDL_VERSION (=6) is "
"the expected file format version");
- if (pcHeader->num_skins && (!pcHeader->skinwidth || !pcHeader->skinheight))
+ if(pcHeader->num_skins && (!pcHeader->skinwidth || !pcHeader->skinheight))
DefaultLogger::get()->warn("Skin width or height are 0");
}
}
@@ -469,7 +469,7 @@ void MDLImporter::InternReadFile_Quake1( )
float t = (float)pcTexCoords[iIndex].t;
// translate texture coordinates
- if (0 == pcTriangles->facesfront && 0 != pcTexCoords[iIndex].onseam) {
+ if (0 == pcTriangles->facesfront && 0 != pcTexCoords[iIndex].onseam) {
s += pcHeader->skinwidth * 0.5f;
}
@@ -503,17 +503,17 @@ void MDLImporter::SetupMaterialProperties_3DGS_MDL5_Quake1( )
pcHelper->AddProperty<int>(&iMode, 1, AI_MATKEY_SHADING_MODEL);
aiColor4D clr;
- if (0 != pcHeader->num_skins && pScene->mNumTextures) {
+ if (0 != pcHeader->num_skins && pScene->mNumTextures) {
// can we replace the texture with a single color?
clr = this->ReplaceTextureWithColor(pScene->mTextures[0]);
- if (is_not_qnan(clr.r)) {
+ if (is_not_qnan(clr.r)) {
delete pScene->mTextures[0];
delete[] pScene->mTextures;
pScene->mTextures = NULL;
pScene->mNumTextures = 0;
}
- else {
+ else {
clr.b = clr.a = clr.g = clr.r = 1.0f;
aiString szString;
::memcpy(szString.data,AI_MAKE_EMBEDDED_TEXNAME(0),3);
@@ -547,7 +547,7 @@ void MDLImporter::InternReadFile_3DGS_MDL345( )
const unsigned char* szCurrent = (const unsigned char*)(pcHeader+1);
// need to read all textures
- for (unsigned int i = 0; i < (unsigned int)pcHeader->num_skins;++i) {
+ for (unsigned int i = 0; i < (unsigned int)pcHeader->num_skins;++i) {
BE_NCONST MDL::Skin* pcSkin;
pcSkin = (BE_NCONST MDL::Skin*)szCurrent;
AI_SWAP4( pcSkin->group);
@@ -559,7 +559,7 @@ void MDLImporter::InternReadFile_3DGS_MDL345( )
CreateTexture_3DGS_MDL5((unsigned char*)pcSkin + sizeof(uint32_t),
pcSkin->group,&iSkip);
}
- else {
+ else {
CreateTexture_3DGS_MDL4((unsigned char*)pcSkin + sizeof(uint32_t),
pcSkin->group,&iSkip);
}
@@ -579,12 +579,12 @@ void MDLImporter::InternReadFile_3DGS_MDL345( )
#ifdef AI_BUILD_BIG_ENDIAN
- for (int i = 0; i<pcHeader->synctype;++i) {
+ for (int i = 0; i<pcHeader->synctype;++i) {
AI_SWAP2( pcTexCoords[i].u );
AI_SWAP2( pcTexCoords[i].v );
}
- for (int i = 0; i<pcHeader->num_tris;++i) {
+ for (int i = 0; i<pcHeader->num_tris;++i) {
AI_SWAP2( pcTriangles[i].index_xyz[0]);
AI_SWAP2( pcTriangles[i].index_xyz[1]);
AI_SWAP2( pcTriangles[i].index_xyz[2]);
@@ -622,7 +622,7 @@ void MDLImporter::InternReadFile_3DGS_MDL345( )
pcMesh->mVertices = new aiVector3D[pcMesh->mNumVertices];
pcMesh->mNormals = new aiVector3D[pcMesh->mNumVertices];
- if (pcHeader->synctype) {
+ if (pcHeader->synctype) {
pcMesh->mTextureCoords[0] = new aiVector3D[pcMesh->mNumVertices];
pcMesh->mNumUVComponents[0] = 2;
}
@@ -634,7 +634,7 @@ void MDLImporter::InternReadFile_3DGS_MDL345( )
// byte packed vertices
// FIXME: these two snippets below are almost identical ... join them?
/////////////////////////////////////////////////////////////////////////////////////
- if (0 == pcFrames->type || 3 >= this->iGSFileVersion) {
+ if (0 == pcFrames->type || 3 >= this->iGSFileVersion) {
const MDL::SimpleFrame* pcFirstFrame = (const MDL::SimpleFrame*)(szCurrent + sizeof(uint32_t));
const MDL::Vertex* pcVertices = (const MDL::Vertex*) ((pcFirstFrame->name) + sizeof(pcFirstFrame->name));
@@ -643,15 +643,15 @@ void MDLImporter::InternReadFile_3DGS_MDL345( )
// now iterate through all triangles
unsigned int iCurrent = 0;
- for (unsigned int i = 0; i < (unsigned int) pcHeader->num_tris;++i) {
+ for (unsigned int i = 0; i < (unsigned int) pcHeader->num_tris;++i) {
pcMesh->mFaces[i].mIndices = new unsigned int[3];
pcMesh->mFaces[i].mNumIndices = 3;
unsigned int iTemp = iCurrent;
- for (unsigned int c = 0; c < 3;++c,++iCurrent) {
+ for (unsigned int c = 0; c < 3;++c,++iCurrent) {
// read vertices
unsigned int iIndex = pcTriangles->index_xyz[c];
- if (iIndex >= (unsigned int)pcHeader->num_verts) {
+ if (iIndex >= (unsigned int)pcHeader->num_verts) {
iIndex = pcHeader->num_verts-1;
DefaultLogger::get()->warn("Index overflow in MDLn vertex list");
}
@@ -672,7 +672,7 @@ void MDLImporter::InternReadFile_3DGS_MDL345( )
// pcMesh->mNormals[iCurrent].y *= -1.0f;
// read texture coordinates
- if (pcHeader->synctype) {
+ if (pcHeader->synctype) {
ImportUVCoordinate_3DGS_MDL345(pcMesh->mTextureCoords[0][iCurrent],
pcTexCoords,pcTriangles->index_uv[c]);
}
@@ -686,7 +686,7 @@ void MDLImporter::InternReadFile_3DGS_MDL345( )
}
// short packed vertices
/////////////////////////////////////////////////////////////////////////////////////
- else {
+ else {
// now get a pointer to the first frame in the file
const MDL::SimpleFrame_MDLn_SP* pcFirstFrame = (const MDL::SimpleFrame_MDLn_SP*) (szCurrent + sizeof(uint32_t));
@@ -698,15 +698,15 @@ void MDLImporter::InternReadFile_3DGS_MDL345( )
// now iterate through all triangles
unsigned int iCurrent = 0;
- for (unsigned int i = 0; i < (unsigned int) pcHeader->num_tris;++i) {
+ for (unsigned int i = 0; i < (unsigned int) pcHeader->num_tris;++i) {
pcMesh->mFaces[i].mIndices = new unsigned int[3];
pcMesh->mFaces[i].mNumIndices = 3;
unsigned int iTemp = iCurrent;
- for (unsigned int c = 0; c < 3;++c,++iCurrent) {
+ for (unsigned int c = 0; c < 3;++c,++iCurrent) {
// read vertices
unsigned int iIndex = pcTriangles->index_xyz[c];
- if (iIndex >= (unsigned int)pcHeader->num_verts) {
+ if (iIndex >= (unsigned int)pcHeader->num_verts) {
iIndex = pcHeader->num_verts-1;
DefaultLogger::get()->warn("Index overflow in MDLn vertex list");
}
@@ -727,7 +727,7 @@ void MDLImporter::InternReadFile_3DGS_MDL345( )
// pcMesh->mNormals[iCurrent].y *= -1.0f;
// read texture coordinates
- if (pcHeader->synctype) {
+ if (pcHeader->synctype) {
ImportUVCoordinate_3DGS_MDL345(pcMesh->mTextureCoords[0][iCurrent],
pcTexCoords,pcTriangles->index_uv[c]);
}
@@ -757,7 +757,7 @@ void MDLImporter::ImportUVCoordinate_3DGS_MDL345(
const MDL::Header* const pcHeader = (const MDL::Header*)this->mBuffer;
// validate UV indices
- if (iIndex >= (unsigned int) pcHeader->synctype) {
+ if (iIndex >= (unsigned int) pcHeader->synctype) {
iIndex = pcHeader->synctype-1;
DefaultLogger::get()->warn("Index overflow in MDLn UV coord list");
}
@@ -766,7 +766,7 @@ void MDLImporter::ImportUVCoordinate_3DGS_MDL345(
float t = (float)pcSrc[iIndex].v;
// Scale s and t to range from 0.0 to 1.0
- if (0x5 != iGSFileVersion) {
+ if (0x5 != iGSFileVersion) {
s = (s + 0.5f) / pcHeader->skinwidth;
t = 1.0f-(t + 0.5f) / pcHeader->skinheight;
}
@@ -781,14 +781,14 @@ void MDLImporter::ImportUVCoordinate_3DGS_MDL345(
void MDLImporter::CalculateUVCoordinates_MDL5()
{
const MDL::Header* const pcHeader = (const MDL::Header*)this->mBuffer;
- if (pcHeader->num_skins && this->pScene->mNumTextures) {
+ if (pcHeader->num_skins && this->pScene->mNumTextures) {
const aiTexture* pcTex = this->pScene->mTextures[0];
// if the file is loaded in DDS format: get the size of the
// texture from the header of the DDS file
// skip three DWORDs and read first height, then the width
unsigned int iWidth, iHeight;
- if (!pcTex->mHeight) {
+ if (!pcTex->mHeight) {
const uint32_t* piPtr = (uint32_t*)pcTex->pcData;
piPtr += 3;
@@ -804,12 +804,12 @@ void MDLImporter::CalculateUVCoordinates_MDL5()
iHeight = 1;
}
}
- else {
+ else {
iWidth = pcTex->mWidth;
iHeight = pcTex->mHeight;
}
- if (1 != iWidth || 1 != iHeight) {
+ if (1 != iWidth || 1 != iHeight) {
const float fWidth = (float)iWidth;
const float fHeight = (float)iHeight;
aiMesh* pcMesh = this->pScene->mMeshes[0];
@@ -830,21 +830,21 @@ void MDLImporter::ValidateHeader_3DGS_MDL7(const MDL::Header_MDL7* pcHeader)
ai_assert(NULL != pcHeader);
// There are some fixed sizes ...
- if (sizeof(MDL::ColorValue_MDL7) != pcHeader->colorvalue_stc_size) {
+ if (sizeof(MDL::ColorValue_MDL7) != pcHeader->colorvalue_stc_size) {
throw DeadlyImportError(
"[3DGS MDL7] sizeof(MDL::ColorValue_MDL7) != pcHeader->colorvalue_stc_size");
}
- if (sizeof(MDL::TexCoord_MDL7) != pcHeader->skinpoint_stc_size) {
+ if (sizeof(MDL::TexCoord_MDL7) != pcHeader->skinpoint_stc_size) {
throw DeadlyImportError(
"[3DGS MDL7] sizeof(MDL::TexCoord_MDL7) != pcHeader->skinpoint_stc_size");
}
- if (sizeof(MDL::Skin_MDL7) != pcHeader->skin_stc_size) {
+ if (sizeof(MDL::Skin_MDL7) != pcHeader->skin_stc_size) {
throw DeadlyImportError(
"sizeof(MDL::Skin_MDL7) != pcHeader->skin_stc_size");
}
// if there are no groups ... how should we load such a file?
- if (!pcHeader->groups_num) {
+ if(!pcHeader->groups_num) {
throw DeadlyImportError( "[3DGS MDL7] No frames found");
}
}
@@ -862,8 +862,8 @@ void MDLImporter::CalcAbsBoneMatrices_3DGS_MDL7(MDL::IntBone_MDL7** apcOutBones)
// index (0) and so on until we can't find a new node.
uint16_t iParent = 0xffff;
uint32_t iIterations = 0;
- while (iIterations++ < pcHeader->bones_num) {
- for (uint32_t iBone = 0; iBone < pcHeader->bones_num;++iBone) {
+ while (iIterations++ < pcHeader->bones_num) {
+ for (uint32_t iBone = 0; iBone < pcHeader->bones_num;++iBone) {
BE_NCONST MDL::Bone_MDL7* pcBone = _AI_MDL7_ACCESS_PTR(pcBones,iBone,
pcHeader->bone_stc_size,MDL::Bone_MDL7);
@@ -872,7 +872,7 @@ void MDLImporter::CalcAbsBoneMatrices_3DGS_MDL7(MDL::IntBone_MDL7** apcOutBones)
AI_SWAP4(pcBone->y);
AI_SWAP4(pcBone->z);
- if (iParent == pcBone->parent_index) {
+ if (iParent == pcBone->parent_index) {
// MDL7 readme
////////////////////////////////////////////////////////////////
/*
@@ -897,7 +897,7 @@ void MDLImporter::CalcAbsBoneMatrices_3DGS_MDL7(MDL::IntBone_MDL7** apcOutBones)
// store the parent index of the bone
pcOutBone->iParent = pcBone->parent_index;
- if (0xffff != iParent) {
+ if (0xffff != iParent) {
const MDL::IntBone_MDL7* pcParentBone = apcOutBones[iParent];
pcOutBone->mOffsetMatrix.a4 = -pcParentBone->vPosition.x;
pcOutBone->mOffsetMatrix.b4 = -pcParentBone->vPosition.y;
@@ -910,18 +910,18 @@ void MDLImporter::CalcAbsBoneMatrices_3DGS_MDL7(MDL::IntBone_MDL7** apcOutBones)
pcOutBone->mOffsetMatrix.b4 -= pcBone->y;
pcOutBone->mOffsetMatrix.c4 -= pcBone->z;
- if (AI_MDL7_BONE_STRUCT_SIZE__NAME_IS_NOT_THERE == pcHeader->bone_stc_size) {
+ if (AI_MDL7_BONE_STRUCT_SIZE__NAME_IS_NOT_THERE == pcHeader->bone_stc_size) {
// no real name for our poor bone is specified :-(
pcOutBone->mName.length = ::sprintf(pcOutBone->mName.data,
"UnnamedBone_%i",iBone);
}
- else {
+ else {
// Make sure we won't run over the buffer's end if there is no
// terminal 0 character (however the documentation says there
// should be one)
uint32_t iMaxLen = pcHeader->bone_stc_size-16;
- for (uint32_t qq = 0; qq < iMaxLen;++qq) {
- if (!pcBone->name[qq]) {
+ for (uint32_t qq = 0; qq < iMaxLen;++qq) {
+ if (!pcBone->name[qq]) {
iMaxLen = qq;
break;
}
@@ -943,7 +943,7 @@ void MDLImporter::CalcAbsBoneMatrices_3DGS_MDL7(MDL::IntBone_MDL7** apcOutBones)
MDL::IntBone_MDL7** MDLImporter::LoadBones_3DGS_MDL7()
{
const MDL::Header_MDL7 *pcHeader = (const MDL::Header_MDL7*)this->mBuffer;
- if (pcHeader->bones_num) {
+ if (pcHeader->bones_num) {
// validate the size of the bone data structure in the file
if (AI_MDL7_BONE_STRUCT_SIZE__NAME_IS_20_CHARS != pcHeader->bone_stc_size &&
AI_MDL7_BONE_STRUCT_SIZE__NAME_IS_32_CHARS != pcHeader->bone_stc_size &&
@@ -974,17 +974,17 @@ void MDLImporter::ReadFaces_3DGS_MDL7(const MDL::IntGroupInfo_MDL7& groupInfo,
// iterate through all triangles and build valid display lists
unsigned int iOutIndex = 0;
- for (unsigned int iTriangle = 0; iTriangle < (unsigned int)groupInfo.pcGroup->numtris; ++iTriangle) {
+ for (unsigned int iTriangle = 0; iTriangle < (unsigned int)groupInfo.pcGroup->numtris; ++iTriangle) {
AI_SWAP2(pcGroupTris->v_index[0]);
AI_SWAP2(pcGroupTris->v_index[1]);
AI_SWAP2(pcGroupTris->v_index[2]);
// iterate through all indices of the current triangle
- for (unsigned int c = 0; c < 3;++c,++iOutIndex) {
+ for (unsigned int c = 0; c < 3;++c,++iOutIndex) {
// validate the vertex index
unsigned int iIndex = pcGroupTris->v_index[c];
- if (iIndex > (unsigned int)groupInfo.pcGroup->numverts) {
+ if(iIndex > (unsigned int)groupInfo.pcGroup->numverts) {
// (we might need to read this section a second time - to process frame vertices correctly)
const_cast<MDL::Triangle_MDL7*>(pcGroupTris)->v_index[c] = iIndex = groupInfo.pcGroup->numverts-1;
DefaultLogger::get()->warn("Index overflow in MDL7 vertex list");
@@ -1005,7 +1005,7 @@ void MDLImporter::ReadFaces_3DGS_MDL7(const MDL::IntGroupInfo_MDL7& groupInfo,
}
// now read the normal vector
- if (AI_MDL7_FRAMEVERTEX030305_STCSIZE <= pcHeader->mainvertex_stc_size) {
+ if (AI_MDL7_FRAMEVERTEX030305_STCSIZE <= pcHeader->mainvertex_stc_size) {
// read the full normal vector
aiVector3D& vNormal = groupData.vNormals[ iOutIndex ];
vNormal.x = _AI_MDL7_ACCESS_VERT(groupInfo.pcGroupVerts,iIndex,pcHeader->mainvertex_stc_size) .norm[0];
@@ -1015,22 +1015,22 @@ void MDLImporter::ReadFaces_3DGS_MDL7(const MDL::IntGroupInfo_MDL7& groupInfo,
vNormal.z = _AI_MDL7_ACCESS_VERT(groupInfo.pcGroupVerts,iIndex,pcHeader->mainvertex_stc_size) .norm[2];
AI_SWAP4(vNormal.z);
}
- else if (AI_MDL7_FRAMEVERTEX120503_STCSIZE <= pcHeader->mainvertex_stc_size) {
+ else if (AI_MDL7_FRAMEVERTEX120503_STCSIZE <= pcHeader->mainvertex_stc_size) {
// read the normal vector from Quake2's smart table
aiVector3D& vNormal = groupData.vNormals[ iOutIndex ];
MD2::LookupNormalIndex(_AI_MDL7_ACCESS_VERT(groupInfo.pcGroupVerts,iIndex,
pcHeader->mainvertex_stc_size) .norm162index,vNormal);
}
// validate and process the first uv coordinate set
- if (pcHeader->triangle_stc_size >= AI_MDL7_TRIANGLE_STD_SIZE_ONE_UV) {
+ if (pcHeader->triangle_stc_size >= AI_MDL7_TRIANGLE_STD_SIZE_ONE_UV) {
- if (groupInfo.pcGroup->num_stpts) {
+ if (groupInfo.pcGroup->num_stpts) {
AI_SWAP2(pcGroupTris->skinsets[0].st_index[0]);
AI_SWAP2(pcGroupTris->skinsets[0].st_index[1]);
AI_SWAP2(pcGroupTris->skinsets[0].st_index[2]);
iIndex = pcGroupTris->skinsets[0].st_index[c];
- if (iIndex > (unsigned int)groupInfo.pcGroup->num_stpts) {
+ if(iIndex > (unsigned int)groupInfo.pcGroup->num_stpts) {
iIndex = groupInfo.pcGroup->num_stpts-1;
DefaultLogger::get()->warn("Index overflow in MDL7 UV coordinate list (#1)");
}
@@ -1048,16 +1048,16 @@ void MDLImporter::ReadFaces_3DGS_MDL7(const MDL::IntGroupInfo_MDL7& groupInfo,
}
}
// validate and process the second uv coordinate set
- if (pcHeader->triangle_stc_size >= AI_MDL7_TRIANGLE_STD_SIZE_TWO_UV) {
+ if (pcHeader->triangle_stc_size >= AI_MDL7_TRIANGLE_STD_SIZE_TWO_UV) {
- if (groupInfo.pcGroup->num_stpts) {
+ if (groupInfo.pcGroup->num_stpts) {
AI_SWAP2(pcGroupTris->skinsets[1].st_index[0]);
AI_SWAP2(pcGroupTris->skinsets[1].st_index[1]);
AI_SWAP2(pcGroupTris->skinsets[1].st_index[2]);
AI_SWAP4(pcGroupTris->skinsets[1].material);
iIndex = pcGroupTris->skinsets[1].st_index[c];
- if (iIndex > (unsigned int)groupInfo.pcGroup->num_stpts) {
+ if(iIndex > (unsigned int)groupInfo.pcGroup->num_stpts) {
iIndex = groupInfo.pcGroup->num_stpts-1;
DefaultLogger::get()->warn("Index overflow in MDL7 UV coordinate list (#2)");
}
@@ -1101,7 +1101,7 @@ bool MDLImporter::ProcessFrames_3DGS_MDL7(const MDL::IntGroupInfo_MDL7& groupInf
// if we have no bones we can simply skip all frames,
// otherwise we'll need to process them.
// FIX: If we need another frame than the first we must apply frame vertex replacements ...
- for (unsigned int iFrame = 0; iFrame < (unsigned int)groupInfo.pcGroup->numframes;++iFrame) {
+ for(unsigned int iFrame = 0; iFrame < (unsigned int)groupInfo.pcGroup->numframes;++iFrame) {
MDL::IntFrameInfo_MDL7 frame ((BE_NCONST MDL::Frame_MDL7*)szCurrent,iFrame);
AI_SWAP4(frame.pcFrame->vertices_count);
@@ -1111,7 +1111,7 @@ bool MDLImporter::ProcessFrames_3DGS_MDL7(const MDL::IntGroupInfo_MDL7& groupInf
frame.pcFrame->vertices_count * pcHeader->framevertex_stc_size +
frame.pcFrame->transmatrix_count * pcHeader->bonetrans_stc_size;
- if (((const char*)szCurrent - (const char*)pcHeader) + iAdd > (unsigned int)pcHeader->data_size) {
+ if (((const char*)szCurrent - (const char*)pcHeader) + iAdd > (unsigned int)pcHeader->data_size) {
DefaultLogger::get()->warn("Index overflow in frame area. "
"Ignoring all frames and all further mesh groups, too.");
@@ -1121,15 +1121,15 @@ bool MDLImporter::ProcessFrames_3DGS_MDL7(const MDL::IntGroupInfo_MDL7& groupInf
return false;
}
// our output frame?
- if (configFrameID == iFrame) {
+ if (configFrameID == iFrame) {
BE_NCONST MDL::Vertex_MDL7* pcFrameVertices = (BE_NCONST MDL::Vertex_MDL7*)(szCurrent+pcHeader->frame_stc_size);
- for (unsigned int qq = 0; qq < frame.pcFrame->vertices_count;++qq) {
+ for (unsigned int qq = 0; qq < frame.pcFrame->vertices_count;++qq) {
// I assume this are simple replacements for normal vertices, the bone index serving
// as the index of the vertex to be replaced.
uint16_t iIndex = _AI_MDL7_ACCESS(pcFrameVertices,qq,pcHeader->framevertex_stc_size,MDL::Vertex_MDL7).vertindex;
AI_SWAP2(iIndex);
- if (iIndex >= groupInfo.pcGroup->numverts) {
+ if (iIndex >= groupInfo.pcGroup->numverts) {
DefaultLogger::get()->warn("Invalid vertex index in frame vertex section");
continue;
}
@@ -1144,7 +1144,7 @@ bool MDLImporter::ProcessFrames_3DGS_MDL7(const MDL::IntGroupInfo_MDL7& groupInf
AI_SWAP4(vPosition.z);
// now read the normal vector
- if (AI_MDL7_FRAMEVERTEX030305_STCSIZE <= pcHeader->mainvertex_stc_size) {
+ if (AI_MDL7_FRAMEVERTEX030305_STCSIZE <= pcHeader->mainvertex_stc_size) {
// read the full normal vector
vNormal.x = _AI_MDL7_ACCESS_VERT(pcFrameVertices,qq,pcHeader->framevertex_stc_size) .norm[0];
AI_SWAP4(vNormal.x);
@@ -1153,7 +1153,7 @@ bool MDLImporter::ProcessFrames_3DGS_MDL7(const MDL::IntGroupInfo_MDL7& groupInf
vNormal.z = _AI_MDL7_ACCESS_VERT(pcFrameVertices,qq,pcHeader->framevertex_stc_size) .norm[2];
AI_SWAP4(vNormal.z);
}
- else if (AI_MDL7_FRAMEVERTEX120503_STCSIZE <= pcHeader->mainvertex_stc_size) {
+ else if (AI_MDL7_FRAMEVERTEX120503_STCSIZE <= pcHeader->mainvertex_stc_size) {
// read the normal vector from Quake2's smart table
MD2::LookupNormalIndex(_AI_MDL7_ACCESS_VERT(pcFrameVertices,qq,
pcHeader->framevertex_stc_size) .norm162index,vNormal);
@@ -1162,12 +1162,12 @@ bool MDLImporter::ProcessFrames_3DGS_MDL7(const MDL::IntGroupInfo_MDL7& groupInf
// FIXME: O(n^2) at the moment ...
BE_NCONST MDL::Triangle_MDL7* pcGroupTris = groupInfo.pcGroupTris;
unsigned int iOutIndex = 0;
- for (unsigned int iTriangle = 0; iTriangle < (unsigned int)groupInfo.pcGroup->numtris; ++iTriangle) {
+ for (unsigned int iTriangle = 0; iTriangle < (unsigned int)groupInfo.pcGroup->numtris; ++iTriangle) {
// iterate through all indices of the current triangle
- for (unsigned int c = 0; c < 3;++c,++iOutIndex) {
+ for (unsigned int c = 0; c < 3;++c,++iOutIndex) {
// replace the vertex with the new data
const unsigned int iCurIndex = pcGroupTris->v_index[c];
- if (iCurIndex == iIndex) {
+ if (iCurIndex == iIndex) {
groupData.vPositions[iOutIndex] = vPosition;
groupData.vNormals[iOutIndex] = vNormal;
}
@@ -1196,7 +1196,7 @@ void MDLImporter::SortByMaterials_3DGS_MDL7(
MDL::IntSplittedGroupData_MDL7& splittedGroupData)
{
const unsigned int iNumMaterials = (unsigned int)splittedGroupData.shared.pcMats.size();
- if (!groupData.bNeed2UV) {
+ if (!groupData.bNeed2UV) {
// if we don't need a second set of texture coordinates there is no reason to keep it in memory ...
groupData.vTextureCoords2.clear();
@@ -1207,15 +1207,15 @@ void MDLImporter::SortByMaterials_3DGS_MDL7(
splittedGroupData.aiSplit[m] = new std::vector<unsigned int>();
// iterate through all faces and sort by material
- for (unsigned int iFace = 0; iFace < (unsigned int)groupInfo.pcGroup->numtris;++iFace) {
+ for (unsigned int iFace = 0; iFace < (unsigned int)groupInfo.pcGroup->numtris;++iFace) {
// check range
- if (groupData.pcFaces[iFace].iMatIndex[0] >= iNumMaterials) {
+ if (groupData.pcFaces[iFace].iMatIndex[0] >= iNumMaterials) {
// use the last material instead
splittedGroupData.aiSplit[iNumMaterials-1]->push_back(iFace);
// sometimes MED writes -1, but normally only if there is only
// one skin assigned. No warning in this case
- if (0xFFFFFFFF != groupData.pcFaces[iFace].iMatIndex[0])
+ if(0xFFFFFFFF != groupData.pcFaces[iFace].iMatIndex[0])
DefaultLogger::get()->warn("Index overflow in MDL7 material list [#0]");
}
else splittedGroupData.aiSplit[groupData.pcFaces[iFace].
@@ -1234,21 +1234,21 @@ void MDLImporter::SortByMaterials_3DGS_MDL7(
aiTempSplit[m] = new std::vector<unsigned int>();
// iterate through all faces and sort by material
- for (unsigned int iFace = 0; iFace < (unsigned int)groupInfo.pcGroup->numtris;++iFace) {
+ for (unsigned int iFace = 0; iFace < (unsigned int)groupInfo.pcGroup->numtris;++iFace) {
// check range
unsigned int iMatIndex = groupData.pcFaces[iFace].iMatIndex[0];
- if (iMatIndex >= iNumMaterials) {
+ if (iMatIndex >= iNumMaterials) {
// sometimes MED writes -1, but normally only if there is only
// one skin assigned. No warning in this case
- if (0xffffffff != iMatIndex)
+ if(0xffffffff != iMatIndex)
DefaultLogger::get()->warn("Index overflow in MDL7 material list [#1]");
iMatIndex = iNumMaterials-1;
}
unsigned int iMatIndex2 = groupData.pcFaces[iFace].iMatIndex[1];
unsigned int iNum = iMatIndex;
- if (0xffffffff != iMatIndex2 && iMatIndex != iMatIndex2) {
- if (iMatIndex2 >= iNumMaterials) {
+ if (0xffffffff != iMatIndex2 && iMatIndex != iMatIndex2) {
+ if (iMatIndex2 >= iNumMaterials) {
// sometimes MED writes -1, but normally only if there is only
// one skin assigned. No warning in this case
DefaultLogger::get()->warn("Index overflow in MDL7 material list [#2]");
@@ -1259,13 +1259,13 @@ void MDLImporter::SortByMaterials_3DGS_MDL7(
iNum = 0;
bool bFound = false;
for (std::vector<MDL::IntMaterial_MDL7>::iterator i = avMats.begin();i != avMats.end();++i,++iNum){
- if ((*i).iOldMatIndices[0] == iMatIndex && (*i).iOldMatIndices[1] == iMatIndex2) {
+ if ((*i).iOldMatIndices[0] == iMatIndex && (*i).iOldMatIndices[1] == iMatIndex2) {
// reuse this material
bFound = true;
break;
}
}
- if (!bFound) {
+ if (!bFound) {
// build a new material ...
MDL::IntMaterial_MDL7 sHelper;
sHelper.pcMat = new MaterialHelper();
@@ -1287,12 +1287,12 @@ void MDLImporter::SortByMaterials_3DGS_MDL7(
}
// now add the newly created materials to the old list
- if (0 == groupInfo.iIndex) {
+ if (0 == groupInfo.iIndex) {
splittedGroupData.shared.pcMats.resize(avMats.size());
for (unsigned int o = 0; o < avMats.size();++o)
splittedGroupData.shared.pcMats[o] = avMats[o].pcMat;
}
- else {
+ else {
// This might result in redundant materials ...
splittedGroupData.shared.pcMats.resize(iNumMaterials + avMats.size());
for (unsigned int o = iNumMaterials; o < avMats.size();++o)
@@ -1357,7 +1357,7 @@ void MDLImporter::InternReadFile_3DGS_MDL7( )
char* aszGroupNameBuffer = new char[AI_MDL7_MAX_GROUPNAMESIZE*pcHeader->groups_num];
// read all groups
- for (unsigned int iGroup = 0; iGroup < (unsigned int)pcHeader->groups_num;++iGroup) {
+ for (unsigned int iGroup = 0; iGroup < (unsigned int)pcHeader->groups_num;++iGroup) {
MDL::IntGroupInfo_MDL7 groupInfo((BE_NCONST MDL::Group_MDL7*)szCurrent,iGroup);
szCurrent = (const unsigned char*)(groupInfo.pcGroup+1);
@@ -1370,7 +1370,7 @@ void MDLImporter::InternReadFile_3DGS_MDL7( )
AI_SWAP4(groupInfo.pcGroup->numverts);
AI_SWAP4(groupInfo.pcGroup->numframes);
- if (1 != groupInfo.pcGroup->typ) {
+ if (1 != groupInfo.pcGroup->typ) {
// Not a triangle-based mesh
DefaultLogger::get()->warn("[3DGS MDL7] Not a triangle mesh group. Continuing happily");
}
@@ -1388,11 +1388,11 @@ void MDLImporter::InternReadFile_3DGS_MDL7( )
sharedData.abNeedMaterials.resize(sharedData.abNeedMaterials.size() +
groupInfo.pcGroup->numskins,false);
- for (unsigned int iSkin = 0; iSkin < (unsigned int)groupInfo.pcGroup->numskins;++iSkin) {
+ for (unsigned int iSkin = 0; iSkin < (unsigned int)groupInfo.pcGroup->numskins;++iSkin) {
ParseSkinLump_3DGS_MDL7(szCurrent,&szCurrent,sharedData.pcMats);
}
// if we have absolutely no skin loaded we need to generate a default material
- if (sharedData.pcMats.empty()) {
+ if (sharedData.pcMats.empty()) {
const int iMode = (int)aiShadingMode_Gouraud;
sharedData.pcMats.push_back(new MaterialHelper());
MaterialHelper* pcHelper = (MaterialHelper*)sharedData.pcMats[0];
@@ -1415,7 +1415,7 @@ void MDLImporter::InternReadFile_3DGS_MDL7( )
// now get a pointer to all texture coords in the group
groupInfo.pcGroupUVs = (BE_NCONST MDL::TexCoord_MDL7*)szCurrent;
- for (int i = 0; i < groupInfo.pcGroup->num_stpts; ++i){
+ for(int i = 0; i < groupInfo.pcGroup->num_stpts; ++i){
AI_SWAP4(groupInfo.pcGroupUVs[i].u);
AI_SWAP4(groupInfo.pcGroupUVs[i].v);
}
@@ -1427,7 +1427,7 @@ void MDLImporter::InternReadFile_3DGS_MDL7( )
// now get a pointer to all vertices in the group
groupInfo.pcGroupVerts = (BE_NCONST MDL::Vertex_MDL7*)szCurrent;
- for (int i = 0; i < groupInfo.pcGroup->numverts; ++i){
+ for(int i = 0; i < groupInfo.pcGroup->numverts; ++i){
AI_SWAP4(groupInfo.pcGroupVerts[i].x);
AI_SWAP4(groupInfo.pcGroupVerts[i].y);
AI_SWAP4(groupInfo.pcGroupVerts[i].z);
@@ -1455,7 +1455,7 @@ void MDLImporter::InternReadFile_3DGS_MDL7( )
// check whether the triangle data structure is large enough
// to contain a second UV coodinate set
- if (pcHeader->triangle_stc_size >= AI_MDL7_TRIANGLE_STD_SIZE_TWO_UV) {
+ if (pcHeader->triangle_stc_size >= AI_MDL7_TRIANGLE_STD_SIZE_TWO_UV) {
groupData.vTextureCoords2.resize(iNumVertices,aiVector3D());
groupData.bNeed2UV = true;
}
@@ -1469,7 +1469,7 @@ void MDLImporter::InternReadFile_3DGS_MDL7( )
SortByMaterials_3DGS_MDL7(groupInfo, groupData,
splittedGroupData);
- for (unsigned int qq = 0; qq < sharedData.pcMats.size();++qq) {
+ for (unsigned int qq = 0; qq < sharedData.pcMats.size();++qq) {
if (!splittedGroupData.aiSplit[qq]->empty())
sharedData.abNeedMaterials[qq] = true;
}
@@ -1489,10 +1489,10 @@ void MDLImporter::InternReadFile_3DGS_MDL7( )
for (uint32_t i = 0; i < pcHeader->groups_num;++i)
pScene->mNumMeshes += (unsigned int)avOutList[i].size();
- pScene->mMeshes = new aiMesh*[pScene->mNumMeshes]; {
+ pScene->mMeshes = new aiMesh*[pScene->mNumMeshes]; {
unsigned int p = 0,q = 0;
- for (uint32_t i = 0; i < pcHeader->groups_num;++i) {
- for (unsigned int a = 0; a < avOutList[i].size();++a) {
+ for (uint32_t i = 0; i < pcHeader->groups_num;++i) {
+ for (unsigned int a = 0; a < avOutList[i].size();++a) {
pScene->mMeshes[p++] = avOutList[i][a];
}
if (!avOutList[i].empty())++pScene->mRootNode->mNumChildren;
@@ -1501,7 +1501,7 @@ void MDLImporter::InternReadFile_3DGS_MDL7( )
if (sharedData.apcOutBones)++pScene->mRootNode->mNumChildren;
this->pScene->mRootNode->mChildren = new aiNode*[pScene->mRootNode->mNumChildren];
p = 0;
- for (uint32_t i = 0; i < pcHeader->groups_num;++i) {
+ for (uint32_t i = 0; i < pcHeader->groups_num;++i) {
if (avOutList[i].empty())continue;
aiNode* const pcNode = pScene->mRootNode->mChildren[p] = new aiNode();
@@ -1523,7 +1523,7 @@ void MDLImporter::InternReadFile_3DGS_MDL7( )
}
// if there is only one root node with a single child we can optimize it a bit ...
- if (1 == pScene->mRootNode->mNumChildren && !sharedData.apcOutBones) {
+ if (1 == pScene->mRootNode->mNumChildren && !sharedData.apcOutBones) {
aiNode* pcOldRoot = this->pScene->mRootNode;
pScene->mRootNode = pcOldRoot->mChildren[0];
pcOldRoot->mChildren[0] = NULL;
@@ -1542,7 +1542,7 @@ void MDLImporter::InternReadFile_3DGS_MDL7( )
HandleMaterialReferences_3DGS_MDL7();
// generate output bone animations and add all bones to the scenegraph
- if (sharedData.apcOutBones) {
+ if (sharedData.apcOutBones) {
// this step adds empty dummy bones to the nodegraph
// insert another dummy node to avoid name conflicts
aiNode* const pc = pScene->mRootNode->mChildren[pScene->mRootNode->mNumChildren-1] = new aiNode();
@@ -1575,10 +1575,10 @@ void MDLImporter::CopyMaterials_3DGS_MDL7(MDL::IntSharedData_MDL7 &shared)
void MDLImporter::HandleMaterialReferences_3DGS_MDL7()
{
// search for referrer materials
- for (unsigned int i = 0; i < pScene->mNumMaterials;++i) {
+ for (unsigned int i = 0; i < pScene->mNumMaterials;++i) {
int iIndex = 0;
- if (AI_SUCCESS == aiGetMaterialInteger(pScene->mMaterials[i],AI_MDL7_REFERRER_MATERIAL, &iIndex) ) {
- for (unsigned int a = 0; a < pScene->mNumMeshes;++a) {
+ if (AI_SUCCESS == aiGetMaterialInteger(pScene->mMaterials[i],AI_MDL7_REFERRER_MATERIAL, &iIndex) ) {
+ for (unsigned int a = 0; a < pScene->mNumMeshes;++a) {
aiMesh* const pcMesh = pScene->mMeshes[a];
if (i == pcMesh->mMaterialIndex) {
pcMesh->mMaterialIndex = iIndex;
@@ -1586,10 +1586,10 @@ void MDLImporter::HandleMaterialReferences_3DGS_MDL7()
}
// collapse the rest of the array
delete pScene->mMaterials[i];
- for (unsigned int pp = i; pp < pScene->mNumMaterials-1;++pp) {
+ for (unsigned int pp = i; pp < pScene->mNumMaterials-1;++pp) {
pScene->mMaterials[pp] = pScene->mMaterials[pp+1];
- for (unsigned int a = 0; a < pScene->mNumMeshes;++a) {
+ for (unsigned int a = 0; a < pScene->mNumMeshes;++a) {
aiMesh* const pcMesh = pScene->mMeshes[a];
if (pcMesh->mMaterialIndex > i)--pcMesh->mMaterialIndex;
}
@@ -1609,20 +1609,20 @@ void MDLImporter::ParseBoneTrafoKeys_3DGS_MDL7(
const MDL::Header_MDL7* const pcHeader = (const MDL::Header_MDL7*)this->mBuffer;
// only the first group contains bone animation keys
- if (frame.pcFrame->transmatrix_count) {
- if (!groupInfo.iIndex) {
+ if (frame.pcFrame->transmatrix_count) {
+ if (!groupInfo.iIndex) {
// skip all frames vertices. We can't support them
const MDL::BoneTransform_MDL7* pcBoneTransforms = (const MDL::BoneTransform_MDL7*)
(((const char*)frame.pcFrame) + pcHeader->frame_stc_size +
frame.pcFrame->vertices_count * pcHeader->framevertex_stc_size);
// read all transformation matrices
- for (unsigned int iTrafo = 0; iTrafo < frame.pcFrame->transmatrix_count;++iTrafo) {
- if (pcBoneTransforms->bone_index >= pcHeader->bones_num) {
+ for (unsigned int iTrafo = 0; iTrafo < frame.pcFrame->transmatrix_count;++iTrafo) {
+ if(pcBoneTransforms->bone_index >= pcHeader->bones_num) {
DefaultLogger::get()->warn("Index overflow in frame area. "
"Unable to parse this bone transformation");
}
- else {
+ else {
AddAnimationBoneTrafoKey_3DGS_MDL7(frame.iIndex,
pcBoneTransforms,shared.apcOutBones);
}
@@ -1630,7 +1630,7 @@ void MDLImporter::ParseBoneTrafoKeys_3DGS_MDL7(
(const char*)pcBoneTransforms + pcHeader->bonetrans_stc_size);
}
}
- else {
+ else {
DefaultLogger::get()->warn("Ignoring animation keyframes in groups != 0");
}
}
@@ -1647,7 +1647,7 @@ void MDLImporter::AddBonesToNodeGraph_3DGS_MDL7(const MDL::IntBone_MDL7** apcBon
const MDL::Header_MDL7* const pcHeader = (const MDL::Header_MDL7*)this->mBuffer;
const MDL::IntBone_MDL7** apcBones2 = apcBones;
- for (uint32_t i = 0; i < pcHeader->bones_num;++i) {
+ for (uint32_t i = 0; i < pcHeader->bones_num;++i) {
const MDL::IntBone_MDL7* const pcBone = *apcBones2++;
if (pcBone->iParent == iParentIndex) {
@@ -1656,7 +1656,7 @@ void MDLImporter::AddBonesToNodeGraph_3DGS_MDL7(const MDL::IntBone_MDL7** apcBon
}
pcParent->mChildren = new aiNode*[pcParent->mNumChildren];
unsigned int qq = 0;
- for (uint32_t i = 0; i < pcHeader->bones_num;++i) {
+ for (uint32_t i = 0; i < pcHeader->bones_num;++i) {
const MDL::IntBone_MDL7* const pcBone = *apcBones++;
if (pcBone->iParent != iParentIndex)continue;
@@ -1678,23 +1678,23 @@ void MDLImporter::BuildOutputAnims_3DGS_MDL7(
// one animation ...
aiAnimation* pcAnim = new aiAnimation();
- for (uint32_t i = 0; i < pcHeader->bones_num;++i) {
- if (!apcBonesOut[i]->pkeyPositions.empty()) {
+ for (uint32_t i = 0; i < pcHeader->bones_num;++i) {
+ if (!apcBonesOut[i]->pkeyPositions.empty()) {
// get the last frame ... (needn't be equal to pcHeader->frames_num)
- for (size_t qq = 0; qq < apcBonesOut[i]->pkeyPositions.size();++qq) {
+ for (size_t qq = 0; qq < apcBonesOut[i]->pkeyPositions.size();++qq) {
pcAnim->mDuration = std::max(pcAnim->mDuration, (double)
apcBonesOut[i]->pkeyPositions[qq].mTime);
}
++pcAnim->mNumChannels;
}
}
- if (pcAnim->mDuration) {
+ if (pcAnim->mDuration) {
pcAnim->mChannels = new aiNodeAnim*[pcAnim->mNumChannels];
unsigned int iCnt = 0;
- for (uint32_t i = 0; i < pcHeader->bones_num;++i) {
- if (!apcBonesOut[i]->pkeyPositions.empty()) {
+ for (uint32_t i = 0; i < pcHeader->bones_num;++i) {
+ if (!apcBonesOut[i]->pkeyPositions.empty()) {
const MDL::IntBone_MDL7* const intBone = apcBonesOut[i];
aiNodeAnim* const pcNodeAnim = pcAnim->mChannels[iCnt++] = new aiNodeAnim();
@@ -1710,7 +1710,7 @@ void MDLImporter::BuildOutputAnims_3DGS_MDL7(
pcNodeAnim->mRotationKeys = new aiQuatKey[pcNodeAnim->mNumPositionKeys];
// copy all keys
- for (unsigned int qq = 0; qq < pcNodeAnim->mNumPositionKeys;++qq) {
+ for (unsigned int qq = 0; qq < pcNodeAnim->mNumPositionKeys;++qq) {
pcNodeAnim->mPositionKeys[qq] = intBone->pkeyPositions[qq];
pcNodeAnim->mScalingKeys[qq] = intBone->pkeyScalings[qq];
pcNodeAnim->mRotationKeys[qq] = intBone->pkeyRotations[qq];
@@ -1764,9 +1764,9 @@ void MDLImporter::AddAnimationBoneTrafoKey_3DGS_MDL7(unsigned int iTrafo,
// add the keys to the bone
MDL::IntBone_MDL7* const pcBoneOut = apcBonesOut[pcBoneTransforms->bone_index];
- pcBoneOut->pkeyPositions.push_back ( vPosition );
- pcBoneOut->pkeyScalings.push_back ( vScaling );
- pcBoneOut->pkeyRotations.push_back ( qRotation );
+ pcBoneOut->pkeyPositions.push_back ( vPosition );
+ pcBoneOut->pkeyScalings.push_back ( vScaling );
+ pcBoneOut->pkeyRotations.push_back ( qRotation );
}
// ------------------------------------------------------------------------------------------------
@@ -1781,8 +1781,8 @@ void MDLImporter::GenerateOutputMeshes_3DGS_MDL7(
const MDL::Header_MDL7* const pcHeader = (const MDL::Header_MDL7*)this->mBuffer;
const unsigned int iNumOutBones = pcHeader->bones_num;
- for (std::vector<MaterialHelper*>::size_type i = 0; i < shared.pcMats.size();++i) {
- if (!splittedGroupData.aiSplit[i]->empty()) {
+ for (std::vector<MaterialHelper*>::size_type i = 0; i < shared.pcMats.size();++i) {
+ if (!splittedGroupData.aiSplit[i]->empty()) {
// allocate the output mesh
aiMesh* pcMesh = new aiMesh();
@@ -1798,10 +1798,10 @@ void MDLImporter::GenerateOutputMeshes_3DGS_MDL7(
pcMesh->mVertices = new aiVector3D[pcMesh->mNumVertices];
pcMesh->mNormals = new aiVector3D[pcMesh->mNumVertices];
- if (!groupData.vTextureCoords1.empty()) {
+ if (!groupData.vTextureCoords1.empty()) {
pcMesh->mNumUVComponents[0] = 2;
pcMesh->mTextureCoords[0] = new aiVector3D[pcMesh->mNumVertices];
- if (!groupData.vTextureCoords2.empty()) {
+ if (!groupData.vTextureCoords2.empty()) {
pcMesh->mNumUVComponents[1] = 2;
pcMesh->mTextureCoords[1] = new aiVector3D[pcMesh->mNumVertices];
}
@@ -1809,7 +1809,7 @@ void MDLImporter::GenerateOutputMeshes_3DGS_MDL7(
// iterate through all faces and build an unique set of vertices
unsigned int iCurrent = 0;
- for (unsigned int iFace = 0; iFace < pcMesh->mNumFaces;++iFace) {
+ for (unsigned int iFace = 0; iFace < pcMesh->mNumFaces;++iFace) {
pcMesh->mFaces[iFace].mNumIndices = 3;
pcMesh->mFaces[iFace].mIndices = new unsigned int[3];
@@ -1817,15 +1817,15 @@ void MDLImporter::GenerateOutputMeshes_3DGS_MDL7(
const MDL::IntFace_MDL7& oldFace = groupData.pcFaces[iSrcFace];
// iterate through all face indices
- for (unsigned int c = 0; c < 3;++c) {
+ for (unsigned int c = 0; c < 3;++c) {
const uint32_t iIndex = oldFace.mIndices[c];
pcMesh->mVertices[iCurrent] = groupData.vPositions[iIndex];
pcMesh->mNormals[iCurrent] = groupData.vNormals[iIndex];
- if (!groupData.vTextureCoords1.empty()) {
+ if (!groupData.vTextureCoords1.empty()) {
pcMesh->mTextureCoords[0][iCurrent] = groupData.vTextureCoords1[iIndex];
- if (!groupData.vTextureCoords2.empty()) {
+ if (!groupData.vTextureCoords2.empty()) {
pcMesh->mTextureCoords[1][iCurrent] = groupData.vTextureCoords2[iIndex];
}
}
@@ -1835,20 +1835,20 @@ void MDLImporter::GenerateOutputMeshes_3DGS_MDL7(
// if we have bones in the mesh we'll need to generate
// proper vertex weights for them
- if (!groupData.aiBones.empty()) {
+ if (!groupData.aiBones.empty()) {
std::vector<std::vector<unsigned int> > aaiVWeightList;
aaiVWeightList.resize(iNumOutBones);
int iCurrent = 0;
- for (unsigned int iFace = 0; iFace < pcMesh->mNumFaces;++iFace) {
+ for (unsigned int iFace = 0; iFace < pcMesh->mNumFaces;++iFace) {
unsigned int iSrcFace = splittedGroupData.aiSplit[i]->operator[](iFace);
const MDL::IntFace_MDL7& oldFace = groupData.pcFaces[iSrcFace];
// iterate through all face indices
- for (unsigned int c = 0; c < 3;++c) {
+ for (unsigned int c = 0; c < 3;++c) {
unsigned int iBone = groupData.aiBones[ oldFace.mIndices[c] ];
- if (0xffffffff != iBone) {
- if (iBone >= iNumOutBones) {
+ if (0xffffffff != iBone) {
+ if (iBone >= iNumOutBones) {
DefaultLogger::get()->error("Bone index overflow. "
"The bone index of a vertex exceeds the allowed range. ");
iBone = iNumOutBones-1;
@@ -1859,7 +1859,7 @@ void MDLImporter::GenerateOutputMeshes_3DGS_MDL7(
}
}
// now check which bones are required ...
- for (std::vector<std::vector<unsigned int> >::const_iterator k = aaiVWeightList.begin();k != aaiVWeightList.end();++k) {
+ for (std::vector<std::vector<unsigned int> >::const_iterator k = aaiVWeightList.begin();k != aaiVWeightList.end();++k) {
if (!(*k).empty()) {
++pcMesh->mNumBones;
}
@@ -1880,7 +1880,7 @@ void MDLImporter::GenerateOutputMeshes_3DGS_MDL7(
pcBone->mNumWeights = (unsigned int)(*k).size();
pcBone->mWeights = new aiVertexWeight[pcBone->mNumWeights];
- for (unsigned int weight = 0; weight < pcBone->mNumWeights;++weight) {
+ for (unsigned int weight = 0; weight < pcBone->mNumWeights;++weight) {
pcBone->mWeights[weight].mVertexId = (*k)[weight];
pcBone->mWeights[weight].mWeight = 1.0f;
}
@@ -1911,7 +1911,7 @@ void MDLImporter::JoinSkins_3DGS_MDL7(
// then extract the diffuse texture from the second skin,
// setup 1 as UV source and we have it
aiString sString;
- if (AI_SUCCESS == aiGetMaterialString ( pcMat2, AI_MATKEY_TEXTURE_DIFFUSE(0),&sString )) {
+ if(AI_SUCCESS == aiGetMaterialString ( pcMat2, AI_MATKEY_TEXTURE_DIFFUSE(0),&sString )) {
iVal = 1;
pcMatOut->AddProperty<int>(&iVal,1,AI_MATKEY_UVWSRC_DIFFUSE(1));
pcMatOut->AddProperty(&sString,AI_MATKEY_TEXTURE_DIFFUSE(1));
diff --git a/3rdparty/assimp/code/MDLLoader.h b/3rdparty/assimp/code/MDLLoader.h
index 4d0654648..34c101fcb 100644
--- a/3rdparty/assimp/code/MDLLoader.h
+++ b/3rdparty/assimp/code/MDLLoader.h
@@ -52,7 +52,7 @@ struct aiNode;
#include "MDLFileData.h"
#include "HalfLifeFileData.h"
-namespace Assimp {
+namespace Assimp {
class MaterialHelper;
using namespace MDL;
@@ -60,9 +60,9 @@ using namespace MDL;
// --------------------------------------------------------------------------------------
// Include file/line information in debug builds
#ifdef ASSIMP_BUILD_DEBUG
-# define VALIDATE_FILE_SIZE(msg) SizeCheck(msg,__FILE__,__LINE__)
+# define VALIDATE_FILE_SIZE(msg) SizeCheck(msg,__FILE__,__LINE__)
#else
-# define VALIDATE_FILE_SIZE(msg) SizeCheck(msg)
+# define VALIDATE_FILE_SIZE(msg) SizeCheck(msg)
#endif
// --------------------------------------------------------------------------------------
@@ -95,7 +95,7 @@ public:
// -------------------------------------------------------------------
/** 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;
diff --git a/3rdparty/assimp/code/MS3DLoader.cpp b/3rdparty/assimp/code/MS3DLoader.cpp
index 26ec89226..be34db68f 100644
--- a/3rdparty/assimp/code/MS3DLoader.cpp
+++ b/3rdparty/assimp/code/MS3DLoader.cpp
@@ -78,7 +78,7 @@ bool MS3DImporter::CanRead( const std::string& pFile, IOSystem* pIOHandler, bool
}
// second call - check for magic identifiers
- else if (!extension.length() || checkSig) {
+ else if (!extension.length() || checkSig) {
if (!pIOHandler) {
return true;
}
@@ -327,8 +327,8 @@ void MS3DImporter::InternReadFile( const std::string& pFile,
stream.CopyAndAdvance(j.parentName,32);
j.parentName[32] = '\0';
- // DefaultLogger::get()->debug(j.name);
- // DefaultLogger::get()->debug(j.parentName);
+ // DefaultLogger::get()->debug(j.name);
+ // DefaultLogger::get()->debug(j.parentName);
ReadVector(stream,j.rotation);
ReadVector(stream,j.position);
@@ -364,7 +364,6 @@ void MS3DImporter::InternReadFile( const std::string& pFile,
}
const std::string& s = std::string(reinterpret_cast<char*>(stream.GetPtr()),len);
- DefaultLogger::get()->info(s);
}
if (stream.GetRemainingSize() > 4 && inrange((stream >> subversion,subversion),1u,3u)) {
diff --git a/3rdparty/assimp/code/MS3DLoader.h b/3rdparty/assimp/code/MS3DLoader.h
index 391aec5a2..6725dda32 100644
--- a/3rdparty/assimp/code/MS3DLoader.h
+++ b/3rdparty/assimp/code/MS3DLoader.h
@@ -45,7 +45,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define AI_MS3DLOADER_H_INCLUDED
#include "BaseImporter.h"
-namespace Assimp {
+namespace Assimp {
// ----------------------------------------------------------------------------------------------
/** Milkshape 3D importer implementation */
@@ -64,7 +64,7 @@ public:
// -------------------------------------------------------------------
/** 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;
@@ -150,7 +150,7 @@ private:
};
//struct TempModel {
- // std::string comment;
+ // std::string comment;
//};
};
diff --git a/3rdparty/assimp/code/MakeVerboseFormat.cpp b/3rdparty/assimp/code/MakeVerboseFormat.cpp
index d4b3c7120..b232146de 100644
--- a/3rdparty/assimp/code/MakeVerboseFormat.cpp
+++ b/3rdparty/assimp/code/MakeVerboseFormat.cpp
@@ -66,7 +66,7 @@ void MakeVerboseFormatProcess::Execute( aiScene* pScene)
bool bHas = false;
for ( unsigned int a = 0; a < pScene->mNumMeshes; a++)
{
- if ( MakeVerboseFormat( pScene->mMeshes[a]))
+ if ( MakeVerboseFormat( pScene->mMeshes[a]))
bHas = true;
}
if (bHas) DefaultLogger::get()->info("MakeVerboseFormatProcess finished. There was much work to do ...");
diff --git a/3rdparty/assimp/code/MakeVerboseFormat.h b/3rdparty/assimp/code/MakeVerboseFormat.h
index 6d480e5a7..6ecb2ed59 100644
--- a/3rdparty/assimp/code/MakeVerboseFormat.h
+++ b/3rdparty/assimp/code/MakeVerboseFormat.h
@@ -45,7 +45,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define AI_MAKEVERBOSEFORMAT_H_INC
#include "BaseProcess.h"
-namespace Assimp {
+namespace Assimp {
// ---------------------------------------------------------------------------
/** MakeVerboseFormatProcess: Class to convert an asset to the verbose
diff --git a/3rdparty/assimp/code/MaterialSystem.cpp b/3rdparty/assimp/code/MaterialSystem.cpp
index 4733d184f..0df12ba0b 100644
--- a/3rdparty/assimp/code/MaterialSystem.cpp
+++ b/3rdparty/assimp/code/MaterialSystem.cpp
@@ -102,12 +102,12 @@ aiReturn aiGetMaterialFloatArray(const aiMaterial* pMat,
// data is given in floats, simply copy it
unsigned int iWrite;
- if ( aiPTI_Float == prop->mType || aiPTI_Buffer == prop->mType) {
+ if ( aiPTI_Float == prop->mType || aiPTI_Buffer == prop->mType) {
iWrite = prop->mDataLength / sizeof(float);
if (pMax) {
iWrite = std::min(*pMax,iWrite); ;
}
- for (unsigned int a = 0; a < iWrite;++a) {
+ for (unsigned int a = 0; a < iWrite;++a) {
pOut[a] = static_cast<float> ( reinterpret_cast<float*>(prop->mData)[a] );
}
if (pMax) {
@@ -115,12 +115,12 @@ aiReturn aiGetMaterialFloatArray(const aiMaterial* pMat,
}
}
// data is given in ints, convert to float
- else if ( aiPTI_Integer == prop->mType) {
+ else if ( aiPTI_Integer == prop->mType) {
iWrite = prop->mDataLength / sizeof(int32_t);
if (pMax) {
iWrite = std::min(*pMax,iWrite); ;
}
- for (unsigned int a = 0; a < iWrite;++a) {
+ for (unsigned int a = 0; a < iWrite;++a) {
pOut[a] = static_cast<float> ( reinterpret_cast<int32_t*>(prop->mData)[a] );
}
if (pMax) {
@@ -175,7 +175,7 @@ aiReturn aiGetMaterialIntegerArray(const aiMaterial* pMat,
// data is given in ints, simply copy it
unsigned int iWrite;
- if ( aiPTI_Integer == prop->mType || aiPTI_Buffer == prop->mType) {
+ if ( aiPTI_Integer == prop->mType || aiPTI_Buffer == prop->mType) {
iWrite = prop->mDataLength / sizeof(int32_t);
if (pMax) {
iWrite = std::min(*pMax,iWrite); ;
@@ -188,7 +188,7 @@ aiReturn aiGetMaterialIntegerArray(const aiMaterial* pMat,
}
}
// data is given in floats convert to int
- else if ( aiPTI_Float == prop->mType) {
+ else if ( aiPTI_Float == prop->mType) {
iWrite = prop->mDataLength / sizeof(float);
if (pMax) {
iWrite = std::min(*pMax,iWrite); ;
@@ -201,7 +201,7 @@ aiReturn aiGetMaterialIntegerArray(const aiMaterial* pMat,
}
}
// it is a string ... no way to read something out of this
- else {
+ else {
if (pMax) {
iWrite = *pMax;
}
@@ -307,18 +307,18 @@ aiReturn aiGetMaterialTexture(const C_STRUCT aiMaterial* mat,
aiTextureType type,
unsigned int index,
C_STRUCT aiString* path,
- aiTextureMapping* _mapping /*= NULL*/,
- unsigned int* uvindex /*= NULL*/,
- float* blend /*= NULL*/,
- aiTextureOp* op /*= NULL*/,
- aiTextureMapMode* mapmode /*= NULL*/,
+ aiTextureMapping* _mapping /*= NULL*/,
+ unsigned int* uvindex /*= NULL*/,
+ float* blend /*= NULL*/,
+ aiTextureOp* op /*= NULL*/,
+ aiTextureMapMode* mapmode /*= NULL*/,
unsigned int* flags /*= NULL*/
)
{
ai_assert(NULL != mat && NULL != path);
// Get the path to the texture
- if (AI_SUCCESS != aiGetMaterialString(mat,AI_MATKEY_TEXTURE(type,index),path)) {
+ if (AI_SUCCESS != aiGetMaterialString(mat,AI_MATKEY_TEXTURE(type,index),path)) {
return AI_FAILURE;
}
// Determine mapping type
@@ -328,11 +328,11 @@ aiReturn aiGetMaterialTexture(const C_STRUCT aiMaterial* mat,
*_mapping = mapping;
// Get UV index
- if (aiTextureMapping_UV == mapping && uvindex) {
+ if (aiTextureMapping_UV == mapping && uvindex) {
aiGetMaterialInteger(mat,AI_MATKEY_UVWSRC(type,index),(int*)uvindex);
}
// Get blend factor
- if (blend) {
+ if (blend) {
aiGetMaterialFloat(mat,AI_MATKEY_TEXBLEND(type,index),blend);
}
// Get texture operation
@@ -340,7 +340,7 @@ aiReturn aiGetMaterialTexture(const C_STRUCT aiMaterial* mat,
aiGetMaterialInteger(mat,AI_MATKEY_TEXOP(type,index),(int*)op);
}
// Get texture mapping modes
- if (mapmode) {
+ if (mapmode) {
aiGetMaterialInteger(mat,AI_MATKEY_MAPPINGMODE_U(type,index),(int*)&mapmode[0]);
aiGetMaterialInteger(mat,AI_MATKEY_MAPPINGMODE_V(type,index),(int*)&mapmode[1]);
}
@@ -395,7 +395,7 @@ void MaterialHelper::_InternDestruct()
// ------------------------------------------------------------------------------------------------
void MaterialHelper::Clear()
{
- for (unsigned int i = 0; i < mNumProperties;++i) {
+ for (unsigned int i = 0; i < mNumProperties;++i) {
// delete this entry
delete mProperties[i];
AI_DEBUG_INVALIDATE_PTR(mProperties[i]);
@@ -409,12 +409,12 @@ void MaterialHelper::Clear()
uint32_t MaterialHelper::ComputeHash(bool includeMatName /*= false*/)
{
uint32_t hash = 1503; // magic start value, choosen to be my birthday :-)
- for (unsigned int i = 0; i < mNumProperties;++i) {
+ for (unsigned int i = 0; i < mNumProperties;++i) {
aiMaterialProperty* prop;
// Exclude all properties whose first character is '?' from the hash
// See doc for aiMaterialProperty.
- if ((prop = mProperties[i]) && (includeMatName || prop->mKey.data[0] != '?')) {
+ if ((prop = mProperties[i]) && (includeMatName || prop->mKey.data[0] != '?')) {
hash = SuperFastHash(prop->mKey.data,(unsigned int)prop->mKey.length,hash);
hash = SuperFastHash(prop->mData,prop->mDataLength,hash);
@@ -445,7 +445,7 @@ aiReturn MaterialHelper::RemoveProperty (const char* pKey,unsigned int type,
// collapse the array behind --.
--mNumProperties;
- for (unsigned int a = i; a < mNumProperties;++a) {
+ for (unsigned int a = i; a < mNumProperties;++a) {
mProperties[a] = mProperties[a+1];
}
return AI_SUCCESS;
@@ -470,7 +470,7 @@ aiReturn MaterialHelper::AddBinaryProperty (const void* pInput,
// first search the list whether there is already an entry with this key
unsigned int iOutIndex = 0xffffffff;
- for (unsigned int i = 0; i < mNumProperties;++i) {
+ for (unsigned int i = 0; i < mNumProperties;++i) {
aiMaterialProperty* prop = mProperties[i];
if (prop /* just for safety */ && !strcmp( prop->mKey.data, pKey ) &&
@@ -497,13 +497,13 @@ aiReturn MaterialHelper::AddBinaryProperty (const void* pInput,
ai_assert ( MAXLEN > pcNew->mKey.length);
strcpy( pcNew->mKey.data, pKey );
- if (0xffffffff != iOutIndex) {
+ if (0xffffffff != iOutIndex) {
mProperties[iOutIndex] = pcNew;
return AI_SUCCESS;
}
// resize the array ... double the storage allocated
- if (mNumProperties == mNumAllocated) {
+ if (mNumProperties == mNumAllocated) {
const unsigned int iOld = mNumAllocated;
mNumAllocated *= 2;
@@ -571,14 +571,14 @@ void MaterialHelper::CopyPropertyList(MaterialHelper* pcDest,
aiMaterialProperty** pcOld = pcDest->mProperties;
pcDest->mProperties = new aiMaterialProperty*[pcDest->mNumAllocated];
- if (iOldNum && pcOld) {
+ if (iOldNum && pcOld) {
for (unsigned int i = 0; i < iOldNum;++i) {
pcDest->mProperties[i] = pcOld[i];
}
delete[] pcOld;
}
- for (unsigned int i = iOldNum; i< pcDest->mNumProperties;++i) {
+ for (unsigned int i = iOldNum; i< pcDest->mNumProperties;++i) {
aiMaterialProperty* propSrc = pcSrc->mProperties[i];
// search whether we have already a property with this name -> if yes, overwrite it
@@ -586,7 +586,7 @@ void MaterialHelper::CopyPropertyList(MaterialHelper* pcDest,
for (unsigned int q = 0; q < iOldNum;++q) {
prop = pcDest->mProperties[q];
if (prop /* just for safety */ && prop->mKey == propSrc->mKey && prop->mSemantic == propSrc->mSemantic
- && prop->mIndex == propSrc->mIndex) {
+ && prop->mIndex == propSrc->mIndex) {
delete prop;
// collapse the whole array ...
diff --git a/3rdparty/assimp/code/MaterialSystem.h b/3rdparty/assimp/code/MaterialSystem.h
index ea8daf896..1504b6888 100644
--- a/3rdparty/assimp/code/MaterialSystem.h
+++ b/3rdparty/assimp/code/MaterialSystem.h
@@ -45,7 +45,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define AI_MATERIALSYSTEM_H_INC
#include "../include/aiMaterial.h"
-namespace Assimp {
+namespace Assimp {
// ----------------------------------------------------------------------------------------
/** Internal material helper class deriving from aiMaterial.
diff --git a/3rdparty/assimp/code/MemoryIOWrapper.h b/3rdparty/assimp/code/MemoryIOWrapper.h
index d34d987aa..d40102ee3 100644
--- a/3rdparty/assimp/code/MemoryIOWrapper.h
+++ b/3rdparty/assimp/code/MemoryIOWrapper.h
@@ -42,7 +42,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* Handy IOStream/IOSystem implemetation to read directly from a memory buffer */
#ifndef AI_MEMORYIOSTREAM_H_INC
#define AI_MEMORYIOSTREAM_H_INC
-namespace Assimp {
+namespace Assimp {
#define AI_MEMORYIO_MAGIC_FILENAME "$$$___magic___$$$"
#define AI_MEMORYIO_MAGIC_FILENAME_LENGTH 17
@@ -58,12 +58,12 @@ public:
}
public:
- ~MemoryIOStream () {
+ ~MemoryIOStream () {
}
// -------------------------------------------------------------------
// Read from stream
- size_t Read(void* pvBuffer, size_t pSize, size_t pCount) {
+ size_t Read(void* pvBuffer, size_t pSize, size_t pCount) {
const size_t cnt = std::min(pCount,(length-pos)/pSize),ofs = pSize*cnt;
memcpy(pvBuffer,buffer+pos,ofs);
@@ -74,7 +74,7 @@ public:
// -------------------------------------------------------------------
// Write to stream
- size_t Write(const void* /* pvBuffer */, size_t /* pSize */,size_t /* pCount */) {
+ size_t Write(const void* pvBuffer, size_t pSize,size_t pCount) {
ai_assert(false); // won't be needed
return 0;
}
@@ -154,7 +154,7 @@ public:
// -------------------------------------------------------------------
/** Open a new file with a given path. */
- IOStream* Open( const char* pFile, const char* /* pMode = "rb" */) {
+ IOStream* Open( const char* pFile, const char* pMode = "rb") {
if (strncmp(pFile,AI_MEMORYIO_MAGIC_FILENAME,AI_MEMORYIO_MAGIC_FILENAME_LENGTH)) {
return NULL;
}
@@ -163,12 +163,12 @@ public:
// -------------------------------------------------------------------
/** Closes the given file and releases all resources associated with it. */
- void Close( IOStream* /* pFile */) {
+ void Close( IOStream* pFile) {
}
// -------------------------------------------------------------------
/** Compare two paths */
- bool ComparePaths (const char* /* one */, const char* /* second */) const {
+ bool ComparePaths (const char* one, const char* second) const {
return false;
}
diff --git a/3rdparty/assimp/code/NDOLoader.cpp b/3rdparty/assimp/code/NDOLoader.cpp
index c8dae587c..1bd06c92d 100644
--- a/3rdparty/assimp/code/NDOLoader.cpp
+++ b/3rdparty/assimp/code/NDOLoader.cpp
@@ -86,7 +86,7 @@ void NDOImporter::GetExtensionList(std::set<std::string>& extensions)
// ------------------------------------------------------------------------------------------------
// Setup configuration properties for the loader
-void NDOImporter::SetupProperties(const Importer* /*pImp*/)
+void NDOImporter::SetupProperties(const Importer* pImp)
{
// nothing to be done for the moment
}
@@ -135,12 +135,12 @@ void NDOImporter::InternReadFile( const std::string& pFile,
// read all objects
for (unsigned int o = 0; o < objects.size(); ++o) {
-// if (file_format < 12) {
+// if (file_format < 12) {
if (!reader.GetI1()) {
continue; /* skip over empty object */
}
- // reader.GetI2();
-// }
+ // reader.GetI2();
+// }
Object& obj = objects[o];
temp = file_format >= 12 ? reader.GetU4() : reader.GetU2();
diff --git a/3rdparty/assimp/code/NDOLoader.h b/3rdparty/assimp/code/NDOLoader.h
index 815b43c0c..1bae9c653 100644
--- a/3rdparty/assimp/code/NDOLoader.h
+++ b/3rdparty/assimp/code/NDOLoader.h
@@ -43,7 +43,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef INCLUDED_AI_NDO_LOADER_H
#define INCLUDED_AI_NDO_LOADER_H
-namespace Assimp {
+namespace Assimp {
// ---------------------------------------------------------------------------
/** @brief Importer class to load meshes from Nendo.
diff --git a/3rdparty/assimp/code/NFFLoader.cpp b/3rdparty/assimp/code/NFFLoader.cpp
index 24a7b458c..158fcb8d1 100644
--- a/3rdparty/assimp/code/NFFLoader.cpp
+++ b/3rdparty/assimp/code/NFFLoader.cpp
@@ -65,7 +65,7 @@ NFFImporter::~NFFImporter()
// ------------------------------------------------------------------------------------------------
// Returns whether the class can handle the format of the given file.
-bool NFFImporter::CanRead( const std::string& pFile, IOSystem* /*pIOHandler*/, bool /*checkSig*/) const
+bool NFFImporter::CanRead( const std::string& pFile, IOSystem* pIOHandler, bool checkSig) const
{
return SimpleExtensionCheck(pFile,"nff","enff");
}
@@ -118,7 +118,7 @@ void NFFImporter::LoadNFF2MaterialTable(std::vector<ShadingInfo>& output,
boost::scoped_ptr<IOStream> file( pIOHandler->Open( path, "rb"));
// Check whether we can read from the file
- if ( !file.get()) {
+ if ( !file.get()) {
DefaultLogger::get()->error("NFF2: Unable to open material library " + path + ".");
return;
}
@@ -136,7 +136,7 @@ void NFFImporter::LoadNFF2MaterialTable(std::vector<ShadingInfo>& output,
CommentRemover::RemoveLineComments("//",&mBuffer2[0]);
// The file should start with the magic sequence "mat"
- if (!TokenMatch(buffer,"mat",3)) {
+ if (!TokenMatch(buffer,"mat",3)) {
DefaultLogger::get()->error("NFF2: Not a valid material library " + path + ".");
return;
}
@@ -257,14 +257,14 @@ void NFFImporter::InternReadFile( const std::string& pFile,
unsigned int iTesselation = 4;
// some temporary variables we need to parse the file
- unsigned int sphere = 0,
- cylinder = 0,
- cone = 0,
- numNamed = 0,
- dodecahedron = 0,
- octahedron = 0,
- tetrahedron = 0,
- hexahedron = 0;
+ unsigned int sphere = 0,
+ cylinder = 0,
+ cone = 0,
+ numNamed = 0,
+ dodecahedron = 0,
+ octahedron = 0,
+ tetrahedron = 0,
+ hexahedron = 0;
// lights imported from the file
std::vector<Light> lights;
@@ -1075,13 +1075,13 @@ void NFFImporter::InternReadFile( const std::string& pFile,
c->mName = nd->mName; // make sure the names are identical
c->mHorizontalFOV = AI_DEG_TO_RAD( angle );
- c->mLookAt = camLookAt - camPos;
- c->mPosition = camPos;
- c->mUp = camUp;
+ c->mLookAt = camLookAt - camPos;
+ c->mPosition = camPos;
+ c->mUp = camUp;
// If the resolution is not specified in the file, we
// need to set 1.0 as aspect.
- c->mAspect = (!resolution.y ? 0.f : resolution.x / resolution.y);
+ c->mAspect = (!resolution.y ? 0.f : resolution.x / resolution.y);
++ppcChildren;
}
diff --git a/3rdparty/assimp/code/NFFLoader.h b/3rdparty/assimp/code/NFFLoader.h
index 464792cac..2e21bdc8b 100644
--- a/3rdparty/assimp/code/NFFLoader.h
+++ b/3rdparty/assimp/code/NFFLoader.h
@@ -49,7 +49,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "../include/aiTypes.h"
-namespace Assimp {
+namespace Assimp {
// ----------------------------------------------------------------------------------
/** NFF (Neutral File Format) Importer class.
@@ -104,13 +104,13 @@ private:
, diffuse (1.f,1.f,1.f)
, specular (1.f,1.f,1.f)
, ambient (0.f,0.f,0.f)
- , emissive (0.f,0.f,0.f)
+ , emissive (0.f,0.f,0.f)
, refracti (1.f)
, twoSided (false) // for NFF2
, shaded (true) // for NFF2
- , opacity (1.f)
- , shininess (0.f)
- , mapping (aiTextureMapping_UV)
+ , opacity (1.f)
+ , shininess (0.f)
+ , mapping (aiTextureMapping_UV)
{}
aiColor3D color,diffuse,specular,ambient,emissive;
@@ -133,10 +133,10 @@ private:
// shininess is ignored for the moment
bool operator == (const ShadingInfo& other) const
{
- return color == other.color &&
- diffuse == other.diffuse &&
- specular == other.specular &&
- ambient == other.ambient &&
+ return color == other.color &&
+ diffuse == other.diffuse &&
+ specular == other.specular &&
+ ambient == other.ambient &&
refracti == other.refracti &&
texFile == other.texFile &&
twoSided == other.twoSided &&
@@ -151,8 +151,8 @@ private:
struct Light
{
Light()
- : intensity (1.f)
- , color (1.f,1.f,1.f)
+ : intensity (1.f)
+ , color (1.f,1.f,1.f)
{}
aiVector3D position;
@@ -173,8 +173,8 @@ private:
MeshInfo(PatchType _pType, bool bL = false)
: pType (_pType)
, bLocked (bL)
- , radius (1.f,1.f,1.f)
- , dir (0.f,1.f,0.f)
+ , radius (1.f,1.f,1.f)
+ , dir (0.f,1.f,0.f)
, matIndex (0)
{
name[0] = '\0'; // by default meshes are unnamed
diff --git a/3rdparty/assimp/code/OFFLoader.h b/3rdparty/assimp/code/OFFLoader.h
index 995e0e3a8..e4247b6a2 100644
--- a/3rdparty/assimp/code/OFFLoader.h
+++ b/3rdparty/assimp/code/OFFLoader.h
@@ -48,7 +48,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "../include/aiTypes.h"
#include <vector>
-namespace Assimp {
+namespace Assimp {
// ---------------------------------------------------------------------------
/** Importer class for the Object File Format (.off)
@@ -68,7 +68,7 @@ public:
// -------------------------------------------------------------------
/** 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;
diff --git a/3rdparty/assimp/code/ObjFileData.h b/3rdparty/assimp/code/ObjFileData.h
index 37f91f101..7edfee51e 100644
--- a/3rdparty/assimp/code/ObjFileData.h
+++ b/3rdparty/assimp/code/ObjFileData.h
@@ -57,27 +57,27 @@ struct Face;
struct Material;
// ------------------------------------------------------------------------------------------------
-//! \struct Face
-//! \brief Datastructure for a simple obj-face, descripes discredisation and materials
+//! \struct Face
+//! \brief Datastructure for a simple obj-face, descripes discredisation and materials
struct Face
{
typedef std::vector<unsigned int> IndexArray;
- //! Primitive type
+ //! Primitive type
int m_PrimitiveType;
- //! Vertex indices
+ //! Vertex indices
IndexArray *m_pVertices;
- //! Normal indices
+ //! Normal indices
IndexArray *m_pNormals;
- //! Texture coordinates indices
+ //! Texture coordinates indices
IndexArray *m_pTexturCoords;
- //! Pointer to assigned material
+ //! Pointer to assigned material
Material *m_pMaterial;
- //! \brief Default constructor
- //! \param pVertices Pointer to assigned vertex indexbuffer
- //! \param pNormals Pointer to assigned normals indexbuffer
- //! \param pTexCoords Pointer to assigned texture indexbuffer
+ //! \brief Default constructor
+ //! \param pVertices Pointer to assigned vertex indexbuffer
+ //! \param pNormals Pointer to assigned normals indexbuffer
+ //! \param pTexCoords Pointer to assigned texture indexbuffer
Face( std::vector<unsigned int> *pVertices,
std::vector<unsigned int> *pNormals,
std::vector<unsigned int> *pTexCoords) :
@@ -90,7 +90,7 @@ struct Face
// empty
}
- //! \brief Destructor
+ //! \brief Destructor
~Face()
{
delete m_pVertices;
@@ -103,8 +103,8 @@ struct Face
};
// ------------------------------------------------------------------------------------------------
-//! \struct Object
-//! \brief Stores all objects of an objfile object definition
+//! \struct Object
+//! \brief Stores all objects of an objfile object definition
struct Object
{
enum ObjectType
@@ -113,23 +113,23 @@ struct Object
GroupType
};
- //! Object name
+ //! Object name
std::string m_strObjName;
- //! Transformation matrix, stored in OpenGL format
+ //! Transformation matrix, stored in OpenGL format
aiMatrix4x4 m_Transformation;
- //! All sub-objects referenced by this object
+ //! All sub-objects referenced by this object
std::vector<Object*> m_SubObjects;
- /// Assigned meshes
+ /// Assigned meshes
std::vector<unsigned int> m_Meshes;
- //! \brief Default constructor
+ //! \brief Default constructor
Object() :
m_strObjName("")
{
// empty
}
- //! \brief Destructor
+ //! \brief Destructor
~Object()
{
for (std::vector<Object*>::iterator it = m_SubObjects.begin();
@@ -142,14 +142,14 @@ struct Object
};
// ------------------------------------------------------------------------------------------------
-//! \struct Material
-//! \brief Data structure to store all material specific data
+//! \struct Material
+//! \brief Data structure to store all material specific data
struct Material
{
- //! Name of material description
+ //! Name of material description
aiString MaterialName;
- //! Texture names
+ //! Texture names
aiString texture;
aiString textureSpecular;
aiString textureAmbient;
@@ -157,28 +157,28 @@ struct Material
aiString textureSpecularity;
aiString textureOpacity;
- //! Ambient color
+ //! Ambient color
aiColor3D ambient;
- //! Diffuse color
+ //! Diffuse color
aiColor3D diffuse;
- //! Speculao color
+ //! Speculao color
aiColor3D specular;
- //! Alpha value
+ //! Alpha value
float alpha;
- //! Shineness factor
+ //! Shineness factor
float shineness;
- //! Illumination model
+ //! Illumination model
int illumination_model;
//! Index of refraction
float ior;
- //! Constructor
+ //! Constructor
Material()
- : diffuse (0.6f,0.6f,0.6f)
- , alpha (1.f)
- , shineness (0.0f)
- , illumination_model (1)
- , ior (1.f)
+ : diffuse (0.6f,0.6f,0.6f)
+ , alpha (1.f)
+ , shineness (0.0f)
+ , illumination_model (1)
+ , ior (1.f)
{
// empty
}
@@ -191,25 +191,25 @@ struct Material
};
// ------------------------------------------------------------------------------------------------
-//! \struct Mesh
-//! \brief Data structure to store a mesh
+//! \struct Mesh
+//! \brief Data structure to store a mesh
struct Mesh
{
static const unsigned int NoMaterial = 999999999;
- /// Array with pointer to all stored faces
+ /// Array with pointer to all stored faces
std::vector<Face*> m_Faces;
- /// Assigned material
+ /// Assigned material
Material *m_pMaterial;
- /// Number of stored indices.
+ /// Number of stored indices.
unsigned int m_uiNumIndices;
/// Number of UV
unsigned int m_uiUVCoordinates[ AI_MAX_NUMBER_OF_TEXTURECOORDS ];
- /// Material index.
+ /// Material index.
unsigned int m_uiMaterialIndex;
- /// True, if normals are stored.
+ /// True, if normals are stored.
bool m_hasNormals;
- /// Constructor
+ /// Constructor
Mesh() :
m_pMaterial(NULL),
m_uiNumIndices(0),
@@ -219,7 +219,7 @@ struct Mesh
memset(m_uiUVCoordinates, 0, sizeof( unsigned int ) * AI_MAX_NUMBER_OF_TEXTURECOORDS);
}
- /// Destructor
+ /// Destructor
~Mesh()
{
for (std::vector<Face*>::iterator it = m_Faces.begin();
@@ -232,49 +232,49 @@ struct Mesh
};
// ------------------------------------------------------------------------------------------------
-//! \struct Model
-//! \brief Data structure to store all obj-specific model datas
+//! \struct Model
+//! \brief Data structure to store all obj-specific model datas
struct Model
{
typedef std::map<std::string*, std::vector<unsigned int>* > GroupMap;
typedef std::map<std::string*, std::vector<unsigned int>* >::iterator GroupMapIt;
typedef std::map<std::string*, std::vector<unsigned int>* >::const_iterator ConstGroupMapIt;
- //! Model name
+ //! Model name
std::string m_ModelName;
- //! List ob assigned objects
+ //! List ob assigned objects
std::vector<Object*> m_Objects;
- //! Pointer to current object
+ //! Pointer to current object
ObjFile::Object *m_pCurrent;
- //! Pointer to current material
+ //! Pointer to current material
ObjFile::Material *m_pCurrentMaterial;
- //! Pointer to default material
+ //! Pointer to default material
ObjFile::Material *m_pDefaultMaterial;
- //! Vector with all generated materials
+ //! Vector with all generated materials
std::vector<std::string> m_MaterialLib;
- //! Vector with all generated group
+ //! Vector with all generated group
std::vector<std::string> m_GroupLib;
- //! Vector with all generated vertices
+ //! Vector with all generated vertices
std::vector<aiVector3D> m_Vertices;
- //! vector with all generated normals
+ //! vector with all generated normals
std::vector<aiVector3D> m_Normals;
- //! Groupmap
+ //! Groupmap
GroupMap m_Groups;
- //! Group to face id assignment
+ //! Group to face id assignment
std::vector<unsigned int> *m_pGroupFaceIDs;
- //! Active group
+ //! Active group
std::string m_strActiveGroup;
- //! Vector with generated texture coordinates
+ //! Vector with generated texture coordinates
std::vector<aiVector2D> m_TextureCoord;
- //! Current mesh instance
+ //! Current mesh instance
Mesh *m_pCurrentMesh;
- //! Vector with stored meshes
+ //! Vector with stored meshes
std::vector<Mesh*> m_Meshes;
- //! Material map
+ //! Material map
std::map<std::string, Material*> m_MaterialMap;
- //! \brief Default constructor
+ //! \brief Default constructor
Model() :
m_ModelName(""),
m_pCurrent(NULL),
@@ -286,7 +286,7 @@ struct Model
// empty
}
- //! \brief Destructor
+ //! \brief Destructor
~Model()
{
// Clear all stored object instances
diff --git a/3rdparty/assimp/code/ObjFileImporter.cpp b/3rdparty/assimp/code/ObjFileImporter.cpp
index 87030ea2f..2cd68ee1f 100644
--- a/3rdparty/assimp/code/ObjFileImporter.cpp
+++ b/3rdparty/assimp/code/ObjFileImporter.cpp
@@ -47,12 +47,12 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "ObjFileParser.h"
#include "ObjFileData.h"
-namespace Assimp {
+namespace Assimp {
using namespace std;
// ------------------------------------------------------------------------------------------------
-// Default constructor
+// Default constructor
ObjFileImporter::ObjFileImporter() :
m_Buffer(),
m_pRootObject( NULL ),
@@ -63,7 +63,7 @@ ObjFileImporter::ObjFileImporter() :
}
// ------------------------------------------------------------------------------------------------
-// Destructor.
+// Destructor.
ObjFileImporter::~ObjFileImporter()
{
// Release root object instance
@@ -75,7 +75,7 @@ ObjFileImporter::~ObjFileImporter()
}
// ------------------------------------------------------------------------------------------------
-// Returns true, if file is an obj file.
+// Returns true, if file is an obj file.
bool ObjFileImporter::CanRead( const std::string& pFile, IOSystem* pIOHandler , bool checkSig ) const
{
if (!checkSig) //Check File Extension
@@ -90,7 +90,7 @@ bool ObjFileImporter::CanRead( const std::string& pFile, IOSystem* pIOHandler ,
}
// ------------------------------------------------------------------------------------------------
-// Obj-file import implementation
+// Obj-file import implementation
void ObjFileImporter::InternReadFile( const std::string& pFile, aiScene* pScene, IOSystem* pIOHandler)
{
DefaultIOSystem io;
@@ -132,7 +132,7 @@ void ObjFileImporter::InternReadFile( const std::string& pFile, aiScene* pScene,
}
// ------------------------------------------------------------------------------------------------
-// Create the data from parsed obj-file
+// Create the data from parsed obj-file
void ObjFileImporter::CreateDataFromImport(const ObjFile::Model* pModel, aiScene* pScene)
{
if (0L == pModel)
@@ -173,9 +173,9 @@ void ObjFileImporter::CreateDataFromImport(const ObjFile::Model* pModel, aiScene
}
// ------------------------------------------------------------------------------------------------
-// Creates all nodes of the model
+// Creates all nodes of the model
aiNode *ObjFileImporter::createNodes(const ObjFile::Model* pModel, const ObjFile::Object* pObject,
- unsigned int /*uiMeshIndex*/,
+ unsigned int uiMeshIndex,
aiNode *pParent, aiScene* pScene,
std::vector<aiMesh*> &MeshArray )
{
@@ -236,7 +236,7 @@ aiNode *ObjFileImporter::createNodes(const ObjFile::Model* pModel, const ObjFile
}
// ------------------------------------------------------------------------------------------------
-// Create topology data
+// Create topology data
void ObjFileImporter::createTopology(const ObjFile::Model* pModel,
const ObjFile::Object* pData,
unsigned int uiMeshIndex,
@@ -287,7 +287,7 @@ void ObjFileImporter::createTopology(const ObjFile::Model* pModel,
}
// ------------------------------------------------------------------------------------------------
-// Creates a vertex array
+// Creates a vertex array
void ObjFileImporter::createVertexArray(const ObjFile::Model* pModel,
const ObjFile::Object* pCurrentObject,
unsigned int uiMeshIndex,
@@ -371,7 +371,7 @@ void ObjFileImporter::createVertexArray(const ObjFile::Model* pModel,
}
// ------------------------------------------------------------------------------------------------
-// Counts all stored meshes
+// Counts all stored meshes
void ObjFileImporter::countObjects(const std::vector<ObjFile::Object*> &rObjects, int &iNumMeshes)
{
iNumMeshes = 0;
@@ -391,7 +391,7 @@ void ObjFileImporter::countObjects(const std::vector<ObjFile::Object*> &rObjects
}
// ------------------------------------------------------------------------------------------------
-// Creates the material
+// Creates the material
void ObjFileImporter::createMaterials(const ObjFile::Model* pModel, aiScene* pScene )
{
ai_assert( NULL != pScene );
@@ -480,7 +480,7 @@ void ObjFileImporter::createMaterials(const ObjFile::Model* pModel, aiScene* pSc
}
// ------------------------------------------------------------------------------------------------
-// Appends this node to the parent node
+// Appends this node to the parent node
void ObjFileImporter::appendChildToParentNode(aiNode *pParent, aiNode *pChild)
{
// Checking preconditions
@@ -516,6 +516,6 @@ void ObjFileImporter::appendChildToParentNode(aiNode *pParent, aiNode *pChild)
// ------------------------------------------------------------------------------------------------
-} // Namespace Assimp
+} // Namespace Assimp
#endif // !! ASSIMP_BUILD_NO_OBJ_IMPORTER
diff --git a/3rdparty/assimp/code/ObjFileImporter.h b/3rdparty/assimp/code/ObjFileImporter.h
index 10f3cf0bb..7edecac8e 100644
--- a/3rdparty/assimp/code/ObjFileImporter.h
+++ b/3rdparty/assimp/code/ObjFileImporter.h
@@ -58,8 +58,8 @@ struct Model;
}
// ------------------------------------------------------------------------------------------------
-/// \class ObjFileImporter
-/// \brief Imports a waveform obj file
+/// \class ObjFileImporter
+/// \brief Imports a waveform obj file
// ------------------------------------------------------------------------------------------------
class ObjFileImporter :
BaseImporter
@@ -67,58 +67,58 @@ class ObjFileImporter :
friend class Importer;
protected:
- /// \brief Default constructor
+ /// \brief Default constructor
ObjFileImporter();
- /// \brief Destructor
+ /// \brief Destructor
~ObjFileImporter();
public:
- /// \brief Returns whether the class can handle the format of the given file.
- /// \remark See BaseImporter::CanRead() for details.
+ /// \brief Returns whether the class can handle the format of the given file.
+ /// \remark See BaseImporter::CanRead() for details.
bool CanRead( const std::string& pFile, IOSystem* pIOHandler, bool checkSig) const;
private:
- //! \brief Appends the supported extention.
+ //! \brief Appends the supported extention.
void GetExtensionList(std::set<std::string>& extensions);
- //! \brief File import implementation.
+ //! \brief File import implementation.
void InternReadFile(const std::string& pFile, aiScene* pScene, IOSystem* pIOHandler);
- //! \brief Create the data from imported content.
+ //! \brief Create the data from imported content.
void CreateDataFromImport(const ObjFile::Model* pModel, aiScene* pScene);
- //! \brief Creates all nodes stored in imported content.
+ //! \brief Creates all nodes stored in imported content.
aiNode *createNodes(const ObjFile::Model* pModel, const ObjFile::Object* pData, unsigned int uiMeshIndex,
aiNode *pParent, aiScene* pScene, std::vector<aiMesh*> &MeshArray);
- //! \brief Creates topology data like faces and meshes for the geometry.
+ //! \brief Creates topology data like faces and meshes for the geometry.
void createTopology(const ObjFile::Model* pModel, const ObjFile::Object* pData,
unsigned int uiMeshIndex, aiMesh* pMesh);
- //! \brief Creates vertices from model.
+ //! \brief Creates vertices from model.
void createVertexArray(const ObjFile::Model* pModel, const ObjFile::Object* pCurrentObject,
unsigned int uiMeshIndex, aiMesh* pMesh);
- //! \brief Object counter helper method.
+ //! \brief Object counter helper method.
void countObjects(const std::vector<ObjFile::Object*> &rObjects, int &iNumMeshes);
- //! \brief Material creation.
+ //! \brief Material creation.
void createMaterials(const ObjFile::Model* pModel, aiScene* pScene);
- //! \brief Appends a child node to a parentnode and updates the datastructures.
+ //! \brief Appends a child node to a parentnode and updates the datastructures.
void appendChildToParentNode(aiNode *pParent, aiNode *pChild);
- //! \brief TODO!
+ //! \brief TODO!
void createAnimations();
private:
- //! Data buffer
+ //! Data buffer
std::vector<char> m_Buffer;
- //! Pointer to root object instance
+ //! Pointer to root object instance
ObjFile::Object *m_pRootObject;
- //! Absolute pathname of model in filesystem
+ //! Absolute pathname of model in filesystem
std::string m_strAbsPath;
};
diff --git a/3rdparty/assimp/code/ObjFileMtlImporter.cpp b/3rdparty/assimp/code/ObjFileMtlImporter.cpp
index 67863dc01..99de1a670 100644
--- a/3rdparty/assimp/code/ObjFileMtlImporter.cpp
+++ b/3rdparty/assimp/code/ObjFileMtlImporter.cpp
@@ -47,10 +47,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "ObjFileData.h"
#include "fast_atof.h"
-namespace Assimp {
+namespace Assimp {
// -------------------------------------------------------------------
-// Constructor
+// Constructor
ObjFileMtlImporter::ObjFileMtlImporter( std::vector<char> &buffer,
const std::string & /*strAbsPath*/,
ObjFile::Model *pModel ) :
@@ -69,28 +69,28 @@ ObjFileMtlImporter::ObjFileMtlImporter( std::vector<char> &buffer,
}
// -------------------------------------------------------------------
-// Destructor
+// Destructor
ObjFileMtlImporter::~ObjFileMtlImporter()
{
// empty
}
// -------------------------------------------------------------------
-// Private copy constructor
+// Private copy constructor
ObjFileMtlImporter::ObjFileMtlImporter(const ObjFileMtlImporter & /* rOther */ )
{
// empty
}
// -------------------------------------------------------------------
-// Private copy constructor
+// Private copy constructor
ObjFileMtlImporter &ObjFileMtlImporter::operator = ( const ObjFileMtlImporter & /*rOther */ )
{
return *this;
}
// -------------------------------------------------------------------
-// Loads the material description
+// Loads the material description
void ObjFileMtlImporter::load()
{
if ( m_DataIt == m_DataItEnd )
@@ -108,7 +108,7 @@ void ObjFileMtlImporter::load()
++m_DataIt;
getColorRGBA( &m_pModel->m_pCurrentMaterial->ambient );
}
- else if (*m_DataIt == 'd') // Diffuse color
+ else if (*m_DataIt == 'd') // Diffuse color
{
++m_DataIt;
getColorRGBA( &m_pModel->m_pCurrentMaterial->diffuse );
@@ -122,7 +122,7 @@ void ObjFileMtlImporter::load()
}
break;
- case 'd': // Alpha value
+ case 'd': // Alpha value
{
++m_DataIt;
getFloatValue( m_pModel->m_pCurrentMaterial->alpha );
@@ -130,7 +130,7 @@ void ObjFileMtlImporter::load()
}
break;
- case 'N': // Shineness
+ case 'N': // Shineness
{
++m_DataIt;
switch(*m_DataIt)
@@ -150,7 +150,7 @@ void ObjFileMtlImporter::load()
break;
- case 'm': // Texture
+ case 'm': // Texture
case 'b': // quick'n'dirty - for 'bump' sections
{
getTexture();
@@ -158,14 +158,14 @@ void ObjFileMtlImporter::load()
}
break;
- case 'n': // New material name
+ case 'n': // New material name
{
createMaterial();
m_DataIt = skipLine<DataArrayIt>( m_DataIt, m_DataItEnd, m_uiLine );
}
break;
- case 'i': // Illumination model
+ case 'i': // Illumination model
{
m_DataIt = getNextToken<DataArrayIt>(m_DataIt, m_DataItEnd);
getIlluminationModel( m_pModel->m_pCurrentMaterial->illumination_model );
@@ -183,7 +183,7 @@ void ObjFileMtlImporter::load()
}
// -------------------------------------------------------------------
-// Loads a color definition
+// Loads a color definition
void ObjFileMtlImporter::getColorRGBA( aiColor3D *pColor )
{
ai_assert( NULL != pColor );
@@ -200,7 +200,7 @@ void ObjFileMtlImporter::getColorRGBA( aiColor3D *pColor )
}
// -------------------------------------------------------------------
-// Loads the kind of illumination model.
+// Loads the kind of illumination model.
void ObjFileMtlImporter::getIlluminationModel( int &illum_model )
{
m_DataIt = CopyNextWord<DataArrayIt>( m_DataIt, m_DataItEnd, m_buffer, BUFFERSIZE );
@@ -208,7 +208,7 @@ void ObjFileMtlImporter::getIlluminationModel( int &illum_model )
}
// -------------------------------------------------------------------
-// Loads a single float value.
+// Loads a single float value.
void ObjFileMtlImporter::getFloatValue( float &value )
{
m_DataIt = CopyNextWord<DataArrayIt>( m_DataIt, m_DataItEnd, m_buffer, BUFFERSIZE );
@@ -216,7 +216,7 @@ void ObjFileMtlImporter::getFloatValue( float &value )
}
// -------------------------------------------------------------------
-// Creates a material from loaded data.
+// Creates a material from loaded data.
void ObjFileMtlImporter::createMaterial()
{
std::string strName( "" );
@@ -241,7 +241,7 @@ void ObjFileMtlImporter::createMaterial()
}
// -------------------------------------------------------------------
-// Gets a texture name from data.
+// Gets a texture name from data.
void ObjFileMtlImporter::getTexture()
{
aiString *out = NULL;
diff --git a/3rdparty/assimp/code/ObjFileMtlImporter.h b/3rdparty/assimp/code/ObjFileMtlImporter.h
index 8b83a0142..f98cbbcaf 100644
--- a/3rdparty/assimp/code/ObjFileMtlImporter.h
+++ b/3rdparty/assimp/code/ObjFileMtlImporter.h
@@ -56,8 +56,8 @@ struct Material;
/**
- * @class ObjFileMtlImporter
- * @brief Loads the material description from a mtl file.
+ * @class ObjFileMtlImporter
+ * @brief Loads the material description from a mtl file.
*/
class ObjFileMtlImporter
{
@@ -68,43 +68,43 @@ public:
typedef std::vector<char>::const_iterator ConstDataArrayIt;
public:
- //! \brief Default constructor
+ //! \brief Default constructor
ObjFileMtlImporter( std::vector<char> &buffer, const std::string &strAbsPath,
ObjFile::Model *pModel );
- //! \brief DEstructor
+ //! \brief DEstructor
~ObjFileMtlImporter();
private:
- /// Copy constructor, empty.
+ /// Copy constructor, empty.
ObjFileMtlImporter(const ObjFileMtlImporter &rOther);
- /// \brief Assignment operator, returns only a reference of this instance.
+ /// \brief Assignment operator, returns only a reference of this instance.
ObjFileMtlImporter &operator = (const ObjFileMtlImporter &rOther);
- /// Load the whole material description
+ /// Load the whole material description
void load();
- /// Get color data.
+ /// Get color data.
void getColorRGBA( aiColor3D *pColor);
- /// Get illumination model from loaded data
+ /// Get illumination model from loaded data
void getIlluminationModel( int &illum_model );
- /// Gets a float value from data.
+ /// Gets a float value from data.
void getFloatValue( float &value );
- /// Creates a new material from loaded data.
+ /// Creates a new material from loaded data.
void createMaterial();
- /// Get texture name from loaded data.
+ /// Get texture name from loaded data.
void getTexture();
private:
- //! Absolute pathname
+ //! Absolute pathname
std::string m_strAbsPath;
- //! Data iterator showing to the current position in data buffer
+ //! Data iterator showing to the current position in data buffer
DataArrayIt m_DataIt;
- //! Data iterator to end of buffer
+ //! Data iterator to end of buffer
DataArrayIt m_DataItEnd;
- //! USed model instance
+ //! USed model instance
ObjFile::Model *m_pModel;
- //! Current line in file
+ //! Current line in file
unsigned int m_uiLine;
- //! Helper buffer
+ //! Helper buffer
char m_buffer[BUFFERSIZE];
};
diff --git a/3rdparty/assimp/code/ObjFileParser.cpp b/3rdparty/assimp/code/ObjFileParser.cpp
index 98214ba48..3d214bd13 100644
--- a/3rdparty/assimp/code/ObjFileParser.cpp
+++ b/3rdparty/assimp/code/ObjFileParser.cpp
@@ -58,7 +58,7 @@ const std::string ObjFileParser::DEFAULT_MATERIAL = AI_DEFAULT_MATERIAL_NAME;
// fix: changed that to our standard default name
// -------------------------------------------------------------------
-// Constructor with loaded data and directories.
+// Constructor with loaded data and directories.
ObjFileParser::ObjFileParser(std::vector<char> &Data,const std::string &strModelName, IOSystem *io ) :
m_DataIt(Data.begin()),
m_DataItEnd(Data.end()),
@@ -80,7 +80,7 @@ ObjFileParser::ObjFileParser(std::vector<char> &Data,const std::string &strModel
}
// -------------------------------------------------------------------
-// Destrcutor.
+// Destrcutor.
ObjFileParser::~ObjFileParser()
{
delete m_pModel->m_pDefaultMaterial;
@@ -91,14 +91,14 @@ ObjFileParser::~ObjFileParser()
}
// -------------------------------------------------------------------
-// Returns a pointer to the model instance.
+// Returns a pointer to the model instance.
ObjFile::Model *ObjFileParser::GetModel() const
{
return m_pModel;
}
// -------------------------------------------------------------------
-// File parsing method.
+// File parsing method.
void ObjFileParser::parseFile()
{
if (m_DataIt == m_DataItEnd)
@@ -183,7 +183,7 @@ void ObjFileParser::parseFile()
}
// -------------------------------------------------------------------
-// Copy the next word in a temporary buffer
+// Copy the next word in a temporary buffer
void ObjFileParser::copyNextWord(char *pBuffer, size_t length)
{
size_t index = 0;
@@ -217,7 +217,7 @@ void ObjFileParser::copyNextLine(char *pBuffer, size_t length)
}
// -------------------------------------------------------------------
-// Get values for a new 3D vector instance
+// Get values for a new 3D vector instance
void ObjFileParser::getVector3(std::vector<aiVector3D> &point3d_array)
{
float x, y, z;
@@ -236,7 +236,7 @@ void ObjFileParser::getVector3(std::vector<aiVector3D> &point3d_array)
}
// -------------------------------------------------------------------
-// Get values for a new 2D vector instance
+// Get values for a new 2D vector instance
void ObjFileParser::getVector2( std::vector<aiVector2D> &point2d_array )
{
float x, y;
@@ -252,7 +252,7 @@ void ObjFileParser::getVector2( std::vector<aiVector2D> &point2d_array )
}
// -------------------------------------------------------------------
-// Get values for a new face instance
+// Get values for a new face instance
void ObjFileParser::getFace()
{
copyNextLine(m_buffer, BUFFERSIZE);
@@ -363,7 +363,7 @@ void ObjFileParser::getFace()
}
// -------------------------------------------------------------------
-// Get values for a new material description
+// Get values for a new material description
void ObjFileParser::getMaterialDesc()
{
// Get next data for material data
@@ -403,7 +403,7 @@ void ObjFileParser::getMaterialDesc()
}
// -------------------------------------------------------------------
-// Get a comment, values will be skipped
+// Get a comment, values will be skipped
void ObjFileParser::getComment()
{
bool running = true;
@@ -422,7 +422,7 @@ void ObjFileParser::getComment()
}
// -------------------------------------------------------------------
-// Get material library from file.
+// Get material library from file.
void ObjFileParser::getMaterialLib()
{
// Translate tuple
@@ -455,7 +455,7 @@ void ObjFileParser::getMaterialLib()
}
// -------------------------------------------------------------------
-// Set a new material definition as the current material.
+// Set a new material definition as the current material.
void ObjFileParser::getNewMaterial()
{
m_DataIt = getNextToken<DataArrayIt>(m_DataIt, m_DataItEnd);
@@ -505,7 +505,7 @@ int ObjFileParser::getMaterialIndex( const std::string &strMaterialName )
}
// -------------------------------------------------------------------
-// Getter for a group name.
+// Getter for a group name.
void ObjFileParser::getGroupName()
{
// Get next word from data buffer
@@ -546,7 +546,7 @@ void ObjFileParser::getGroupName()
}
// -------------------------------------------------------------------
-// Not supported
+// Not supported
void ObjFileParser::getGroupNumber()
{
// Not used
@@ -555,8 +555,8 @@ void ObjFileParser::getGroupNumber()
}
// -------------------------------------------------------------------
-// Stores values for a new object instance, name will be used to
-// identify it.
+// Stores values for a new object instance, name will be used to
+// identify it.
void ObjFileParser::getObjectName()
{
m_DataIt = getNextToken<DataArrayIt>(m_DataIt, m_DataItEnd);
@@ -591,7 +591,7 @@ void ObjFileParser::getObjectName()
m_DataIt = skipLine<DataArrayIt>( m_DataIt, m_DataItEnd, m_uiLine );
}
// -------------------------------------------------------------------
-// Creates a new object instance
+// Creates a new object instance
void ObjFileParser::createObject(const std::string &strObjectName)
{
ai_assert( NULL != m_pModel );
@@ -601,6 +601,7 @@ void ObjFileParser::createObject(const std::string &strObjectName)
m_pModel->m_pCurrent->m_strObjName = strObjectName;
m_pModel->m_Objects.push_back( m_pModel->m_pCurrent );
+
createMesh();
if ( m_pModel->m_pCurrentMaterial )
@@ -611,7 +612,7 @@ void ObjFileParser::createObject(const std::string &strObjectName)
}
}
// -------------------------------------------------------------------
-// Creates a new mesh
+// Creates a new mesh
void ObjFileParser::createMesh()
{
ai_assert( NULL != m_pModel );
@@ -629,7 +630,7 @@ void ObjFileParser::createMesh()
}
// -------------------------------------------------------------------
-// Returns true, if a new mesh must be created.
+// Returns true, if a new mesh must be created.
bool ObjFileParser::needsNewMesh( const std::string &rMaterialName )
{
if (m_pModel->m_pCurrentMesh == 0)
@@ -650,7 +651,7 @@ bool ObjFileParser::needsNewMesh( const std::string &rMaterialName )
}
// -------------------------------------------------------------------
-// Shows an error in parsing process.
+// Shows an error in parsing process.
void ObjFileParser::reportErrorTokenInFace()
{
m_DataIt = skipLine<DataArrayIt>( m_DataIt, m_DataItEnd, m_uiLine );
@@ -659,6 +660,6 @@ void ObjFileParser::reportErrorTokenInFace()
// -------------------------------------------------------------------
-} // Namespace Assimp
+} // Namespace Assimp
#endif // !! ASSIMP_BUILD_NO_OBJ_IMPORTER
diff --git a/3rdparty/assimp/code/ObjFileParser.h b/3rdparty/assimp/code/ObjFileParser.h
index 8ad34f68f..e972a9add 100644
--- a/3rdparty/assimp/code/ObjFileParser.h
+++ b/3rdparty/assimp/code/ObjFileParser.h
@@ -60,8 +60,8 @@ struct Point2;
class ObjFileImporter;
class IOSystem;
-/// \class ObjFileParser
-/// \brief Parser for a obj waveform file
+/// \class ObjFileParser
+/// \brief Parser for a obj waveform file
class ObjFileParser
{
public:
@@ -71,28 +71,28 @@ public:
typedef std::vector<char>::const_iterator ConstDataArrayIt;
public:
- /// \brief Constructor with data array.
+ /// \brief Constructor with data array.
ObjFileParser(std::vector<char> &Data,const std::string &strModelName, IOSystem* io);
- /// \brief Destructor
+ /// \brief Destructor
~ObjFileParser();
- /// \brief Model getter.
+ /// \brief Model getter.
ObjFile::Model *GetModel() const;
private:
- /// Parse the loadedfile
+ /// Parse the loadedfile
void parseFile();
- /// Method to copy the new delimited word in the current line.
+ /// Method to copy the new delimited word in the current line.
void copyNextWord(char *pBuffer, size_t length);
- /// Method to copy the new line.
+ /// Method to copy the new line.
void copyNextLine(char *pBuffer, size_t length);
- /// Stores the following 3d vector.
+ /// Stores the following 3d vector.
void getVector3( std::vector<aiVector3D> &point3d_array );
- /// Stores the following 3d vector.
+ /// Stores the following 3d vector.
void getVector2(std::vector<aiVector2D> &point2d_array);
- /// Stores the following face.
+ /// Stores the following face.
void getFace();
void getMaterialDesc();
- /// Gets a comment.
+ /// Gets a comment.
void getComment();
/// Gets a a material library.
void getMaterialLib();
@@ -108,30 +108,30 @@ private:
void getObjectName();
/// Creates a new object.
void createObject(const std::string &strObjectName);
- /// Creates a new mesh.
+ /// Creates a new mesh.
void createMesh();
- /// Returns true, if a new mesh instance must be created.
+ /// Returns true, if a new mesh instance must be created.
bool needsNewMesh( const std::string &rMaterialName );
- /// Error report in token
+ /// Error report in token
void reportErrorTokenInFace();
private:
- /// Default material name
+ /// Default material name
static const std::string DEFAULT_MATERIAL;
- //! Iterator to current position in buffer
+ //! Iterator to current position in buffer
DataArrayIt m_DataIt;
- //! Iterator to end position of buffer
+ //! Iterator to end position of buffer
DataArrayIt m_DataItEnd;
- //! Pointer to model instance
+ //! Pointer to model instance
ObjFile::Model *m_pModel;
- //! Current line (for debugging)
+ //! Current line (for debugging)
unsigned int m_uiLine;
- //! Helper buffer
+ //! Helper buffer
char m_buffer[BUFFERSIZE];
- /// Pointer to IO system instance.
+ /// Pointer to IO system instance.
IOSystem *m_pIO;
};
-} // Namespace Assimp
+} // Namespace Assimp
#endif
diff --git a/3rdparty/assimp/code/ObjTools.h b/3rdparty/assimp/code/ObjTools.h
index 2fdfa0f13..96c339e50 100644
--- a/3rdparty/assimp/code/ObjTools.h
+++ b/3rdparty/assimp/code/ObjTools.h
@@ -38,8 +38,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
----------------------------------------------------------------------
*/
-/** @file ObjTools.h
- * @brief Some helpful templates for text parsing
+/** @file ObjTools.h
+ * @brief Some helpful templates for text parsing
*/
#ifndef OBJ_TOOLS_H_INC
#define OBJ_TOOLS_H_INC
@@ -49,10 +49,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
namespace Assimp
{
-/** @brief Returns true, if the last entry of the buffer is reached.
- * @param it Iterator of current position.
- * @param end Iterator with end of buffer.
- * @return true, if the end of the buffer is reached.
+/** @brief Returns true, if the last entry of the buffer is reached.
+ * @param it Iterator of current position.
+ * @param end Iterator with end of buffer.
+ * @return true, if the end of the buffer is reached.
*/
template<class char_t>
inline bool isEndOfBuffer( char_t it, char_t end )
@@ -68,9 +68,9 @@ inline bool isEndOfBuffer( char_t it, char_t end )
return ( it == end );
}
-/** @brief Returns true, if token is a space on any supported platform
-* @param token Token to search in
-* @return true, if token is a space
+/** @brief Returns true, if token is a space on any supported platform
+* @param token Token to search in
+* @return true, if token is a space
*/
inline bool isSeparator( char token )
{
@@ -81,19 +81,19 @@ inline bool isSeparator( char token )
token == '\t' );
}
-/** @brief Returns true, fi token id a new line marking token.
- * @param token Token to search in
- * @return true, if token is a newline token.
+/** @brief Returns true, fi token id a new line marking token.
+ * @param token Token to search in
+ * @return true, if token is a newline token.
*/
inline bool isNewLine( char token )
{
return ( token == '\n' || token == '\f' || token == '\r' );
}
-/** @brief Returns next word separated by a space
- * @param pBuffer Pointer to data buffer
- * @param pEnd Pointer to end of buffer
- * @return Pointer to next space
+/** @brief Returns next word separated by a space
+ * @param pBuffer Pointer to data buffer
+ * @param pEnd Pointer to end of buffer
+ * @return Pointer to next space
*/
template<class Char_T>
inline Char_T getNextWord( Char_T pBuffer, Char_T pEnd )
@@ -107,10 +107,10 @@ inline Char_T getNextWord( Char_T pBuffer, Char_T pEnd )
return pBuffer;
}
-/** @brief Returns ponter a next token
- * @param pBuffer Pointer to data buffer
- * @param pEnd Pointer to end of buffer
- * @return Pointer to next token
+/** @brief Returns ponter a next token
+ * @param pBuffer Pointer to data buffer
+ * @param pEnd Pointer to end of buffer
+ * @return Pointer to next token
*/
template<class Char_T>
inline Char_T getNextToken( Char_T pBuffer, Char_T pEnd )
@@ -124,11 +124,11 @@ inline Char_T getNextToken( Char_T pBuffer, Char_T pEnd )
return getNextWord( pBuffer, pEnd );
}
-/** @brief Skips a line
- * @param it Iterator set to current position
- * @param end Iterator set to end of scratch buffer for readout
- * @param uiLine Current linenumber in format
- * @return Current-iterator with new position
+/** @brief Skips a line
+ * @param it Iterator set to current position
+ * @param end Iterator set to end of scratch buffer for readout
+ * @param uiLine Current linenumber in format
+ * @return Current-iterator with new position
*/
template<class char_t>
inline char_t skipLine( char_t it, char_t end, unsigned int &uiLine )
@@ -146,11 +146,11 @@ inline char_t skipLine( char_t it, char_t end, unsigned int &uiLine )
return it;
}
-/** @brief Get a name, must be separated with a blank.
- * @param it set to current position
- * @param end set to end of scratch buffer for readout
- * @param name Separated name
- * @return Current-iterator with new position
+/** @brief Get a name, must be separated with a blank.
+ * @param it set to current position
+ * @param end set to end of scratch buffer for readout
+ * @param name Separated name
+ * @return Current-iterator with new position
*/
template<class char_t>
inline char_t getName( char_t it, char_t end, std::string &name )
@@ -174,12 +174,12 @@ inline char_t getName( char_t it, char_t end, std::string &name )
return it;
}
-/** @brief Get next word from given line
- * @param it set to current position
- * @param end set to end of scratch buffer for readout
- * @param pBuffer Buffer for next word
- * @param length Buffer length
- * @return Current-iterator with new position
+/** @brief Get next word from given line
+ * @param it set to current position
+ * @param end set to end of scratch buffer for readout
+ * @param pBuffer Buffer for next word
+ * @param length Buffer length
+ * @return Current-iterator with new position
*/
template<class char_t>
inline char_t CopyNextWord( char_t it, char_t end, char *pBuffer, size_t length )
@@ -198,11 +198,11 @@ inline char_t CopyNextWord( char_t it, char_t end, char *pBuffer, size_t length
return it;
}
-/** @brief Get next float from given line
- * @param it set to current position
- * @param end set to end of scratch buffer for readout
- * @param value Separated float value.
- * @return Current-iterator with new position
+/** @brief Get next float from given line
+ * @param it set to current position
+ * @param end set to end of scratch buffer for readout
+ * @param value Separated float value.
+ * @return Current-iterator with new position
*/
template<class char_t>
inline char_t getFloat( char_t it, char_t end, float &value )
diff --git a/3rdparty/assimp/code/OgreImporter.cpp b/3rdparty/assimp/code/OgreImporter.cpp
index 07bb2c5ec..9981b5632 100644
--- a/3rdparty/assimp/code/OgreImporter.cpp
+++ b/3rdparty/assimp/code/OgreImporter.cpp
@@ -407,7 +407,7 @@ void OgreImporter::ReadSubMesh(SubMesh &theSubMesh, XmlReader *Reader)
aiMesh* OgreImporter::CreateAssimpSubMesh(const SubMesh& theSubMesh, const vector<Bone>& Bones) const
{
- // const aiScene* const m_CurrentScene=this->m_CurrentScene;//make sure, that we can access but not change the scene
+ const aiScene* const m_CurrentScene=this->m_CurrentScene;//make sure, that we can access but not change the scene
aiMesh* NewAiMesh=new aiMesh();
@@ -499,7 +499,7 @@ aiMesh* OgreImporter::CreateAssimpSubMesh(const SubMesh& theSubMesh, const vecto
void OgreImporter::LoadSkeleton(std::string FileName, vector<Bone> &Bones, vector<Animation> &Animations) const
{
- //const aiScene* const m_CurrentScene=this->m_CurrentScene;//make sure, that we can access but not change the scene
+ const aiScene* const m_CurrentScene=this->m_CurrentScene;//make sure, that we can access but not change the scene
//most likely the skeleton file will only end with .skeleton
@@ -705,7 +705,7 @@ void OgreImporter::LoadSkeleton(std::string FileName, vector<Bone> &Bones, vecto
}
-void OgreImporter::CreateAssimpSkeleton(const std::vector<Bone> &Bones, const std::vector<Animation> &/*Animations*/)
+void OgreImporter::CreateAssimpSkeleton(const std::vector<Bone> &Bones, const std::vector<Animation> &Animations)
{
if (!m_CurrentScene->mRootNode)
throw DeadlyImportError("No root node exists!!");
@@ -724,9 +724,12 @@ void OgreImporter::CreateAssimpSkeleton(const std::vector<Bone> &Bones, const st
RootBoneNodes.push_back(CreateAiNodeFromBone(theBone.Id, Bones, m_CurrentScene->mRootNode));//which will recursily add all other nodes
}
}
- m_CurrentScene->mRootNode->mNumChildren=RootBoneNodes.size();
- m_CurrentScene->mRootNode->mChildren=new aiNode*[RootBoneNodes.size()];
- memcpy(m_CurrentScene->mRootNode->mChildren, &RootBoneNodes[0], sizeof(aiNode*)*RootBoneNodes.size());
+
+ if (RootBoneNodes.size()) {
+ m_CurrentScene->mRootNode->mNumChildren=RootBoneNodes.size();
+ m_CurrentScene->mRootNode->mChildren=new aiNode*[RootBoneNodes.size()];
+ memcpy(m_CurrentScene->mRootNode->mChildren, &RootBoneNodes[0], sizeof(aiNode*)*RootBoneNodes.size());
+ }
}
@@ -774,9 +777,9 @@ void OgreImporter::PutAnimationsInScene(const std::vector<Bone> &Bones, const st
aiMatrix4x4 t2, t3;
//Create a matrix to transfrom a vector from the bones default pose to the bone bones in this animation key
- aiMatrix4x4 PoseToKey=aiMatrix4x4::Scaling(Animations[i].Tracks[j].Keyframes[k].Scaling, t2) //scale
- * aiMatrix4x4(Animations[i].Tracks[j].Keyframes[k].Rotation.GetMatrix()) //rot
- * aiMatrix4x4::Translation(Animations[i].Tracks[j].Keyframes[k].Position, t3); //pos
+ aiMatrix4x4 PoseToKey=aiMatrix4x4::Scaling(Animations[i].Tracks[j].Keyframes[k].Scaling, t2) //scale
+ * aiMatrix4x4(Animations[i].Tracks[j].Keyframes[k].Rotation.GetMatrix()) //rot
+ * aiMatrix4x4::Translation(Animations[i].Tracks[j].Keyframes[k].Position, t3); //pos
//calculate the complete transformation from world space to bone space
@@ -814,7 +817,7 @@ void OgreImporter::PutAnimationsInScene(const std::vector<Bone> &Bones, const st
aiNode* OgreImporter::CreateAiNodeFromBone(int BoneId, const std::vector<Bone> &Bones, aiNode* ParentNode) const
{
- //const aiScene* const m_CurrentScene=this->m_CurrentScene;//make sure, that we can access but not change the scene
+ const aiScene* const m_CurrentScene=this->m_CurrentScene;//make sure, that we can access but not change the scene
//----Create the node for this bone and set its values-----
aiNode* NewNode=new aiNode(Bones[BoneId].Name);
@@ -823,7 +826,7 @@ aiNode* OgreImporter::CreateAiNodeFromBone(int BoneId, const std::vector<Bone> &
aiMatrix4x4 t0,t1;
//create a matrix from the transformation values of the ogre bone
NewNode->mTransformation=aiMatrix4x4::Rotation(Bones[BoneId].RotationAngle, Bones[BoneId].RotationAxis, t1)
- * aiMatrix4x4::Translation(Bones[BoneId].Position, t0)
+ * aiMatrix4x4::Translation(Bones[BoneId].Position, t0)
;
//__________________________________________________________
diff --git a/3rdparty/assimp/code/OgreImporter.h b/3rdparty/assimp/code/OgreImporter.h
index a66024413..ee5747260 100644
--- a/3rdparty/assimp/code/OgreImporter.h
+++ b/3rdparty/assimp/code/OgreImporter.h
@@ -11,19 +11,15 @@ namespace Ogre
{
-//
+//Forward declarations:
+struct SubMesh;
+
///For the moment just triangles, no other polygon types!
struct Face
{
unsigned int VertexIndices[3];
};
-struct BoneAssignment
-{
- unsigned int BoneId;//this is, what we get from ogre
- std::string BoneName;//this is, what we need for assimp
-};
-
///for a vertex->bone structur
struct Weight
{
@@ -83,25 +79,6 @@ struct Animation
std::vector<Track> Tracks;
};
-///A submesh from Ogre
-struct SubMesh
-{
- std::string Name;
- std::string MaterialName;
- std::vector<Face> FaceList;
- std::vector<aiVector3D> Positions;
- bool HasPositions;
- std::vector<aiVector3D> Normals;
- bool HasNormals;
- std::vector<aiVector3D> Uvs;
- unsigned int NumUvs;//nearly always 2d, but assimp has always 3d texcoords
- std::vector< std::vector<Weight> > Weights;//a list of bones for each vertex
- int MaterialIndex;///< The Index in the Assimp Materialarray from the material witch is attached to this submesh
- unsigned int BonesUsed;//the highest index of a bone from a bone weight, this is needed to create the assimp bone structur (converting from Vertex-Bones to Bone-Vertices)
-
- SubMesh(): HasPositions(false), HasNormals(false), NumUvs(0), MaterialIndex(-1), BonesUsed(0) {}//initialize everything
-};
-
///The Main Ogre Importer Class
class OgreImporter : public BaseImporter
{
@@ -139,5 +116,27 @@ private:
aiScene *m_CurrentScene;
};
+///A submesh from Ogre
+struct SubMesh
+{
+ std::string Name;
+ std::string MaterialName;
+ std::vector<Face> FaceList;
+ std::vector<aiVector3D> Positions; bool HasPositions;
+ std::vector<aiVector3D> Normals; bool HasNormals;
+ std::vector<aiVector3D> Uvs; unsigned int NumUvs;//nearly always 2d, but assimp has always 3d texcoords
+ std::vector< std::vector<Weight> > Weights;//a list of bones for each vertex
+ int MaterialIndex;///< The Index in the Assimp Materialarray from the material witch is attached to this submesh
+ unsigned int BonesUsed;//the highest index of a bone from a bone weight, this is needed to create the assimp bone structur (converting from Vertex-Bones to Bone-Vertices)
+
+ SubMesh(): HasPositions(false), HasNormals(false), NumUvs(0), MaterialIndex(-1), BonesUsed(0) {}//initialize everything
+};
+
+struct BoneAssignment
+{
+ unsigned int BoneId;//this is, what we get from ogre
+ std::string BoneName;//this is, what we need for assimp
+};
+
}//namespace Ogre
}//namespace Assimp
diff --git a/3rdparty/assimp/code/OgreImporterMaterial.cpp b/3rdparty/assimp/code/OgreImporterMaterial.cpp
index c3986e002..02f18a7ab 100644
--- a/3rdparty/assimp/code/OgreImporterMaterial.cpp
+++ b/3rdparty/assimp/code/OgreImporterMaterial.cpp
@@ -68,7 +68,7 @@ namespace Ogre
aiMaterial* OgreImporter::LoadMaterial(const std::string MaterialName) const
{
- // const aiScene* const m_CurrentScene=this->m_CurrentScene;//make sure, that we can access but not change the scene
+ const aiScene* const m_CurrentScene=this->m_CurrentScene;//make sure, that we can access but not change the scene
MaterialHelper *NewMaterial=new MaterialHelper();
@@ -126,7 +126,7 @@ aiMaterial* OgreImporter::LoadMaterial(const std::string MaterialName) const
string Line;
ss >> Line;
-// unsigned int Level=0;//Hierarchielevels in the material file, like { } blocks into another
+// unsigned int Level=0;//Hierarchielevels in the material file, like { } blocks into another
while (!ss.eof())
{
if (Line=="material")
diff --git a/3rdparty/assimp/code/OptimizeGraph.cpp b/3rdparty/assimp/code/OptimizeGraph.cpp
index a4829e126..0529fedd9 100644
--- a/3rdparty/assimp/code/OptimizeGraph.cpp
+++ b/3rdparty/assimp/code/OptimizeGraph.cpp
@@ -58,11 +58,11 @@ using namespace Assimp;
*/
#ifdef AI_OG_USE_HASHING
// Use our standard hashing function to compute the hash
-# define AI_OG_GETKEY(str) SuperFastHash(str.data,str.length)
+# define AI_OG_GETKEY(str) SuperFastHash(str.data,str.length)
#else
// Otherwise hope that std::string will utilize a static buffer
// for shorter node names. This would avoid endless heap copying.
-# define AI_OG_GETKEY(str) std::string(str.data)
+# define AI_OG_GETKEY(str) std::string(str.data)
#endif
// ------------------------------------------------------------------------------------------------
@@ -139,7 +139,7 @@ void OptimizeGraphProcess::CollectNewChildren(aiNode* nd, std::list<aiNode*>& no
const LockedSetType::const_iterator end = locked.end();
std::list<aiNode*> join;
- for (std::list<aiNode*>::iterator it = child_nodes.begin(); it != child_nodes.end();) {
+ for (std::list<aiNode*>::iterator it = child_nodes.begin(); it != child_nodes.end();) {
aiNode* child = *it;
if (child->mNumChildren == 0 && locked.find(AI_OG_GETKEY(child->mName)) == end) {
diff --git a/3rdparty/assimp/code/OptimizeGraph.h b/3rdparty/assimp/code/OptimizeGraph.h
index 0572419ea..c6d51dfec 100644
--- a/3rdparty/assimp/code/OptimizeGraph.h
+++ b/3rdparty/assimp/code/OptimizeGraph.h
@@ -50,7 +50,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
struct aiMesh;
class OptimizeGraphProcessTest;
-namespace Assimp {
+namespace Assimp {
// -----------------------------------------------------------------------------
/** @brief Postprocessing step to optimize the scenegraph
diff --git a/3rdparty/assimp/code/OptimizeMeshes.h b/3rdparty/assimp/code/OptimizeMeshes.h
index f7284cccc..406e9542a 100644
--- a/3rdparty/assimp/code/OptimizeMeshes.h
+++ b/3rdparty/assimp/code/OptimizeMeshes.h
@@ -49,7 +49,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
struct aiMesh;
class OptimizeMeshesProcessTest;
-namespace Assimp {
+namespace Assimp {
// ---------------------------------------------------------------------------
/** @brief Postprocessing step to optimize mesh usage
@@ -77,9 +77,9 @@ protected:
struct MeshInfo
{
MeshInfo()
- : instance_cnt (0)
- , vertex_format (0)
- , output_id (0xffffffff)
+ : instance_cnt (0)
+ , vertex_format (0)
+ , output_id (0xffffffff)
{}
//! Number of times this mesh is referenced
diff --git a/3rdparty/assimp/code/PlyLoader.cpp b/3rdparty/assimp/code/PlyLoader.cpp
index f7f7d05ca..2c5dc4c97 100644
--- a/3rdparty/assimp/code/PlyLoader.cpp
+++ b/3rdparty/assimp/code/PlyLoader.cpp
@@ -105,7 +105,7 @@ void PLYImporter::InternReadFile( const std::string& pFile,
// the beginning of the file must be PLY - magic, magic
if ((mBuffer[0] != 'P' && mBuffer[0] != 'p') ||
(mBuffer[1] != 'L' && mBuffer[1] != 'l') ||
- (mBuffer[2] != 'Y' && mBuffer[2] != 'y')) {
+ (mBuffer[2] != 'Y' && mBuffer[2] != 'y')) {
throw DeadlyImportError( "Invalid .ply file: Magic number \'ply\' is no there");
}
@@ -237,11 +237,11 @@ void PLYImporter::InternReadFile( const std::string& pFile,
// ------------------------------------------------------------------------------------------------
// Split meshes by material IDs
void PLYImporter::ConvertMeshes(std::vector<PLY::Face>* avFaces,
- const std::vector<aiVector3D>* avPositions,
- const std::vector<aiVector3D>* avNormals,
- const std::vector<aiColor4D>* avColors,
- const std::vector<aiVector2D>* avTexCoords,
- const std::vector<MaterialHelper*>* avMaterials,
+ const std::vector<aiVector3D>* avPositions,
+ const std::vector<aiVector3D>* avNormals,
+ const std::vector<aiColor4D>* avColors,
+ const std::vector<aiVector2D>* avTexCoords,
+ const std::vector<MaterialHelper*>* avMaterials,
std::vector<aiMesh*>* avOut)
{
ai_assert(NULL != avFaces);
@@ -331,18 +331,18 @@ void PLYImporter::ReplaceDefaultMaterial(std::vector<PLY::Face>* avFaces,
{
bool bNeedDefaultMat = false;
- for (std::vector<PLY::Face>::iterator i = avFaces->begin();i != avFaces->end();++i) {
- if (0xFFFFFFFF == (*i).iMaterialIndex) {
+ for (std::vector<PLY::Face>::iterator i = avFaces->begin();i != avFaces->end();++i) {
+ if (0xFFFFFFFF == (*i).iMaterialIndex) {
bNeedDefaultMat = true;
(*i).iMaterialIndex = (unsigned int)avMaterials->size();
}
- else if ((*i).iMaterialIndex >= avMaterials->size() ) {
+ else if ((*i).iMaterialIndex >= avMaterials->size() ) {
// clamp the index
(*i).iMaterialIndex = (unsigned int)avMaterials->size()-1;
}
}
- if (bNeedDefaultMat) {
+ if (bNeedDefaultMat) {
// generate a default material
MaterialHelper* pcHelper = new MaterialHelper();
@@ -713,16 +713,16 @@ void PLYImporter::LoadFaces(std::vector<PLY::Face>* pvOut)
{
// must be a dynamic list!
if (!(*a).bIsList)continue;
- iProperty = _a;
- bOne = true;
- eType = (*a).eType;
+ iProperty = _a;
+ bOne = true;
+ eType = (*a).eType;
}
else if (PLY::EST_MaterialIndex == (*a).Semantic)
{
if ((*a).bIsList)continue;
- iMaterialIndex = _a;
- bOne = true;
- eType2 = (*a).eType;
+ iMaterialIndex = _a;
+ bOne = true;
+ eType2 = (*a).eType;
}
}
break;
@@ -739,10 +739,10 @@ void PLYImporter::LoadFaces(std::vector<PLY::Face>* pvOut)
{
// must be a dynamic list!
if (!(*a).bIsList)continue;
- iProperty = _a;
- bOne = true;
- bIsTristrip = true;
- eType = (*a).eType;
+ iProperty = _a;
+ bOne = true;
+ bIsTristrip = true;
+ eType = (*a).eType;
break;
}
break;
@@ -793,10 +793,10 @@ void PLYImporter::LoadFaces(std::vector<PLY::Face>* pvOut)
pvOut->reserve(pvOut->size() + quak.size() + (quak.size()>>2u));
int aiTable[2] = {-1,-1};
- for (std::vector<PLY::PropertyInstance::ValueUnion>::const_iterator a = quak.begin();a != quak.end();++a) {
+ for (std::vector<PLY::PropertyInstance::ValueUnion>::const_iterator a = quak.begin();a != quak.end();++a) {
const int p = PLY::PropertyInstance::ConvertTo<int>(*a,eType);
- if (-1 == p) {
+ if (-1 == p) {
// restart the strip ...
aiTable[0] = aiTable[1] = -1;
flip = false;
@@ -915,87 +915,87 @@ void PLYImporter::LoadMaterial(std::vector<MaterialHelper*>* pvOut)
// pohng specularity -----------------------------------
if (PLY::EST_PhongPower == (*a).Semantic)
{
- iPhong = _a;
- ePhong = (*a).eType;
+ iPhong = _a;
+ ePhong = (*a).eType;
}
// general opacity -----------------------------------
if (PLY::EST_Opacity == (*a).Semantic)
{
- iOpacity = _a;
- eOpacity = (*a).eType;
+ iOpacity = _a;
+ eOpacity = (*a).eType;
}
// diffuse color channels -----------------------------------
if (PLY::EST_DiffuseRed == (*a).Semantic)
{
- aaiPositions[0][0] = _a;
- aaiTypes[0][0] = (*a).eType;
+ aaiPositions[0][0] = _a;
+ aaiTypes[0][0] = (*a).eType;
}
else if (PLY::EST_DiffuseGreen == (*a).Semantic)
{
- aaiPositions[0][1] = _a;
- aaiTypes[0][1] = (*a).eType;
+ aaiPositions[0][1] = _a;
+ aaiTypes[0][1] = (*a).eType;
}
else if (PLY::EST_DiffuseBlue == (*a).Semantic)
{
- aaiPositions[0][2] = _a;
- aaiTypes[0][2] = (*a).eType;
+ aaiPositions[0][2] = _a;
+ aaiTypes[0][2] = (*a).eType;
}
else if (PLY::EST_DiffuseAlpha == (*a).Semantic)
{
- aaiPositions[0][3] = _a;
- aaiTypes[0][3] = (*a).eType;
+ aaiPositions[0][3] = _a;
+ aaiTypes[0][3] = (*a).eType;
}
// specular color channels -----------------------------------
else if (PLY::EST_SpecularRed == (*a).Semantic)
{
- aaiPositions[1][0] = _a;
- aaiTypes[1][0] = (*a).eType;
+ aaiPositions[1][0] = _a;
+ aaiTypes[1][0] = (*a).eType;
}
else if (PLY::EST_SpecularGreen == (*a).Semantic)
{
- aaiPositions[1][1] = _a;
- aaiTypes[1][1] = (*a).eType;
+ aaiPositions[1][1] = _a;
+ aaiTypes[1][1] = (*a).eType;
}
else if (PLY::EST_SpecularBlue == (*a).Semantic)
{
- aaiPositions[1][2] = _a;
- aaiTypes[1][2] = (*a).eType;
+ aaiPositions[1][2] = _a;
+ aaiTypes[1][2] = (*a).eType;
}
else if (PLY::EST_SpecularAlpha == (*a).Semantic)
{
- aaiPositions[1][3] = _a;
- aaiTypes[1][3] = (*a).eType;
+ aaiPositions[1][3] = _a;
+ aaiTypes[1][3] = (*a).eType;
}
// ambient color channels -----------------------------------
else if (PLY::EST_AmbientRed == (*a).Semantic)
{
- aaiPositions[2][0] = _a;
- aaiTypes[2][0] = (*a).eType;
+ aaiPositions[2][0] = _a;
+ aaiTypes[2][0] = (*a).eType;
}
else if (PLY::EST_AmbientGreen == (*a).Semantic)
{
- aaiPositions[2][1] = _a;
- aaiTypes[2][1] = (*a).eType;
+ aaiPositions[2][1] = _a;
+ aaiTypes[2][1] = (*a).eType;
}
else if (PLY::EST_AmbientBlue == (*a).Semantic)
{
- aaiPositions[2][2] = _a;
- aaiTypes[2][2] = (*a).eType;
+ aaiPositions[2][2] = _a;
+ aaiTypes[2][2] = (*a).eType;
}
else if (PLY::EST_AmbientAlpha == (*a).Semantic)
{
- aaiPositions[2][3] = _a;
- aaiTypes[2][3] = (*a).eType;
+ aaiPositions[2][3] = _a;
+ aaiTypes[2][3] = (*a).eType;
}
}
break;
}
}
// check whether we have a valid source for the material data
- if (NULL != pcList) {
- for (std::vector<ElementInstance>::const_iterator i = pcList->alInstances.begin();i != pcList->alInstances.end();++i) {
+ if (NULL != pcList) {
+ for (std::vector<ElementInstance>::const_iterator i = pcList->alInstances.begin();i != pcList->alInstances.end();++i) {
aiColor4D clrOut;
MaterialHelper* pcHelper = new MaterialHelper();
@@ -1013,12 +1013,12 @@ void PLYImporter::LoadMaterial(std::vector<MaterialHelper*>* pvOut)
// handle phong power and shading mode
int iMode;
- if (0xFFFFFFFF != iPhong) {
+ if (0xFFFFFFFF != iPhong) {
float fSpec = PLY::PropertyInstance::ConvertTo<float>((*i).alProperties[iPhong].avList.front(),ePhong);
// if shininess is 0 (and the pow() calculation would therefore always
// become 1, not depending on the angle), use gouraud lighting
- if (fSpec) {
+ if (fSpec) {
// scale this with 15 ... hopefully this is correct
fSpec *= 15;
pcHelper->AddProperty<float>(&fSpec, 1, AI_MATKEY_SHININESS);
@@ -1031,7 +1031,7 @@ void PLYImporter::LoadMaterial(std::vector<MaterialHelper*>* pvOut)
pcHelper->AddProperty<int>(&iMode, 1, AI_MATKEY_SHADING_MODEL);
// handle opacity
- if (0xFFFFFFFF != iOpacity) {
+ if (0xFFFFFFFF != iOpacity) {
float fOpacity = PLY::PropertyInstance::ConvertTo<float>((*i).alProperties[iPhong].avList.front(),eOpacity);
pcHelper->AddProperty<float>(&fOpacity, 1, AI_MATKEY_OPACITY);
}
diff --git a/3rdparty/assimp/code/PlyLoader.h b/3rdparty/assimp/code/PlyLoader.h
index 814321d7c..3cdfb5e18 100644
--- a/3rdparty/assimp/code/PlyLoader.h
+++ b/3rdparty/assimp/code/PlyLoader.h
@@ -51,7 +51,7 @@ struct aiNode;
#include "PlyParser.h"
-namespace Assimp {
+namespace Assimp {
class MaterialHelper;
using namespace PLY;
diff --git a/3rdparty/assimp/code/PlyParser.h b/3rdparty/assimp/code/PlyParser.h
index 379ea4a0a..5b95442ab 100644
--- a/3rdparty/assimp/code/PlyParser.h
+++ b/3rdparty/assimp/code/PlyParser.h
@@ -181,7 +181,7 @@ enum ESemantic
enum EElementSemantic
{
//! The element is a vertex
- EEST_Vertex = 0x0u,
+ EEST_Vertex = 0x0u,
//! The element is a face description (index table)
EEST_Face,
@@ -213,17 +213,17 @@ public:
: eType (EDT_Int), bIsList(false), eFirstType(EDT_UChar)
{}
- //! Data type of the property
+ //! Data type of the property
EDataType eType;
- //! Semantical meaning of the property
+ //! Semantical meaning of the property
ESemantic Semantic;
//! Of the semantic of the property could not be parsed:
//! Contains the semantic specified in the file
std::string szName;
- //! Specifies whether the data type is a list where
+ //! Specifies whether the data type is a list where
//! the first element specifies the size of the list
bool bIsList;
EDataType eFirstType;
@@ -257,8 +257,8 @@ public:
//! Default constructor
Element()
- : eSemantic (EEST_INVALID)
- , NumOccur(0)
+ : eSemantic (EEST_INVALID)
+ , NumOccur(0)
{}
//! List of properties assigned to the element
diff --git a/3rdparty/assimp/code/PretransformVertices.cpp b/3rdparty/assimp/code/PretransformVertices.cpp
index 6da3bdf73..cd97b4a6f 100644
--- a/3rdparty/assimp/code/PretransformVertices.cpp
+++ b/3rdparty/assimp/code/PretransformVertices.cpp
@@ -57,7 +57,7 @@ using namespace Assimp;
// ------------------------------------------------------------------------------------------------
// Constructor to be privately used by Importer
PretransformVertices::PretransformVertices()
-: configKeepHierarchy (false)
+: configKeepHierarchy (false)
{
}
@@ -72,7 +72,7 @@ PretransformVertices::~PretransformVertices()
// Returns whether the processing step is present in the given flag field.
bool PretransformVertices::IsActive( unsigned int pFlags) const
{
- return (pFlags & aiProcess_PreTransformVertices) != 0;
+ return (pFlags & aiProcess_PreTransformVertices) != 0;
}
// ------------------------------------------------------------------------------------------------
@@ -155,7 +155,7 @@ void PretransformVertices::CollectData( aiScene* pcScene, aiNode* pcNode, unsign
ai_assert(0 != num_ref);
--num_ref;
- if (identity) {
+ if (identity) {
// copy positions without modifying them
::memcpy(pcMeshOut->mVertices + aiCurrent[AI_PTVS_VERTEX],
pcMesh->mVertices,
@@ -182,7 +182,7 @@ void PretransformVertices::CollectData( aiScene* pcScene, aiNode* pcNode, unsign
else
{
// copy positions, transform them to worldspace
- for (unsigned int n = 0; n < pcMesh->mNumVertices;++n) {
+ for (unsigned int n = 0; n < pcMesh->mNumVertices;++n) {
pcMeshOut->mVertices[aiCurrent[AI_PTVS_VERTEX]+n] = pcNode->mTransformation * pcMesh->mVertices[n];
}
aiMatrix4x4 mWorldIT = pcNode->mTransformation;
@@ -194,7 +194,7 @@ void PretransformVertices::CollectData( aiScene* pcScene, aiNode* pcNode, unsign
if (iVFormat & 0x2)
{
// copy normals, transform them to worldspace
- for (unsigned int n = 0; n < pcMesh->mNumVertices;++n) {
+ for (unsigned int n = 0; n < pcMesh->mNumVertices;++n) {
pcMeshOut->mNormals[aiCurrent[AI_PTVS_VERTEX]+n] =
m * pcMesh->mNormals[n];
}
@@ -202,7 +202,7 @@ void PretransformVertices::CollectData( aiScene* pcScene, aiNode* pcNode, unsign
if (iVFormat & 0x4)
{
// copy tangents and bitangents, transform them to worldspace
- for (unsigned int n = 0; n < pcMesh->mNumVertices;++n) {
+ for (unsigned int n = 0; n < pcMesh->mNumVertices;++n) {
pcMeshOut->mTangents [aiCurrent[AI_PTVS_VERTEX]+n] = m * pcMesh->mTangents[n];
pcMeshOut->mBitangents[aiCurrent[AI_PTVS_VERTEX]+n] = m * pcMesh->mBitangents[n];
}
@@ -294,7 +294,7 @@ void PretransformVertices::GetVFormatList( aiScene* pcScene, unsigned int iMat,
for (unsigned int i = 0; i < pcScene->mNumMeshes;++i)
{
aiMesh* pcMesh = pcScene->mMeshes[ i ];
- if (iMat == pcMesh->mMaterialIndex) {
+ if (iMat == pcMesh->mMaterialIndex) {
aiOut.push_back(GetMeshVFormat(pcMesh));
}
}
@@ -304,11 +304,11 @@ void PretransformVertices::GetVFormatList( aiScene* pcScene, unsigned int iMat,
// Compute the absolute transformation matrices of each node
void PretransformVertices::ComputeAbsoluteTransform( aiNode* pcNode )
{
- if (pcNode->mParent) {
+ if (pcNode->mParent) {
pcNode->mTransformation = pcNode->mParent->mTransformation*pcNode->mTransformation;
}
- for (unsigned int i = 0;i < pcNode->mNumChildren;++i) {
+ for (unsigned int i = 0;i < pcNode->mNumChildren;++i) {
ComputeAbsoluteTransform(pcNode->mChildren[i]);
}
}
@@ -443,7 +443,7 @@ void PretransformVertices::Execute( aiScene* pScene)
// Delete aiMesh::mBones for all meshes. The bones are
// removed during this step and we need the pointer as
// temporary storage
- for (unsigned int i = 0; i < pScene->mNumMeshes;++i) {
+ for (unsigned int i = 0; i < pScene->mNumMeshes;++i) {
aiMesh* mesh = pScene->mMeshes[i];
for (unsigned int a = 0; a < mesh->mNumBones;++a)
@@ -493,13 +493,13 @@ void PretransformVertices::Execute( aiScene* pScene)
std::vector<unsigned int> s(pScene->mNumMeshes,0);
BuildMeshRefCountArray(pScene->mRootNode,&s[0]);
- for (unsigned int i = 0; i < pScene->mNumMaterials;++i) {
+ for (unsigned int i = 0; i < pScene->mNumMaterials;++i) {
// get the list of all vertex formats for this material
aiVFormats.clear();
GetVFormatList(pScene,i,aiVFormats);
aiVFormats.sort();
aiVFormats.unique();
- for (std::list<unsigned int>::const_iterator j = aiVFormats.begin();j != aiVFormats.end();++j) {
+ for (std::list<unsigned int>::const_iterator j = aiVFormats.begin();j != aiVFormats.end();++j) {
unsigned int iVertices = 0;
unsigned int iFaces = 0;
CountVerticesAndFaces(pScene,pScene->mRootNode,i,*j,&iFaces,&iVertices);
@@ -561,7 +561,7 @@ void PretransformVertices::Execute( aiScene* pScene)
}
// If no meshes are referenced in the node graph it is possible that we get no output meshes.
- if (apcOutMeshes.empty()) {
+ if (apcOutMeshes.empty()) {
throw DeadlyImportError("No output meshes: all meshes are orphaned and are not referenced by nodes");
}
else
diff --git a/3rdparty/assimp/code/PretransformVertices.h b/3rdparty/assimp/code/PretransformVertices.h
index 41f2f38ed..df2d84509 100644
--- a/3rdparty/assimp/code/PretransformVertices.h
+++ b/3rdparty/assimp/code/PretransformVertices.h
@@ -49,7 +49,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "../include/aiMesh.h"
class PretransformVerticesTest;
-namespace Assimp {
+namespace Assimp {
// ---------------------------------------------------------------------------
/** The PretransformVertices pretransforms all vertices in the nodegraph
diff --git a/3rdparty/assimp/code/ProcessHelper.h b/3rdparty/assimp/code/ProcessHelper.h
index 349da1735..4e8b1dec5 100644
--- a/3rdparty/assimp/code/ProcessHelper.h
+++ b/3rdparty/assimp/code/ProcessHelper.h
@@ -55,62 +55,62 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
namespace std {
// std::min for aiVector3D
- inline ::aiVector3D min (const ::aiVector3D& a, const ::aiVector3D& b) {
+ inline ::aiVector3D min (const ::aiVector3D& a, const ::aiVector3D& b) {
return ::aiVector3D (min(a.x,b.x),min(a.y,b.y),min(a.z,b.z));
}
// std::max for aiVector3D
- inline ::aiVector3D max (const ::aiVector3D& a, const ::aiVector3D& b) {
+ inline ::aiVector3D max (const ::aiVector3D& a, const ::aiVector3D& b) {
return ::aiVector3D (max(a.x,b.x),max(a.y,b.y),max(a.z,b.z));
}
// std::min for aiColor4D
- inline ::aiColor4D min (const ::aiColor4D& a, const ::aiColor4D& b) {
+ inline ::aiColor4D min (const ::aiColor4D& a, const ::aiColor4D& b) {
return ::aiColor4D (min(a.r,b.r),min(a.g,b.g),min(a.b,b.b),min(a.a,b.a));
}
// std::max for aiColor4D
- inline ::aiColor4D max (const ::aiColor4D& a, const ::aiColor4D& b) {
+ inline ::aiColor4D max (const ::aiColor4D& a, const ::aiColor4D& b) {
return ::aiColor4D (max(a.r,b.r),max(a.g,b.g),max(a.b,b.b),max(a.a,b.a));
}
// std::min for aiQuaternion
- inline ::aiQuaternion min (const ::aiQuaternion& a, const ::aiQuaternion& b) {
+ inline ::aiQuaternion min (const ::aiQuaternion& a, const ::aiQuaternion& b) {
return ::aiQuaternion (min(a.w,b.w),min(a.x,b.x),min(a.y,b.y),min(a.z,b.z));
}
// std::max for aiQuaternion
- inline ::aiQuaternion max (const ::aiQuaternion& a, const ::aiQuaternion& b) {
+ inline ::aiQuaternion max (const ::aiQuaternion& a, const ::aiQuaternion& b) {
return ::aiQuaternion (max(a.w,b.w),max(a.x,b.x),max(a.y,b.y),max(a.z,b.z));
}
// std::min for aiVectorKey
- inline ::aiVectorKey min (const ::aiVectorKey& a, const ::aiVectorKey& b) {
+ inline ::aiVectorKey min (const ::aiVectorKey& a, const ::aiVectorKey& b) {
return ::aiVectorKey (min(a.mTime,b.mTime),min(a.mValue,b.mValue));
}
// std::max for aiVectorKey
- inline ::aiVectorKey max (const ::aiVectorKey& a, const ::aiVectorKey& b) {
+ inline ::aiVectorKey max (const ::aiVectorKey& a, const ::aiVectorKey& b) {
return ::aiVectorKey (max(a.mTime,b.mTime),max(a.mValue,b.mValue));
}
// std::min for aiQuatKey
- inline ::aiQuatKey min (const ::aiQuatKey& a, const ::aiQuatKey& b) {
+ inline ::aiQuatKey min (const ::aiQuatKey& a, const ::aiQuatKey& b) {
return ::aiQuatKey (min(a.mTime,b.mTime),min(a.mValue,b.mValue));
}
// std::max for aiQuatKey
- inline ::aiQuatKey max (const ::aiQuatKey& a, const ::aiQuatKey& b) {
+ inline ::aiQuatKey max (const ::aiQuatKey& a, const ::aiQuatKey& b) {
return ::aiQuatKey (max(a.mTime,b.mTime),max(a.mValue,b.mValue));
}
// std::min for aiVertexWeight
- inline ::aiVertexWeight min (const ::aiVertexWeight& a, const ::aiVertexWeight& b) {
+ inline ::aiVertexWeight min (const ::aiVertexWeight& a, const ::aiVertexWeight& b) {
return ::aiVertexWeight (min(a.mVertexId,b.mVertexId),min(a.mWeight,b.mWeight));
}
// std::max for aiVertexWeight
- inline ::aiVertexWeight max (const ::aiVertexWeight& a, const ::aiVertexWeight& b) {
+ inline ::aiVertexWeight max (const ::aiVertexWeight& a, const ::aiVertexWeight& b) {
return ::aiVertexWeight (max(a.mVertexId,b.mVertexId),max(a.mWeight,b.mWeight));
}
@@ -431,7 +431,7 @@ inline unsigned int GetMeshVFormatUnique(aiMesh* pcMesh)
}
typedef std::pair <unsigned int,float> PerVertexWeight;
-typedef std::vector <PerVertexWeight> VertexWeightTable;
+typedef std::vector <PerVertexWeight> VertexWeightTable;
// -------------------------------------------------------------------------------
// Compute a per-vertex bone weight table
@@ -445,7 +445,7 @@ inline VertexWeightTable* ComputeVertexBoneWeightTable(aiMesh* pMesh)
for (unsigned int i = 0; i < pMesh->mNumBones;++i)
{
aiBone* bone = pMesh->mBones[i];
- for (unsigned int a = 0; a < bone->mNumWeights;++a) {
+ for (unsigned int a = 0; a < bone->mNumWeights;++a) {
const aiVertexWeight& weight = bone->mWeights[a];
avPerVertexWeights[weight.mVertexId].push_back(
std::pair<unsigned int,float>(i,weight.mWeight));
@@ -533,7 +533,7 @@ class ComputeSpatialSortProcess : public BaseProcess
std::vector<_Type>* p = new std::vector<_Type>(pScene->mNumMeshes);
std::vector<_Type>::iterator it = p->begin();
- for (unsigned int i = 0; i < pScene->mNumMeshes; ++i, ++it) {
+ for (unsigned int i = 0; i < pScene->mNumMeshes; ++i, ++it) {
aiMesh* mesh = pScene->mMeshes[i];
_Type& blubb = *it;
blubb.first.Fill(mesh->mVertices,mesh->mNumVertices,sizeof(aiVector3D));
@@ -554,7 +554,7 @@ class DestroySpatialSortProcess : public BaseProcess
aiProcess_GenNormals | aiProcess_JoinIdenticalVertices));
}
- void Execute( aiScene* /*pScene*/)
+ void Execute( aiScene* pScene)
{
shared->RemoveProperty(AI_SPP_SPATIAL_SORT);
}
diff --git a/3rdparty/assimp/code/Q3BSPFileData.h b/3rdparty/assimp/code/Q3BSPFileData.h
index 22e37a348..eb3ae8289 100644
--- a/3rdparty/assimp/code/Q3BSPFileData.h
+++ b/3rdparty/assimp/code/Q3BSPFileData.h
@@ -50,10 +50,10 @@ namespace Q3BSP
static const unsigned int CE_BSP_LIGHTMAPWIDTH = 128;
static const unsigned int CE_BSP_LIGHTMAPHEIGHT = 128;
-static const unsigned int CE_BSP_LIGHTMAPSIZE = 128*128*3; ///< = 128( width ) * 128 ( height ) * 3 ( channels / RGB ).
-static const int VERION_Q3LEVEL = 46; ///< Supported version.
+static const unsigned int CE_BSP_LIGHTMAPSIZE = 128*128*3; ///< = 128( width ) * 128 ( height ) * 3 ( channels / RGB ).
+static const int VERION_Q3LEVEL = 46; ///< Supported version.
-/// Geometric type enumeration
+/// Geometric type enumeration
enum Q3BSPGeoType
{
Polygon = 1,
@@ -62,7 +62,7 @@ enum Q3BSPGeoType
Billboard
};
-/// Integer vector.
+/// Integer vector.
struct ceVec3i
{
int x, y, z;
@@ -70,18 +70,18 @@ struct ceVec3i
ceVec3i( int iX, int iY=0, int iZ=0) : x( iX ), y( iY ), z( iZ ) { /* empty */ }
};
-/// Fileheader
+/// Fileheader
struct sQ3BSPHeader
{
- char strID[ 4 ]; //!< Should be "IBSP"
- int iVersion; //!< 46 for standard levels
+ char strID[ 4 ]; //!< Should be "IBSP"
+ int iVersion; //!< 46 for standard levels
};
-/// Descripes an entry.
+/// Descripes an entry.
struct sQ3BSPLump
{
- int iOffset; ///< Offset from startpointer of file
- int iSize; ///< Size fo part
+ int iOffset; ///< Offset from startpointer of file
+ int iSize; ///< Size fo part
};
struct vec2f
@@ -94,44 +94,44 @@ struct vec3f
float x, y, z;
};
-/// Vertex of a Q3 level
+/// Vertex of a Q3 level
struct sQ3BSPVertex
{
- vec3f vPosition; ///< Position of vertex
- vec2f vTexCoord; ///< (u,v) Texturecoordinate of detailtexture
- vec2f vLightmap; ///< (u,v) Texturecoordinate of lightmap
- vec3f vNormal; ///< vertex normale
- unsigned char bColor[ 4 ]; ///< Color in RGBA
+ vec3f vPosition; ///< Position of vertex
+ vec2f vTexCoord; ///< (u,v) Texturecoordinate of detailtexture
+ vec2f vLightmap; ///< (u,v) Texturecoordinate of lightmap
+ vec3f vNormal; ///< vertex normale
+ unsigned char bColor[ 4 ]; ///< Color in RGBA
};
-/// A face in bsp format info
+/// A face in bsp format info
struct sQ3BSPFace
{
- int iTextureID; ///< Index in texture array
- int iEffect; ///< Index in effectarray (-1 = no effect)
- int iType; ///< 1=Polygon, 2=Patch, 3=Mesh, 4=Billboard
- int iVertexIndex; ///< Start index of polygon
- int iNumOfVerts; ///< Number of vertices
- int iFaceVertexIndex; ///< Index of first mesh vertex
- int iNumOfFaceVerts; ///< Anzahl der Meshvertices
- int iLightmapID; ///< Index to the lightmap array
- int iLMapCorner[ 2 ]; ///< Die Ecke der Lightmap in der Textur
- int iLMapSize[ 2 ]; ///< Size of the lightmap stored on the texture
- vec3f vLMapPos; ///< 3D-Ursprung der Lightmap
- vec3f vLMapVecs[ 2 ]; ///< 3D-s-t-Vektoren
- vec3f vNormal; ///< Polygonnormale
- int patchWidth, patchHeight; ///< bezier patch
+ int iTextureID; ///< Index in texture array
+ int iEffect; ///< Index in effectarray (-1 = no effect)
+ int iType; ///< 1=Polygon, 2=Patch, 3=Mesh, 4=Billboard
+ int iVertexIndex; ///< Start index of polygon
+ int iNumOfVerts; ///< Number of vertices
+ int iFaceVertexIndex; ///< Index of first mesh vertex
+ int iNumOfFaceVerts; ///< Anzahl der Meshvertices
+ int iLightmapID; ///< Index to the lightmap array
+ int iLMapCorner[ 2 ]; ///< Die Ecke der Lightmap in der Textur
+ int iLMapSize[ 2 ]; ///< Size of the lightmap stored on the texture
+ vec3f vLMapPos; ///< 3D-Ursprung der Lightmap
+ vec3f vLMapVecs[ 2 ]; ///< 3D-s-t-Vektoren
+ vec3f vNormal; ///< Polygonnormale
+ int patchWidth, patchHeight; ///< bezier patch
};
/// A quake3 texture name.
struct sQ3BSPTexture
{
- char strName[ 64 ]; ///< Name of the texture without extention
- int iFlags; ///< Not used
- int iContents; ///< Not used
+ char strName[ 64 ]; ///< Name of the texture without extention
+ int iFlags; ///< Not used
+ int iContents; ///< Not used
};
-/// A lightmap of the level, size 128 x 128, RGB components.
+/// A lightmap of the level, size 128 x 128, RGB components.
struct sQ3BSPLightmap
{
unsigned char bLMapData[ CE_BSP_LIGHTMAPSIZE ];
diff --git a/3rdparty/assimp/code/Q3BSPFileImporter.cpp b/3rdparty/assimp/code/Q3BSPFileImporter.cpp
index ce198c49a..dab913fb7 100644
--- a/3rdparty/assimp/code/Q3BSPFileImporter.cpp
+++ b/3rdparty/assimp/code/Q3BSPFileImporter.cpp
@@ -48,9 +48,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "Q3BSPFileData.h"
#ifdef ASSIMP_BUILD_NO_OWN_ZLIB
-# include <zlib.h>
+# include <zlib.h>
#else
-# include "../contrib/zlib/zlib.h"
+# include "../contrib/zlib/zlib.h"
#endif
#include "../include/aiTypes.h"
@@ -65,7 +65,7 @@ using namespace Q3BSP;
static const std::string Q3BSPExtention = "pk3";
// ------------------------------------------------------------------------------------------------
-// Local fnction to create a material keyname.
+// Local fnction to create a material keyname.
static void createKey( int id1, int id2, std::string &rKey )
{
std::stringstream str;
@@ -74,7 +74,7 @@ static void createKey( int id1, int id2, std::string &rKey )
}
// ------------------------------------------------------------------------------------------------
-// Local function to extract the texture ids from a material keyname.
+// Local function to extract the texture ids from a material keyname.
static void extractIds( const std::string &rKey, int &rId1, int &rId2 )
{
rId1 = -1;
@@ -93,7 +93,7 @@ static void extractIds( const std::string &rKey, int &rId1, int &rId2 )
}
// ------------------------------------------------------------------------------------------------
-// Local helper fuction to normalize filenames.
+// Local helper fuction to normalize filenames.
static void normalizePathName( const std::string &rPath, std::string &rNormalizedPath )
{
rNormalizedPath = "";
@@ -122,7 +122,7 @@ static void normalizePathName( const std::string &rPath, std::string &rNormalize
}
// ------------------------------------------------------------------------------------------------
-// Constructor.
+// Constructor.
Q3BSPFileImporter::Q3BSPFileImporter() :
m_pCurrentMesh( NULL ),
m_pCurrentFace( NULL ),
@@ -133,7 +133,7 @@ Q3BSPFileImporter::Q3BSPFileImporter() :
}
// ------------------------------------------------------------------------------------------------
-// Destructor.
+// Destructor.
Q3BSPFileImporter::~Q3BSPFileImporter()
{
// For lint
@@ -160,8 +160,8 @@ Q3BSPFileImporter::~Q3BSPFileImporter()
}
// ------------------------------------------------------------------------------------------------
-// Returns true, if the loader can read this.
-bool Q3BSPFileImporter::CanRead( const std::string& rFile, IOSystem* /*pIOHandler*/, bool checkSig ) const
+// Returns true, if the loader can read this.
+bool Q3BSPFileImporter::CanRead( const std::string& rFile, IOSystem* pIOHandler, bool checkSig ) const
{
bool isBSPData = false;
if ( checkSig )
@@ -171,15 +171,15 @@ bool Q3BSPFileImporter::CanRead( const std::string& rFile, IOSystem* /*pIOHandle
}
// ------------------------------------------------------------------------------------------------
-// Adds extensions.
+// Adds extensions.
void Q3BSPFileImporter::GetExtensionList( std::set<std::string>& extensions )
{
extensions.insert( Q3BSPExtention );
}
// ------------------------------------------------------------------------------------------------
-// Import method.
-void Q3BSPFileImporter::InternReadFile(const std::string &rFile, aiScene* pScene, IOSystem* /*pIOHandler*/)
+// Import method.
+void Q3BSPFileImporter::InternReadFile(const std::string &rFile, aiScene* pScene, IOSystem* pIOHandler)
{
Q3BSPZipArchive Archive( rFile );
if ( !Archive.isOpen() )
@@ -207,7 +207,7 @@ void Q3BSPFileImporter::InternReadFile(const std::string &rFile, aiScene* pScene
}
// ------------------------------------------------------------------------------------------------
-// Separates the map name from the import name.
+// Separates the map name from the import name.
void Q3BSPFileImporter::separateMapName( const std::string &rImportName, std::string &rArchiveName,
std::string &rMapName )
{
@@ -228,7 +228,7 @@ void Q3BSPFileImporter::separateMapName( const std::string &rImportName, std::st
}
// ------------------------------------------------------------------------------------------------
-// Returns the first map in the map archive.
+// Returns the first map in the map archive.
bool Q3BSPFileImporter::findFirstMapInArchive( Q3BSPZipArchive &rArchive, std::string &rMapName )
{
rMapName = "";
@@ -256,7 +256,7 @@ bool Q3BSPFileImporter::findFirstMapInArchive( Q3BSPZipArchive &rArchive, std::s
}
// ------------------------------------------------------------------------------------------------
-// Creates the assimp specific data.
+// Creates the assimp specific data.
void Q3BSPFileImporter::CreateDataFromImport( const Q3BSP::Q3BSPModel *pModel, aiScene* pScene,
Q3BSPZipArchive *pArchive )
{
@@ -280,7 +280,7 @@ void Q3BSPFileImporter::CreateDataFromImport( const Q3BSP::Q3BSPModel *pModel, a
}
// ------------------------------------------------------------------------------------------------
-// Creates all assimp nodes.
+// Creates all assimp nodes.
void Q3BSPFileImporter::CreateNodes( const Q3BSP::Q3BSPModel *pModel, aiScene* pScene,
aiNode *pParent )
{
@@ -340,7 +340,7 @@ void Q3BSPFileImporter::CreateNodes( const Q3BSP::Q3BSPModel *pModel, aiScene* p
}
// ------------------------------------------------------------------------------------------------
-// Creates the topology.
+// Creates the topology.
aiNode *Q3BSPFileImporter::CreateTopology( const Q3BSP::Q3BSPModel *pModel,
unsigned int materialIdx,
std::vector<sQ3BSPFace*> &rArray,
@@ -401,7 +401,7 @@ aiNode *Q3BSPFileImporter::CreateTopology( const Q3BSP::Q3BSPModel *pModel,
}
// ------------------------------------------------------------------------------------------------
-// Creates the triangle topology from a face array.
+// Creates the triangle topology from a face array.
void Q3BSPFileImporter::createTriangleTopology( const Q3BSP::Q3BSPModel *pModel,
Q3BSP::sQ3BSPFace *pQ3BSPFace,
aiMesh* pMesh,
@@ -462,7 +462,7 @@ void Q3BSPFileImporter::createTriangleTopology( const Q3BSP::Q3BSPModel *pModel,
}
// ------------------------------------------------------------------------------------------------
-// Creates all referenced materials.
+// Creates all referenced materials.
void Q3BSPFileImporter::createMaterials( const Q3BSP::Q3BSPModel *pModel, aiScene* pScene,
Q3BSPZipArchive *pArchive )
{
@@ -472,7 +472,7 @@ void Q3BSPFileImporter::createMaterials( const Q3BSP::Q3BSPModel *pModel, aiScen
}
pScene->mMaterials = new aiMaterial*[ m_MaterialLookupMap.size() ];
- // size_t texIdx( 0 );
+ size_t texIdx( 0 );
aiString aiMatName;
int textureId( -1 ), lightmapId( -1 );
for ( FaceMapIt it = m_MaterialLookupMap.begin(); it != m_MaterialLookupMap.end();
@@ -520,7 +520,7 @@ void Q3BSPFileImporter::createMaterials( const Q3BSP::Q3BSPModel *pModel, aiScen
}
// ------------------------------------------------------------------------------------------------
-// Counts the number of referenced vertices.
+// Counts the number of referenced vertices.
size_t Q3BSPFileImporter::countData( const std::vector<sQ3BSPFace*> &rArray ) const
{
size_t numVerts = 0;
@@ -540,7 +540,7 @@ size_t Q3BSPFileImporter::countData( const std::vector<sQ3BSPFace*> &rArray ) co
}
// ------------------------------------------------------------------------------------------------
-// Counts the faces with vertices.
+// Counts the faces with vertices.
size_t Q3BSPFileImporter::countFaces( const std::vector<Q3BSP::sQ3BSPFace*> &rArray ) const
{
size_t numFaces = 0;
@@ -558,7 +558,7 @@ size_t Q3BSPFileImporter::countFaces( const std::vector<Q3BSP::sQ3BSPFace*> &rAr
}
// ------------------------------------------------------------------------------------------------
-// Counts the number of triangles in a Q3-facearray.
+// Counts the number of triangles in a Q3-facearray.
size_t Q3BSPFileImporter::countTriangles( const std::vector<Q3BSP::sQ3BSPFace*> &rArray ) const
{
size_t numTriangles = 0;
@@ -576,7 +576,7 @@ size_t Q3BSPFileImporter::countTriangles( const std::vector<Q3BSP::sQ3BSPFace*>
}
// ------------------------------------------------------------------------------------------------
-// Creates the faces-to-material map.
+// Creates the faces-to-material map.
void Q3BSPFileImporter::createMaterialMap( const Q3BSP::Q3BSPModel *pModel )
{
std::string key( "" );
@@ -606,7 +606,7 @@ void Q3BSPFileImporter::createMaterialMap( const Q3BSP::Q3BSPModel *pModel )
}
// ------------------------------------------------------------------------------------------------
-// Returns the next face.
+// Returns the next face.
aiFace *Q3BSPFileImporter::getNextFace( aiMesh *pMesh, unsigned int &rFaceIdx )
{
aiFace *pFace = NULL;
@@ -624,9 +624,9 @@ aiFace *Q3BSPFileImporter::getNextFace( aiMesh *pMesh, unsigned int &rFaceIdx )
}
// ------------------------------------------------------------------------------------------------
-// Imports a texture file.
+// Imports a texture file.
bool Q3BSPFileImporter::importTextureFromArchive( const Q3BSP::Q3BSPModel *pModel,
- Q3BSP::Q3BSPZipArchive *pArchive, aiScene* /*pScene*/,
+ Q3BSP::Q3BSPZipArchive *pArchive, aiScene* pScene,
Assimp::MaterialHelper *pMatHelper, int textureId )
{
if ( NULL == pArchive || NULL == pArchive || NULL == pMatHelper )
@@ -680,7 +680,7 @@ bool Q3BSPFileImporter::importTextureFromArchive( const Q3BSP::Q3BSPModel *pMode
}
// ------------------------------------------------------------------------------------------------
-// Imports a lightmap file.
+// Imports a lightmap file.
bool Q3BSPFileImporter::importLightmap( const Q3BSP::Q3BSPModel *pModel, aiScene* pScene,
Assimp::MaterialHelper *pMatHelper, int lightmapId )
{
diff --git a/3rdparty/assimp/code/Q3BSPFileImporter.h b/3rdparty/assimp/code/Q3BSPFileImporter.h
index adf79e64c..fa2e215ae 100644
--- a/3rdparty/assimp/code/Q3BSPFileImporter.h
+++ b/3rdparty/assimp/code/Q3BSPFileImporter.h
@@ -55,22 +55,22 @@ struct sQ3BSPFace;
}
-/** Loader to import BSP-levels from a PK3 archive or from a unpacked BSP-level.
+/** Loader to import BSP-levels from a PK3 archive or from a unpacked BSP-level.
*/
class Q3BSPFileImporter : BaseImporter
{
friend class Importer;
protected:
- /// @brief Default constructor.
+ /// @brief Default constructor.
Q3BSPFileImporter();
- /// @brief Destructor.
+ /// @brief Destructor.
~Q3BSPFileImporter();
public:
- /// @brief Returns whether the class can handle the format of the given file.
- /// @remark See BaseImporter::CanRead() for details.
+ /// @brief Returns whether the class can handle the format of the given file.
+ /// @remark See BaseImporter::CanRead() for details.
bool CanRead( const std::string& pFile, IOSystem* pIOHandler, bool checkSig ) const;
private:
diff --git a/3rdparty/assimp/code/Q3BSPZipArchive.cpp b/3rdparty/assimp/code/Q3BSPZipArchive.cpp
index 62ef5ffcf..76a4156f4 100644
--- a/3rdparty/assimp/code/Q3BSPZipArchive.cpp
+++ b/3rdparty/assimp/code/Q3BSPZipArchive.cpp
@@ -49,7 +49,7 @@ namespace Q3BSP
{
// ------------------------------------------------------------------------------------------------
-// Constructor.
+// Constructor.
Q3BSPZipArchive::Q3BSPZipArchive( const std::string& rFile ) :
m_ZipFileHandle( NULL ),
m_FileList(),
@@ -66,7 +66,7 @@ Q3BSPZipArchive::Q3BSPZipArchive( const std::string& rFile ) :
}
// ------------------------------------------------------------------------------------------------
-// Destructor.
+// Destructor.
Q3BSPZipArchive::~Q3BSPZipArchive()
{
if ( NULL != m_ZipFileHandle )
@@ -78,14 +78,14 @@ Q3BSPZipArchive::~Q3BSPZipArchive()
}
// ------------------------------------------------------------------------------------------------
-// Returns true, if the archive is already open.
+// Returns true, if the archive is already open.
bool Q3BSPZipArchive::isOpen() const
{
return ( NULL != m_ZipFileHandle );
}
// ------------------------------------------------------------------------------------------------
-// Returns true, if the filename is part of the archive.
+// Returns true, if the filename is part of the archive.
bool Q3BSPZipArchive::Exists( const char* pFile ) const
{
ai_assert( NULL != pFile );
@@ -105,15 +105,15 @@ bool Q3BSPZipArchive::Exists( const char* pFile ) const
}
// ------------------------------------------------------------------------------------------------
-// Returns the separator delimiter.
+// Returns the separator delimiter.
char Q3BSPZipArchive::getOsSeparator() const
{
return '/';
}
// ------------------------------------------------------------------------------------------------
-// Opens a file, which is part of the archive.
-IOStream *Q3BSPZipArchive::Open( const char* pFile, const char* /*pMode*/ )
+// Opens a file, which is part of the archive.
+IOStream *Q3BSPZipArchive::Open( const char* pFile, const char* pMode )
{
ai_assert( NULL != pFile );
@@ -129,7 +129,7 @@ IOStream *Q3BSPZipArchive::Open( const char* pFile, const char* /*pMode*/ )
}
// ------------------------------------------------------------------------------------------------
-// Close a filestream.
+// Close a filestream.
void Q3BSPZipArchive::Close( IOStream *pFile )
{
ai_assert( NULL != pFile );
@@ -147,14 +147,14 @@ void Q3BSPZipArchive::Close( IOStream *pFile )
}
}
// ------------------------------------------------------------------------------------------------
-// Returns the file-list of the archive.
+// Returns the file-list of the archive.
void Q3BSPZipArchive::getFileList( std::vector<std::string> &rFileList )
{
rFileList = m_FileList;
}
// ------------------------------------------------------------------------------------------------
-// Maps the archive content.
+// Maps the archive content.
bool Q3BSPZipArchive::mapArchive()
{
if ( NULL == m_ZipFileHandle )
@@ -166,7 +166,7 @@ bool Q3BSPZipArchive::mapArchive()
if ( !m_FileList.empty() )
m_FileList.resize( 0 );
- // At first ensure file is already open
+ // At first ensure file is already open
if ( UNZ_OK == unzGoToFirstFile( m_ZipFileHandle ) )
{
char filename[ FileNameSize ];
diff --git a/3rdparty/assimp/code/Q3BSPZipArchive.h b/3rdparty/assimp/code/Q3BSPZipArchive.h
index c0d8b96cf..d924e88a9 100644
--- a/3rdparty/assimp/code/Q3BSPZipArchive.h
+++ b/3rdparty/assimp/code/Q3BSPZipArchive.h
@@ -54,10 +54,10 @@ namespace Q3BSP
{
// ------------------------------------------------------------------------------------------------
-/// \class ZipFile
-/// \ingroup Assimp::Q3BSP
+/// \class ZipFile
+/// \ingroup Assimp::Q3BSP
///
-/// \brief
+/// \brief
// ------------------------------------------------------------------------------------------------
class ZipFile : public IOStream
{
@@ -94,17 +94,17 @@ public:
// another character
unzOpenCurrentFile( m_zipFile );
bytes_read = unzReadCurrentFile( m_zipFile, pvBuffer, fileInfo.uncompressed_size);
- if ( /*bytes_read < 0 ||*/ bytes_read != static_cast<size_t>( fileInfo.uncompressed_size ) )
+ if ( bytes_read < 0 || bytes_read != static_cast<size_t>( fileInfo.uncompressed_size ) )
{
return 0;
}
- //size_t filesize = fileInfo.uncompressed_size;
+ size_t filesize = fileInfo.uncompressed_size;
unzCloseCurrentFile( m_zipFile );
}
return bytes_read;
}
- size_t Write(const void* /*pvBuffer*/, size_t /*pSize*/, size_t /*pCount*/)
+ size_t Write(const void* pvBuffer, size_t pSize, size_t pCount)
{
return 0;
}
@@ -122,7 +122,7 @@ public:
return 0;
}
- aiReturn Seek(size_t /*pOffset*/, aiOrigin /*pOrigin*/)
+ aiReturn Seek(size_t pOffset, aiOrigin pOrigin)
{
return aiReturn_FAILURE;
}
@@ -143,11 +143,11 @@ private:
};
// ------------------------------------------------------------------------------------------------
-/// \class Q3BSPZipArchive
-/// \ingroup Assimp::Q3BSP
+/// \class Q3BSPZipArchive
+/// \ingroup Assimp::Q3BSP
///
-/// \brief IMplements a zip archive like the WinZip archives. Will be also used to import data
-/// from a P3K archive ( Quake level format ).
+/// \brief IMplements a zip archive like the WinZip archives. Will be also used to import data
+/// from a P3K archive ( Quake level format ).
// ------------------------------------------------------------------------------------------------
class Q3BSPZipArchive : public Assimp::IOSystem
{
diff --git a/3rdparty/assimp/code/Q3DLoader.cpp b/3rdparty/assimp/code/Q3DLoader.cpp
index aaba431c3..05c4a2aca 100644
--- a/3rdparty/assimp/code/Q3DLoader.cpp
+++ b/3rdparty/assimp/code/Q3DLoader.cpp
@@ -71,7 +71,7 @@ bool Q3DImporter::CanRead( const std::string& pFile, IOSystem* pIOHandler, bool
if (extension == "q3s" || extension == "q3o")
return true;
- else if (!extension.length() || checkSig) {
+ else if (!extension.length() || checkSig) {
if (!pIOHandler)
return true;
const char* tokens[] = {"quick3Do","quick3Ds"};
@@ -293,7 +293,7 @@ void Q3DImporter::InternReadFile( const std::string& pFile,
aiTexture* tex = pScene->mTextures[i] = new aiTexture();
// skip the texture name
- while (stream.GetI1()) {};
+ while (stream.GetI1());
// read texture width and height
tex->mWidth = (unsigned int)stream.GetI4();
@@ -372,7 +372,7 @@ void Q3DImporter::InternReadFile( const std::string& pFile,
unsigned int temp = (unsigned int)(stream.GetI4() * stream.GetI4());
// skip the background file name
- while (stream.GetI1()) {};
+ while (stream.GetI1());
// skip background texture data + the remaining fields
stream.IncPtr(temp*3 + 20); // 4 bytes of unknown data here
diff --git a/3rdparty/assimp/code/Q3DLoader.h b/3rdparty/assimp/code/Q3DLoader.h
index e26c034b3..fef4eac3a 100644
--- a/3rdparty/assimp/code/Q3DLoader.h
+++ b/3rdparty/assimp/code/Q3DLoader.h
@@ -48,7 +48,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "../include/aiTypes.h"
#include <vector>
-namespace Assimp {
+namespace Assimp {
// ---------------------------------------------------------------------------
/** Importer class for the Quick3D Object and Scene formats.
@@ -68,7 +68,7 @@ public:
// -------------------------------------------------------------------
/** 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;
@@ -92,9 +92,9 @@ private:
struct Material
{
Material()
- : diffuse (0.6f,0.6f,0.6f)
- , transparency (0.f)
- , texIdx (0xffffffff)
+ : diffuse (0.6f,0.6f,0.6f)
+ , transparency (0.f)
+ , texIdx (0xffffffff)
{}
aiString name;
@@ -107,9 +107,9 @@ private:
struct Face
{
Face(unsigned int s)
- : indices (s)
- , uvindices (s)
- , mat (0)
+ : indices (s)
+ , uvindices (s)
+ , mat (0)
{
}
diff --git a/3rdparty/assimp/code/RawLoader.cpp b/3rdparty/assimp/code/RawLoader.cpp
index c14ecdc10..df5daba8f 100644
--- a/3rdparty/assimp/code/RawLoader.cpp
+++ b/3rdparty/assimp/code/RawLoader.cpp
@@ -65,7 +65,7 @@ RAWImporter::~RAWImporter()
// ------------------------------------------------------------------------------------------------
// Returns whether the class can handle the format of the given file.
-bool RAWImporter::CanRead( const std::string& pFile, IOSystem* /*pIOHandler*/, bool /*checkSig*/) const
+bool RAWImporter::CanRead( const std::string& pFile, IOSystem* pIOHandler, bool checkSig) const
{
return SimpleExtensionCheck(pFile,"raw");
}
diff --git a/3rdparty/assimp/code/RawLoader.h b/3rdparty/assimp/code/RawLoader.h
index 6200adee4..47a4a5aa0 100644
--- a/3rdparty/assimp/code/RawLoader.h
+++ b/3rdparty/assimp/code/RawLoader.h
@@ -48,7 +48,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "../include/aiTypes.h"
#include <vector>
-namespace Assimp {
+namespace Assimp {
// ---------------------------------------------------------------------------
/** Importer class for the PovRay RAW triangle format
diff --git a/3rdparty/assimp/code/RemoveComments.cpp b/3rdparty/assimp/code/RemoveComments.cpp
index a0a62af8f..b69c04c0a 100644
--- a/3rdparty/assimp/code/RemoveComments.cpp
+++ b/3rdparty/assimp/code/RemoveComments.cpp
@@ -46,7 +46,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "RemoveComments.h"
#include "ParsingUtils.h"
-namespace Assimp {
+namespace Assimp {
// ------------------------------------------------------------------------------------------------
// Remove line comments from a file
@@ -57,11 +57,11 @@ void CommentRemover::RemoveLineComments(const char* szComment,
ai_assert(NULL != szComment && NULL != szBuffer && *szComment);
const size_t len = strlen(szComment);
- while (*szBuffer) {
+ while (*szBuffer) {
// skip over quotes
if (*szBuffer == '\"' || *szBuffer == '\'')
- while (*szBuffer++ && *szBuffer != '\"' && *szBuffer != '\'') {};
+ while (*szBuffer++ && *szBuffer != '\"' && *szBuffer != '\'');
if (!strncmp(szBuffer,szComment,len)) {
while (!IsLineEnd(*szBuffer))
@@ -84,10 +84,10 @@ void CommentRemover::RemoveMultiLineComments(const char* szCommentStart,
const size_t len = strlen(szCommentEnd);
const size_t len2 = strlen(szCommentStart);
- while (*szBuffer) {
+ while (*szBuffer) {
// skip over quotes
if (*szBuffer == '\"' || *szBuffer == '\'')
- while (*szBuffer++ && *szBuffer != '\"' && *szBuffer != '\'') {};
+ while (*szBuffer++ && *szBuffer != '\"' && *szBuffer != '\'');
if (!strncmp(szBuffer,szCommentStart,len2)) {
while (*szBuffer) {
diff --git a/3rdparty/assimp/code/RemoveComments.h b/3rdparty/assimp/code/RemoveComments.h
index 6c9099556..54899527d 100644
--- a/3rdparty/assimp/code/RemoveComments.h
+++ b/3rdparty/assimp/code/RemoveComments.h
@@ -46,7 +46,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "../include/aiAssert.h"
-namespace Assimp {
+namespace Assimp {
// ---------------------------------------------------------------------------
/** \brief Helper class to remove single and multi line comments from a file
diff --git a/3rdparty/assimp/code/RemoveRedundantMaterials.cpp b/3rdparty/assimp/code/RemoveRedundantMaterials.cpp
index c2d4e9bb1..73931ea93 100644
--- a/3rdparty/assimp/code/RemoveRedundantMaterials.cpp
+++ b/3rdparty/assimp/code/RemoveRedundantMaterials.cpp
@@ -139,7 +139,7 @@ void RemoveRedundantMatsProcess::Execute( aiScene* pScene)
for (unsigned int i = 0; i < pScene->mNumMaterials;++i)
{
// if the material is not referenced ... remove it
- if (!abReferenced[i]) {
+ if (!abReferenced[i]) {
++unreferenced;
continue;
}
@@ -147,7 +147,7 @@ void RemoveRedundantMatsProcess::Execute( aiScene* pScene)
uint32_t me = aiHashes[i] = ((MaterialHelper*)pScene->mMaterials[i])->ComputeHash();
for (unsigned int a = 0; a < i;++a)
{
- if (me == aiHashes[a]) {
+ if (me == aiHashes[a]) {
++iCnt;
me = 0;
aiMappingTable[i] = aiMappingTable[a];
@@ -155,11 +155,11 @@ void RemoveRedundantMatsProcess::Execute( aiScene* pScene)
break;
}
}
- if (me) {
+ if (me) {
aiMappingTable[i] = iNewNum++;
}
}
- if (iCnt) {
+ if (iCnt) {
// build an output material list
aiMaterial** ppcMaterials = new aiMaterial*[iNewNum];
::memset(ppcMaterials,0,sizeof(void*)*iNewNum);
@@ -180,7 +180,7 @@ void RemoveRedundantMatsProcess::Execute( aiScene* pScene)
else ppcMaterials[idx] = pScene->mMaterials[p];
}
// update all material indices
- for (unsigned int p = 0; p < pScene->mNumMeshes;++p) {
+ for (unsigned int p = 0; p < pScene->mNumMeshes;++p) {
aiMesh* mesh = pScene->mMeshes[p];
mesh->mMaterialIndex = aiMappingTable[mesh->mMaterialIndex];
}
diff --git a/3rdparty/assimp/code/RemoveRedundantMaterials.h b/3rdparty/assimp/code/RemoveRedundantMaterials.h
index 97297f5e8..65bbf2cfb 100644
--- a/3rdparty/assimp/code/RemoveRedundantMaterials.h
+++ b/3rdparty/assimp/code/RemoveRedundantMaterials.h
@@ -48,7 +48,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "../include/aiMesh.h"
class RemoveRedundantMatsTest;
-namespace Assimp {
+namespace Assimp {
// ---------------------------------------------------------------------------
/** RemoveRedundantMatsProcess: Postprocessing steo to remove redundant
diff --git a/3rdparty/assimp/code/RemoveVCProcess.cpp b/3rdparty/assimp/code/RemoveVCProcess.cpp
index 31ea56bbe..2d5b60e3a 100644
--- a/3rdparty/assimp/code/RemoveVCProcess.cpp
+++ b/3rdparty/assimp/code/RemoveVCProcess.cpp
@@ -208,7 +208,7 @@ void RemoveVCProcess::Execute( aiScene* pScene)
{
for ( unsigned int a = 0; a < pScene->mNumMeshes; a++)
{
- if ( ProcessMesh( pScene->mMeshes[a]))
+ if ( ProcessMesh( pScene->mMeshes[a]))
bHas = true;
}
}
diff --git a/3rdparty/assimp/code/RemoveVCProcess.h b/3rdparty/assimp/code/RemoveVCProcess.h
index bd3156561..43693f639 100644
--- a/3rdparty/assimp/code/RemoveVCProcess.h
+++ b/3rdparty/assimp/code/RemoveVCProcess.h
@@ -46,7 +46,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "../include/aiMesh.h"
class RemoveVCProcessTest;
-namespace Assimp {
+namespace Assimp {
// ---------------------------------------------------------------------------
/** RemoveVCProcess: Class to exclude specific parts of the data structure
diff --git a/3rdparty/assimp/code/SGSpatialSort.h b/3rdparty/assimp/code/SGSpatialSort.h
index 4c597bc10..e657ae3a0 100644
--- a/3rdparty/assimp/code/SGSpatialSort.h
+++ b/3rdparty/assimp/code/SGSpatialSort.h
@@ -46,7 +46,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <vector>
#include "../include/aiTypes.h"
-namespace Assimp {
+namespace Assimp {
// ----------------------------------------------------------------------------------
/** Specialized version of SpatialSort to support smoothing groups
@@ -113,10 +113,10 @@ protected:
// -------------------------------------------------------------------
struct Entry
{
- unsigned int mIndex; ///< The vertex referred by this entry
- aiVector3D mPosition; ///< Position
+ unsigned int mIndex; ///< The vertex referred by this entry
+ aiVector3D mPosition; ///< Position
uint32_t mSmoothGroups;
- float mDistance; ///< Distance of this vertex to the sorting plane
+ float mDistance; ///< Distance of this vertex to the sorting plane
Entry() { /** intentionally not initialized.*/ }
Entry( unsigned int pIndex, const aiVector3D& pPosition, float pDistance,uint32_t pSG)
@@ -125,7 +125,7 @@ protected:
mPosition( pPosition),
mSmoothGroups (pSG),
mDistance( pDistance)
- { }
+ { }
bool operator < (const Entry& e) const { return mDistance < e.mDistance; }
};
diff --git a/3rdparty/assimp/code/SMDLoader.cpp b/3rdparty/assimp/code/SMDLoader.cpp
index e36464588..234582c98 100644
--- a/3rdparty/assimp/code/SMDLoader.cpp
+++ b/3rdparty/assimp/code/SMDLoader.cpp
@@ -65,7 +65,7 @@ SMDImporter::~SMDImporter()
// ------------------------------------------------------------------------------------------------
// Returns whether the class can handle the format of the given file.
-bool SMDImporter::CanRead( const std::string& pFile, IOSystem* /*pIOHandler*/, bool) const
+bool SMDImporter::CanRead( const std::string& pFile, IOSystem* pIOHandler, bool) const
{
// fixme: auto format detection
return SimpleExtensionCheck(pFile,"smd","vta");
@@ -87,7 +87,7 @@ void SMDImporter::SetupProperties(const Importer* pImp)
// AI_CONFIG_IMPORT_SMD_KEYFRAME option overrides the
// AI_CONFIG_IMPORT_GLOBAL_KEYFRAME option.
configFrameID = pImp->GetPropertyInteger(AI_CONFIG_IMPORT_SMD_KEYFRAME,0xffffffff);
- if (0xffffffff == configFrameID) {
+ if(0xffffffff == configFrameID) {
configFrameID = pImp->GetPropertyInteger(AI_CONFIG_IMPORT_GLOBAL_KEYFRAME,0);
}
}
@@ -100,7 +100,7 @@ void SMDImporter::InternReadFile(
boost::scoped_ptr<IOStream> file( pIOHandler->Open( pFile, "rb"));
// Check whether we can read from the file
- if ( file.get() == NULL) {
+ if( file.get() == NULL) {
throw DeadlyImportError( "Failed to open SMD/VTA file " + pFile + ".");
}
@@ -163,7 +163,7 @@ void SMDImporter::InternReadFile(
FixTimeValues();
// compute absolute bone transformation matrices
- // ComputeAbsoluteBoneTransformations();
+ // ComputeAbsoluteBoneTransformations();
}
if (!(pScene->mFlags & AI_SCENE_FLAGS_INCOMPLETE))
@@ -674,12 +674,12 @@ void SMDImporter::ParseFile()
// read line per line ...
while (true)
{
- if (!SkipSpacesAndLineEnd(szCurrent,&szCurrent)) break;
+ if(!SkipSpacesAndLineEnd(szCurrent,&szCurrent)) break;
- // "version <n> \n", <n> should be 1 for hl and hl SMD files
+ // "version <n> \n", <n> should be 1 for hl and hl² SMD files
if (TokenMatch(szCurrent,"version",7))
{
- if (!SkipSpaces(szCurrent,&szCurrent)) break;
+ if(!SkipSpaces(szCurrent,&szCurrent)) break;
if (1 != strtol10(szCurrent,&szCurrent))
{
DefaultLogger::get()->warn("SMD.version is not 1. This "
@@ -762,7 +762,7 @@ void SMDImporter::ParseTrianglesSection(const char* szCurrent,
// and so on until we reach a token that looks quite similar to "end"
while (true)
{
- if (!SkipSpacesAndLineEnd(szCurrent,&szCurrent)) break;
+ if(!SkipSpacesAndLineEnd(szCurrent,&szCurrent)) break;
// "end\n" - Ends the triangles section
if (TokenMatch(szCurrent,"end",3))
@@ -780,7 +780,7 @@ void SMDImporter::ParseVASection(const char* szCurrent,
unsigned int iCurIndex = 0;
while (true)
{
- if (!SkipSpacesAndLineEnd(szCurrent,&szCurrent)) break;
+ if(!SkipSpacesAndLineEnd(szCurrent,&szCurrent)) break;
// "end\n" - Ends the "vertexanimation" section
if (TokenMatch(szCurrent,"end",3))
@@ -792,12 +792,12 @@ void SMDImporter::ParseVASection(const char* szCurrent,
// NOTE: The doc says that time values COULD be negative ...
// NOTE2: this is the shape key -> valve docs
int iTime = 0;
- if (!ParseSignedInt(szCurrent,&szCurrent,iTime) || configFrameID != (unsigned int)iTime)break;
+ if(!ParseSignedInt(szCurrent,&szCurrent,iTime) || configFrameID != (unsigned int)iTime)break;
SkipLine(szCurrent,&szCurrent);
}
else
{
- if (0 == iCurIndex)
+ if(0 == iCurIndex)
{
asTriangles.push_back(SMD::Face());
}
@@ -823,7 +823,7 @@ void SMDImporter::ParseSkeletonSection(const char* szCurrent,
int iTime = 0;
while (true)
{
- if (!SkipSpacesAndLineEnd(szCurrent,&szCurrent)) break;
+ if(!SkipSpacesAndLineEnd(szCurrent,&szCurrent)) break;
// "end\n" - Ends the skeleton section
if (TokenMatch(szCurrent,"end",3))
@@ -833,7 +833,7 @@ void SMDImporter::ParseSkeletonSection(const char* szCurrent,
else if (TokenMatch(szCurrent,"time",4))
{
// NOTE: The doc says that time values COULD be negative ...
- if (!ParseSignedInt(szCurrent,&szCurrent,iTime))break;
+ if(!ParseSignedInt(szCurrent,&szCurrent,iTime))break;
iSmallestFrame = std::min(iSmallestFrame,iTime);
SkipLine(szCurrent,&szCurrent);
@@ -856,7 +856,7 @@ void SMDImporter::ParseNodeInfo(const char* szCurrent,
{
unsigned int iBone = 0;
SkipSpacesAndLineEnd(szCurrent,&szCurrent);
- if (!ParseUnsignedInt(szCurrent,&szCurrent,iBone) || !SkipSpaces(szCurrent,&szCurrent))
+ if(!ParseUnsignedInt(szCurrent,&szCurrent,iBone) || !SkipSpaces(szCurrent,&szCurrent))
{
LogErrorNoThrow("Unexpected EOF/EOL while parsing bone index");
SMDI_PARSE_RETURN;
@@ -899,7 +899,7 @@ void SMDImporter::ParseNodeInfo(const char* szCurrent,
szCurrent = szEnd;
// the only negative bone parent index that could occur is -1 AFAIK
- if (!ParseSignedInt(szCurrent,&szCurrent,(int&)bone.iParent))
+ if(!ParseSignedInt(szCurrent,&szCurrent,(int&)bone.iParent))
{
LogErrorNoThrow("Unexpected EOF/EOL while parsing bone parent index. Assuming -1");
SMDI_PARSE_RETURN;
@@ -918,7 +918,7 @@ void SMDImporter::ParseSkeletonElement(const char* szCurrent,
aiVector3D vRot;
unsigned int iBone = 0;
- if (!ParseUnsignedInt(szCurrent,&szCurrent,iBone))
+ if(!ParseUnsignedInt(szCurrent,&szCurrent,iBone))
{
DefaultLogger::get()->error("Unexpected EOF/EOL while parsing bone index");
SMDI_PARSE_RETURN;
@@ -934,32 +934,32 @@ void SMDImporter::ParseSkeletonElement(const char* szCurrent,
SMD::Bone::Animation::MatrixKey& key = bone.sAnim.asKeys.back();
key.dTime = (double)iTime;
- if (!ParseFloat(szCurrent,&szCurrent,(float&)vPos.x))
+ if(!ParseFloat(szCurrent,&szCurrent,(float&)vPos.x))
{
LogErrorNoThrow("Unexpected EOF/EOL while parsing bone.pos.x");
SMDI_PARSE_RETURN;
}
- if (!ParseFloat(szCurrent,&szCurrent,(float&)vPos.y))
+ if(!ParseFloat(szCurrent,&szCurrent,(float&)vPos.y))
{
LogErrorNoThrow("Unexpected EOF/EOL while parsing bone.pos.y");
SMDI_PARSE_RETURN;
}
- if (!ParseFloat(szCurrent,&szCurrent,(float&)vPos.z))
+ if(!ParseFloat(szCurrent,&szCurrent,(float&)vPos.z))
{
LogErrorNoThrow("Unexpected EOF/EOL while parsing bone.pos.z");
SMDI_PARSE_RETURN;
}
- if (!ParseFloat(szCurrent,&szCurrent,(float&)vRot.x))
+ if(!ParseFloat(szCurrent,&szCurrent,(float&)vRot.x))
{
LogErrorNoThrow("Unexpected EOF/EOL while parsing bone.rot.x");
SMDI_PARSE_RETURN;
}
- if (!ParseFloat(szCurrent,&szCurrent,(float&)vRot.y))
+ if(!ParseFloat(szCurrent,&szCurrent,(float&)vRot.y))
{
LogErrorNoThrow("Unexpected EOF/EOL while parsing bone.rot.y");
SMDI_PARSE_RETURN;
}
- if (!ParseFloat(szCurrent,&szCurrent,(float&)vRot.z))
+ if(!ParseFloat(szCurrent,&szCurrent,(float&)vRot.z))
{
LogErrorNoThrow("Unexpected EOF/EOL while parsing bone.rot.z");
SMDI_PARSE_RETURN;
@@ -986,7 +986,7 @@ void SMDImporter::ParseTriangle(const char* szCurrent,
asTriangles.push_back(SMD::Face());
SMD::Face& face = asTriangles.back();
- if (!SkipSpaces(szCurrent,&szCurrent))
+ if(!SkipSpaces(szCurrent,&szCurrent))
{
LogErrorNoThrow("Unexpected EOF/EOL while parsing a triangle");
return;
@@ -994,7 +994,7 @@ void SMDImporter::ParseTriangle(const char* szCurrent,
// read the texture file name
const char* szLast = szCurrent;
- while (!IsSpaceOrNewLine(*szCurrent++)) {};
+ while (!IsSpaceOrNewLine(*szCurrent++));
// ... and get the index that belongs to this file name
face.iTexture = GetTextureIndex(std::string(szLast,(uintptr_t)szCurrent-(uintptr_t)szLast));
@@ -1015,7 +1015,7 @@ void SMDImporter::ParseTriangle(const char* szCurrent,
bool SMDImporter::ParseFloat(const char* szCurrent,
const char** szCurrentOut, float& out)
{
- if (!SkipSpaces(&szCurrent))
+ if(!SkipSpaces(&szCurrent))
return false;
*szCurrentOut = fast_atof_move(szCurrent,out);
@@ -1027,7 +1027,7 @@ bool SMDImporter::ParseFloat(const char* szCurrent,
bool SMDImporter::ParseUnsignedInt(const char* szCurrent,
const char** szCurrentOut, unsigned int& out)
{
- if (!SkipSpaces(&szCurrent))
+ if(!SkipSpaces(&szCurrent))
return false;
out = strtol10(szCurrent,szCurrentOut);
@@ -1039,7 +1039,7 @@ bool SMDImporter::ParseUnsignedInt(const char* szCurrent,
bool SMDImporter::ParseSignedInt(const char* szCurrent,
const char** szCurrentOut, int& out)
{
- if (!SkipSpaces(&szCurrent))
+ if(!SkipSpaces(&szCurrent))
return false;
out = strtol10s(szCurrent,szCurrentOut);
@@ -1057,37 +1057,37 @@ void SMDImporter::ParseVertex(const char* szCurrent,
SkipSpacesAndLineEnd(szCurrent,&szCurrent);
return ParseVertex(szCurrent,szCurrentOut,vertex,bVASection);
}
- if (!ParseSignedInt(szCurrent,&szCurrent,(int&)vertex.iParentNode))
+ if(!ParseSignedInt(szCurrent,&szCurrent,(int&)vertex.iParentNode))
{
LogErrorNoThrow("Unexpected EOF/EOL while parsing vertex.parent");
SMDI_PARSE_RETURN;
}
- if (!ParseFloat(szCurrent,&szCurrent,(float&)vertex.pos.x))
+ if(!ParseFloat(szCurrent,&szCurrent,(float&)vertex.pos.x))
{
LogErrorNoThrow("Unexpected EOF/EOL while parsing vertex.pos.x");
SMDI_PARSE_RETURN;
}
- if (!ParseFloat(szCurrent,&szCurrent,(float&)vertex.pos.y))
+ if(!ParseFloat(szCurrent,&szCurrent,(float&)vertex.pos.y))
{
LogErrorNoThrow("Unexpected EOF/EOL while parsing vertex.pos.y");
SMDI_PARSE_RETURN;
}
- if (!ParseFloat(szCurrent,&szCurrent,(float&)vertex.pos.z))
+ if(!ParseFloat(szCurrent,&szCurrent,(float&)vertex.pos.z))
{
LogErrorNoThrow("Unexpected EOF/EOL while parsing vertex.pos.z");
SMDI_PARSE_RETURN;
}
- if (!ParseFloat(szCurrent,&szCurrent,(float&)vertex.nor.x))
+ if(!ParseFloat(szCurrent,&szCurrent,(float&)vertex.nor.x))
{
LogErrorNoThrow("Unexpected EOF/EOL while parsing vertex.nor.x");
SMDI_PARSE_RETURN;
}
- if (!ParseFloat(szCurrent,&szCurrent,(float&)vertex.nor.y))
+ if(!ParseFloat(szCurrent,&szCurrent,(float&)vertex.nor.y))
{
LogErrorNoThrow("Unexpected EOF/EOL while parsing vertex.nor.y");
SMDI_PARSE_RETURN;
}
- if (!ParseFloat(szCurrent,&szCurrent,(float&)vertex.nor.z))
+ if(!ParseFloat(szCurrent,&szCurrent,(float&)vertex.nor.z))
{
LogErrorNoThrow("Unexpected EOF/EOL while parsing vertex.nor.z");
SMDI_PARSE_RETURN;
@@ -1095,12 +1095,12 @@ void SMDImporter::ParseVertex(const char* szCurrent,
if (bVASection)SMDI_PARSE_RETURN;
- if (!ParseFloat(szCurrent,&szCurrent,(float&)vertex.uv.x))
+ if(!ParseFloat(szCurrent,&szCurrent,(float&)vertex.uv.x))
{
LogErrorNoThrow("Unexpected EOF/EOL while parsing vertex.uv.x");
SMDI_PARSE_RETURN;
}
- if (!ParseFloat(szCurrent,&szCurrent,(float&)vertex.uv.y))
+ if(!ParseFloat(szCurrent,&szCurrent,(float&)vertex.uv.y))
{
LogErrorNoThrow("Unexpected EOF/EOL while parsing vertex.uv.y");
SMDI_PARSE_RETURN;
@@ -1109,16 +1109,16 @@ void SMDImporter::ParseVertex(const char* szCurrent,
// now read the number of bones affecting this vertex
// all elements from now are fully optional, we don't need them
unsigned int iSize = 0;
- if (!ParseUnsignedInt(szCurrent,&szCurrent,iSize))SMDI_PARSE_RETURN;
+ if(!ParseUnsignedInt(szCurrent,&szCurrent,iSize))SMDI_PARSE_RETURN;
vertex.aiBoneLinks.resize(iSize,std::pair<unsigned int, float>(0,0.0f));
for (std::vector<std::pair<unsigned int, float> >::iterator
i = vertex.aiBoneLinks.begin();
i != vertex.aiBoneLinks.end();++i)
{
- if (!ParseUnsignedInt(szCurrent,&szCurrent,(*i).first))
+ if(!ParseUnsignedInt(szCurrent,&szCurrent,(*i).first))
SMDI_PARSE_RETURN;
- if (!ParseFloat(szCurrent,&szCurrent,(*i).second))
+ if(!ParseFloat(szCurrent,&szCurrent,(*i).second))
SMDI_PARSE_RETURN;
}
diff --git a/3rdparty/assimp/code/SMDLoader.h b/3rdparty/assimp/code/SMDLoader.h
index 0f1cbe8fd..9b4ac8da1 100644
--- a/3rdparty/assimp/code/SMDLoader.h
+++ b/3rdparty/assimp/code/SMDLoader.h
@@ -59,10 +59,10 @@ struct aiNode;
// STL headers
#include <vector>
-namespace Assimp {
+namespace Assimp {
class MaterialHelper;
-namespace SMD {
+namespace SMD {
// ---------------------------------------------------------------------------
/** Data structure for a vertex in a SMD file
diff --git a/3rdparty/assimp/code/STLLoader.cpp b/3rdparty/assimp/code/STLLoader.cpp
index 2c8701dfc..894124f2f 100644
--- a/3rdparty/assimp/code/STLLoader.cpp
+++ b/3rdparty/assimp/code/STLLoader.cpp
@@ -70,7 +70,7 @@ bool STLImporter::CanRead( const std::string& pFile, IOSystem* pIOHandler, bool
if (extension == "stl")
return true;
- else if (!extension.length() || checkSig) {
+ else if (!extension.length() || checkSig) {
if (!pIOHandler)
return true;
const char* tokens[] = {"STL","solid"};
@@ -93,7 +93,7 @@ void STLImporter::InternReadFile( const std::string& pFile,
boost::scoped_ptr<IOStream> file( pIOHandler->Open( pFile, "rb"));
// Check whether we can read from the file
- if ( file.get() == NULL) {
+ if ( file.get() == NULL) {
throw DeadlyImportError( "Failed to open STL file " + pFile + ".");
}
@@ -133,7 +133,7 @@ void STLImporter::InternReadFile( const std::string& pFile,
// now copy faces
pMesh->mFaces = new aiFace[pMesh->mNumFaces];
- for (unsigned int i = 0, p = 0; i < pMesh->mNumFaces;++i) {
+ for (unsigned int i = 0, p = 0; i < pMesh->mNumFaces;++i) {
aiFace& face = pMesh->mFaces[i];
face.mIndices = new unsigned int[face.mNumIndices = 3];
@@ -176,7 +176,7 @@ void STLImporter::LoadASCIIFile()
size_t temp;
// setup the name of the node
- if ((temp = (size_t)(sz-szMe))) {
+ if ((temp = (size_t)(sz-szMe))) {
pScene->mRootNode->mName.length = temp;
memcpy(pScene->mRootNode->mName.data,szMe,temp);
@@ -201,12 +201,12 @@ void STLImporter::LoadASCIIFile()
break;
}
// facet normal -0.13 -0.13 -0.98
- if (!strncmp(sz,"facet",5) && IsSpaceOrNewLine(*(sz+5))) {
+ if (!strncmp(sz,"facet",5) && IsSpaceOrNewLine(*(sz+5))) {
if (3 != curVertex) {
DefaultLogger::get()->warn("STL: A new facet begins but the old is not yet complete");
}
- if (pMesh->mNumFaces == curFace) {
+ if (pMesh->mNumFaces == curFace) {
// need to resize the arrays, our size estimate was wrong
unsigned int iNeededSize = (unsigned int)(sz-mBuffer) / pMesh->mNumFaces;
if (iNeededSize <= 160)iNeededSize >>= 1; // prevent endless looping
@@ -230,7 +230,7 @@ void STLImporter::LoadASCIIFile()
sz += 6;
curVertex = 0;
SkipSpaces(&sz);
- if (strncmp(sz,"normal",6)) {
+ if (strncmp(sz,"normal",6)) {
DefaultLogger::get()->warn("STL: a facet normal vector was expected but not found");
}
else
@@ -249,7 +249,7 @@ void STLImporter::LoadASCIIFile()
// vertex 1.50000 1.50000 0.00000
else if (!strncmp(sz,"vertex",6) && ::IsSpaceOrNewLine(*(sz+6)))
{
- if (3 == curVertex) {
+ if (3 == curVertex) {
DefaultLogger::get()->error("STL: a facet with more than 3 vertices has been found");
}
else
@@ -264,7 +264,7 @@ void STLImporter::LoadASCIIFile()
sz = fast_atof_move(sz, (float&)vn->z );
}
}
- else if (!::strncmp(sz,"endsolid",8)) {
+ else if (!::strncmp(sz,"endsolid",8)) {
// finished!
break;
}
@@ -274,7 +274,7 @@ void STLImporter::LoadASCIIFile()
}
}
- if (!curFace) {
+ if (!curFace) {
pMesh->mNumFaces = 0;
throw DeadlyImportError("STL: ASCII file is empty or invalid; no data loaded");
}
@@ -296,10 +296,10 @@ bool STLImporter::LoadBinaryFile()
// search for an occurence of "COLOR=" in the header
const char* sz2 = (const char*)mBuffer;
const char* const szEnd = sz2+80;
- while (sz2 < szEnd) {
+ while (sz2 < szEnd) {
if ('C' == *sz2++ && 'O' == *sz2++ && 'L' == *sz2++ &&
- 'O' == *sz2++ && 'R' == *sz2++ && '=' == *sz2++) {
+ 'O' == *sz2++ && 'R' == *sz2++ && '=' == *sz2++) {
// read the default vertex color for facets
bIsMaterialise = true;
@@ -334,7 +334,7 @@ bool STLImporter::LoadBinaryFile()
vp = pMesh->mVertices = new aiVector3D[pMesh->mNumVertices];
vn = pMesh->mNormals = new aiVector3D[pMesh->mNumVertices];
- for (unsigned int i = 0; i < pMesh->mNumFaces;++i) {
+ for (unsigned int i = 0; i < pMesh->mNumFaces;++i) {
// NOTE: Blender sometimes writes empty normals ... this is not
// our fault ... the RemoveInvalidData helper step should fix that
diff --git a/3rdparty/assimp/code/STLLoader.h b/3rdparty/assimp/code/STLLoader.h
index bdaacfe1e..edd0b2a95 100644
--- a/3rdparty/assimp/code/STLLoader.h
+++ b/3rdparty/assimp/code/STLLoader.h
@@ -47,7 +47,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "BaseImporter.h"
#include "../include/aiTypes.h"
-namespace Assimp {
+namespace Assimp {
// ---------------------------------------------------------------------------
/** Importer class for the sterolithography STL file format
diff --git a/3rdparty/assimp/code/SceneCombiner.cpp b/3rdparty/assimp/code/SceneCombiner.cpp
index 7ee40fd31..72ffc1110 100644
--- a/3rdparty/assimp/code/SceneCombiner.cpp
+++ b/3rdparty/assimp/code/SceneCombiner.cpp
@@ -52,7 +52,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "Hash.h"
#include "time.h"
-namespace Assimp {
+namespace Assimp {
// ------------------------------------------------------------------------------------------------
// Add a prefix to a string
@@ -179,7 +179,7 @@ void SceneCombiner::MergeScenes(aiScene** _dest,std::vector<aiScene*>& src,
master->mRootNode->mName.Set("<MergeRoot>");
std::vector<AttachmentInfo> srcList (src.size());
- for (unsigned int i = 0; i < srcList.size();++i) {
+ for (unsigned int i = 0; i < srcList.size();++i) {
srcList[i] = AttachmentInfo(src[i],master->mRootNode);
}
@@ -202,9 +202,9 @@ void SceneCombiner::AttachToGraph (aiNode* attach, std::vector<NodeAttachmentInf
++cnt;
}
- if (cnt) {
+ if (cnt) {
aiNode** n = new aiNode*[cnt+attach->mNumChildren];
- if (attach->mNumChildren) {
+ if (attach->mNumChildren) {
::memcpy(n,attach->mChildren,sizeof(void*)*attach->mNumChildren);
delete[] attach->mChildren;
}
@@ -213,9 +213,9 @@ void SceneCombiner::AttachToGraph (aiNode* attach, std::vector<NodeAttachmentInf
n += attach->mNumChildren;
attach->mNumChildren += cnt;
- for (unsigned int i = 0; i < srcList.size();++i) {
+ for (unsigned int i = 0; i < srcList.size();++i) {
NodeAttachmentInfo& att = srcList[i];
- if (att.attachToNode == attach && !att.resolved) {
+ if (att.attachToNode == attach && !att.resolved) {
*n = att.node;
(**n).mParent = attach;
++n;
@@ -260,7 +260,7 @@ void SceneCombiner::MergeScenes(aiScene** _dest, aiScene* master,
std::vector<SceneHelper> src (srcList.size()+1);
src[0].scene = master;
- for (unsigned int i = 0; i < srcList.size();++i) {
+ for (unsigned int i = 0; i < srcList.size();++i) {
src[i+1] = SceneHelper( srcList[i].scene );
}
@@ -295,11 +295,11 @@ void SceneCombiner::MergeScenes(aiScene** _dest, aiScene* master,
{
//if (i != duplicates[i])
//{
- // // duplicate scenes share the same UID
- // ::strcpy( src[i].id, src[duplicates[i]].id );
- // src[i].idlen = src[duplicates[i]].idlen;
+ // // duplicate scenes share the same UID
+ // ::strcpy( src[i].id, src[duplicates[i]].id );
+ // src[i].idlen = src[duplicates[i]].idlen;
- // continue;
+ // continue;
//}
src[i].idlen = ::sprintf(src[i].id,"$%.6X$_",i);
@@ -327,7 +327,7 @@ void SceneCombiner::MergeScenes(aiScene** _dest, aiScene* master,
{
SceneHelper* cur = &src[n];
- if (n == duplicates[n] || flags & AI_INT_MERGE_SCENE_DUPLICATES_DEEP_CPY) {
+ if (n == duplicates[n] || flags & AI_INT_MERGE_SCENE_DUPLICATES_DEEP_CPY) {
dest->mNumTextures += (*cur)->mNumTextures;
dest->mNumMaterials += (*cur)->mNumMaterials;
dest->mNumMeshes += (*cur)->mNumMeshes;
@@ -376,7 +376,7 @@ void SceneCombiner::MergeScenes(aiScene** _dest, aiScene* master,
{
aiMaterial** pip = dest->mMaterials = new aiMaterial*[dest->mNumMaterials];
cnt = 0;
- for ( unsigned int n = 0; n < src.size();++n ) {
+ for ( unsigned int n = 0; n < src.size();++n ) {
SceneHelper* cur = &src[n];
for (unsigned int i = 0; i < (*cur)->mNumMaterials;++i)
{
@@ -389,7 +389,7 @@ void SceneCombiner::MergeScenes(aiScene** _dest, aiScene* master,
}
else *pip = (*cur)->mMaterials[i];
- if ((*cur)->mNumTextures != dest->mNumTextures) {
+ if ((*cur)->mNumTextures != dest->mNumTextures) {
// We need to update all texture indices of the mesh. So we need to search for
// a material property called '$tex.file'
@@ -402,7 +402,7 @@ void SceneCombiner::MergeScenes(aiScene** _dest, aiScene* master,
// In this case the property looks like this: *<n>,
// where n is the index of the texture.
aiString& s = *((aiString*)prop->mData);
- if ('*' == s.data[0]) {
+ if ('*' == s.data[0]) {
// Offset the index and write it back ..
const unsigned int idx = strtol10(&s.data[1]) + offset[n];
ASSIMP_itoa10(&s.data[1],sizeof(s.data)-1,idx);
@@ -435,7 +435,7 @@ void SceneCombiner::MergeScenes(aiScene** _dest, aiScene* master,
SceneHelper* cur = &src[n];
for (unsigned int i = 0; i < (*cur)->mNumMeshes;++i)
{
- if (n != duplicates[n]) {
+ if (n != duplicates[n]) {
if ( flags & AI_INT_MERGE_SCENE_DUPLICATES_DEEP_CPY)
Copy(pip, (*cur)->mMeshes[i]);
@@ -488,7 +488,7 @@ void SceneCombiner::MergeScenes(aiScene** _dest, aiScene* master,
Copy( &node, (*cur)->mRootNode );
OffsetNodeMeshIndices(node,offset[duplicates[n]]);
- if (flags & AI_INT_MERGE_SCENE_DUPLICATES_DEEP_CPY) {
+ if (flags & AI_INT_MERGE_SCENE_DUPLICATES_DEEP_CPY) {
// (note:) they are already 'offseted' by offset[duplicates[n]]
OffsetNodeMeshIndices(node,offset[n] - offset[duplicates[n]]);
}
@@ -511,11 +511,11 @@ void SceneCombiner::MergeScenes(aiScene** _dest, aiScene* master,
else AddNodePrefixes(node,(*cur).id,(*cur).idlen);
// meshes
- for (unsigned int i = 0; i < (*cur)->mNumMeshes;++i) {
+ for (unsigned int i = 0; i < (*cur)->mNumMeshes;++i) {
aiMesh* mesh = (*cur)->mMeshes[i];
// rename all bones
- for (unsigned int a = 0; a < mesh->mNumBones;++a) {
+ for (unsigned int a = 0; a < mesh->mNumBones;++a) {
if (flags & AI_INT_MERGE_SCENE_GEN_UNIQUE_NAMES_IF_NECESSARY) {
if (!FindNameMatch(mesh->mBones[a]->mName,src,n))
continue;
@@ -549,7 +549,7 @@ void SceneCombiner::MergeScenes(aiScene** _dest, aiScene* master,
// --------------------------------------------------------------------
// Copy cameras
- for (unsigned int i = 0; i < (*cur)->mNumCameras;++i,++ppCameras) {
+ for (unsigned int i = 0; i < (*cur)->mNumCameras;++i,++ppCameras) {
if (n != (int)duplicates[n]) // duplicate scene?
{
Copy(ppCameras, (*cur)->mCameras[i]);
@@ -569,7 +569,7 @@ void SceneCombiner::MergeScenes(aiScene** _dest, aiScene* master,
// --------------------------------------------------------------------
// Copy animations
- for (unsigned int i = 0; i < (*cur)->mNumAnimations;++i,++ppAnims) {
+ for (unsigned int i = 0; i < (*cur)->mNumAnimations;++i,++ppAnims) {
if (n != (int)duplicates[n]) // duplicate scene?
{
Copy(ppAnims, (*cur)->mAnimations[i]);
@@ -626,7 +626,7 @@ void SceneCombiner::MergeScenes(aiScene** _dest, aiScene* master,
// now delete all input scenes. Make sure duplicate scenes aren't
// deleted more than one time
- for ( unsigned int n = 0; n < src.size();++n ) {
+ for ( unsigned int n = 0; n < src.size();++n ) {
if (n != duplicates[n]) // duplicate scene?
continue;
@@ -661,21 +661,21 @@ void SceneCombiner::BuildUniqueBoneList(std::list<BoneWithHash>& asBones,
std::vector<aiMesh*>::const_iterator end)
{
unsigned int iOffset = 0;
- for (; it != end;++it) {
- for (unsigned int l = 0; l < (*it)->mNumBones;++l) {
+ for (; it != end;++it) {
+ for (unsigned int l = 0; l < (*it)->mNumBones;++l) {
aiBone* p = (*it)->mBones[l];
uint32_t itml = SuperFastHash(p->mName.data,(unsigned int)p->mName.length);
std::list<BoneWithHash>::iterator it2 = asBones.begin();
std::list<BoneWithHash>::iterator end2 = asBones.end();
- for (;it2 != end2;++it2) {
- if ((*it2).first == itml) {
+ for (;it2 != end2;++it2) {
+ if ((*it2).first == itml) {
(*it2).pSrcBones.push_back(BoneSrcIndex(p,iOffset));
break;
}
}
- if (end2 == it2) {
+ if (end2 == it2) {
// need to begin a new bone entry
asBones.push_back(BoneWithHash());
BoneWithHash& btz = asBones.back();
@@ -707,7 +707,7 @@ void SceneCombiner::MergeBones(aiMesh* out,std::vector<aiMesh*>::const_iterator
out->mNumBones = 0;
out->mBones = new aiBone*[asBones.size()];
- for (std::list<BoneWithHash>::const_iterator it = asBones.begin(),end = asBones.end(); it != end;++it) {
+ for (std::list<BoneWithHash>::const_iterator it = asBones.begin(),end = asBones.end(); it != end;++it) {
// Allocate a bone and setup it's name
aiBone* pc = out->mBones[out->mNumBones++] = new aiBone();
pc->mName = aiString( *((*it).second ));
@@ -715,12 +715,12 @@ void SceneCombiner::MergeBones(aiMesh* out,std::vector<aiMesh*>::const_iterator
std::vector< BoneSrcIndex >::const_iterator wend = (*it).pSrcBones.end();
// Loop through all bones to be joined for this bone
- for (std::vector< BoneSrcIndex >::const_iterator wmit = (*it).pSrcBones.begin(); wmit != wend; ++wmit) {
+ for (std::vector< BoneSrcIndex >::const_iterator wmit = (*it).pSrcBones.begin(); wmit != wend; ++wmit) {
pc->mNumWeights += (*wmit).first->mNumWeights;
// NOTE: different offset matrices for bones with equal names
// are - at the moment - not handled correctly.
- if (wmit != (*it).pSrcBones.begin() && pc->mOffsetMatrix != (*wmit).first->mOffsetMatrix) {
+ if (wmit != (*it).pSrcBones.begin() && pc->mOffsetMatrix != (*wmit).first->mOffsetMatrix) {
DefaultLogger::get()->warn("Bones with equal names but different offset matrices can't be joined at the moment");
continue;
}
@@ -732,9 +732,9 @@ void SceneCombiner::MergeBones(aiMesh* out,std::vector<aiMesh*>::const_iterator
// And copy the final weights - adjust the vertex IDs by the
// face index offset of the coresponding mesh.
- for (std::vector< BoneSrcIndex >::const_iterator wmit = (*it).pSrcBones.begin(); wmit != wend; ++wmit) {
+ for (std::vector< BoneSrcIndex >::const_iterator wmit = (*it).pSrcBones.begin(); wmit != wend; ++wmit) {
aiBone* pip = (*wmit).first;
- for (unsigned int mp = 0; mp < pip->mNumWeights;++mp,++avw) {
+ for (unsigned int mp = 0; mp < pip->mNumWeights;++mp,++avw) {
const aiVertexWeight& vfi = pip->mWeights[mp];
avw->mWeight = vfi.mWeight;
avw->mVertexId = vfi.mVertexId + (*wmit).second;
@@ -745,13 +745,13 @@ void SceneCombiner::MergeBones(aiMesh* out,std::vector<aiMesh*>::const_iterator
// ------------------------------------------------------------------------------------------------
// Merge a list of meshes
-void SceneCombiner::MergeMeshes(aiMesh** _out,unsigned int /*flags*/,
+void SceneCombiner::MergeMeshes(aiMesh** _out,unsigned int flags,
std::vector<aiMesh*>::const_iterator begin,
std::vector<aiMesh*>::const_iterator end)
{
ai_assert(NULL != _out);
- if (begin == end) {
+ if (begin == end) {
*_out = NULL; // no meshes ...
return;
}
@@ -761,10 +761,10 @@ void SceneCombiner::MergeMeshes(aiMesh** _out,unsigned int /*flags*/,
out->mMaterialIndex = (*begin)->mMaterialIndex;
// Find out how much output storage we'll need
- for (std::vector<aiMesh*>::const_iterator it = begin; it != end;++it) {
- out->mNumVertices += (*it)->mNumVertices;
- out->mNumFaces += (*it)->mNumFaces;
- out->mNumBones += (*it)->mNumBones;
+ for (std::vector<aiMesh*>::const_iterator it = begin; it != end;++it) {
+ out->mNumVertices += (*it)->mNumVertices;
+ out->mNumFaces += (*it)->mNumFaces;
+ out->mNumBones += (*it)->mNumBones;
// combine primitive type flags
out->mPrimitiveTypes |= (*it)->mPrimitiveTypes;
@@ -774,11 +774,11 @@ void SceneCombiner::MergeMeshes(aiMesh** _out,unsigned int /*flags*/,
aiVector3D* pv2;
// copy vertex positions
- if ((**begin).HasPositions()) {
+ if ((**begin).HasPositions()) {
pv2 = out->mVertices = new aiVector3D[out->mNumVertices];
- for (std::vector<aiMesh*>::const_iterator it = begin; it != end;++it) {
- if ((*it)->mVertices) {
+ for (std::vector<aiMesh*>::const_iterator it = begin; it != end;++it) {
+ if ((*it)->mVertices) {
::memcpy(pv2,(*it)->mVertices,(*it)->mNumVertices*sizeof(aiVector3D));
}
else DefaultLogger::get()->warn("JoinMeshes: Positions expected but input mesh contains no positions");
@@ -786,11 +786,11 @@ void SceneCombiner::MergeMeshes(aiMesh** _out,unsigned int /*flags*/,
}
}
// copy normals
- if ((**begin).HasNormals()) {
+ if ((**begin).HasNormals()) {
pv2 = out->mNormals = new aiVector3D[out->mNumVertices];
- for (std::vector<aiMesh*>::const_iterator it = begin; it != end;++it) {
- if ((*it)->mNormals) {
+ for (std::vector<aiMesh*>::const_iterator it = begin; it != end;++it) {
+ if ((*it)->mNormals) {
::memcpy(pv2,(*it)->mNormals,(*it)->mNumVertices*sizeof(aiVector3D));
}
else DefaultLogger::get()->warn("JoinMeshes: Normals expected but input mesh contains no normals");
@@ -798,14 +798,14 @@ void SceneCombiner::MergeMeshes(aiMesh** _out,unsigned int /*flags*/,
}
}
// copy tangents and bitangents
- if ((**begin).HasTangentsAndBitangents()) {
+ if ((**begin).HasTangentsAndBitangents()) {
pv2 = out->mTangents = new aiVector3D[out->mNumVertices];
aiVector3D* pv2b = out->mBitangents = new aiVector3D[out->mNumVertices];
- for (std::vector<aiMesh*>::const_iterator it = begin; it != end;++it) {
- if ((*it)->mTangents) {
- ::memcpy(pv2, (*it)->mTangents, (*it)->mNumVertices*sizeof(aiVector3D));
+ for (std::vector<aiMesh*>::const_iterator it = begin; it != end;++it) {
+ if ((*it)->mTangents) {
+ ::memcpy(pv2, (*it)->mTangents, (*it)->mNumVertices*sizeof(aiVector3D));
::memcpy(pv2b,(*it)->mBitangents,(*it)->mNumVertices*sizeof(aiVector3D));
}
else DefaultLogger::get()->warn("JoinMeshes: Tangents expected but input mesh contains no tangents");
@@ -815,13 +815,13 @@ void SceneCombiner::MergeMeshes(aiMesh** _out,unsigned int /*flags*/,
}
// copy texture coordinates
unsigned int n = 0;
- while ((**begin).HasTextureCoords(n)) {
+ while ((**begin).HasTextureCoords(n)) {
out->mNumUVComponents[n] = (*begin)->mNumUVComponents[n];
pv2 = out->mTextureCoords[n] = new aiVector3D[out->mNumVertices];
- for (std::vector<aiMesh*>::const_iterator it = begin; it != end;++it) {
+ for (std::vector<aiMesh*>::const_iterator it = begin; it != end;++it) {
- if ((*it)->mTextureCoords[n]) {
+ if ((*it)->mTextureCoords[n]) {
::memcpy(pv2,(*it)->mTextureCoords[n],(*it)->mNumVertices*sizeof(aiVector3D));
}
else DefaultLogger::get()->warn("JoinMeshes: UVs expected but input mesh contains no UVs");
@@ -831,11 +831,11 @@ void SceneCombiner::MergeMeshes(aiMesh** _out,unsigned int /*flags*/,
}
// copy vertex colors
n = 0;
- while ((**begin).HasVertexColors(n)) {
+ while ((**begin).HasVertexColors(n)) {
aiColor4D* pv2 = out->mColors[n] = new aiColor4D[out->mNumVertices];
- for (std::vector<aiMesh*>::const_iterator it = begin; it != end;++it) {
+ for (std::vector<aiMesh*>::const_iterator it = begin; it != end;++it) {
- if ((*it)->mColors[n]) {
+ if ((*it)->mColors[n]) {
::memcpy(pv2,(*it)->mColors[n],(*it)->mNumVertices*sizeof(aiColor4D));
}
else DefaultLogger::get()->warn("JoinMeshes: VCs expected but input mesh contains no VCs");
@@ -852,13 +852,13 @@ void SceneCombiner::MergeMeshes(aiMesh** _out,unsigned int /*flags*/,
aiFace* pf2 = out->mFaces;
unsigned int ofs = 0;
- for (std::vector<aiMesh*>::const_iterator it = begin; it != end;++it) {
- for (unsigned int m = 0; m < (*it)->mNumFaces;++m,++pf2) {
+ for (std::vector<aiMesh*>::const_iterator it = begin; it != end;++it) {
+ for (unsigned int m = 0; m < (*it)->mNumFaces;++m,++pf2) {
aiFace& face = (*it)->mFaces[m];
pf2->mNumIndices = face.mNumIndices;
pf2->mIndices = face.mIndices;
- if (ofs) {
+ if (ofs) {
// add the offset to the vertex
for (unsigned int q = 0; q < face.mNumIndices; ++q)
face.mIndices[q] += ofs;
@@ -1015,7 +1015,7 @@ void SceneCombiner::Copy (aiMaterial** _dest, const aiMaterial* src)
prop->mIndex = sprop->mIndex;
prop->mSemantic = sprop->mSemantic;
prop->mKey = sprop->mKey;
- prop->mType = sprop->mType;
+ prop->mType = sprop->mType;
}
}
diff --git a/3rdparty/assimp/code/SceneCombiner.h b/3rdparty/assimp/code/SceneCombiner.h
index 8c29c8fd7..a8fd43cba 100644
--- a/3rdparty/assimp/code/SceneCombiner.h
+++ b/3rdparty/assimp/code/SceneCombiner.h
@@ -46,7 +46,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "../include/aiAssert.h"
-namespace Assimp {
+namespace Assimp {
// ---------------------------------------------------------------------------
/** \brief Helper data structure for SceneCombiner.
@@ -56,13 +56,13 @@ namespace Assimp {
struct AttachmentInfo
{
AttachmentInfo()
- : scene (NULL)
- , attachToNode (NULL)
+ : scene (NULL)
+ , attachToNode (NULL)
{}
AttachmentInfo(aiScene* _scene, aiNode* _attachToNode)
- : scene (_scene)
- , attachToNode (_attachToNode)
+ : scene (_scene)
+ , attachToNode (_attachToNode)
{}
aiScene* scene;
@@ -73,17 +73,17 @@ struct AttachmentInfo
struct NodeAttachmentInfo
{
NodeAttachmentInfo()
- : node (NULL)
- , attachToNode (NULL)
- , resolved (false)
- , src_idx (0xffffffff)
+ : node (NULL)
+ , attachToNode (NULL)
+ , resolved (false)
+ , src_idx (0xffffffff)
{}
NodeAttachmentInfo(aiNode* _scene, aiNode* _attachToNode,size_t idx)
- : node (_scene)
- , attachToNode (_attachToNode)
- , resolved (false)
- , src_idx (idx)
+ : node (_scene)
+ , attachToNode (_attachToNode)
+ , resolved (false)
+ , src_idx (idx)
{}
aiNode* node;
@@ -128,7 +128,7 @@ typedef std::pair<aiBone*,unsigned int> BoneSrcIndex;
// ---------------------------------------------------------------------------
/** @brief Helper data structure for SceneCombiner::MergeBones.
*/
-struct BoneWithHash : public std::pair<uint32_t,aiString*> {
+struct BoneWithHash : public std::pair<uint32_t,aiString*> {
std::vector<BoneSrcIndex> pSrcBones;
};
@@ -139,15 +139,15 @@ struct BoneWithHash : public std::pair<uint32_t,aiString*> {
struct SceneHelper
{
SceneHelper ()
- : scene (NULL)
- , idlen (0)
+ : scene (NULL)
+ , idlen (0)
{
id[0] = 0;
}
SceneHelper (aiScene* _scene)
- : scene (_scene)
- , idlen (0)
+ : scene (_scene)
+ , idlen (0)
{
id[0] = 0;
}
diff --git a/3rdparty/assimp/code/ScenePreprocessor.cpp b/3rdparty/assimp/code/ScenePreprocessor.cpp
index 682a161a6..e7a83c512 100644
--- a/3rdparty/assimp/code/ScenePreprocessor.cpp
+++ b/3rdparty/assimp/code/ScenePreprocessor.cpp
@@ -62,7 +62,7 @@ void ScenePreprocessor::ProcessScene ()
ProcessAnimation(scene->mAnimations[i]);
// Generate a default material if none was specified
- if (!scene->mNumMaterials && scene->mNumMeshes) {
+ if (!scene->mNumMaterials && scene->mNumMeshes) {
scene->mMaterials = new aiMaterial*[2];
MaterialHelper* helper;
@@ -113,7 +113,7 @@ void ScenePreprocessor::ProcessScene ()
void ScenePreprocessor::ProcessMesh (aiMesh* mesh)
{
// If aiMesh::mNumUVComponents is *not* set assign the default value of 2
- for (unsigned int i = 0; i < AI_MAX_NUMBER_OF_TEXTURECOORDS; ++i) {
+ for (unsigned int i = 0; i < AI_MAX_NUMBER_OF_TEXTURECOORDS; ++i) {
if (!mesh->mTextureCoords[i])
mesh->mNumUVComponents[i] = 0;
@@ -151,8 +151,8 @@ void ScenePreprocessor::ProcessMesh (aiMesh* mesh)
// If the information which primitive types are there in the
// mesh is currently not available, compute it.
- if (!mesh->mPrimitiveTypes) {
- for (unsigned int a = 0; a < mesh->mNumFaces; ++a) {
+ if (!mesh->mPrimitiveTypes) {
+ for (unsigned int a = 0; a < mesh->mNumFaces; ++a) {
aiFace& face = mesh->mFaces[a];
switch (face.mNumIndices)
{
@@ -176,10 +176,10 @@ void ScenePreprocessor::ProcessMesh (aiMesh* mesh)
}
// If tangents and normals are given but no bitangents compute them
- if (mesh->mTangents && mesh->mNormals && !mesh->mBitangents) {
+ if (mesh->mTangents && mesh->mNormals && !mesh->mBitangents) {
mesh->mBitangents = new aiVector3D[mesh->mNumVertices];
- for (unsigned int i = 0; i < mesh->mNumVertices;++i) {
+ for (unsigned int i = 0; i < mesh->mNumVertices;++i) {
mesh->mBitangents[i] = mesh->mNormals[i] ^ mesh->mTangents[i];
}
}
@@ -189,30 +189,30 @@ void ScenePreprocessor::ProcessMesh (aiMesh* mesh)
void ScenePreprocessor::ProcessAnimation (aiAnimation* anim)
{
double first = 10e10, last = -10e10;
- for (unsigned int i = 0; i < anim->mNumChannels;++i) {
+ for (unsigned int i = 0; i < anim->mNumChannels;++i) {
aiNodeAnim* channel = anim->mChannels[i];
/* If the exact duration of the animation is not given
* compute it now.
*/
- if (anim->mDuration == -1.) {
+ if (anim->mDuration == -1.) {
// Position keys
- for (unsigned int i = 0; i < channel->mNumPositionKeys;++i) {
+ for (unsigned int i = 0; i < channel->mNumPositionKeys;++i) {
aiVectorKey& key = channel->mPositionKeys[i];
first = std::min (first, key.mTime);
last = std::max (last, key.mTime);
}
// Scaling keys
- for (unsigned int i = 0; i < channel->mNumScalingKeys;++i) {
+ for (unsigned int i = 0; i < channel->mNumScalingKeys;++i) {
aiVectorKey& key = channel->mScalingKeys[i];
first = std::min (first, key.mTime);
last = std::max (last, key.mTime);
}
// Rotation keys
- for (unsigned int i = 0; i < channel->mNumRotationKeys;++i) {
+ for (unsigned int i = 0; i < channel->mNumRotationKeys;++i) {
aiQuatKey& key = channel->mRotationKeys[i];
first = std::min (first, key.mTime);
last = std::max (last, key.mTime);
@@ -224,7 +224,7 @@ void ScenePreprocessor::ProcessAnimation (aiAnimation* anim)
* track from the information we have in the transformation
* matrix of the corresponding node.
*/
- if (!channel->mNumRotationKeys || !channel->mNumPositionKeys || !channel->mNumScalingKeys) {
+ if (!channel->mNumRotationKeys || !channel->mNumPositionKeys || !channel->mNumScalingKeys) {
// Find the node that belongs to this animation
aiNode* node = scene->mRootNode->FindNode(channel->mNodeName);
if (node) // ValidateDS will complain later if 'node' is NULL
@@ -236,7 +236,7 @@ void ScenePreprocessor::ProcessAnimation (aiAnimation* anim)
node->mTransformation.Decompose(scaling, rotation,position);
// No rotation keys? Generate a dummy track
- if (!channel->mNumRotationKeys) {
+ if (!channel->mNumRotationKeys) {
channel->mNumRotationKeys = 1;
channel->mRotationKeys = new aiQuatKey[1];
aiQuatKey& q = channel->mRotationKeys[0];
@@ -248,7 +248,7 @@ void ScenePreprocessor::ProcessAnimation (aiAnimation* anim)
}
// No scaling keys? Generate a dummy track
- if (!channel->mNumScalingKeys) {
+ if (!channel->mNumScalingKeys) {
channel->mNumScalingKeys = 1;
channel->mScalingKeys = new aiVectorKey[1];
aiVectorKey& q = channel->mScalingKeys[0];
@@ -260,7 +260,7 @@ void ScenePreprocessor::ProcessAnimation (aiAnimation* anim)
}
// No position keys? Generate a dummy track
- if (!channel->mNumPositionKeys) {
+ if (!channel->mNumPositionKeys) {
channel->mNumPositionKeys = 1;
channel->mPositionKeys = new aiVectorKey[1];
aiVectorKey& q = channel->mPositionKeys[0];
@@ -274,7 +274,7 @@ void ScenePreprocessor::ProcessAnimation (aiAnimation* anim)
}
}
- if (anim->mDuration == -1.) {
+ if (anim->mDuration == -1.) {
DefaultLogger::get()->debug("ScenePreprocessor: Setting animation duration");
anim->mDuration = last - std::min( first, 0. );
}
diff --git a/3rdparty/assimp/code/ScenePreprocessor.h b/3rdparty/assimp/code/ScenePreprocessor.h
index 01bbf7dce..862544699 100644
--- a/3rdparty/assimp/code/ScenePreprocessor.h
+++ b/3rdparty/assimp/code/ScenePreprocessor.h
@@ -44,7 +44,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define AI_SCENE_PREPROCESSOR_H_INC
class ScenePreprocessorTest;
-namespace Assimp {
+namespace Assimp {
// ----------------------------------------------------------------------------------
/** ScenePreprocessor: Preprocess a scene before any post-processing
@@ -64,13 +64,13 @@ public:
/** Default c'tpr. Use SetScene() to assign a scene to the object.
*/
ScenePreprocessor()
- : scene (NULL)
+ : scene (NULL)
{}
/** Constructs the object and assigns a specific scene to it
*/
ScenePreprocessor(aiScene* _scene)
- : scene (_scene)
+ : scene (_scene)
{}
// ----------------------------------------------------------------
@@ -80,7 +80,7 @@ public:
* Call ProcessScene to have the scene preprocessed.
* @param sc Scene to be processed.
*/
- void SetScene (aiScene* sc) {
+ void SetScene (aiScene* sc) {
scene = sc;
}
diff --git a/3rdparty/assimp/code/SkeletonMeshBuilder.h b/3rdparty/assimp/code/SkeletonMeshBuilder.h
index 3989e7cff..2575d0725 100644
--- a/3rdparty/assimp/code/SkeletonMeshBuilder.h
+++ b/3rdparty/assimp/code/SkeletonMeshBuilder.h
@@ -54,7 +54,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
struct aiScene;
struct aiNode;
-namespace Assimp {
+namespace Assimp {
// ---------------------------------------------------------------------------
/**
diff --git a/3rdparty/assimp/code/SortByPTypeProcess.cpp b/3rdparty/assimp/code/SortByPTypeProcess.cpp
index dde600354..613245ffb 100644
--- a/3rdparty/assimp/code/SortByPTypeProcess.cpp
+++ b/3rdparty/assimp/code/SortByPTypeProcess.cpp
@@ -69,7 +69,7 @@ SortByPTypeProcess::~SortByPTypeProcess()
// Returns whether the processing step is present in the given flag field.
bool SortByPTypeProcess::IsActive( unsigned int pFlags) const
{
- return (pFlags & aiProcess_SortByPType) != 0;
+ return (pFlags & aiProcess_SortByPType) != 0;
}
// ------------------------------------------------------------------------------------------------
@@ -82,7 +82,7 @@ void SortByPTypeProcess::SetupProperties(const Importer* pImp)
// Update changed meshes in all nodes
void UpdateNodes(const std::vector<unsigned int>& replaceMeshIndex, aiNode* node)
{
-// std::vector<unsigned int>::const_iterator it;
+// std::vector<unsigned int>::const_iterator it;
if (node->mNumMeshes)
{
@@ -367,9 +367,6 @@ void SortByPTypeProcess::Execute( aiScene* pScene)
// delete the input mesh
delete mesh;
-
- // nullify the original pointer in case outMeshes.empty() is true at the end of this loop
- pScene->mMeshes[i] = NULL;
}
if (outMeshes.empty())
diff --git a/3rdparty/assimp/code/SortByPTypeProcess.h b/3rdparty/assimp/code/SortByPTypeProcess.h
index 835dedc8f..539df2995 100644
--- a/3rdparty/assimp/code/SortByPTypeProcess.h
+++ b/3rdparty/assimp/code/SortByPTypeProcess.h
@@ -47,7 +47,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "../include/aiMesh.h"
class SortByPTypeProcessTest;
-namespace Assimp {
+namespace Assimp {
// ---------------------------------------------------------------------------
diff --git a/3rdparty/assimp/code/SpatialSort.cpp b/3rdparty/assimp/code/SpatialSort.cpp
index c39426db7..343f90912 100644
--- a/3rdparty/assimp/code/SpatialSort.cpp
+++ b/3rdparty/assimp/code/SpatialSort.cpp
@@ -48,7 +48,7 @@ using namespace Assimp;
// CHAR_BIT seems to be defined under MVSC, but not under GCC. Pray that the correct value is 8.
#ifndef CHAR_BIT
-# define CHAR_BIT 8
+# define CHAR_BIT 8
#endif
// ------------------------------------------------------------------------------------------------
@@ -101,13 +101,18 @@ void SpatialSort::Append( const aiVector3D* pPositions, unsigned int pNumPositio
// store references to all given positions along with their distance to the reference plane
const size_t initial = mPositions.size();
mPositions.reserve(initial + (pFinalize?pNumPositions:pNumPositions*2));
- for ( unsigned int a = 0; a < pNumPositions; a++)
+ for( unsigned int a = 0; a < pNumPositions; a++)
{
const char* tempPointer = reinterpret_cast<const char*> (pPositions);
const aiVector3D* vec = reinterpret_cast<const aiVector3D*> (tempPointer + a * pElementOffset);
// store position by index and distance
float distance = *vec * mPlaneNormal;
+
+ // UGLY HACK !!!
+ // TODO: fix it
+ volatile int KillOptimisation = *((int*)&distance);
+
mPositions.push_back( Entry( a+initial, *vec, distance));
}
@@ -130,19 +135,19 @@ void SpatialSort::FindPositions( const aiVector3D& pPosition,
poResults.erase( poResults.begin(), poResults.end());
// quick check for positions outside the range
- if ( mPositions.size() == 0)
+ if( mPositions.size() == 0)
return;
- if ( maxDist < mPositions.front().mDistance)
+ if( maxDist < mPositions.front().mDistance)
return;
- if ( minDist > mPositions.back().mDistance)
+ if( minDist > mPositions.back().mDistance)
return;
// do a binary search for the minimal distance to start the iteration there
unsigned int index = (unsigned int)mPositions.size() / 2;
unsigned int binaryStepSize = (unsigned int)mPositions.size() / 4;
- while ( binaryStepSize > 1)
+ while( binaryStepSize > 1)
{
- if ( mPositions[index].mDistance < minDist)
+ if( mPositions[index].mDistance < minDist)
index += binaryStepSize;
else
index -= binaryStepSize;
@@ -152,21 +157,21 @@ void SpatialSort::FindPositions( const aiVector3D& pPosition,
// depending on the direction of the last step we need to single step a bit back or forth
// to find the actual beginning element of the range
- while ( index > 0 && mPositions[index].mDistance > minDist)
+ while( index > 0 && mPositions[index].mDistance > minDist)
index--;
- while ( index < (mPositions.size() - 1) && mPositions[index].mDistance < minDist)
+ while( index < (mPositions.size() - 1) && mPositions[index].mDistance < minDist)
index++;
// Mow start iterating from there until the first position lays outside of the distance range.
// Add all positions inside the distance range within the given radius to the result aray
std::vector<Entry>::const_iterator it = mPositions.begin() + index;
const float pSquared = pRadius*pRadius;
- while ( it->mDistance < maxDist)
+ while( it->mDistance < maxDist)
{
- if ( (it->mPosition - pPosition).SquareLength() < pSquared)
+ if( (it->mPosition - pPosition).SquareLength() < pSquared)
poResults.push_back( it->mIndex);
++it;
- if ( it == mPositions.end())
+ if( it == mPositions.end())
break;
}
@@ -177,11 +182,11 @@ namespace {
// Binary, signed-integer representation of a single-precision floating-point value.
// IEEE 754 says: "If two floating-point numbers in the same format are ordered then they are
- // ordered the same way when their bits are reinterpreted as sign-magnitude integers."
+ // ordered the same way when their bits are reinterpreted as sign-magnitude integers."
// This allows us to convert all floating-point numbers to signed integers of arbitrary size
- // and then use them to work with ULPs (Units in the Last Place, for high-precision
- // computations) or to compare them (integer comparisons are faster than floating-point
- // comparisons on many platforms).
+ // and then use them to work with ULPs (Units in the Last Place, for high-precision
+ // computations) or to compare them (integer comparisons are faster than floating-point
+ // comparisons on many platforms).
typedef signed int BinFloat;
// --------------------------------------------------------------------------------------------
@@ -189,15 +194,15 @@ namespace {
BinFloat ToBinary( const float & pValue) {
// If this assertion fails, signed int is not big enough to store a float on your platform.
- // Please correct the declaration of BinFloat a few lines above - but do it in a portable,
- // #ifdef'd manner!
+ // Please correct the declaration of BinFloat a few lines above - but do it in a portable,
+ // #ifdef'd manner!
BOOST_STATIC_ASSERT( sizeof(BinFloat) >= sizeof(float));
#if defined( _MSC_VER)
// If this assertion fails, Visual C++ has finally moved to ILP64. This means that this
- // code has just become legacy code! Find out the current value of _MSC_VER and modify
- // the #if above so it evaluates false on the current and all upcoming VC versions (or
- // on the current platform, if LP64 or LLP64 are still used on other platforms).
+ // code has just become legacy code! Find out the current value of _MSC_VER and modify
+ // the #if above so it evaluates false on the current and all upcoming VC versions (or
+ // on the current platform, if LP64 or LLP64 are still used on other platforms).
BOOST_STATIC_ASSERT( sizeof(BinFloat) == sizeof(float));
// This works best on Visual C++, but other compilers have their problems with it.
@@ -206,26 +211,26 @@ namespace {
// On many compilers, reinterpreting a float address as an integer causes aliasing
// problems. This is an ugly but more or less safe way of doing it.
union {
- float asFloat;
- BinFloat asBin;
+ float asFloat;
+ BinFloat asBin;
} conversion;
- conversion.asBin = 0; // zero empty space in case sizeof(BinFloat) > sizeof(float)
- conversion.asFloat = pValue;
+ conversion.asBin = 0; // zero empty space in case sizeof(BinFloat) > sizeof(float)
+ conversion.asFloat = pValue;
const BinFloat binValue = conversion.asBin;
#endif
// floating-point numbers are of sign-magnitude format, so find out what signed number
- // representation we must convert negative values to.
+ // representation we must convert negative values to.
// See http://en.wikipedia.org/wiki/Signed_number_representations.
// Two's complement?
- if ( (-42 == (~42 + 1)) && (binValue & 0x80000000))
+ if( (-42 == (~42 + 1)) && (binValue & 0x80000000))
return BinFloat(1 << (CHAR_BIT * sizeof(BinFloat) - 1)) - binValue;
// One's complement?
- else if ( (-42 == ~42) && (binValue & 0x80000000))
+ else if( (-42 == ~42) && (binValue & 0x80000000))
return BinFloat(-0) - binValue;
// Sign-magnitude?
- else if ( (-42 == (42 | (-0))) && (binValue & 0x80000000)) // -0 = 1000... binary
+ else if( (-42 == (42 | (-0))) && (binValue & 0x80000000)) // -0 = 1000... binary
return binValue;
else
return binValue;
@@ -240,30 +245,30 @@ void SpatialSort::FindIdenticalPositions( const aiVector3D& pPosition,
std::vector<unsigned int>& poResults) const
{
// Epsilons have a huge disadvantage: they are of constant precision, while floating-point
- // values are of log2 precision. If you apply e=0.01 to 100, the epsilon is rather small, but
- // if you apply it to 0.001, it is enormous.
+ // values are of log2 precision. If you apply e=0.01 to 100, the epsilon is rather small, but
+ // if you apply it to 0.001, it is enormous.
// The best way to overcome this is the unit in the last place (ULP). A precision of 2 ULPs
- // tells us that a float does not differ more than 2 bits from the "real" value. ULPs are of
- // logarithmic precision - around 1, they are 1(2^24) and around 10000, they are 0.00125.
+ // tells us that a float does not differ more than 2 bits from the "real" value. ULPs are of
+ // logarithmic precision - around 1, they are 1÷(2^24) and around 10000, they are 0.00125.
// For standard C math, we can assume a precision of 0.5 ULPs according to IEEE 754. The
- // incoming vertex positions might have already been transformed, probably using rather
- // inaccurate SSE instructions, so we assume a tolerance of 4 ULPs to safely identify
- // identical vertex positions.
+ // incoming vertex positions might have already been transformed, probably using rather
+ // inaccurate SSE instructions, so we assume a tolerance of 4 ULPs to safely identify
+ // identical vertex positions.
static const int toleranceInULPs = 4;
// An interesting point is that the inaccuracy grows linear with the number of operations:
- // multiplying to numbers, each inaccurate to four ULPs, results in an inaccuracy of four ULPs
- // plus 0.5 ULPs for the multiplication.
+ // multiplying to numbers, each inaccurate to four ULPs, results in an inaccuracy of four ULPs
+ // plus 0.5 ULPs for the multiplication.
// To compute the distance to the plane, a dot product is needed - that is a multiplication and
- // an addition on each number.
+ // an addition on each number.
static const int distanceToleranceInULPs = toleranceInULPs + 1;
// The squared distance between two 3D vectors is computed the same way, but with an additional
- // subtraction.
+ // subtraction.
static const int distance3DToleranceInULPs = distanceToleranceInULPs + 1;
// Convert the plane distance to its signed integer representation so the ULPs tolerance can be
- // applied. For some reason, VC won't optimize two calls of the bit pattern conversion.
+ // applied. For some reason, VC won't optimize two calls of the bit pattern conversion.
const BinFloat minDistBinary = ToBinary( pPosition * mPlaneNormal) - distanceToleranceInULPs;
const BinFloat maxDistBinary = minDistBinary + 2 * distanceToleranceInULPs;
@@ -274,10 +279,10 @@ void SpatialSort::FindIdenticalPositions( const aiVector3D& pPosition,
// do a binary search for the minimal distance to start the iteration there
unsigned int index = (unsigned int)mPositions.size() / 2;
unsigned int binaryStepSize = (unsigned int)mPositions.size() / 4;
- while ( binaryStepSize > 1)
+ while( binaryStepSize > 1)
{
// Ugly, but conditional jumps are faster with integers than with floats
- if ( minDistBinary > ToBinary(mPositions[index].mDistance))
+ if( minDistBinary > ToBinary(mPositions[index].mDistance))
index += binaryStepSize;
else
index -= binaryStepSize;
@@ -287,20 +292,20 @@ void SpatialSort::FindIdenticalPositions( const aiVector3D& pPosition,
// depending on the direction of the last step we need to single step a bit back or forth
// to find the actual beginning element of the range
- while ( index > 0 && minDistBinary < ToBinary(mPositions[index].mDistance) )
+ while( index > 0 && minDistBinary < ToBinary(mPositions[index].mDistance) )
index--;
- while ( index < (mPositions.size() - 1) && minDistBinary > ToBinary(mPositions[index].mDistance))
+ while( index < (mPositions.size() - 1) && minDistBinary > ToBinary(mPositions[index].mDistance))
index++;
// Now start iterating from there until the first position lays outside of the distance range.
// Add all positions inside the distance range within the tolerance to the result aray
std::vector<Entry>::const_iterator it = mPositions.begin() + index;
- while ( ToBinary(it->mDistance) < maxDistBinary)
+ while( ToBinary(it->mDistance) < maxDistBinary)
{
- if ( distance3DToleranceInULPs >= ToBinary((it->mPosition - pPosition).SquareLength()))
+ if( distance3DToleranceInULPs >= ToBinary((it->mPosition - pPosition).SquareLength()))
poResults.push_back(it->mIndex);
++it;
- if ( it == mPositions.end())
+ if( it == mPositions.end())
break;
}
diff --git a/3rdparty/assimp/code/SpatialSort.h b/3rdparty/assimp/code/SpatialSort.h
index 032b30d89..3205c05f1 100644
--- a/3rdparty/assimp/code/SpatialSort.h
+++ b/3rdparty/assimp/code/SpatialSort.h
@@ -156,7 +156,7 @@ protected:
Entry() { /** intentionally not initialized.*/ }
Entry( unsigned int pIndex, const aiVector3D& pPosition, float pDistance)
: mIndex( pIndex), mPosition( pPosition), mDistance( pDistance)
- { }
+ { }
bool operator < (const Entry& e) const { return mDistance < e.mDistance; }
};
diff --git a/3rdparty/assimp/code/SplitLargeMeshes.cpp b/3rdparty/assimp/code/SplitLargeMeshes.cpp
index f729d469c..f4950461a 100644
--- a/3rdparty/assimp/code/SplitLargeMeshes.cpp
+++ b/3rdparty/assimp/code/SplitLargeMeshes.cpp
@@ -164,9 +164,9 @@ void SplitLargeMeshesProcess_Triangle::SplitMesh(
// now generate all submeshes
for (unsigned int i = 0; i < iSubMeshes;++i)
{
- aiMesh* pcMesh = new aiMesh;
- pcMesh->mNumFaces = iOutFaceNum;
- pcMesh->mMaterialIndex = pMesh->mMaterialIndex;
+ aiMesh* pcMesh = new aiMesh;
+ pcMesh->mNumFaces = iOutFaceNum;
+ pcMesh->mMaterialIndex = pMesh->mMaterialIndex;
// the name carries the adjacency information between the meshes
pcMesh->mName = pMesh->mName;
@@ -441,9 +441,9 @@ void SplitLargeMeshesProcess_Vertex::SplitMesh(
{
const unsigned int iOutVertexNum = SplitLargeMeshesProcess_Vertex::LIMIT;
- aiMesh* pcMesh = new aiMesh;
- pcMesh->mNumVertices = 0;
- pcMesh->mMaterialIndex = pMesh->mMaterialIndex;
+ aiMesh* pcMesh = new aiMesh;
+ pcMesh->mNumVertices = 0;
+ pcMesh->mMaterialIndex = pMesh->mMaterialIndex;
// the name carries the adjacency information between the meshes
pcMesh->mName = pMesh->mName;
diff --git a/3rdparty/assimp/code/SplitLargeMeshes.h b/3rdparty/assimp/code/SplitLargeMeshes.h
index fd5aec56c..e3c08ddba 100644
--- a/3rdparty/assimp/code/SplitLargeMeshes.h
+++ b/3rdparty/assimp/code/SplitLargeMeshes.h
@@ -67,12 +67,12 @@ class SplitLargeMeshesProcess_Vertex;
// default limit for vertices
#if (!defined AI_SLM_DEFAULT_MAX_VERTICES)
-# define AI_SLM_DEFAULT_MAX_VERTICES 1000000
+# define AI_SLM_DEFAULT_MAX_VERTICES 1000000
#endif
// default limit for triangles
#if (!defined AI_SLM_DEFAULT_MAX_TRIANGLES)
-# define AI_SLM_DEFAULT_MAX_TRIANGLES 1000000
+# define AI_SLM_DEFAULT_MAX_TRIANGLES 1000000
#endif
// ---------------------------------------------------------------------------
diff --git a/3rdparty/assimp/code/StandardShapes.cpp b/3rdparty/assimp/code/StandardShapes.cpp
index 028db569e..e752918b0 100644
--- a/3rdparty/assimp/code/StandardShapes.cpp
+++ b/3rdparty/assimp/code/StandardShapes.cpp
@@ -48,7 +48,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "AssimpPCH.h"
#include "StandardShapes.h"
-namespace Assimp {
+namespace Assimp {
# define ADD_TRIANGLE(n0,n1,n2) \
@@ -56,7 +56,7 @@ namespace Assimp {
positions.push_back(n1); \
positions.push_back(n2);
-# define ADD_PENTAGON(n0,n1,n2,n3,n4) \
+# define ADD_PENTAGON(n0,n1,n2,n3,n4) \
if (polygons) \
{ \
positions.push_back(n0); \
@@ -72,7 +72,7 @@ namespace Assimp {
ADD_TRIANGLE(n0, n3, n4) \
}
-# define ADD_QUAD(n0,n1,n2,n3) \
+# define ADD_QUAD(n0,n1,n2,n3) \
if (polygons) \
{ \
positions.push_back(n0); \
@@ -361,7 +361,7 @@ unsigned int StandardShapes::MakeHexahedron(std::vector<aiVector3D>& positions,
// ------------------------------------------------------------------------------------------------
// Create a subdivision sphere
-void StandardShapes::MakeSphere(unsigned int tess,
+void StandardShapes::MakeSphere(unsigned int tess,
std::vector<aiVector3D>& positions)
{
// Reserve enough storage. Every subdivision
diff --git a/3rdparty/assimp/code/StandardShapes.h b/3rdparty/assimp/code/StandardShapes.h
index e5b550e36..ae59eb9d0 100644
--- a/3rdparty/assimp/code/StandardShapes.h
+++ b/3rdparty/assimp/code/StandardShapes.h
@@ -47,7 +47,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <vector>
-namespace Assimp {
+namespace Assimp {
// ---------------------------------------------------------------------------
/** \brief Helper class to generate vertex buffers for standard geometric
@@ -157,7 +157,7 @@ public:
* / \ | height |
* / \ | Y
* / \ |
- * / \ |
+ * / \ |
* /______x______\ <- ] <- end cap
*
* |-------------| <- radius 2
diff --git a/3rdparty/assimp/code/StdOStreamLogStream.h b/3rdparty/assimp/code/StdOStreamLogStream.h
index b80451f04..653dbf42e 100644
--- a/3rdparty/assimp/code/StdOStreamLogStream.h
+++ b/3rdparty/assimp/code/StdOStreamLogStream.h
@@ -4,42 +4,42 @@
#include "../include/LogStream.h"
#include <ostream>
-namespace Assimp {
+namespace Assimp {
// ---------------------------------------------------------------------------
-/** @class StdOStreamLogStream
- * @brief Logs into a std::ostream
+/** @class StdOStreamLogStream
+ * @brief Logs into a std::ostream
*/
class StdOStreamLogStream : public LogStream
{
public:
- /** @brief Construction from an existing std::ostream
+ /** @brief Construction from an existing std::ostream
* @param _ostream Output stream to be used
*/
StdOStreamLogStream(std::ostream& _ostream);
- /** @brief Destructor */
+ /** @brief Destructor */
~StdOStreamLogStream();
- /** @brief Writer */
+ /** @brief Writer */
void write(const char* message);
private:
std::ostream& ostream;
};
// ---------------------------------------------------------------------------
-// Default constructor
+// Default constructor
inline StdOStreamLogStream::StdOStreamLogStream(std::ostream& _ostream)
- : ostream (_ostream)
+ : ostream (_ostream)
{}
// ---------------------------------------------------------------------------
-// Default constructor
+// Default constructor
inline StdOStreamLogStream::~StdOStreamLogStream()
{}
// ---------------------------------------------------------------------------
-// Write method
+// Write method
inline void StdOStreamLogStream::write(const char* message)
{
ostream << message;
@@ -47,6 +47,6 @@ inline void StdOStreamLogStream::write(const char* message)
}
// ---------------------------------------------------------------------------
-} // Namespace Assimp
+} // Namespace Assimp
#endif // guard
diff --git a/3rdparty/assimp/code/StreamReader.h b/3rdparty/assimp/code/StreamReader.h
index 8e171c39f..2f42d5e97 100644
--- a/3rdparty/assimp/code/StreamReader.h
+++ b/3rdparty/assimp/code/StreamReader.h
@@ -46,19 +46,19 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define AI_STREAMREADER_H_INCLUDED
#include "ByteSwap.h"
-namespace Assimp {
+namespace Assimp {
namespace Intern {
// --------------------------------------------------------------------------------------------
template <typename T, bool doit>
-struct ByteSwapper {
+struct ByteSwapper {
void operator() (T* inout) {
ByteSwap::Swap(inout);
}
};
template <typename T>
-struct ByteSwapper<T,false> {
+struct ByteSwapper<T,false> {
void operator() (T*) {
}
};
@@ -81,7 +81,7 @@ struct Getter {
template <bool SwapEndianess, typename T>
struct Getter<SwapEndianess,T,false> {
- void operator() (T* inout, bool /* le */) {
+ void operator() (T* inout, bool le) {
// static branch
ByteSwapper<T,(SwapEndianess && sizeof(T)>1)> () (inout);
@@ -159,55 +159,55 @@ public:
// ---------------------------------------------------------------------
/** Read a double from the stream */
- double GetF8() {
+ double GetF8() {
return Get<double>();
}
// ---------------------------------------------------------------------
/** Read a signed 16 bit integer from the stream */
- int16_t GetI2() {
+ int16_t GetI2() {
return Get<int16_t>();
}
// ---------------------------------------------------------------------
/** Read a signed 8 bit integer from the stream */
- int8_t GetI1() {
+ int8_t GetI1() {
return Get<int8_t>();
}
// ---------------------------------------------------------------------
/** Read an signed 32 bit integer from the stream */
- int32_t GetI4() {
+ int32_t GetI4() {
return Get<int32_t>();
}
// ---------------------------------------------------------------------
/** Read a signed 64 bit integer from the stream */
- int64_t GetI8() {
+ int64_t GetI8() {
return Get<int64_t>();
}
// ---------------------------------------------------------------------
/** Read a unsigned 16 bit integer from the stream */
- uint16_t GetU2() {
+ uint16_t GetU2() {
return Get<uint16_t>();
}
// ---------------------------------------------------------------------
/** Read a unsigned 8 bit integer from the stream */
- uint8_t GetU1() {
+ uint8_t GetU1() {
return Get<uint8_t>();
}
// ---------------------------------------------------------------------
/** Read an unsigned 32 bit integer from the stream */
- uint32_t GetU4() {
+ uint32_t GetU4() {
return Get<uint32_t>();
}
// ---------------------------------------------------------------------
/** Read a unsigned 64 bit integer from the stream */
- uint64_t GetU8() {
+ uint64_t GetU8() {
return Get<uint64_t>();
}
@@ -231,7 +231,7 @@ public:
// ---------------------------------------------------------------------
/** Increase the file pointer (relative seeking) */
- void IncPtr(int plus) {
+ void IncPtr(int plus) {
current += plus;
if (current > limit) {
throw DeadlyImportError("End of file or read limit was reached");
@@ -240,7 +240,7 @@ public:
// ---------------------------------------------------------------------
/** Get the current file pointer */
- int8_t* GetPtr() const {
+ int8_t* GetPtr() const {
return current;
}
@@ -251,7 +251,7 @@ public:
* large chunks of data at once.
* @param p The new pointer, which is validated against the size
* limit and buffer boundaries. */
- void SetPtr(int8_t* p) {
+ void SetPtr(int8_t* p) {
current = p;
if (current > limit || current < buffer) {
@@ -263,7 +263,7 @@ public:
/** Copy n bytes to an external buffer
* @param out Destination for copying
* @param bytes Number of bytes to copy */
- void CopyAndAdvance(void* out, size_t bytes) {
+ void CopyAndAdvance(void* out, size_t bytes) {
int8_t* ur = GetPtr();
SetPtr(ur+bytes); // fire exception if eof
@@ -274,7 +274,7 @@ public:
// ---------------------------------------------------------------------
/** Get the current offset from the beginning of the file */
- int GetCurrentPos() const {
+ int GetCurrentPos() const {
return (unsigned int)(current - buffer);
}
@@ -288,7 +288,7 @@ public:
* @param limit Maximum number of bytes to be read from
* the beginning of the file. Passing 0xffffffff
* resets the limit to the original end of the stream. */
- void SetReadLimit(unsigned int _limit) {
+ void SetReadLimit(unsigned int _limit) {
if (0xffffffff == _limit) {
limit = end;
@@ -304,14 +304,14 @@ public:
// ---------------------------------------------------------------------
/** Get the current read limit in bytes. Reading over this limit
* accidentially raises an exception. */
- int GetReadLimit() const {
+ int GetReadLimit() const {
return (unsigned int)(limit - buffer);
}
// ---------------------------------------------------------------------
/** Skip to the read limit in bytes. Reading over this limit
* accidentially raises an exception. */
- void SkipToReadLimit() {
+ void SkipToReadLimit() {
current = limit;
}
@@ -328,13 +328,12 @@ private:
// ---------------------------------------------------------------------
/** Generic read method. ByteSwap::Swap(T*) *must* be defined */
template <typename T>
- T Get() {
+ T Get() {
if (current + sizeof(T) > limit) {
throw DeadlyImportError("End of file or stream limit was reached");
}
- T f;
- memcpy(&f, current, sizeof(T));
+ T f = *((const T*)current);
Intern :: Getter<SwapEndianess,T,RuntimeSwitch>() (&f,le);
current += sizeof(T);
diff --git a/3rdparty/assimp/code/StringComparison.h b/3rdparty/assimp/code/StringComparison.h
index b885606ac..ed79874c0 100644
--- a/3rdparty/assimp/code/StringComparison.h
+++ b/3rdparty/assimp/code/StringComparison.h
@@ -50,7 +50,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef INCLUDED_AI_STRING_WORKERS_H
#define INCLUDED_AI_STRING_WORKERS_H
-namespace Assimp {
+namespace Assimp {
// -------------------------------------------------------------------------------
/** @brief itoa with a fixed base 10
@@ -69,7 +69,7 @@ inline unsigned int ASSIMP_itoa10( char* out, unsigned int max, int32_t number)
// write the unary minus to indicate we have a negative number
unsigned int written = 1u;
- if (number < 0 && written < max) {
+ if (number < 0 && written < max) {
*out++ = '-';
++written;
number = -number;
@@ -78,10 +78,10 @@ inline unsigned int ASSIMP_itoa10( char* out, unsigned int max, int32_t number)
// We begin with the largest number that is not zero.
int32_t cur = 1000000000; // 2147483648
bool mustPrint = false;
- while (written < max) {
+ while (written < max) {
const unsigned int digit = number / cur;
- if (mustPrint || digit > 0 || 1 == cur) {
+ if (mustPrint || digit > 0 || 1 == cur) {
// print all future zeroes from now
mustPrint = true;
@@ -136,7 +136,7 @@ inline int ASSIMP_stricmp(const char *s1, const char *s2)
#else
register char c1, c2;
- do {
+ do {
c1 = tolower(*s1++);
c2 = tolower(*s2++);
}
diff --git a/3rdparty/assimp/code/Subdivision.cpp b/3rdparty/assimp/code/Subdivision.cpp
index 1535813d5..2ed204c64 100644
--- a/3rdparty/assimp/code/Subdivision.cpp
+++ b/3rdparty/assimp/code/Subdivision.cpp
@@ -300,7 +300,7 @@ void CatmullClarkSubdivider::InternSubdivide (
for (size_t t = 0; t < nmesh; ++t) {
const aiMesh* mesh = smesh[t];
- for (unsigned int i = 0; i < mesh->mNumFaces;++i) {
+ for (unsigned int i = 0; i < mesh->mNumFaces;++i) {
const aiFace& face = mesh->mFaces[i];
for (unsigned int p =0; p< face.mNumIndices; ++p) {
@@ -457,10 +457,10 @@ void CatmullClarkSubdivider::InternSubdivide (
}
mout->mNumVertices = mout->mNumFaces<<2u;
- for (unsigned int i = 0, v = 0, n = 0; i < minp->mNumFaces;++i) {
+ for (unsigned int i = 0, v = 0, n = 0; i < minp->mNumFaces;++i) {
const aiFace& face = minp->mFaces[i];
- for (unsigned int a = 0; a < face.mNumIndices;++a) {
+ for (unsigned int a = 0; a < face.mNumIndices;++a) {
// Get a clean new face.
aiFace& faceOut = mout->mFaces[n++];
@@ -530,9 +530,9 @@ void CatmullClarkSubdivider::InternSubdivide (
ai_assert(adj[o]-moffsets[nidx].first < mp->mNumFaces);
const aiFace& f = mp->mFaces[adj[o]-moffsets[nidx].first];
-# ifdef _DEBUG
+# ifdef _DEBUG
bool haveit = false;
-# endif
+# endif
// find our original point in the face
for (unsigned int m = 0; m < f.mNumIndices; ++m) {
@@ -553,17 +553,15 @@ void CatmullClarkSubdivider::InternSubdivide (
// fixme: replace with mod face.mNumIndices?
R += c0.midpoint+c1.midpoint;
-# ifdef _DEBUG
+# ifdef _DEBUG
haveit = true;
-# endif
+# endif
break;
}
}
// this invariant *must* hold if the vertex-to-face adjacency table is valid
-#ifdef _DEBUG
ai_assert(haveit);
-#endif
}
const float div = static_cast<float>(cnt), divsq = 1.f/(div*div);
diff --git a/3rdparty/assimp/code/Subdivision.h b/3rdparty/assimp/code/Subdivision.h
index fb67001db..31a7a258b 100644
--- a/3rdparty/assimp/code/Subdivision.h
+++ b/3rdparty/assimp/code/Subdivision.h
@@ -41,7 +41,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
/** @file Defines a helper class to evaluate subdivision surfaces.*/
#ifndef AI_SUBDISIVION_H_INC
#define AI_SUBDISIVION_H_INC
-namespace Assimp {
+namespace Assimp {
// ------------------------------------------------------------------------------
/** Helper class to evaluate subdivision surfaces. Different algorithms
@@ -52,7 +52,7 @@ class ASSIMP_API Subdivider
public:
/** Enumerates all supported subvidision algorithms */
- enum Algorithm {
+ enum Algorithm {
CATMULL_CLARKE = 0x1
};
diff --git a/3rdparty/assimp/code/TargetAnimation.cpp b/3rdparty/assimp/code/TargetAnimation.cpp
index cdb350ffc..76fe5e3db 100644
--- a/3rdparty/assimp/code/TargetAnimation.cpp
+++ b/3rdparty/assimp/code/TargetAnimation.cpp
@@ -51,12 +51,12 @@ KeyIterator::KeyIterator(const std::vector<aiVectorKey>* _objPos,
const aiVector3D* defaultObjectPos /*= NULL*/,
const aiVector3D* defaultTargetPos /*= NULL*/)
- : reachedEnd (false)
- , curTime (-1.)
- , objPos (_objPos)
- , targetObjPos (_targetObjPos)
- , nextObjPos (0)
- , nextTargetObjPos(0)
+ : reachedEnd (false)
+ , curTime (-1.)
+ , objPos (_objPos)
+ , targetObjPos (_targetObjPos)
+ , nextObjPos (0)
+ , nextTargetObjPos(0)
{
// Generate default transformation tracks if necessary
if (!objPos || objPos->empty())
@@ -126,7 +126,7 @@ void KeyIterator::operator ++()
curTime = d0;
// interpolate the other
- if (1 == targetObjPos->size() || !nextTargetObjPos) {
+ if (1 == targetObjPos->size() || !nextTargetObjPos) {
curTargetPosition = targetObjPos->at(0).mValue;
}
else
@@ -147,7 +147,7 @@ void KeyIterator::operator ++()
curTime = d1;
// interpolate the other
- if (1 == objPos->size() || !nextObjPos) {
+ if (1 == objPos->size() || !nextObjPos) {
curPosition = objPos->at(0).mValue;
}
else
diff --git a/3rdparty/assimp/code/TargetAnimation.h b/3rdparty/assimp/code/TargetAnimation.h
index 049946b39..9c6753022 100644
--- a/3rdparty/assimp/code/TargetAnimation.h
+++ b/3rdparty/assimp/code/TargetAnimation.h
@@ -44,7 +44,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define AI_TARGET_ANIMATION_H_INC
-namespace Assimp {
+namespace Assimp {
@@ -65,9 +65,9 @@ public:
* @param _objPos Object position track. May be NULL.
* @param _targetObjPos Target object position track. May be NULL.
* @param defaultObjectPos Default object position to be used if
- * no animated track is available. May be NULL.
+ * no animated track is available. May be NULL.
* @param defaultTargetPos Default target position to be used if
- * no animated track is available. May be NULL.
+ * no animated track is available. May be NULL.
*/
KeyIterator(const std::vector<aiVectorKey>* _objPos,
const std::vector<aiVectorKey>* _targetObjPos,
@@ -131,8 +131,8 @@ class ASSIMP_API TargetAnimationHelper
public:
TargetAnimationHelper()
- : targetPositions (NULL)
- , objectPositions (NULL)
+ : targetPositions (NULL)
+ , objectPositions (NULL)
{}
diff --git a/3rdparty/assimp/code/TerragenLoader.cpp b/3rdparty/assimp/code/TerragenLoader.cpp
index ed9762e08..3a19d17e4 100644
--- a/3rdparty/assimp/code/TerragenLoader.cpp
+++ b/3rdparty/assimp/code/TerragenLoader.cpp
@@ -69,7 +69,7 @@ bool TerragenImporter::CanRead( const std::string& pFile, IOSystem* pIOHandler,
if ( extension == "ter")
return true;
- if ( !extension.length() || checkSig) {
+ if ( !extension.length() || checkSig) {
/* If CanRead() is called in order to check whether we
* support a specific file extension in general pIOHandler
* might be NULL and it's our duty to return true here.
@@ -206,8 +206,8 @@ void TerragenImporter::InternReadFile( const std::string& pFile,
}
const int16_t* data = (const int16_t*)reader.GetPtr();
- for (unsigned int yy = 0, t = 0; yy < y-1;++yy) {
- for (unsigned int xx = 0; xx < x-1;++xx,++f) {
+ for (unsigned int yy = 0, t = 0; yy < y-1;++yy) {
+ for (unsigned int xx = 0; xx < x-1;++xx,++f) {
// make verts
const float fy = (float)yy, fx = (float)xx;
diff --git a/3rdparty/assimp/code/TerragenLoader.h b/3rdparty/assimp/code/TerragenLoader.h
index ddcc2bfc8..48e97d1a4 100644
--- a/3rdparty/assimp/code/TerragenLoader.h
+++ b/3rdparty/assimp/code/TerragenLoader.h
@@ -45,7 +45,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define INCLUDED_AI_TERRAGEN_TERRAIN_LOADER_H
#include "BaseImporter.h"
-namespace Assimp {
+namespace Assimp {
// Magic strings
#define AI_TERR_BASE_STRING "TERRAGEN"
diff --git a/3rdparty/assimp/code/TextureTransform.cpp b/3rdparty/assimp/code/TextureTransform.cpp
index 597b34cb5..dd6b1bf9b 100644
--- a/3rdparty/assimp/code/TextureTransform.cpp
+++ b/3rdparty/assimp/code/TextureTransform.cpp
@@ -65,7 +65,7 @@ TextureTransformStep::~TextureTransformStep()
// Returns whether the processing step is present in the given flag field.
bool TextureTransformStep::IsActive( unsigned int pFlags) const
{
- return (pFlags & aiProcess_TransformUVCoords) != 0;
+ return (pFlags & aiProcess_TransformUVCoords) != 0;
}
// ------------------------------------------------------------------------------------------------
@@ -119,15 +119,15 @@ void TextureTransformStep::PreProcessUVTransform(STransformVecInfo& info)
* type (e.g. if mirroring is active there IS a difference between
* offset 2 and 3)
*/
- if ((rounded = (int)info.mTranslation.x)) {
+ if ((rounded = (int)info.mTranslation.x)) {
float out;
szTemp[0] = 0;
- if (aiTextureMapMode_Wrap == info.mapU) {
+ if (aiTextureMapMode_Wrap == info.mapU) {
// Wrap - simple take the fraction of the field
out = info.mTranslation.x-(float)rounded;
sprintf(szTemp,"[w] UV U offset %f can be simplified to %f",info.mTranslation.x,out);
}
- else if (aiTextureMapMode_Mirror == info.mapU && 1 != rounded) {
+ else if (aiTextureMapMode_Mirror == info.mapU && 1 != rounded) {
// Mirror
if (rounded % 2)
rounded--;
@@ -135,13 +135,13 @@ void TextureTransformStep::PreProcessUVTransform(STransformVecInfo& info)
sprintf(szTemp,"[m/d] UV U offset %f can be simplified to %f",info.mTranslation.x,out);
}
- else if (aiTextureMapMode_Clamp == info.mapU || aiTextureMapMode_Decal == info.mapU) {
+ else if (aiTextureMapMode_Clamp == info.mapU || aiTextureMapMode_Decal == info.mapU) {
// Clamp - translations beyond 1,1 are senseless
sprintf(szTemp,"[c] UV U offset %f can be clamped to 1.0f",info.mTranslation.x);
out = 1.f;
}
- if (szTemp[0]) {
+ if (szTemp[0]) {
DefaultLogger::get()->info(szTemp);
info.mTranslation.x = out;
}
@@ -152,15 +152,15 @@ void TextureTransformStep::PreProcessUVTransform(STransformVecInfo& info)
* type (e.g. if mirroring is active there IS a difference between
* offset 2 and 3)
*/
- if ((rounded = (int)info.mTranslation.y)) {
+ if ((rounded = (int)info.mTranslation.y)) {
float out;
szTemp[0] = 0;
- if (aiTextureMapMode_Wrap == info.mapV) {
+ if (aiTextureMapMode_Wrap == info.mapV) {
// Wrap - simple take the fraction of the field
out = info.mTranslation.y-(float)rounded;
sprintf(szTemp,"[w] UV V offset %f can be simplified to %f",info.mTranslation.y,out);
}
- else if (aiTextureMapMode_Mirror == info.mapV && 1 != rounded) {
+ else if (aiTextureMapMode_Mirror == info.mapV && 1 != rounded) {
// Mirror
if (rounded % 2)
rounded--;
@@ -168,13 +168,13 @@ void TextureTransformStep::PreProcessUVTransform(STransformVecInfo& info)
sprintf(szTemp,"[m/d] UV V offset %f can be simplified to %f",info.mTranslation.y,out);
}
- else if (aiTextureMapMode_Clamp == info.mapV || aiTextureMapMode_Decal == info.mapV) {
+ else if (aiTextureMapMode_Clamp == info.mapV || aiTextureMapMode_Decal == info.mapV) {
// Clamp - translations beyond 1,1 are senseless
sprintf(szTemp,"[c] UV V offset %f canbe clamped to 1.0f",info.mTranslation.y);
out = 1.f;
}
- if (szTemp[0]) {
+ if (szTemp[0]) {
DefaultLogger::get()->info(szTemp);
info.mTranslation.y = out;
}
@@ -224,13 +224,13 @@ void TextureTransformStep::Execute( aiScene* pScene)
typedef std::list<STransformVecInfo> MeshTrafoList;
std::vector<MeshTrafoList> meshLists(pScene->mNumMeshes);
- for (unsigned int i = 0; i < pScene->mNumMaterials;++i) {
+ for (unsigned int i = 0; i < pScene->mNumMaterials;++i) {
aiMaterial* mat = pScene->mMaterials[i];
- for (unsigned int a = 0; a < mat->mNumProperties;++a) {
+ for (unsigned int a = 0; a < mat->mNumProperties;++a) {
aiMaterialProperty* prop = mat->mProperties[a];
- if (!::strcmp( prop->mKey.data, "$tex.file")) {
+ if (!::strcmp( prop->mKey.data, "$tex.file")) {
STransformVecInfo info;
// Setup a shortcut structure to allow for a fast updating
@@ -295,14 +295,14 @@ void TextureTransformStep::Execute( aiScene* pScene)
// Find out whether this material is used by more than
// one mesh. This will make our task much, much more difficult!
unsigned int cnt = 0;
- for (unsigned int n = 0; n < pScene->mNumMeshes;++n) {
+ for (unsigned int n = 0; n < pScene->mNumMeshes;++n) {
if (pScene->mMeshes[n]->mMaterialIndex == i)
++cnt;
}
if (!cnt)
continue;
- else if (1 != cnt) {
+ else if (1 != cnt) {
// This material is referenced by more than one mesh!
// So we need to make sure the UV index for the texture
// is identical for each of it ...
@@ -310,13 +310,13 @@ void TextureTransformStep::Execute( aiScene* pScene)
}
// Get all coresponding meshes
- for (unsigned int n = 0; n < pScene->mNumMeshes;++n) {
+ for (unsigned int n = 0; n < pScene->mNumMeshes;++n) {
aiMesh* mesh = pScene->mMeshes[n];
if (mesh->mMaterialIndex != i || !mesh->mTextureCoords[0])
continue;
unsigned int uv = info.uvIndex;
- if (!mesh->mTextureCoords[uv]) {
+ if (!mesh->mTextureCoords[uv]) {
// If the requested UV index is not available, take the first one instead.
uv = 0;
}
@@ -329,15 +329,15 @@ void TextureTransformStep::Execute( aiScene* pScene)
MeshTrafoList::iterator it;
// Check whether we have this transform setup already
- for (it = meshLists[n].begin();it != meshLists[n].end(); ++it) {
+ for (it = meshLists[n].begin();it != meshLists[n].end(); ++it) {
- if ((*it) == info && (*it).uvIndex == uv) {
+ if ((*it) == info && (*it).uvIndex == uv) {
(*it).updateList.push_back(update);
break;
}
}
- if (it == meshLists[n].end()) {
+ if (it == meshLists[n].end()) {
meshLists[n].push_back(info);
meshLists[n].back().uvIndex = uv;
meshLists[n].back().updateList.push_back(update);
@@ -352,7 +352,7 @@ void TextureTransformStep::Execute( aiScene* pScene)
// Now process all meshes. Important: we don't remove unreferenced UV channels.
// This is a job for the RemoveUnreferencedData-Step.
- for (unsigned int q = 0; q < pScene->mNumMeshes;++q) {
+ for (unsigned int q = 0; q < pScene->mNumMeshes;++q) {
aiMesh* mesh = pScene->mMeshes[q];
MeshTrafoList& trafo = meshLists[q];
@@ -371,20 +371,20 @@ void TextureTransformStep::Execute( aiScene* pScene)
unsigned int untransformed = 0;
MeshTrafoList::iterator it,it2;
- for (it = trafo.begin();it != trafo.end(); ++it,++cnt) {
+ for (it = trafo.begin();it != trafo.end(); ++it,++cnt) {
if (!(*it).IsUntransformed()) {
need = true;
}
- if ((*it).lockedPos == AI_TT_UV_IDX_LOCK_TBD) {
+ if ((*it).lockedPos == AI_TT_UV_IDX_LOCK_TBD) {
// Lock this index and make sure it won't be changed
(*it).lockedPos = cnt;
veto = true;
continue;
}
- if (!veto && it != trafo.begin() && (*it).IsUntransformed()) {
+ if (!veto && it != trafo.begin() && (*it).IsUntransformed()) {
for (it2 = trafo.begin();it2 != it; ++it2) {
if (!(*it2).IsUntransformed())
break;
@@ -456,9 +456,9 @@ void TextureTransformStep::Execute( aiScene* pScene)
// Now continue and generate the output channels. Channels
// that we're not going to need later can be overridden.
it = trafo.begin();
- for (unsigned int n = 0; n < trafo.size();++n,++it) {
+ for (unsigned int n = 0; n < trafo.size();++n,++it) {
- if (n >= size) {
+ if (n >= size) {
// Try to use an untransformed channel for all channels we threw over board
UpdateUVIndex((*it).updateList,untransformed);
continue;
@@ -467,7 +467,7 @@ void TextureTransformStep::Execute( aiScene* pScene)
outChannels++;
// Write to the log
- if (!DefaultLogger::isNullLogger()) {
+ if (!DefaultLogger::isNullLogger()) {
sprintf(buffer,"Mesh %u, channel %u: t(%.3f,%.3f), s(%.3f,%.3f), r(%.3f), %s%s",
q,n,
(*it).mTranslation.x,
@@ -482,10 +482,10 @@ void TextureTransformStep::Execute( aiScene* pScene)
}
// Check whether we need a new buffer here
- if (mesh->mTextureCoords[n]) {
+ if (mesh->mTextureCoords[n]) {
it2 = it;++it2;
- for (unsigned int m = n+1; m < size;++m, ++it2) {
+ for (unsigned int m = n+1; m < size;++m, ++it2) {
if ((*it2).uvIndex == n){
it2 = trafo.begin();
@@ -533,7 +533,7 @@ void TextureTransformStep::Execute( aiScene* pScene)
m5.a3 += trl.x; m5.b3 += trl.y;
matrix = m2 * m4 * matrix * m3 * m5;
- for (src = dest; src != end; ++src) { /* manual homogenious divide */
+ for (src = dest; src != end; ++src) { /* manual homogenious divide */
src->z = 1.f;
*src = matrix * *src;
src->x /= src->z;
@@ -548,9 +548,9 @@ void TextureTransformStep::Execute( aiScene* pScene)
}
// Print some detailled statistics into the log
- if (!DefaultLogger::isNullLogger()) {
+ if (!DefaultLogger::isNullLogger()) {
- if (transformedChannels) {
+ if (transformedChannels) {
::sprintf(buffer,"TransformUVCoordsProcess end: %u output channels (in: %u, modified: %u)",
outChannels,inChannels,transformedChannels);
diff --git a/3rdparty/assimp/code/TextureTransform.h b/3rdparty/assimp/code/TextureTransform.h
index a9d711f33..dd57e2a5c 100644
--- a/3rdparty/assimp/code/TextureTransform.h
+++ b/3rdparty/assimp/code/TextureTransform.h
@@ -47,13 +47,13 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
struct aiNode;
-namespace Assimp {
+namespace Assimp {
-#define AI_TT_UV_IDX_LOCK_TBD 0xffffffff
-#define AI_TT_UV_IDX_LOCK_NONE 0xeeeeeeee
+#define AI_TT_UV_IDX_LOCK_TBD 0xffffffff
+#define AI_TT_UV_IDX_LOCK_NONE 0xeeeeeeee
-#define AI_TT_ROTATION_EPSILON ((float)AI_DEG_TO_RAD(0.5))
+#define AI_TT_ROTATION_EPSILON ((float)AI_DEG_TO_RAD(0.5))
// ---------------------------------------------------------------------------
/** Small helper structure representing a shortcut into the material list
@@ -62,10 +62,10 @@ namespace Assimp {
struct TTUpdateInfo
{
TTUpdateInfo() :
- directShortcut (NULL)
- , mat (NULL)
- , semantic (0)
- , index (0)
+ directShortcut (NULL)
+ , mat (NULL)
+ , semantic (0)
+ , index (0)
{}
//! Direct shortcut, if available
@@ -86,10 +86,10 @@ struct STransformVecInfo : public aiUVTransform
{
STransformVecInfo()
- : uvIndex (0)
- , mapU (aiTextureMapMode_Wrap)
- , mapV (aiTextureMapMode_Wrap)
- , lockedPos (AI_TT_UV_IDX_LOCK_NONE)
+ : uvIndex (0)
+ , mapU (aiTextureMapMode_Wrap)
+ , mapV (aiTextureMapMode_Wrap)
+ , lockedPos (AI_TT_UV_IDX_LOCK_NONE)
{}
//! Source texture coordinate index
diff --git a/3rdparty/assimp/code/TinyFormatter.h b/3rdparty/assimp/code/TinyFormatter.h
index c9e64fc5e..c8478e124 100644
--- a/3rdparty/assimp/code/TinyFormatter.h
+++ b/3rdparty/assimp/code/TinyFormatter.h
@@ -86,7 +86,7 @@ public:
* with std::(w)string or const (w)char* arguments because the
* conversion c'tor is called implicitly. */
template <typename TT>
- basic_formatter(const TT& sin) {
+ basic_formatter(const TT& sin) {
underlying << sin;
}
diff --git a/3rdparty/assimp/code/TriangulateProcess.cpp b/3rdparty/assimp/code/TriangulateProcess.cpp
index d9899a0fb..c63e43c45 100644
--- a/3rdparty/assimp/code/TriangulateProcess.cpp
+++ b/3rdparty/assimp/code/TriangulateProcess.cpp
@@ -92,7 +92,7 @@ void TriangulateProcess::Execute( aiScene* pScene)
bool bHas = false;
for ( unsigned int a = 0; a < pScene->mNumMeshes; a++)
{
- if ( TriangulateMesh( pScene->mMeshes[a]))
+ if ( TriangulateMesh( pScene->mMeshes[a]))
bHas = true;
}
if (bHas)DefaultLogger::get()->info ("TriangulateProcess finished. All polygons have been triangulated.");
@@ -133,13 +133,13 @@ inline bool PointInTriangle2D(const aiVector2D& p0, const aiVector2D& p1,const a
bool TriangulateProcess::TriangulateMesh( aiMesh* pMesh)
{
// Now we have aiMesh::mPrimitiveTypes, so this is only here for test cases
- if (!pMesh->mPrimitiveTypes) {
+ if (!pMesh->mPrimitiveTypes) {
bool bNeed = false;
- for ( unsigned int a = 0; a < pMesh->mNumFaces; a++) {
+ for ( unsigned int a = 0; a < pMesh->mNumFaces; a++) {
const aiFace& face = pMesh->mFaces[a];
- if ( face.mNumIndices != 3) {
+ if ( face.mNumIndices != 3) {
bNeed = true;
}
}
@@ -156,7 +156,7 @@ bool TriangulateProcess::TriangulateMesh( aiMesh* pMesh)
// Find out how many output faces we'll get
unsigned int numOut = 0, max_out = 0;
- for ( unsigned int a = 0; a < pMesh->mNumFaces; a++) {
+ for ( unsigned int a = 0; a < pMesh->mNumFaces; a++) {
aiFace& face = pMesh->mFaces[a];
if ( face.mNumIndices <= 3)
numOut++;
@@ -190,7 +190,7 @@ bool TriangulateProcess::TriangulateMesh( aiMesh* pMesh)
// use boost::scoped_array to avoid slow std::vector<bool> specialiations
boost::scoped_array<bool> done(new bool[max_out]);
- for ( unsigned int a = 0; a < pMesh->mNumFaces; a++) {
+ for ( unsigned int a = 0; a < pMesh->mNumFaces; a++) {
aiFace& face = pMesh->mFaces[a];
unsigned int* idx = face.mIndices;
@@ -284,14 +284,14 @@ bool TriangulateProcess::TriangulateMesh( aiMesh* pMesh)
//
// FIXME: currently this is the slow O(kn) variant with a worst case
// complexity of O(n^2) (I think). Can be done in O(n).
- while (num > 3) {
+ while (num > 3) {
// Find the next ear of the polygon
int num_found = 0;
for (ear = next;;prev = ear,ear = next) {
// break after we looped two times without a positive match
- for (next=ear+1;done[(next>max-1?next=0:next)];++next) {};
+ for (next=ear+1;done[(next>max-1?next=0:next)];++next);
if (next < ear) {
if (++num_found == 2) {
break;
@@ -376,13 +376,13 @@ bool TriangulateProcess::TriangulateMesh( aiMesh* pMesh)
nface.mNumIndices = 3;
nface.mIndices = face.mIndices;
- for (tmp = 0; done[tmp]; ++tmp) {};
+ for (tmp = 0; done[tmp]; ++tmp);
idx[0] = idx[tmp];
- for (++tmp; done[tmp]; ++tmp) {};
+ for (++tmp; done[tmp]; ++tmp);
idx[1] = idx[tmp];
- for (++tmp; done[tmp]; ++tmp) {};
+ for (++tmp; done[tmp]; ++tmp);
idx[2] = idx[tmp];
}
}
diff --git a/3rdparty/assimp/code/UnrealLoader.cpp b/3rdparty/assimp/code/UnrealLoader.cpp
index 4985e7a9b..cae512244 100644
--- a/3rdparty/assimp/code/UnrealLoader.cpp
+++ b/3rdparty/assimp/code/UnrealLoader.cpp
@@ -61,8 +61,8 @@ using namespace Assimp;
// ------------------------------------------------------------------------------------------------
// Constructor to be privately used by Importer
UnrealImporter::UnrealImporter()
-: configFrameID (0)
-, configHandleFlags (true)
+: configFrameID (0)
+, configHandleFlags (true)
{}
// ------------------------------------------------------------------------------------------------
@@ -72,7 +72,7 @@ UnrealImporter::~UnrealImporter()
// ------------------------------------------------------------------------------------------------
// Returns whether the class can handle the format of the given file.
-bool UnrealImporter::CanRead( const std::string& pFile, IOSystem* /*pIOHandler*/, bool /*checkSig*/) const
+bool UnrealImporter::CanRead( const std::string& pFile, IOSystem* pIOHandler, bool checkSig) const
{
return SimpleExtensionCheck(pFile,"3d","uc");
}
@@ -93,7 +93,7 @@ void UnrealImporter::SetupProperties(const Importer* pImp)
// AI_CONFIG_IMPORT_UNREAL_KEYFRAME option overrides the
// AI_CONFIG_IMPORT_GLOBAL_KEYFRAME option.
configFrameID = pImp->GetPropertyInteger(AI_CONFIG_IMPORT_UNREAL_KEYFRAME,0xffffffff);
- if (0xffffffff == configFrameID) {
+ if (0xffffffff == configFrameID) {
configFrameID = pImp->GetPropertyInteger(AI_CONFIG_IMPORT_GLOBAL_KEYFRAME,0);
}
@@ -112,7 +112,7 @@ void UnrealImporter::InternReadFile( const std::string& pFile,
std::string extension = GetExtension(pFile);
std::string d_path,a_path,uc_path;
- if (extension == "3d") {
+ if (extension == "3d") {
// jjjj_d.3d
// jjjj_a.3d
pos = pFile.find_last_of('_');
@@ -151,13 +151,13 @@ void UnrealImporter::InternReadFile( const std::string& pFile,
// collect triangles
std::vector<Unreal::Triangle> triangles(numTris);
- for (std::vector<Unreal::Triangle>::iterator it = triangles.begin(), end = triangles.end();it != end; ++it) {
+ for (std::vector<Unreal::Triangle>::iterator it = triangles.begin(), end = triangles.end();it != end; ++it) {
Unreal::Triangle& tri = *it;
- for (unsigned int i = 0; i < 3;++i) {
+ for (unsigned int i = 0; i < 3;++i) {
tri.mVertex[i] = d_reader.GetI2();
- if (tri.mVertex[i] >= numTris) {
+ if (tri.mVertex[i] >= numTris) {
DefaultLogger::get()->warn("UNREAL: vertex index out of range");
tri.mVertex[i] = 0;
}
@@ -194,7 +194,7 @@ void UnrealImporter::InternReadFile( const std::string& pFile,
throw DeadlyImportError("UNREAL: The requested frame does not exist");
uint32_t st = a_reader.GetI2();
- if (st != numVert*4u)
+ if (st != numVert*4)
throw DeadlyImportError("UNREAL: Unexpected aniv file length");
// skip to our frame
@@ -202,7 +202,7 @@ void UnrealImporter::InternReadFile( const std::string& pFile,
// collect vertices
std::vector<aiVector3D> vertices(numVert);
- for (std::vector<aiVector3D>::iterator it = vertices.begin(), end = vertices.end(); it != end; ++it) {
+ for (std::vector<aiVector3D>::iterator it = vertices.begin(), end = vertices.end(); it != end; ++it) {
int32_t val = a_reader.GetI4();
Unreal::DecompressVertex(*it,val);
}
@@ -216,7 +216,7 @@ void UnrealImporter::InternReadFile( const std::string& pFile,
// we can live without the uc file if necessary
boost::scoped_ptr<IOStream> pb (pIOHandler->Open(uc_path));
- if (pb.get()) {
+ if (pb.get()) {
std::vector<char> _data;
TextFileToBuffer(pb.get(),_data);
@@ -225,26 +225,26 @@ void UnrealImporter::InternReadFile( const std::string& pFile,
std::vector< std::pair< std::string,std::string > > tempTextures;
// do a quick search in the UC file for some known, usually texture-related, tags
- for (;*data;++data) {
- if (TokenMatchI(data,"#exec",5)) {
+ for (;*data;++data) {
+ if (TokenMatchI(data,"#exec",5)) {
SkipSpacesAndLineEnd(&data);
// #exec TEXTURE IMPORT [...] NAME=jjjjj [...] FILE=jjjj.pcx [...]
- if (TokenMatchI(data,"TEXTURE",7)) {
+ if (TokenMatchI(data,"TEXTURE",7)) {
SkipSpacesAndLineEnd(&data);
- if (TokenMatchI(data,"IMPORT",6)) {
+ if (TokenMatchI(data,"IMPORT",6)) {
tempTextures.push_back(std::pair< std::string,std::string >());
std::pair< std::string,std::string >& me = tempTextures.back();
- for (;!IsLineEnd(*data);++data) {
- if (!::ASSIMP_strincmp(data,"NAME=",5)) {
+ for (;!IsLineEnd(*data);++data) {
+ if (!::ASSIMP_strincmp(data,"NAME=",5)) {
const char *d = data+=5;
- for (;!IsSpaceOrNewLine(*data);++data) {};
+ for (;!IsSpaceOrNewLine(*data);++data);
me.first = std::string(d,(size_t)(data-d));
}
- else if (!::ASSIMP_strincmp(data,"FILE=",5)) {
+ else if (!::ASSIMP_strincmp(data,"FILE=",5)) {
const char *d = data+=5;
- for (;!IsSpaceOrNewLine(*data);++data) {};
+ for (;!IsSpaceOrNewLine(*data);++data);
me.second = std::string(d,(size_t)(data-d));
}
}
@@ -262,21 +262,21 @@ void UnrealImporter::InternReadFile( const std::string& pFile,
textures.push_back(std::pair<unsigned int, std::string>());
std::pair<unsigned int, std::string>& me = textures.back();
- for (;!IsLineEnd(*data);++data) {
- if (!::ASSIMP_strincmp(data,"NUM=",4)) {
+ for (;!IsLineEnd(*data);++data) {
+ if (!::ASSIMP_strincmp(data,"NUM=",4)) {
data += 4;
me.first = strtol10(data,&data);
}
- else if (!::ASSIMP_strincmp(data,"TEXTURE=",8)) {
+ else if (!::ASSIMP_strincmp(data,"TEXTURE=",8)) {
data += 8;
const char *d = data;
- for (;!IsSpaceOrNewLine(*data);++data) {};
+ for (;!IsSpaceOrNewLine(*data);++data);
me.second = std::string(d,(size_t)(data-d));
// try to find matching path names, doesn't care if we don't find them
for (std::vector< std::pair< std::string,std::string > >::const_iterator it = tempTextures.begin();
- it != tempTextures.end(); ++it) {
- if ((*it).first == me.second) {
+ it != tempTextures.end(); ++it) {
+ if ((*it).first == me.second) {
me.second = (*it).second;
break;
}
@@ -286,14 +286,14 @@ void UnrealImporter::InternReadFile( const std::string& pFile,
}
else if (TokenMatchI(data,"SCALE",5)) {
- for (;!IsLineEnd(*data);++data) {
- if (data[0] == 'X' && data[1] == '=') {
+ for (;!IsLineEnd(*data);++data) {
+ if (data[0] == 'X' && data[1] == '=') {
data = fast_atof_move(data+2,(float&)nd->mTransformation.a1);
}
- else if (data[0] == 'Y' && data[1] == '=') {
+ else if (data[0] == 'Y' && data[1] == '=') {
data = fast_atof_move(data+2,(float&)nd->mTransformation.b2);
}
- else if (data[0] == 'Z' && data[1] == '=') {
+ else if (data[0] == 'Z' && data[1] == '=') {
data = fast_atof_move(data+2,(float&)nd->mTransformation.c3);
}
}
@@ -302,7 +302,7 @@ void UnrealImporter::InternReadFile( const std::string& pFile,
}
}
}
- else {
+ else {
DefaultLogger::get()->error("Unable to open .uc file");
}
@@ -310,7 +310,7 @@ void UnrealImporter::InternReadFile( const std::string& pFile,
materials.reserve(textures.size()*2+5);
// find out how many output meshes and materials we'll have and build material indices
- for (std::vector<Unreal::Triangle>::iterator it = triangles.begin(), end = triangles.end();it != end; ++it) {
+ for (std::vector<Unreal::Triangle>::iterator it = triangles.begin(), end = triangles.end();it != end; ++it) {
Unreal::Triangle& tri = *it;
Unreal::TempMat mat(tri);
std::vector<Unreal::TempMat>::iterator nt = std::find(materials.begin(),materials.end(),mat);
@@ -368,7 +368,7 @@ void UnrealImporter::InternReadFile( const std::string& pFile,
else ::strcat(s.data,"os_");
// make TRANS faces 90% opaque that RemRedundantMaterials won't catch us
- if (materials[i].type == Unreal::MF_NORMAL_TRANS_TS) {
+ if (materials[i].type == Unreal::MF_NORMAL_TRANS_TS) {
const float opac = 0.9f;
mat->AddProperty(&opac,1,AI_MATKEY_OPACITY);
::strcat(s.data,"tran_");
@@ -376,7 +376,7 @@ void UnrealImporter::InternReadFile( const std::string& pFile,
else ::strcat(s.data,"opaq_");
// a special name for the weapon attachment point
- if (materials[i].type == Unreal::MF_WEAPON_PLACEHOLDER) {
+ if (materials[i].type == Unreal::MF_WEAPON_PLACEHOLDER) {
s.length = ::sprintf(s.data,"$WeaponTag$");
color = aiColor3D(0.f,0.f,0.f);
}
@@ -388,8 +388,8 @@ void UnrealImporter::InternReadFile( const std::string& pFile,
// set texture, if any
const unsigned int tex = materials[i].tex;
- for (std::vector< std::pair< unsigned int, std::string > >::const_iterator it = textures.begin();it != textures.end();++it) {
- if ((*it).first == tex) {
+ for (std::vector< std::pair< unsigned int, std::string > >::const_iterator it = textures.begin();it != textures.end();++it) {
+ if ((*it).first == tex) {
s.Set((*it).second);
mat->AddProperty(&s,AI_MATKEY_TEXTURE_DIFFUSE(0));
break;
@@ -398,7 +398,7 @@ void UnrealImporter::InternReadFile( const std::string& pFile,
}
// fill them.
- for (std::vector<Unreal::Triangle>::iterator it = triangles.begin(), end = triangles.end();it != end; ++it) {
+ for (std::vector<Unreal::Triangle>::iterator it = triangles.begin(), end = triangles.end();it != end; ++it) {
Unreal::Triangle& tri = *it;
Unreal::TempMat mat(tri);
std::vector<Unreal::TempMat>::iterator nt = std::find(materials.begin(),materials.end(),mat);
diff --git a/3rdparty/assimp/code/UnrealLoader.h b/3rdparty/assimp/code/UnrealLoader.h
index 876fe83a1..647246028 100644
--- a/3rdparty/assimp/code/UnrealLoader.h
+++ b/3rdparty/assimp/code/UnrealLoader.h
@@ -45,7 +45,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define INCLUDED_AI_3D_LOADER_H
#include "BaseImporter.h"
-namespace Assimp {
+namespace Assimp {
namespace Unreal {
/*
@@ -67,7 +67,7 @@ enum MeshFlags {
// a single triangle
struct Triangle {
- uint16_t mVertex[3]; // Vertex indices
+ uint16_t mVertex[3]; // Vertex indices
char mType; // James' Mesh Type
char mColor; // Color for flat and Gourand Shaded
unsigned char mTex[3][2]; // Texture UV coordinates
@@ -78,15 +78,15 @@ struct Triangle {
};
// temporary representation for a material
-struct TempMat {
+struct TempMat {
TempMat()
- : numFaces (0)
+ : numFaces (0)
{}
TempMat(const Triangle& in)
- : type ((Unreal::MeshFlags)in.mType)
- , tex (in.mTextureNum)
- , numFaces (0)
+ : type ((Unreal::MeshFlags)in.mType)
+ , tex (in.mTextureNum)
+ , numFaces (0)
{}
// type of mesh
@@ -99,7 +99,7 @@ struct TempMat {
unsigned int numFaces;
// for std::find
- bool operator == (const TempMat& o ) {
+ bool operator == (const TempMat& o ) {
return (tex == o.tex && type == o.type);
}
};
diff --git a/3rdparty/assimp/code/ValidateDataStructure.cpp b/3rdparty/assimp/code/ValidateDataStructure.cpp
index 9fc5f4206..6c506ac22 100644
--- a/3rdparty/assimp/code/ValidateDataStructure.cpp
+++ b/3rdparty/assimp/code/ValidateDataStructure.cpp
@@ -111,7 +111,7 @@ void ValidateDSProcess::ReportWarning(const char* msg,...)
inline int HasNameMatch(const aiString& in, aiNode* node)
{
int result = (node->mName == in ? 1 : 0 );
- for (unsigned int i = 0; i < node->mNumChildren;++i) {
+ for (unsigned int i = 0; i < node->mNumChildren;++i) {
result += HasNameMatch(in,node->mChildren[i]);
}
return result;
@@ -150,7 +150,7 @@ inline void ValidateDSProcess::DoValidationEx(T** parray, unsigned int size,
// validate all entries
if (size)
{
- if (!parray) {
+ if (!parray) {
ReportError("aiScene::%s is NULL (aiScene::%s is %i)",
firstName, secondName, size);
}
@@ -188,11 +188,11 @@ inline void ValidateDSProcess::DoValidationWithNameCheck(T** array,
for (unsigned int i = 0; i < size;++i)
{
int res = HasNameMatch(array[i]->mName,mScene->mRootNode);
- if (!res) {
+ if (!res) {
ReportError("aiScene::%s[%i] has no corresponding node in the scene graph (%s)",
firstName,i,array[i]->mName.data);
}
- else if (1 != res) {
+ else if (1 != res) {
ReportError("aiScene::%s[%i]: there are more than one nodes with %s as name",
firstName,i,array[i]->mName.data);
}
@@ -213,10 +213,10 @@ void ValidateDSProcess::Execute( aiScene* pScene)
if (pScene->mNumMeshes) {
DoValidation(pScene->mMeshes,pScene->mNumMeshes,"mMeshes","mNumMeshes");
}
- else if (!(mScene->mFlags & AI_SCENE_FLAGS_INCOMPLETE)) {
+ else if (!(mScene->mFlags & AI_SCENE_FLAGS_INCOMPLETE)) {
ReportError("aiScene::mNumMeshes is 0. At least one mesh must be there");
}
- else if (pScene->mMeshes) {
+ else if (pScene->mMeshes) {
ReportError("aiScene::mMeshes is non-null although there are no meshes");
}
@@ -225,7 +225,7 @@ void ValidateDSProcess::Execute( aiScene* pScene)
DoValidation(pScene->mAnimations,pScene->mNumAnimations,
"mAnimations","mNumAnimations");
}
- else if (pScene->mAnimations) {
+ else if (pScene->mAnimations) {
ReportError("aiScene::mAnimations is non-null although there are no animations");
}
@@ -234,7 +234,7 @@ void ValidateDSProcess::Execute( aiScene* pScene)
DoValidationWithNameCheck(pScene->mCameras,pScene->mNumCameras,
"mCameras","mNumCameras");
}
- else if (pScene->mCameras) {
+ else if (pScene->mCameras) {
ReportError("aiScene::mCameras is non-null although there are no cameras");
}
@@ -243,7 +243,7 @@ void ValidateDSProcess::Execute( aiScene* pScene)
DoValidationWithNameCheck(pScene->mLights,pScene->mNumLights,
"mLights","mNumLights");
}
- else if (pScene->mLights) {
+ else if (pScene->mLights) {
ReportError("aiScene::mLights is non-null although there are no lights");
}
@@ -252,7 +252,7 @@ void ValidateDSProcess::Execute( aiScene* pScene)
DoValidation(pScene->mTextures,pScene->mNumTextures,
"mTextures","mNumTextures");
}
- else if (pScene->mTextures) {
+ else if (pScene->mTextures) {
ReportError("aiScene::mTextures is non-null although there are no textures");
}
@@ -262,15 +262,15 @@ void ValidateDSProcess::Execute( aiScene* pScene)
}
#if 0
// NOTE: ScenePreprocessor generates a default material if none is there
- else if (!(mScene->mFlags & AI_SCENE_FLAGS_INCOMPLETE)) {
+ else if (!(mScene->mFlags & AI_SCENE_FLAGS_INCOMPLETE)) {
ReportError("aiScene::mNumMaterials is 0. At least one material must be there");
}
#endif
- else if (pScene->mMaterials) {
+ else if (pScene->mMaterials) {
ReportError("aiScene::mMaterials is non-null although there are no materials");
}
-// if (!has)ReportError("The aiScene data structure is empty");
+// if (!has)ReportError("The aiScene data structure is empty");
DefaultLogger::get()->debug("ValidateDataStructureProcess end");
}
@@ -282,7 +282,7 @@ void ValidateDSProcess::Validate( const aiLight* pLight)
if (!pLight->mAttenuationConstant &&
!pLight->mAttenuationLinear &&
- !pLight->mAttenuationQuadratic) {
+ !pLight->mAttenuationQuadratic) {
ReportWarning("aiLight::mAttenuationXXX - all are zero");
}
@@ -366,7 +366,7 @@ void ValidateDSProcess::Validate( const aiMesh* pMesh)
}
// positions must always be there ...
- if (!pMesh->mNumVertices || (!pMesh->mVertices && !mScene->mFlags)) {
+ if (!pMesh->mNumVertices || (!pMesh->mVertices && !mScene->mFlags)) {
ReportError("The mesh contains no vertices");
}
@@ -378,12 +378,12 @@ void ValidateDSProcess::Validate( const aiMesh* pMesh)
}
// if tangents are there there must also be bitangent vectors ...
- if ((pMesh->mTangents != NULL) != (pMesh->mBitangents != NULL)) {
+ if ((pMesh->mTangents != NULL) != (pMesh->mBitangents != NULL)) {
ReportError("If there are tangents, bitangent vectors must be present as well");
}
// faces, too
- if (!pMesh->mNumFaces || (!pMesh->mFaces && !mScene->mFlags)) {
+ if (!pMesh->mNumFaces || (!pMesh->mFaces && !mScene->mFlags)) {
ReportError("Mesh contains no faces");
}
@@ -400,7 +400,7 @@ void ValidateDSProcess::Validate( const aiMesh* pMesh)
for (unsigned int a = 0; a < face.mNumIndices;++a)
{
- if (face.mIndices[a] >= pMesh->mNumVertices) {
+ if (face.mIndices[a] >= pMesh->mNumVertices) {
ReportError("aiMesh::mFaces[%i]::mIndices[%i] is out of range",i,a);
}
// the MSB flag is temporarily used by the extra verbose
@@ -417,7 +417,7 @@ void ValidateDSProcess::Validate( const aiMesh* pMesh)
// check whether there are vertices that aren't referenced by a face
bool b = false;
- for (unsigned int i = 0; i < pMesh->mNumVertices;++i) {
+ for (unsigned int i = 0; i < pMesh->mNumVertices;++i) {
if (!abRefList[i])b = true;
}
abRefList.clear();
@@ -496,7 +496,7 @@ void ValidateDSProcess::Validate( const aiMesh* pMesh)
// check whether all bone weights for a vertex sum to 1.0 ...
for (unsigned int i = 0; i < pMesh->mNumVertices;++i)
{
- if (afSum[i] && (afSum[i] <= 0.94 || afSum[i] >= 1.05)) {
+ if (afSum[i] && (afSum[i] <= 0.94 || afSum[i] >= 1.05)) {
ReportWarning("aiMesh::mVertices[%i]: bone weight sum != 1.0 (sum is %f)",i,afSum[i]);
}
}
@@ -513,17 +513,17 @@ void ValidateDSProcess::Validate( const aiMesh* pMesh,
{
this->Validate(&pBone->mName);
- if (!pBone->mNumWeights) {
+ if (!pBone->mNumWeights) {
ReportError("aiBone::mNumWeights is zero");
}
// check whether all vertices affected by this bone are valid
for (unsigned int i = 0; i < pBone->mNumWeights;++i)
{
- if (pBone->mWeights[i].mVertexId >= pMesh->mNumVertices) {
+ if (pBone->mWeights[i].mVertexId >= pMesh->mNumVertices) {
ReportError("aiBone::mWeights[%i].mVertexId is out of range",i);
}
- else if (!pBone->mWeights[i].mWeight || pBone->mWeights[i].mWeight > 1.0f) {
+ else if (!pBone->mWeights[i].mWeight || pBone->mWeights[i].mWeight > 1.0f) {
ReportWarning("aiBone::mWeights[%i].mWeight has an invalid value",i);
}
afSum[pBone->mWeights[i].mVertexId] += pBone->mWeights[i].mWeight;
@@ -538,7 +538,7 @@ void ValidateDSProcess::Validate( const aiAnimation* pAnimation)
// validate all materials
if (pAnimation->mNumChannels)
{
- if (!pAnimation->mChannels) {
+ if (!pAnimation->mChannels) {
ReportError("aiAnimation::mChannels is NULL (aiAnimation::mNumChannels is %i)",
pAnimation->mNumChannels);
}
@@ -575,7 +575,7 @@ void ValidateDSProcess::SearchForInvalidTextures(const aiMaterial* pMaterial,
for (unsigned int i = 0; i < pMaterial->mNumProperties;++i)
{
aiMaterialProperty* prop = pMaterial->mProperties[i];
- if (!::strcmp(prop->mKey.data,"$tex.file") && prop->mSemantic == type) {
+ if (!::strcmp(prop->mKey.data,"$tex.file") && prop->mSemantic == type) {
iIndex = std::max(iIndex, (int) prop->mIndex);
++iNumIndices;
@@ -583,7 +583,7 @@ void ValidateDSProcess::SearchForInvalidTextures(const aiMaterial* pMaterial,
ReportError("Material property %s is expected to be a string",prop->mKey.data);
}
}
- if (iIndex +1 != iNumIndices) {
+ if (iIndex +1 != iNumIndices) {
ReportError("%s #%i is set, but there are only %i %s textures",
szType,iIndex,iNumIndices,szType);
}
@@ -604,7 +604,7 @@ void ValidateDSProcess::SearchForInvalidTextures(const aiMaterial* pMaterial,
prop->mIndex, iNumIndices, szType);
}
- if (!::strcmp(prop->mKey.data,"$tex.mapping")) {
+ if (!::strcmp(prop->mKey.data,"$tex.mapping")) {
if (aiPTI_Integer != prop->mType || prop->mDataLength < sizeof(aiTextureMapping))
{
ReportError("Material property %s%i is expected to be an integer (size is %i)",
@@ -612,7 +612,7 @@ void ValidateDSProcess::SearchForInvalidTextures(const aiMaterial* pMaterial,
}
mappings[prop->mIndex] = *((aiTextureMapping*)prop->mData);
}
- else if (!::strcmp(prop->mKey.data,"$tex.uvtrafo")) {
+ else if (!::strcmp(prop->mKey.data,"$tex.uvtrafo")) {
if (aiPTI_Float != prop->mType || prop->mDataLength < sizeof(aiUVTransform))
{
ReportError("Material property %s%i is expected to be 5 floats large (size is %i)",
@@ -677,20 +677,20 @@ void ValidateDSProcess::Validate( const aiMaterial* pMaterial)
for (unsigned int i = 0; i < pMaterial->mNumProperties;++i)
{
const aiMaterialProperty* prop = pMaterial->mProperties[i];
- if (!prop) {
+ if (!prop) {
ReportError("aiMaterial::mProperties[%i] is NULL (aiMaterial::mNumProperties is %i)",
i,pMaterial->mNumProperties);
}
- if (!prop->mDataLength || !prop->mData) {
+ if (!prop->mDataLength || !prop->mData) {
ReportError("aiMaterial::mProperties[%i].mDataLength or "
"aiMaterial::mProperties[%i].mData is 0",i,i);
}
// check all predefined types
- if (aiPTI_String == prop->mType) {
+ if (aiPTI_String == prop->mType) {
// FIX: strings are now stored in a less expensive way, but we can't use the
// validation routine for 'normal' aiStrings
uint32_t len;
- if (prop->mDataLength < 5 || prop->mDataLength < 4 + (len=*reinterpret_cast<uint32_t*>(prop->mData)) + 1) {
+ if (prop->mDataLength < 5 || prop->mDataLength < 4 + (len=*reinterpret_cast<uint32_t*>(prop->mData)) + 1) {
ReportError("aiMaterial::mProperties[%i].mDataLength is "
"too small to contain a string (%i, needed: %i)",
i,prop->mDataLength,sizeof(aiString));
@@ -698,17 +698,17 @@ void ValidateDSProcess::Validate( const aiMaterial* pMaterial)
if (prop->mData[prop->mDataLength-1]) {
ReportError("Missing null-terminator in string material property");
}
- // Validate((const aiString*)prop->mData);
+ // Validate((const aiString*)prop->mData);
}
- else if (aiPTI_Float == prop->mType) {
- if (prop->mDataLength < sizeof(float)) {
+ else if (aiPTI_Float == prop->mType) {
+ if (prop->mDataLength < sizeof(float)) {
ReportError("aiMaterial::mProperties[%i].mDataLength is "
"too small to contain a float (%i, needed: %i)",
i,prop->mDataLength,sizeof(float));
}
}
- else if (aiPTI_Integer == prop->mType) {
- if (prop->mDataLength < sizeof(int)) {
+ else if (aiPTI_Integer == prop->mType) {
+ if (prop->mDataLength < sizeof(int)) {
ReportError("aiMaterial::mProperties[%i].mDataLength is "
"too small to contain an integer (%i, needed: %i)",
i,prop->mDataLength,sizeof(int));
@@ -720,18 +720,18 @@ void ValidateDSProcess::Validate( const aiMaterial* pMaterial)
// make some more specific tests
float fTemp;
int iShading;
- if (AI_SUCCESS == aiGetMaterialInteger( pMaterial,AI_MATKEY_SHADING_MODEL,&iShading)) {
+ if (AI_SUCCESS == aiGetMaterialInteger( pMaterial,AI_MATKEY_SHADING_MODEL,&iShading)) {
switch ((aiShadingMode)iShading)
{
case aiShadingMode_Blinn:
case aiShadingMode_CookTorrance:
case aiShadingMode_Phong:
- if (AI_SUCCESS != aiGetMaterialFloat(pMaterial,AI_MATKEY_SHININESS,&fTemp)) {
+ if (AI_SUCCESS != aiGetMaterialFloat(pMaterial,AI_MATKEY_SHININESS,&fTemp)) {
ReportWarning("A specular shading model is specified but there is no "
"AI_MATKEY_SHININESS key");
}
- if (AI_SUCCESS == aiGetMaterialFloat(pMaterial,AI_MATKEY_SHININESS_STRENGTH,&fTemp) && !fTemp) {
+ if (AI_SUCCESS == aiGetMaterialFloat(pMaterial,AI_MATKEY_SHININESS_STRENGTH,&fTemp) && !fTemp) {
ReportWarning("A specular shading model is specified but the value of the "
"AI_MATKEY_SHININESS_STRENGTH key is 0.0");
}
@@ -740,7 +740,7 @@ void ValidateDSProcess::Validate( const aiMaterial* pMaterial)
};
}
- if (AI_SUCCESS == aiGetMaterialFloat( pMaterial,AI_MATKEY_OPACITY,&fTemp) && (!fTemp || fTemp > 1.01f)) {
+ if (AI_SUCCESS == aiGetMaterialFloat( pMaterial,AI_MATKEY_OPACITY,&fTemp) && (!fTemp || fTemp > 1.01f)) {
ReportWarning("Invalid opacity value (must be 0 < opacity < 1.0)");
}
@@ -764,7 +764,7 @@ void ValidateDSProcess::Validate( const aiMaterial* pMaterial)
void ValidateDSProcess::Validate( const aiTexture* pTexture)
{
// the data section may NEVER be NULL
- if (!pTexture->pcData) {
+ if (!pTexture->pcData) {
ReportError("aiTexture::pcData is NULL");
}
if (pTexture->mHeight)
@@ -780,7 +780,7 @@ void ValidateDSProcess::Validate( const aiTexture* pTexture)
if ('\0' != pTexture->achFormatHint[3]) {
ReportWarning("aiTexture::achFormatHint must be zero-terminated");
}
- else if ('.' == pTexture->achFormatHint[0]) {
+ else if ('.' == pTexture->achFormatHint[0]) {
ReportWarning("aiTexture::achFormatHint should contain a file extension "
"without a leading dot (format hint: %s).",pTexture->achFormatHint);
}
@@ -790,7 +790,7 @@ void ValidateDSProcess::Validate( const aiTexture* pTexture)
if ((sz[0] >= 'A' && sz[0] <= 'Z') ||
(sz[1] >= 'A' && sz[1] <= 'Z') ||
(sz[2] >= 'A' && sz[2] <= 'Z') ||
- (sz[3] >= 'A' && sz[3] <= 'Z')) {
+ (sz[3] >= 'A' && sz[3] <= 'Z')) {
ReportError("aiTexture::achFormatHint contains non-lowercase letters");
}
}
@@ -866,7 +866,7 @@ void ValidateDSProcess::Validate( const aiAnimation* pAnimation,
// scaling keys
if (pNodeAnim->mNumScalingKeys)
{
- if (!pNodeAnim->mScalingKeys) {
+ if (!pNodeAnim->mScalingKeys) {
ReportError("aiNodeAnim::mScalingKeys is NULL (aiNodeAnim::mNumScalingKeys is %i)",
pNodeAnim->mNumScalingKeys);
}
@@ -934,11 +934,11 @@ void ValidateDSProcess::Validate( const aiNode* pNode)
}
if (pNode->mNumChildren)
{
- if (!pNode->mChildren) {
+ if (!pNode->mChildren) {
ReportError("aiNode::mChildren is NULL (aiNode::mNumChildren is %i)",
pNode->mNumChildren);
}
- for (unsigned int i = 0; i < pNode->mNumChildren;++i) {
+ for (unsigned int i = 0; i < pNode->mNumChildren;++i) {
Validate(pNode->mChildren[i]);
}
}
diff --git a/3rdparty/assimp/code/ValidateDataStructure.h b/3rdparty/assimp/code/ValidateDataStructure.h
index 48d12b8f0..e9aa12fb4 100644
--- a/3rdparty/assimp/code/ValidateDataStructure.h
+++ b/3rdparty/assimp/code/ValidateDataStructure.h
@@ -56,7 +56,7 @@ struct aiMaterial;
struct aiNode;
struct aiString;
-namespace Assimp {
+namespace Assimp {
// --------------------------------------------------------------------------------------
/** Validates the whole ASSIMP scene data structure for correctness.
diff --git a/3rdparty/assimp/code/Vertex.h b/3rdparty/assimp/code/Vertex.h
index 6fa33dc75..51e5c84db 100644
--- a/3rdparty/assimp/code/Vertex.h
+++ b/3rdparty/assimp/code/Vertex.h
@@ -40,7 +40,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
/** @file Defines a helper class to represent an interleaved vertex */
#ifndef AI_VERTEX_H_INC
#define AI_VERTEX_H_INC
-namespace Assimp {
+namespace Assimp {
///////////////////////////////////////////////////////////////////////////
// std::plus-family operates on operands with identical types - we need to
diff --git a/3rdparty/assimp/code/VertexTriangleAdjacency.cpp b/3rdparty/assimp/code/VertexTriangleAdjacency.cpp
index 3db254613..07ab5090d 100644
--- a/3rdparty/assimp/code/VertexTriangleAdjacency.cpp
+++ b/3rdparty/assimp/code/VertexTriangleAdjacency.cpp
@@ -57,9 +57,9 @@ VertexTriangleAdjacency::VertexTriangleAdjacency(aiFace *pcFaces,
{
// compute the number of referenced vertices if it wasn't specified by the caller
const aiFace* const pcFaceEnd = pcFaces + iNumFaces;
- if (!iNumVertices) {
+ if (!iNumVertices) {
- for (aiFace* pcFace = pcFaces; pcFace != pcFaceEnd; ++pcFace) {
+ for (aiFace* pcFace = pcFaces; pcFace != pcFaceEnd; ++pcFace) {
ai_assert(3 == pcFace->mNumIndices);
iNumVertices = std::max(iNumVertices,pcFace->mIndices[0]);
iNumVertices = std::max(iNumVertices,pcFace->mIndices[1]);
@@ -69,7 +69,7 @@ VertexTriangleAdjacency::VertexTriangleAdjacency(aiFace *pcFaces,
unsigned int* pi;
// allocate storage
- if (bComputeNumTriangles) {
+ if (bComputeNumTriangles) {
pi = mLiveTriangles = new unsigned int[iNumVertices+1];
memset(mLiveTriangles,0,sizeof(unsigned int)*(iNumVertices+1));
mOffsetTable = new unsigned int[iNumVertices+2]+1;
@@ -95,7 +95,7 @@ VertexTriangleAdjacency::VertexTriangleAdjacency(aiFace *pcFaces,
// second pass: compute the final offset table
unsigned int iSum = 0;
unsigned int* piCurOut = this->mOffsetTable;
- for (unsigned int* piCur = pi; piCur != piEnd;++piCur,++piCurOut) {
+ for (unsigned int* piCur = pi; piCur != piEnd;++piCur,++piCurOut) {
unsigned int iLastSum = iSum;
iSum += *piCur;
@@ -106,7 +106,7 @@ VertexTriangleAdjacency::VertexTriangleAdjacency(aiFace *pcFaces,
// third pass: compute the final table
this->mAdjacencyTable = new unsigned int[iSum];
iSum = 0;
- for (aiFace* pcFace = pcFaces; pcFace != pcFaceEnd; ++pcFace,++iSum) {
+ for (aiFace* pcFace = pcFaces; pcFace != pcFaceEnd; ++pcFace,++iSum) {
unsigned int idx = pcFace->mIndices[0];
mAdjacencyTable[pi[idx]++] = iSum;
diff --git a/3rdparty/assimp/code/VertexTriangleAdjacency.h b/3rdparty/assimp/code/VertexTriangleAdjacency.h
index 2929b0c0e..f5d2f7b2a 100644
--- a/3rdparty/assimp/code/VertexTriangleAdjacency.h
+++ b/3rdparty/assimp/code/VertexTriangleAdjacency.h
@@ -47,7 +47,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "../include/aiAssert.h"
struct aiMesh;
-namespace Assimp {
+namespace Assimp {
// --------------------------------------------------------------------------------------------
/** @brief The VertexTriangleAdjacency class computes a vertex-triangle
diff --git a/3rdparty/assimp/code/Win32DebugLogStream.h b/3rdparty/assimp/code/Win32DebugLogStream.h
index db19108cd..a17b5f053 100644
--- a/3rdparty/assimp/code/Win32DebugLogStream.h
+++ b/3rdparty/assimp/code/Win32DebugLogStream.h
@@ -6,45 +6,45 @@
#include "../include/LogStream.h"
#include "Windows.h"
-namespace Assimp {
+namespace Assimp {
// ---------------------------------------------------------------------------
-/** @class Win32DebugLogStream
- * @brief Logs into the debug stream from win32.
+/** @class Win32DebugLogStream
+ * @brief Logs into the debug stream from win32.
*/
class Win32DebugLogStream :
public LogStream
{
public:
- /** @brief Default constructor */
+ /** @brief Default constructor */
Win32DebugLogStream();
- /** @brief Destructor */
+ /** @brief Destructor */
~Win32DebugLogStream();
- /** @brief Writer */
+ /** @brief Writer */
void write(const char* messgae);
};
// ---------------------------------------------------------------------------
-// Default constructor
+// Default constructor
inline Win32DebugLogStream::Win32DebugLogStream()
{}
// ---------------------------------------------------------------------------
-// Default constructor
+// Default constructor
inline Win32DebugLogStream::~Win32DebugLogStream()
{}
// ---------------------------------------------------------------------------
-// Write method
+// Write method
inline void Win32DebugLogStream::write(const char* message)
{
OutputDebugStringA( message);
}
// ---------------------------------------------------------------------------
-} // Namespace Assimp
+} // Namespace Assimp
#endif // ! WIN32
#endif // guard
diff --git a/3rdparty/assimp/code/XFileImporter.h b/3rdparty/assimp/code/XFileImporter.h
index 8e4b1fbef..4dbce4b04 100644
--- a/3rdparty/assimp/code/XFileImporter.h
+++ b/3rdparty/assimp/code/XFileImporter.h
@@ -53,7 +53,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
struct aiNode;
-namespace Assimp {
+namespace Assimp {
namespace XFile {
struct Scene;
@@ -78,7 +78,7 @@ protected:
public:
// -------------------------------------------------------------------
/** 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;
diff --git a/3rdparty/assimp/code/XFileParser.cpp b/3rdparty/assimp/code/XFileParser.cpp
index 93ada7317..229366ff5 100644
--- a/3rdparty/assimp/code/XFileParser.cpp
+++ b/3rdparty/assimp/code/XFileParser.cpp
@@ -53,11 +53,11 @@ using namespace Assimp::XFile;
#ifndef ASSIMP_BUILD_NO_COMPRESSED_X
-# ifdef ASSIMP_BUILD_NO_OWN_ZLIB
-# include <zlib.h>
-# else
-# include "../contrib/zlib/zlib.h"
-# endif
+# ifdef ASSIMP_BUILD_NO_OWN_ZLIB
+# include <zlib.h>
+# else
+# include "../contrib/zlib/zlib.h"
+# endif
// Magic identifier for MSZIP compressed data
#define MSZIP_MAGIC 0x4B43
@@ -65,11 +65,11 @@ using namespace Assimp::XFile;
// ------------------------------------------------------------------------------------------------
// Dummy memory wrappers for use with zlib
-static void* dummy_alloc (void* /*opaque*/, unsigned int items, unsigned int size) {
+static void* dummy_alloc (void* /*opaque*/, unsigned int items, unsigned int size) {
return ::operator new(items*size);
}
-static void dummy_free (void* /*opaque*/, void* address) {
+static void dummy_free (void* /*opaque*/, void* address) {
return ::operator delete(address);
}
@@ -1171,7 +1171,7 @@ void XFileParser::FindNextNoneWhiteSpace()
return;
// check if this is a comment
- if ( (P[0] == '/' && P[1] == '/') || P[0] == '#')
+ if ( (P[0] == '/' && P[1] == '/') || P[0] == '#')
ReadUntilEndOfLine();
else
break;
diff --git a/3rdparty/assimp/code/aiAssert.cpp b/3rdparty/assimp/code/aiAssert.cpp
index bb0781baf..552014f7e 100644
--- a/3rdparty/assimp/code/aiAssert.cpp
+++ b/3rdparty/assimp/code/aiAssert.cpp
@@ -51,7 +51,7 @@ AI_WONT_RETURN void Assimp::aiAssert (const std::string &message, unsigned int u
{
// moved expression testing out of the function and into the macro to avoid constructing
// two std::string on every single ai_assert test
-// if (!expression)
+// if (!expression)
{
// FIX (Aramis): changed std::cerr to std::cout that the message appears in VS' output window ...
std::cout << "File :" << file << ", line " << uiLine << " : " << message << std::endl;
diff --git a/3rdparty/assimp/code/assbin_chunks.h b/3rdparty/assimp/code/assbin_chunks.h
index 5d0a4ed4a..342b7879c 100644
--- a/3rdparty/assimp/code/assbin_chunks.h
+++ b/3rdparty/assimp/code/assbin_chunks.h
@@ -56,30 +56,30 @@ in <tt>&lt;root&gt;/tools/assimp_cmd/WriteDumb.cpp</tt> (yes, the 'b' is no typo
2. Definitions:
-------------------------------------------------------------------------------
-integer is four bytes wide, stored in little-endian byte order.
-short is two bytes wide, stored in little-endian byte order.
-byte is a single byte.
+integer is four bytes wide, stored in little-endian byte order.
+short is two bytes wide, stored in little-endian byte order.
+byte is a single byte.
string is an integer n followed by n UTF-8 characters, not terminated by zero
-float is an IEEE 754 single-precision floating-point value
-double is an IEEE 754 double-precision floating-point value
+float is an IEEE 754 single-precision floating-point value
+double is an IEEE 754 double-precision floating-point value
t[n] is an array of n elements of type t
-------------------------------------------------------------------------------
2. Header:
-------------------------------------------------------------------------------
-byte[44] Magic identification string for ASSBIN files.
+byte[44] Magic identification string for ASSBIN files.
'ASSIMP.binary'
-integer Major version of the Assimp library which wrote the file
-integer Minor version of the Assimp library which wrote the file
+integer Major version of the Assimp library which wrote the file
+integer Minor version of the Assimp library which wrote the file
match these against ASSBIN_VERSION_MAJOR and ASSBIN_VERSION_MINOR
-integer SVN revision of the Assimp library (intended for our internal
+integer SVN revision of the Assimp library (intended for our internal
debugging - if you write Ass files from your own APPs, set this value to 0.
-integer Assimp compile flags
+integer Assimp compile flags
-short 0 for normal files, 1 for shortened dumps for regression tests
+short 0 for normal files, 1 for shortened dumps for regression tests
these should have the file extension assbin.regress
short 1 if the data after the header is compressed with the DEFLATE algorithm,
@@ -87,21 +87,21 @@ short 1 if the data after the header is compressed with the DEFLATE algori
For compressed files, the first integer after the header is
always the uncompressed data size
-byte[256] Zero-terminated source file name, UTF-8
-byte[128] Zero-terminated command line parameters passed to assimp_cmd, UTF-8
+byte[256] Zero-terminated source file name, UTF-8
+byte[128] Zero-terminated command line parameters passed to assimp_cmd, UTF-8
-byte[64] Reserved for future use
+byte[64] Reserved for future use
---> Total length: 512 bytes
-------------------------------------------------------------------------------
3. Chunks:
-------------------------------------------------------------------------------
-integer Magic chunk ID (ASSBIN_CHUNK_XXX)
-integer Chunk data length, in bytes
+integer Magic chunk ID (ASSBIN_CHUNK_XXX)
+integer Chunk data length, in bytes
(unknown chunks are possible, a good reader skips over them)
-byte[n] length-of-chunk bytes of data, depending on the chunk type
+byte[n] length-of-chunk bytes of data, depending on the chunk type
Chunks can contain nested chunks. Nested chunks are ALWAYS at the end of the chunk,
their size is included in length-of-chunk.
@@ -171,26 +171,26 @@ The general 'rule' to get from Assimp headers to the serialized layout is:
#define ASSBIN_HEADER_LENGTH 512
// these are the magic chunk identifiers for the binary ASS file format
-#define ASSBIN_CHUNK_AICAMERA 0x1234
-#define ASSBIN_CHUNK_AILIGHT 0x1235
-#define ASSBIN_CHUNK_AITEXTURE 0x1236
-#define ASSBIN_CHUNK_AIMESH 0x1237
-#define ASSBIN_CHUNK_AINODEANIM 0x1238
-#define ASSBIN_CHUNK_AISCENE 0x1239
-#define ASSBIN_CHUNK_AIBONE 0x123a
-#define ASSBIN_CHUNK_AIANIMATION 0x123b
-#define ASSBIN_CHUNK_AINODE 0x123c
-#define ASSBIN_CHUNK_AIMATERIAL 0x123d
-#define ASSBIN_CHUNK_AIMATERIALPROPERTY 0x123e
-
-#define ASSBIN_MESH_HAS_POSITIONS 0x1
-#define ASSBIN_MESH_HAS_NORMALS 0x2
-#define ASSBIN_MESH_HAS_TANGENTS_AND_BITANGENTS 0x4
-#define ASSBIN_MESH_HAS_TEXCOORD_BASE 0x100
-#define ASSBIN_MESH_HAS_COLOR_BASE 0x10000
-
-#define ASSBIN_MESH_HAS_TEXCOORD(n) (ASSBIN_MESH_HAS_TEXCOORD_BASE << n)
-#define ASSBIN_MESH_HAS_COLOR(n) (ASSBIN_MESH_HAS_COLOR_BASE << n)
+#define ASSBIN_CHUNK_AICAMERA 0x1234
+#define ASSBIN_CHUNK_AILIGHT 0x1235
+#define ASSBIN_CHUNK_AITEXTURE 0x1236
+#define ASSBIN_CHUNK_AIMESH 0x1237
+#define ASSBIN_CHUNK_AINODEANIM 0x1238
+#define ASSBIN_CHUNK_AISCENE 0x1239
+#define ASSBIN_CHUNK_AIBONE 0x123a
+#define ASSBIN_CHUNK_AIANIMATION 0x123b
+#define ASSBIN_CHUNK_AINODE 0x123c
+#define ASSBIN_CHUNK_AIMATERIAL 0x123d
+#define ASSBIN_CHUNK_AIMATERIALPROPERTY 0x123e
+
+#define ASSBIN_MESH_HAS_POSITIONS 0x1
+#define ASSBIN_MESH_HAS_NORMALS 0x2
+#define ASSBIN_MESH_HAS_TANGENTS_AND_BITANGENTS 0x4
+#define ASSBIN_MESH_HAS_TEXCOORD_BASE 0x100
+#define ASSBIN_MESH_HAS_COLOR_BASE 0x10000
+
+#define ASSBIN_MESH_HAS_TEXCOORD(n) (ASSBIN_MESH_HAS_TEXCOORD_BASE << n)
+#define ASSBIN_MESH_HAS_COLOR(n) (ASSBIN_MESH_HAS_COLOR_BASE << n)
#endif // INCLUDED_ASSBIN_CHUNKS_H
diff --git a/3rdparty/assimp/code/fast_atof.h b/3rdparty/assimp/code/fast_atof.h
index 6b242afc5..a584efb70 100644
--- a/3rdparty/assimp/code/fast_atof.h
+++ b/3rdparty/assimp/code/fast_atof.h
@@ -20,7 +20,7 @@
namespace Assimp
{
-const float fast_atof_table[16] = { // we write [16] here instead of [] to work around a swig bug
+const float fast_atof_table[16] = { // we write [16] here instead of [] to work around a swig bug
0.f,
0.1f,
0.01f,
diff --git a/3rdparty/assimp/code/irrXMLWrapper.h b/3rdparty/assimp/code/irrXMLWrapper.h
index d3d0bbf7f..af7516683 100644
--- a/3rdparty/assimp/code/irrXMLWrapper.h
+++ b/3rdparty/assimp/code/irrXMLWrapper.h
@@ -44,7 +44,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// some long includes ....
#include "./../contrib/irrXML/irrXML.h"
#include "./../include/IOStream.h"
-namespace Assimp {
+namespace Assimp {
// ---------------------------------------------------------------------------------
/** @brief Utility class to make IrrXML work together with our custom IO system
@@ -55,7 +55,7 @@ namespace Assimp {
* // open the file
* boost::scoped_ptr<IOStream> file( pIOHandler->Open( pFile));
* if ( file.get() == NULL) {
- * throw DeadlyImportError( "Failed to open file " + pFile + ".");
+ * throw DeadlyImportError( "Failed to open file " + pFile + ".");
* }
*
* // generate a XML reader for it
@@ -99,7 +99,7 @@ public:
/** @param buffer: Pointer to output buffer.
* @param sizeToRead: Amount of bytes to read
* @return Returns how much bytes were read. */
- virtual int read(void* buffer, int sizeToRead) {
+ virtual int read(void* buffer, int sizeToRead) {
if (sizeToRead<0) {
return 0;
}
@@ -115,7 +115,7 @@ public:
// ----------------------------------------------------------------------------------
//! Returns size of file in bytes
- virtual int getSize() {
+ virtual int getSize() {
return (int)data.size();
}
diff --git a/3rdparty/assimp/code/makefile b/3rdparty/assimp/code/makefile
deleted file mode 100644
index 5710158da..000000000
--- a/3rdparty/assimp/code/makefile
+++ /dev/null
@@ -1,111 +0,0 @@
-### USE OF THIS MAKEFILE IS NOT RECOMMENDED.
-### It is no longer maintained. Use CMAKE instead.
-
-# Makefile for Open Asset Import Library (GNU-make)
-# aramis_acg@users.sourceforge.net
-
-#
-# Usage: make <target> <macros>
-
-# TARGETS:
-# all Build a shared so from the whole library
-# clean Cleanup object files, prepare for rebuild
-# static Build a static library (*.a)
-# install SDK will be installed to /usr/bin/assimp
-
-# MACROS: (make clean before you change one)
-# NOBOOST=1 Build against boost workaround
-# SINGLETHREADED=1 Build single-threaded library
-# DEBUG=1 Build debug build of library
-
-# C++ object files
-OBJECTS := $(patsubst %.cpp,%.o, $(wildcard *.cpp))
-OBJECTS += $(patsubst %.cpp,%.o, $(wildcard extra/*.cpp))
-OBJECTS += $(patsubst %.cpp,%.o, $(wildcard ./../contrib/irrXML/*.cpp))
-
-# C object files
-OBJECTSC := $(patsubst %.c,%.oc, $(wildcard ./../contrib/zlib/*.c))
-OBJECTSC += $(patsubst %.c,%.oc, $(wildcard ./../contrib/ConvertUTF/*.c))
-OBJECTSC += $(patsubst %.c,%.oc, $(wildcard ./../contrib/unzip/*.c))
-
-# Directory for install
-INSTALLDIR = /usr/bin/assimp
-
-# Include flags for gcc
-INCLUDEFLAGS =
-
-# Preprocessor defines for gcc
-DEFINEFLAGS =
-
-# Suffix for the output binary, represents build type
-NAMESUFFIX =
-
-# Output path for binaries
-BINPATH = ../bin/gcc
-INCPATH = ../include
-
-# GCC compiler flags
-CPPFLAGS=-Wall
-
-# Setup environment for noboost build
-ifeq ($(NOBOOST),1)
- SINGLETHREADED = 1
- INCLUDEFLAGS += -IBoostWorkaround/
- DEFINEFLAGS += -DASSIMP_BUILD_BOOST_WORKAROUND
-# NAMESUFFIX += -noboost
-# else
-# INCLUDEFLAGS += -I"C:/Program Files/boost/boost_1_35_0"
-endif
-
-# Setup environment for st build
-ifeq ($(SINGLETHREADED),1)
- DEFINEFLAGS += -DASSIMP_BUILD_SINGLETHREADED
-# NAMESUFFIX += -st
-endif
-
-# Setup environment for debug build
-ifeq ($(DEBUG),1)
- DEFINEFLAGS += -D_DEBUG -DDEBUG
-# NAMESUFFIX += -debug
-else
- CPPFLAGS += -O3
- DEFINEFLAGS += -DNDEBUG -D_NDEBUG
-endif
-
-OUTPUT_NAME = dummy
-
-# Output name of shared library
-SHARED_TARGET = $(BINPATH)/libassimp$(NAMESUFFIX).so
-
-# Output name of static library
-STATIC = $(BINPATH)/libassimp$(NAMESUFFIX).a
-
-# target: all
-# usage : build a shared library (*.so)
-all: $(SHARED_TARGET)
-
-$(SHARED_TARGET): $(OBJECTS) $(OBJECTSC)
- gcc -o $@ $(OBJECTS) $(OBJECTSC) -shared -lstdc++
-%.o:%.cpp
- $(CXX) -g -c $(CPPFLAGS) $? -o $@ $(INCLUDEFLAGS) $(DEFINEFLAGS) -fPIC
-%.oc:%.c
- $(CXX) -x c -g -c -ansi $(CPPFLAGS) $? -o $@ -fPIC
-
-# target: clean
-# usage : cleanup all object files, prepare for a rebuild
-.PHONY: clean
-clean:
- -rm -f $(OBJECTS) $(OBJECTSC) $(TARGET)
-
-# target: static
-# usage : build a static library (*.a)
-static: $(STATIC)
-$(STATIC): $(OBJECTS) $(OBJECTSC)
- ar rcs $@ $(OBJECTS) $(OBJECTSC)
-
-install:
- mkdir -p $(INSTALLDIR)
- mkdir -p $(INSTALLDIR)/include
- mkdir -p $(INSTALLDIR)/lib
- cp $(BINPATH)/libassimp$(NAMESUFFIX).* $(INSTALLDIR)/lib
- cp $(INCPATH)/* $(INSTALLDIR)/include
diff --git a/3rdparty/assimp/code/makefile.mingw b/3rdparty/assimp/code/makefile.mingw
deleted file mode 100644
index c0b7bde05..000000000
--- a/3rdparty/assimp/code/makefile.mingw
+++ /dev/null
@@ -1,105 +0,0 @@
-### USE OF THIS MAKEFILE IS NOT RECOMMENDED.
-### It is no longer maintained. Use CMAKE instead.
-
-# ---------------------------------------------------------------------------
-# Makefile for Open Asset Import Library (MinGW32-make)
-# aramis_acg@users.sourceforge.net
-# - just a quick'n'dirty one, could be buggy ...
-#
-# Usage: mingw32-make -f makefile.mingw <target> <macros>
-
-# TARGETS:
-# all Build a shared so from the whole library
-# clean Cleanup object files, prepare for rebuild
-# static Build a static library (*.a)
-
-# MACROS: (make clean before you change one)
-# NOBOOST=1 Build against boost workaround
-# SINGLETHREADED=1 Build single-threaded library
-# DEBUG=1 Build debug build of library
-#
-# ---------------------------------------------------------------------------
-
-# C++ object files
-OBJECTS := $(patsubst %.cpp,%.o, $(wildcard *.cpp))
-OBJECTS += $(patsubst %.cpp,%.o, $(wildcard extra/*.cpp))
-OBJECTS += $(patsubst %.cpp,%.o, $(wildcard ./../contrib/irrXML/*.cpp))
-
-# C object files
-OBJECTSC := $(patsubst %.c,%.oc, $(wildcard ./../contrib/zlib/*.c))
-OBJECTSC += $(patsubst %.c,%.oc, $(wildcard ./../contrib/ConvertUTF/*.c))
-OBJECTSC += $(patsubst %.c,%.oc, $(wildcard ./../contrib/unzip/*.c))
-
-# Include flags for gcc
-INCLUDEFLAGS =
-
-# Preprocessor defines for gcc
-DEFINEFLAGS =
-
-# Suffix for the output binary, represents build type
-NAMESUFFIX =
-
-# Output path for binaries
-BINPATH = ../bin/mingw/
-
-# GCC compiler flags
-CPPFLAGS=-Wall
-
-# Setup environment for noboost build
-ifeq ($(NOBOOST),1)
- SINGLETHREADED = 1
- INCLUDEFLAGS += -I./BoostWorkaround/
- DEFINEFLAGS += -DASSIMP_BUILD_BOOST_WORKAROUND
-# NAMESUFFIX += -noboost
-else
- # adjust this manually if your boost is stored elsewhere
- INCLUDEFLAGS += -I"C:/Program Files/boost/boost_1_38"
- #INCLUDEFLAGS += -I"$(BOOST_DIR)"
-
-endif
-
-# Setup environment for st build
-ifeq ($(SINGLETHREADED),1)
- DEFINEFLAGS += -DASSIMP_BUILD_SINGLETHREADED
-# NAMESUFFIX += -st
-endif
-
-# Setup environment for debug build
-ifeq ($(DEBUG),1)
- DEFINEFLAGS += -D_DEBUG -DDEBUG
- CPPFLAGS += -g
-# NAMESUFFIX += -debug
-else
- CPPFLAGS += -O2 -s
- DEFINEFLAGS += -DNDEBUG -D_NDEBUG
-endif
-
-# Output name of shared library
-SHARED_TARGET = $(BINPATH)/libassimp$(NAMESUFFIX).so
-
-# Output name of static library
-STATIC = $(BINPATH)/libassimp$(NAMESUFFIX).a
-
-# target: all
-# usage : build a shared library (*.so)
-all: $(SHARED_TARGET)
-
-$(SHARED_TARGET): $(OBJECTS) $(OBJECTSC)
- gcc -o $@ $(OBJECTS) $(OBJECTSC) -shared -lstdc++
-%.o:%.cpp
- $(CXX) -c $(CPPFLAGS) $? -o $@ $(INCLUDEFLAGS) $(DEFINEFLAGS)
-%.oc:%.c
- $(CXX) -x c -c -ansi $(CPPFLAGS) $? -o $@
-
-# target: clean
-# usage : cleanup all object files, prepare for a rebuild
-.PHONY: clean
-clean:
- -del *.o .\..\contrib\irrXML\*.o .\..\contrib\zlib\*.oc .\..\contrib\unzip\*.oc .\..\contrib\ConvertUTF\*.oc
-
-# target: static
-# usage : build a static library (*.a)
-static: $(STATIC)
-$(STATIC): $(OBJECTS) $(OBJECTSC)
- ar rcs $@ $(OBJECTS) $(OBJECTSC)
-
diff --git a/3rdparty/assimp/code/res/assimp.rc b/3rdparty/assimp/code/res/assimp.rc
deleted file mode 100644
index 5b3b5c06b..000000000
--- a/3rdparty/assimp/code/res/assimp.rc
+++ /dev/null
@@ -1,80 +0,0 @@
-// Microsoft Visual C++ generated resource script.
-//
-#include "resource.h"
-#include "..\..\revision.h"
-
-#define APSTUDIO_READONLY_SYMBOLS
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 2 resource.
-//
-#define APSTUDIO_HIDDEN_SYMBOLS
-#include "windows.h"
-#undef APSTUDIO_HIDDEN_SYMBOLS
-
-/////////////////////////////////////////////////////////////////////////////
-#undef APSTUDIO_READONLY_SYMBOLS
-
-/////////////////////////////////////////////////////////////////////////////
-// Deutsch (Deutschland) resources
-
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_DEU)
-#ifdef _WIN32
-LANGUAGE LANG_GERMAN, SUBLANG_GERMAN
-#pragma code_page(1252)
-#endif //_WIN32
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Version
-//
-
-VS_VERSION_INFO VERSIONINFO
- FILEVERSION 1,1,SVNRevision, 0
- PRODUCTVERSION 1,1,SVNRevision,0
- FILEFLAGSMASK 0x17L
-#ifdef _DEBUG
- FILEFLAGS 0x1L
-#else
- FILEFLAGS 0x0L
-#endif
- FILEOS 0x4L
- FILETYPE 0x7L
- FILESUBTYPE 0x0L
-BEGIN
- BLOCK "StringFileInfo"
- BEGIN
- BLOCK "040704b0"
- BEGIN
- VALUE "Comments", "Licensed under a 3-clause BSD license"
- VALUE "CompanyName", "ASSIMP Development Team"
- VALUE "FileDescription", "Open Asset Import Library"
- VALUE "FileVersion", 1,1,SVNRevision,0
- VALUE "InternalName", "assimp "
- VALUE "LegalCopyright", "Copyright (C) 2006-2010"
- VALUE "OriginalFilename", "assimpNN.dll"
- VALUE "ProductName", "Open Asset Import Library"
- VALUE "ProductVersion", 1,1,SVNRevision,0
- ,0
- END
- END
- BLOCK "VarFileInfo"
- BEGIN
- VALUE "Translation", 0x407, 1200
- END
-END
-
-#endif // Deutsch (Deutschland) resources
-/////////////////////////////////////////////////////////////////////////////
-
-
-#ifndef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 3 resource.
-//
-
-/////////////////////////////////////////////////////////////////////////////
-#endif // not APSTUDIO_INVOKED
-
diff --git a/3rdparty/assimp/code/res/resource.h b/3rdparty/assimp/code/res/resource.h
index a2542fea1..a9733ce49 100644
--- a/3rdparty/assimp/code/res/resource.h
+++ b/3rdparty/assimp/code/res/resource.h
@@ -2,7 +2,7 @@
// Microsoft Visual C++ generated include file.
// Used by assimp.rc
-// Nchste Standardwerte fr neue Objekte
+// Nächste Standardwerte für neue Objekte
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
diff --git a/3rdparty/assimp/contrib/ConvertUTF/ConvertUTF.c b/3rdparty/assimp/contrib/ConvertUTF/ConvertUTF.c
index 00338c25e..aeb6735fb 100644
--- a/3rdparty/assimp/contrib/ConvertUTF/ConvertUTF.c
+++ b/3rdparty/assimp/contrib/ConvertUTF/ConvertUTF.c
@@ -53,8 +53,8 @@ static const UTF32 halfMask = 0x3FFUL;
#define UNI_SUR_HIGH_END (UTF32)0xDBFF
#define UNI_SUR_LOW_START (UTF32)0xDC00
#define UNI_SUR_LOW_END (UTF32)0xDFFF
-#define false 0
-#define true 1
+#define false 0
+#define true 1
/* --------------------------------------------------------------------- */
@@ -253,11 +253,11 @@ ConversionResult ConvertUTF16toUTF8 (
}
}
/* Figure out how many bytes the result will require */
- if (ch < (UTF32)0x80) { bytesToWrite = 1;
+ if (ch < (UTF32)0x80) { bytesToWrite = 1;
} else if (ch < (UTF32)0x800) { bytesToWrite = 2;
} else if (ch < (UTF32)0x10000) { bytesToWrite = 3;
} else if (ch < (UTF32)0x110000) { bytesToWrite = 4;
- } else { bytesToWrite = 3;
+ } else { bytesToWrite = 3;
ch = UNI_REPLACEMENT_CHAR;
}
@@ -430,11 +430,11 @@ ConversionResult ConvertUTF32toUTF8 (
* Figure out how many bytes the result will require. Turn any
* illegally large UTF32 things (> Plane 17) into replacement chars.
*/
- if (ch < (UTF32)0x80) { bytesToWrite = 1;
+ if (ch < (UTF32)0x80) { bytesToWrite = 1;
} else if (ch < (UTF32)0x800) { bytesToWrite = 2;
} else if (ch < (UTF32)0x10000) { bytesToWrite = 3;
} else if (ch <= UNI_MAX_LEGAL_UTF32) { bytesToWrite = 4;
- } else { bytesToWrite = 3;
+ } else { bytesToWrite = 3;
ch = UNI_REPLACEMENT_CHAR;
result = sourceIllegal;
}
diff --git a/3rdparty/assimp/contrib/ConvertUTF/ConvertUTF.h b/3rdparty/assimp/contrib/ConvertUTF/ConvertUTF.h
index 08b8139b5..76e801ece 100644
--- a/3rdparty/assimp/contrib/ConvertUTF/ConvertUTF.h
+++ b/3rdparty/assimp/contrib/ConvertUTF/ConvertUTF.h
@@ -88,10 +88,10 @@
bit mask & shift operations.
------------------------------------------------------------------------ */
-typedef unsigned long UTF32; /* at least 32 bits */
-typedef unsigned short UTF16; /* at least 16 bits */
-typedef unsigned char UTF8; /* typically 8 bits */
-typedef unsigned char Boolean; /* 0 or 1 */
+typedef unsigned long UTF32; /* at least 32 bits */
+typedef unsigned short UTF16; /* at least 16 bits */
+typedef unsigned char UTF8; /* typically 8 bits */
+typedef unsigned char Boolean; /* 0 or 1 */
/* Some fundamental constants */
#define UNI_REPLACEMENT_CHAR (UTF32)0x0000FFFD
@@ -101,10 +101,10 @@ typedef unsigned char Boolean; /* 0 or 1 */
#define UNI_MAX_LEGAL_UTF32 (UTF32)0x0010FFFF
typedef enum {
- conversionOK, /* conversion successful */
- sourceExhausted, /* partial character in source, but hit end */
- targetExhausted, /* insuff. room in target for conversion */
- sourceIllegal /* source sequence is illegal/malformed */
+ conversionOK, /* conversion successful */
+ sourceExhausted, /* partial character in source, but hit end */
+ targetExhausted, /* insuff. room in target for conversion */
+ sourceIllegal /* source sequence is illegal/malformed */
} ConversionResult;
typedef enum {
diff --git a/3rdparty/assimp/contrib/irrXML/heapsort.h b/3rdparty/assimp/contrib/irrXML/heapsort.h
index 65905e226..0409f9152 100644
--- a/3rdparty/assimp/contrib/irrXML/heapsort.h
+++ b/3rdparty/assimp/contrib/irrXML/heapsort.h
@@ -16,16 +16,16 @@ namespace core
template<class T>
inline void heapsink(T*array, s32 element, s32 max)
{
- while ((element<<1) < max) // there is a left child
+ while ((element<<1) < max) // there is a left child
{
s32 j = (element<<1);
if (j+1 < max && array[j] < array[j+1])
- j = j+1; // take right child
+ j = j+1; // take right child
if (array[element] < array[j])
{
- T t = array[j]; // swap elements
+ T t = array[j]; // swap elements
array[j] = array[element];
array[element] = t;
element = j;
diff --git a/3rdparty/assimp/contrib/irrXML/irrArray.h b/3rdparty/assimp/contrib/irrXML/irrArray.h
index 452b70be2..8c762f43c 100644
--- a/3rdparty/assimp/contrib/irrXML/irrArray.h
+++ b/3rdparty/assimp/contrib/irrXML/irrArray.h
@@ -13,7 +13,7 @@ namespace irr
namespace core
{
-//! Self reallocating template array (like stl vector) with additional features.
+//! Self reallocating template array (like stl vector) with additional features.
/** Some features are: Heap sorting, binary search methods, easier debugging.
*/
template <class T>
@@ -32,7 +32,7 @@ public:
//! \param start_count: Amount of elements to allocate.
array(u32 start_count)
: data(0), allocated(0), used(0),
- free_when_destroyed(true), is_sorted(true)
+ free_when_destroyed(true), is_sorted(true)
{
reallocate(start_count);
}
diff --git a/3rdparty/assimp/contrib/irrXML/irrString.h b/3rdparty/assimp/contrib/irrXML/irrString.h
index 366443b6b..af07cbe41 100644
--- a/3rdparty/assimp/contrib/irrXML/irrString.h
+++ b/3rdparty/assimp/contrib/irrXML/irrString.h
@@ -12,14 +12,14 @@ namespace irr
namespace core
{
-//! Very simple string class with some useful features.
-/** string<c8> and string<wchar_t> work both with unicode AND ascii,
+//! Very simple string class with some useful features.
+/** string<c8> and string<wchar_t> work both with unicode AND ascii,
so you can assign unicode to string<c8> and ascii to string<wchar_t>
(and the other way round) if your ever would want to.
Note that the conversation between both is not done using an encoding.
Known bugs:
-Special characters like '', '' and '' are ignored in the
+Special characters like 'Ä', 'Ü' and 'Ö' are ignored in the
methods make_upper, make_lower and equals_ignore_case.
*/
template <class T>
@@ -75,7 +75,7 @@ public:
// add numbers
- while (number && idx)
+ while(number && idx)
{
idx--;
tmpbuf[idx] = (c8)('0' + (number % 10));
@@ -172,7 +172,7 @@ public:
s32 len = 0;
const B* p = c;
- while (*p)
+ while(*p)
{
++len;
++p;
@@ -226,7 +226,7 @@ public:
bool operator ==(const T* str) const
{
int i;
- for (i=0; array[i] && str[i]; ++i)
+ for(i=0; array[i] && str[i]; ++i)
if (array[i] != str[i])
return false;
@@ -238,7 +238,7 @@ public:
//! Comparison operator
bool operator ==(const string<T>& other) const
{
- for (s32 i=0; array[i] && other.array[i]; ++i)
+ for(s32 i=0; array[i] && other.array[i]; ++i)
if (array[i] != other.array[i])
return false;
@@ -250,7 +250,7 @@ public:
//! Is smaller operator
bool operator <(const string<T>& other) const
{
- for (s32 i=0; array[i] && other.array[i]; ++i)
+ for(s32 i=0; array[i] && other.array[i]; ++i)
if (array[i] != other.array[i])
return (array[i] < other.array[i]);
@@ -322,7 +322,7 @@ public:
\return Returns true if the string are equal ignoring case. */
bool equals_ignore_case(const string<T>& other) const
{
- for (s32 i=0; array[i] && other[i]; ++i)
+ for(s32 i=0; array[i] && other[i]; ++i)
if (toLower(array[i]) != toLower(other[i]))
return false;
@@ -334,7 +334,7 @@ public:
bool equalsn(const string<T>& other, int len)
{
int i;
- for (i=0; array[i] && other[i] && i < len; ++i)
+ for(i=0; array[i] && other[i] && i < len; ++i)
if (array[i] != other[i])
return false;
@@ -348,7 +348,7 @@ public:
bool equalsn(const T* str, int len)
{
int i;
- for (i=0; array[i] && str[i] && i < len; ++i)
+ for(i=0; array[i] && str[i] && i < len; ++i)
if (array[i] != str[i])
return false;
diff --git a/3rdparty/assimp/contrib/irrXML/irrTypes.h b/3rdparty/assimp/contrib/irrXML/irrTypes.h
index f507c3678..0911a2d7c 100644
--- a/3rdparty/assimp/contrib/irrXML/irrTypes.h
+++ b/3rdparty/assimp/contrib/irrXML/irrTypes.h
@@ -10,35 +10,35 @@ namespace irr
//! 8 bit unsigned variable.
/** This is a typedef for unsigned char, it ensures portability of the engine. */
-typedef unsigned char u8;
+typedef unsigned char u8;
//! 8 bit signed variable.
/** This is a typedef for signed char, it ensures portability of the engine. */
-typedef signed char s8;
+typedef signed char s8;
//! 8 bit character variable.
/** This is a typedef for char, it ensures portability of the engine. */
-typedef char c8;
+typedef char c8;
//! 16 bit unsigned variable.
/** This is a typedef for unsigned short, it ensures portability of the engine. */
-typedef unsigned short u16;
+typedef unsigned short u16;
//! 16 bit signed variable.
/** This is a typedef for signed short, it ensures portability of the engine. */
-typedef signed short s16;
+typedef signed short s16;
//! 32 bit unsigned variable.
/** This is a typedef for unsigned int, it ensures portability of the engine. */
-typedef unsigned int u32;
+typedef unsigned int u32;
//! 32 bit signed variable.
/** This is a typedef for signed int, it ensures portability of the engine. */
-typedef signed int s32;
+typedef signed int s32;
@@ -46,17 +46,17 @@ typedef signed int s32;
// This is a typedef for __int64, it ensures portability of the engine.
// This type is currently not used by the engine and not supported by compilers
// other than Microsoft Compilers, so it is outcommented.
-//typedef __int64 s64;
+//typedef __int64 s64;
//! 32 bit floating point variable.
/** This is a typedef for float, it ensures portability of the engine. */
-typedef float f32;
+typedef float f32;
//! 64 bit floating point variable.
/** This is a typedef for double, it ensures portability of the engine. */
-typedef double f64;
+typedef double f64;
} // end namespace
diff --git a/3rdparty/assimp/contrib/unzip/crypt.h b/3rdparty/assimp/contrib/unzip/crypt.h
index c324542ba..622f4bc2e 100644
--- a/3rdparty/assimp/contrib/unzip/crypt.h
+++ b/3rdparty/assimp/contrib/unzip/crypt.h
@@ -37,7 +37,6 @@ static int decrypt_byte(unsigned long* pkeys, const unsigned long* pcrc_32_tab)
unsigned temp; /* POTENTIAL BUG: temp*(temp^1) may overflow in an
* unpredictable manner on 16-bit systems; not a problem
* with any known compiler so far, though */
- (void)pcrc_32_tab; /// UNUSED
temp = ((unsigned)(*(pkeys+2)) & 0xffff) | 2;
return (int)(((temp * (temp ^ 1)) >> 8) & 0xff);
diff --git a/3rdparty/assimp/contrib/unzip/ioapi.c b/3rdparty/assimp/contrib/unzip/ioapi.c
index b22106ed7..8f21bd8f9 100644
--- a/3rdparty/assimp/contrib/unzip/ioapi.c
+++ b/3rdparty/assimp/contrib/unzip/ioapi.c
@@ -10,11 +10,11 @@
#include <stdlib.h>
#include <string.h>
-# ifdef ASSIMP_BUILD_NO_OWN_ZLIB
-# include <zlib.h>
-# else
-# include "../zlib/zlib.h"
-# endif
+# ifdef ASSIMP_BUILD_NO_OWN_ZLIB
+# include <zlib.h>
+# else
+# include "../zlib/zlib.h"
+# endif
#include "ioapi.h"
@@ -69,11 +69,13 @@ int ZCALLBACK ferror_file_func (
voidpf stream);
-voidpf ZCALLBACK fopen_file_func (voidpf opaque, const char* filename, int mode)
+voidpf ZCALLBACK fopen_file_func (opaque, filename, mode)
+ voidpf opaque;
+ const char* filename;
+ int mode;
{
FILE* file = NULL;
const char* mode_fopen = NULL;
- (void)opaque; /// UNUSED
if ((mode & ZLIB_FILEFUNC_MODE_READWRITEFILTER)==ZLIB_FILEFUNC_MODE_READ)
mode_fopen = "rb";
else
@@ -89,36 +91,46 @@ voidpf ZCALLBACK fopen_file_func (voidpf opaque, const char* filename, int mode)
}
-uLong ZCALLBACK fread_file_func (voidpf opaque, voidpf stream, void* buf, uLong size)
+uLong ZCALLBACK fread_file_func (opaque, stream, buf, size)
+ voidpf opaque;
+ voidpf stream;
+ void* buf;
+ uLong size;
{
uLong ret;
- (void)opaque; /// UNUSED
ret = (uLong)fread(buf, 1, (size_t)size, (FILE *)stream);
return ret;
}
-uLong ZCALLBACK fwrite_file_func (voidpf opaque, voidpf stream, const void *buf, uLong size)
+uLong ZCALLBACK fwrite_file_func (opaque, stream, buf, size)
+ voidpf opaque;
+ voidpf stream;
+ const void* buf;
+ uLong size;
{
uLong ret;
- (void)opaque; /// UNUSED
ret = (uLong)fwrite(buf, 1, (size_t)size, (FILE *)stream);
return ret;
}
-long ZCALLBACK ftell_file_func (voidpf opaque, voidpf stream)
+long ZCALLBACK ftell_file_func (opaque, stream)
+ voidpf opaque;
+ voidpf stream;
{
long ret;
- (void)opaque; /// UNUSED
ret = ftell((FILE *)stream);
return ret;
}
-long ZCALLBACK fseek_file_func (voidpf opaque, voidpf stream, uLong offset, int origin)
+long ZCALLBACK fseek_file_func (opaque, stream, offset, origin)
+ voidpf opaque;
+ voidpf stream;
+ uLong offset;
+ int origin;
{
int fseek_origin=0;
long ret;
- (void)opaque; /// UNUSED
switch (origin)
{
case ZLIB_FILEFUNC_SEEK_CUR :
@@ -137,23 +149,26 @@ long ZCALLBACK fseek_file_func (voidpf opaque, voidpf stream, uLong offset, int
return ret;
}
-int ZCALLBACK fclose_file_func (voidpf opaque, voidpf stream)
+int ZCALLBACK fclose_file_func (opaque, stream)
+ voidpf opaque;
+ voidpf stream;
{
int ret;
- (void)opaque; /// UNUSED
ret = fclose((FILE *)stream);
return ret;
}
-int ZCALLBACK ferror_file_func (voidpf opaque, voidpf stream)
+int ZCALLBACK ferror_file_func (opaque, stream)
+ voidpf opaque;
+ voidpf stream;
{
int ret;
- (void)opaque; /// UNUSED
ret = ferror((FILE *)stream);
return ret;
}
-void fill_fopen_filefunc (zlib_filefunc_def *pzlib_filefunc_def)
+void fill_fopen_filefunc (pzlib_filefunc_def)
+ zlib_filefunc_def* pzlib_filefunc_def;
{
pzlib_filefunc_def->zopen_file = fopen_file_func;
pzlib_filefunc_def->zread_file = fread_file_func;
diff --git a/3rdparty/assimp/contrib/unzip/unzip.h b/3rdparty/assimp/contrib/unzip/unzip.h
index b5108b1cc..2f0d6ee56 100644
--- a/3rdparty/assimp/contrib/unzip/unzip.h
+++ b/3rdparty/assimp/contrib/unzip/unzip.h
@@ -50,11 +50,11 @@ extern "C" {
#endif
#ifndef _ZLIB_H
-# ifdef ASSIMP_BUILD_NO_OWN_ZLIB
-# include <zlib.h>
-# else
-# include "../zlib/zlib.h"
-# endif
+# ifdef ASSIMP_BUILD_NO_OWN_ZLIB
+# include <zlib.h>
+# else
+# include "../zlib/zlib.h"
+# endif
#endif
#ifndef _ZLIBIOAPI_H
diff --git a/3rdparty/assimp/include/Compiler/poppack1.h b/3rdparty/assimp/include/Compiler/poppack1.h
index ffbae98ed..8944b2b60 100644
--- a/3rdparty/assimp/include/Compiler/poppack1.h
+++ b/3rdparty/assimp/include/Compiler/poppack1.h
@@ -10,12 +10,12 @@
// ===============================================================================
#ifndef AI_PUSHPACK_IS_DEFINED
-# error pushpack1.h must be included after poppack1.h
+# error pushpack1.h must be included after poppack1.h
#endif
// reset packing to the original value
#if defined(_MSC_VER) || defined(__BORLANDC__) || defined (__BCPLUSPLUS__)
-# pragma pack( pop )
+# pragma pack( pop )
#endif
#undef PACK_STRUCT
diff --git a/3rdparty/assimp/include/Compiler/pushpack1.h b/3rdparty/assimp/include/Compiler/pushpack1.h
index 9cfc655c2..b89a8ff71 100644
--- a/3rdparty/assimp/include/Compiler/pushpack1.h
+++ b/3rdparty/assimp/include/Compiler/pushpack1.h
@@ -18,23 +18,23 @@
// ===============================================================================
#ifdef AI_PUSHPACK_IS_DEFINED
-# error poppack1.h must be included after pushpack1.h
+# error poppack1.h must be included after pushpack1.h
#endif
-#if defined(_MSC_VER) || defined(__BORLANDC__) || defined (__BCPLUSPLUS__)
-# pragma pack(push,1)
-# define PACK_STRUCT
+#if defined(_MSC_VER) || defined(__BORLANDC__) || defined (__BCPLUSPLUS__)
+# pragma pack(push,1)
+# define PACK_STRUCT
#elif defined( __GNUC__ )
-# define PACK_STRUCT __attribute__((packed))
+# define PACK_STRUCT __attribute__((packed))
#else
-# define PACK_STRUCT
-//# error Compiler not supported
+# define PACK_STRUCT
+//# error Compiler not supported
#endif
#if defined(_MSC_VER)
// C4103: Packing was changed after the inclusion of the header, propably missing #pragma pop
-# pragma warning (disable : 4103)
+# pragma warning (disable : 4103)
#endif
#define AI_PUSHPACK_IS_DEFINED
diff --git a/3rdparty/assimp/include/DefaultLogger.h b/3rdparty/assimp/include/DefaultLogger.h
index 62b346270..6d939d6a8 100644
--- a/3rdparty/assimp/include/DefaultLogger.h
+++ b/3rdparty/assimp/include/DefaultLogger.h
@@ -48,7 +48,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "NullLogger.h"
#include <vector>
-namespace Assimp {
+namespace Assimp {
// ------------------------------------------------------------------------------------
class IOStream;
struct LogStreamInfo;
@@ -70,7 +70,7 @@ struct LogStreamInfo;
* implementation of #Logger to #set().
* @note The whole logging stuff causes a small extra overhead for all imports. */
class ASSIMP_API DefaultLogger :
- public Logger {
+ public Logger {
public:
@@ -78,7 +78,7 @@ public:
/** @brief Creates a logging instance.
* @param name Name for log file. Only valid in combination
* with the aiDefaultLogStream_FILE flag.
- * @param severity Log severity, VERBOSE turns on debug messages
+ * @param severity Log severity, VERBOSE turns on debug messages
* @param defStreams Default log streams to be attached. Any bitwise
* combination of the aiDefaultLogStream enumerated values.
* If #aiDefaultLogStream_FILE is specified but an empty string is
@@ -89,7 +89,7 @@ public:
static Logger *create(const char* name = ASSIMP_DEFAULT_LOG_NAME,
LogSeverity severity = NORMAL,
unsigned int defStreams = aiDefaultLogStream_DEBUGGER | aiDefaultLogStream_FILE,
- IOSystem* io = NULL);
+ IOSystem* io = NULL);
// ----------------------------------------------------------------------
/** @brief Setup a custom #Logger implementation.
@@ -102,8 +102,8 @@ public:
static void set (Logger *logger);
// ----------------------------------------------------------------------
- /** @brief Getter for singleton instance
- * @return Only instance. This is never null, but it could be a
+ /** @brief Getter for singleton instance
+ * @return Only instance. This is never null, but it could be a
* NullLogger. Use isNullLogger to check this.*/
static Logger *get();
@@ -115,17 +115,17 @@ public:
static bool isNullLogger();
// ----------------------------------------------------------------------
- /** @brief Kills the current singleton logger and replaces it with a
+ /** @brief Kills the current singleton logger and replaces it with a
* #NullLogger instance. */
static void kill();
// ----------------------------------------------------------------------
- /** @copydoc Logger::attachStream */
+ /** @copydoc Logger::attachStream */
bool attachStream(LogStream *pStream,
unsigned int severity);
// ----------------------------------------------------------------------
- /** @copydoc Logger::detatchStream */
+ /** @copydoc Logger::detatchStream */
bool detatchStream(LogStream *pStream,
unsigned int severity);
@@ -138,46 +138,46 @@ private:
DefaultLogger(LogSeverity severity);
// ----------------------------------------------------------------------
- /** @briefDestructor */
+ /** @briefDestructor */
~DefaultLogger();
private:
- /** @brief Logs debug infos, only been written when severity level VERBOSE is set */
+ /** @brief Logs debug infos, only been written when severity level VERBOSE is set */
void OnDebug(const char* message);
- /** @brief Logs an info message */
+ /** @brief Logs an info message */
void OnInfo(const char* message);
- /** @brief Logs a warning message */
+ /** @brief Logs a warning message */
void OnWarn(const char* message);
- /** @brief Logs an error message */
+ /** @brief Logs an error message */
void OnError(const char* message);
// ----------------------------------------------------------------------
- /** @brief Writes a message to all streams */
+ /** @brief Writes a message to all streams */
void WriteToStreams(const char* message, ErrorSeverity ErrorSev );
// ----------------------------------------------------------------------
/** @brief Returns the thread id.
- * @note This is an OS specific feature, if not supported, a
+ * @note This is an OS specific feature, if not supported, a
* zero will be returned.
*/
unsigned int GetThreadID();
private:
- // Aliases for stream container
- typedef std::vector<LogStreamInfo*> StreamArray;
+ // Aliases for stream container
+ typedef std::vector<LogStreamInfo*> StreamArray;
typedef std::vector<LogStreamInfo*>::iterator StreamIt;
typedef std::vector<LogStreamInfo*>::const_iterator ConstStreamIt;
- //! only logging instance
+ //! only logging instance
static Logger *m_pLogger;
static NullLogger s_pNullLogger;
- //! Attached streams
- StreamArray m_StreamArray;
+ //! Attached streams
+ StreamArray m_StreamArray;
bool noRepeatMsg;
char lastMsg[MAX_LOG_MESSAGE_LENGTH*2];
diff --git a/3rdparty/assimp/include/IOStream.h b/3rdparty/assimp/include/IOStream.h
index cb3b04f11..22fdbde95 100644
--- a/3rdparty/assimp/include/IOStream.h
+++ b/3rdparty/assimp/include/IOStream.h
@@ -48,11 +48,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "aiTypes.h"
#ifndef __cplusplus
-# error This header requires C++ to be used. aiFileIO.h is the \
+# error This header requires C++ to be used. aiFileIO.h is the \
corresponding C interface.
#endif
-namespace Assimp {
+namespace Assimp {
// ----------------------------------------------------------------------------------
/** @brief CPP-API: Class to handle file I/O for C++
@@ -107,13 +107,13 @@ public:
virtual size_t Tell() const = 0;
// -------------------------------------------------------------------
- /** @brief Returns filesize
- * Returns the filesize. */
+ /** @brief Returns filesize
+ * Returns the filesize. */
virtual size_t FileSize() const = 0;
// -------------------------------------------------------------------
- /** @brief Flush the contents of the file buffer (for writers)
- * See fflush() for more details.
+ /** @brief Flush the contents of the file buffer (for writers)
+ * See fflush() for more details.
*/
virtual void Flush() = 0;
}; //! class IOStream
diff --git a/3rdparty/assimp/include/IOSystem.h b/3rdparty/assimp/include/IOSystem.h
index 4ff4b502a..f41dda903 100644
--- a/3rdparty/assimp/include/IOSystem.h
+++ b/3rdparty/assimp/include/IOSystem.h
@@ -48,12 +48,12 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define AI_IOSYSTEM_H_INC
#ifndef __cplusplus
-# error This header requires C++ to be used. aiFileIO.h is the \
+# error This header requires C++ to be used. aiFileIO.h is the \
corresponding C interface.
#endif
#include "aiTypes.h"
-namespace Assimp {
+namespace Assimp {
class IOStream;
// ---------------------------------------------------------------------------
@@ -105,8 +105,8 @@ public:
// -------------------------------------------------------------------
- /** @brief Returns the system specific directory separator
- * @return System specific directory separator
+ /** @brief Returns the system specific directory separator
+ * @return System specific directory separator
*/
virtual char getOsSeparator() const = 0;
diff --git a/3rdparty/assimp/include/LogStream.h b/3rdparty/assimp/include/LogStream.h
index 1754d6f5b..760a9f655 100644
--- a/3rdparty/assimp/include/LogStream.h
+++ b/3rdparty/assimp/include/LogStream.h
@@ -44,7 +44,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef INCLUDED_AI_LOGSTREAM_H
#define INCLUDED_AI_LOGSTREAM_H
#include "aiTypes.h"
-namespace Assimp {
+namespace Assimp {
class IOSystem;
// ------------------------------------------------------------------------------------
@@ -54,18 +54,18 @@ class IOSystem;
* details. Writing your own implementation of LogStream is just necessary if these
* are not enough for your purpose. */
class ASSIMP_API LogStream
- : public Intern::AllocateFromAssimpHeap {
+ : public Intern::AllocateFromAssimpHeap {
protected:
- /** @brief Default constructor */
+ /** @brief Default constructor */
LogStream() {
}
public:
- /** @brief Virtual destructor */
+ /** @brief Virtual destructor */
virtual ~LogStream() {
}
// -------------------------------------------------------------------
- /** @brief Overwrite this for your own output methods
+ /** @brief Overwrite this for your own output methods
*
* Log messages *may* consist of multiple lines and you shouldn't
* expect a consistent formatting. If you want custom formatting
diff --git a/3rdparty/assimp/include/Logger.h b/3rdparty/assimp/include/Logger.h
index 6b8ba5f90..94a421418 100644
--- a/3rdparty/assimp/include/Logger.h
+++ b/3rdparty/assimp/include/Logger.h
@@ -45,34 +45,34 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define INCLUDED_AI_LOGGER_H
#include "aiTypes.h"
-namespace Assimp {
+namespace Assimp {
class LogStream;
// Maximum length of a log message. Longer messages are rejected.
#define MAX_LOG_MESSAGE_LENGTH 1024u
// ----------------------------------------------------------------------------------
-/** @brief CPP-API: Abstract interface for logger implementations.
+/** @brief CPP-API: Abstract interface for logger implementations.
* Assimp provides a default implementation and uses it for almost all
* logging stuff ('DefaultLogger'). This class defines just basic logging
* behaviour and is not of interest for you. Instead, take a look at #DefaultLogger. */
class ASSIMP_API Logger
- : public Intern::AllocateFromAssimpHeap {
+ : public Intern::AllocateFromAssimpHeap {
public:
// ----------------------------------------------------------------------
- /** @enum LogSeverity
- * @brief Log severity to describe the granularity of logging.
+ /** @enum LogSeverity
+ * @brief Log severity to describe the granularity of logging.
*/
enum LogSeverity
{
- NORMAL, //!< Normal granularity of logging
- VERBOSE //!< Debug infos will be logged, too
+ NORMAL, //!< Normal granularity of logging
+ VERBOSE //!< Debug infos will be logged, too
};
// ----------------------------------------------------------------------
- /** @enum ErrorSeverity
- * @brief Description for severity of a log message.
+ /** @enum ErrorSeverity
+ * @brief Description for severity of a log message.
*
* Every LogStream has a bitwise combination of these flags.
* A LogStream doesn't receive any messages of a specific type
@@ -80,40 +80,40 @@ public:
*/
enum ErrorSeverity
{
- DEBUGGING = 1, //!< Debug log message
- INFO = 2, //!< Info log message
- WARN = 4, //!< Warn log message
- ERR = 8 //!< Error log message
+ DEBUGGING = 1, //!< Debug log message
+ INFO = 2, //!< Info log message
+ WARN = 4, //!< Warn log message
+ ERR = 8 //!< Error log message
};
public:
- /** @brief Virtual destructor */
+ /** @brief Virtual destructor */
virtual ~Logger();
// ----------------------------------------------------------------------
- /** @brief Writes a debug message
- * @param message Debug message*/
+ /** @brief Writes a debug message
+ * @param message Debug message*/
void debug(const std::string &message);
// ----------------------------------------------------------------------
- /** @brief Writes a info message
- * @param message Info message*/
+ /** @brief Writes a info message
+ * @param message Info message*/
void info(const std::string &message);
// ----------------------------------------------------------------------
- /** @brief Writes a warning message
- * @param message Warn message*/
+ /** @brief Writes a warning message
+ * @param message Warn message*/
void warn(const std::string &message);
// ----------------------------------------------------------------------
- /** @brief Writes an error message
- * @param message Error message*/
+ /** @brief Writes an error message
+ * @param message Error message*/
void error(const std::string &message);
// ----------------------------------------------------------------------
- /** @brief Set a new log severity.
- * @param log_severity New severity for logging*/
+ /** @brief Set a new log severity.
+ * @param log_severity New severity for logging*/
void setLogSeverity(LogSeverity log_severity);
// ----------------------------------------------------------------------
@@ -121,13 +121,13 @@ public:
LogSeverity getLogSeverity() const;
// ----------------------------------------------------------------------
- /** @brief Attach a new logstream
+ /** @brief Attach a new logstream
*
* The logger takes ownership of the stream and is responsible
* for its destruction (which is done using ::delete when the logger
* itself is destroyed). Call detachStream to detach a stream and to
* gain ownership of it again.
- * @param pStream Logstream to attach
+ * @param pStream Logstream to attach
* @param severity Message filter, specified which types of log
* messages are dispatched to the stream. Provide a bitwise
* combination of the ErrorSeverity flags.
@@ -136,9 +136,9 @@ public:
unsigned int severity = DEBUGGING | ERR | WARN | INFO) = 0;
// ----------------------------------------------------------------------
- /** @brief Detach a still attached stream from the logger (or
+ /** @brief Detach a still attached stream from the logger (or
* modify the filter flags bits)
- * @param pStream Logstream instance for detaching
+ * @param pStream Logstream instance for detaching
* @param severity Provide a bitwise combination of the ErrorSeverity
* flags. This value is &~ed with the current flags of the stream,
* if the result is 0 the stream is detached from the Logger and
@@ -157,7 +157,7 @@ protected:
// ----------------------------------------------------------------------
/** @brief Called as a request to write a specific debug message
- * @param message Debug message. Never longer than
+ * @param message Debug message. Never longer than
* MAX_LOG_MESSAGE_LENGTH characters (exluding the '0').
* @note The message string is only valid until the scope of
* the function is left.
@@ -166,7 +166,7 @@ protected:
// ----------------------------------------------------------------------
/** @brief Called as a request to write a specific info message
- * @param message Info message. Never longer than
+ * @param message Info message. Never longer than
* MAX_LOG_MESSAGE_LENGTH characters (exluding the '0').
* @note The message string is only valid until the scope of
* the function is left.
@@ -175,7 +175,7 @@ protected:
// ----------------------------------------------------------------------
/** @brief Called as a request to write a specific warn message
- * @param message Warn message. Never longer than
+ * @param message Warn message. Never longer than
* MAX_LOG_MESSAGE_LENGTH characters (exluding the '0').
* @note The message string is only valid until the scope of
* the function is left.
@@ -184,7 +184,7 @@ protected:
// ----------------------------------------------------------------------
/** @brief Called as a request to write a specific error message
- * @param message Error message. Never longer than
+ * @param message Error message. Never longer than
* MAX_LOG_MESSAGE_LENGTH characters (exluding the '0').
* @note The message string is only valid until the scope of
* the function is left.
@@ -193,25 +193,25 @@ protected:
protected:
- //! Logger severity
+ //! Logger severity
LogSeverity m_Severity;
};
// ----------------------------------------------------------------------------------
-// Default constructor
-inline Logger::Logger() {
+// Default constructor
+inline Logger::Logger() {
setLogSeverity(NORMAL);
}
// ----------------------------------------------------------------------------------
-// Virtual destructor
+// Virtual destructor
inline Logger::~Logger()
{
}
// ----------------------------------------------------------------------------------
// Construction with given logging severity
-inline Logger::Logger(LogSeverity severity) {
+inline Logger::Logger(LogSeverity severity) {
setLogSeverity(severity);
}
diff --git a/3rdparty/assimp/include/NullLogger.h b/3rdparty/assimp/include/NullLogger.h
index a7e9f58eb..152abafaf 100644
--- a/3rdparty/assimp/include/NullLogger.h
+++ b/3rdparty/assimp/include/NullLogger.h
@@ -46,44 +46,44 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define INCLUDED_AI_NULLLOGGER_H
#include "Logger.h"
-namespace Assimp {
+namespace Assimp {
// ---------------------------------------------------------------------------
/** @brief CPP-API: Empty logging implementation.
*
* Does nothing! Used by default if the application hasn't requested a
* custom logger via #DefaultLogger::set() or #DefaultLogger::create(); */
class ASSIMP_API NullLogger
- : public Logger {
+ : public Logger {
public:
- /** @brief Logs a debug message */
+ /** @brief Logs a debug message */
void OnDebug(const char* message) {
(void)message; //this avoids compiler warnings
}
- /** @brief Logs an info message */
+ /** @brief Logs an info message */
void OnInfo(const char* message) {
(void)message; //this avoids compiler warnings
}
- /** @brief Logs a warning message */
+ /** @brief Logs a warning message */
void OnWarn(const char* message) {
(void)message; //this avoids compiler warnings
}
- /** @brief Logs an error message */
+ /** @brief Logs an error message */
void OnError(const char* message) {
(void)message; //this avoids compiler warnings
}
- /** @brief Detach a still attached stream from logger */
+ /** @brief Detach a still attached stream from logger */
bool attachStream(LogStream *pStream, unsigned int severity) {
(void)pStream; (void)severity; //this avoids compiler warnings
return false;
}
- /** @brief Detach a still attached stream from logger */
+ /** @brief Detach a still attached stream from logger */
bool detatchStream(LogStream *pStream, unsigned int severity) {
(void)pStream; (void)severity; //this avoids compiler warnings
return false;
diff --git a/3rdparty/assimp/include/ProgressHandler.h b/3rdparty/assimp/include/ProgressHandler.h
index 62ec749b1..24c393d38 100644
--- a/3rdparty/assimp/include/ProgressHandler.h
+++ b/3rdparty/assimp/include/ProgressHandler.h
@@ -44,7 +44,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef INCLUDED_AI_PROGRESSHANDLER_H
#define INCLUDED_AI_PROGRESSHANDLER_H
#include "aiTypes.h"
-namespace Assimp {
+namespace Assimp {
// ------------------------------------------------------------------------------------
/** @brief CPP-API: Abstract interface for custom progress report receivers.
@@ -52,13 +52,13 @@ namespace Assimp {
* Each #Importer instance maintains its own #ProgressHandler. The default
* implementation provided by Assimp doesn't do anything at all. */
class ASSIMP_API ProgressHandler
- : public Intern::AllocateFromAssimpHeap {
+ : public Intern::AllocateFromAssimpHeap {
protected:
- /** @brief Default constructor */
+ /** @brief Default constructor */
ProgressHandler () {
}
public:
- /** @brief Virtual destructor */
+ /** @brief Virtual destructor */
virtual ~ProgressHandler () {
}
diff --git a/3rdparty/assimp/include/aiAnim.h b/3rdparty/assimp/include/aiAnim.h
index e4e4d21a0..a9e9a491d 100644
--- a/3rdparty/assimp/include/aiAnim.h
+++ b/3rdparty/assimp/include/aiAnim.h
@@ -70,8 +70,8 @@ struct aiVectorKey
//! Construction from a given time and key value
aiVectorKey(double time, const aiVector3D& value)
- : mTime (time)
- , mValue (value)
+ : mTime (time)
+ , mValue (value)
{}
@@ -112,8 +112,8 @@ struct aiQuatKey
/** Construction from a given time and key value */
aiQuatKey(double time, const aiQuaternion& value)
- : mTime (time)
- , mValue (value)
+ : mTime (time)
+ , mValue (value)
{}
typedef aiQuaternion elem_type;
@@ -156,8 +156,8 @@ struct aiMeshKey
/** Construction from a given time and key value */
aiMeshKey(double time, const unsigned int value)
- : mTime (time)
- , mValue (value)
+ : mTime (time)
+ , mValue (value)
{}
typedef unsigned int elem_type;
@@ -381,14 +381,14 @@ struct aiAnimation
~aiAnimation()
{
// DO NOT REMOVE THIS ADDITIONAL CHECK
- if (mNumChannels && mChannels) {
+ if (mNumChannels && mChannels) {
for ( unsigned int a = 0; a < mNumChannels; a++) {
delete mChannels[a];
}
delete [] mChannels;
}
- if (mNumMeshChannels && mMeshChannels) {
+ if (mNumMeshChannels && mMeshChannels) {
for ( unsigned int a = 0; a < mNumMeshChannels; a++) {
delete mMeshChannels[a];
}
@@ -428,7 +428,7 @@ struct Interpolator
//! @cond Never
template <>
-struct Interpolator <aiQuaternion> {
+struct Interpolator <aiQuaternion> {
void operator () (aiQuaternion& out,const aiQuaternion& a,
const aiQuaternion& b, float d) const
{
@@ -437,7 +437,7 @@ struct Interpolator <aiQuaternion> {
}; // ! Interpolator <aiQuaternion>
template <>
-struct Interpolator <unsigned int> {
+struct Interpolator <unsigned int> {
void operator () (unsigned int& out,unsigned int a,
unsigned int b, float d) const
{
@@ -446,7 +446,7 @@ struct Interpolator <unsigned int> {
}; // ! Interpolator <aiQuaternion>
template <>
-struct Interpolator <aiVectorKey> {
+struct Interpolator <aiVectorKey> {
void operator () (aiVector3D& out,const aiVectorKey& a,
const aiVectorKey& b, float d) const
{
@@ -456,7 +456,7 @@ struct Interpolator <aiVectorKey> {
}; // ! Interpolator <aiVectorKey>
template <>
-struct Interpolator <aiQuatKey> {
+struct Interpolator <aiQuatKey> {
void operator () (aiQuaternion& out, const aiQuatKey a,
const aiQuatKey& b, float d) const
{
@@ -466,7 +466,7 @@ struct Interpolator <aiQuatKey> {
}; // ! Interpolator <aiQuatKey>
template <>
-struct Interpolator <aiMeshKey> {
+struct Interpolator <aiMeshKey> {
void operator () (unsigned int& out, const aiMeshKey a,
const aiMeshKey& b, float d) const
{
diff --git a/3rdparty/assimp/include/aiAssert.h b/3rdparty/assimp/include/aiAssert.h
index b2b04417a..5e00d8466 100644
--- a/3rdparty/assimp/include/aiAssert.h
+++ b/3rdparty/assimp/include/aiAssert.h
@@ -11,20 +11,20 @@
namespace Assimp {
-//! \brief ASSIMP specific assertion test, only works in debug mode
-//! \param uiLine Line in file
-//! \param file Source file
+//! \brief ASSIMP specific assertion test, only works in debug mode
+//! \param uiLine Line in file
+//! \param file Source file
AI_WONT_RETURN void aiAssert(const std::string &message, unsigned int uiLine, const std::string &file);
-//! \def ai_assert
-//! \brief ASSIMP specific assertion test
+//! \def ai_assert
+//! \brief ASSIMP specific assertion test
#ifdef DEBUG
-# define ai_assert(expression) if ( !(expression)) Assimp::aiAssert( #expression, __LINE__, __FILE__);
+# define ai_assert(expression) if ( !(expression)) Assimp::aiAssert( #expression, __LINE__, __FILE__);
#else
-# define ai_assert(expression) (void)(expression);
+# define ai_assert(expression)
#endif
-} // Namespace Assimp
+} // Namespace Assimp
#endif
diff --git a/3rdparty/assimp/include/aiCamera.h b/3rdparty/assimp/include/aiCamera.h
index 613b7fb90..8f3d0a714 100644
--- a/3rdparty/assimp/include/aiCamera.h
+++ b/3rdparty/assimp/include/aiCamera.h
@@ -172,12 +172,12 @@ struct aiCamera
#ifdef __cplusplus
aiCamera()
- : mUp (0.f,1.f,0.f)
- , mLookAt (0.f,0.f,1.f)
- , mHorizontalFOV (0.25f * (float)AI_MATH_PI)
- , mClipPlaneNear (0.1f)
- , mClipPlaneFar (1000.f)
- , mAspect (0.f)
+ : mUp (0.f,1.f,0.f)
+ , mLookAt (0.f,0.f,1.f)
+ , mHorizontalFOV (0.25f * (float)AI_MATH_PI)
+ , mClipPlaneNear (0.1f)
+ , mClipPlaneFar (1000.f)
+ , mAspect (0.f)
{}
/** @brief Get a *right-handed* camera matrix from me
diff --git a/3rdparty/assimp/include/aiColor4D.inl b/3rdparty/assimp/include/aiColor4D.inl
index 9e955da0e..a4985ead5 100644
--- a/3rdparty/assimp/include/aiColor4D.inl
+++ b/3rdparty/assimp/include/aiColor4D.inl
@@ -81,56 +81,56 @@ AI_FORCE_INLINE bool aiColor4D::operator!= (const aiColor4D& other) const {
return r != other.r || g != other.g || b != other.b || a != other.a;
}
// ------------------------------------------------------------------------------------------------
-AI_FORCE_INLINE aiColor4D operator + (const aiColor4D& v1, const aiColor4D& v2) {
+AI_FORCE_INLINE aiColor4D operator + (const aiColor4D& v1, const aiColor4D& v2) {
return aiColor4D( v1.r + v2.r, v1.g + v2.g, v1.b + v2.b, v1.a + v2.a);
}
// ------------------------------------------------------------------------------------------------
-AI_FORCE_INLINE aiColor4D operator - (const aiColor4D& v1, const aiColor4D& v2) {
+AI_FORCE_INLINE aiColor4D operator - (const aiColor4D& v1, const aiColor4D& v2) {
return aiColor4D( v1.r - v2.r, v1.g - v2.g, v1.b - v2.b, v1.a - v2.a);
}
// ------------------------------------------------------------------------------------------------
-AI_FORCE_INLINE aiColor4D operator * (const aiColor4D& v1, const aiColor4D& v2) {
+AI_FORCE_INLINE aiColor4D operator * (const aiColor4D& v1, const aiColor4D& v2) {
return aiColor4D( v1.r * v2.r, v1.g * v2.g, v1.b * v2.b, v1.a * v2.a);
}
// ------------------------------------------------------------------------------------------------
-AI_FORCE_INLINE aiColor4D operator / (const aiColor4D& v1, const aiColor4D& v2) {
+AI_FORCE_INLINE aiColor4D operator / (const aiColor4D& v1, const aiColor4D& v2) {
return aiColor4D( v1.r / v2.r, v1.g / v2.g, v1.b / v2.b, v1.a / v2.a);
}
// ------------------------------------------------------------------------------------------------
-AI_FORCE_INLINE aiColor4D operator * ( float f, const aiColor4D& v) {
+AI_FORCE_INLINE aiColor4D operator * ( float f, const aiColor4D& v) {
return aiColor4D( f*v.r, f*v.g, f*v.b, f*v.a);
}
// ------------------------------------------------------------------------------------------------
-AI_FORCE_INLINE aiColor4D operator * ( const aiColor4D& v, float f) {
+AI_FORCE_INLINE aiColor4D operator * ( const aiColor4D& v, float f) {
return aiColor4D( f*v.r, f*v.g, f*v.b, f*v.a);
}
// ------------------------------------------------------------------------------------------------
-AI_FORCE_INLINE aiColor4D operator / ( const aiColor4D& v, float f) {
+AI_FORCE_INLINE aiColor4D operator / ( const aiColor4D& v, float f) {
return v * (1/f);
}
// ------------------------------------------------------------------------------------------------
-AI_FORCE_INLINE aiColor4D operator / ( float f,const aiColor4D& v) {
+AI_FORCE_INLINE aiColor4D operator / ( float f,const aiColor4D& v) {
return aiColor4D(f,f,f,f)/v;
}
// ------------------------------------------------------------------------------------------------
-AI_FORCE_INLINE aiColor4D operator + ( const aiColor4D& v, float f) {
+AI_FORCE_INLINE aiColor4D operator + ( const aiColor4D& v, float f) {
return aiColor4D( f+v.r, f+v.g, f+v.b, f+v.a);
}
// ------------------------------------------------------------------------------------------------
-AI_FORCE_INLINE aiColor4D operator - ( const aiColor4D& v, float f) {
+AI_FORCE_INLINE aiColor4D operator - ( const aiColor4D& v, float f) {
return aiColor4D( v.r-f, v.g-f, v.b-f, v.a-f);
}
// ------------------------------------------------------------------------------------------------
-AI_FORCE_INLINE aiColor4D operator + ( float f, const aiColor4D& v) {
+AI_FORCE_INLINE aiColor4D operator + ( float f, const aiColor4D& v) {
return aiColor4D( f+v.r, f+v.g, f+v.b, f+v.a);
}
// ------------------------------------------------------------------------------------------------
-AI_FORCE_INLINE aiColor4D operator - ( float f, const aiColor4D& v) {
+AI_FORCE_INLINE aiColor4D operator - ( float f, const aiColor4D& v) {
return aiColor4D( f-v.r, f-v.g, f-v.b, f-v.a);
}
// ------------------------------------------------------------------------------------------------
-inline bool aiColor4D :: IsBlack() const {
+inline bool aiColor4D :: IsBlack() const {
// The alpha component doesn't care here. black is black.
static const float epsilon = 10e-3f;
return fabs( r ) < epsilon && fabs( g ) < epsilon && fabs( b ) < epsilon;
diff --git a/3rdparty/assimp/include/aiConfig.h b/3rdparty/assimp/include/aiConfig.h
index a54c2413f..e53a2870f 100644
--- a/3rdparty/assimp/include/aiConfig.h
+++ b/3rdparty/assimp/include/aiConfig.h
@@ -139,7 +139,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* a default palette (from Quake 1) is used.
* Property type: string.
*/
-#define AI_CONFIG_IMPORT_MDL_COLORMAP \
+#define AI_CONFIG_IMPORT_MDL_COLORMAP \
"IMPORT_MDL_COLORMAP"
// ---------------------------------------------------------------------------
@@ -161,7 +161,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* @note Linefeeds, tabs or carriage returns are treated as whitespace.
* Material names are case sensitive.
*/
-#define AI_CONFIG_PP_RRM_EXCLUDE_LIST \
+#define AI_CONFIG_PP_RRM_EXCLUDE_LIST \
"PP_RRM_EXCLUDE_LIST"
// ---------------------------------------------------------------------------
@@ -176,7 +176,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* any transformations.
* Property type: bool. Default value: false.
*/
-#define AI_CONFIG_PP_PTV_KEEP_HIERARCHY \
+#define AI_CONFIG_PP_PTV_KEEP_HIERARCHY \
"PP_PTV_KEEP_HIERARCHY"
// ---------------------------------------------------------------------------
@@ -186,7 +186,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* meshes are scaled appropriately (uniformly of course!).
* This might be useful if you don't know the spatial dimension of the input
* data*/
-#define AI_CONFIG_PP_PTV_NORMALIZE \
+#define AI_CONFIG_PP_PTV_NORMALIZE \
"PP_PTV_NORMALIZE"
// ---------------------------------------------------------------------------
@@ -220,7 +220,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* @note Linefeeds, tabs or carriage returns are treated as whitespace.
* Node names are case sensitive.
*/
-#define AI_CONFIG_PP_OG_EXCLUDE_LIST \
+#define AI_CONFIG_PP_OG_EXCLUDE_LIST \
"PP_OG_EXCLUDE_LIST"
// ---------------------------------------------------------------------------
@@ -231,12 +231,12 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* @note The default value is AI_SLM_DEFAULT_MAX_TRIANGLES
* Property type: integer.
*/
-#define AI_CONFIG_PP_SLM_TRIANGLE_LIMIT \
+#define AI_CONFIG_PP_SLM_TRIANGLE_LIMIT \
"PP_SLM_TRIANGLE_LIMIT"
// default value for AI_CONFIG_PP_SLM_TRIANGLE_LIMIT
#if (!defined AI_SLM_DEFAULT_MAX_TRIANGLES)
-# define AI_SLM_DEFAULT_MAX_TRIANGLES 1000000
+# define AI_SLM_DEFAULT_MAX_TRIANGLES 1000000
#endif
// ---------------------------------------------------------------------------
@@ -252,7 +252,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// default value for AI_CONFIG_PP_SLM_VERTEX_LIMIT
#if (!defined AI_SLM_DEFAULT_MAX_VERTICES)
-# define AI_SLM_DEFAULT_MAX_VERTICES 1000000
+# define AI_SLM_DEFAULT_MAX_VERTICES 1000000
#endif
// ---------------------------------------------------------------------------
@@ -261,18 +261,18 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* This is used by the #aiProcess_LimitBoneWeights PostProcess-Step.
* @note The default value is AI_LBW_MAX_WEIGHTS
* Property type: integer.*/
-#define AI_CONFIG_PP_LBW_MAX_WEIGHTS \
+#define AI_CONFIG_PP_LBW_MAX_WEIGHTS \
"PP_LBW_MAX_WEIGHTS"
// default value for AI_CONFIG_PP_LBW_MAX_WEIGHTS
#if (!defined AI_LMW_MAX_WEIGHTS)
-# define AI_LMW_MAX_WEIGHTS 0x4
+# define AI_LMW_MAX_WEIGHTS 0x4
#endif // !! AI_LMW_MAX_WEIGHTS
/** @brief Default value for the #AI_CONFIG_PP_ICL_PTCACHE_SIZE property
*/
#ifndef PP_ICL_PTCACHE_SIZE
-# define PP_ICL_PTCACHE_SIZE 12
+# define PP_ICL_PTCACHE_SIZE 12
#endif
// ---------------------------------------------------------------------------
@@ -286,7 +286,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* performance improvements for most nVidia/AMD cards since 2002.
* Property type: integer.
*/
-#define AI_CONFIG_PP_ICL_PTCACHE_SIZE "PP_ICL_PTCACHE_SIZE"
+#define AI_CONFIG_PP_ICL_PTCACHE_SIZE "PP_ICL_PTCACHE_SIZE"
// ---------------------------------------------------------------------------
/** @brief Enumerates components of the aiScene and aiMesh data structures
@@ -374,7 +374,7 @@ enum aiComponent
* of the flags defined above) the import FAILS. Mainly because there is
* no data to work on anymore ...
*/
-#define AI_CONFIG_PP_RVC_FLAGS \
+#define AI_CONFIG_PP_RVC_FLAGS \
"PP_RVC_FLAGS"
// ---------------------------------------------------------------------------
@@ -386,7 +386,7 @@ enum aiComponent
* be to exclude all line and point meshes from the import. This
* is an integer property, its default value is 0.
*/
-#define AI_CONFIG_PP_SBP_REMOVE \
+#define AI_CONFIG_PP_SBP_REMOVE \
"PP_SBP_REMOVE"
// ---------------------------------------------------------------------------
@@ -398,7 +398,7 @@ enum aiComponent
* abs(n0-n1)>epsilon holds true for all vector respectively quaternion
* components. The default value is 0.f - comparisons are exact then.
*/
-#define AI_CONFIG_PP_FID_ANIM_ACCURACY \
+#define AI_CONFIG_PP_FID_ANIM_ACCURACY \
"PP_FID_ANIM_ACCURACY"
@@ -422,7 +422,7 @@ enum aiComponent
* property, of course). By default all transformations are enabled
* (AI_UVTRAFO_ALL).
*/
-#define AI_CONFIG_PP_TUV_EVALUATE \
+#define AI_CONFIG_PP_TUV_EVALUATE \
"PP_TUV_EVALUATE"
// ---------------------------------------------------------------------------
@@ -434,7 +434,7 @@ enum aiComponent
* This property is expected to be an integer, != 0 stands for true.
* The default value is 0.
*/
-#define AI_CONFIG_FAVOUR_SPEED \
+#define AI_CONFIG_FAVOUR_SPEED \
"FAVOUR_SPEED"
@@ -457,14 +457,14 @@ enum aiComponent
* want to override the global setting).
* Property type: integer.
*/
-#define AI_CONFIG_IMPORT_GLOBAL_KEYFRAME "IMPORT_GLOBAL_KEYFRAME"
+#define AI_CONFIG_IMPORT_GLOBAL_KEYFRAME "IMPORT_GLOBAL_KEYFRAME"
-#define AI_CONFIG_IMPORT_MD3_KEYFRAME "IMPORT_MD3_KEYFRAME"
-#define AI_CONFIG_IMPORT_MD2_KEYFRAME "IMPORT_MD2_KEYFRAME"
-#define AI_CONFIG_IMPORT_MDL_KEYFRAME "IMPORT_MDL_KEYFRAME"
-#define AI_CONFIG_IMPORT_MDC_KEYFRAME "IMPORT_MDC_KEYFRAME"
-#define AI_CONFIG_IMPORT_SMD_KEYFRAME "IMPORT_SMD_KEYFRAME"
-#define AI_CONFIG_IMPORT_UNREAL_KEYFRAME "IMPORT_UNREAL_KEYFRAME"
+#define AI_CONFIG_IMPORT_MD3_KEYFRAME "IMPORT_MD3_KEYFRAME"
+#define AI_CONFIG_IMPORT_MD2_KEYFRAME "IMPORT_MD2_KEYFRAME"
+#define AI_CONFIG_IMPORT_MDL_KEYFRAME "IMPORT_MDL_KEYFRAME"
+#define AI_CONFIG_IMPORT_MDC_KEYFRAME "IMPORT_MDC_KEYFRAME"
+#define AI_CONFIG_IMPORT_SMD_KEYFRAME "IMPORT_SMD_KEYFRAME"
+#define AI_CONFIG_IMPORT_UNREAL_KEYFRAME "IMPORT_UNREAL_KEYFRAME"
// ---------------------------------------------------------------------------
@@ -473,7 +473,7 @@ enum aiComponent
*
* Property type: bool. Default value: true.
*/
-#define AI_CONFIG_IMPORT_AC_SEPARATE_BFCULL \
+#define AI_CONFIG_IMPORT_AC_SEPARATE_BFCULL \
"IMPORT_AC_SEPARATE_BFCULL"
// ---------------------------------------------------------------------------
@@ -484,7 +484,7 @@ enum aiComponent
*
* * Property type: bool. Default value: true.
*/
-#define AI_CONFIG_IMPORT_AC_EVAL_SUBDIVISION \
+#define AI_CONFIG_IMPORT_AC_EVAL_SUBDIVISION \
"IMPORT_AC_EVAL_SUBDIVISION"
// ---------------------------------------------------------------------------
@@ -511,12 +511,12 @@ enum aiComponent
// ---------------------------------------------------------------------------
/** @brief Configures the ASE loader to always reconstruct normal vectors
- * basing on the smoothing groups loaded from the file.
+ * basing on the smoothing groups loaded from the file.
*
* Some ASE files have carry invalid normals, other don't.
* * Property type: bool. Default value: true.
*/
-#define AI_CONFIG_IMPORT_ASE_RECONSTRUCT_NORMALS \
+#define AI_CONFIG_IMPORT_ASE_RECONSTRUCT_NORMALS \
"IMPORT_ASE_RECONSTRUCT_NORMALS"
// ---------------------------------------------------------------------------
@@ -572,7 +572,7 @@ enum aiComponent
* layer name may not be empty.<br>
* Property type: Integer. Default value: all layers are loaded.
*/
-#define AI_CONFIG_IMPORT_LWO_ONE_LAYER_ONLY \
+#define AI_CONFIG_IMPORT_LWO_ONE_LAYER_ONLY \
"IMPORT_LWO_ONE_LAYER_ONLY"
// ---------------------------------------------------------------------------
@@ -586,7 +586,7 @@ enum aiComponent
*
* * Property type: bool. Default value: false.
*/
-#define AI_CONFIG_IMPORT_MD5_NO_ANIM_AUTOLOAD \
+#define AI_CONFIG_IMPORT_MD5_NO_ANIM_AUTOLOAD \
"IMPORT_MD5_NO_ANIM_AUTOLOAD"
// ---------------------------------------------------------------------------
@@ -605,9 +605,9 @@ enum aiComponent
*
* @see AI_CONFIG_IMPORT_LWS_ANIM_END - end of the imported time range
*/
-#define AI_CONFIG_IMPORT_LWS_ANIM_START \
+#define AI_CONFIG_IMPORT_LWS_ANIM_START \
"IMPORT_LWS_ANIM_START"
-#define AI_CONFIG_IMPORT_LWS_ANIM_END \
+#define AI_CONFIG_IMPORT_LWS_ANIM_END \
"IMPORT_LWS_ANIM_END"
// ---------------------------------------------------------------------------
@@ -618,7 +618,7 @@ enum aiComponent
* are returned by the converter.<br>
* Property type: integer. Default value: 100
*/
-#define AI_CONFIG_IMPORT_IRR_ANIM_FPS \
+#define AI_CONFIG_IMPORT_IRR_ANIM_FPS \
"IMPORT_IRR_ANIM_FPS"
diff --git a/3rdparty/assimp/include/aiLight.h b/3rdparty/assimp/include/aiLight.h
index 1e080a85c..9d1ab10e3 100644
--- a/3rdparty/assimp/include/aiLight.h
+++ b/3rdparty/assimp/include/aiLight.h
@@ -213,12 +213,12 @@ struct aiLight
#ifdef __cplusplus
aiLight()
- : mType (aiLightSource_UNDEFINED)
- , mAttenuationConstant (0.f)
+ : mType (aiLightSource_UNDEFINED)
+ , mAttenuationConstant (0.f)
, mAttenuationLinear (1.f)
, mAttenuationQuadratic (0.f)
- , mAngleInnerCone ((float)AI_MATH_TWO_PI)
- , mAngleOuterCone ((float)AI_MATH_TWO_PI)
+ , mAngleInnerCone ((float)AI_MATH_TWO_PI)
+ , mAngleOuterCone ((float)AI_MATH_TWO_PI)
{
}
diff --git a/3rdparty/assimp/include/aiMaterial.h b/3rdparty/assimp/include/aiMaterial.h
index 47b594566..34914d234 100644
--- a/3rdparty/assimp/include/aiMaterial.h
+++ b/3rdparty/assimp/include/aiMaterial.h
@@ -330,7 +330,7 @@ enum aiShadingMode
/** Simple Gouraud shading.
*/
- aiShadingMode_Gouraud = 0x2,
+ aiShadingMode_Gouraud = 0x2,
/** Phong-Shading -
*/
@@ -338,7 +338,7 @@ enum aiShadingMode
/** Phong-Blinn-Shading
*/
- aiShadingMode_Blinn = 0x4,
+ aiShadingMode_Blinn = 0x4,
/** Toon-Shading per pixel
*
@@ -518,8 +518,8 @@ struct aiUVTransform
#ifdef __cplusplus
aiUVTransform()
- : mScaling (1.f,1.f)
- , mRotation (0.f)
+ : mScaling (1.f,1.f)
+ , mRotation (0.f)
{
// nothing to be done here ...
}
@@ -611,7 +611,7 @@ struct aiMaterialProperty
*/
unsigned int mIndex;
- /** Size of the buffer mData is pointing to, in bytes.
+ /** Size of the buffer mData is pointing to, in bytes.
* This value may not be 0.
*/
unsigned int mDataLength;
@@ -625,19 +625,19 @@ struct aiMaterialProperty
*/
C_ENUM aiPropertyTypeInfo mType;
- /** Binary buffer to hold the property's value.
+ /** Binary buffer to hold the property's value.
* The size of the buffer is always mDataLength.
*/
char* mData;
#ifdef __cplusplus
- aiMaterialProperty() {
+ aiMaterialProperty() {
mData = NULL;
mIndex = mSemantic = 0;
}
- ~aiMaterialProperty() {
+ ~aiMaterialProperty() {
delete[] mData;
}
@@ -720,15 +720,15 @@ public:
* #GetTextureCount() can be used to determine the number of textures
* per texture type.
* @param path Receives the path to the texture.
- * NULL is a valid value.
+ * NULL is a valid value.
* @param mapping The texture mapping.
- * NULL is allowed as value.
+ * NULL is allowed as value.
* @param uvindex Receives the UV index of the texture.
* NULL is a valid value.
* @param blend Receives the blend factor for the texture
- * NULL is a valid value.
+ * NULL is a valid value.
* @param op Receives the texture operation to be performed between
- * this texture and the previous texture. NULL is allowed as value.
+ * this texture and the previous texture. NULL is allowed as value.
* @param mapmode Receives the mapping modes to be used for the texture.
* The parameter may be NULL but if it is a valid pointer it MUST
* point to an array of 3 aiTextureMapMode's (one for each
@@ -738,11 +738,11 @@ public:
aiReturn GetTexture(aiTextureType type,
unsigned int index,
C_STRUCT aiString* path,
- aiTextureMapping* mapping = NULL,
- unsigned int* uvindex = NULL,
- float* blend = NULL,
- aiTextureOp* op = NULL,
- aiTextureMapMode* mapmode = NULL) const;
+ aiTextureMapping* mapping = NULL,
+ unsigned int* uvindex = NULL,
+ float* blend = NULL,
+ aiTextureOp* op = NULL,
+ aiTextureMapMode* mapmode = NULL) const;
#endif
@@ -784,16 +784,16 @@ extern "C" {
// ---------------------------------------------------------------------------
// Pure key names for all texture-related properties
//! @cond MATS_DOC_FULL
-#define _AI_MATKEY_TEXTURE_BASE "$tex.file"
-#define _AI_MATKEY_UVWSRC_BASE "$tex.uvwsrc"
-#define _AI_MATKEY_TEXOP_BASE "$tex.op"
-#define _AI_MATKEY_MAPPING_BASE "$tex.mapping"
-#define _AI_MATKEY_TEXBLEND_BASE "$tex.blend"
-#define _AI_MATKEY_MAPPINGMODE_U_BASE "$tex.mapmodeu"
-#define _AI_MATKEY_MAPPINGMODE_V_BASE "$tex.mapmodev"
-#define _AI_MATKEY_TEXMAP_AXIS_BASE "$tex.mapaxis"
-#define _AI_MATKEY_UVTRANSFORM_BASE "$tex.uvtrafo"
-#define _AI_MATKEY_TEXFLAGS_BASE "$tex.flags"
+#define _AI_MATKEY_TEXTURE_BASE "$tex.file"
+#define _AI_MATKEY_UVWSRC_BASE "$tex.uvwsrc"
+#define _AI_MATKEY_TEXOP_BASE "$tex.op"
+#define _AI_MATKEY_MAPPING_BASE "$tex.mapping"
+#define _AI_MATKEY_TEXBLEND_BASE "$tex.blend"
+#define _AI_MATKEY_MAPPINGMODE_U_BASE "$tex.mapmodeu"
+#define _AI_MATKEY_MAPPINGMODE_V_BASE "$tex.mapmodev"
+#define _AI_MATKEY_TEXMAP_AXIS_BASE "$tex.mapaxis"
+#define _AI_MATKEY_UVTRANSFORM_BASE "$tex.uvtrafo"
+#define _AI_MATKEY_TEXFLAGS_BASE "$tex.flags"
//! @endcond
// ---------------------------------------------------------------------------
@@ -801,37 +801,37 @@ extern "C" {
// For backward compatibility and simplicity
//! @cond MATS_DOC_FULL
-#define AI_MATKEY_TEXTURE_DIFFUSE(N) \
+#define AI_MATKEY_TEXTURE_DIFFUSE(N) \
AI_MATKEY_TEXTURE(aiTextureType_DIFFUSE,N)
-#define AI_MATKEY_TEXTURE_SPECULAR(N) \
+#define AI_MATKEY_TEXTURE_SPECULAR(N) \
AI_MATKEY_TEXTURE(aiTextureType_SPECULAR,N)
-#define AI_MATKEY_TEXTURE_AMBIENT(N) \
+#define AI_MATKEY_TEXTURE_AMBIENT(N) \
AI_MATKEY_TEXTURE(aiTextureType_AMBIENT,N)
-#define AI_MATKEY_TEXTURE_EMISSIVE(N) \
+#define AI_MATKEY_TEXTURE_EMISSIVE(N) \
AI_MATKEY_TEXTURE(aiTextureType_EMISSIVE,N)
-#define AI_MATKEY_TEXTURE_NORMALS(N) \
+#define AI_MATKEY_TEXTURE_NORMALS(N) \
AI_MATKEY_TEXTURE(aiTextureType_NORMALS,N)
-#define AI_MATKEY_TEXTURE_HEIGHT(N) \
+#define AI_MATKEY_TEXTURE_HEIGHT(N) \
AI_MATKEY_TEXTURE(aiTextureType_HEIGHT,N)
-#define AI_MATKEY_TEXTURE_SHININESS(N) \
+#define AI_MATKEY_TEXTURE_SHININESS(N) \
AI_MATKEY_TEXTURE(aiTextureType_SHININESS,N)
-#define AI_MATKEY_TEXTURE_OPACITY(N) \
+#define AI_MATKEY_TEXTURE_OPACITY(N) \
AI_MATKEY_TEXTURE(aiTextureType_OPACITY,N)
-#define AI_MATKEY_TEXTURE_DISPLACEMENT(N) \
+#define AI_MATKEY_TEXTURE_DISPLACEMENT(N) \
AI_MATKEY_TEXTURE(aiTextureType_DISPLACEMENT,N)
-#define AI_MATKEY_TEXTURE_LIGHTMAP(N) \
+#define AI_MATKEY_TEXTURE_LIGHTMAP(N) \
AI_MATKEY_TEXTURE(aiTextureType_LIGHTMAP,N)
-#define AI_MATKEY_TEXTURE_REFLECTION(N) \
+#define AI_MATKEY_TEXTURE_REFLECTION(N) \
AI_MATKEY_TEXTURE(aiTextureType_REFLECTION,N)
//! @endcond
@@ -841,37 +841,37 @@ extern "C" {
// For backward compatibility and simplicity
//! @cond MATS_DOC_FULL
-#define AI_MATKEY_UVWSRC_DIFFUSE(N) \
+#define AI_MATKEY_UVWSRC_DIFFUSE(N) \
AI_MATKEY_UVWSRC(aiTextureType_DIFFUSE,N)
-#define AI_MATKEY_UVWSRC_SPECULAR(N) \
+#define AI_MATKEY_UVWSRC_SPECULAR(N) \
AI_MATKEY_UVWSRC(aiTextureType_SPECULAR,N)
-#define AI_MATKEY_UVWSRC_AMBIENT(N) \
+#define AI_MATKEY_UVWSRC_AMBIENT(N) \
AI_MATKEY_UVWSRC(aiTextureType_AMBIENT,N)
-#define AI_MATKEY_UVWSRC_EMISSIVE(N) \
+#define AI_MATKEY_UVWSRC_EMISSIVE(N) \
AI_MATKEY_UVWSRC(aiTextureType_EMISSIVE,N)
-#define AI_MATKEY_UVWSRC_NORMALS(N) \
+#define AI_MATKEY_UVWSRC_NORMALS(N) \
AI_MATKEY_UVWSRC(aiTextureType_NORMALS,N)
-#define AI_MATKEY_UVWSRC_HEIGHT(N) \
+#define AI_MATKEY_UVWSRC_HEIGHT(N) \
AI_MATKEY_UVWSRC(aiTextureType_HEIGHT,N)
-#define AI_MATKEY_UVWSRC_SHININESS(N) \
+#define AI_MATKEY_UVWSRC_SHININESS(N) \
AI_MATKEY_UVWSRC(aiTextureType_SHININESS,N)
-#define AI_MATKEY_UVWSRC_OPACITY(N) \
+#define AI_MATKEY_UVWSRC_OPACITY(N) \
AI_MATKEY_UVWSRC(aiTextureType_OPACITY,N)
-#define AI_MATKEY_UVWSRC_DISPLACEMENT(N) \
+#define AI_MATKEY_UVWSRC_DISPLACEMENT(N) \
AI_MATKEY_UVWSRC(aiTextureType_DISPLACEMENT,N)
-#define AI_MATKEY_UVWSRC_LIGHTMAP(N) \
+#define AI_MATKEY_UVWSRC_LIGHTMAP(N) \
AI_MATKEY_UVWSRC(aiTextureType_LIGHTMAP,N)
-#define AI_MATKEY_UVWSRC_REFLECTION(N) \
+#define AI_MATKEY_UVWSRC_REFLECTION(N) \
AI_MATKEY_UVWSRC(aiTextureType_REFLECTION,N)
//! @endcond
@@ -880,37 +880,37 @@ extern "C" {
// For backward compatibility and simplicity
//! @cond MATS_DOC_FULL
-#define AI_MATKEY_TEXOP_DIFFUSE(N) \
+#define AI_MATKEY_TEXOP_DIFFUSE(N) \
AI_MATKEY_TEXOP(aiTextureType_DIFFUSE,N)
-#define AI_MATKEY_TEXOP_SPECULAR(N) \
+#define AI_MATKEY_TEXOP_SPECULAR(N) \
AI_MATKEY_TEXOP(aiTextureType_SPECULAR,N)
-#define AI_MATKEY_TEXOP_AMBIENT(N) \
+#define AI_MATKEY_TEXOP_AMBIENT(N) \
AI_MATKEY_TEXOP(aiTextureType_AMBIENT,N)
-#define AI_MATKEY_TEXOP_EMISSIVE(N) \
+#define AI_MATKEY_TEXOP_EMISSIVE(N) \
AI_MATKEY_TEXOP(aiTextureType_EMISSIVE,N)
-#define AI_MATKEY_TEXOP_NORMALS(N) \
+#define AI_MATKEY_TEXOP_NORMALS(N) \
AI_MATKEY_TEXOP(aiTextureType_NORMALS,N)
-#define AI_MATKEY_TEXOP_HEIGHT(N) \
+#define AI_MATKEY_TEXOP_HEIGHT(N) \
AI_MATKEY_TEXOP(aiTextureType_HEIGHT,N)
-#define AI_MATKEY_TEXOP_SHININESS(N) \
+#define AI_MATKEY_TEXOP_SHININESS(N) \
AI_MATKEY_TEXOP(aiTextureType_SHININESS,N)
-#define AI_MATKEY_TEXOP_OPACITY(N) \
+#define AI_MATKEY_TEXOP_OPACITY(N) \
AI_MATKEY_TEXOP(aiTextureType_OPACITY,N)
-#define AI_MATKEY_TEXOP_DISPLACEMENT(N) \
+#define AI_MATKEY_TEXOP_DISPLACEMENT(N) \
AI_MATKEY_TEXOP(aiTextureType_DISPLACEMENT,N)
-#define AI_MATKEY_TEXOP_LIGHTMAP(N) \
+#define AI_MATKEY_TEXOP_LIGHTMAP(N) \
AI_MATKEY_TEXOP(aiTextureType_LIGHTMAP,N)
-#define AI_MATKEY_TEXOP_REFLECTION(N) \
+#define AI_MATKEY_TEXOP_REFLECTION(N) \
AI_MATKEY_TEXOP(aiTextureType_REFLECTION,N)
//! @endcond
@@ -919,37 +919,37 @@ extern "C" {
// For backward compatibility and simplicity
//! @cond MATS_DOC_FULL
-#define AI_MATKEY_MAPPING_DIFFUSE(N) \
+#define AI_MATKEY_MAPPING_DIFFUSE(N) \
AI_MATKEY_MAPPING(aiTextureType_DIFFUSE,N)
-#define AI_MATKEY_MAPPING_SPECULAR(N) \
+#define AI_MATKEY_MAPPING_SPECULAR(N) \
AI_MATKEY_MAPPING(aiTextureType_SPECULAR,N)
-#define AI_MATKEY_MAPPING_AMBIENT(N) \
+#define AI_MATKEY_MAPPING_AMBIENT(N) \
AI_MATKEY_MAPPING(aiTextureType_AMBIENT,N)
-#define AI_MATKEY_MAPPING_EMISSIVE(N) \
+#define AI_MATKEY_MAPPING_EMISSIVE(N) \
AI_MATKEY_MAPPING(aiTextureType_EMISSIVE,N)
-#define AI_MATKEY_MAPPING_NORMALS(N) \
+#define AI_MATKEY_MAPPING_NORMALS(N) \
AI_MATKEY_MAPPING(aiTextureType_NORMALS,N)
-#define AI_MATKEY_MAPPING_HEIGHT(N) \
+#define AI_MATKEY_MAPPING_HEIGHT(N) \
AI_MATKEY_MAPPING(aiTextureType_HEIGHT,N)
-#define AI_MATKEY_MAPPING_SHININESS(N) \
+#define AI_MATKEY_MAPPING_SHININESS(N) \
AI_MATKEY_MAPPING(aiTextureType_SHININESS,N)
-#define AI_MATKEY_MAPPING_OPACITY(N) \
+#define AI_MATKEY_MAPPING_OPACITY(N) \
AI_MATKEY_MAPPING(aiTextureType_OPACITY,N)
-#define AI_MATKEY_MAPPING_DISPLACEMENT(N) \
+#define AI_MATKEY_MAPPING_DISPLACEMENT(N) \
AI_MATKEY_MAPPING(aiTextureType_DISPLACEMENT,N)
-#define AI_MATKEY_MAPPING_LIGHTMAP(N) \
+#define AI_MATKEY_MAPPING_LIGHTMAP(N) \
AI_MATKEY_MAPPING(aiTextureType_LIGHTMAP,N)
-#define AI_MATKEY_MAPPING_REFLECTION(N) \
+#define AI_MATKEY_MAPPING_REFLECTION(N) \
AI_MATKEY_MAPPING(aiTextureType_REFLECTION,N)
//! @endcond
@@ -958,37 +958,37 @@ extern "C" {
// For backward compatibility and simplicity
//! @cond MATS_DOC_FULL
-#define AI_MATKEY_TEXBLEND_DIFFUSE(N) \
+#define AI_MATKEY_TEXBLEND_DIFFUSE(N) \
AI_MATKEY_TEXBLEND(aiTextureType_DIFFUSE,N)
-#define AI_MATKEY_TEXBLEND_SPECULAR(N) \
+#define AI_MATKEY_TEXBLEND_SPECULAR(N) \
AI_MATKEY_TEXBLEND(aiTextureType_SPECULAR,N)
-#define AI_MATKEY_TEXBLEND_AMBIENT(N) \
+#define AI_MATKEY_TEXBLEND_AMBIENT(N) \
AI_MATKEY_TEXBLEND(aiTextureType_AMBIENT,N)
-#define AI_MATKEY_TEXBLEND_EMISSIVE(N) \
+#define AI_MATKEY_TEXBLEND_EMISSIVE(N) \
AI_MATKEY_TEXBLEND(aiTextureType_EMISSIVE,N)
-#define AI_MATKEY_TEXBLEND_NORMALS(N) \
+#define AI_MATKEY_TEXBLEND_NORMALS(N) \
AI_MATKEY_TEXBLEND(aiTextureType_NORMALS,N)
-#define AI_MATKEY_TEXBLEND_HEIGHT(N) \
+#define AI_MATKEY_TEXBLEND_HEIGHT(N) \
AI_MATKEY_TEXBLEND(aiTextureType_HEIGHT,N)
-#define AI_MATKEY_TEXBLEND_SHININESS(N) \
+#define AI_MATKEY_TEXBLEND_SHININESS(N) \
AI_MATKEY_TEXBLEND(aiTextureType_SHININESS,N)
-#define AI_MATKEY_TEXBLEND_OPACITY(N) \
+#define AI_MATKEY_TEXBLEND_OPACITY(N) \
AI_MATKEY_TEXBLEND(aiTextureType_OPACITY,N)
-#define AI_MATKEY_TEXBLEND_DISPLACEMENT(N) \
+#define AI_MATKEY_TEXBLEND_DISPLACEMENT(N) \
AI_MATKEY_TEXBLEND(aiTextureType_DISPLACEMENT,N)
-#define AI_MATKEY_TEXBLEND_LIGHTMAP(N) \
+#define AI_MATKEY_TEXBLEND_LIGHTMAP(N) \
AI_MATKEY_TEXBLEND(aiTextureType_LIGHTMAP,N)
-#define AI_MATKEY_TEXBLEND_REFLECTION(N) \
+#define AI_MATKEY_TEXBLEND_REFLECTION(N) \
AI_MATKEY_TEXBLEND(aiTextureType_REFLECTION,N)
//! @endcond
@@ -997,37 +997,37 @@ extern "C" {
// For backward compatibility and simplicity
//! @cond MATS_DOC_FULL
-#define AI_MATKEY_MAPPINGMODE_U_DIFFUSE(N) \
+#define AI_MATKEY_MAPPINGMODE_U_DIFFUSE(N) \
AI_MATKEY_MAPPINGMODE_U(aiTextureType_DIFFUSE,N)
-#define AI_MATKEY_MAPPINGMODE_U_SPECULAR(N) \
+#define AI_MATKEY_MAPPINGMODE_U_SPECULAR(N) \
AI_MATKEY_MAPPINGMODE_U(aiTextureType_SPECULAR,N)
-#define AI_MATKEY_MAPPINGMODE_U_AMBIENT(N) \
+#define AI_MATKEY_MAPPINGMODE_U_AMBIENT(N) \
AI_MATKEY_MAPPINGMODE_U(aiTextureType_AMBIENT,N)
-#define AI_MATKEY_MAPPINGMODE_U_EMISSIVE(N) \
+#define AI_MATKEY_MAPPINGMODE_U_EMISSIVE(N) \
AI_MATKEY_MAPPINGMODE_U(aiTextureType_EMISSIVE,N)
-#define AI_MATKEY_MAPPINGMODE_U_NORMALS(N) \
+#define AI_MATKEY_MAPPINGMODE_U_NORMALS(N) \
AI_MATKEY_MAPPINGMODE_U(aiTextureType_NORMALS,N)
-#define AI_MATKEY_MAPPINGMODE_U_HEIGHT(N) \
+#define AI_MATKEY_MAPPINGMODE_U_HEIGHT(N) \
AI_MATKEY_MAPPINGMODE_U(aiTextureType_HEIGHT,N)
-#define AI_MATKEY_MAPPINGMODE_U_SHININESS(N) \
+#define AI_MATKEY_MAPPINGMODE_U_SHININESS(N) \
AI_MATKEY_MAPPINGMODE_U(aiTextureType_SHININESS,N)
-#define AI_MATKEY_MAPPINGMODE_U_OPACITY(N) \
+#define AI_MATKEY_MAPPINGMODE_U_OPACITY(N) \
AI_MATKEY_MAPPINGMODE_U(aiTextureType_OPACITY,N)
-#define AI_MATKEY_MAPPINGMODE_U_DISPLACEMENT(N) \
+#define AI_MATKEY_MAPPINGMODE_U_DISPLACEMENT(N) \
AI_MATKEY_MAPPINGMODE_U(aiTextureType_DISPLACEMENT,N)
-#define AI_MATKEY_MAPPINGMODE_U_LIGHTMAP(N) \
+#define AI_MATKEY_MAPPINGMODE_U_LIGHTMAP(N) \
AI_MATKEY_MAPPINGMODE_U(aiTextureType_LIGHTMAP,N)
-#define AI_MATKEY_MAPPINGMODE_U_REFLECTION(N) \
+#define AI_MATKEY_MAPPINGMODE_U_REFLECTION(N) \
AI_MATKEY_MAPPINGMODE_U(aiTextureType_REFLECTION,N)
//! @endcond
@@ -1036,37 +1036,37 @@ extern "C" {
// For backward compatibility and simplicity
//! @cond MATS_DOC_FULL
-#define AI_MATKEY_MAPPINGMODE_V_DIFFUSE(N) \
+#define AI_MATKEY_MAPPINGMODE_V_DIFFUSE(N) \
AI_MATKEY_MAPPINGMODE_V(aiTextureType_DIFFUSE,N)
-#define AI_MATKEY_MAPPINGMODE_V_SPECULAR(N) \
+#define AI_MATKEY_MAPPINGMODE_V_SPECULAR(N) \
AI_MATKEY_MAPPINGMODE_V(aiTextureType_SPECULAR,N)
-#define AI_MATKEY_MAPPINGMODE_V_AMBIENT(N) \
+#define AI_MATKEY_MAPPINGMODE_V_AMBIENT(N) \
AI_MATKEY_MAPPINGMODE_V(aiTextureType_AMBIENT,N)
-#define AI_MATKEY_MAPPINGMODE_V_EMISSIVE(N) \
+#define AI_MATKEY_MAPPINGMODE_V_EMISSIVE(N) \
AI_MATKEY_MAPPINGMODE_V(aiTextureType_EMISSIVE,N)
-#define AI_MATKEY_MAPPINGMODE_V_NORMALS(N) \
+#define AI_MATKEY_MAPPINGMODE_V_NORMALS(N) \
AI_MATKEY_MAPPINGMODE_V(aiTextureType_NORMALS,N)
-#define AI_MATKEY_MAPPINGMODE_V_HEIGHT(N) \
+#define AI_MATKEY_MAPPINGMODE_V_HEIGHT(N) \
AI_MATKEY_MAPPINGMODE_V(aiTextureType_HEIGHT,N)
-#define AI_MATKEY_MAPPINGMODE_V_SHININESS(N) \
+#define AI_MATKEY_MAPPINGMODE_V_SHININESS(N) \
AI_MATKEY_MAPPINGMODE_V(aiTextureType_SHININESS,N)
-#define AI_MATKEY_MAPPINGMODE_V_OPACITY(N) \
+#define AI_MATKEY_MAPPINGMODE_V_OPACITY(N) \
AI_MATKEY_MAPPINGMODE_V(aiTextureType_OPACITY,N)
-#define AI_MATKEY_MAPPINGMODE_V_DISPLACEMENT(N) \
+#define AI_MATKEY_MAPPINGMODE_V_DISPLACEMENT(N) \
AI_MATKEY_MAPPINGMODE_V(aiTextureType_DISPLACEMENT,N)
-#define AI_MATKEY_MAPPINGMODE_V_LIGHTMAP(N) \
+#define AI_MATKEY_MAPPINGMODE_V_LIGHTMAP(N) \
AI_MATKEY_MAPPINGMODE_V(aiTextureType_LIGHTMAP,N)
-#define AI_MATKEY_MAPPINGMODE_V_REFLECTION(N) \
+#define AI_MATKEY_MAPPINGMODE_V_REFLECTION(N) \
AI_MATKEY_MAPPINGMODE_V(aiTextureType_REFLECTION,N)
//! @endcond
@@ -1075,37 +1075,37 @@ extern "C" {
// For backward compatibility and simplicity
//! @cond MATS_DOC_FULL
-#define AI_MATKEY_TEXMAP_AXIS_DIFFUSE(N) \
+#define AI_MATKEY_TEXMAP_AXIS_DIFFUSE(N) \
AI_MATKEY_TEXMAP_AXIS(aiTextureType_DIFFUSE,N)
-#define AI_MATKEY_TEXMAP_AXIS_SPECULAR(N) \
+#define AI_MATKEY_TEXMAP_AXIS_SPECULAR(N) \
AI_MATKEY_TEXMAP_AXIS(aiTextureType_SPECULAR,N)
-#define AI_MATKEY_TEXMAP_AXIS_AMBIENT(N) \
+#define AI_MATKEY_TEXMAP_AXIS_AMBIENT(N) \
AI_MATKEY_TEXMAP_AXIS(aiTextureType_AMBIENT,N)
-#define AI_MATKEY_TEXMAP_AXIS_EMISSIVE(N) \
+#define AI_MATKEY_TEXMAP_AXIS_EMISSIVE(N) \
AI_MATKEY_TEXMAP_AXIS(aiTextureType_EMISSIVE,N)
-#define AI_MATKEY_TEXMAP_AXIS_NORMALS(N) \
+#define AI_MATKEY_TEXMAP_AXIS_NORMALS(N) \
AI_MATKEY_TEXMAP_AXIS(aiTextureType_NORMALS,N)
-#define AI_MATKEY_TEXMAP_AXIS_HEIGHT(N) \
+#define AI_MATKEY_TEXMAP_AXIS_HEIGHT(N) \
AI_MATKEY_TEXMAP_AXIS(aiTextureType_HEIGHT,N)
-#define AI_MATKEY_TEXMAP_AXIS_SHININESS(N) \
+#define AI_MATKEY_TEXMAP_AXIS_SHININESS(N) \
AI_MATKEY_TEXMAP_AXIS(aiTextureType_SHININESS,N)
-#define AI_MATKEY_TEXMAP_AXIS_OPACITY(N) \
+#define AI_MATKEY_TEXMAP_AXIS_OPACITY(N) \
AI_MATKEY_TEXMAP_AXIS(aiTextureType_OPACITY,N)
-#define AI_MATKEY_TEXMAP_AXIS_DISPLACEMENT(N) \
+#define AI_MATKEY_TEXMAP_AXIS_DISPLACEMENT(N) \
AI_MATKEY_TEXMAP_AXIS(aiTextureType_DISPLACEMENT,N)
-#define AI_MATKEY_TEXMAP_AXIS_LIGHTMAP(N) \
+#define AI_MATKEY_TEXMAP_AXIS_LIGHTMAP(N) \
AI_MATKEY_TEXMAP_AXIS(aiTextureType_LIGHTMAP,N)
-#define AI_MATKEY_TEXMAP_AXIS_REFLECTION(N) \
+#define AI_MATKEY_TEXMAP_AXIS_REFLECTION(N) \
AI_MATKEY_TEXMAP_AXIS(aiTextureType_REFLECTION,N)
//! @endcond
@@ -1114,40 +1114,40 @@ extern "C" {
// For backward compatibility and simplicity
//! @cond MATS_DOC_FULL
-#define AI_MATKEY_UVTRANSFORM_DIFFUSE(N) \
+#define AI_MATKEY_UVTRANSFORM_DIFFUSE(N) \
AI_MATKEY_UVTRANSFORM(aiTextureType_DIFFUSE,N)
-#define AI_MATKEY_UVTRANSFORM_SPECULAR(N) \
+#define AI_MATKEY_UVTRANSFORM_SPECULAR(N) \
AI_MATKEY_UVTRANSFORM(aiTextureType_SPECULAR,N)
-#define AI_MATKEY_UVTRANSFORM_AMBIENT(N) \
+#define AI_MATKEY_UVTRANSFORM_AMBIENT(N) \
AI_MATKEY_UVTRANSFORM(aiTextureType_AMBIENT,N)
-#define AI_MATKEY_UVTRANSFORM_EMISSIVE(N) \
+#define AI_MATKEY_UVTRANSFORM_EMISSIVE(N) \
AI_MATKEY_UVTRANSFORM(aiTextureType_EMISSIVE,N)
-#define AI_MATKEY_UVTRANSFORM_NORMALS(N) \
+#define AI_MATKEY_UVTRANSFORM_NORMALS(N) \
AI_MATKEY_UVTRANSFORM(aiTextureType_NORMALS,N)
-#define AI_MATKEY_UVTRANSFORM_HEIGHT(N) \
+#define AI_MATKEY_UVTRANSFORM_HEIGHT(N) \
AI_MATKEY_UVTRANSFORM(aiTextureType_HEIGHT,N)
-#define AI_MATKEY_UVTRANSFORM_SHININESS(N) \
+#define AI_MATKEY_UVTRANSFORM_SHININESS(N) \
AI_MATKEY_UVTRANSFORM(aiTextureType_SHININESS,N)
-#define AI_MATKEY_UVTRANSFORM_OPACITY(N) \
+#define AI_MATKEY_UVTRANSFORM_OPACITY(N) \
AI_MATKEY_UVTRANSFORM(aiTextureType_OPACITY,N)
-#define AI_MATKEY_UVTRANSFORM_DISPLACEMENT(N) \
+#define AI_MATKEY_UVTRANSFORM_DISPLACEMENT(N) \
AI_MATKEY_UVTRANSFORM(aiTextureType_DISPLACEMENT,N)
-#define AI_MATKEY_UVTRANSFORM_LIGHTMAP(N) \
+#define AI_MATKEY_UVTRANSFORM_LIGHTMAP(N) \
AI_MATKEY_UVTRANSFORM(aiTextureType_LIGHTMAP,N)
-#define AI_MATKEY_UVTRANSFORM_REFLECTION(N) \
+#define AI_MATKEY_UVTRANSFORM_REFLECTION(N) \
AI_MATKEY_UVTRANSFORM(aiTextureType_REFLECTION,N)
-#define AI_MATKEY_UVTRANSFORM_UNKNOWN(N) \
+#define AI_MATKEY_UVTRANSFORM_UNKNOWN(N) \
AI_MATKEY_UVTRANSFORM(aiTextureType_UNKNOWN,N)
//! @endcond
@@ -1156,40 +1156,40 @@ extern "C" {
// For backward compatibility and simplicity
//! @cond MATS_DOC_FULL
-#define AI_MATKEY_TEXFLAGS_DIFFUSE(N) \
+#define AI_MATKEY_TEXFLAGS_DIFFUSE(N) \
AI_MATKEY_TEXFLAGS(aiTextureType_DIFFUSE,N)
-#define AI_MATKEY_TEXFLAGS_SPECULAR(N) \
+#define AI_MATKEY_TEXFLAGS_SPECULAR(N) \
AI_MATKEY_TEXFLAGS(aiTextureType_SPECULAR,N)
-#define AI_MATKEY_TEXFLAGS_AMBIENT(N) \
+#define AI_MATKEY_TEXFLAGS_AMBIENT(N) \
AI_MATKEY_TEXFLAGS(aiTextureType_AMBIENT,N)
-#define AI_MATKEY_TEXFLAGS_EMISSIVE(N) \
+#define AI_MATKEY_TEXFLAGS_EMISSIVE(N) \
AI_MATKEY_TEXFLAGS(aiTextureType_EMISSIVE,N)
-#define AI_MATKEY_TEXFLAGS_NORMALS(N) \
+#define AI_MATKEY_TEXFLAGS_NORMALS(N) \
AI_MATKEY_TEXFLAGS(aiTextureType_NORMALS,N)
-#define AI_MATKEY_TEXFLAGS_HEIGHT(N) \
+#define AI_MATKEY_TEXFLAGS_HEIGHT(N) \
AI_MATKEY_TEXFLAGS(aiTextureType_HEIGHT,N)
-#define AI_MATKEY_TEXFLAGS_SHININESS(N) \
+#define AI_MATKEY_TEXFLAGS_SHININESS(N) \
AI_MATKEY_TEXFLAGS(aiTextureType_SHININESS,N)
-#define AI_MATKEY_TEXFLAGS_OPACITY(N) \
+#define AI_MATKEY_TEXFLAGS_OPACITY(N) \
AI_MATKEY_TEXFLAGS(aiTextureType_OPACITY,N)
-#define AI_MATKEY_TEXFLAGS_DISPLACEMENT(N) \
+#define AI_MATKEY_TEXFLAGS_DISPLACEMENT(N) \
AI_MATKEY_TEXFLAGS(aiTextureType_DISPLACEMENT,N)
-#define AI_MATKEY_TEXFLAGS_LIGHTMAP(N) \
+#define AI_MATKEY_TEXFLAGS_LIGHTMAP(N) \
AI_MATKEY_TEXFLAGS(aiTextureType_LIGHTMAP,N)
-#define AI_MATKEY_TEXFLAGS_REFLECTION(N) \
+#define AI_MATKEY_TEXFLAGS_REFLECTION(N) \
AI_MATKEY_TEXFLAGS(aiTextureType_REFLECTION,N)
-#define AI_MATKEY_TEXFLAGS_UNKNOWN(N) \
+#define AI_MATKEY_TEXFLAGS_UNKNOWN(N) \
AI_MATKEY_TEXFLAGS(aiTextureType_UNKNOWN,N)
// ---------------------------------------------------------------------------
@@ -1381,7 +1381,7 @@ ASSIMP_API unsigned int aiGetMaterialTextureCount(const C_STRUCT aiMaterial* pMa
* @param[out] blend Receives the blend factor for the texture
* Pass NULL if you're not interested in this information.
* @param[out] op Receives the texture blend operation to be perform between
- * this texture and the previous texture.
+ * this texture and the previous texture.
* Pass NULL if you're not interested in this information.
* @param[out] mapmode Receives the mapping modes to be used for the texture.
* Pass NULL if you're not interested in this information. Otherwise,
@@ -1394,22 +1394,22 @@ ASSIMP_API aiReturn aiGetMaterialTexture(const C_STRUCT aiMaterial* mat,
aiTextureType type,
unsigned int index,
aiString* path,
- aiTextureMapping* mapping = NULL,
- unsigned int* uvindex = NULL,
- float* blend = NULL,
- aiTextureOp* op = NULL,
- aiTextureMapMode* mapmode = NULL,
+ aiTextureMapping* mapping = NULL,
+ unsigned int* uvindex = NULL,
+ float* blend = NULL,
+ aiTextureOp* op = NULL,
+ aiTextureMapMode* mapmode = NULL,
unsigned int* flags = NULL);
#else
C_ENUM aiReturn aiGetMaterialTexture(const C_STRUCT aiMaterial* mat,
C_ENUM aiTextureType type,
unsigned int index,
C_STRUCT aiString* path,
- C_ENUM aiTextureMapping* mapping /*= NULL*/,
- unsigned int* uvindex /*= NULL*/,
- float* blend /*= NULL*/,
- C_ENUM aiTextureOp* op /*= NULL*/,
- C_ENUM aiTextureMapMode* mapmode /*= NULL*/,
+ C_ENUM aiTextureMapping* mapping /*= NULL*/,
+ unsigned int* uvindex /*= NULL*/,
+ float* blend /*= NULL*/,
+ C_ENUM aiTextureOp* op /*= NULL*/,
+ C_ENUM aiTextureMapMode* mapmode /*= NULL*/,
unsigned int* flags /*= NULL*/);
#endif // !#ifdef __cplusplus
diff --git a/3rdparty/assimp/include/aiMaterial.inl b/3rdparty/assimp/include/aiMaterial.inl
index 838f0e14f..6be16ff63 100644
--- a/3rdparty/assimp/include/aiMaterial.inl
+++ b/3rdparty/assimp/include/aiMaterial.inl
@@ -52,11 +52,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
inline aiReturn aiMaterial::GetTexture( aiTextureType type,
unsigned int index,
C_STRUCT aiString* path,
- aiTextureMapping* mapping /*= NULL*/,
- unsigned int* uvindex /*= NULL*/,
- float* blend /*= NULL*/,
- aiTextureOp* op /*= NULL*/,
- aiTextureMapMode* mapmode /*= NULL*/) const
+ aiTextureMapping* mapping /*= NULL*/,
+ unsigned int* uvindex /*= NULL*/,
+ float* blend /*= NULL*/,
+ aiTextureOp* op /*= NULL*/,
+ aiTextureMapMode* mapmode /*= NULL*/) const
{
return ::aiGetMaterialTexture(this,type,index,path,mapping,uvindex,blend,op,mapmode);
}
@@ -78,14 +78,14 @@ inline aiReturn aiMaterial::Get(const char* pKey,unsigned int type,
const aiMaterialProperty* prop;
const aiReturn ret = ::aiGetMaterialProperty(this,pKey,type,idx,
(const aiMaterialProperty**)&prop);
- if ( AI_SUCCESS == ret ) {
+ if ( AI_SUCCESS == ret ) {
if (prop->mDataLength < sizeof(Type)*iNum) {
return AI_FAILURE;
}
- // if (::strcmp(prop->mData,(char*)aiPTI_Buffer)!=0)
- // return AI_FAILURE;
+ // if (::strcmp(prop->mData,(char*)aiPTI_Buffer)!=0)
+ // return AI_FAILURE;
iNum = std::min((size_t)iNum,prop->mDataLength / sizeof(Type));
memcpy(pOut,prop->mData,iNum * sizeof(Type));
@@ -104,17 +104,32 @@ inline aiReturn aiMaterial::Get(const char* pKey,unsigned int type,
const aiMaterialProperty* prop;
const aiReturn ret = ::aiGetMaterialProperty(this,pKey,type,idx,
(const aiMaterialProperty**)&prop);
- if ( AI_SUCCESS == ret ) {
+ if ( AI_SUCCESS == ret ) {
+ /*
if (prop->mDataLength < sizeof(Type)) {
return AI_FAILURE;
}
+ if (strcmp(prop->mData,(char*)aiPTI_Buffer)!=0) {
+ return AI_FAILURE;
+ }
+
memcpy(&pOut,prop->mData,sizeof(Type));
+ */
+
+ if (prop->mType == aiPTI_Buffer) {
+ return AI_FAILURE;
+ } else {
+ if (prop->mDataLength < sizeof(Type)) {
+ return AI_FAILURE;
+ } else {
+ memcpy(&pOut,prop->mData,sizeof(Type));
+ }
+ }
}
return ret;
}
-
// ---------------------------------------------------------------------------
template <>
inline aiReturn aiMaterial::Get<float>(const char* pKey,unsigned int type,
@@ -131,6 +146,7 @@ inline aiReturn aiMaterial::Get<int>(const char* pKey,unsigned int type,
{
return ::aiGetMaterialIntegerArray(this,pKey,type,idx,pOut,pMax);
}
+
// ---------------------------------------------------------------------------
template <>
inline aiReturn aiMaterial::Get<float>(const char* pKey,unsigned int type,
diff --git a/3rdparty/assimp/include/aiMatrix3x3.h b/3rdparty/assimp/include/aiMatrix3x3.h
index a1dd1567a..dc3d63147 100644
--- a/3rdparty/assimp/include/aiMatrix3x3.h
+++ b/3rdparty/assimp/include/aiMatrix3x3.h
@@ -68,7 +68,7 @@ struct aiMatrix3x3
b1(0.0f), b2(1.0f), b3(0.0f),
c1(0.0f), c2(0.0f), c3(1.0f) {}
- aiMatrix3x3 ( float _a1, float _a2, float _a3,
+ aiMatrix3x3 ( float _a1, float _a2, float _a3,
float _b1, float _b2, float _b3,
float _c1, float _c2, float _c3) :
a1(_a1), a2(_a2), a3(_a3),
@@ -144,7 +144,7 @@ public:
* vector called "from" into another vector called "to".
* Input : from[3], to[3] which both must be *normalized* non-zero vectors
* Output: mtx[3][3] -- a 3x3 matrix in colum-major form
- * Authors: Tomas Mller, John Hughes
+ * Authors: Tomas Möller, John Hughes
* "Efficiently Building a Matrix to Rotate One Vector to Another"
* Journal of Graphics Tools, 4(4):1-4, 1999
*/
diff --git a/3rdparty/assimp/include/aiMatrix3x3.inl b/3rdparty/assimp/include/aiMatrix3x3.inl
index e1901c3da..3a9e61620 100644
--- a/3rdparty/assimp/include/aiMatrix3x3.inl
+++ b/3rdparty/assimp/include/aiMatrix3x3.inl
@@ -90,7 +90,7 @@ inline aiMatrix3x3& aiMatrix3x3::Inverse()
{
// Compute the reciprocal determinant
float det = Determinant();
- if (det == 0.0f)
+ if(det == 0.0f)
{
// Matrix not invertible. Setting all elements to nan is not really
// correct in a mathematical sense but it is easy to debug for the
@@ -160,7 +160,7 @@ inline aiMatrix3x3& aiMatrix3x3::Translation( const aiVector2D& v, aiMatrix3x3&
* "from" into another vector called "to".
* Input : from[3], to[3] which both must be *normalized* non-zero vectors
* Output: mtx[3][3] -- a 3x3 matrix in colum-major form
- * Authors: Tomas Mller, John Hughes
+ * Authors: Tomas Möller, John Hughes
* "Efficiently Building a Matrix to Rotate One Vector to Another"
* Journal of Graphics Tools, 4(4):1-4, 1999
*/
diff --git a/3rdparty/assimp/include/aiMatrix4x4.h b/3rdparty/assimp/include/aiMatrix4x4.h
index 4e21f88dc..625c9b9a5 100644
--- a/3rdparty/assimp/include/aiMatrix4x4.h
+++ b/3rdparty/assimp/include/aiMatrix4x4.h
@@ -74,7 +74,7 @@ struct aiMatrix4x4
{}
// from single values
- aiMatrix4x4 ( float _a1, float _a2, float _a3, float _a4,
+ aiMatrix4x4 ( float _a1, float _a2, float _a3, float _a4,
float _b1, float _b2, float _b3, float _b4,
float _c1, float _c2, float _c3, float _c4,
float _d1, float _d2, float _d3, float _d4) :
@@ -213,7 +213,7 @@ public:
* vector called "from" into another vector called "to".
* Input : from[3], to[3] which both must be *normalized* non-zero vectors
* Output: mtx[3][3] -- a 3x3 matrix in colum-major form
- * Authors: Tomas Mller, John Hughes
+ * Authors: Tomas Möller, John Hughes
* "Efficiently Building a Matrix to Rotate One Vector to Another"
* Journal of Graphics Tools, 4(4):1-4, 1999
*/
diff --git a/3rdparty/assimp/include/aiMatrix4x4.inl b/3rdparty/assimp/include/aiMatrix4x4.inl
index ea3efedb2..c24fceded 100644
--- a/3rdparty/assimp/include/aiMatrix4x4.inl
+++ b/3rdparty/assimp/include/aiMatrix4x4.inl
@@ -128,7 +128,7 @@ inline aiMatrix4x4& aiMatrix4x4::Inverse()
{
// Compute the reciprocal determinant
float det = Determinant();
- if (det == 0.0f)
+ if(det == 0.0f)
{
// Matrix not invertible. Setting all elements to nan is not really
// correct in a mathematical sense but it is easy to debug for the
@@ -218,15 +218,15 @@ inline void aiMatrix4x4::Decompose (aiVector3D& scaling, aiQuaternion& rotation,
scaling.z = vRows[2].Length();
// and remove all scaling from the matrix
- if (scaling.x)
+ if(scaling.x)
{
vRows[0] /= scaling.x;
}
- if (scaling.y)
+ if(scaling.y)
{
vRows[1] /= scaling.y;
}
- if (scaling.z)
+ if(scaling.z)
{
vRows[2] /= scaling.z;
}
@@ -322,7 +322,7 @@ inline aiMatrix4x4& aiMatrix4x4::RotationX(float a, aiMatrix4x4& out)
| 1 0 0 0 |
M = | 0 cos(A) -sin(A) 0 |
| 0 sin(A) cos(A) 0 |
- | 0 0 0 1 | */
+ | 0 0 0 1 | */
out = aiMatrix4x4();
out.b2 = out.c3 = cos(a);
out.b3 = -(out.c2 = sin(a));
@@ -351,7 +351,7 @@ inline aiMatrix4x4& aiMatrix4x4::RotationZ(float a, aiMatrix4x4& out)
| cos(A) -sin(A) 0 0 |
M = | sin(A) cos(A) 0 0 |
| 0 0 1 0 |
- | 0 0 0 1 | */
+ | 0 0 0 1 | */
out = aiMatrix4x4();
out.a1 = out.b2 = cos(a);
out.a2 = -(out.b1 = sin(a));
@@ -401,7 +401,7 @@ inline aiMatrix4x4& aiMatrix4x4::Scaling( const aiVector3D& v, aiMatrix4x4& out)
* "from" into another vector called "to".
* Input : from[3], to[3] which both must be *normalized* non-zero vectors
* Output: mtx[3][3] -- a 3x3 matrix in colum-major form
- * Authors: Tomas Mller, John Hughes
+ * Authors: Tomas Möller, John Hughes
* "Efficiently Building a Matrix to Rotate One Vector to Another"
* Journal of Graphics Tools, 4(4):1-4, 1999
*/
diff --git a/3rdparty/assimp/include/aiMesh.h b/3rdparty/assimp/include/aiMesh.h
index 0b96dfbcd..1fec346d8 100644
--- a/3rdparty/assimp/include/aiMesh.h
+++ b/3rdparty/assimp/include/aiMesh.h
@@ -62,42 +62,42 @@ extern "C" {
* Maximum number of indices per face (polygon). */
#ifndef AI_MAX_FACE_INDICES
-# define AI_MAX_FACE_INDICES 0x7fff
+# define AI_MAX_FACE_INDICES 0x7fff
#endif
/** @def AI_MAX_BONE_WEIGHTS
* Maximum number of indices per face (polygon). */
#ifndef AI_MAX_BONE_WEIGHTS
-# define AI_MAX_BONE_WEIGHTS 0x7fffffff
+# define AI_MAX_BONE_WEIGHTS 0x7fffffff
#endif
/** @def AI_MAX_VERTICES
* Maximum number of vertices per mesh. */
#ifndef AI_MAX_VERTICES
-# define AI_MAX_VERTICES 0x7fffffff
+# define AI_MAX_VERTICES 0x7fffffff
#endif
/** @def AI_MAX_FACES
* Maximum number of faces per mesh. */
#ifndef AI_MAX_FACES
-# define AI_MAX_FACES 0x7fffffff
+# define AI_MAX_FACES 0x7fffffff
#endif
/** @def AI_MAX_NUMBER_OF_COLOR_SETS
* Supported number of vertex color sets per mesh. */
#ifndef AI_MAX_NUMBER_OF_COLOR_SETS
-# define AI_MAX_NUMBER_OF_COLOR_SETS 0x4
+# define AI_MAX_NUMBER_OF_COLOR_SETS 0x4
#endif // !! AI_MAX_NUMBER_OF_COLOR_SETS
/** @def AI_MAX_NUMBER_OF_TEXTURECOORDS
* Supported number of texture coord sets (UV(W) channels) per mesh */
#ifndef AI_MAX_NUMBER_OF_TEXTURECOORDS
-# define AI_MAX_NUMBER_OF_TEXTURECOORDS 0x4
+# define AI_MAX_NUMBER_OF_TEXTURECOORDS 0x4
#endif // !! AI_MAX_NUMBER_OF_TEXTURECOORDS
// ---------------------------------------------------------------------------
@@ -323,8 +323,9 @@ enum aiPrimitiveType
((n) > 3 ? aiPrimitiveType_POLYGON : (aiPrimitiveType)(1u << ((n)-1)))
+
// ---------------------------------------------------------------------------
-/** @brief An AnimMesh is an attachment to an #aiMesh stores per-vertex
+/** @brief NOT CURRENTLY IN USE. An AnimMesh is an attachment to an #aiMesh stores per-vertex
* animations for a particular frame.
*
* You may think of an #aiAnimMesh as a `patch` for the host mesh, which
@@ -422,20 +423,21 @@ struct aiAnimMesh
/** Check whether the anim mesh overrides a particular
* set of vertex colors on his host mesh.
* @param pIndex 0<index<AI_MAX_NUMBER_OF_COLOR_SETS */
- bool HasVertexColors( unsigned int pIndex) const {
+ bool HasVertexColors( unsigned int pIndex) const {
return pIndex >= AI_MAX_NUMBER_OF_COLOR_SETS ? false : mColors[pIndex] != NULL;
}
/** Check whether the anim mesh overrides a particular
* set of texture coordinates on his host mesh.
* @param pIndex 0<index<AI_MAX_NUMBER_OF_TEXTURECOORDS */
- bool HasTextureCoords( unsigned int pIndex) const {
+ bool HasTextureCoords( unsigned int pIndex) const {
return pIndex >= AI_MAX_NUMBER_OF_TEXTURECOORDS ? false : mTextureCoords[pIndex] != NULL;
}
#endif
};
+
// ---------------------------------------------------------------------------
/** @brief A mesh represents a geometry or model with a single material.
*
@@ -589,14 +591,16 @@ struct aiMesh
**/
C_STRUCT aiString mName;
- /** The number of attachment meshes */
+
+ /** NOT CURRENTLY IN USE. The number of attachment meshes */
unsigned int mNumAnimMeshes;
- /** Attachment meshes for this mesh, for vertex-based animation.
+ /** NOT CURRENTLY IN USE. Attachment meshes for this mesh, for vertex-based animation.
* Attachment meshes carry replacement data for some of the
* mesh'es vertex components (usually positions, normals). */
C_STRUCT aiAnimMesh** mAnimMeshes;
+
#ifdef __cplusplus
//! Default constructor. Initializes all members to 0
@@ -604,12 +608,15 @@ struct aiMesh
{
mNumVertices = 0;
mNumFaces = 0;
+
mNumAnimMeshes = 0;
+
mPrimitiveTypes = 0;
mVertices = NULL; mFaces = NULL;
mNormals = NULL; mTangents = NULL;
mBitangents = NULL;
mAnimMeshes = NULL;
+
for ( unsigned int a = 0; a < AI_MAX_NUMBER_OF_TEXTURECOORDS; a++)
{
mNumUVComponents[a] = 0;
@@ -636,17 +643,18 @@ struct aiMesh
}
// DO NOT REMOVE THIS ADDITIONAL CHECK
- if (mNumBones && mBones) {
+ if (mNumBones && mBones) {
for ( unsigned int a = 0; a < mNumBones; a++) {
delete mBones[a];
}
delete [] mBones;
}
- if (mNumAnimMeshes && mAnimMeshes) {
+
+ if (mNumAnimMeshes && mAnimMeshes) {
for ( unsigned int a = 0; a < mNumAnimMeshes; a++) {
delete mAnimMeshes[a];
}
- delete [] mBones;
+ delete [] mAnimMeshes;
}
delete [] mFaces;
diff --git a/3rdparty/assimp/include/aiPostProcess.h b/3rdparty/assimp/include/aiPostProcess.h
index 83c11db47..f9a231071 100644
--- a/3rdparty/assimp/include/aiPostProcess.h
+++ b/3rdparty/assimp/include/aiPostProcess.h
@@ -171,7 +171,7 @@ enum aiPostProcessSteps
* <tt>#AI_CONFIG_PP_GSN_MAX_SMOOTHING_ANGLE</tt> which allows you to specify
* an angle maximum for the normal smoothing algorithm. Normals exceeding
* this limit are not smoothed, resulting in a a 'hard' seam between two faces.
- * Using a decent angle here (e.g. 80) results in very good visual
+ * Using a decent angle here (e.g. 80°) results in very good visual
* appearance.
*/
aiProcess_GenSmoothNormals = 0x40,
@@ -535,10 +535,10 @@ enum aiPostProcessSteps
* use for you so it might be better to not specify them.
*/
#define aiProcessPreset_TargetRealtime_Fast ( \
- aiProcess_CalcTangentSpace | \
- aiProcess_GenNormals | \
+ aiProcess_CalcTangentSpace | \
+ aiProcess_GenNormals | \
aiProcess_JoinIdenticalVertices | \
- aiProcess_Triangulate | \
+ aiProcess_Triangulate | \
aiProcess_GenUVCoords | \
aiProcess_SortByPType | \
0 )
@@ -560,14 +560,14 @@ enum aiPostProcessSteps
* use for you so it might be better to not specify them.
*/
#define aiProcessPreset_TargetRealtime_Quality ( \
- aiProcess_CalcTangentSpace | \
- aiProcess_GenSmoothNormals | \
- aiProcess_JoinIdenticalVertices | \
- aiProcess_ImproveCacheLocality | \
- aiProcess_LimitBoneWeights | \
+ aiProcess_CalcTangentSpace | \
+ aiProcess_GenSmoothNormals | \
+ aiProcess_JoinIdenticalVertices | \
+ aiProcess_ImproveCacheLocality | \
+ aiProcess_LimitBoneWeights | \
aiProcess_RemoveRedundantMaterials | \
- aiProcess_SplitLargeMeshes | \
- aiProcess_Triangulate | \
+ aiProcess_SplitLargeMeshes | \
+ aiProcess_Triangulate | \
aiProcess_GenUVCoords | \
aiProcess_SortByPType | \
aiProcess_FindDegenerates | \
diff --git a/3rdparty/assimp/include/aiScene.h b/3rdparty/assimp/include/aiScene.h
index 7f6655039..6c4b49009 100644
--- a/3rdparty/assimp/include/aiScene.h
+++ b/3rdparty/assimp/include/aiScene.h
@@ -173,14 +173,14 @@ struct aiNode
* of animation skeletons, material libraries or camera animation paths
* using Assimp. Most applications won't support such data.
*/
-#define AI_SCENE_FLAGS_INCOMPLETE 0x1
+#define AI_SCENE_FLAGS_INCOMPLETE 0x1
/** @def AI_SCENE_FLAGS_VALIDATED
* This flag is set by the validation postprocess-step (aiPostProcess_ValidateDS)
* if the validation is successful. In a validated scene you can be sure that
* any cross references in the data structure (e.g. vertex indices) are valid.
*/
-#define AI_SCENE_FLAGS_VALIDATED 0x2
+#define AI_SCENE_FLAGS_VALIDATED 0x2
/** @def AI_SCENE_FLAGS_VALIDATION_WARNING
* This flag is set by the validation postprocess-step (aiPostProcess_ValidateDS)
@@ -190,7 +190,7 @@ struct aiNode
* In most cases you should still be able to use the import. This flag could
* be useful for applications which don't capture Assimp's log output.
*/
-#define AI_SCENE_FLAGS_VALIDATION_WARNING 0x4
+#define AI_SCENE_FLAGS_VALIDATION_WARNING 0x4
/** @def AI_SCENE_FLAGS_NON_VERBOSE_FORMAT
* This flag is currently only set by the aiProcess_JoinIdenticalVertices step.
@@ -198,7 +198,7 @@ struct aiNode
* verbose format anymore. In the verbose format all vertices are unique,
* no vertex is ever referenced by more than one face.
*/
-#define AI_SCENE_FLAGS_NON_VERBOSE_FORMAT 0x8
+#define AI_SCENE_FLAGS_NON_VERBOSE_FORMAT 0x8
/** @def AI_SCENE_FLAGS_TERRAIN
* Denotes pure height-map terrain data. Pure terrains usually consist of quads,
diff --git a/3rdparty/assimp/include/aiTexture.h b/3rdparty/assimp/include/aiTexture.h
index 50f1015a5..e64f0205d 100644
--- a/3rdparty/assimp/include/aiTexture.h
+++ b/3rdparty/assimp/include/aiTexture.h
@@ -66,7 +66,7 @@ extern "C" {
* (zero-based, in the aiScene::mTextures array)
*/
#if (!defined AI_MAKE_EMBEDDED_TEXNAME)
-# define AI_MAKE_EMBEDDED_TEXNAME(_n_) "*" # _n_
+# define AI_MAKE_EMBEDDED_TEXNAME(_n_) "*" # _n_
#endif
diff --git a/3rdparty/assimp/include/aiTypes.h b/3rdparty/assimp/include/aiTypes.h
index afa2b72df..de956dadd 100644
--- a/3rdparty/assimp/include/aiTypes.h
+++ b/3rdparty/assimp/include/aiTypes.h
@@ -63,12 +63,12 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "aiQuaternion.h"
#ifdef __cplusplus
-#include <new> // for std::nothrow_t
-#include <string> // for aiString::Set(const std::string&)
+#include <new> // for std::nothrow_t
+#include <string> // for aiString::Set(const std::string&)
-namespace Assimp {
+namespace Assimp {
//! @cond never
-namespace Intern {
+namespace Intern {
// --------------------------------------------------------------------
/** @brief Internal helper class to utilize our internal new/delete
* routines for allocating object of this and derived classes.
@@ -83,7 +83,7 @@ namespace Intern {
*/
// --------------------------------------------------------------------
#ifndef SWIG
- struct ASSIMP_API AllocateFromAssimpHeap {
+ struct ASSIMP_API AllocateFromAssimpHeap {
// http://www.gotw.ca/publications/mill15.htm
// new/delete overload
@@ -109,7 +109,7 @@ extern "C" {
#ifdef __cplusplus
const size_t MAXLEN = 1024;
#else
-# define MAXLEN 1024
+# define MAXLEN 1024
#endif
#include "./Compiler/pushpack1.h"
@@ -313,7 +313,7 @@ struct aiString
}
/** Append a string to the string */
- void Append (const char* app) {
+ void Append (const char* app) {
const size_t len = ::strlen(app);
if (!len) {
return;
@@ -327,7 +327,7 @@ struct aiString
}
/** Clear the string - reset its length to zero */
- void Clear () {
+ void Clear () {
length = 0;
data[0] = '\0';
@@ -350,7 +350,7 @@ struct aiString
// ----------------------------------------------------------------------------------
-/** Standard return type for some library functions.
+/** Standard return type for some library functions.
* Rarely used, and if, mostly in the C API.
*/
enum aiReturn
@@ -448,8 +448,8 @@ struct aiMemoryInfo
, meshes (0)
, nodes (0)
, animations (0)
- , cameras (0)
- , lights (0)
+ , cameras (0)
+ , lights (0)
, total (0)
{}
diff --git a/3rdparty/assimp/include/aiVector2D.h b/3rdparty/assimp/include/aiVector2D.h
index 728739d51..c9533aa72 100644
--- a/3rdparty/assimp/include/aiVector2D.h
+++ b/3rdparty/assimp/include/aiVector2D.h
@@ -108,7 +108,7 @@ struct aiVector2D
return x != other.x || y != other.y;
}
- aiVector2D& operator= (float f) {
+ aiVector2D& operator= (float f) {
x = y = f;return *this;
}
diff --git a/3rdparty/assimp/include/aiVector3D.inl b/3rdparty/assimp/include/aiVector3D.inl
index 6a4d57caa..c14b347bc 100644
--- a/3rdparty/assimp/include/aiVector3D.inl
+++ b/3rdparty/assimp/include/aiVector3D.inl
@@ -131,47 +131,47 @@ AI_FORCE_INLINE const aiVector3D aiVector3D::SymMul(const aiVector3D& o) {
}
// ------------------------------------------------------------------------------------------------
// symmetric addition
-AI_FORCE_INLINE aiVector3D operator + (const aiVector3D& v1, const aiVector3D& v2) {
+AI_FORCE_INLINE aiVector3D operator + (const aiVector3D& v1, const aiVector3D& v2) {
return aiVector3D( v1.x + v2.x, v1.y + v2.y, v1.z + v2.z);
}
// ------------------------------------------------------------------------------------------------
// symmetric subtraction
-AI_FORCE_INLINE aiVector3D operator - (const aiVector3D& v1, const aiVector3D& v2) {
+AI_FORCE_INLINE aiVector3D operator - (const aiVector3D& v1, const aiVector3D& v2) {
return aiVector3D( v1.x - v2.x, v1.y - v2.y, v1.z - v2.z);
}
// ------------------------------------------------------------------------------------------------
// scalar product
-AI_FORCE_INLINE float operator * (const aiVector3D& v1, const aiVector3D& v2) {
+AI_FORCE_INLINE float operator * (const aiVector3D& v1, const aiVector3D& v2) {
return v1.x*v2.x + v1.y*v2.y + v1.z*v2.z;
}
// ------------------------------------------------------------------------------------------------
// scalar multiplication
-AI_FORCE_INLINE aiVector3D operator * ( float f, const aiVector3D& v) {
+AI_FORCE_INLINE aiVector3D operator * ( float f, const aiVector3D& v) {
return aiVector3D( f*v.x, f*v.y, f*v.z);
}
// ------------------------------------------------------------------------------------------------
// and the other way around
-AI_FORCE_INLINE aiVector3D operator * ( const aiVector3D& v, float f) {
+AI_FORCE_INLINE aiVector3D operator * ( const aiVector3D& v, float f) {
return aiVector3D( f*v.x, f*v.y, f*v.z);
}
// ------------------------------------------------------------------------------------------------
// scalar division
-AI_FORCE_INLINE aiVector3D operator / ( const aiVector3D& v, float f) {
+AI_FORCE_INLINE aiVector3D operator / ( const aiVector3D& v, float f) {
return v * (1/f);
}
// ------------------------------------------------------------------------------------------------
// vector division
-AI_FORCE_INLINE aiVector3D operator / ( const aiVector3D& v, const aiVector3D& v2) {
+AI_FORCE_INLINE aiVector3D operator / ( const aiVector3D& v, const aiVector3D& v2) {
return aiVector3D(v.x / v2.x,v.y / v2.y,v.z / v2.z);
}
// ------------------------------------------------------------------------------------------------
// cross product
-AI_FORCE_INLINE aiVector3D operator ^ ( const aiVector3D& v1, const aiVector3D& v2) {
+AI_FORCE_INLINE aiVector3D operator ^ ( const aiVector3D& v1, const aiVector3D& v2) {
return aiVector3D( v1.y*v2.z - v1.z*v2.y, v1.z*v2.x - v1.x*v2.z, v1.x*v2.y - v1.y*v2.x);
}
// ------------------------------------------------------------------------------------------------
// vector inversion
-AI_FORCE_INLINE aiVector3D operator - ( const aiVector3D& v) {
+AI_FORCE_INLINE aiVector3D operator - ( const aiVector3D& v) {
return aiVector3D( -v.x, -v.y, -v.z);
}
diff --git a/3rdparty/assimp/include/assimp.hpp b/3rdparty/assimp/include/assimp.hpp
index 3557367ac..098a6cced 100644
--- a/3rdparty/assimp/include/assimp.hpp
+++ b/3rdparty/assimp/include/assimp.hpp
@@ -46,7 +46,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define INCLUDED_AI_ASSIMP_HPP
#ifndef __cplusplus
-# error This header requires C++ to be used. Use assimp.h for plain C.
+# error This header requires C++ to be used. Use assimp.h for plain C.
#endif
// Public ASSIMP data structures
@@ -54,7 +54,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "aiConfig.h"
#include "aiAssert.h"
-namespace Assimp {
+namespace Assimp {
// =======================================================================
// Public interface to Assimp
class Importer;
@@ -87,7 +87,7 @@ extern "C" ASSIMP_API const aiScene* aiImportFileFromMemory( const char*,
unsigned int,unsigned int,const char*);
/** @namespace Assimp Assimp's CPP-API and all internal APIs */
-namespace Assimp {
+namespace Assimp {
// ----------------------------------------------------------------------------------
/** CPP-API: The Importer class forms an C++ interface to the functionality of the
@@ -113,7 +113,7 @@ namespace Assimp {
* @note One Importer instance is not thread-safe. If you use multiple
* threads for loading, each thread should maintain its own Importer instance.
*/
-class ASSIMP_API Importer {
+class ASSIMP_API Importer {
// for internal use
friend class BaseProcess;
@@ -219,7 +219,7 @@ public:
* #GetPropertyBool and vice versa.
* @see SetPropertyInteger()
*/
- void SetPropertyBool(const char* szName, bool value, bool*) {
+ void SetPropertyBool(const char* szName, bool value, bool* bWasExisting = NULL) {
SetPropertyInteger(szName,value);
}
@@ -595,13 +595,13 @@ AI_FORCE_INLINE const aiScene* Importer::ReadFile( const std::string& pFile,unsi
return ReadFile(pFile.c_str(),pFlags);
}
// ----------------------------------------------------------------------------
-AI_FORCE_INLINE void Importer::GetExtensionList(std::string& szOut) const {
+AI_FORCE_INLINE void Importer::GetExtensionList(std::string& szOut) const {
aiString s;
GetExtensionList(s);
szOut = s.data;
}
// ----------------------------------------------------------------------------
-AI_FORCE_INLINE bool Importer::IsExtensionSupported(const std::string& szExtension) const {
+AI_FORCE_INLINE bool Importer::IsExtensionSupported(const std::string& szExtension) const {
return IsExtensionSupported(szExtension.c_str());
}
diff --git a/3rdparty/assimp/revision.h b/3rdparty/assimp/revision.h
index 21a667d61..d24da62ff 100644
--- a/3rdparty/assimp/revision.h
+++ b/3rdparty/assimp/revision.h
@@ -1 +1 @@
-#define SVNRevision 805
+#define SVNRevision 863
diff --git a/examples/quick3d/animations/animations.pro b/examples/quick3d/animations/animations.pro
new file mode 100644
index 000000000..fe6aa6346
--- /dev/null
+++ b/examples/quick3d/animations/animations.pro
@@ -0,0 +1,19 @@
+TEMPLATE = app
+TARGET = animations_qml
+CONFIG += qt warn_on
+
+CONFIG += qt3dquick_deploy_pkg
+include(../../../pkg.pri)
+
+SOURCES += main.cpp
+
+OTHER_FILES += \
+ animations_qml.rc \
+ animations_qml.desktop \
+ qml/animations.qml
+
+RC_FILE = animations_qml.rc
+
+RESOURCES += \
+ animations.qrc
+
diff --git a/examples/quick3d/animations/animations.qrc b/examples/quick3d/animations/animations.qrc
new file mode 100644
index 000000000..0336aaa93
--- /dev/null
+++ b/examples/quick3d/animations/animations.qrc
@@ -0,0 +1,7 @@
+<RCC>
+ <qresource prefix="/">
+ <file>qml/cube_rotated.dae</file>
+ <file>qml/animations.qml</file>
+ <file>qml/stonewal.jpg</file>
+ </qresource>
+</RCC>
diff --git a/examples/quick3d/animations/animations_qml.desktop b/examples/quick3d/animations/animations_qml.desktop
new file mode 100644
index 000000000..b300b9200
--- /dev/null
+++ b/examples/quick3d/animations/animations_qml.desktop
@@ -0,0 +1,7 @@
+[Desktop Entry]
+Type=Application
+Name=Animations
+Icon=/usr/share/icons/hicolor/80x80/apps/qtquick3d.png
+Exec=/usr/bin/invoker --type=e -s /usr/bin/animations_qml -fullscreen
+OnlyShowIn=X-MeeGo;
+X-MeeGo-Logical-Id=qtn_comm_appname_animations_qml
diff --git a/examples/quick3d/animations/animations_qml.rc b/examples/quick3d/animations/animations_qml.rc
new file mode 100644
index 000000000..1b6228c97
--- /dev/null
+++ b/examples/quick3d/animations/animations_qml.rc
@@ -0,0 +1 @@
+IDI_ICON1 ICON DISCARDABLE "qtquick3d.ico"
diff --git a/examples/quick3d/animations/main.cpp b/examples/quick3d/animations/main.cpp
new file mode 100644
index 000000000..4fed90faf
--- /dev/null
+++ b/examples/quick3d/animations/main.cpp
@@ -0,0 +1,66 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtQuick3D module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui/QApplication>
+#include "qdeclarativeview3d.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+
+ QDeclarativeView3D view;
+
+ view.setSource(QUrl(QLatin1String("qrc:///qml/animations.qml")));
+
+#ifdef Q_OS_SYMBIAN
+ view.setAttribute(Qt::WA_LockLandscapeOrientation, true);
+ view.setResizeMode(QDeclarativeView::SizeRootObjectToView);
+ view.showMaximized();
+#else
+ if (QApplication::arguments().contains(QLatin1String("-maximize")))
+ view.showMaximized();
+ else if (QApplication::arguments().contains(QLatin1String("-fullscreen")))
+ view.showFullScreen();
+ else
+ view.show();
+#endif
+
+ return app.exec();
+}
diff --git a/examples/quick3d/animations/qml/animations.qml b/examples/quick3d/animations/qml/animations.qml
new file mode 100644
index 000000000..6f4b88466
--- /dev/null
+++ b/examples/quick3d/animations/qml/animations.qml
@@ -0,0 +1,57 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtQuick3D examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [1]
+import QtQuick 1.0
+import Qt3D 1.0
+
+Viewport {
+ width: 640; height: 480
+
+ camera: Camera {
+ eye: Qt.vector3d(0, 80, 200)
+ }
+
+ Item3D {
+ mesh: Mesh { source: ":/qml/cube_rotated.dae" }
+ effect: Effect { texture: ":/qml/stonewal.jpg" }
+ }
+}
+//! [3]
diff --git a/examples/quick3d/animations/qml/cube_rotated.dae b/examples/quick3d/animations/qml/cube_rotated.dae
new file mode 100755
index 000000000..0bb2f0316
--- /dev/null
+++ b/examples/quick3d/animations/qml/cube_rotated.dae
@@ -0,0 +1,561 @@
+<?xml version="1.0" encoding="utf-8"?>
+<COLLADA xmlns="http://www.collada.org/2005/11/COLLADASchema" version="1.4.0">
+ <asset>
+ <contributor>
+ <author></author>
+ <authoring_tool>FBX COLLADA exporter</authoring_tool>
+ <comments></comments>
+ </contributor>
+ <created>2012-01-09T10:08:02Z</created>
+ <modified>2012-01-09T10:08:02Z</modified>
+ <revision></revision>
+ <title></title>
+ <subject></subject>
+ <keywords></keywords>
+ <unit meter="0.025400"/>
+ <up_axis>Y_UP</up_axis>
+ </asset>
+ <library_images>
+ <image id="Map__2-image" name="Map__2">
+ <init_from>file://stonewal.png</init_from>
+ </image>
+ <image id="Map__1-image" name="Map__1">
+ <init_from>file://waves.bmp</init_from>
+ </image>
+ </library_images>
+ <library_materials>
+ <material id="_02___Default" name="_02___Default">
+ <instance_effect url="#_02___Default-fx"/>
+ </material>
+ <material id="_01___Default" name="_01___Default">
+ <instance_effect url="#_01___Default-fx"/>
+ </material>
+ </library_materials>
+ <library_effects>
+ <effect id="_02___Default-fx" name="_02___Default">
+ <profile_COMMON>
+ <technique sid="standard">
+ <phong>
+ <emission>
+ <color sid="emission">0.000000 0.000000 0.000000 1.000000</color>
+ </emission>
+ <ambient>
+ <color sid="ambient">0.588235 0.588235 0.588235 1.000000</color>
+ </ambient>
+ <diffuse>
+ <texture texture="Map__2-image" texcoord="CHANNEL0">
+ <extra>
+ <technique profile="MAYA">
+ <wrapU sid="wrapU0">TRUE</wrapU>
+ <wrapV sid="wrapV0">TRUE</wrapV>
+ <blend_mode>ADD</blend_mode>
+ </technique>
+ </extra>
+ </texture>
+ </diffuse>
+ <specular>
+ <color sid="specular">0.000000 0.000000 0.000000 1.000000</color>
+ </specular>
+ <shininess>
+ <float sid="shininess">2.000000</float>
+ </shininess>
+ <reflective>
+ <color sid="reflective">0.000000 0.000000 0.000000 1.000000</color>
+ </reflective>
+ <reflectivity>
+ <float sid="reflectivity">1.000000</float>
+ </reflectivity>
+ <transparent>
+ <color sid="transparent">1.000000 1.000000 1.000000 1.000000</color>
+ </transparent>
+ <transparency>
+ <float sid="transparency">0.000000</float>
+ </transparency>
+ </phong>
+ </technique>
+ </profile_COMMON>
+ </effect>
+ <effect id="_01___Default-fx" name="_01___Default">
+ <profile_COMMON>
+ <technique sid="standard">
+ <phong>
+ <emission>
+ <color sid="emission">0.000000 0.000000 0.000000 1.000000</color>
+ </emission>
+ <ambient>
+ <color sid="ambient">0.588235 0.588235 0.588235 1.000000</color>
+ </ambient>
+ <diffuse>
+ <texture texture="Map__1-image" texcoord="CHANNEL0">
+ <extra>
+ <technique profile="MAYA">
+ <wrapU sid="wrapU0">TRUE</wrapU>
+ <wrapV sid="wrapV0">TRUE</wrapV>
+ <blend_mode>ADD</blend_mode>
+ </technique>
+ </extra>
+ </texture>
+ </diffuse>
+ <specular>
+ <color sid="specular">0.000000 0.000000 0.000000 1.000000</color>
+ </specular>
+ <shininess>
+ <float sid="shininess">2.000000</float>
+ </shininess>
+ <reflective>
+ <color sid="reflective">0.000000 0.000000 0.000000 1.000000</color>
+ </reflective>
+ <reflectivity>
+ <float sid="reflectivity">1.000000</float>
+ </reflectivity>
+ <transparent>
+ <color sid="transparent">1.000000 1.000000 1.000000 1.000000</color>
+ </transparent>
+ <transparency>
+ <float sid="transparency">0.000000</float>
+ </transparency>
+ </phong>
+ </technique>
+ </profile_COMMON>
+ </effect>
+ </library_effects>
+ <library_geometries>
+ <geometry id="Box01-lib" name="Box01Mesh">
+ <mesh>
+ <source id="Box01-lib-Position">
+ <float_array id="Box01-lib-Position-array" count="24">
+-50.000000 -50.000000 0.000000
+50.000000 -50.000000 0.000000
+-50.000000 50.000000 0.000000
+50.000000 50.000000 0.000000
+-50.000000 -50.000000 1.000000
+50.000000 -50.000000 1.000000
+-50.000000 50.000000 1.000000
+50.000000 50.000000 1.000000
+</float_array>
+ <technique_common>
+ <accessor source="#Box01-lib-Position-array" count="8" stride="3">
+ <param name="X" type="float"/>
+ <param name="Y" type="float"/>
+ <param name="Z" type="float"/>
+ </accessor>
+ </technique_common>
+ </source>
+ <source id="Box01-lib-Normal0">
+ <float_array id="Box01-lib-Normal0-array" count="108">
+0.000000 0.000000 -1.000000
+0.000000 0.000000 -1.000000
+0.000000 0.000000 -1.000000
+0.000000 0.000000 -1.000000
+0.000000 0.000000 -1.000000
+0.000000 0.000000 -1.000000
+0.000000 0.000000 1.000000
+0.000000 0.000000 1.000000
+0.000000 0.000000 1.000000
+0.000000 0.000000 1.000000
+0.000000 0.000000 1.000000
+0.000000 0.000000 1.000000
+0.000000 -1.000000 0.000000
+0.000000 -1.000000 0.000000
+0.000000 -1.000000 0.000000
+0.000000 -1.000000 0.000000
+0.000000 -1.000000 0.000000
+0.000000 -1.000000 0.000000
+1.000000 0.000000 0.000000
+1.000000 0.000000 0.000000
+1.000000 0.000000 0.000000
+1.000000 0.000000 0.000000
+1.000000 0.000000 0.000000
+1.000000 0.000000 0.000000
+0.000000 1.000000 0.000000
+0.000000 1.000000 0.000000
+0.000000 1.000000 0.000000
+0.000000 1.000000 0.000000
+0.000000 1.000000 0.000000
+0.000000 1.000000 0.000000
+-1.000000 0.000000 0.000000
+-1.000000 0.000000 0.000000
+-1.000000 0.000000 0.000000
+-1.000000 0.000000 0.000000
+-1.000000 0.000000 0.000000
+-1.000000 0.000000 0.000000
+</float_array>
+ <technique_common>
+ <accessor source="#Box01-lib-Normal0-array" count="36" stride="3">
+ <param name="X" type="float"/>
+ <param name="Y" type="float"/>
+ <param name="Z" type="float"/>
+ </accessor>
+ </technique_common>
+ </source>
+ <source id="Box01-lib-UV0">
+ <float_array id="Box01-lib-UV0-array" count="24">
+0.000000 0.000000
+1.000000 0.000000
+0.000000 1.000000
+1.000000 1.000000
+0.000000 0.000000
+1.000000 0.000000
+0.000000 1.000000
+1.000000 1.000000
+0.000000 0.000000
+1.000000 0.000000
+0.000000 1.000000
+1.000000 1.000000
+</float_array>
+ <technique_common>
+ <accessor source="#Box01-lib-UV0-array" count="12" stride="2">
+ <param name="S" type="float"/>
+ <param name="T" type="float"/>
+ </accessor>
+ </technique_common>
+ </source>
+ <vertices id="Box01-lib-Vertex">
+ <input semantic="POSITION" source="#Box01-lib-Position"/>
+ </vertices>
+ <polygons material="_02___Default" count="12">
+ <input semantic="VERTEX" offset="0" source="#Box01-lib-Vertex"/>
+ <input semantic="NORMAL" offset="1" source="#Box01-lib-Normal0"/>
+ <input semantic="TEXCOORD" offset="2" set="0" source="#Box01-lib-UV0"/>
+ <p>0 0 9 2 1 11 3 2 10</p>
+ <p>3 3 10 1 4 8 0 5 9</p>
+ <p>4 6 8 5 7 9 7 8 11</p>
+ <p>7 9 11 6 10 10 4 11 8</p>
+ <p>0 12 4 1 13 5 5 14 7</p>
+ <p>5 15 7 4 16 6 0 17 4</p>
+ <p>1 18 0 3 19 1 7 20 3</p>
+ <p>7 21 3 5 22 2 1 23 0</p>
+ <p>3 24 4 2 25 5 6 26 7</p>
+ <p>6 27 7 7 28 6 3 29 4</p>
+ <p>2 30 0 0 31 1 4 32 3</p>
+ <p>4 33 3 6 34 2 2 35 0</p>
+ </polygons>
+ </mesh>
+ </geometry>
+ <geometry id="Box02-lib" name="Box02Mesh">
+ <mesh>
+ <source id="Box02-lib-Position">
+ <float_array id="Box02-lib-Position-array" count="24">
+-20.000000 -20.000000 0.000000
+20.000000 -20.000000 0.000000
+-20.000000 20.000000 0.000000
+20.000000 20.000000 0.000000
+-20.000000 -20.000000 20.000000
+20.000000 -20.000000 20.000000
+-20.000000 20.000000 20.000000
+20.000000 20.000000 20.000000
+</float_array>
+ <technique_common>
+ <accessor source="#Box02-lib-Position-array" count="8" stride="3">
+ <param name="X" type="float"/>
+ <param name="Y" type="float"/>
+ <param name="Z" type="float"/>
+ </accessor>
+ </technique_common>
+ </source>
+ <source id="Box02-lib-Normal0">
+ <float_array id="Box02-lib-Normal0-array" count="108">
+0.000000 0.000000 -1.000000
+0.000000 0.000000 -1.000000
+0.000000 0.000000 -1.000000
+0.000000 0.000000 -1.000000
+0.000000 0.000000 -1.000000
+0.000000 0.000000 -1.000000
+0.000000 0.000000 1.000000
+0.000000 0.000000 1.000000
+0.000000 0.000000 1.000000
+0.000000 0.000000 1.000000
+0.000000 0.000000 1.000000
+0.000000 0.000000 1.000000
+0.000000 -1.000000 0.000000
+0.000000 -1.000000 0.000000
+0.000000 -1.000000 0.000000
+0.000000 -1.000000 0.000000
+0.000000 -1.000000 0.000000
+0.000000 -1.000000 0.000000
+1.000000 0.000000 0.000000
+1.000000 0.000000 0.000000
+1.000000 0.000000 0.000000
+1.000000 0.000000 0.000000
+1.000000 0.000000 0.000000
+1.000000 0.000000 0.000000
+0.000000 1.000000 0.000000
+0.000000 1.000000 0.000000
+0.000000 1.000000 0.000000
+0.000000 1.000000 0.000000
+0.000000 1.000000 0.000000
+0.000000 1.000000 0.000000
+-1.000000 0.000000 0.000000
+-1.000000 0.000000 0.000000
+-1.000000 0.000000 0.000000
+-1.000000 0.000000 0.000000
+-1.000000 0.000000 0.000000
+-1.000000 0.000000 0.000000
+</float_array>
+ <technique_common>
+ <accessor source="#Box02-lib-Normal0-array" count="36" stride="3">
+ <param name="X" type="float"/>
+ <param name="Y" type="float"/>
+ <param name="Z" type="float"/>
+ </accessor>
+ </technique_common>
+ </source>
+ <source id="Box02-lib-UV0">
+ <float_array id="Box02-lib-UV0-array" count="24">
+0.000000 0.000000
+1.000000 0.000000
+0.000000 1.000000
+1.000000 1.000000
+0.000000 0.000000
+1.000000 0.000000
+0.000000 1.000000
+1.000000 1.000000
+0.000000 0.000000
+1.000000 0.000000
+0.000000 1.000000
+1.000000 1.000000
+</float_array>
+ <technique_common>
+ <accessor source="#Box02-lib-UV0-array" count="12" stride="2">
+ <param name="S" type="float"/>
+ <param name="T" type="float"/>
+ </accessor>
+ </technique_common>
+ </source>
+ <vertices id="Box02-lib-Vertex">
+ <input semantic="POSITION" source="#Box02-lib-Position"/>
+ </vertices>
+ <polygons material="_01___Default" count="12">
+ <input semantic="VERTEX" offset="0" source="#Box02-lib-Vertex"/>
+ <input semantic="NORMAL" offset="1" source="#Box02-lib-Normal0"/>
+ <input semantic="TEXCOORD" offset="2" set="0" source="#Box02-lib-UV0"/>
+ <p>0 0 9 2 1 11 3 2 10</p>
+ <p>3 3 10 1 4 8 0 5 9</p>
+ <p>4 6 8 5 7 9 7 8 11</p>
+ <p>7 9 11 6 10 10 4 11 8</p>
+ <p>0 12 4 1 13 5 5 14 7</p>
+ <p>5 15 7 4 16 6 0 17 4</p>
+ <p>1 18 0 3 19 1 7 20 3</p>
+ <p>7 21 3 5 22 2 1 23 0</p>
+ <p>3 24 4 2 25 5 6 26 7</p>
+ <p>6 27 7 7 28 6 3 29 4</p>
+ <p>2 30 0 0 31 1 4 32 3</p>
+ <p>4 33 3 6 34 2 2 35 0</p>
+ </polygons>
+ </mesh>
+ </geometry>
+ </library_geometries>
+ <library_animations>
+ <animation id="Box02-anim" name="Box02">
+ <animation>
+ <source id="Box02-rotateX-animation-inputANGLE">
+ <float_array id="Box02-rotateX-animation-inputANGLE-array" count="2">
+
+0.000000 0.800000</float_array>
+ <technique_common>
+ <accessor source="#Box02-rotateX-animation-inputANGLE-array" count="2">
+ <param name="TIME" type="float"/>
+ </accessor>
+ </technique_common>
+ </source>
+ <source id="Box02-rotateX-animation-outputANGLE">
+ <float_array id="Box02-rotateX-animation-outputANGLE-array" count="2">
+
+0.000000 0.000000</float_array>
+ <technique_common>
+ <accessor source="#Box02-rotateX-animation-outputANGLE-array" count="2">
+ <param name="ANGLE" type="float"/>
+ </accessor>
+ </technique_common>
+ </source>
+ <source id="Box02-rotateX-animation-intanANGLE">
+ <float_array id="Box02-rotateX-animation-intanANGLE-array" count="2">
+
+0.000000 -0.000000</float_array>
+ <technique_common>
+ <accessor source="#Box02-rotateX-animation-intanANGLE-array" count="2">
+ <param name="ANGLE" type="float"/>
+ </accessor>
+ </technique_common>
+ </source>
+ <source id="Box02-rotateX-animation-outtanANGLE">
+ <float_array id="Box02-rotateX-animation-outtanANGLE-array" count="2">
+
+0.000000 0.000000</float_array>
+ <technique_common>
+ <accessor source="#Box02-rotateX-animation-outtanANGLE-array" count="2">
+ <param name="ANGLE" type="float"/>
+ </accessor>
+ </technique_common>
+ </source>
+ <source id="Box02-rotateX-animation-interpolationANGLE">
+ <Name_array id="Box02-rotateX-animation-interpolationANGLE-array" count="2">
+ BEZIER BEZIER</Name_array>
+ <technique_common>
+ <accessor source="#Box02-rotateX-animation-interpolationANGLE-array" count="2">
+ <param type="name"/>
+ </accessor>
+ </technique_common>
+ </source>
+ <sampler id="Box02-rotateX-animationANGLE">
+ <input semantic="INPUT" source="#Box02-rotateX-animation-inputANGLE"/>
+ <input semantic="OUTPUT" source="#Box02-rotateX-animation-outputANGLE"/>
+ <input semantic="IN_TANGENT" source="#Box02-rotateX-animation-intanANGLE"/>
+ <input semantic="OUT_TANGENT" source="#Box02-rotateX-animation-outtanANGLE"/>
+ <input semantic="INTERPOLATION" source="#Box02-rotateX-animation-interpolationANGLE"/>
+ </sampler>
+ <channel source="#Box02-rotateX-animationANGLE" target="Box02/rotateX.ANGLE"/>
+ </animation>
+ <animation>
+ <source id="Box02-rotateY-animation-inputANGLE">
+ <float_array id="Box02-rotateY-animation-inputANGLE-array" count="2">
+
+0.000000 0.800000</float_array>
+ <technique_common>
+ <accessor source="#Box02-rotateY-animation-inputANGLE-array" count="2">
+ <param name="TIME" type="float"/>
+ </accessor>
+ </technique_common>
+ </source>
+ <source id="Box02-rotateY-animation-outputANGLE">
+ <float_array id="Box02-rotateY-animation-outputANGLE-array" count="2">
+
+-0.000000 -0.000000</float_array>
+ <technique_common>
+ <accessor source="#Box02-rotateY-animation-outputANGLE-array" count="2">
+ <param name="ANGLE" type="float"/>
+ </accessor>
+ </technique_common>
+ </source>
+ <source id="Box02-rotateY-animation-intanANGLE">
+ <float_array id="Box02-rotateY-animation-intanANGLE-array" count="2">
+
+0.000000 -0.000000</float_array>
+ <technique_common>
+ <accessor source="#Box02-rotateY-animation-intanANGLE-array" count="2">
+ <param name="ANGLE" type="float"/>
+ </accessor>
+ </technique_common>
+ </source>
+ <source id="Box02-rotateY-animation-outtanANGLE">
+ <float_array id="Box02-rotateY-animation-outtanANGLE-array" count="2">
+
+0.000000 0.000000</float_array>
+ <technique_common>
+ <accessor source="#Box02-rotateY-animation-outtanANGLE-array" count="2">
+ <param name="ANGLE" type="float"/>
+ </accessor>
+ </technique_common>
+ </source>
+ <source id="Box02-rotateY-animation-interpolationANGLE">
+ <Name_array id="Box02-rotateY-animation-interpolationANGLE-array" count="2">
+ BEZIER BEZIER</Name_array>
+ <technique_common>
+ <accessor source="#Box02-rotateY-animation-interpolationANGLE-array" count="2">
+ <param type="name"/>
+ </accessor>
+ </technique_common>
+ </source>
+ <sampler id="Box02-rotateY-animationANGLE">
+ <input semantic="INPUT" source="#Box02-rotateY-animation-inputANGLE"/>
+ <input semantic="OUTPUT" source="#Box02-rotateY-animation-outputANGLE"/>
+ <input semantic="IN_TANGENT" source="#Box02-rotateY-animation-intanANGLE"/>
+ <input semantic="OUT_TANGENT" source="#Box02-rotateY-animation-outtanANGLE"/>
+ <input semantic="INTERPOLATION" source="#Box02-rotateY-animation-interpolationANGLE"/>
+ </sampler>
+ <channel source="#Box02-rotateY-animationANGLE" target="Box02/rotateY.ANGLE"/>
+ </animation>
+ <animation>
+ <source id="Box02-rotateZ-animation-inputANGLE">
+ <float_array id="Box02-rotateZ-animation-inputANGLE-array" count="2">
+
+0.000000 0.800000</float_array>
+ <technique_common>
+ <accessor source="#Box02-rotateZ-animation-inputANGLE-array" count="2">
+ <param name="TIME" type="float"/>
+ </accessor>
+ </technique_common>
+ </source>
+ <source id="Box02-rotateZ-animation-outputANGLE">
+ <float_array id="Box02-rotateZ-animation-outputANGLE-array" count="2">
+
+0.000000 90.000008</float_array>
+ <technique_common>
+ <accessor source="#Box02-rotateZ-animation-outputANGLE-array" count="2">
+ <param name="ANGLE" type="float"/>
+ </accessor>
+ </technique_common>
+ </source>
+ <source id="Box02-rotateZ-animation-intanANGLE">
+ <float_array id="Box02-rotateZ-animation-intanANGLE-array" count="2">
+
+0.000000 -0.000000</float_array>
+ <technique_common>
+ <accessor source="#Box02-rotateZ-animation-intanANGLE-array" count="2">
+ <param name="ANGLE" type="float"/>
+ </accessor>
+ </technique_common>
+ </source>
+ <source id="Box02-rotateZ-animation-outtanANGLE">
+ <float_array id="Box02-rotateZ-animation-outtanANGLE-array" count="2">
+
+0.000000 0.000000</float_array>
+ <technique_common>
+ <accessor source="#Box02-rotateZ-animation-outtanANGLE-array" count="2">
+ <param name="ANGLE" type="float"/>
+ </accessor>
+ </technique_common>
+ </source>
+ <source id="Box02-rotateZ-animation-interpolationANGLE">
+ <Name_array id="Box02-rotateZ-animation-interpolationANGLE-array" count="2">
+ BEZIER BEZIER</Name_array>
+ <technique_common>
+ <accessor source="#Box02-rotateZ-animation-interpolationANGLE-array" count="2">
+ <param type="name"/>
+ </accessor>
+ </technique_common>
+ </source>
+ <sampler id="Box02-rotateZ-animationANGLE">
+ <input semantic="INPUT" source="#Box02-rotateZ-animation-inputANGLE"/>
+ <input semantic="OUTPUT" source="#Box02-rotateZ-animation-outputANGLE"/>
+ <input semantic="IN_TANGENT" source="#Box02-rotateZ-animation-intanANGLE"/>
+ <input semantic="OUT_TANGENT" source="#Box02-rotateZ-animation-outtanANGLE"/>
+ <input semantic="INTERPOLATION" source="#Box02-rotateZ-animation-interpolationANGLE"/>
+ </sampler>
+ <channel source="#Box02-rotateZ-animationANGLE" target="Box02/rotateZ.ANGLE"/>
+ </animation>
+ </animation>
+ </library_animations>
+ <library_visual_scenes>
+ <visual_scene id="RootNode" name="RootNode">
+ <node id="Box01" name="Box01">
+ <rotate sid="jointOrientX">1 0 0 -90.000000</rotate>
+ <instance_geometry url="#Box01-lib">
+ <bind_material>
+ <technique_common>
+ <instance_material symbol="_02___Default" target="#_02___Default"/>
+ </technique_common>
+ </bind_material>
+ </instance_geometry>
+ </node>
+ <node id="Box02" name="Box02">
+ <translate sid="translate">0.000000 5.000000 -0.000000</translate>
+ <rotate sid="jointOrientX">1 0 0 -90.000000</rotate>
+ <rotate sid="rotateZ">0 0 1 0.000000</rotate>
+ <rotate sid="rotateY">0 1 0 0.000000</rotate>
+ <rotate sid="rotateX">1 0 0 0.000000</rotate>
+ <instance_geometry url="#Box02-lib">
+ <bind_material>
+ <technique_common>
+ <instance_material symbol="_01___Default" target="#_01___Default"/>
+ </technique_common>
+ </bind_material>
+ </instance_geometry>
+ </node>
+ </visual_scene>
+ </library_visual_scenes>
+ <scene>
+ <instance_visual_scene url="#RootNode"/>
+ </scene>
+</COLLADA>
+
diff --git a/examples/quick3d/animations/qml/stonewal.jpg b/examples/quick3d/animations/qml/stonewal.jpg
new file mode 100644
index 000000000..226672a29
--- /dev/null
+++ b/examples/quick3d/animations/qml/stonewal.jpg
Binary files differ
diff --git a/examples/quick3d/animations/qtquick3d.ico b/examples/quick3d/animations/qtquick3d.ico
new file mode 100644
index 000000000..c695ac72b
--- /dev/null
+++ b/examples/quick3d/animations/qtquick3d.ico
Binary files differ
diff --git a/examples/quick3d/animations/qtquick3d.png b/examples/quick3d/animations/qtquick3d.png
new file mode 100644
index 000000000..8351083ed
--- /dev/null
+++ b/examples/quick3d/animations/qtquick3d.png
Binary files differ
diff --git a/examples/quick3d/quick3d.pro b/examples/quick3d/quick3d.pro
index 10f0ca242..af523da88 100644
--- a/examples/quick3d/quick3d.pro
+++ b/examples/quick3d/quick3d.pro
@@ -1,5 +1,6 @@
TEMPLATE = subdirs
SUBDIRS += \
+ animations \
basket \
cube \
forest \
diff --git a/src/plugins/sceneformats/assimp/qaiscenehandler.cpp b/src/plugins/sceneformats/assimp/qaiscenehandler.cpp
index 928a2c8de..5ae16c367 100644
--- a/src/plugins/sceneformats/assimp/qaiscenehandler.cpp
+++ b/src/plugins/sceneformats/assimp/qaiscenehandler.cpp
@@ -70,6 +70,10 @@
QT_BEGIN_NAMESPACE
+#ifdef _DEBUG
+void DumpScene(const aiScene* pScene);
+#endif
+
QAiSceneHandler::QAiSceneHandler()
: m_options(qAiPostProcessPreset)
, m_showWarnings(false)
@@ -248,8 +252,8 @@ QGLAbstractScene *QAiSceneHandler::read()
m_importer.SetPropertyInteger(AI_CONFIG_PP_RVC_FLAGS, m_removeComponentFlags);
m_importer.SetPropertyInteger(AI_CONFIG_PP_SBP_REMOVE, m_removeSortFlags);
- m_importer.SetPropertyInteger(AI_CONFIG_PP_SLM_VERTEX_LIMIT, m_meshSplitVertexLimit);
- m_importer.SetPropertyInteger(AI_CONFIG_PP_SLM_TRIANGLE_LIMIT, m_meshSplitTriangleLimit);
+ //m_importer.SetPropertyInteger(AI_CONFIG_PP_SLM_VERTEX_LIMIT, m_meshSplitVertexLimit);
+ //m_importer.SetPropertyInteger(AI_CONFIG_PP_SLM_TRIANGLE_LIMIT, m_meshSplitTriangleLimit);
// force this on, and provide no way to turn it off. Its set by the
// aiProcessPreset_TargetRealtime_Quality option in the constructor.
@@ -278,6 +282,11 @@ QGLAbstractScene *QAiSceneHandler::read()
finalize();
return 0;
}
+#ifdef _DEBUG
+ else {
+ DumpScene(scene);
+ }
+#endif
QAiScene *qscene = new QAiScene(scene, this);
@@ -364,16 +373,81 @@ void QAiSceneHandler::downloadComplete(QByteArray sceneData)
qWarning("Asset importer error: %s\n", m_importer.GetErrorString());
if (log)
qWarning("For details check log: %s/AssimpLog.txt\n", qPrintable(c));
- } else {
+ }
+#ifdef _DEBUG
+ else {
+ DumpScene(scene);
//If we have reached this point everything has proceeded correctly,
//load the scene.
QAiScene *theScene = qobject_cast<QAiScene*>(getScene());
theScene->loadScene(scene);
}
+#endif
Assimp::DefaultLogger::kill();
finalize();
}
+#ifdef _DEBUG
+void LogPrint(const char* pFormat, ...)
+{
+ static char buff[1024];
+ buff[0] = '\0';
+ va_list args;
+ va_start(args, pFormat);
+ vsnprintf( buff, sizeof(buff) - 1, pFormat, args);
+ qDebug() << buff;
+}
+
+void DumpAnimation(int i, const aiAnimation* pAnimation, const aiScene* pScene)
+{
+ Q_UNUSED(pScene);
+ LogPrint(" Animation %d",i);
+ LogPrint(" name = '%s'",pAnimation->mName.data);
+ LogPrint(" ticks = %f",pAnimation->mDuration);
+ LogPrint(" ticks per sec = %f",pAnimation->mTicksPerSecond);
+ for (unsigned int i=0; i<pAnimation->mNumChannels; ++i) {
+ const aiNodeAnim* pNodeAnim = pAnimation->mChannels[i];
+ LogPrint(" channel %d affects: '%s'", i, pNodeAnim->mNodeName.data);
+ }
+}
+
+void DumpMesh(int i, const aiMesh* pMesh, const aiScene* pScene)
+{
+ Q_UNUSED(pScene);
+ LogPrint(" Mesh %d",i);
+ LogPrint(" name = '%s'",pMesh->mName.data);
+ LogPrint(" has bones: %s (%d)",pMesh->HasBones()?"YES":"no ",pMesh->mNumBones);
+}
+void DumpNodeRecursive(int level, const aiNode* pNode, const aiScene* pScene)
+{
+ if (level > 100)
+ level = 100;
+ char Prefix[256];
+ memset(Prefix,' ',level*2);
+ Prefix[level*2] = '\0';
+ LogPrint(" %sNode, name='%s', nMeshes=%d",Prefix,pNode->mName.data,pNode->mNumMeshes);
+ for (unsigned int i=0; i<pNode->mNumChildren; ++i) {
+ DumpNodeRecursive(level+1, pNode->mChildren[i], pScene);
+ }
+}
+
+void DumpScene(const aiScene* pScene)
+{
+ LogPrint("DumpScene(%p)",pScene);
+ if (pScene) {
+ LogPrint(" has animations: %s (%d)",pScene->HasAnimations()?"YES":"no ",pScene->mNumAnimations);
+ LogPrint(" has meshes: %s (%d)",pScene->HasMeshes()?"YES":"no ",pScene->mNumMeshes);
+ for (unsigned int i=0; i<pScene->mNumAnimations; ++i) {
+ DumpAnimation(i,pScene->mAnimations[i],pScene);
+ }
+ for (unsigned int i=0; i<pScene->mNumMeshes; ++i) {
+ DumpMesh(i,pScene->mMeshes[i],pScene);
+ }
+ DumpNodeRecursive(0,pScene->mRootNode,pScene);
+ }
+}
+#endif
+
QT_END_NAMESPACE