diff options
author | dpope <daniel.pope@nokia.com> | 2012-02-03 15:37:27 +1000 |
---|---|---|
committer | Rohan McGovern <rohan.mcgovern@nokia.com> | 2012-02-10 07:24:28 +0100 |
commit | 667c6284ee945fc915fa0aa6494d37b54983ff4e (patch) | |
tree | 53aa0444fc698cde712fb8e0486e3da1a56f853d /3rdparty/assimp/code/ObjFileParser.cpp | |
parent | 62a6aaa31aa8a5e7ec9095f2b240938f7d3ee980 (diff) |
Deprecation readme for qt/quick3d repository.qml2
Conflicts:
.gitignore
3rdparty/assimp/README
3rdparty/assimp/code/3DSConverter.cpp
3rdparty/assimp/code/3DSHelper.h
3rdparty/assimp/code/3DSLoader.cpp
3rdparty/assimp/code/3DSLoader.h
3rdparty/assimp/code/ACLoader.cpp
3rdparty/assimp/code/ACLoader.h
3rdparty/assimp/code/ASELoader.cpp
3rdparty/assimp/code/ASELoader.h
3rdparty/assimp/code/ASEParser.cpp
3rdparty/assimp/code/ASEParser.h
3rdparty/assimp/code/Assimp.cpp
3rdparty/assimp/code/AssimpPCH.cpp
3rdparty/assimp/code/AssimpPCH.h
3rdparty/assimp/code/B3DImporter.cpp
3rdparty/assimp/code/B3DImporter.h
3rdparty/assimp/code/BVHLoader.cpp
3rdparty/assimp/code/BVHLoader.h
3rdparty/assimp/code/BaseImporter.cpp
3rdparty/assimp/code/BaseImporter.h
3rdparty/assimp/code/BaseProcess.cpp
3rdparty/assimp/code/BaseProcess.h
3rdparty/assimp/code/BlenderDNA.cpp
3rdparty/assimp/code/BlenderDNA.h
3rdparty/assimp/code/BlenderDNA.inl
3rdparty/assimp/code/BlenderIntermediate.h
3rdparty/assimp/code/BlenderLoader.cpp
3rdparty/assimp/code/BlenderLoader.h
3rdparty/assimp/code/BlenderModifier.cpp
3rdparty/assimp/code/BlenderModifier.h
3rdparty/assimp/code/BlenderScene.cpp
3rdparty/assimp/code/BlenderScene.h
3rdparty/assimp/code/BlenderSceneGen.h
3rdparty/assimp/code/BoostWorkaround/boost/LICENSE_1_0.txt
3rdparty/assimp/code/BoostWorkaround/boost/foreach.hpp
3rdparty/assimp/code/BoostWorkaround/boost/format.hpp
3rdparty/assimp/code/BoostWorkaround/boost/math/common_factor_rt.hpp
3rdparty/assimp/code/BoostWorkaround/boost/scoped_array.hpp
3rdparty/assimp/code/BoostWorkaround/boost/scoped_ptr.hpp
3rdparty/assimp/code/BoostWorkaround/boost/shared_array.hpp
3rdparty/assimp/code/BoostWorkaround/boost/shared_ptr.hpp
3rdparty/assimp/code/BoostWorkaround/boost/static_assert.hpp
3rdparty/assimp/code/BoostWorkaround/boost/timer.hpp
3rdparty/assimp/code/BoostWorkaround/boost/tuple/tuple.hpp
3rdparty/assimp/code/ByteSwap.h
3rdparty/assimp/code/COBLoader.cpp
3rdparty/assimp/code/COBLoader.h
3rdparty/assimp/code/COBScene.h
3rdparty/assimp/code/CSMLoader.cpp
3rdparty/assimp/code/CSMLoader.h
3rdparty/assimp/code/ColladaHelper.h
3rdparty/assimp/code/ColladaLoader.cpp
3rdparty/assimp/code/ColladaLoader.h
3rdparty/assimp/code/ColladaParser.cpp
3rdparty/assimp/code/ComputeUVMappingProcess.cpp
3rdparty/assimp/code/ComputeUVMappingProcess.h
3rdparty/assimp/code/ConvertToLHProcess.cpp
3rdparty/assimp/code/ConvertToLHProcess.h
3rdparty/assimp/code/DXFLoader.cpp
3rdparty/assimp/code/DXFLoader.h
3rdparty/assimp/code/DefaultIOStream.h
3rdparty/assimp/code/DefaultIOSystem.cpp
3rdparty/assimp/code/DefaultIOSystem.h
3rdparty/assimp/code/DefaultLogger.cpp
3rdparty/assimp/code/DefaultProgressHandler.h
3rdparty/assimp/code/Exceptional.h
3rdparty/assimp/code/FileLogStream.h
3rdparty/assimp/code/FileSystemFilter.h
3rdparty/assimp/code/FindDegenerates.h
3rdparty/assimp/code/FindInstancesProcess.cpp
3rdparty/assimp/code/FindInstancesProcess.h
3rdparty/assimp/code/FindInvalidDataProcess.cpp
3rdparty/assimp/code/FindInvalidDataProcess.h
3rdparty/assimp/code/GenFaceNormalsProcess.cpp
3rdparty/assimp/code/GenVertexNormalsProcess.cpp
3rdparty/assimp/code/GenericProperty.h
3rdparty/assimp/code/HMPFileData.h
3rdparty/assimp/code/HMPLoader.cpp
3rdparty/assimp/code/HalfLifeFileData.h
3rdparty/assimp/code/IFF.h
3rdparty/assimp/code/IRRLoader.cpp
3rdparty/assimp/code/IRRLoader.h
3rdparty/assimp/code/IRRMeshLoader.cpp
3rdparty/assimp/code/IRRMeshLoader.h
3rdparty/assimp/code/IRRShared.cpp
3rdparty/assimp/code/IRRShared.h
3rdparty/assimp/code/Importer.cpp
3rdparty/assimp/code/ImproveCacheLocality.cpp
3rdparty/assimp/code/JoinVerticesProcess.cpp
3rdparty/assimp/code/LWOAnimation.cpp
3rdparty/assimp/code/LWOAnimation.h
3rdparty/assimp/code/LWOBLoader.cpp
3rdparty/assimp/code/LWOFileData.h
3rdparty/assimp/code/LWOLoader.cpp
3rdparty/assimp/code/LWOLoader.h
3rdparty/assimp/code/LWOMaterial.cpp
3rdparty/assimp/code/LWSLoader.cpp
3rdparty/assimp/code/LWSLoader.h
3rdparty/assimp/code/LimitBoneWeightsProcess.cpp
3rdparty/assimp/code/LimitBoneWeightsProcess.h
3rdparty/assimp/code/LineSplitter.h
3rdparty/assimp/code/MD2FileData.h
3rdparty/assimp/code/MD2Loader.cpp
3rdparty/assimp/code/MD2Loader.h
3rdparty/assimp/code/MD2NormalTable.h
3rdparty/assimp/code/MD3FileData.h
3rdparty/assimp/code/MD3Loader.cpp
3rdparty/assimp/code/MD3Loader.h
3rdparty/assimp/code/MD4FileData.h
3rdparty/assimp/code/MD5Loader.cpp
3rdparty/assimp/code/MD5Loader.h
3rdparty/assimp/code/MD5Parser.cpp
3rdparty/assimp/code/MD5Parser.h
3rdparty/assimp/code/MDCFileData.h
3rdparty/assimp/code/MDCLoader.cpp
3rdparty/assimp/code/MDCLoader.h
3rdparty/assimp/code/MDLFileData.h
3rdparty/assimp/code/MDLLoader.cpp
3rdparty/assimp/code/MDLLoader.h
3rdparty/assimp/code/MS3DLoader.cpp
3rdparty/assimp/code/MS3DLoader.h
3rdparty/assimp/code/MakeVerboseFormat.cpp
3rdparty/assimp/code/MakeVerboseFormat.h
3rdparty/assimp/code/MaterialSystem.cpp
3rdparty/assimp/code/MaterialSystem.h
3rdparty/assimp/code/MemoryIOWrapper.h
3rdparty/assimp/code/NDOLoader.cpp
3rdparty/assimp/code/NDOLoader.h
3rdparty/assimp/code/NFFLoader.cpp
3rdparty/assimp/code/NFFLoader.h
3rdparty/assimp/code/OFFLoader.h
3rdparty/assimp/code/ObjFileData.h
3rdparty/assimp/code/ObjFileImporter.cpp
3rdparty/assimp/code/ObjFileImporter.h
3rdparty/assimp/code/ObjFileMtlImporter.cpp
3rdparty/assimp/code/ObjFileMtlImporter.h
3rdparty/assimp/code/ObjFileParser.cpp
3rdparty/assimp/code/ObjFileParser.h
3rdparty/assimp/code/ObjTools.h
3rdparty/assimp/code/OgreImporter.cpp
3rdparty/assimp/code/OgreImporter.h
3rdparty/assimp/code/OgreImporterMaterial.cpp
3rdparty/assimp/code/OptimizeGraph.cpp
3rdparty/assimp/code/OptimizeGraph.h
3rdparty/assimp/code/OptimizeMeshes.h
3rdparty/assimp/code/PlyLoader.cpp
3rdparty/assimp/code/PlyLoader.h
3rdparty/assimp/code/PlyParser.h
3rdparty/assimp/code/PretransformVertices.cpp
3rdparty/assimp/code/PretransformVertices.h
3rdparty/assimp/code/ProcessHelper.h
3rdparty/assimp/code/Q3BSPFileData.h
3rdparty/assimp/code/Q3BSPFileImporter.cpp
3rdparty/assimp/code/Q3BSPFileImporter.h
3rdparty/assimp/code/Q3BSPZipArchive.cpp
3rdparty/assimp/code/Q3BSPZipArchive.h
3rdparty/assimp/code/Q3DLoader.cpp
3rdparty/assimp/code/Q3DLoader.h
3rdparty/assimp/code/RawLoader.cpp
3rdparty/assimp/code/RawLoader.h
3rdparty/assimp/code/RemoveComments.cpp
3rdparty/assimp/code/RemoveComments.h
3rdparty/assimp/code/RemoveRedundantMaterials.cpp
3rdparty/assimp/code/RemoveRedundantMaterials.h
3rdparty/assimp/code/RemoveVCProcess.cpp
3rdparty/assimp/code/RemoveVCProcess.h
3rdparty/assimp/code/SGSpatialSort.h
3rdparty/assimp/code/SMDLoader.cpp
3rdparty/assimp/code/SMDLoader.h
3rdparty/assimp/code/STLLoader.cpp
3rdparty/assimp/code/STLLoader.h
3rdparty/assimp/code/SceneCombiner.cpp
3rdparty/assimp/code/SceneCombiner.h
3rdparty/assimp/code/ScenePreprocessor.cpp
3rdparty/assimp/code/ScenePreprocessor.h
3rdparty/assimp/code/SkeletonMeshBuilder.h
3rdparty/assimp/code/SortByPTypeProcess.cpp
3rdparty/assimp/code/SortByPTypeProcess.h
3rdparty/assimp/code/SpatialSort.cpp
3rdparty/assimp/code/SpatialSort.h
3rdparty/assimp/code/SplitLargeMeshes.cpp
3rdparty/assimp/code/SplitLargeMeshes.h
3rdparty/assimp/code/StandardShapes.cpp
3rdparty/assimp/code/StandardShapes.h
3rdparty/assimp/code/StdOStreamLogStream.h
3rdparty/assimp/code/StreamReader.h
3rdparty/assimp/code/StringComparison.h
3rdparty/assimp/code/Subdivision.cpp
3rdparty/assimp/code/Subdivision.h
3rdparty/assimp/code/TargetAnimation.cpp
3rdparty/assimp/code/TargetAnimation.h
3rdparty/assimp/code/TerragenLoader.cpp
3rdparty/assimp/code/TerragenLoader.h
3rdparty/assimp/code/TextureTransform.cpp
3rdparty/assimp/code/TextureTransform.h
3rdparty/assimp/code/TinyFormatter.h
3rdparty/assimp/code/TriangulateProcess.cpp
3rdparty/assimp/code/UnrealLoader.cpp
3rdparty/assimp/code/UnrealLoader.h
3rdparty/assimp/code/ValidateDataStructure.cpp
3rdparty/assimp/code/ValidateDataStructure.h
3rdparty/assimp/code/Vertex.h
3rdparty/assimp/code/VertexTriangleAdjacency.cpp
3rdparty/assimp/code/VertexTriangleAdjacency.h
3rdparty/assimp/code/Win32DebugLogStream.h
3rdparty/assimp/code/XFileImporter.h
3rdparty/assimp/code/XFileParser.cpp
3rdparty/assimp/code/aiAssert.cpp
3rdparty/assimp/code/assbin_chunks.h
3rdparty/assimp/code/fast_atof.h
3rdparty/assimp/code/irrXMLWrapper.h
3rdparty/assimp/code/res/resource.h
3rdparty/assimp/contrib/ConvertUTF/ConvertUTF.c
3rdparty/assimp/contrib/ConvertUTF/ConvertUTF.h
3rdparty/assimp/contrib/irrXML/heapsort.h
3rdparty/assimp/contrib/irrXML/irrArray.h
3rdparty/assimp/contrib/irrXML/irrString.h
3rdparty/assimp/contrib/irrXML/irrTypes.h
3rdparty/assimp/contrib/unzip/crypt.h
3rdparty/assimp/contrib/unzip/ioapi.c
3rdparty/assimp/contrib/unzip/unzip.h
3rdparty/assimp/include/Compiler/poppack1.h
3rdparty/assimp/include/Compiler/pushpack1.h
3rdparty/assimp/include/DefaultLogger.h
3rdparty/assimp/include/IOStream.h
3rdparty/assimp/include/IOSystem.h
3rdparty/assimp/include/LogStream.h
3rdparty/assimp/include/Logger.h
3rdparty/assimp/include/NullLogger.h
3rdparty/assimp/include/ProgressHandler.h
3rdparty/assimp/include/aiAnim.h
3rdparty/assimp/include/aiAssert.h
3rdparty/assimp/include/aiCamera.h
3rdparty/assimp/include/aiColor4D.inl
3rdparty/assimp/include/aiConfig.h
3rdparty/assimp/include/aiLight.h
3rdparty/assimp/include/aiMaterial.h
3rdparty/assimp/include/aiMaterial.inl
3rdparty/assimp/include/aiMatrix3x3.h
3rdparty/assimp/include/aiMatrix3x3.inl
3rdparty/assimp/include/aiMatrix4x4.h
3rdparty/assimp/include/aiMatrix4x4.inl
3rdparty/assimp/include/aiMesh.h
3rdparty/assimp/include/aiPostProcess.h
3rdparty/assimp/include/aiScene.h
3rdparty/assimp/include/aiTexture.h
3rdparty/assimp/include/aiTypes.h
3rdparty/assimp/include/aiVector2D.h
3rdparty/assimp/include/aiVector3D.inl
3rdparty/assimp/include/assimp.hpp
3rdparty/assimp/revision.h
README
debian/changelog
debian/control
debian/libqt4-3d-examples.install
debian/rules
demos/qt3d/cubehouse/cubehouse.desktop
demos/qt3d/cubehouse/cubehouse.pro
demos/qt3d/cubehouse/cubeview.cpp
demos/qt3d/cubehouse/cubeview.h
demos/qt3d/cubehouse/main.cpp
demos/qt3d/cubehouse/qt3d.ico
demos/qt3d/cubehouse/shaders/depth.frag
demos/qt3d/cubehouse/shaders/depth.vert
demos/qt3d/cubehouse/shaders/depthTestShader.frag
demos/qt3d/cubehouse/shaders/depthTestShader.vert
demos/qt3d/cubehouse/shaders/objectlineartexgen.frag
demos/qt3d/cubehouse/shaders/objectlineartexgen.vert
demos/qt3d/pageflip/pageflip.cpp
demos/qt3d/pageflip/pageflip.desktop
demos/qt3d/pageflip/pageflip.pro
demos/qt3d/pageflip/qt3d.ico
demos/qt3d/photobrowser3d/bytereader.cpp
demos/qt3d/photobrowser3d/filescanner.cpp
demos/qt3d/photobrowser3d/imageloader.cpp
demos/qt3d/photobrowser3d/main.cpp
demos/qt3d/photobrowser3d/photobrowser3d.desktop
demos/qt3d/photobrowser3d/photobrowser3d.pro
demos/qt3d/photobrowser3d/qatlas.cpp
demos/qt3d/photobrowser3d/qatlas.h
demos/qt3d/photobrowser3d/qfocusadaptor.cpp
demos/qt3d/photobrowser3d/qt3d.ico
demos/qt3d/photobrowser3d/shaders/replace_texture.fsh
demos/qt3d/photobrowser3d/shaders/replace_texture.vsh
demos/qt3d/photobrowser3d/threadpool.cpp
demos/qt3d/photobrowser3d/thumbnailableimage.cpp
demos/qt3d/photobrowser3d/thumbnailnode.cpp
demos/qt3d/qt3d.svg
demos/qt3d/shapes/qt3d.ico
demos/qt3d/shapes/shapes.cpp
demos/qt3d/shapes/shapes.desktop
demos/qt3d/shapes/shapes.pro
demos/qt3d/teaservice/qt3d.ico
demos/qt3d/teaservice/teaservice.cpp
demos/qt3d/teaservice/teaservice.desktop
demos/qt3d/teaservice/teaservice.pro
demos/quick3d/flickr3d/flickr3d.pro
demos/quick3d/flickr3d/flickr3d.rc
demos/quick3d/flickr3d/main.cpp
demos/quick3d/icon.png
demos/quick3d/model_viewer/main.cpp
demos/quick3d/model_viewer/model_viewer.desktop
demos/quick3d/model_viewer/model_viewer.pro
demos/quick3d/model_viewer/qml/FourButtons.qml
demos/quick3d/model_viewer/qml/LongButton.qml
demos/quick3d/model_viewer/qml/MainButton.qml
demos/quick3d/model_viewer/qml/ModelViewer.qml
demos/quick3d/model_viewer/qml/ShortButton.qml
demos/quick3d/model_viewer/qtquick3d.ico
demos/quick3d/qmlres.h
demos/quick3d/qtquick3d.svg
demos/quick3d/robo_bounce/main.cpp
demos/quick3d/robo_bounce/qml/Calculator/Calculator.qml
demos/quick3d/robo_bounce/qml/Calculator/CalculatorCore/Button.qml
demos/quick3d/robo_bounce/qml/Calculator/CalculatorCore/Display.qml
demos/quick3d/robo_bounce/qml/RoboBounce.qml
demos/quick3d/robo_bounce/qml/RobotCore/PushButton.qml
demos/quick3d/robo_bounce/qml/RobotCore/QMLPanels.qml
demos/quick3d/robo_bounce/qml/RobotCore/Robot.qml
demos/quick3d/robo_bounce/qml/RobotCore/TronCube.qml
demos/quick3d/robo_bounce/qtquick3d.ico
demos/quick3d/robo_bounce/robo_bounce.desktop
demos/quick3d/robo_bounce/robo_bounce.pro
demos/quick3d/robo_bounce/robo_bounce.qrc
demos/quick3d/tea_service/main.cpp
demos/quick3d/tea_service/qml/TeaService.qml
demos/quick3d/tea_service/qml/Teacup.qml
demos/quick3d/tea_service/qml/Teaspoon.qml
demos/quick3d/tea_service/qtquick3d.ico
demos/quick3d/tea_service/tea_service.desktop
demos/quick3d/tea_service/tea_service.pro
doc/config/qt-cpp-ignore.qdocconf
doc/src/index.qdoc
doc/src/qt3d-building.qdoc
doc/src/qt3d-contrib.qdoc
examples/qt3d/basket/basket.desktop
examples/qt3d/basket/basket.pro
examples/qt3d/basket/basketview.cpp
examples/qt3d/basket/basketview.h
examples/qt3d/basket/main.cpp
examples/qt3d/basket/qt3d.ico
examples/qt3d/builder/builder.cpp
examples/qt3d/builder/builder.desktop
examples/qt3d/builder/builder.h
examples/qt3d/builder/builder.pro
examples/qt3d/builder/main.cpp
examples/qt3d/builder/qt3d.ico
examples/qt3d/cube/cube.desktop
examples/qt3d/cube/cube.pro
examples/qt3d/cube/cubeview.cpp
examples/qt3d/cube/cubeview.h
examples/qt3d/cube/main.cpp
examples/qt3d/cube/qt3d.ico
examples/qt3d/cylinder/cylinder.desktop
examples/qt3d/cylinder/cylinder.pro
examples/qt3d/cylinder/cylinderview.cpp
examples/qt3d/cylinder/cylinderview.h
examples/qt3d/cylinder/main.cpp
examples/qt3d/cylinder/qt3d.ico
examples/qt3d/geometry/geometry.cpp
examples/qt3d/geometry/geometry.desktop
examples/qt3d/geometry/geometry.pro
examples/qt3d/geometry/geometryview.cpp
examples/qt3d/geometry/geometryview.h
examples/qt3d/geometry/main.cpp
examples/qt3d/geometry/qt3d.ico
examples/qt3d/nesting/cubeview.cpp
examples/qt3d/nesting/cubeview.h
examples/qt3d/nesting/main.cpp
examples/qt3d/nesting/nesting.desktop
examples/qt3d/nesting/nesting.pro
examples/qt3d/nesting/qt3d.ico
examples/qt3d/qt3d.pro
examples/qt3d/qt3d.svg
examples/qt3d/solarsystem/main.cpp
examples/qt3d/solarsystem/qt3d.ico
examples/qt3d/solarsystem/solarsystem.cpp
examples/qt3d/solarsystem/solarsystem.desktop
examples/qt3d/solarsystem/solarsystem.h
examples/qt3d/solarsystem/solarsystem.pro
examples/qt3d/tank/main.cpp
examples/qt3d/tank/qt3d.ico
examples/qt3d/tank/tank.desktop
examples/qt3d/tank/tank.pro
examples/qt3d/tank/tankview.cpp
examples/qt3d/tank/tankview.h
examples/qt3d/teapot/main.cpp
examples/qt3d/teapot/qt3d.ico
examples/qt3d/teapot/teapot.desktop
examples/qt3d/teapot/teapot.pro
examples/qt3d/teapot/teapotview.h
examples/quick3d/basket/basket.pro
examples/quick3d/basket/basket.qrc
examples/quick3d/basket/basket_qml.desktop
examples/quick3d/basket/main.cpp
examples/quick3d/basket/qml/Basket.qml
examples/quick3d/basket/qtquick3d.ico
examples/quick3d/cube/cube.pro
examples/quick3d/cube/main.cpp
examples/quick3d/cube/qml/Cube.qml
examples/quick3d/cube/qtquick3d.ico
examples/quick3d/forest/forest.pro
examples/quick3d/forest/forest.qrc
examples/quick3d/forest/main.cpp
examples/quick3d/forest/qml/Forest.qml
examples/quick3d/forest/qml/Tree.qml
examples/quick3d/forest/qtquick3d.ico
examples/quick3d/lander/lander.desktop
examples/quick3d/lander/lander.pro
examples/quick3d/lander/main.cpp
examples/quick3d/lander/qml/Lander.qml
examples/quick3d/lander/qtquick3d.ico
examples/quick3d/matrix_animation/main.cpp
examples/quick3d/matrix_animation/matrix_animation.desktop
examples/quick3d/matrix_animation/matrix_animation.pro
examples/quick3d/matrix_animation/qml/MatrixAnimation.qml
examples/quick3d/matrix_animation/qtquick3d.ico
examples/quick3d/monkeygod/main.cpp
examples/quick3d/monkeygod/monkeygod.desktop
examples/quick3d/monkeygod/monkeygod.pro
examples/quick3d/monkeygod/qml/Monkeygod.qml
examples/quick3d/monkeygod/qml/Penguin.qml
examples/quick3d/monkeygod/qml/desktop.qml
examples/quick3d/monkeygod/qtquick3d.ico
examples/quick3d/moon/main.cpp
examples/quick3d/moon/moon.desktop
examples/quick3d/moon/moon.pro
examples/quick3d/moon/qml/Moon.qml
examples/quick3d/moon/qml/desktop.qml
examples/quick3d/moon/qtquick3d.ico
examples/quick3d/photoroom/main.cpp
examples/quick3d/photoroom/mt.qml
examples/quick3d/photoroom/photoroom.desktop
examples/quick3d/photoroom/photoroom.pro
examples/quick3d/photoroom/qml/PhotoPane.qml
examples/quick3d/photoroom/qml/PhotoRoom.qml
examples/quick3d/photoroom/qml/textures/background.jpg
examples/quick3d/photoroom/qml/textures/basket.jpg
examples/quick3d/photoroom/qml/textures/niagara_falls.jpg
examples/quick3d/photoroom/qtquick3d.ico
examples/quick3d/qmlres.h
examples/quick3d/qtquick3d.svg
examples/quick3d/quick3d.pro
examples/quick3d/shaders/main.cpp
examples/quick3d/shaders/qml/Bouncing.qml
examples/quick3d/shaders/qml/Collapsing.qml
examples/quick3d/shaders/qml/Images.qml
examples/quick3d/shaders/qml/Interpolate.qml
examples/quick3d/shaders/qml/Shaders.qml
examples/quick3d/shaders/qtquick3d.ico
examples/quick3d/shaders/shaders.desktop
examples/quick3d/shaders/shaders.pro
examples/quick3d/sphere/main.cpp
examples/quick3d/sphere/qml/Sphere.qml
examples/quick3d/sphere/qtquick3d.ico
examples/quick3d/sphere/sphere.desktop
examples/quick3d/sphere/sphere.pro
features/qt3d.prf
features/qt3dquick.prf
pkg.pri
qtc_packaging/debian_harmattan/README
qtc_packaging/debian_harmattan/changelog
qtc_packaging/debian_harmattan/control
qtc_packaging/debian_harmattan/libqt4-3d-examples.install
qtc_packaging/debian_harmattan/rules
qtquick3d.pro
src/imports/shapes/cube.obj
src/imports/shapes/cube.qdoc
src/imports/shapes/line.cpp
src/imports/shapes/point.cpp
src/imports/shapes/quad.obj
src/imports/shapes/quad.qdoc
src/imports/shapes/shapes.pro
src/imports/shapes/spheremesh.h
src/imports/shapes/teapot.qdoc
src/imports/threed/qgraphicslookattransform.cpp
src/imports/threed/shaderprogram.cpp
src/imports/threed/shaderprogram.h
src/imports/threed/skybox.cpp
src/imports/threed/skybox.h
src/imports/threed/threed.cpp
src/imports/threed/threed.pro
src/imports/threed/viewport.cpp
src/imports/threed/viewport.h
src/plugins/imageformats/tga/main.cpp
src/plugins/imageformats/tga/qtgahandler.cpp
src/plugins/imageformats/tga/qtgahandler.h
src/plugins/plugins.pro
src/plugins/qpluginbase.pri
src/plugins/sceneformats/3ds/3ds.pro
src/plugins/sceneformats/3ds/qgl3dsscenehandler.cpp
src/plugins/sceneformats/3ds/qgl3dsscenehandler.h
src/plugins/sceneformats/assimp/ailoaderiosystem.cpp
src/plugins/sceneformats/assimp/assimp.pro
src/plugins/sceneformats/assimp/qailoader.cpp
src/plugins/sceneformats/assimp/qailoader.h
src/plugins/sceneformats/assimp/qaimesh.h
src/plugins/sceneformats/assimp/qaiscene.cpp
src/plugins/sceneformats/assimp/qaiscene.h
src/plugins/sceneformats/assimp/qaiscenehandler.cpp
src/plugins/sceneformats/assimp/qaiscenehandler.h
src/plugins/sceneformats/bezier/bezier.pro
src/plugins/sceneformats/bezier/main.cpp
src/plugins/sceneformats/bezier/qglbezierscenehandler.cpp
src/plugins/sceneformats/bezier/qglbezierscenehandler.h
src/plugins/sceneformats/obj/obj.pro
src/plugins/sceneformats/obj/qglobjscenehandler.cpp
src/plugins/sceneformats/obj/qglobjscenehandler.h
src/private/private.pri
src/private/qfactoryloader_p.h
src/quick3d/qdeclarativeeffect.cpp
src/quick3d/qdeclarativeitem3d.cpp
src/quick3d/qdeclarativeitem3d.h
src/quick3d/qdeclarativemesh.cpp
src/quick3d/qt3dquickglobal.h
src/quick3d/quick3d.pri
src/quick3d/quick3d.pro
src/scripts/build_src_package.sh
src/scripts/build_win_package.bat
src/scripts/build_win_package.nsi
src/scripts/filter-qmldump.pl
src/threed/api/api.pri
src/threed/api/gl-gen-funcs.pl
src/threed/arrays/qarray.h
src/threed/arrays/qglindexbuffer.cpp
src/threed/arrays/qglvertexbundle_p.h
src/threed/effects/qglcolladafxeffectfactory.cpp
src/threed/effects/qglshaderprogrameffect.cpp
src/threed/geometry/qgeometrydata.cpp
src/threed/geometry/qglbezierpatches.cpp
src/threed/geometry/qglcube.cpp
src/threed/geometry/qglcylinder.cpp
src/threed/geometry/qgldome.cpp
src/threed/global/qt3dglobal.h
src/threed/graphicsview/qglgraphicsviewportitem.cpp
src/threed/graphicsview/qglgraphicsviewportitem.h
src/threed/graphicsview/qgraphicsembedscene.cpp
src/threed/graphicsview/qgraphicsembedscene.h
src/threed/graphicsview/qgraphicsrotation3d.cpp
src/threed/materials/qglmaterial.cpp
src/threed/painting/qglext.cpp
src/threed/painting/qglext_p.h
src/threed/painting/qglpainter.cpp
src/threed/painting/qglpainter.h
src/threed/painting/qglpainter_p.h
src/threed/scene/qglabstractscene.cpp
src/threed/scene/qglabstractscene.h
src/threed/scene/qglrenderstate.cpp
src/threed/scene/qglsceneformatplugin.cpp
src/threed/scene/qglsceneformatplugin.h
src/threed/scene/qglscenenode.cpp
src/threed/scene/qglscenenode.h
src/threed/surfaces/qglabstractsurface.cpp
src/threed/surfaces/qglabstractsurface.h
src/threed/surfaces/qglcontextsurface.cpp
src/threed/surfaces/qglcontextsurface_p.h
src/threed/surfaces/qgldrawbuffersurface.cpp
src/threed/surfaces/qgldrawbuffersurface_p.h
src/threed/surfaces/qglframebufferobjectsurface.cpp
src/threed/surfaces/qglframebufferobjectsurface.h
src/threed/surfaces/qglmaskedsurface.cpp
src/threed/surfaces/qglmaskedsurface_p.h
src/threed/surfaces/qglpaintersurface.cpp
src/threed/surfaces/qglpaintersurface_p.h
src/threed/surfaces/qglpixelbuffersurface.cpp
src/threed/surfaces/qglpixelbuffersurface.h
src/threed/surfaces/qglsubsurface.cpp
src/threed/surfaces/qglsubsurface.h
src/threed/surfaces/qglwindowsurface.h
src/threed/surfaces/surfaces.pri
src/threed/textures/qglsharedresource.cpp
src/threed/textures/qgltexture2d.cpp
src/threed/textures/qgltexture2d.h
src/threed/textures/qgltexture2d_p.h
src/threed/textures/qgltextureutils.cpp
src/threed/textures/qgltextureutils_p.h
src/threed/threed.pri
src/threed/threed.pro
src/threed/viewing/qglcamera.cpp
src/threed/viewing/qglcamera.h
src/threed/viewing/qglview.cpp
src/threed/viewing/qglview.h
tests/auto/auto.pro
tests/auto/qml3d/QtQuickTest/TestCase.qml
tests/auto/qml3d/effect/tst_effect.qml
tests/auto/qml3d/item3d/tst_item3d.qml
tests/auto/qml3d/item3d/tst_item3d_local_v_world.qml
tests/auto/qml3d/item3d/tst_missing_texture_coordinates.qml
tests/auto/qml3d/lookat/tst_lookat.qml
tests/auto/qml3d/mesh/tst_mesh.qml
tests/auto/qml3d/modelview/tst_modelview.qml
tests/auto/qml3d/picking/tst_picking.qml
tests/auto/qml3d/qml3d.pro
tests/auto/qml3d/scale3d/tst_scale3d.qml
tests/auto/qml3d/sphere/tst_sphere.qml
tests/auto/qml3d/tst_qml3d.cpp
tests/auto/qml3d/viewport/tst_viewport.qml
tests/auto/threed/load_model/load_model.pro
tests/auto/threed/load_model/tst_load_model.cpp
tests/auto/threed/qareaallocator/qareaallocator.pro
tests/auto/threed/qarray/qarray.pro
tests/auto/threed/qbox3d/qbox3d.pro
tests/auto/threed/qcolor4ub/qcolor4ub.pro
tests/auto/threed/qcustomdataarray/qcustomdataarray.pro
tests/auto/threed/qgeometrydata/qgeometrydata.pro
tests/auto/threed/qgeometrydata/tst_qgeometrydata.cpp
tests/auto/threed/qglabstractsurface/qglabstractsurface.pro
tests/auto/threed/qglabstractsurface/tst_qglabstractsurface.cpp
tests/auto/threed/qglattributedescription/qglattributedescription.pro
tests/auto/threed/qglattributeset/qglattributeset.pro
tests/auto/threed/qglattributeset/tst_qglattributeset.cpp
tests/auto/threed/qglattributevalue/qglattributevalue.pro
tests/auto/threed/qglbezierpatches/qglbezierpatches.pro
tests/auto/threed/qglbuilder/qglbuilder.pro
tests/auto/threed/qglcamera/qglcamera.pro
tests/auto/threed/qglcameraanimation/qglcameraanimation.pro
tests/auto/threed/qglcameraanimation/tst_qglcameraanimation.cpp
tests/auto/threed/qglcolladafxeffectfactory/qglcolladafxeffectfactory.pro
tests/auto/threed/qglcube/qglcube.pro
tests/auto/threed/qglcube/tst_qglcube.cpp
tests/auto/threed/qglcylinder/qglcylinder.pro
tests/auto/threed/qglindexbuffer/qglindexbuffer.pro
tests/auto/threed/qglindexbuffer/tst_qglindexbuffer.cpp
tests/auto/threed/qgllightmodel/qgllightmodel.pro
tests/auto/threed/qgllightparameters/qgllightparameters.pro
tests/auto/threed/qglmaterial/qglmaterial.pro
tests/auto/threed/qglmaterial/tst_qglmaterial.cpp
tests/auto/threed/qglmaterialcollection/qglmaterialcollection.pro
tests/auto/threed/qglpainter/qglpainter.pro
tests/auto/threed/qglpainter/qgltestwidget.cpp
tests/auto/threed/qglpainter/qgltestwidget.h
tests/auto/threed/qglpainter/tst_qglpainter.cpp
tests/auto/threed/qglpickcolors/qglpickcolors.pro
tests/auto/threed/qglrender/qglrender.pro
tests/auto/threed/qglrender/tst_qglrender.cpp
tests/auto/threed/qglscenenode/qglscenenode.pro
tests/auto/threed/qglscenenode/tst_qglscenenode.cpp
tests/auto/threed/qglsection/qglsection.pro
tests/auto/threed/qglsharedresource/qglsharedresource.pro
tests/auto/threed/qglsharedresource/tst_qglsharedresource.cpp
tests/auto/threed/qglsphere/qglsphere.pro
tests/auto/threed/qglvertexbundle/qglvertexbundle.pro
tests/auto/threed/qglvertexbundle/tst_qglvertexbundle.cpp
tests/auto/threed/qgraphicstransform3d/qgraphicstransform3d.pro
tests/auto/threed/qplane3d/qplane3d.pro
tests/auto/threed/qray3d/qray3d.pro
tests/auto/threed/qsphere3d/qsphere3d.pro
tests/auto/threed/qstereoimage/qstereoimage.pro
tests/auto/threed/qtriangle3d/qtriangle3d.pro
tests/auto/threed/qvectorarray/qvectorarray.pro
tests/auto/threed/threed.pro
tests/benchmarks/matrix_properties/matrix_properties.pro
tests/benchmarks/matrix_properties/tst_matrix_properties.cpp
tests/benchmarks/qarray/qarray.pro
tests/benchmarks/qglbuilder_perf/qglbuilder_perf.pro
tests/manual/animations/animations.pro
tests/manual/animations/main.cpp
tests/manual/animations/qml/TestCase.qml
tests/manual/animations/qml/tst_animations.qml
tests/manual/animations/tst_animations_qml.desktop
tests/manual/background/main.cpp
tests/manual/basic/basic.pro
tests/manual/basic/main.cpp
tests/manual/displaymodel/displaymodel.pro
tests/manual/displaymodel/main.cpp
tests/manual/displaymodel/qml/tst_displaymodel.qml
tests/manual/fullreferencing/main.cpp
tests/manual/manual.pro
tests/manual/model3ds/main.cpp
tests/manual/model3ds/model3ds.pro
tests/manual/model3ds/qml/tst_model3ds.qml
tests/manual/model3ds/tst_submesh_qml.desktop
tests/manual/navigation1/main.cpp
tests/manual/navigation1/navigation1.pro
tests/manual/navigation1/qml/tst_navigation1.qml
tests/manual/qrc/main.cpp
tests/manual/qrc/qrc.pro
tests/manual/qrc/tst_qrc_qml.desktop
tests/manual/rotation/main.cpp
tests/manual/rotation/qml/TestCase.qml
tests/manual/rotation/qml/tst_rotation.qml
tests/manual/rotation/rotation.pro
tests/manual/rotation/tst_rotation_qml.desktop
tests/manual/scaling/main.cpp
tests/manual/scaling/qml/ScalingTestCase.qml
tests/manual/scaling/qml/tst_scaling.qml
tests/manual/scaling/scaling.pro
tests/manual/scaling/tst_scaling_qml.desktop
tests/manual/shapes/main.cpp
tests/manual/shapes/shapes.pro
tests/manual/submesh/main.cpp
tests/manual/submesh/qml/tst_submesh.qml
tests/manual/submesh/submesh.pro
tests/manual/submesh/tst_submesh_qml.desktop
tests/manual/transformations/main.cpp
tests/manual/transformations/qml/ComposedItemTransformationsTestCase.qml
tests/manual/transformations/qml/TransformationListTestCase.qml
tests/manual/transformations/qml/tst_transformations.qml
tests/manual/transformations/transformations.pro
tests/manual/transformations/tst_transformations_qml.desktop
tests/manual/translation/main.cpp
tests/manual/translation/qml/AxesVsVectorTestCase.qml
tests/manual/translation/qml/TranslationTestCase.qml
tests/manual/translation/qml/TranslationVectorTestCase.qml
tests/manual/translation/qml/tst_translation.qml
tests/manual/translation/translation.pro
tests/manual/translation/tst_translation_qml.desktop
tests/shared/qmlres.h
tests/shared/qtest_helpers.h
tests/tests.pro
tutorials/qt3d/cube1/cube1.pro
tutorials/qt3d/cube1/cubeview.cpp
tutorials/qt3d/cube1/cubeview.h
tutorials/qt3d/cube1/main.cpp
tutorials/qt3d/cube2/cube2.pro
tutorials/qt3d/cube2/cubeview.cpp
tutorials/qt3d/cube2/cubeview.h
tutorials/qt3d/cube2/main.cpp
tutorials/qt3d/cube3/cube3.pro
tutorials/qt3d/cube3/cubeview.cpp
tutorials/qt3d/cube3/cubeview.h
tutorials/qt3d/cube3/main.cpp
tutorials/qt3d/cube4/cube4.pro
tutorials/qt3d/cube4/cubeview.cpp
tutorials/qt3d/cube4/cubeview.h
tutorials/qt3d/cube4/main.cpp
tutorials/qt3d/penguin/main.cpp
tutorials/qt3d/penguin/modelview.h
tutorials/qt3d/penguin/penguin.pro
tutorials/qt3d/penguin_advanced/main.cpp
tutorials/qt3d/penguin_advanced/modelview.cpp
tutorials/qt3d/penguin_advanced/modelview.h
tutorials/qt3d/penguin_advanced/penguin_advanced.pro
tutorials/quick3d/qmlres.h
tutorials/quick3d/teapot_bounce_qml/main.cpp
tutorials/quick3d/teapot_bounce_qml/teapot_bounce_qml.desktop
tutorials/quick3d/teapot_bounce_qml/teapot_bounce_qml.pro
tutorials/quick3d/teapot_qml/main.cpp
tutorials/quick3d/teapot_qml/teapot_qml.desktop
tutorials/quick3d/teapot_qml/teapot_qml.pro
util/meshcvt/meshcvt.pro
util/qt3d/qglinfo/qglinfo.pro
util/qt3d/qglinfo/qglinfowindow.cpp
util/qt3d/qt3d.pro
Change-Id: I0983a5d634c16d9243210275091eff2227a4c2ec
Reviewed-by: Sarah Jane Smith <sarah.j.smith@nokia.com>
Diffstat (limited to '3rdparty/assimp/code/ObjFileParser.cpp')
-rw-r--r-- | 3rdparty/assimp/code/ObjFileParser.cpp | 664 |
1 files changed, 0 insertions, 664 deletions
diff --git a/3rdparty/assimp/code/ObjFileParser.cpp b/3rdparty/assimp/code/ObjFileParser.cpp deleted file mode 100644 index 98214ba4..00000000 --- a/3rdparty/assimp/code/ObjFileParser.cpp +++ /dev/null @@ -1,664 +0,0 @@ -/* ---------------------------------------------------------------------------- -Open Asset Import Library (ASSIMP) ---------------------------------------------------------------------------- - -Copyright (c) 2006-2010, ASSIMP Development Team - -All rights reserved. - -Redistribution and use of this software in source and binary forms, -with or without modification, are permitted provided that the following -conditions are met: - -* Redistributions of source code must retain the above - copyright notice, this list of conditions and the - following disclaimer. - -* Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the - following disclaimer in the documentation and/or other - materials provided with the distribution. - -* Neither the name of the ASSIMP team, nor the names of its - contributors may be used to endorse or promote products - derived from this software without specific prior - written permission of the ASSIMP Development Team. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ---------------------------------------------------------------------------- -*/ - -#include "AssimpPCH.h" -#ifndef ASSIMP_BUILD_NO_OBJ_IMPORTER - -#include "ObjFileParser.h" -#include "ObjFileMtlImporter.h" -#include "ObjTools.h" -#include "ObjFileData.h" -#include "fast_atof.h" -#include "../include/aiTypes.h" -#include "DefaultIOSystem.h" - -namespace Assimp -{ - -// ------------------------------------------------------------------- -const std::string ObjFileParser::DEFAULT_MATERIAL = AI_DEFAULT_MATERIAL_NAME; -// fix: changed that to our standard default name - -// ------------------------------------------------------------------- -// 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()), - m_pModel(NULL), - m_uiLine(0), - m_pIO( io ) -{ - // Create the model instance to store all the data - m_pModel = new ObjFile::Model(); - m_pModel->m_ModelName = strModelName; - - m_pModel->m_pDefaultMaterial = new ObjFile::Material(); - m_pModel->m_pDefaultMaterial->MaterialName.Set( DEFAULT_MATERIAL ); - m_pModel->m_MaterialLib.push_back( DEFAULT_MATERIAL ); - m_pModel->m_MaterialMap[ DEFAULT_MATERIAL ] = m_pModel->m_pDefaultMaterial; - - // Start parsing the file - parseFile(); -} - -// ------------------------------------------------------------------- -// Destrcutor. -ObjFileParser::~ObjFileParser() -{ - delete m_pModel->m_pDefaultMaterial; - m_pModel->m_pDefaultMaterial = NULL; - - delete m_pModel; - m_pModel = NULL; -} - -// ------------------------------------------------------------------- -// Returns a pointer to the model instance. -ObjFile::Model *ObjFileParser::GetModel() const -{ - return m_pModel; -} - -// ------------------------------------------------------------------- -// File parsing method. -void ObjFileParser::parseFile() -{ - if (m_DataIt == m_DataItEnd) - return; - - while (m_DataIt != m_DataItEnd) - { - switch (*m_DataIt) - { - case 'v': // Parse a vertex texture coordinate - { - ++m_DataIt; - if (*m_DataIt == ' ') - { - // Read in vertex definition - getVector3(m_pModel->m_Vertices); - } - else if (*m_DataIt == 't') - { - // Read in texture coordinate (2D) - ++m_DataIt; - getVector2(m_pModel->m_TextureCoord); - } - else if (*m_DataIt == 'n') - { - // Read in normal vector definition - ++m_DataIt; - getVector3( m_pModel->m_Normals ); - } - } - break; - - case 'f': // Parse a face - { - getFace(); - } - break; - - case '#': // Parse a comment - { - getComment(); - } - break; - - case 'u': // Parse a material desc. setter - { - getMaterialDesc(); - } - break; - - case 'm': // Parse a material library - { - getMaterialLib(); - } - break; - - case 'g': // Parse group name - { - getGroupName(); - } - break; - - case 's': // Parse group number - { - getGroupNumber(); - } - break; - - case 'o': // Parse object name - { - getObjectName(); - } - break; - - default: - { - m_DataIt = skipLine<DataArrayIt>( m_DataIt, m_DataItEnd, m_uiLine ); - } - break; - } - } -} - -// ------------------------------------------------------------------- -// Copy the next word in a temporary buffer -void ObjFileParser::copyNextWord(char *pBuffer, size_t length) -{ - size_t index = 0; - m_DataIt = getNextWord<DataArrayIt>(m_DataIt, m_DataItEnd); - while ( !isSeparator(*m_DataIt) && m_DataIt != m_DataItEnd ) - { - pBuffer[index] = *m_DataIt; - index++; - if (index == length-1) - break; - ++m_DataIt; - } - pBuffer[index] = '\0'; -} - -// ------------------------------------------------------------------- -// Copy the next line into a temporary buffer -void ObjFileParser::copyNextLine(char *pBuffer, size_t length) -{ - size_t index = 0; - while (m_DataIt != m_DataItEnd) - { - if (*m_DataIt == '\n' || *m_DataIt == '\r' || index == length-1) - break; - - pBuffer[ index ] = *m_DataIt; - ++index; - ++m_DataIt; - } - pBuffer[ index ] = '\0'; -} - -// ------------------------------------------------------------------- -// Get values for a new 3D vector instance -void ObjFileParser::getVector3(std::vector<aiVector3D> &point3d_array) -{ - float x, y, z; - copyNextWord(m_buffer, BUFFERSIZE); - x = (float) fast_atof(m_buffer); - - copyNextWord(m_buffer, BUFFERSIZE); - y = (float) fast_atof(m_buffer); - - copyNextWord(m_buffer, BUFFERSIZE); - z = (float) fast_atof(m_buffer); - - point3d_array.push_back( aiVector3D( x, y, z ) ); - //skipLine(); - m_DataIt = skipLine<DataArrayIt>( m_DataIt, m_DataItEnd, m_uiLine ); -} - -// ------------------------------------------------------------------- -// Get values for a new 2D vector instance -void ObjFileParser::getVector2( std::vector<aiVector2D> &point2d_array ) -{ - float x, y; - copyNextWord(m_buffer, BUFFERSIZE); - x = (float) fast_atof(m_buffer); - - copyNextWord(m_buffer, BUFFERSIZE); - y = (float) fast_atof(m_buffer); - - point2d_array.push_back(aiVector2D(x, y)); - - m_DataIt = skipLine<DataArrayIt>( m_DataIt, m_DataItEnd, m_uiLine ); -} - -// ------------------------------------------------------------------- -// Get values for a new face instance -void ObjFileParser::getFace() -{ - copyNextLine(m_buffer, BUFFERSIZE); - if (m_DataIt == m_DataItEnd) - return; - - char *pPtr = m_buffer; - char *pEnd = &pPtr[BUFFERSIZE]; - pPtr = getNextToken<char*>(pPtr, pEnd); - if (pPtr == '\0') - return; - - std::vector<unsigned int> *pIndices = new std::vector<unsigned int>; - std::vector<unsigned int> *pTexID = new std::vector<unsigned int>; - std::vector<unsigned int> *pNormalID = new std::vector<unsigned int>; - bool hasNormal = false; - - bool vt = (!m_pModel->m_TextureCoord.empty()); - bool vn = (!m_pModel->m_Normals.empty()); - int iStep = 0, iPos = 0; - while (pPtr != pEnd) - { - iStep = 1; - if (*pPtr == '\0') - break; - - if (*pPtr=='\r') - break; - - if (*pPtr=='/' ) - { - if (iPos == 0) - { - //if there are no texturecoordinates in the obj file but normals - if (!vt && vn) { - iPos = 1; - iStep++; - } - } - iPos++; - } - else if ( isSeparator(*pPtr) ) - { - iPos = 0; - } - else - { - //OBJ USES 1 Base ARRAYS!!!! - const int iVal = atoi( pPtr ); - int tmp = iVal; - while ( ( tmp = tmp / 10 )!=0 ) - ++iStep; - - if ( iVal > 0 ) - { - // Store parsed index - if ( 0 == iPos ) - { - pIndices->push_back( iVal-1 ); - } - else if ( 1 == iPos ) - { - pTexID->push_back( iVal-1 ); - } - else if ( 2 == iPos ) - { - pNormalID->push_back( iVal-1 ); - hasNormal = true; - } - else - { - reportErrorTokenInFace(); - } - } - } - for ( int i=0; i<iStep; i++ ) - ++pPtr; - } - - ObjFile::Face *face = new ObjFile::Face( pIndices, pNormalID, pTexID ); - - // Set active material, if one set - if (NULL != m_pModel->m_pCurrentMaterial) - face->m_pMaterial = m_pModel->m_pCurrentMaterial; - else - face->m_pMaterial = m_pModel->m_pDefaultMaterial; - - // Create a default object, if nothing there - if ( NULL == m_pModel->m_pCurrent ) - createObject( "defaultobject" ); - - // Assign face to mesh - if ( NULL == m_pModel->m_pCurrentMesh ) - { - createMesh(); - } - - // Store the face - m_pModel->m_pCurrentMesh->m_Faces.push_back( face ); - m_pModel->m_pCurrentMesh->m_uiNumIndices += (unsigned int)face->m_pVertices->size(); - m_pModel->m_pCurrentMesh->m_uiUVCoordinates[ 0 ] += (unsigned int)face->m_pTexturCoords[0].size(); - if ( !m_pModel->m_pCurrentMesh->m_hasNormals && hasNormal ) - { - m_pModel->m_pCurrentMesh->m_hasNormals = true; - } - // Skip the rest of the line - m_DataIt = skipLine<DataArrayIt>( m_DataIt, m_DataItEnd, m_uiLine ); -} - -// ------------------------------------------------------------------- -// Get values for a new material description -void ObjFileParser::getMaterialDesc() -{ - // Get next data for material data - m_DataIt = getNextToken<DataArrayIt>(m_DataIt, m_DataItEnd); - if (m_DataIt == m_DataItEnd) - return; - - char *pStart = &(*m_DataIt); - while ( !isSeparator(*m_DataIt) && m_DataIt != m_DataItEnd ) - ++m_DataIt; - - // Get name - std::string strName(pStart, &(*m_DataIt)); - if ( strName.empty()) - return; - - // Search for material - std::map<std::string, ObjFile::Material*>::iterator it = m_pModel->m_MaterialMap.find( strName ); - if ( it == m_pModel->m_MaterialMap.end() ) - { - // Not found, use default material - m_pModel->m_pCurrentMaterial = m_pModel->m_pDefaultMaterial; - } - else - { - // Found, using detected material - m_pModel->m_pCurrentMaterial = (*it).second; - if ( needsNewMesh( strName )) - { - createMesh(); - } - m_pModel->m_pCurrentMesh->m_uiMaterialIndex = getMaterialIndex( strName ); - } - - // Skip rest of line - m_DataIt = skipLine<DataArrayIt>( m_DataIt, m_DataItEnd, m_uiLine ); -} - -// ------------------------------------------------------------------- -// Get a comment, values will be skipped -void ObjFileParser::getComment() -{ - bool running = true; - while (running) - { - if ( '\n' == (*m_DataIt) || m_DataIt == m_DataItEnd ) - { - ++m_DataIt; - break; - } - else - { - ++m_DataIt; - } - } -} - -// ------------------------------------------------------------------- -// Get material library from file. -void ObjFileParser::getMaterialLib() -{ - // Translate tuple - m_DataIt = getNextToken<DataArrayIt>(m_DataIt, m_DataItEnd); - if (m_DataIt == m_DataItEnd) - return; - - char *pStart = &(*m_DataIt); - while (!isNewLine(*m_DataIt)) - m_DataIt++; - - // Check for existence - const std::string strMatName(pStart, &(*m_DataIt)); - IOStream *pFile = m_pIO->Open(strMatName); - - if (!pFile ) - { - DefaultLogger::get()->error("OBJ: Unable to locate material file " + strMatName); - m_DataIt = skipLine<DataArrayIt>( m_DataIt, m_DataItEnd, m_uiLine ); - return; - } - - // Import material library data from file - std::vector<char> buffer; - BaseImporter::TextFileToBuffer(pFile,buffer); - m_pIO->Close( pFile ); - - // Importing the material library - ObjFileMtlImporter mtlImporter( buffer, strMatName, m_pModel ); -} - -// ------------------------------------------------------------------- -// Set a new material definition as the current material. -void ObjFileParser::getNewMaterial() -{ - m_DataIt = getNextToken<DataArrayIt>(m_DataIt, m_DataItEnd); - m_DataIt = getNextWord<DataArrayIt>(m_DataIt, m_DataItEnd); - if ( m_DataIt == m_DataItEnd ) - return; - - char *pStart = &(*m_DataIt); - std::string strMat( pStart, *m_DataIt ); - while ( isSeparator( *m_DataIt ) ) - m_DataIt++; - std::map<std::string, ObjFile::Material*>::iterator it = m_pModel->m_MaterialMap.find( strMat ); - if ( it == m_pModel->m_MaterialMap.end() ) - { - // Show a warning, if material was not found - DefaultLogger::get()->warn("OBJ: Unsupported material requested: " + strMat); - m_pModel->m_pCurrentMaterial = m_pModel->m_pDefaultMaterial; - } - else - { - // Set new material - if ( needsNewMesh( strMat ) ) - { - createMesh(); - } - m_pModel->m_pCurrentMesh->m_uiMaterialIndex = getMaterialIndex( strMat ); - } - - m_DataIt = skipLine<DataArrayIt>( m_DataIt, m_DataItEnd, m_uiLine ); -} - -// ------------------------------------------------------------------- -int ObjFileParser::getMaterialIndex( const std::string &strMaterialName ) -{ - int mat_index = -1; - if ( strMaterialName.empty() ) - return mat_index; - for (size_t index = 0; index < m_pModel->m_MaterialLib.size(); ++index) - { - if ( strMaterialName == m_pModel->m_MaterialLib[ index ]) - { - mat_index = (int)index; - break; - } - } - return mat_index; -} - -// ------------------------------------------------------------------- -// Getter for a group name. -void ObjFileParser::getGroupName() -{ - // Get next word from data buffer - m_DataIt = getNextToken<DataArrayIt>(m_DataIt, m_DataItEnd); - m_DataIt = getNextWord<DataArrayIt>(m_DataIt, m_DataItEnd); - if ( isEndOfBuffer( m_DataIt, m_DataItEnd ) ) - return; - - // Store groupname in group library - char *pStart = &(*m_DataIt); - while ( !isSeparator(*m_DataIt) ) - m_DataIt++; - std::string strGroupName(pStart, &(*m_DataIt)); - - // Change active group, if necessary - if ( m_pModel->m_strActiveGroup != strGroupName ) - { - // Search for already existing entry - ObjFile::Model::ConstGroupMapIt it = m_pModel->m_Groups.find(&strGroupName); - - // We are mapping groups into the object structure - createObject( strGroupName ); - - // New group name, creating a new entry - if (it == m_pModel->m_Groups.end()) - { - std::vector<unsigned int> *pFaceIDArray = new std::vector<unsigned int>; - m_pModel->m_Groups[ &strGroupName ] = pFaceIDArray; - m_pModel->m_pGroupFaceIDs = (pFaceIDArray); - } - else - { - m_pModel->m_pGroupFaceIDs = (*it).second; - } - m_pModel->m_strActiveGroup = strGroupName; - } - m_DataIt = skipLine<DataArrayIt>( m_DataIt, m_DataItEnd, m_uiLine ); -} - -// ------------------------------------------------------------------- -// Not supported -void ObjFileParser::getGroupNumber() -{ - // Not used - - m_DataIt = skipLine<DataArrayIt>( m_DataIt, m_DataItEnd, m_uiLine ); -} - -// ------------------------------------------------------------------- -// 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); - if (m_DataIt == m_DataItEnd) - return; - char *pStart = &(*m_DataIt); - while ( !isSeparator( *m_DataIt ) ) - ++m_DataIt; - - std::string strObjectName(pStart, &(*m_DataIt)); - if (!strObjectName.empty()) - { - // Reset current object - m_pModel->m_pCurrent = NULL; - - // Search for actual object - for (std::vector<ObjFile::Object*>::const_iterator it = m_pModel->m_Objects.begin(); - it != m_pModel->m_Objects.end(); - ++it) - { - if ((*it)->m_strObjName == strObjectName) - { - m_pModel->m_pCurrent = *it; - break; - } - } - - // Allocate a new object, if current one was not found before - if ( NULL == m_pModel->m_pCurrent ) - createObject(strObjectName); - } - m_DataIt = skipLine<DataArrayIt>( m_DataIt, m_DataItEnd, m_uiLine ); -} -// ------------------------------------------------------------------- -// Creates a new object instance -void ObjFileParser::createObject(const std::string &strObjectName) -{ - ai_assert( NULL != m_pModel ); - //ai_assert( !strObjectName.empty() ); - - m_pModel->m_pCurrent = new ObjFile::Object; - m_pModel->m_pCurrent->m_strObjName = strObjectName; - m_pModel->m_Objects.push_back( m_pModel->m_pCurrent ); - - createMesh(); - - if ( m_pModel->m_pCurrentMaterial ) - { - m_pModel->m_pCurrentMesh->m_uiMaterialIndex = - getMaterialIndex( m_pModel->m_pCurrentMaterial->MaterialName.data ); - m_pModel->m_pCurrentMesh->m_pMaterial = m_pModel->m_pCurrentMaterial; - } -} -// ------------------------------------------------------------------- -// Creates a new mesh -void ObjFileParser::createMesh() -{ - ai_assert( NULL != m_pModel ); - m_pModel->m_pCurrentMesh = new ObjFile::Mesh; - m_pModel->m_Meshes.push_back( m_pModel->m_pCurrentMesh ); - unsigned int meshId = m_pModel->m_Meshes.size()-1; - if ( NULL != m_pModel->m_pCurrent ) - { - m_pModel->m_pCurrent->m_Meshes.push_back( meshId ); - } - else - { - DefaultLogger::get()->error("OBJ: No object detected to attach a new mesh instance."); - } -} - -// ------------------------------------------------------------------- -// Returns true, if a new mesh must be created. -bool ObjFileParser::needsNewMesh( const std::string &rMaterialName ) -{ - if (m_pModel->m_pCurrentMesh == 0) - { - // No mesh data yet - return true; - } - bool newMat = false; - int matIdx = getMaterialIndex( rMaterialName ); - unsigned int curMatIdx = m_pModel->m_pCurrentMesh->m_uiMaterialIndex; - if ( curMatIdx != ObjFile::Mesh::NoMaterial || curMatIdx != (unsigned int)matIdx ) - { - // New material -> only one material per mesh, so we need to create a new - // material - newMat = true; - } - return newMat; -} - -// ------------------------------------------------------------------- -// Shows an error in parsing process. -void ObjFileParser::reportErrorTokenInFace() -{ - m_DataIt = skipLine<DataArrayIt>( m_DataIt, m_DataItEnd, m_uiLine ); - DefaultLogger::get()->error("OBJ: Not supported token in face description detected"); -} - -// ------------------------------------------------------------------- - -} // Namespace Assimp - -#endif // !! ASSIMP_BUILD_NO_OBJ_IMPORTER |