diff --git a/.gitattributes b/.gitattributes index 2cf91cfb3..7f9357f62 100644 --- a/.gitattributes +++ b/.gitattributes @@ -2,7 +2,14 @@ *.cpp text eol=lf *.h text eol=lf *.c text eol=lf +*.cc text eol=lf +*.cpp text eol=lf +*.rc text eol=lf *.hpp text eol=lf *.txt text eol=lf *.cmake text eol=lf *.sh text eol=lf +CHANGES text eol=lf +CREDITS text eol=lf +LICENSE text eol=lf +Readme.md text eol=lf diff --git a/CHANGES b/CHANGES index 0c734162b..1d98700f8 100644 --- a/CHANGES +++ b/CHANGES @@ -1,173 +1,205 @@ ----------------------------------------------------------------------- -CHANGELOG ----------------------------------------------------------------------- - -3.2.1 (2016-10-01) - -FEATURES: - - Updated glTF exporter to meet 1.0 specification. - -FIXES/HOUSEKEEPING: - - Fixed glTF Validator errors for exported glTF format. - -ISSUES: - - Hard coded sampler setting for - - magFilter - - minFilter - - void* in ExportData for accessor max and min. - - - -3.2.0 (2015-11-03) - -FEATURES: - - OpenDDL-Parser is part of contrib-source. - - Experimental OpenGEX-support - - CI-check for linux and windows - - Coverity check added - - New regression testsuite. - -FIXES/HOUSEKEEPING: - - Hundreds of bugfixes in all parts of the library - - Unified line endings - - -API COMPATIBILITY: - - Removed precompiled header to increase build speed for linux - - -3.1.1 (2014-06-15) - -FEATURES: - - Support for FBX 2013 and newer, binary and ASCII (this is partly - work from Google Summer of Code 2012) - - Support for OGRE binary mesh and skeleton format - - Updated BLEND support for newer Blender versions - - Support for arbitrary meta data, used to hold FBX and DAE metadata - - OBJ Export now produces smaller files - - Meshes can now have names, this is supported by the major importers - - Improved IFC geometry generation - - M3 support has been removed - -FIXES/HOUSEKEEPING: - - Hundreds of bugfixes in all parts of the library - - CMake is now the primary build system - -API COMPATIBILITY: - - 3.1.1 is not binary compatible to 3.0 due to aiNode::mMetaData - and aiMesh::mName - - Export interface has been cleaned up and unified - - Other than that no relevant changes - - -3.0 (2012-07-07) - -FEATURES: - - new export interface similar to the import API. - - Supported export formats: Collada, OBJ, PLY and STL - - added new import formats: XGL/ZGL, M3 (experimental) - - new postprocessing steps: Debone - - vastly improved IFC (Industry Foundation Classes) support - - introduced API to query importer meta information (such as supported - format versions, full name, maintainer info). - - reworked Ogre XML import - - C-API now supports per-import properties - -FIXES/HOUSEKEEPING: - - - hundreds of bugfixes in all parts of the library - - unified naming and cleanup of public headers - - improved CMake build system - - templatized math library - - reduce dependency on boost.thread, only remaining spot - is synchronization for the C logging API - -API COMPATIBILITY: - - renamed headers, export interface, C API properties and meta data - prevent compatibility with code written for 2.0, but in - most cases these can be easily resolved - - Note: 3.0 is not binary compatible with 2.0 - - - - -2.0 (2010-11-21) - -FEATURES: - - Add support for static Blender (*.blend) scenes - - Add support for Q3BSP scenes - - Add a windows-based OpenGL sample featuring texturing & basic materials - - Add an experimental progress feedback interface. - - Vastly improved performance (up to 500%, depending on mesh size and - spatial structure) in some expensive postprocessing steps - - AssimpView now uses a reworked layout which leaves more space - to the scene hierarchy window - - - Add C# bindings ('Assimp.NET') - - Keep BSD-licensed and otherwise free test files in separate - folders (./test/models and ./test/models-nonbsd). - -FIXES: - - Many Collada bugfixes, improve fault tolerance - - Fix possible crashes in the Obj loader - - Improve the Ogre XML loader - - OpenGL-sample now works with MinGW - - Fix Importer::FindLoader failing on uppercase file extensions - - Fix flawed path handling when locating external files - - Limit the maximum number of vertices, faces, face indices and - weights that Assimp is able to handle. This is to avoid - crashes due to overflowing counters. - - - Updated XCode project files - - Further CMAKE build improvements - - -API CHANGES: - - Add data structures for vertex-based animations (These are not - currently used, however ...) - - Some Assimp::Importer methods are const now. - - - - - -1.1 (2010-04-17) -This is the list of relevant changes from the 1.0 (r412) release to 1.1 (r700). - -FEATURES: - - Vastly improved Collada support - - Add MS3D (Milkshape 3D) support - - Add support for Ogre XML static meshes - - Add experimental COB (TrueSpace) support - - Automatic test suite to quickly locate regressions - - D bindings (`dAssimp`) - - Python 2.n bindings (`PyAssimp`) - - Add basic support for Unicode input files (utf8, utf16 and utf32) - - Add further utilities to the `assimp` tool (xml/binary dumps, quick file stats) - - Switch to a CMAKE-based build system including an install target for unix'es - - Automatic evaluation of subdivision surfaces for some formats. - - Add `Importer::ReadFileFromMemory` and the corresponding C-API `aiReadFileFromMemory` - - Expose further math utilities via the C-API (i.e. `aiMultiplyMatrix4`) - - - Move noboost files away from the public include directory - - Many, many bugfixes and improvements in existing loaders and postprocessing steps - - Documentation improved and clarified in many places. - - Add a sample on using Assimp in conjunction with OpenGL - - - Distribution/packaging: comfortable SDK installer for Windows - - Distribution/packaging: improved release packages for other architectures - -CRITICAL FIXES: - - Resolve problems with clashing heap managers, STL ABIs and runtime libraries (win32) - - Fix automatic detection of file type if no file extension is given - - Improved exception safety and robustness, prevent leaking of exceptions through the C interface - - Fix possible heap corruption due to material properties pulled in incorrectly - - Avoid leaking in certain error scenarios - - Fix 64 bit compatibility problems in some loaders (i.e. MDL) - -BREAKING API CHANGES: - - None - - -MINOR API BEHAVIOUR CHANGES: - - Change quaternion orientation to suit to the more common convention (-w). - - aiString is utf8 now. Not yet consistent, however. +---------------------------------------------------------------------- +CHANGELOG +---------------------------------------------------------------------- + +3.3.1 (2016-07-08) + +FIXES/HOUSEKEEPING: + - Setup of default precision for 17 exporters + - Fix xcode project files + - Fix BlenderTesselator: offsetof operator + - Invalid version in cmake file + - Update pstdint.h to latest greatest + + +3.3.0 (2016-07-05) + +FEATURES: + - C++11 support enabled + - New regression-test-UI + - Experimental glTF-importer support + - OpenGEX: add support for cameras and lights + - C4D: update to latest Melange-SDK + - Add a gitter channel + - Coverity check enabled + - Switch to <...> include brackets for public headers + - Enable export by pyAssimp + - CI: check windows build + - Add functionality to perform a singlepost-processing step + - many more, just check the history + +FIXES/HOUSEKEEPING: + - Fix of many resource leaks in unittests and main lib + - Fix iOS-buildfor X64 + - Choosing zlib manually for cmake + - many more, just check the history + + +3.2.1 (2016-010-10) + +FEATURES: + - Updated glTF exporter to meet 1.0 specification. + +FIXES/HOUSEKEEPING: + - Fixed glTF Validator errors for exported glTF format. + +ISSUES: + - Hard coded sampler setting for + - magFilter + - minFilter + - void* in ExportData for accessor max and min. + + +3.2.0 (2015-11-03) + +FEATURES: + - OpenDDL-Parser is part of contrib-source. + - Experimental OpenGEX-support + - CI-check for linux and windows + - Coverity check added + - New regression testsuite. + +FIXES/HOUSEKEEPING: + - Hundreds of bugfixes in all parts of the library + - Unified line endings + + +API COMPATIBILITY: + - Removed precompiled header to increase build speed for linux + + +3.1.1 (2014-06-15) + +FEATURES: + - Support for FBX 2013 and newer, binary and ASCII (this is partly + work from Google Summer of Code 2012) + - Support for OGRE binary mesh and skeleton format + - Updated BLEND support for newer Blender versions + - Support for arbitrary meta data, used to hold FBX and DAE metadata + - OBJ Export now produces smaller files + - Meshes can now have names, this is supported by the major importers + - Improved IFC geometry generation + - M3 support has been removed + +FIXES/HOUSEKEEPING: + - Hundreds of bugfixes in all parts of the library + - CMake is now the primary build system + +API COMPATIBILITY: + - 3.1.1 is not binary compatible to 3.0 due to aiNode::mMetaData + and aiMesh::mName + - Export interface has been cleaned up and unified + - Other than that no relevant changes + + +3.0 (2012-07-07) + +FEATURES: + - new export interface similar to the import API. + - Supported export formats: Collada, OBJ, PLY and STL + - added new import formats: XGL/ZGL, M3 (experimental) + - new postprocessing steps: Debone + - vastly improved IFC (Industry Foundation Classes) support + - introduced API to query importer meta information (such as supported + format versions, full name, maintainer info). + - reworked Ogre XML import + - C-API now supports per-import properties + +FIXES/HOUSEKEEPING: + + - hundreds of bugfixes in all parts of the library + - unified naming and cleanup of public headers + - improved CMake build system + - templatized math library + - reduce dependency on boost.thread, only remaining spot + is synchronization for the C logging API + +API COMPATIBILITY: + - renamed headers, export interface, C API properties and meta data + prevent compatibility with code written for 2.0, but in + most cases these can be easily resolved + - Note: 3.0 is not binary compatible with 2.0 + + + + +2.0 (2010-11-21) + +FEATURES: + - Add support for static Blender (*.blend) scenes + - Add support for Q3BSP scenes + - Add a windows-based OpenGL sample featuring texturing & basic materials + - Add an experimental progress feedback interface. + - Vastly improved performance (up to 500%, depending on mesh size and + spatial structure) in some expensive postprocessing steps + - AssimpView now uses a reworked layout which leaves more space + to the scene hierarchy window + + - Add C# bindings ('Assimp.NET') + - Keep BSD-licensed and otherwise free test files in separate + folders (./test/models and ./test/models-nonbsd). + +FIXES: + - Many Collada bugfixes, improve fault tolerance + - Fix possible crashes in the Obj loader + - Improve the Ogre XML loader + - OpenGL-sample now works with MinGW + - Fix Importer::FindLoader failing on uppercase file extensions + - Fix flawed path handling when locating external files + - Limit the maximum number of vertices, faces, face indices and + weights that Assimp is able to handle. This is to avoid + crashes due to overflowing counters. + + - Updated XCode project files + - Further CMAKE build improvements + + +API CHANGES: + - Add data structures for vertex-based animations (These are not + currently used, however ...) + - Some Assimp::Importer methods are const now. + + + + + +1.1 (2010-04-17) +This is the list of relevant changes from the 1.0 (r412) release to 1.1 (r700). + +FEATURES: + - Vastly improved Collada support + - Add MS3D (Milkshape 3D) support + - Add support for Ogre XML static meshes + - Add experimental COB (TrueSpace) support + - Automatic test suite to quickly locate regressions + - D bindings (`dAssimp`) + - Python 2.n bindings (`PyAssimp`) + - Add basic support for Unicode input files (utf8, utf16 and utf32) + - Add further utilities to the `assimp` tool (xml/binary dumps, quick file stats) + - Switch to a CMAKE-based build system including an install target for unix'es + - Automatic evaluation of subdivision surfaces for some formats. + - Add `Importer::ReadFileFromMemory` and the corresponding C-API `aiReadFileFromMemory` + - Expose further math utilities via the C-API (i.e. `aiMultiplyMatrix4`) + + - Move noboost files away from the public include directory + - Many, many bugfixes and improvements in existing loaders and postprocessing steps + - Documentation improved and clarified in many places. + - Add a sample on using Assimp in conjunction with OpenGL + + - Distribution/packaging: comfortable SDK installer for Windows + - Distribution/packaging: improved release packages for other architectures + +CRITICAL FIXES: + - Resolve problems with clashing heap managers, STL ABIs and runtime libraries (win32) + - Fix automatic detection of file type if no file extension is given + - Improved exception safety and robustness, prevent leaking of exceptions through the C interface + - Fix possible heap corruption due to material properties pulled in incorrectly + - Avoid leaking in certain error scenarios + - Fix 64 bit compatibility problems in some loaders (i.e. MDL) + +BREAKING API CHANGES: + - None - + +MINOR API BEHAVIOUR CHANGES: + - Change quaternion orientation to suit to the more common convention (-w). + - aiString is utf8 now. Not yet consistent, however. diff --git a/CMakeLists.txt b/CMakeLists.txt index 8aaaf36de..1b3dbeb01 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,6 @@ # Open Asset Import Library (assimp) # ---------------------------------------------------------------------- -# -# Copyright (c) 2006-2016, assimp team +# Copyright (c) 2006-2017, assimp team # All rights reserved. # # Redistribution and use of this software in source and binary forms, @@ -33,7 +32,6 @@ # 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. -# #---------------------------------------------------------------------- SET(CMAKE_LEGACY_CYGWIN_WIN32 0) # Remove when CMake >= 2.8.4 is required cmake_minimum_required( VERSION 2.8 ) @@ -81,6 +79,20 @@ OPTION ( ASSIMP_COVERALLS OFF ) +option ( SYSTEM_IRRXML + "Use system installed Irrlicht/IrrXML library." + OFF +) + +OPTION ( BUILD_DOCS + "Build documentation using Doxygen." + OFF +) + +if (WIN32) + add_definitions( -DWIN32_LEAN_AND_MEAN ) +endif() + IF(MSVC) set (CMAKE_PREFIX_PATH "D:\\libs\\devil") OPTION( ASSIMP_INSTALL_PDB @@ -140,7 +152,7 @@ configure_file( configure_file( ${CMAKE_CURRENT_LIST_DIR}/include/assimp/config.h.in - ${CMAKE_CURRENT_LIST_DIR}/include/assimp/config.h + ${CMAKE_CURRENT_BINARY_DIR}/include/assimp/config.h ) include_directories( @@ -155,25 +167,28 @@ SET(LIBASSIMP-DEV_COMPONENT "libassimp${ASSIMP_VERSION_MAJOR}.${ASSIMP_VERSION_M SET(CPACK_COMPONENTS_ALL assimp-bin ${LIBASSIMP_COMPONENT} ${LIBASSIMP-DEV_COMPONENT} assimp-dev) SET(ASSIMP_LIBRARY_SUFFIX "" CACHE STRING "Suffix to append to library names") -# Ensure that we do not run into issues like http://www.tcm.phy.cam.ac.uk/sw/inodes64.html on 32 bit linux IF( UNIX ) + # Ensure that we do not run into issues like http://www.tcm.phy.cam.ac.uk/sw/inodes64.html on 32 bit linux IF ( CMAKE_SIZEOF_VOID_P EQUAL 4) # only necessary for 32-bit linux ADD_DEFINITIONS(-D_FILE_OFFSET_BITS=64 ) ENDIF() -ENDIF() -IF((CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX) AND NOT CMAKE_COMPILER_IS_MINGW) - IF (BUILD_SHARED_LIBS AND CMAKE_SIZEOF_VOID_P EQUAL 8) # -fPIC is only required for shared libs on 64 bit - SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC") - SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC") - ENDIF() + # Use GNUInstallDirs for Unix predefined directories + include(GNUInstallDirs) +ENDIF( UNIX ) + + +# Grouped compiler settings +IF ((CMAKE_C_COMPILER_ID MATCHES "GNU") AND NOT CMAKE_COMPILER_IS_MINGW) # hide all not-exported symbols - SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -fvisibility=hidden -Wall -std=c++0x" ) + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -fvisibility=hidden -fPIC -Wall -std=c++0x") + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC") + SET(LIBSTDC++_LIBRARIES -lstdc++) ELSEIF(MSVC) # enable multi-core compilation with MSVC add_compile_options(/MP) -ELSEIF ( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" ) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -fvisibility=hidden -Wall -Wno-long-long -pedantic -std=c++11" ) +ELSEIF ( "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" ) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -fvisibility=hidden -fPIC -Wall -Wno-long-long -pedantic -std=c++11" ) ELSEIF( CMAKE_COMPILER_IS_MINGW ) SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden -Wall -Wno-long-long -pedantic -std=c++11" ) add_definitions( -U__STRICT_ANSI__ ) @@ -185,9 +200,9 @@ if (ASSIMP_COVERALLS) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O0 -fprofile-arcs -ftest-coverage") endif() -INCLUDE (FindPkgConfig) INCLUDE_DIRECTORIES( include ) +INCLUDE (FindPkgMacros) INCLUDE (PrecompiledHeader) # If this is an in-source build (CMAKE_SOURCE_DIR == CMAKE_BINARY_DIR), @@ -228,9 +243,14 @@ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/assimp-config.cmake" "${C FIND_PACKAGE( DirectX ) -IF( CMAKE_COMPILER_IS_GNUCXX ) - SET(LIBSTDC++_LIBRARIES -lstdc++) -ENDIF( CMAKE_COMPILER_IS_GNUCXX ) +IF( BUILD_DOCS ) + add_subdirectory(doc) +ENDIF( BUILD_DOCS ) + +# Look for system installed irrXML +IF ( SYSTEM_IRRXML ) + find_package( IrrXML REQUIRED ) +ENDIF( SYSTEM_IRRXML ) # Search for external dependencies, and build them from source if not found # Search for zlib @@ -255,9 +275,7 @@ ENDIF(NOT ZLIB_FOUND) INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR}) # Search for unzip -IF (PKG_CONFIG_FOUND) - PKG_CHECK_MODULES(UNZIP minizip) -ENDIF (PKG_CONFIG_FOUND) +use_pkgconfig(UNZIP minizip) IF ( ASSIMP_NO_EXPORT ) ADD_DEFINITIONS( -DASSIMP_BUILD_NO_EXPORT) @@ -328,6 +346,8 @@ ELSE (ASSIMP_BUILD_NONFREE_C4D_IMPORTER) ADD_DEFINITIONS( -DASSIMP_BUILD_NO_C4D_IMPORTER ) ENDIF (ASSIMP_BUILD_NONFREE_C4D_IMPORTER) +ADD_SUBDIRECTORY(contrib) + ADD_SUBDIRECTORY( code/ ) IF ( ASSIMP_BUILD_ASSIMP_TOOLS ) IF ( WIN32 AND DirectX_D3DX9_LIBRARY ) @@ -431,29 +451,29 @@ IF(CMAKE_CPACK_COMMAND AND UNIX AND ASSIMP_OPT_BUILD_PACKAGES) ENDIF() if(WIN32) - if (CMAKE_SIZEOF_VOID_P EQUAL 8) - SET(BIN_DIR "${PROJECT_SOURCE_DIR}/bin64/") - SET(LIB_DIR "${PROJECT_SOURCE_DIR}/lib64/") - elseif() - SET(BIN_DIR "${PROJECT_SOURCE_DIR}/bin32/") - SET(LIB_DIR "${PROJECT_SOURCE_DIR}/lib32/") - ENDIF() + if (CMAKE_SIZEOF_VOID_P EQUAL 8) + SET(BIN_DIR "${PROJECT_SOURCE_DIR}/bin64/") + SET(LIB_DIR "${PROJECT_SOURCE_DIR}/lib64/") + elseif() + SET(BIN_DIR "${PROJECT_SOURCE_DIR}/bin32/") + SET(LIB_DIR "${PROJECT_SOURCE_DIR}/lib32/") + ENDIF() - if(MSVC12) - SET(ASSIMP_MSVC_VERSION "vc120") - elseif(MSVC14) - SET(ASSIMP_MSVC_VERSION "vc140") - ENDIF(MSVC12) + if(MSVC12) + SET(ASSIMP_MSVC_VERSION "vc120") + elseif(MSVC14) + SET(ASSIMP_MSVC_VERSION "vc140") + ENDIF(MSVC12) - if(MSVC12 OR MSVC14) - add_custom_target(UpdateAssimpLibsDebugSymbolsAndDLLs COMMENT "Copying Assimp Libraries ..." VERBATIM) - add_custom_command(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Release/assimp-${ASSIMP_MSVC_VERSION}-mt.dll ${BIN_DIR}assimp-${ASSIMP_MSVC_VERSION}-mt.dll VERBATIM) - add_custom_command(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Release/assimp-${ASSIMP_MSVC_VERSION}-mt.exp ${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mt.exp VERBATIM) - add_custom_command(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Release/assimp-${ASSIMP_MSVC_VERSION}-mt.lib ${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mt.lib VERBATIM) - add_custom_command(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Debug/assimp-${ASSIMP_MSVC_VERSION}-mtd.dll ${BIN_DIR}assimp-${ASSIMP_MSVC_VERSION}-mtd.dll VERBATIM) - add_custom_command(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Debug/assimp-${ASSIMP_MSVC_VERSION}-mtd.exp ${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mtd.exp VERBATIM) - add_custom_command(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Debug/assimp-${ASSIMP_MSVC_VERSION}-mtd.ilk ${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mtd.ilk VERBATIM) - add_custom_command(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Debug/assimp-${ASSIMP_MSVC_VERSION}-mtd.lib ${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mtd.lib VERBATIM) - add_custom_command(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Debug/assimp-${ASSIMP_MSVC_VERSION}-mtd.pdb ${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mtd.pdb VERBATIM) - ENDIF(MSVC12 OR MSVC14) + if(MSVC12 OR MSVC14) + add_custom_target(UpdateAssimpLibsDebugSymbolsAndDLLs COMMENT "Copying Assimp Libraries ..." VERBATIM) + add_custom_command(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Release/assimp-${ASSIMP_MSVC_VERSION}-mt.dll ${BIN_DIR}assimp-${ASSIMP_MSVC_VERSION}-mt.dll VERBATIM) + add_custom_command(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Release/assimp-${ASSIMP_MSVC_VERSION}-mt.exp ${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mt.exp VERBATIM) + add_custom_command(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Release/assimp-${ASSIMP_MSVC_VERSION}-mt.lib ${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mt.lib VERBATIM) + add_custom_command(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Debug/assimp-${ASSIMP_MSVC_VERSION}-mtd.dll ${BIN_DIR}assimp-${ASSIMP_MSVC_VERSION}-mtd.dll VERBATIM) + add_custom_command(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Debug/assimp-${ASSIMP_MSVC_VERSION}-mtd.exp ${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mtd.exp VERBATIM) + add_custom_command(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Debug/assimp-${ASSIMP_MSVC_VERSION}-mtd.ilk ${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mtd.ilk VERBATIM) + add_custom_command(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Debug/assimp-${ASSIMP_MSVC_VERSION}-mtd.lib ${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mtd.lib VERBATIM) + add_custom_command(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Debug/assimp-${ASSIMP_MSVC_VERSION}-mtd.pdb ${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mtd.pdb VERBATIM) + ENDIF(MSVC12 OR MSVC14) ENDIF (WIN32) diff --git a/CREDITS b/CREDITS index 1cfe4f640..219079168 100644 --- a/CREDITS +++ b/CREDITS @@ -1,160 +1,160 @@ -=============================================================== -Open Asset Import Library (Assimp) -Developers and Contributors -=============================================================== - -The following is a non-exhaustive list of all constributors over the years. -If you think your name should be listed here, drop us a line and we'll add you. - -- Alexander Gessler, -3DS-, BLEND-, ASE-, DXF-, HMP-, MDL-, MD2-, MD3-, MD5-, MDC-, NFF-, PLY-, STL-, RAW-, OFF-, MS3D-, Q3D- and LWO-Loader, Assimp-Viewer, assimp-cmd, -noboost, Website (Design). - -- Thomas Schulze, -X-, Collada-, BVH-Loader, Postprocessing framework. Data structure & Interface design, documentation. - -- Kim Kulling, -Obj-, Q3BSD-, OpenGEX-Loader, Logging system, CMake-build-environment, Linux-build, Website ( Admin ), Coverity ( Admin ), Glitter ( Admin ). - -- R.Schmidt, -Linux build, eclipse support. - -- Matthias Gubisch, -Assimp.net -Visual Studio 9 support, bugfixes. - -- Mark Sibly -B3D-Loader, Assimp testing - -- Jonathan Klein -Ogre Loader, VC2010 fixes and CMake fixes. - -- Sebastian Hempel, -PyAssimp (first version) -Compile-Bugfixes for mingw, add environment for static library support in make. - -- Jonathan Pokrass -Supplied a bugfix concerning the scaling in the md3 loader. - -- Andrew Galante, -Submitted patches to make Assimp compile with GCC-4, a makefile and the xcode3 workspace. - -- Andreas Nagel -First Assimp testing & verification under Windows Vista 64 Bit. - -- Marius Schr�der -Allowed us to use many of his models for screenshots and testing. - -- Christian Schubert -Supplied various XFiles for testing purposes. - -- Tizian Wieland -Searched the web for hundreds of test models for internal use - -- John Connors -Supplied patches for linux and SCons. - -- T. R. -The GUY who performed some of the CSM mocaps. - -- Andy Maloney -Contributed fixes for the documentation and the doxygen markup - -- Zhao Lei -Contributed several bugfixes fixing memory leaks and improving float parsing - -- sueastside -Updated PyAssimp to the latest Assimp data structures and provided a script to keep the Python binding up-to-date. - -- Tobias Rittig -Collada testing with Cinema 4D - -- Brad Grantham -Improvements in OpenGL-Sample. - -- Robert Ramirez -Add group loading feature to Obj-Loader. - -- Chris Maiwald -Many bugreports, improving Assimp's portability, regular testing & feedback. - -- Stepan Hrbek -Bugreport and fix for a obj-materialloader crash. - -- David Nadlinger -D bindings, CMake install support. - -- Dario Accornero -Contributed several patches regarding Mac OS/XCode targets, bug reports. - -- Martin Walser (Samhayne) -Contributed the 'SimpleTexturedOpenGl' sample. - -- Matthias Fauconneau -Contributed a fix for the Q3-BSP loader. - -- J�rgen P. Tjern� -Contributed updated and improved xcode workspaces - -- drparallax -Contributed the /samples/SimpleAssimpViewX sample - -- Carsten Fuchs -Contributed a fix for the Normalize method in aiQuaternion. - -- dbburgess -Contributes a Android-specific build issue: log the hardware architecture for ARM. - -- alfiereinre7 -Contributes a obj-fileparser fix: missing tokens in the obj-token list. - -- Roman Kharitonov -Contributes a fix for the configure script environment. - -- Ed Diana -Contributed AssimpDelphi (/port/AssimpDelphi). - -- rdb -Contributes a bundle of fixes and improvements for the bsp-importer. - -- Mick P -For contributing the De-bone postprocessing step and filing various bug reports. - -- Rosen Diankov -Contributed patches to build assimp debian packages using cmake. - -- Mark Page -Contributed a patch to fix the VertexTriangleAdjacency postprocessing step. - -- IOhannes -Contributed the Debian build fixes ( architecture macro ). - -- gellule -Several LWO and LWS fixes (pivoting). - -- Marcel Metz -GCC/Linux fixes for the SimpleOpenGL sample. - -- Brian Miller -Bugfix for a compiler fix for iOS on arm. - -- S�verin Lemaignan -Rewrite of PyAssimp, distutils and Python3 support - -- albert-wang -Bugfixes for the collada parser - -- Ya ping Jin -Bugfixes for uv-tanget calculation. - -- Jonne Nauha -Ogre Binary format support - -- Filip Wasil, Tieto Poland Sp. z o.o. -Android JNI asset extraction support - -- Richard Steffen -Contributed ExportProperties interface -Contributed X File exporter -Contributed Step (stp) exporter - - +=============================================================== +Open Asset Import Library (Assimp) +Developers and Contributors +=============================================================== + +The following is a non-exhaustive list of all constributors over the years. +If you think your name should be listed here, drop us a line and we'll add you. + +- Alexander Gessler, +3DS-, BLEND-, ASE-, DXF-, HMP-, MDL-, MD2-, MD3-, MD5-, MDC-, NFF-, PLY-, STL-, RAW-, OFF-, MS3D-, Q3D- and LWO-Loader, Assimp-Viewer, assimp-cmd, -noboost, Website (Design). + +- Thomas Schulze, +X-, Collada-, BVH-Loader, Postprocessing framework. Data structure & Interface design, documentation. + +- Kim Kulling, +Obj-, Q3BSD-, OpenGEX-Loader, Logging system, CMake-build-environment, Linux-build, Website ( Admin ), Coverity ( Admin ), Glitter ( Admin ). + +- R.Schmidt, +Linux build, eclipse support. + +- Matthias Gubisch, +Assimp.net +Visual Studio 9 support, bugfixes. + +- Mark Sibly +B3D-Loader, Assimp testing + +- Jonathan Klein +Ogre Loader, VC2010 fixes and CMake fixes. + +- Sebastian Hempel, +PyAssimp (first version) +Compile-Bugfixes for mingw, add environment for static library support in make. + +- Jonathan Pokrass +Supplied a bugfix concerning the scaling in the md3 loader. + +- Andrew Galante, +Submitted patches to make Assimp compile with GCC-4, a makefile and the xcode3 workspace. + +- Andreas Nagel +First Assimp testing & verification under Windows Vista 64 Bit. + +- Marius Schr�der +Allowed us to use many of his models for screenshots and testing. + +- Christian Schubert +Supplied various XFiles for testing purposes. + +- Tizian Wieland +Searched the web for hundreds of test models for internal use + +- John Connors +Supplied patches for linux and SCons. + +- T. R. +The GUY who performed some of the CSM mocaps. + +- Andy Maloney +Contributed fixes for the documentation and the doxygen markup + +- Zhao Lei +Contributed several bugfixes fixing memory leaks and improving float parsing + +- sueastside +Updated PyAssimp to the latest Assimp data structures and provided a script to keep the Python binding up-to-date. + +- Tobias Rittig +Collada testing with Cinema 4D + +- Brad Grantham +Improvements in OpenGL-Sample. + +- Robert Ramirez +Add group loading feature to Obj-Loader. + +- Chris Maiwald +Many bugreports, improving Assimp's portability, regular testing & feedback. + +- Stepan Hrbek +Bugreport and fix for a obj-materialloader crash. + +- David Nadlinger +D bindings, CMake install support. + +- Dario Accornero +Contributed several patches regarding Mac OS/XCode targets, bug reports. + +- Martin Walser (Samhayne) +Contributed the 'SimpleTexturedOpenGl' sample. + +- Matthias Fauconneau +Contributed a fix for the Q3-BSP loader. + +- Jørgen P. Tjernø +Contributed updated and improved xcode workspaces + +- drparallax +Contributed the /samples/SimpleAssimpViewX sample + +- Carsten Fuchs +Contributed a fix for the Normalize method in aiQuaternion. + +- dbburgess +Contributes a Android-specific build issue: log the hardware architecture for ARM. + +- alfiereinre7 +Contributes a obj-fileparser fix: missing tokens in the obj-token list. + +- Roman Kharitonov +Contributes a fix for the configure script environment. + +- Ed Diana +Contributed AssimpDelphi (/port/AssimpDelphi). + +- rdb +Contributes a bundle of fixes and improvements for the bsp-importer. + +- Mick P +For contributing the De-bone postprocessing step and filing various bug reports. + +- Rosen Diankov +Contributed patches to build assimp debian packages using cmake. + +- Mark Page +Contributed a patch to fix the VertexTriangleAdjacency postprocessing step. + +- IOhannes +Contributed the Debian build fixes ( architecture macro ). + +- gellule +Several LWO and LWS fixes (pivoting). + +- Marcel Metz +GCC/Linux fixes for the SimpleOpenGL sample. + +- Brian Miller +Bugfix for a compiler fix for iOS on arm. + +- Séverin Lemaignan +Rewrite of PyAssimp, distutils and Python3 support + +- albert-wang +Bugfixes for the collada parser + +- Ya ping Jin +Bugfixes for uv-tanget calculation. + +- Jonne Nauha +Ogre Binary format support + +- Filip Wasil, Tieto Poland Sp. z o.o. +Android JNI asset extraction support + +- Richard Steffen +Contributed ExportProperties interface +Contributed X File exporter +Contributed Step (stp) exporter + + diff --git a/LICENSE b/LICENSE index c8e47b34a..262606aff 100644 --- a/LICENSE +++ b/LICENSE @@ -1,78 +1,78 @@ -Open Asset Import Library (assimp) - -Copyright (c) 2006-2016, assimp 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 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. - - - -****************************************************************************** - -AN EXCEPTION applies to all files in the ./test/models-nonbsd folder. -These are 3d models for testing purposes, from various free sources -on the internet. They are - unless otherwise stated - copyright of -their respective creators, which may impose additional requirements -on the use of their work. For any of these models, see -.source.txt for more legal information. Contact us if you -are a copyright holder and believe that we credited you inproperly or -if you don't want your files to appear in the repository. - - -****************************************************************************** - -Poly2Tri Copyright (c) 2009-2010, Poly2Tri Contributors -http://code.google.com/p/poly2tri/ - -All rights reserved. -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 Poly2Tri 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. +Open Asset Import Library (assimp) + +Copyright (c) 2006-2016, assimp 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 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. + + + +****************************************************************************** + +AN EXCEPTION applies to all files in the ./test/models-nonbsd folder. +These are 3d models for testing purposes, from various free sources +on the internet. They are - unless otherwise stated - copyright of +their respective creators, which may impose additional requirements +on the use of their work. For any of these models, see +.source.txt for more legal information. Contact us if you +are a copyright holder and believe that we credited you inproperly or +if you don't want your files to appear in the repository. + + +****************************************************************************** + +Poly2Tri Copyright (c) 2009-2010, Poly2Tri Contributors +http://code.google.com/p/poly2tri/ + +All rights reserved. +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 Poly2Tri 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. diff --git a/Readme.md b/Readme.md index 6b33168f2..2dc024a52 100644 --- a/Readme.md +++ b/Readme.md @@ -1,143 +1,145 @@ -Open Asset Import Library (assimp) -================================== - -[![Linux Build Status](https://travis-ci.org/assimp/assimp.svg)](https://travis-ci.org/assimp/assimp) -[![Windows Build Status](https://ci.appveyor.com/api/projects/status/tmo433wax6u6cjp4?svg=true)](https://ci.appveyor.com/project/kimkulling/assimp) - - Coverity Scan Build Status - -[![Coverage Status](https://coveralls.io/repos/github/assimp/assimp/badge.svg?branch=master)](https://coveralls.io/github/assimp/assimp?branch=master) -
- -APIs are provided for C and C++. There are various bindings to other languages (C#, Java, Python, Delphi, D). Assimp also runs on Android and iOS. - -Additionally, assimp features various __mesh post processing tools__: normals and tangent space generation, triangulation, vertex cache locality optimization, removal of degenerate primitives and duplicate vertices, sorting by primitive type, merging of redundant materials and many more. - -This is the development trunk containing the latest features and bugfixes. For productive use though, we recommend one of the stable releases available from [assimp.sf.net](http://assimp.sf.net) or from *nix package repositories. -The current build status is: - -Gitter chat: [![Join the chat at https://gitter.im/assimp/assimp](https://badges.gitter.im/assimp/assimp.svg)](https://gitter.im/assimp/assimp?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
-__[open3mod](https://github.com/acgessler/open3mod) is a powerful 3D model viewer based on Assimp's import and export abilities.__ - -Please check our Wiki as well: https://github.com/assimp/assimp/wiki - -#### Supported file formats #### - -A full list [is here](http://assimp.org/main_features_formats.html). -__Importers__: - -- 3DS -- BLEND (Blender) -- DAE/Collada -- FBX -- IFC-STEP -- ASE -- DXF -- HMP -- MD2 -- MD3 -- MD5 -- MDC -- MDL -- NFF -- PLY -- STL -- X -- OBJ -- OpenGEX -- SMD -- LWO -- LXO -- LWS -- TER -- AC3D -- MS3D -- COB -- Q3BSP -- XGL -- CSM -- BVH -- B3D -- NDO -- Ogre Binary -- Ogre XML -- Q3D -- ASSBIN (Assimp custom format) -- glTF (partial) -- 3MF - -Additionally, some formats are supported by dependency on non-free code or external SDKs (not built by default): - -- C4D (https://github.com/acgessler/assimp-cinema4d) - -__Exporters__: - -- DAE (Collada) -- STL -- OBJ -- PLY -- X -- 3DS -- JSON (for WebGl, via https://github.com/acgessler/assimp2json) -- ASSBIN -- STEP -- glTF (partial) - -### Building ### -Take a look into the `INSTALL` file. Our build system is CMake, if you used CMake before there is a good chance you know what to do. - -### Ports ### -* [Android](port/AndroidJNI/README.md) -* [Python](port/PyAssimp/README.md) -* [.NET](port/AssimpNET/Readme.md) -* [Pascal](port/AssimpPascal/Readme.md) -* [Javascript (Alpha)](https://github.com/makc/assimp2json) - -#### Repository structure #### -Open Asset Import Library is implemented in C++. The directory structure is: - - /code Source code - /contrib Third-party libraries - /doc Documentation (doxysource and pre-compiled docs) - /include Public header C and C++ header files - /scripts Scripts used to generate the loading code for some formats - /port Ports to other languages and scripts to maintain those. - /test Unit- and regression tests, test suite of models - /tools Tools (old assimp viewer, command line `assimp`) - /samples A small number of samples to illustrate possible - use cases for Assimp - /workspaces Build environments for vc,xcode,... (deprecated, - CMake has superseeded all legacy build options!) - - -### Where to get help ### -For more information, visit [our website](http://assimp.org/). Or check out the `./doc`- folder, which contains the official documentation in HTML format. -(CHMs for Windows are included in some release packages and should be located right here in the root folder). - -If the docs don't solve your problem, ask on [StackOverflow](http://stackoverflow.com/questions/tagged/assimp?sort=newest). If you think you found a bug, please open an issue on Github. - -For development discussions, there is also a (very low-volume) mailing list, _assimp-discussions_ - [(subscribe here)]( https://lists.sourceforge.net/lists/listinfo/assimp-discussions) - -Open Asset Import Library is a library to load various 3d file formats into a shared, in-memory format. It supports more than __40 file formats__ for import and a growing selection of file formats for export. - -And we also have a Gitter-channel:Gitter [![Join the chat at https://gitter.im/assimp/assimp](https://badges.gitter.im/assimp/assimp.svg)](https://gitter.im/assimp/assimp?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
- -### Contributing ### -Contributions to assimp are highly appreciated. The easiest way to get involved is to submit -a pull request with your changes against the main repository's `master` branch. - -### Donate ### -If you like assimp, consider buying us a beer (or two): -[Donate](http://sourceforge.net/donate/index.php?group_id=226462) - -### License ### -Our license is based on the modified, __3-clause BSD__-License. - -An _informal_ summary is: do whatever you want, but include Assimp's license text with your product - -and don't sue us if our code doesn't work. Note that, unlike LGPLed code, you may link statically to Assimp. -For the legal details, see the `LICENSE` file. - -### Why this name ### -Sorry, we're germans :-), no english native speakers ... +Open Asset Import Library (assimp) +================================== + +[![Linux Build Status](https://travis-ci.org/assimp/assimp.svg)](https://travis-ci.org/assimp/assimp) +[![Windows Build Status](https://ci.appveyor.com/api/projects/status/tmo433wax6u6cjp4?svg=true)](https://ci.appveyor.com/project/kimkulling/assimp) + + Coverity Scan Build Status + +Patreon donate button +[![Coverage Status](https://coveralls.io/repos/github/assimp/assimp/badge.svg?branch=master)](https://coveralls.io/github/assimp/assimp?branch=master) +
+ +APIs are provided for C and C++. There are various bindings to other languages (C#, Java, Python, Delphi, D). Assimp also runs on Android and iOS. + +Additionally, assimp features various __mesh post processing tools__: normals and tangent space generation, triangulation, vertex cache locality optimization, removal of degenerate primitives and duplicate vertices, sorting by primitive type, merging of redundant materials and many more. + +This is the development trunk containing the latest features and bugfixes. For productive use though, we recommend one of the stable releases available from [assimp.sf.net](http://assimp.sf.net) or from *nix package repositories. +The current build status is: + +Gitter chat: [![Join the chat at https://gitter.im/assimp/assimp](https://badges.gitter.im/assimp/assimp.svg)](https://gitter.im/assimp/assimp?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
+ +And we also have an IRC-channel at freenode: #assetimporterlib . You can easily join us via: [KiwiIRC/freenote](https://kiwiirc.com/client/irc.freenode.net), choose your nickname and type +> /join #assetimporterlib + +
+__[open3mod](https://github.com/acgessler/open3mod) is a powerful 3D model viewer based on Assimp's import and export abilities.__ + +Please check our Wiki as well: https://github.com/assimp/assimp/wiki + +#### Supported file formats #### + +A full list [is here](http://assimp.org/main_features_formats.html). +__Importers__: + +- 3DS +- BLEND (Blender) +- DAE/Collada +- FBX +- IFC-STEP +- ASE +- DXF +- HMP +- MD2 +- MD3 +- MD5 +- MDC +- MDL +- NFF +- PLY +- STL +- X +- OBJ +- OpenGEX +- SMD +- LWO +- LXO +- LWS +- TER +- AC3D +- MS3D +- COB +- Q3BSP +- XGL +- CSM +- BVH +- B3D +- NDO +- Ogre Binary +- Ogre XML +- Q3D +- ASSBIN (Assimp custom format) +- glTF (partial) +- 3MF + +Additionally, some formats are supported by dependency on non-free code or external SDKs (not built by default): + +- C4D (https://github.com/acgessler/assimp-cinema4d) + +__Exporters__: + +- DAE (Collada) +- STL +- OBJ +- PLY +- X +- 3DS +- JSON (for WebGl, via https://github.com/acgessler/assimp2json) +- ASSBIN +- STEP +- glTF (partial) + +### Building ### +Take a look into the `INSTALL` file. Our build system is CMake, if you used CMake before there is a good chance you know what to do. + +### Ports ### +* [Android](port/AndroidJNI/README.md) +* [Python](port/PyAssimp/README.md) +* [.NET](port/AssimpNET/Readme.md) +* [Pascal](port/AssimpPascal/Readme.md) +* [Javascript (Alpha)](https://github.com/makc/assimp2json) + +#### Repository structure #### +Open Asset Import Library is implemented in C++. The directory structure is: + + /code Source code + /contrib Third-party libraries + /doc Documentation (doxysource and pre-compiled docs) + /include Public header C and C++ header files + /scripts Scripts used to generate the loading code for some formats + /port Ports to other languages and scripts to maintain those. + /test Unit- and regression tests, test suite of models + /tools Tools (old assimp viewer, command line `assimp`) + /samples A small number of samples to illustrate possible + use cases for Assimp + /workspaces Build environments for vc,xcode,... (deprecated, + CMake has superseeded all legacy build options!) + + +### Where to get help ### +For more information, visit [our website](http://assimp.org/). Or check out the `./doc`- folder, which contains the official documentation in HTML format. +(CHMs for Windows are included in some release packages and should be located right here in the root folder). + +If the docs don't solve your problem, ask on [StackOverflow](http://stackoverflow.com/questions/tagged/assimp?sort=newest). If you think you found a bug, please open an issue on Github. + +For development discussions, there is also a (very low-volume) mailing list, _assimp-discussions_ + [(subscribe here)]( https://lists.sourceforge.net/lists/listinfo/assimp-discussions) + +Open Asset Import Library is a library to load various 3d file formats into a shared, in-memory format. It supports more than __40 file formats__ for import and a growing selection of file formats for export. + +And we also have a Gitter-channel:Gitter [![Join the chat at https://gitter.im/assimp/assimp](https://badges.gitter.im/assimp/assimp.svg)](https://gitter.im/assimp/assimp?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
+ +### Contributing ### +Contributions to assimp are highly appreciated. The easiest way to get involved is to submit +a pull request with your changes against the main repository's `master` branch. + +### License ### +Our license is based on the modified, __3-clause BSD__-License. + +An _informal_ summary is: do whatever you want, but include Assimp's license text with your product - +and don't sue us if our code doesn't work. Note that, unlike LGPLed code, you may link statically to Assimp. +For the legal details, see the `LICENSE` file. + +### Why this name ### +Sorry, we're germans :-), no english native speakers ... diff --git a/assimp-config-version.cmake.in b/assimp-config-version.cmake.in index ff48b4822..923a38798 100644 --- a/assimp-config-version.cmake.in +++ b/assimp-config-version.cmake.in @@ -1,8 +1,43 @@ +# Open Asset Import Library (assimp) +# ---------------------------------------------------------------------- +# Copyright (c) 2006-2017, assimp 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 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. +#---------------------------------------------------------------------- set( PACKAGE_VERSION "@ASSIMP_VERSION@" ) if( "${PACKAGE_FIND_VERSION}" VERSION_EQUAL "@ASSIMP_VERSION@") set(PACKAGE_VERSION_EXACT 1) endif() -if( "${PACKAGE_FIND_VERSION_MAJOR}.${PACKAGE_FIND_VERSION_MINOR}" EQUAL "@ASSIMP_SOVERSION@" ) +if( "${PACKAGE_FIND_VERSION_MAJOR}.${PACKAGE_FIND_VERSION_MINOR}" EQUAL "@ASSIMP_VERSION@" ) set(PACKAGE_VERSION_COMPATIBLE 1) elseif( "${PACKAGE_FIND_VERSION_MAJOR}" EQUAL "@ASSIMP_VERSION_MAJOR@" ) # for now backward compatible if minor version is less diff --git a/cmake-modules/FindDevIL.cmake b/cmake-modules/FindDevIL.cmake new file mode 100644 index 000000000..381a75dd2 --- /dev/null +++ b/cmake-modules/FindDevIL.cmake @@ -0,0 +1,72 @@ +# Distributed under the OSI-approved BSD 3-Clause License. See accompanying +# file Copyright.txt or https://cmake.org/licensing for details. + +#.rst: +# FindDevIL +# --------- +# +# +# +# This module locates the developer's image library. +# http://openil.sourceforge.net/ +# +# This module sets: +# +# :: +# +# IL_LIBRARIES - the name of the IL library. These include the full path to +# the core DevIL library. This one has to be linked into the +# application. +# ILU_LIBRARIES - the name of the ILU library. Again, the full path. This +# library is for filters and effects, not actual loading. It +# doesn't have to be linked if the functionality it provides +# is not used. +# ILUT_LIBRARIES - the name of the ILUT library. Full path. This part of the +# library interfaces with OpenGL. It is not strictly needed +# in applications. +# IL_INCLUDE_DIR - where to find the il.h, ilu.h and ilut.h files. +# IL_FOUND - this is set to TRUE if all the above variables were set. +# This will be set to false if ILU or ILUT are not found, +# even if they are not needed. In most systems, if one +# library is found all the others are as well. That's the +# way the DevIL developers release it. + +# TODO: Add version support. +# Tested under Linux and Windows (MSVC) + +#include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) +include(FindPackageHandleStandardArgs) + +find_path(IL_INCLUDE_DIR il.h + PATH_SUFFIXES include IL + DOC "The path to the directory that contains il.h" +) + +#message("IL_INCLUDE_DIR is ${IL_INCLUDE_DIR}") + +find_library(IL_LIBRARIES + NAMES IL DEVIL + PATH_SUFFIXES lib64 lib lib32 + DOC "The file that corresponds to the base il library." +) + +#message("IL_LIBRARIES is ${IL_LIBRARIES}") + +find_library(ILUT_LIBRARIES + NAMES ILUT + PATH_SUFFIXES lib64 lib lib32 + DOC "The file that corresponds to the il (system?) utility library." +) + +#message("ILUT_LIBRARIES is ${ILUT_LIBRARIES}") + +find_library(ILU_LIBRARIES + NAMES ILU + PATH_SUFFIXES lib64 lib lib32 + DOC "The file that corresponds to the il utility library." +) + +#message("ILU_LIBRARIES is ${ILU_LIBRARIES}") + +FIND_PACKAGE_HANDLE_STANDARD_ARGS(IL DEFAULT_MSG + IL_LIBRARIES IL_INCLUDE_DIR) diff --git a/cmake-modules/FindIrrXML.cmake b/cmake-modules/FindIrrXML.cmake new file mode 100644 index 000000000..5434e0b86 --- /dev/null +++ b/cmake-modules/FindIrrXML.cmake @@ -0,0 +1,17 @@ +# Find IrrXMl from irrlicht project +# +# Find LibIrrXML headers and library +# +# IRRXML_FOUND - IrrXML found +# IRRXML_INCLUDE_DIR - Headers location +# IRRXML_LIBRARY - IrrXML main library + +find_path(IRRXML_INCLUDE_DIR irrXML.h + PATH_SUFFIXES include/irrlicht include/irrxml) +find_library(IRRXML_LIBRARY IrrXML) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(IrrXML REQUIRED_VARS IRRXML_INCLUDE_DIR IRRXML_LIBRARY) + + +mark_as_advanced(IRRXML_INCLUDE_DIR IRRXML_LIBRARY) diff --git a/cmake-modules/FindPkgMacros.cmake b/cmake-modules/FindPkgMacros.cmake index e67d8dc62..074cce352 100644 --- a/cmake-modules/FindPkgMacros.cmake +++ b/cmake-modules/FindPkgMacros.cmake @@ -59,10 +59,13 @@ endmacro(clear_if_changed) # Try to get some hints from pkg-config, if available macro(use_pkgconfig PREFIX PKGNAME) - find_package(PkgConfig) - if (PKG_CONFIG_FOUND) - pkg_check_modules(${PREFIX} ${PKGNAME}) - endif () + # Android does not support PKG_CONFIG so we disable it + IF ( NOT ANDROID ) + find_package(PkgConfig) + if (PKG_CONFIG_FOUND) + pkg_check_modules(${PREFIX} ${PKGNAME}) + endif () + ENDIF ( NOT ANDROID ) endmacro (use_pkgconfig) # Couple a set of release AND debug libraries (or frameworks) diff --git a/cmake-modules/FindZLIB.cmake b/cmake-modules/FindZLIB.cmake index f6806b4ee..95eb51547 100644 --- a/cmake-modules/FindZLIB.cmake +++ b/cmake-modules/FindZLIB.cmake @@ -11,7 +11,7 @@ # Once done, this will define # # ZLIB_FOUND - system has ZLIB -# ZLIB_INCLUDE_DIRS - the ZLIB include directories +# ZLIB_INCLUDE_DIRS - the ZLIB include directories # ZLIB_LIBRARIES - link these to use ZLIB include(FindPkgMacros) diff --git a/code/3DSConverter.cpp b/code/3DSConverter.cpp index 8390dd216..da8c918a7 100644 --- a/code/3DSConverter.cpp +++ b/code/3DSConverter.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/code/3DSExporter.cpp b/code/3DSExporter.cpp index 1d49a536b..4be83355a 100644 --- a/code/3DSExporter.cpp +++ b/code/3DSExporter.cpp @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/3DSExporter.h b/code/3DSExporter.h index 4d9b39d53..dd3c4d427 100644 --- a/code/3DSExporter.h +++ b/code/3DSExporter.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, @@ -48,7 +49,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include "StreamWriter.h" -#include "./../include/assimp/material.h" +#include struct aiScene; struct aiNode; diff --git a/code/3DSHelper.h b/code/3DSHelper.h index 7a2ad3f8a..d5a51dfb7 100644 --- a/code/3DSHelper.h +++ b/code/3DSHelper.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, @@ -48,10 +49,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "SmoothingGroups.h" #include "StringUtils.h" #include "qnan.h" -#include "./../include/assimp/material.h" -#include "./../include/assimp/camera.h" -#include "./../include/assimp/light.h" -#include "./../include/assimp/anim.h" +#include +#include +#include +#include #include //sprintf namespace Assimp { diff --git a/code/3DSLoader.cpp b/code/3DSLoader.cpp index b19d37f4c..522bec307 100644 --- a/code/3DSLoader.cpp +++ b/code/3DSLoader.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. @@ -54,6 +55,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include #include +#include #include "StringComparison.h" using namespace Assimp; diff --git a/code/3DSLoader.h b/code/3DSLoader.h index 26b2a935e..0e377180b 100644 --- a/code/3DSLoader.h +++ b/code/3DSLoader.h @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/ACLoader.cpp b/code/ACLoader.cpp index c040d6bbd..a30baa75a 100644 --- a/code/ACLoader.cpp +++ b/code/ACLoader.cpp @@ -4,7 +4,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. @@ -60,6 +61,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include #include +#include #include using namespace Assimp; diff --git a/code/ACLoader.h b/code/ACLoader.h index 52563adad..4b202b77a 100644 --- a/code/ACLoader.h +++ b/code/ACLoader.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/AMFImporter.cpp b/code/AMFImporter.cpp index 78f21814c..e9211fe53 100644 --- a/code/AMFImporter.cpp +++ b/code/AMFImporter.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. @@ -51,11 +52,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "AMFImporter_Macro.hpp" #include "fast_atof.h" -#include "DefaultIOSystem.h" +#include // Header files, stdlib. #include -#include namespace Assimp { diff --git a/code/AMFImporter.hpp b/code/AMFImporter.hpp index 4d92b9ea0..561ec3c8f 100644 --- a/code/AMFImporter.hpp +++ b/code/AMFImporter.hpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. @@ -52,9 +53,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "AMFImporter_Node.hpp" // Header files, Assimp. -#include "assimp/DefaultLogger.hpp" -#include "assimp/importerdesc.h" -#include "assimp/ProgressHandler.hpp" +#include +#include #include "assimp/types.h" #include "BaseImporter.h" #include "irrXMLWrapper.h" diff --git a/code/AMFImporter_Geometry.cpp b/code/AMFImporter_Geometry.cpp index 493d06bff..afba3f2bc 100644 --- a/code/AMFImporter_Geometry.cpp +++ b/code/AMFImporter_Geometry.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/code/AMFImporter_Macro.hpp b/code/AMFImporter_Macro.hpp index 973e17490..b7c0f9863 100644 --- a/code/AMFImporter_Macro.hpp +++ b/code/AMFImporter_Macro.hpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/code/AMFImporter_Material.cpp b/code/AMFImporter_Material.cpp index 4550f6fe2..d15099fac 100644 --- a/code/AMFImporter_Material.cpp +++ b/code/AMFImporter_Material.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/code/AMFImporter_Node.hpp b/code/AMFImporter_Node.hpp index f8c3a7933..cb8b0b66d 100644 --- a/code/AMFImporter_Node.hpp +++ b/code/AMFImporter_Node.hpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. @@ -59,18 +60,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. /// \class CAMFImporter_NodeElement /// Base class for elements of nodes. -class CAMFImporter_NodeElement -{ - /***********************************************/ - /******************** Types ********************/ - /***********************************************/ +class CAMFImporter_NodeElement { public: - - /// \enum EType /// Define what data type contain node element. - enum EType - { + enum EType { ENET_Color, ///< Color element: . ENET_Constellation,///< Grouping element: . ENET_Coordinates, ///< Coordinates element: . @@ -91,52 +85,37 @@ public: ENET_Invalid ///< Element has invalid type and possible contain invalid data. }; - /***********************************************/ - /****************** Constants ******************/ - /***********************************************/ - -public: - const EType Type;///< Type of element. - - /***********************************************/ - /****************** Variables ******************/ - /***********************************************/ - -public: - std::string ID;///< ID of element. - CAMFImporter_NodeElement* Parent;///< Parrent element. If nullptr then this node is root. + CAMFImporter_NodeElement* Parent;///< Parent element. If nullptr then this node is root. std::list Child;///< Child elements. - /***********************************************/ - /****************** Functions ******************/ - /***********************************************/ +public: /// Destructor, virtual.. + virtual ~CAMFImporter_NodeElement() { + // empty + } private: - - /// \fn CAMFImporter_NodeElement(const CAMFImporter_NodeElement& pNodeElement) /// Disabled copy constructor. CAMFImporter_NodeElement(const CAMFImporter_NodeElement& pNodeElement); - /// \fn CAMFImporter_NodeElement& operator=(const CAMFImporter_NodeElement& pNodeElement) /// Disabled assign operator. CAMFImporter_NodeElement& operator=(const CAMFImporter_NodeElement& pNodeElement); - /// \fn CAMFImporter_NodeElement() /// Disabled default constructor. CAMFImporter_NodeElement(); protected: - - /// \fn CAMFImporter_NodeElement(const EType pType, CAMFImporter_NodeElement* pParent) /// In constructor inheritor must set element type. /// \param [in] pType - element type. /// \param [in] pParent - parent element. CAMFImporter_NodeElement(const EType pType, CAMFImporter_NodeElement* pParent) - : Type(pType), Parent(pParent) - {} - + : Type(pType) + , ID() + , Parent(pParent) + , Child() { + // empty + } };// class IAMFImporter_NodeElement /// \struct CAMFImporter_NodeElement_Constellation @@ -399,25 +378,23 @@ struct CAMFImporter_NodeElement_Triangle : public CAMFImporter_NodeElement };// struct CAMFImporter_NodeElement_Triangle -/// \struct CAMFImporter_NodeElement_Texture /// Structure that define texture node. -struct CAMFImporter_NodeElement_Texture : public CAMFImporter_NodeElement -{ - /****************** Variables ******************/ - +struct CAMFImporter_NodeElement_Texture : public CAMFImporter_NodeElement { size_t Width, Height, Depth;///< Size of the texture. std::vector Data;///< Data of the texture. bool Tiled; - /****************** Functions ******************/ - - /// \fn CAMFImporter_NodeElement_Texture(CAMFImporter_NodeElement* pParent) /// Constructor. /// \param [in] pParent - pointer to parent node. CAMFImporter_NodeElement_Texture(CAMFImporter_NodeElement* pParent) - : CAMFImporter_NodeElement(ENET_Texture, pParent) - {} - + : CAMFImporter_NodeElement(ENET_Texture, pParent) + , Width( 0 ) + , Height( 0 ) + , Depth( 0 ) + , Data() + , Tiled( false ){ + // empty + } };// struct CAMFImporter_NodeElement_Texture #endif // INCLUDED_AI_AMF_IMPORTER_NODE_H diff --git a/code/AMFImporter_Postprocess.cpp b/code/AMFImporter_Postprocess.cpp index 686040598..3a48d3b42 100644 --- a/code/AMFImporter_Postprocess.cpp +++ b/code/AMFImporter_Postprocess.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. @@ -54,7 +55,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "StringUtils.h" // Header files, stdlib. -#include #include namespace Assimp @@ -62,7 +62,7 @@ namespace Assimp aiColor4D AMFImporter::SPP_Material::GetColor(const float pX, const float pY, const float pZ) const { -aiColor4D tcol; + aiColor4D tcol; // Check if stored data are supported. if(Composition.size() != 0) @@ -93,8 +93,8 @@ aiColor4D tcol; void AMFImporter::PostprocessHelper_CreateMeshDataArray(const CAMFImporter_NodeElement_Mesh& pNodeElement, std::vector& pVertexCoordinateArray, std::vector& pVertexColorArray) const { -CAMFImporter_NodeElement_Vertices* vn = nullptr; -size_t col_idx; + CAMFImporter_NodeElement_Vertices* vn = nullptr; + size_t col_idx; // All data stored in "vertices", search for it. for(CAMFImporter_NodeElement* ne_child: pNodeElement.Child) @@ -142,8 +142,8 @@ size_t col_idx; size_t AMFImporter::PostprocessHelper_GetTextureID_Or_Create(const std::string& pID_R, const std::string& pID_G, const std::string& pID_B, const std::string& pID_A) { -size_t TextureConverted_Index; -std::string TextureConverted_ID; + size_t TextureConverted_Index; + std::string TextureConverted_ID; // check input data if(pID_R.empty() && pID_G.empty() && pID_B.empty() && pID_A.empty()) @@ -261,21 +261,20 @@ std::string TextureConverted_ID; size_t off_b = 0; // Calculate size of the target array and rule how data will be copied. - if ( nullptr != src_texture ) { - if(!pID_R.empty()) { - tex_size += src_texture[0]->Data.size(); step++, off_g++, off_b++; - } - if(!pID_G.empty()) { - tex_size += src_texture[1]->Data.size(); step++, off_b++; - } - if(!pID_B.empty()) { - tex_size += src_texture[2]->Data.size(); step++; - } - if(!pID_A.empty()) { - tex_size += src_texture[3]->Data.size(); step++; - } + if(!pID_R.empty() && nullptr != src_texture[ 0 ] ) { + tex_size += src_texture[0]->Data.size(); step++, off_g++, off_b++; } - // Create target array. + if(!pID_G.empty() && nullptr != src_texture[ 1 ] ) { + tex_size += src_texture[1]->Data.size(); step++, off_b++; + } + if(!pID_B.empty() && nullptr != src_texture[ 2 ] ) { + tex_size += src_texture[2]->Data.size(); step++; + } + if(!pID_A.empty() && nullptr != src_texture[ 3 ] ) { + tex_size += src_texture[3]->Data.size(); step++; + } + + // Create target array. converted_texture.Data = new uint8_t[tex_size]; // And copy data auto CopyTextureData = [&](const std::string& pID, const size_t pOffset, const size_t pStep, const uint8_t pSrcTexNum) -> void @@ -302,19 +301,19 @@ std::string TextureConverted_ID; void AMFImporter::PostprocessHelper_SplitFacesByTextureID(std::list& pInputList, std::list >& pOutputList_Separated) { -auto texmap_is_equal = [](const CAMFImporter_NodeElement_TexMap* pTexMap1, const CAMFImporter_NodeElement_TexMap* pTexMap2) -> bool -{ - if((pTexMap1 == nullptr) && (pTexMap2 == nullptr)) return true; - if(pTexMap1 == nullptr) return false; - if(pTexMap2 == nullptr) return false; + auto texmap_is_equal = [](const CAMFImporter_NodeElement_TexMap* pTexMap1, const CAMFImporter_NodeElement_TexMap* pTexMap2) -> bool + { + if((pTexMap1 == nullptr) && (pTexMap2 == nullptr)) return true; + if(pTexMap1 == nullptr) return false; + if(pTexMap2 == nullptr) return false; - if(pTexMap1->TextureID_R != pTexMap2->TextureID_R) return false; - if(pTexMap1->TextureID_G != pTexMap2->TextureID_G) return false; - if(pTexMap1->TextureID_B != pTexMap2->TextureID_B) return false; - if(pTexMap1->TextureID_A != pTexMap2->TextureID_A) return false; + if(pTexMap1->TextureID_R != pTexMap2->TextureID_R) return false; + if(pTexMap1->TextureID_G != pTexMap2->TextureID_G) return false; + if(pTexMap1->TextureID_B != pTexMap2->TextureID_B) return false; + if(pTexMap1->TextureID_A != pTexMap2->TextureID_A) return false; - return true; -}; + return true; + }; pOutputList_Separated.clear(); if(pInputList.size() == 0) return; diff --git a/code/ASELoader.cpp b/code/ASELoader.cpp index ed01c17e1..2ea5f7b1c 100644 --- a/code/ASELoader.cpp +++ b/code/ASELoader.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. @@ -54,6 +55,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include #include +#include #include diff --git a/code/ASELoader.h b/code/ASELoader.h index b775fc6bb..d1a5769de 100644 --- a/code/ASELoader.h +++ b/code/ASELoader.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, @@ -46,9 +47,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "BaseImporter.h" #include +#include "ASEParser.h" struct aiNode; -#include "ASEParser.h" namespace Assimp { diff --git a/code/ASEParser.cpp b/code/ASEParser.cpp index 1a3354c6d..e3ec0fe34 100644 --- a/code/ASEParser.cpp +++ b/code/ASEParser.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. @@ -49,7 +50,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // internal headers #include "TextureTransform.h" #include "ASELoader.h" -#include "MaterialSystem.h" #include "fast_atof.h" #include @@ -1858,7 +1858,7 @@ void Parser::ParseLV3MeshCFaceListBlock(unsigned int iNumFaces, ASE::Mesh& mesh) ++filePtr; // Face entry - if (TokenMatch(filePtr,"MESH_CFACE" ,11)) + if (TokenMatch(filePtr,"MESH_CFACE" ,10)) { unsigned int aiValues[3]; unsigned int iIndex = 0; diff --git a/code/ASEParser.h b/code/ASEParser.h index 095d089d4..cdae4affe 100644 --- a/code/ASEParser.h +++ b/code/ASEParser.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/AssbinExporter.cpp b/code/AssbinExporter.cpp index fcb32c70a..b03a45309 100644 --- a/code/AssbinExporter.cpp +++ b/code/AssbinExporter.cpp @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/AssbinExporter.h b/code/AssbinExporter.h index 4a0219c04..55bb9fc82 100644 --- a/code/AssbinExporter.h +++ b/code/AssbinExporter.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/AssbinLoader.cpp b/code/AssbinLoader.cpp index 7a17d5ad5..3ed58297c 100644 --- a/code/AssbinLoader.cpp +++ b/code/AssbinLoader.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. @@ -54,6 +55,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include #include +#include #ifdef ASSIMP_BUILD_NO_OWN_ZLIB # include @@ -196,7 +198,7 @@ template void ReadBounds( IOStream * stream, T* /*p*/, unsigned int stream->Seek( sizeof(T) * n, aiOrigin_CUR ); } -void AssbinImporter::ReadBinaryNode( IOStream * stream, aiNode** node ) +void AssbinImporter::ReadBinaryNode( IOStream * stream, aiNode** node, aiNode* parent ) { uint32_t chunkID = Read(stream); ai_assert(chunkID == ASSBIN_CHUNK_AINODE); @@ -208,6 +210,10 @@ void AssbinImporter::ReadBinaryNode( IOStream * stream, aiNode** node ) (*node)->mTransformation = Read(stream); (*node)->mNumChildren = Read(stream); (*node)->mNumMeshes = Read(stream); + if(parent) + { + (*node)->mParent = parent; + } if ((*node)->mNumMeshes) { @@ -221,7 +227,7 @@ void AssbinImporter::ReadBinaryNode( IOStream * stream, aiNode** node ) { (*node)->mChildren = new aiNode*[(*node)->mNumChildren]; for (unsigned int i = 0; i < (*node)->mNumChildren; ++i) { - ReadBinaryNode( stream, &(*node)->mChildren[i] ); + ReadBinaryNode( stream, &(*node)->mChildren[i], *node ); } } @@ -569,7 +575,7 @@ void AssbinImporter::ReadBinaryScene( IOStream * stream, aiScene* scene ) // Read node graph scene->mRootNode = new aiNode[1]; - ReadBinaryNode( stream, &scene->mRootNode ); + ReadBinaryNode( stream, &scene->mRootNode, (aiNode*)NULL ); // Read all meshes if (scene->mNumMeshes) diff --git a/code/AssbinLoader.h b/code/AssbinLoader.h index e8c8dd0cb..fc28d1667 100644 --- a/code/AssbinLoader.h +++ b/code/AssbinLoader.h @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, @@ -46,7 +47,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #define AI_ASSBINIMPORTER_H_INC #include "BaseImporter.h" -#include struct aiMesh; struct aiNode; @@ -86,7 +86,7 @@ public: IOSystem* pIOHandler ); void ReadBinaryScene( IOStream * stream, aiScene* pScene ); - void ReadBinaryNode( IOStream * stream, aiNode** mRootNode ); + void ReadBinaryNode( IOStream * stream, aiNode** mRootNode, aiNode* parent ); void ReadBinaryMesh( IOStream * stream, aiMesh* mesh ); void ReadBinaryBone( IOStream * stream, aiBone* bone ); void ReadBinaryMaterial(IOStream * stream, aiMaterial* mat); diff --git a/code/Assimp.cpp b/code/Assimp.cpp index 092c40979..9269f905e 100644 --- a/code/Assimp.cpp +++ b/code/Assimp.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. @@ -65,8 +66,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // ------------------------------------------------------------------------------------------------ using namespace Assimp; -namespace Assimp -{ +namespace Assimp { // underlying structure for aiPropertyStore typedef BatchLoader::PropertyMap PropertyMap; @@ -109,12 +109,11 @@ static std::mutex gLogStreamMutex; // ------------------------------------------------------------------------------------------------ // Custom LogStream implementation for the C-API -class LogToCallbackRedirector : public LogStream -{ +class LogToCallbackRedirector : public LogStream { public: explicit LogToCallbackRedirector(const aiLogStream& s) - : stream (s) { - ai_assert(NULL != s.callback); + : stream (s) { + ai_assert(NULL != s.callback); } ~LogToCallbackRedirector() { @@ -145,8 +144,7 @@ private: }; // ------------------------------------------------------------------------------------------------ -void ReportSceneNotFoundError() -{ +void ReportSceneNotFoundError() { DefaultLogger::get()->error("Unable to find the Assimp::Importer for this aiScene. " "The C-API does not accept scenes produced by the C++ API and vice versa"); @@ -155,22 +153,18 @@ void ReportSceneNotFoundError() // ------------------------------------------------------------------------------------------------ // Reads the given file and returns its content. -const aiScene* aiImportFile( const char* pFile, unsigned int pFlags) -{ +const aiScene* aiImportFile( const char* pFile, unsigned int pFlags) { return aiImportFileEx(pFile,pFlags,NULL); } // ------------------------------------------------------------------------------------------------ -const aiScene* aiImportFileEx( const char* pFile, unsigned int pFlags, aiFileIO* pFS) -{ +const aiScene* aiImportFileEx( const char* pFile, unsigned int pFlags, aiFileIO* pFS) { return aiImportFileExWithProperties(pFile, pFlags, pFS, NULL); } // ------------------------------------------------------------------------------------------------ -const aiScene* aiImportFileExWithProperties( const char* pFile, unsigned int pFlags, - aiFileIO* pFS, - const aiPropertyStore* props) -{ +const aiScene* aiImportFileExWithProperties( const char* pFile, unsigned int pFlags, + aiFileIO* pFS, const aiPropertyStore* props) { ai_assert(NULL != pFile); const aiScene* scene = NULL; @@ -189,7 +183,7 @@ const aiScene* aiImportFileExWithProperties( const char* pFile, unsigned int pFl pimpl->mMatrixProperties = pp->matrices; } // setup a custom IO system if necessary - if (pFS) { + if (pFS) { imp->SetIOHandler( new CIOSystemWrapper (pFS) ); } @@ -200,8 +194,7 @@ const aiScene* aiImportFileExWithProperties( const char* pFile, unsigned int pFl if( scene) { ScenePrivateData* priv = const_cast( ScenePriv(scene) ); priv->mOrigImporter = imp; - } - else { + } else { // if failed, extract error code and destroy the import gLastErrorString = imp->GetErrorString(); delete imp; @@ -209,6 +202,7 @@ const aiScene* aiImportFileExWithProperties( const char* pFile, unsigned int pFl // return imported data. If the import failed the pointer is NULL anyways ASSIMP_END_EXCEPTION_REGION(const aiScene*); + return scene; } diff --git a/code/AssimpCExport.cpp b/code/AssimpCExport.cpp index fff9d8e21..d3c3d3298 100644 --- a/code/AssimpCExport.cpp +++ b/code/AssimpCExport.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/code/AssxmlExporter.cpp b/code/AssxmlExporter.cpp index c50f1985b..8019232c0 100644 --- a/code/AssxmlExporter.cpp +++ b/code/AssxmlExporter.cpp @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, @@ -41,7 +42,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * ASSXML exporter main code */ #include -#include "./../include/assimp/version.h" +#include #include "ProcessHelper.h" #include #include diff --git a/code/AssxmlExporter.h b/code/AssxmlExporter.h index ba9921f70..9694f74a3 100644 --- a/code/AssxmlExporter.h +++ b/code/AssxmlExporter.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/B3DImporter.cpp b/code/B3DImporter.cpp index d28d41518..5de7bd67c 100644 --- a/code/B3DImporter.cpp +++ b/code/B3DImporter.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. @@ -56,7 +57,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include #include - +#include using namespace Assimp; using namespace std; diff --git a/code/B3DImporter.h b/code/B3DImporter.h index 92ddc0272..4d3576dc3 100644 --- a/code/B3DImporter.h +++ b/code/B3DImporter.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, @@ -48,7 +49,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include "BaseImporter.h" -#include #include struct aiNodeAnim; diff --git a/code/BVHLoader.cpp b/code/BVHLoader.cpp index e5821fdaf..c20cbec4e 100644 --- a/code/BVHLoader.cpp +++ b/code/BVHLoader.cpp @@ -4,7 +4,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. @@ -51,6 +52,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "TinyFormatter.h" #include #include +#include using namespace Assimp; using namespace Assimp::Formatter; diff --git a/code/BVHLoader.h b/code/BVHLoader.h index 8a163d1e7..6a89e1aaf 100644 --- a/code/BVHLoader.h +++ b/code/BVHLoader.h @@ -4,7 +4,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/BaseImporter.cpp b/code/BaseImporter.cpp index 3d53bc089..e8d547783 100644 --- a/code/BaseImporter.cpp +++ b/code/BaseImporter.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. @@ -50,6 +51,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include #include +#include #include #include #include diff --git a/code/BaseImporter.h b/code/BaseImporter.h index 7c8932a3f..06ed0691f 100644 --- a/code/BaseImporter.h +++ b/code/BaseImporter.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, @@ -44,14 +45,13 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "Exceptional.h" -#include -#include #include #include #include #include struct aiScene; +struct aiImporterDesc; namespace Assimp { diff --git a/code/BaseProcess.cpp b/code/BaseProcess.cpp index 580f89cdb..9e175d315 100644 --- a/code/BaseProcess.cpp +++ b/code/BaseProcess.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/code/BaseProcess.h b/code/BaseProcess.h index 148f07284..aa873f717 100644 --- a/code/BaseProcess.h +++ b/code/BaseProcess.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, @@ -43,8 +44,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #define INCLUDED_AI_BASEPROCESS_H #include - -#include #include "GenericProperty.h" struct aiScene; diff --git a/code/Bitmap.cpp b/code/Bitmap.cpp index ae6d62083..b1cf8a409 100644 --- a/code/Bitmap.cpp +++ b/code/Bitmap.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/code/Bitmap.h b/code/Bitmap.h index ad29783ce..96c994dbe 100644 --- a/code/Bitmap.h +++ b/code/Bitmap.h @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. @@ -50,93 +51,71 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include + struct aiTexture; namespace Assimp { class IOStream; + class Bitmap { +protected: - protected: + struct Header { + uint16_t type; + uint32_t size; + uint16_t reserved1; + uint16_t reserved2; + uint32_t offset; - struct Header { + // We define the struct size because sizeof(Header) might return a wrong result because of structure padding. + // Moreover, we must use this ugly and error prone syntax because Visual Studio neither support constexpr or sizeof(name_of_field). + static const std::size_t header_size = + sizeof(uint16_t) + // type + sizeof(uint32_t) + // size + sizeof(uint16_t) + // reserved1 + sizeof(uint16_t) + // reserved2 + sizeof(uint32_t); // offset + }; - uint16_t type; + struct DIB { + uint32_t size; + int32_t width; + int32_t height; + uint16_t planes; + uint16_t bits_per_pixel; + uint32_t compression; + uint32_t image_size; + int32_t x_resolution; + int32_t y_resolution; + uint32_t nb_colors; + uint32_t nb_important_colors; - uint32_t size; + // We define the struct size because sizeof(DIB) might return a wrong result because of structure padding. + // Moreover, we must use this ugly and error prone syntax because Visual Studio neither support constexpr or sizeof(name_of_field). + static const std::size_t dib_size = + sizeof(uint32_t) + // size + sizeof(int32_t) + // width + sizeof(int32_t) + // height + sizeof(uint16_t) + // planes + sizeof(uint16_t) + // bits_per_pixel + sizeof(uint32_t) + // compression + sizeof(uint32_t) + // image_size + sizeof(int32_t) + // x_resolution + sizeof(int32_t) + // y_resolution + sizeof(uint32_t) + // nb_colors + sizeof(uint32_t); // nb_important_colors + }; - uint16_t reserved1; + static const std::size_t mBytesPerPixel = 4; - uint16_t reserved2; - - uint32_t offset; - - // We define the struct size because sizeof(Header) might return a wrong result because of structure padding. - // Moreover, we must use this ugly and error prone syntax because Visual Studio neither support constexpr or sizeof(name_of_field). - static const std::size_t header_size = - sizeof(uint16_t) + // type - sizeof(uint32_t) + // size - sizeof(uint16_t) + // reserved1 - sizeof(uint16_t) + // reserved2 - sizeof(uint32_t); // offset - - }; - - struct DIB { - - uint32_t size; - - int32_t width; - - int32_t height; - - uint16_t planes; - - uint16_t bits_per_pixel; - - uint32_t compression; - - uint32_t image_size; - - int32_t x_resolution; - - int32_t y_resolution; - - uint32_t nb_colors; - - uint32_t nb_important_colors; - - // We define the struct size because sizeof(DIB) might return a wrong result because of structure padding. - // Moreover, we must use this ugly and error prone syntax because Visual Studio neither support constexpr or sizeof(name_of_field). - static const std::size_t dib_size = - sizeof(uint32_t) + // size - sizeof(int32_t) + // width - sizeof(int32_t) + // height - sizeof(uint16_t) + // planes - sizeof(uint16_t) + // bits_per_pixel - sizeof(uint32_t) + // compression - sizeof(uint32_t) + // image_size - sizeof(int32_t) + // x_resolution - sizeof(int32_t) + // y_resolution - sizeof(uint32_t) + // nb_colors - sizeof(uint32_t); // nb_important_colors - - }; - - static const std::size_t mBytesPerPixel = 4; - - public: - - static void Save(aiTexture* texture, IOStream* file); - - protected: - - static void WriteHeader(Header& header, IOStream* file); - - static void WriteDIB(DIB& dib, IOStream* file); - - static void WriteData(aiTexture* texture, IOStream* file); +public: + static void Save(aiTexture* texture, IOStream* file); +protected: + static void WriteHeader(Header& header, IOStream* file); + static void WriteDIB(DIB& dib, IOStream* file); + static void WriteData(aiTexture* texture, IOStream* file); }; } diff --git a/code/BlenderDNA.cpp b/code/BlenderDNA.cpp index e8f335bce..23ece913f 100644 --- a/code/BlenderDNA.cpp +++ b/code/BlenderDNA.cpp @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, @@ -48,6 +49,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "BlenderDNA.h" #include "StreamReader.h" #include "fast_atof.h" +#include "TinyFormatter.h" using namespace Assimp; using namespace Assimp::Blender; diff --git a/code/BlenderDNA.h b/code/BlenderDNA.h index 135e38d60..c09f1ca42 100644 --- a/code/BlenderDNA.h +++ b/code/BlenderDNA.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, @@ -46,12 +47,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #define INCLUDED_AI_BLEND_DNA_H #include "BaseImporter.h" -#include "TinyFormatter.h" #include "StreamReader.h" #include #include #include - +#include // enable verbose log output. really verbose, so be careful. #ifdef ASSIMP_BUILD_DEBUG diff --git a/code/BlenderDNA.inl b/code/BlenderDNA.inl index 7397e291b..6919c9153 100644 --- a/code/BlenderDNA.inl +++ b/code/BlenderDNA.inl @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, @@ -46,9 +47,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #define INCLUDED_AI_BLEND_DNA_INL #include +#include "TinyFormatter.h" namespace Assimp { - namespace Blender { +namespace Blender { //-------------------------------------------------------------------------------- const Field& Structure :: operator [] (const std::string& ss) const diff --git a/code/BlenderIntermediate.h b/code/BlenderIntermediate.h index 0290185de..0fc9cdafc 100644 --- a/code/BlenderIntermediate.h +++ b/code/BlenderIntermediate.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, @@ -48,9 +49,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "BlenderLoader.h" #include "BlenderDNA.h" #include "BlenderScene.h" -#include "BlenderSceneGen.h" #include -#include "./../include/assimp/material.h" +#include struct aiTexture; diff --git a/code/BlenderLoader.cpp b/code/BlenderLoader.cpp index b19eed00c..1453ef000 100644 --- a/code/BlenderLoader.cpp +++ b/code/BlenderLoader.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, @@ -54,12 +55,13 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "BlenderBMesh.h" #include "StringUtils.h" #include -#include "StringComparison.h" +#include +#include "StringComparison.h" #include "StreamReader.h" #include "MemoryIOWrapper.h" + #include -#include // zlib is needed for compressed blend files @@ -108,6 +110,7 @@ BlenderImporter::~BlenderImporter() } static const char* Tokens[] = { "BLENDER" }; +static const char* TokensForSearch[] = { "blender" }; // ------------------------------------------------------------------------------------------------ // Returns whether the class can handle the format of the given file. @@ -120,7 +123,7 @@ bool BlenderImporter::CanRead( const std::string& pFile, IOSystem* pIOHandler, b else if ((!extension.length() || checkSig) && pIOHandler) { // note: this won't catch compressed files - return SearchFileHeaderForToken(pIOHandler,pFile, Tokens,1); + return SearchFileHeaderForToken(pIOHandler,pFile, TokensForSearch,1); } return false; } @@ -165,6 +168,7 @@ void BlenderImporter::InternReadFile( const std::string& pFile, free_it free_it_really(dest); #endif + FileDatabase file; std::shared_ptr stream(pIOHandler->Open(pFile,"rb")); if (!stream) { diff --git a/code/BlenderLoader.h b/code/BlenderLoader.h index 505409260..66fff594b 100644 --- a/code/BlenderLoader.h +++ b/code/BlenderLoader.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/BlenderModifier.cpp b/code/BlenderModifier.cpp index f903a1380..d71ae5098 100644 --- a/code/BlenderModifier.cpp +++ b/code/BlenderModifier.cpp @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/BlenderModifier.h b/code/BlenderModifier.h index 1d176756e..9fa8c74ee 100644 --- a/code/BlenderModifier.h +++ b/code/BlenderModifier.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/BlenderScene.cpp b/code/BlenderScene.cpp index 2781cc7c6..b9068329b 100644 --- a/code/BlenderScene.cpp +++ b/code/BlenderScene.cpp @@ -44,9 +44,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #ifndef ASSIMP_BUILD_NO_BLEND_IMPORTER -#include "BlenderDNA.h" #include "BlenderScene.h" #include "BlenderSceneGen.h" +#include "BlenderDNA.h" using namespace Assimp; using namespace Assimp::Blender; diff --git a/code/BlenderScene.h b/code/BlenderScene.h index fe6d6e14c..36094eabd 100644 --- a/code/BlenderScene.h +++ b/code/BlenderScene.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, @@ -638,6 +639,7 @@ struct Base : ElemBase { Base() : ElemBase() + , prev( nullptr ) , next() , object() { // empty @@ -784,10 +786,12 @@ struct Tex : ElemBase { //char use_nodes; Tex() - : ElemBase() { + : ElemBase() + , imaflag( ImageFlags_INTERPOL ) + , type( Type_CLOUDS ) + , ima() { // empty } - }; // ------------------------------------------------------------------------------- diff --git a/code/BlenderTessellator.cpp b/code/BlenderTessellator.cpp index 60879b417..2eaa938dd 100644 --- a/code/BlenderTessellator.cpp +++ b/code/BlenderTessellator.cpp @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/BlenderTessellator.h b/code/BlenderTessellator.h index 530bd2c3e..47d3a4665 100644 --- a/code/BlenderTessellator.h +++ b/code/BlenderTessellator.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/BlobIOSystem.h b/code/BlobIOSystem.h index 6cd014254..f406ea0fe 100644 --- a/code/BlobIOSystem.h +++ b/code/BlobIOSystem.h @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. @@ -45,10 +46,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #ifndef AI_BLOBIOSYSTEM_H_INCLUDED #define AI_BLOBIOSYSTEM_H_INCLUDED -#include "./../include/assimp/IOStream.hpp" -#include "./../include/assimp/cexport.h" -#include "./../include/assimp/IOSystem.hpp" -#include "./../include/assimp/DefaultLogger.hpp" +#include +#include +#include +#include #include #include #include diff --git a/code/ByteSwapper.h b/code/ByteSwapper.h index 37538e7cb..e5c7569f1 100644 --- a/code/ByteSwapper.h +++ b/code/ByteSwapper.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/CInterfaceIOWrapper.cpp b/code/CInterfaceIOWrapper.cpp index 0a80c1990..9de75b683 100644 --- a/code/CInterfaceIOWrapper.cpp +++ b/code/CInterfaceIOWrapper.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/code/CInterfaceIOWrapper.h b/code/CInterfaceIOWrapper.h index 0172fb49f..78cac0cf9 100644 --- a/code/CInterfaceIOWrapper.h +++ b/code/CInterfaceIOWrapper.h @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/code/CMakeLists.txt b/code/CMakeLists.txt index 92199c234..de515ba94 100644 --- a/code/CMakeLists.txt +++ b/code/CMakeLists.txt @@ -1,7 +1,8 @@ # Open Asset Import Library (assimp) # ---------------------------------------------------------------------- # -# Copyright (c) 2006-2016, assimp team +# Copyright (c) 2006-2017, assimp team + # All rights reserved. # # Redistribution and use of this software in source and binary forms, @@ -58,7 +59,7 @@ SET( PUBLIC_HEADERS ${HEADER_PATH}/camera.h ${HEADER_PATH}/color4.h ${HEADER_PATH}/color4.inl - ${HEADER_PATH}/config.h + ${CMAKE_CURRENT_BINARY_DIR}/../include/assimp/config.h ${HEADER_PATH}/defs.h ${HEADER_PATH}/cfileio.h ${HEADER_PATH}/light.h @@ -93,6 +94,8 @@ SET( PUBLIC_HEADERS ${HEADER_PATH}/NullLogger.hpp ${HEADER_PATH}/cexport.h ${HEADER_PATH}/Exporter.hpp + ${HEADER_PATH}/DefaultIOStream.h + ${HEADER_PATH}/DefaultIOSystem.h ) SET( Core_SRCS @@ -125,9 +128,7 @@ SET( Common_SRCS ByteSwapper.h DefaultProgressHandler.h DefaultIOStream.cpp - DefaultIOStream.h DefaultIOSystem.cpp - DefaultIOSystem.h CInterfaceIOWrapper.cpp CInterfaceIOWrapper.h Hash.h @@ -187,10 +188,16 @@ IF ( ASSIMP_BUILD_NONFREE_C4D_IMPORTER ) SOURCE_GROUP( C4D FILES ${C4D_SRCS}) ENDIF ( ASSIMP_BUILD_NONFREE_C4D_IMPORTER ) +# if this variable is set to TRUE, the user can manually disable importers by setting +# ASSIMP_BUILD_XXX_IMPORTER to FALSE for each importer +# if this variable is set to FALSE, the user can manually enable importers by setting +# ASSIMP_BUILD_XXX_IMPORTER to TRUE for each importer +OPTION(ASSIMP_BUILD_ALL_IMPORTERS_BY_DEFAULT "default value of all ASSIMP_BUILD_XXX_IMPORTER value" TRUE) + # macro to add the CMake Option ADD_ASSIMP_IMPORTER_ which enables compile of loader # this way selective loaders can be compiled (reduces filesize + compile time) MACRO(ADD_ASSIMP_IMPORTER name) - OPTION(ASSIMP_BUILD_${name}_IMPORTER "build the ${name} importer" TRUE) + OPTION(ASSIMP_BUILD_${name}_IMPORTER "build the ${name} importer" ${ASSIMP_BUILD_ALL_IMPORTERS_BY_DEFAULT}) IF(ASSIMP_BUILD_${name}_IMPORTER) LIST(APPEND ASSIMP_LOADER_SRCS ${ARGN}) SET(ASSIMP_IMPORTERS_ENABLED "${ASSIMP_IMPORTERS_ENABLED} ${name}") @@ -563,6 +570,9 @@ SET( PostProcessing_SRCS ) SOURCE_GROUP( PostProcessing FILES ${PostProcessing_SRCS}) +SET( IrrXML_SRCS irrXMLWrapper.h ) +SOURCE_GROUP( IrrXML FILES ${IrrXML_SRCS}) + ADD_ASSIMP_IMPORTER( Q3D Q3DLoader.cpp Q3DLoader.h @@ -657,6 +667,16 @@ ADD_ASSIMP_IMPORTER( 3MF D3MFOpcPackage.cpp ) +ADD_ASSIMP_IMPORTER( MMD + MMDCpp14.h + MMDImporter.cpp + MMDImporter.h + MMDPmdParser.h + MMDPmxParser.h + MMDPmxParser.cpp + MMDVmdParser.h +) + SET( Step_SRCS StepExporter.h StepExporter.cpp @@ -675,18 +695,6 @@ SET( Extra_SRCS ) SOURCE_GROUP( Extra FILES ${Extra_SRCS}) -SET( IrrXML_SRCS - irrXMLWrapper.h - ../contrib/irrXML/CXMLReaderImpl.h - ../contrib/irrXML/heapsort.h - ../contrib/irrXML/irrArray.h - ../contrib/irrXML/irrString.h - ../contrib/irrXML/irrTypes.h - ../contrib/irrXML/irrXML.cpp - ../contrib/irrXML/irrXML.h -) -SOURCE_GROUP( IrrXML FILES ${IrrXML_SRCS}) - SET( ConvertUTF_SRCS ../contrib/ConvertUTF/ConvertUTF.h ../contrib/ConvertUTF/ConvertUTF.c @@ -842,7 +850,8 @@ SET( assimp_src ADD_DEFINITIONS( -DOPENDDLPARSER_BUILD ) INCLUDE_DIRECTORIES( - ../contrib/openddlparser/include + ${IRRXML_INCLUDE_DIR} + ../contrib/openddlparser/include ) IF (ASSIMP_BUILD_NONFREE_C4D_IMPORTER) @@ -852,7 +861,7 @@ ENDIF (ASSIMP_BUILD_NONFREE_C4D_IMPORTER) ADD_LIBRARY( assimp ${assimp_src} ) -TARGET_LINK_LIBRARIES(assimp ${ZLIB_LIBRARIES} ${OPENDDL_PARSER_LIBRARIES} ) +TARGET_LINK_LIBRARIES(assimp ${ZLIB_LIBRARIES} ${OPENDDL_PARSER_LIBRARIES} ${IRRXML_LIBRARY} ) if(ANDROID AND ASSIMP_ANDROID_JNIIOSYSTEM) set(ASSIMP_ANDROID_JNIIOSYSTEM_PATH port/AndroidJNI) @@ -930,7 +939,7 @@ if(MSVC AND ASSIMP_INSTALL_PDB) DESTINATION ${ASSIMP_LIB_INSTALL_DIR} CONFIGURATIONS Debug ) - install(FILES ${Assimp_BINARY_DIR}/code/RelWithDebInfo/assimp.pdb + install(FILES ${Assimp_BINARY_DIR}/code/RelWithDebInfo/assimp${LIBRARY_SUFFIX}.pdb DESTINATION ${ASSIMP_LIB_INSTALL_DIR} CONFIGURATIONS RelWithDebInfo ) diff --git a/code/COBLoader.cpp b/code/COBLoader.cpp index 441dd1c56..a92e231a5 100644 --- a/code/COBLoader.cpp +++ b/code/COBLoader.cpp @@ -2,7 +2,7 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team All rights reserved. Redistribution and use of this software in source and binary forms, @@ -57,7 +57,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include #include - +#include using namespace Assimp; using namespace Assimp::COB; @@ -941,20 +941,22 @@ void COBImporter::UnsupportedChunk_Binary( StreamReaderLE& reader, const ChunkIn // ------------------------------------------------------------------------------------------------ // tiny utility guard to aid me at staying within chunk boundaries. class chunk_guard { - public: - chunk_guard(const COB::ChunkInfo& nfo, StreamReaderLE& reader) - : nfo(nfo) - , reader(reader) - , cur(reader.GetCurrentPos()) - { + : nfo(nfo) + , reader(reader) + , cur(reader.GetCurrentPos()) { } ~chunk_guard() { // don't do anything if the size is not given if(nfo.size != static_cast(-1)) { - reader.IncPtr(static_cast(nfo.size)-reader.GetCurrentPos()+cur); + try { + reader.IncPtr( static_cast< int >( nfo.size ) - reader.GetCurrentPos() + cur ); + } catch ( DeadlyImportError e ) { + // out of limit so correct the value + reader.IncPtr( reader.GetReadLimit() ); + } } } diff --git a/code/COBLoader.h b/code/COBLoader.h index efccc448d..46dc86f62 100644 --- a/code/COBLoader.h +++ b/code/COBLoader.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/COBScene.h b/code/COBScene.h index 0e27d1461..a1d6ebc27 100644 --- a/code/COBScene.h +++ b/code/COBScene.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, @@ -46,12 +47,13 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include +#include #include "BaseImporter.h" -#include "./../include/assimp/material.h" +#include -namespace Assimp { - namespace COB { +namespace Assimp { +namespace COB { // ------------------ /** Represents a single vertex index in a face */ diff --git a/code/CSMLoader.cpp b/code/CSMLoader.cpp index 5f274c51f..eeb6986b0 100644 --- a/code/CSMLoader.cpp +++ b/code/CSMLoader.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. @@ -57,7 +58,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include #include - +#include using namespace Assimp; diff --git a/code/CSMLoader.h b/code/CSMLoader.h index 71abb7e91..55a632dc6 100644 --- a/code/CSMLoader.h +++ b/code/CSMLoader.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/CalcTangentsProcess.cpp b/code/CalcTangentsProcess.cpp index c13ffcb24..2af16fcc0 100644 --- a/code/CalcTangentsProcess.cpp +++ b/code/CalcTangentsProcess.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/code/CalcTangentsProcess.h b/code/CalcTangentsProcess.h index 4a6122668..a22785639 100644 --- a/code/CalcTangentsProcess.h +++ b/code/CalcTangentsProcess.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/ColladaExporter.cpp b/code/ColladaExporter.cpp index 7f9540aa1..1b8a60883 100644 --- a/code/ColladaExporter.cpp +++ b/code/ColladaExporter.cpp @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, @@ -38,18 +39,16 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ---------------------------------------------------------------------- */ - - #ifndef ASSIMP_BUILD_NO_EXPORT #ifndef ASSIMP_BUILD_NO_COLLADA_EXPORTER -#include "ColladaExporter.h" +#include "ColladaExporter.h" #include "Bitmap.h" #include "fast_atof.h" #include "SceneCombiner.h" -#include "DefaultIOSystem.h" #include "StringUtils.h" #include "XMLTools.h" +#include #include #include #include @@ -59,6 +58,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include #include +#include +#include using namespace Assimp; @@ -133,6 +134,7 @@ void ColladaExporter::WriteFile() WriteLightsLibrary(); WriteMaterials(); WriteGeometryLibrary(); + WriteControllerLibrary(); WriteSceneLibrary(); @@ -692,7 +694,6 @@ void ColladaExporter::WriteMaterials() materials[a].shininess.exist = mat->Get( AI_MATKEY_SHININESS, materials[a].shininess.value) == aiReturn_SUCCESS; materials[a].transparency.exist = mat->Get( AI_MATKEY_OPACITY, materials[a].transparency.value) == aiReturn_SUCCESS; - materials[a].transparency.value = materials[a].transparency.value; materials[a].index_refraction.exist = mat->Get( AI_MATKEY_REFRACTI, materials[a].index_refraction.value) == aiReturn_SUCCESS; } @@ -787,6 +788,177 @@ void ColladaExporter::WriteMaterials() } } +// ------------------------------------------------------------------------------------------------ +// Writes the controller library +void ColladaExporter::WriteControllerLibrary() +{ + mOutput << startstr << "" << endstr; + PushTag(); + + for( size_t a = 0; a < mScene->mNumMeshes; ++a) + WriteController( a); + + PopTag(); + mOutput << startstr << "" << endstr; +} + +// ------------------------------------------------------------------------------------------------ +// Writes a skin controller of the given mesh +void ColladaExporter::WriteController( size_t pIndex) +{ + const aiMesh* mesh = mScene->mMeshes[pIndex]; + const std::string idstr = GetMeshId( pIndex); + const std::string idstrEscaped = XMLEscape(idstr); + + if ( mesh->mNumFaces == 0 || mesh->mNumVertices == 0 ) + return; + + if ( mesh->mNumBones == 0 ) + return; + + mOutput << startstr << ""<< endstr; + PushTag(); + + mOutput << startstr << "" << endstr; + PushTag(); + + // bind pose matrix + mOutput << startstr << "" << endstr; + PushTag(); + + // I think it is identity in general cases. + aiMatrix4x4 mat; + mOutput << startstr << mat.a1 << " " << mat.a2 << " " << mat.a3 << " " << mat.a4 << endstr; + mOutput << startstr << mat.b1 << " " << mat.b2 << " " << mat.b3 << " " << mat.b4 << endstr; + mOutput << startstr << mat.c1 << " " << mat.c2 << " " << mat.c3 << " " << mat.c4 << endstr; + mOutput << startstr << mat.d1 << " " << mat.d2 << " " << mat.d3 << " " << mat.d4 << endstr; + + PopTag(); + mOutput << startstr << "" << endstr; + + mOutput << startstr << "" << endstr; + PushTag(); + + mOutput << startstr << "mNumBones << "\">"; + + for( size_t i = 0; i < mesh->mNumBones; ++i ) + mOutput << XMLEscape(mesh->mBones[i]->mName.C_Str()) << " "; + + mOutput << "" << endstr; + + mOutput << startstr << "" << endstr; + PushTag(); + + mOutput << startstr << "mNumBones << "\" stride=\"" << 1 << "\">" << endstr; + PushTag(); + + mOutput << startstr << "" << endstr; + + PopTag(); + mOutput << startstr << "" << endstr; + + PopTag(); + mOutput << startstr << "" << endstr; + + PopTag(); + mOutput << startstr << "" << endstr; + + std::vector bind_poses; + bind_poses.reserve(mesh->mNumBones * 16); + for( size_t i = 0; i < mesh->mNumBones; ++i) + for( size_t j = 0; j < 4; ++j) + bind_poses.insert(bind_poses.end(), mesh->mBones[i]->mOffsetMatrix[j], mesh->mBones[i]->mOffsetMatrix[j] + 4); + + WriteFloatArray( idstr + "-skin-bind_poses", FloatType_Mat4x4, (const ai_real*) bind_poses.data(), bind_poses.size() / 16); + + bind_poses.clear(); + + std::vector skin_weights; + skin_weights.reserve(mesh->mNumVertices * mesh->mNumBones); + for( size_t i = 0; i < mesh->mNumBones; ++i) + for( size_t j = 0; j < mesh->mBones[i]->mNumWeights; ++j) + skin_weights.push_back(mesh->mBones[i]->mWeights[j].mWeight); + + WriteFloatArray( idstr + "-skin-weights", FloatType_Weight, (const ai_real*) skin_weights.data(), skin_weights.size()); + + skin_weights.clear(); + + mOutput << startstr << "" << endstr; + PushTag(); + + mOutput << startstr << "" << endstr; + mOutput << startstr << "" << endstr; + + PopTag(); + mOutput << startstr << "" << endstr; + + mOutput << startstr << "mNumVertices << "\">" << endstr; + PushTag(); + + mOutput << startstr << "" << endstr; + mOutput << startstr << "" << endstr; + + mOutput << startstr << ""; + + std::vector num_influences(mesh->mNumVertices, (ai_uint)0); + for( size_t i = 0; i < mesh->mNumBones; ++i) + for( size_t j = 0; j < mesh->mBones[i]->mNumWeights; ++j) + ++num_influences[mesh->mBones[i]->mWeights[j].mVertexId]; + + for( size_t i = 0; i < mesh->mNumVertices; ++i) + mOutput << num_influences[i] << " "; + + mOutput << "" << endstr; + + mOutput << startstr << ""; + + ai_uint joint_weight_indices_length = 0; + std::vector accum_influences; + accum_influences.reserve(num_influences.size()); + for( size_t i = 0; i < num_influences.size(); ++i) + { + accum_influences.push_back(joint_weight_indices_length); + joint_weight_indices_length += num_influences[i]; + } + + ai_uint weight_index = 0; + std::vector joint_weight_indices(2 * joint_weight_indices_length, (ai_int)-1); + for( size_t i = 0; i < mesh->mNumBones; ++i) + for( size_t j = 0; j < mesh->mBones[i]->mNumWeights; ++j) + { + unsigned int vId = mesh->mBones[i]->mWeights[j].mVertexId; + for( size_t k = 0; k < num_influences[vId]; ++k) + { + if (joint_weight_indices[2 * (accum_influences[vId] + k)] == -1) + { + joint_weight_indices[2 * (accum_influences[vId] + k)] = i; + joint_weight_indices[2 * (accum_influences[vId] + k) + 1] = weight_index; + break; + } + } + ++weight_index; + } + + for( size_t i = 0; i < joint_weight_indices.size(); ++i) + mOutput << joint_weight_indices[i] << " "; + + num_influences.clear(); + accum_influences.clear(); + joint_weight_indices.clear(); + + mOutput << "" << endstr; + + PopTag(); + mOutput << startstr << "" << endstr; + + PopTag(); + mOutput << startstr << "" << endstr; + + PopTag(); + mOutput << startstr << "" << endstr; +} + // ------------------------------------------------------------------------------------------------ // Writes the geometry library void ColladaExporter::WriteGeometryLibrary() @@ -951,6 +1123,8 @@ void ColladaExporter::WriteFloatArray( const std::string& pIdString, FloatDataTy case FloatType_TexCoord2: floatsPerElement = 2; break; case FloatType_TexCoord3: floatsPerElement = 3; break; case FloatType_Color: floatsPerElement = 3; break; + case FloatType_Mat4x4: floatsPerElement = 16; break; + case FloatType_Weight: floatsPerElement = 1; break; default: return; } @@ -1019,6 +1193,14 @@ void ColladaExporter::WriteFloatArray( const std::string& pIdString, FloatDataTy mOutput << startstr << "" << endstr; mOutput << startstr << "" << endstr; break; + + case FloatType_Mat4x4: + mOutput << startstr << "" << endstr; + break; + + case FloatType_Weight: + mOutput << startstr << "" << endstr; + break; } PopTag(); @@ -1080,16 +1262,24 @@ void ColladaExporter::WriteNode( const aiScene* pScene, aiNode* pNode) // If the node is associated with a bone, it is a joint node (JOINT) // otherwise it is a normal node (NODE) const char * node_type; + bool is_joint, is_skeleton_root = false; if (NULL == findBone(pScene, pNode->mName.C_Str())) { node_type = "NODE"; + is_joint = false; } else { node_type = "JOINT"; + is_joint = true; + if(!pNode->mParent || NULL == findBone(pScene, pNode->mParent->mName.C_Str())) + is_skeleton_root = true; } const std::string node_name_escaped = XMLEscape(pNode->mName.data); mOutput << startstr - << "" << endstr; PushTag(); @@ -1097,7 +1287,7 @@ void ColladaExporter::WriteNode( const aiScene* pScene, aiNode* pNode) // write transformation - we can directly put the matrix there // TODO: (thom) decompose into scale - rot - quad to allow addressing it by animations afterwards const aiMatrix4x4& mat = pNode->mTransformation; - mOutput << startstr << ""; + mOutput << startstr << ""; mOutput << mat.a1 << " " << mat.a2 << " " << mat.a3 << " " << mat.a4 << " "; mOutput << mat.b1 << " " << mat.b2 << " " << mat.b3 << " " << mat.b4 << " "; mOutput << mat.c1 << " " << mat.c2 << " " << mat.c3 << " " << mat.c4 << " "; @@ -1125,33 +1315,50 @@ void ColladaExporter::WriteNode( const aiScene* pScene, aiNode* pNode) for( size_t a = 0; a < pNode->mNumMeshes; ++a ) { const aiMesh* mesh = mScene->mMeshes[pNode->mMeshes[a]]; - // do not instanciate mesh if empty. I wonder how this could happen - if( mesh->mNumFaces == 0 || mesh->mNumVertices == 0 ) - continue; - mOutput << startstr << "mMeshes[a])) << "\">" << endstr; - PushTag(); - mOutput << startstr << "" << endstr; - PushTag(); - mOutput << startstr << "" << endstr; - PushTag(); - mOutput << startstr << "mMaterialIndex].name) << "\">" << endstr; - PushTag(); - for( size_t a = 0; a < AI_MAX_NUMBER_OF_TEXTURECOORDS; ++a ) - { - if( mesh->HasTextureCoords( static_cast(a) ) ) - // semantic as in - // input_semantic as in - // input_set as in - mOutput << startstr << "" << endstr; - } - PopTag(); - mOutput << startstr << "" << endstr; - PopTag(); - mOutput << startstr << "" << endstr; - PopTag(); - mOutput << startstr << "" << endstr; - PopTag(); - mOutput << startstr << "" << endstr; + // do not instanciate mesh if empty. I wonder how this could happen + if( mesh->mNumFaces == 0 || mesh->mNumVertices == 0 ) + continue; + + if( mesh->mNumBones == 0 ) + { + mOutput << startstr << "mMeshes[a])) << "\">" << endstr; + PushTag(); + } + else + { + mOutput << startstr + << "mMeshes[a])) << "-skin\">" + << endstr; + PushTag(); + + mOutput << startstr << "#skeleton_root" << endstr; + } + mOutput << startstr << "" << endstr; + PushTag(); + mOutput << startstr << "" << endstr; + PushTag(); + mOutput << startstr << "mMaterialIndex].name) << "\">" << endstr; + PushTag(); + for( size_t a = 0; a < AI_MAX_NUMBER_OF_TEXTURECOORDS; ++a ) + { + if( mesh->HasTextureCoords( static_cast(a) ) ) + // semantic as in + // input_semantic as in + // input_set as in + mOutput << startstr << "" << endstr; + } + PopTag(); + mOutput << startstr << "" << endstr; + PopTag(); + mOutput << startstr << "" << endstr; + PopTag(); + mOutput << startstr << "" << endstr; + + PopTag(); + if( mesh->mNumBones == 0) + mOutput << startstr << "" << endstr; + else + mOutput << startstr << "" << endstr; } // recurse into subnodes diff --git a/code/ColladaExporter.h b/code/ColladaExporter.h index e8bd9b71f..36c012f2e 100644 --- a/code/ColladaExporter.h +++ b/code/ColladaExporter.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, @@ -101,13 +102,19 @@ protected: void WriteSpotLight(const aiLight *const light); void WriteAmbienttLight(const aiLight *const light); + /// Writes the controller library + void WriteControllerLibrary(); + + /// Writes a skin controller of the given mesh + void WriteController( size_t pIndex); + /// Writes the geometry library void WriteGeometryLibrary(); /// Writes the given mesh void WriteGeometry( size_t pIndex); - enum FloatDataType { FloatType_Vector, FloatType_TexCoord2, FloatType_TexCoord3, FloatType_Color }; + enum FloatDataType { FloatType_Vector, FloatType_TexCoord2, FloatType_TexCoord3, FloatType_Color, FloatType_Mat4x4, FloatType_Weight }; /// Writes a float array of the given type void WriteFloatArray( const std::string& pIdString, FloatDataType pType, const ai_real* pData, size_t pElementCount); diff --git a/code/ColladaHelper.h b/code/ColladaHelper.h index 0fe3259ee..8ccd6cafe 100644 --- a/code/ColladaHelper.h +++ b/code/ColladaHelper.h @@ -4,7 +4,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, @@ -43,7 +44,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #ifndef AI_COLLADAHELPER_H_INC #define AI_COLLADAHELPER_H_INC -#include #include #include #include diff --git a/code/ColladaLoader.cpp b/code/ColladaLoader.cpp index 7c6aa74bb..457b62c20 100644 --- a/code/ColladaLoader.cpp +++ b/code/ColladaLoader.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. @@ -49,21 +50,19 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include #include -#include "ColladaParser.h" +#include +#include "ColladaParser.h" #include "fast_atof.h" #include "ParsingUtils.h" #include "SkeletonMeshBuilder.h" -#include "Defines.h" #include "CreateAnimMesh.h" #include "time.h" #include "math.h" #include -#include #include -#include "Defines.h" - +#include using namespace Assimp; using namespace Assimp::Formatter; diff --git a/code/ColladaLoader.h b/code/ColladaLoader.h index 2b31531d2..8388ab01e 100644 --- a/code/ColladaLoader.h +++ b/code/ColladaLoader.h @@ -4,7 +4,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/ColladaParser.cpp b/code/ColladaParser.cpp index 3ed41a441..851a31edd 100644 --- a/code/ColladaParser.cpp +++ b/code/ColladaParser.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/code/ColladaParser.h b/code/ColladaParser.h index 5aa724063..b34974470 100644 --- a/code/ColladaParser.h +++ b/code/ColladaParser.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- - Copyright (c) 2006-2016, assimp team + Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, @@ -49,7 +50,6 @@ #include "ColladaHelper.h" #include #include "TinyFormatter.h" -#include namespace Assimp { diff --git a/code/ComputeUVMappingProcess.cpp b/code/ComputeUVMappingProcess.cpp index 0fee43a70..c49666de8 100644 --- a/code/ComputeUVMappingProcess.cpp +++ b/code/ComputeUVMappingProcess.cpp @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/ComputeUVMappingProcess.h b/code/ComputeUVMappingProcess.h index db4287863..1de97961d 100644 --- a/code/ComputeUVMappingProcess.h +++ b/code/ComputeUVMappingProcess.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/ConvertToLHProcess.cpp b/code/ConvertToLHProcess.cpp index 017282796..6a43d5c2d 100644 --- a/code/ConvertToLHProcess.cpp +++ b/code/ConvertToLHProcess.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/code/ConvertToLHProcess.h b/code/ConvertToLHProcess.h index 0c5f91c96..130fdcafd 100644 --- a/code/ConvertToLHProcess.h +++ b/code/ConvertToLHProcess.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/CreateAnimMesh.h b/code/CreateAnimMesh.h index c5ceb4028..84cab8932 100644 --- a/code/CreateAnimMesh.h +++ b/code/CreateAnimMesh.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/D3MFImporter.cpp b/code/D3MFImporter.cpp index 347263145..0f06d4a1e 100644 --- a/code/D3MFImporter.cpp +++ b/code/D3MFImporter.cpp @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, @@ -43,24 +44,18 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "D3MFImporter.h" #include -#include #include #include +#include #include "StringComparison.h" #include "StringUtils.h" - #include -#include #include #include -#include #include -#include #include -#include - #include "D3MFOpcPackage.h" #include #include "irrXMLWrapper.h" @@ -68,7 +63,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. namespace Assimp { namespace D3MF { - namespace XmlTag { static const std::string model = "model"; static const std::string metadata = "metadata"; @@ -254,9 +248,7 @@ private: mesh->mFaces = new aiFace[mesh->mNumFaces]; mesh->mPrimitiveTypes = aiPrimitiveType_TRIANGLE; - std::copy(faces.begin(), faces.end(), mesh->mFaces); - } aiFace ReadTriangle() @@ -313,8 +305,6 @@ private: private: std::vector meshes; XmlReader* xmlReader; - - }; } //namespace D3MF diff --git a/code/D3MFImporter.h b/code/D3MFImporter.h index 36c6d53e4..fb65d8606 100644 --- a/code/D3MFImporter.h +++ b/code/D3MFImporter.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, @@ -41,9 +42,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #ifndef AI_D3MFLOADER_H_INCLUDED #define AI_D3MFLOADER_H_INCLUDED -#include -#include - #include "BaseImporter.h" namespace Assimp { diff --git a/code/D3MFOpcPackage.cpp b/code/D3MFOpcPackage.cpp index f6c1fb605..562b891be 100644 --- a/code/D3MFOpcPackage.cpp +++ b/code/D3MFOpcPackage.cpp @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, @@ -53,7 +54,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include #include -#include #include diff --git a/code/D3MFOpcPackage.h b/code/D3MFOpcPackage.h index dd8a40aab..e46eb7636 100644 --- a/code/D3MFOpcPackage.h +++ b/code/D3MFOpcPackage.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, @@ -41,7 +42,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #ifndef D3MFOPCPACKAGE_H #define D3MFOPCPACKAGE_H -#include #include #include diff --git a/code/DXFHelper.h b/code/DXFHelper.h index 1947469a8..e16b7f1aa 100644 --- a/code/DXFHelper.h +++ b/code/DXFHelper.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/DXFLoader.cpp b/code/DXFLoader.cpp index ab5ca146c..1e932e509 100644 --- a/code/DXFLoader.cpp +++ b/code/DXFLoader.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. @@ -54,6 +55,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "DXFHelper.h" #include #include +#include + #include using namespace Assimp; diff --git a/code/DXFLoader.h b/code/DXFLoader.h index 13af4cdec..64822e9e2 100644 --- a/code/DXFLoader.h +++ b/code/DXFLoader.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, @@ -45,6 +46,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #define AI_DXFLOADER_H_INCLUDED #include "BaseImporter.h" +#include namespace Assimp { namespace DXF { diff --git a/code/DeboneProcess.cpp b/code/DeboneProcess.cpp index 41941b4ac..b43dcad84 100644 --- a/code/DeboneProcess.cpp +++ b/code/DeboneProcess.cpp @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/DeboneProcess.h b/code/DeboneProcess.h index 5920473e2..75f158c03 100644 --- a/code/DeboneProcess.h +++ b/code/DeboneProcess.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/DefaultIOStream.cpp b/code/DefaultIOStream.cpp index 1907709e3..cce9af19d 100644 --- a/code/DefaultIOStream.cpp +++ b/code/DefaultIOStream.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. @@ -44,7 +45,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include -#include "DefaultIOStream.h" +#include #include #include @@ -126,7 +127,7 @@ size_t DefaultIOStream::FileSize() const if (0 != err) return 0; mCachedSize = (size_t) (fileStat.st_size); -#elif defined __GNUC__ || defined __APPLE__ || defined __MACH__ +#elif defined __GNUC__ || defined __APPLE__ || defined __MACH__ || defined __FreeBSD__ struct stat fileStat; int err = stat(mFilename.c_str(), &fileStat ); if (0 != err) diff --git a/code/DefaultIOSystem.cpp b/code/DefaultIOSystem.cpp index 8c44c8bd0..ca4ae4564 100644 --- a/code/DefaultIOSystem.cpp +++ b/code/DefaultIOSystem.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. @@ -40,10 +41,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /** @file Default implementation of IOSystem using the standard C file functions */ -#include "DefaultIOSystem.h" -#include "DefaultIOStream.h" #include "StringComparison.h" +#include +#include #include #include #include diff --git a/code/DefaultLogger.cpp b/code/DefaultLogger.cpp index 5364bd8bc..5a6f19544 100644 --- a/code/DefaultLogger.cpp +++ b/code/DefaultLogger.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. @@ -43,13 +44,14 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * @brief Implementation of DefaultLogger (and Logger) */ -#include "DefaultIOSystem.h" // Default log streams #include "Win32DebugLogStream.h" #include "StdOStreamLogStream.h" #include "FileLogStream.h" #include "StringUtils.h" + +#include #include #include #include diff --git a/code/DefaultProgressHandler.h b/code/DefaultProgressHandler.h index b729e4bfa..6cd872eaa 100644 --- a/code/DefaultProgressHandler.h +++ b/code/DefaultProgressHandler.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/Exceptional.h b/code/Exceptional.h index 3268423ef..5109b8f07 100644 --- a/code/Exceptional.h +++ b/code/Exceptional.h @@ -42,7 +42,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #define INCLUDED_EXCEPTIONAL_H #include -#include "DefaultIOStream.h" +#include using std::runtime_error; #ifdef _MSC_VER diff --git a/code/Exporter.cpp b/code/Exporter.cpp index 3f77826e5..5f0e75200 100644 --- a/code/Exporter.cpp +++ b/code/Exporter.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. @@ -52,7 +53,6 @@ Here we implement only the C++ interface (Assimp::Exporter). #ifndef ASSIMP_BUILD_NO_EXPORT -#include "DefaultIOSystem.h" #include "BlobIOSystem.h" #include "SceneCombiner.h" #include "BaseProcess.h" @@ -64,11 +64,12 @@ Here we implement only the C++ interface (Assimp::Exporter). #include "Exceptional.h" #include "ScenePrivate.h" #include + +#include #include #include #include #include -#include namespace Assimp { @@ -235,7 +236,7 @@ bool Exporter::IsDefaultIOHandler() const { } // ------------------------------------------------------------------------------------------------ -const aiExportDataBlob* Exporter::ExportToBlob( const aiScene* pScene, const char* pFormatId, +const aiExportDataBlob* Exporter::ExportToBlob( const aiScene* pScene, const char* pFormatId, unsigned int, const ExportProperties* pProperties ) { if (pimpl->blob) { delete pimpl->blob; diff --git a/code/FBXAnimation.cpp b/code/FBXAnimation.cpp index 0758d4db7..6b2c1eff6 100644 --- a/code/FBXAnimation.cpp +++ b/code/FBXAnimation.cpp @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, @@ -48,7 +49,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "FBXParser.h" #include "FBXDocument.h" #include "FBXImporter.h" -#include "FBXImportSettings.h" #include "FBXDocumentUtil.h" #include "FBXProperties.h" diff --git a/code/FBXBinaryTokenizer.cpp b/code/FBXBinaryTokenizer.cpp index 550859345..17cb942ff 100644 --- a/code/FBXBinaryTokenizer.cpp +++ b/code/FBXBinaryTokenizer.cpp @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/FBXCompileConfig.h b/code/FBXCompileConfig.h index 901f5b330..d4d40b056 100644 --- a/code/FBXCompileConfig.h +++ b/code/FBXCompileConfig.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, @@ -44,6 +45,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #ifndef INCLUDED_AI_FBX_COMPILECONFIG_H #define INCLUDED_AI_FBX_COMPILECONFIG_H +#include + // #if _MSC_VER > 1500 || (defined __GNUC___) # define ASSIMP_FBX_USE_UNORDERED_MULTIMAP diff --git a/code/FBXConverter.cpp b/code/FBXConverter.cpp index 848da579e..b2e8e4a91 100644 --- a/code/FBXConverter.cpp +++ b/code/FBXConverter.cpp @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, @@ -58,7 +59,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include -#include #include namespace Assimp { diff --git a/code/FBXConverter.h b/code/FBXConverter.h index ddbbbbf25..8a62d8811 100644 --- a/code/FBXConverter.h +++ b/code/FBXConverter.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/FBXDeformer.cpp b/code/FBXDeformer.cpp index 067a5e405..637144ab1 100644 --- a/code/FBXDeformer.cpp +++ b/code/FBXDeformer.cpp @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, @@ -47,9 +48,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "FBXParser.h" #include "FBXDocument.h" #include "FBXImporter.h" -#include "FBXImportSettings.h" #include "FBXDocumentUtil.h" -#include "FBXProperties.h" namespace Assimp { namespace FBX { diff --git a/code/FBXDocument.cpp b/code/FBXDocument.cpp index 49ce0314a..d2f26c4c7 100644 --- a/code/FBXDocument.cpp +++ b/code/FBXDocument.cpp @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, @@ -55,7 +56,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include - +#include namespace Assimp { namespace FBX { diff --git a/code/FBXDocument.h b/code/FBXDocument.h index 9c446250b..5c8bc610f 100644 --- a/code/FBXDocument.h +++ b/code/FBXDocument.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/FBXDocumentUtil.cpp b/code/FBXDocumentUtil.cpp index 442c60b5d..27921b920 100644 --- a/code/FBXDocumentUtil.cpp +++ b/code/FBXDocumentUtil.cpp @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/FBXImportSettings.h b/code/FBXImportSettings.h index df7cdbd37..ca7435f4c 100644 --- a/code/FBXImportSettings.h +++ b/code/FBXImportSettings.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/FBXImporter.cpp b/code/FBXImporter.cpp index d6c80db2f..7078fde58 100644 --- a/code/FBXImporter.cpp +++ b/code/FBXImporter.cpp @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, @@ -55,9 +56,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "StreamReader.h" #include "MemoryIOWrapper.h" #include - -#include -#include +#include namespace Assimp { template<> const std::string LogFunctions::log_prefix = "FBX: "; diff --git a/code/FBXImporter.h b/code/FBXImporter.h index 350ecfb67..43be97ffa 100644 --- a/code/FBXImporter.h +++ b/code/FBXImporter.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/FBXMaterial.cpp b/code/FBXMaterial.cpp index e5e9cd259..5391c0a45 100644 --- a/code/FBXMaterial.cpp +++ b/code/FBXMaterial.cpp @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/FBXMeshGeometry.cpp b/code/FBXMeshGeometry.cpp index e7a105d45..63de9460a 100644 --- a/code/FBXMeshGeometry.cpp +++ b/code/FBXMeshGeometry.cpp @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/FBXMeshGeometry.h b/code/FBXMeshGeometry.h index 690a86a01..19f7b0a9c 100644 --- a/code/FBXMeshGeometry.h +++ b/code/FBXMeshGeometry.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/FBXModel.cpp b/code/FBXModel.cpp index bbeb14bfb..90939c142 100644 --- a/code/FBXModel.cpp +++ b/code/FBXModel.cpp @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, @@ -48,9 +49,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "FBXMeshGeometry.h" #include "FBXDocument.h" #include "FBXImporter.h" -#include "FBXImportSettings.h" #include "FBXDocumentUtil.h" -#include "FBXProperties.h" namespace Assimp { namespace FBX { diff --git a/code/FBXNodeAttribute.cpp b/code/FBXNodeAttribute.cpp index 405ce7206..bcf079c2e 100644 --- a/code/FBXNodeAttribute.cpp +++ b/code/FBXNodeAttribute.cpp @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, @@ -47,9 +48,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "FBXParser.h" #include "FBXDocument.h" #include "FBXImporter.h" -#include "FBXImportSettings.h" #include "FBXDocumentUtil.h" -#include "FBXProperties.h" namespace Assimp { namespace FBX { diff --git a/code/FBXParser.cpp b/code/FBXParser.cpp index 8e9d40beb..428c29a62 100644 --- a/code/FBXParser.cpp +++ b/code/FBXParser.cpp @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, @@ -51,7 +52,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # include "../contrib/zlib/zlib.h" #endif - #include "FBXTokenizer.h" #include "FBXParser.h" #include "FBXUtil.h" diff --git a/code/FBXParser.h b/code/FBXParser.h index 6bc34272a..d2b2c8bb5 100644 --- a/code/FBXParser.h +++ b/code/FBXParser.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/FBXProperties.cpp b/code/FBXProperties.cpp index 23d072b18..774beac3c 100644 --- a/code/FBXProperties.cpp +++ b/code/FBXProperties.cpp @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/FBXProperties.h b/code/FBXProperties.h index 60cdfe2c6..a89a858be 100644 --- a/code/FBXProperties.h +++ b/code/FBXProperties.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, @@ -44,14 +45,15 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #ifndef INCLUDED_AI_FBX_PROPERTIES_H #define INCLUDED_AI_FBX_PROPERTIES_H -#include #include "FBXCompileConfig.h" #include +#include namespace Assimp { namespace FBX { - class Element; +// Forward declarations +class Element; /** Represents a dynamic property. Type info added by deriving classes, diff --git a/code/FBXTokenizer.cpp b/code/FBXTokenizer.cpp index 7ede49f39..881dcf53d 100644 --- a/code/FBXTokenizer.cpp +++ b/code/FBXTokenizer.cpp @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/FBXTokenizer.h b/code/FBXTokenizer.h index 66df3992a..f8af0ca16 100644 --- a/code/FBXTokenizer.h +++ b/code/FBXTokenizer.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, @@ -44,7 +45,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #ifndef INCLUDED_AI_FBX_TOKENIZER_H #define INCLUDED_AI_FBX_TOKENIZER_H -#include #include "FBXCompileConfig.h" #include #include diff --git a/code/FBXUtil.cpp b/code/FBXUtil.cpp index 601d5e214..4fd91e18f 100644 --- a/code/FBXUtil.cpp +++ b/code/FBXUtil.cpp @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, @@ -46,6 +47,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "FBXTokenizer.h" #include "TinyFormatter.h" +#include #ifndef ASSIMP_BUILD_NO_FBX_IMPORTER diff --git a/code/FBXUtil.h b/code/FBXUtil.h index bd41834b0..c1d9459b3 100644 --- a/code/FBXUtil.h +++ b/code/FBXUtil.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, @@ -44,7 +45,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #ifndef INCLUDED_AI_FBX_UTIL_H #define INCLUDED_AI_FBX_UTIL_H -#include #include "FBXCompileConfig.h" #include "FBXTokenizer.h" diff --git a/code/FileLogStream.h b/code/FileLogStream.h index 574a63ed6..e935624a1 100644 --- a/code/FileLogStream.h +++ b/code/FileLogStream.h @@ -1,9 +1,50 @@ +/* +Open Asset Import Library (assimp) +---------------------------------------------------------------------- + +Copyright (c) 2006-2017, assimp 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 team. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +---------------------------------------------------------------------- +*/ +/** @file FileLofStream.h +*/ #ifndef ASSIMP_FILELOGSTREAM_H_INC #define ASSIMP_FILELOGSTREAM_H_INC #include #include -#include "DefaultIOSystem.h" +#include namespace Assimp { diff --git a/code/FindDegenerates.cpp b/code/FindDegenerates.cpp index 62750bfad..32a09f0c0 100644 --- a/code/FindDegenerates.cpp +++ b/code/FindDegenerates.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/code/FindDegenerates.h b/code/FindDegenerates.h index 7b945ea3a..9bd410dcd 100644 --- a/code/FindDegenerates.h +++ b/code/FindDegenerates.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/FindInstancesProcess.cpp b/code/FindInstancesProcess.cpp index 479f6561e..ab2d2257b 100644 --- a/code/FindInstancesProcess.cpp +++ b/code/FindInstancesProcess.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/code/FindInstancesProcess.h b/code/FindInstancesProcess.h index 14876045c..dc4396566 100644 --- a/code/FindInstancesProcess.h +++ b/code/FindInstancesProcess.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/FindInvalidDataProcess.cpp b/code/FindInvalidDataProcess.cpp index bed2eee06..77915bc4e 100644 --- a/code/FindInvalidDataProcess.cpp +++ b/code/FindInvalidDataProcess.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/code/FindInvalidDataProcess.h b/code/FindInvalidDataProcess.h index 8a1df21fd..cc0ef946d 100644 --- a/code/FindInvalidDataProcess.h +++ b/code/FindInvalidDataProcess.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/FixNormalsStep.cpp b/code/FixNormalsStep.cpp index 0325f8dfb..05d05e873 100644 --- a/code/FixNormalsStep.cpp +++ b/code/FixNormalsStep.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/code/FixNormalsStep.h b/code/FixNormalsStep.h index 5dea5d868..b47155ccd 100644 --- a/code/FixNormalsStep.h +++ b/code/FixNormalsStep.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/GenFaceNormalsProcess.cpp b/code/GenFaceNormalsProcess.cpp index 9218d9db8..82d80db77 100644 --- a/code/GenFaceNormalsProcess.cpp +++ b/code/GenFaceNormalsProcess.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/code/GenFaceNormalsProcess.h b/code/GenFaceNormalsProcess.h index f56570078..024c74a28 100644 --- a/code/GenFaceNormalsProcess.h +++ b/code/GenFaceNormalsProcess.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/GenVertexNormalsProcess.cpp b/code/GenVertexNormalsProcess.cpp index c205ac5ac..93c0e1351 100644 --- a/code/GenVertexNormalsProcess.cpp +++ b/code/GenVertexNormalsProcess.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/code/GenVertexNormalsProcess.h b/code/GenVertexNormalsProcess.h index caa327aa3..0471ed6b0 100644 --- a/code/GenVertexNormalsProcess.h +++ b/code/GenVertexNormalsProcess.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/GenericProperty.h b/code/GenericProperty.h index 507bfb693..8632e7577 100644 --- a/code/GenericProperty.h +++ b/code/GenericProperty.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/HMPFileData.h b/code/HMPFileData.h index cff3b6b18..3c060ba1a 100644 --- a/code/HMPFileData.h +++ b/code/HMPFileData.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/HMPLoader.cpp b/code/HMPLoader.cpp index 788286e12..a6a0262bf 100644 --- a/code/HMPLoader.cpp +++ b/code/HMPLoader.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. @@ -51,6 +52,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include #include +#include using namespace Assimp; diff --git a/code/HMPLoader.h b/code/HMPLoader.h index 4dd0d9840..546643e8d 100644 --- a/code/HMPLoader.h +++ b/code/HMPLoader.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, @@ -44,11 +45,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #ifndef AI_HMPLOADER_H_INCLUDED #define AI_HMPLOADER_H_INCLUDED -// public ASSIMP headers -#include -#include -#include - // internal headers #include "BaseImporter.h" #include "MDLLoader.h" diff --git a/code/HalfLifeFileData.h b/code/HalfLifeFileData.h index 54fe83734..9a498d14c 100644 --- a/code/HalfLifeFileData.h +++ b/code/HalfLifeFileData.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, @@ -49,7 +50,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #ifndef AI_MDLFILEHELPER2_H_INC #define AI_MDLFILEHELPER2_H_INC -#include "MDLFileData.h" #include "./../include/assimp/Compiler/pushpack1.h" namespace Assimp { diff --git a/code/Hash.h b/code/Hash.h index cd7ca6def..a567adbc3 100644 --- a/code/Hash.h +++ b/code/Hash.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/IFCBoolean.cpp b/code/IFCBoolean.cpp index d3b77d87c..98b230392 100644 --- a/code/IFCBoolean.cpp +++ b/code/IFCBoolean.cpp @@ -47,7 +47,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "IFCUtil.h" #include "PolyTools.h" #include "ProcessHelper.h" -#include "Defines.h" +#include #include #include diff --git a/code/IFCCurve.cpp b/code/IFCCurve.cpp index 97d9fd574..ede1c87b8 100644 --- a/code/IFCCurve.cpp +++ b/code/IFCCurve.cpp @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/IFCGeometry.cpp b/code/IFCGeometry.cpp index f80fadff9..908f5e065 100644 --- a/code/IFCGeometry.cpp +++ b/code/IFCGeometry.cpp @@ -258,7 +258,7 @@ void ProcessRevolvedAreaSolid(const IfcRevolvedAreaSolid& solid, TempMesh& resul return; } - const unsigned int cnt_segments = std::max(2u,static_cast(16 * std::fabs(max_angle)/AI_MATH_HALF_PI_F)); + const unsigned int cnt_segments = std::max(2u,static_cast(conv.settings.cylindricalTessellation * std::fabs(max_angle)/AI_MATH_HALF_PI_F)); const IfcFloat delta = max_angle/cnt_segments; has_area = has_area && std::fabs(max_angle) < AI_MATH_TWO_PI_F*0.99; @@ -327,7 +327,7 @@ void ProcessSweptDiskSolid(const IfcSweptDiskSolid solid, TempMesh& result, Conv return; } - const unsigned int cnt_segments = 16; + const unsigned int cnt_segments = conv.settings.cylindricalTessellation; const IfcFloat deltaAngle = AI_MATH_TWO_PI/cnt_segments; const size_t samples = curve->EstimateSampleCount(solid.StartParam,solid.EndParam); diff --git a/code/IFCLoader.cpp b/code/IFCLoader.cpp index 1ef51be47..24c5452b2 100644 --- a/code/IFCLoader.cpp +++ b/code/IFCLoader.cpp @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, @@ -58,10 +59,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "IFCUtil.h" -#include "StreamReader.h" #include "MemoryIOWrapper.h" #include #include +#include namespace Assimp { @@ -108,7 +109,7 @@ static const aiImporterDesc desc = { 0, 0, 0, - "ifc ifczip" + "ifc ifczip stp" }; @@ -128,11 +129,9 @@ IFCImporter::~IFCImporter() bool IFCImporter::CanRead( const std::string& pFile, IOSystem* pIOHandler, bool checkSig) const { const std::string& extension = GetExtension(pFile); - if (extension == "ifc" || extension == "ifczip") { + if (extension == "ifc" || extension == "ifczip" || extension == "stp" ) { return true; - } - - else if ((!extension.length() || checkSig) && pIOHandler) { + } else if ((!extension.length() || checkSig) && pIOHandler) { // note: this is the common identification for STEP-encoded files, so // it is only unambiguous as long as we don't support any further // file formats with STEP as their encoding. @@ -155,11 +154,10 @@ const aiImporterDesc* IFCImporter::GetInfo () const void IFCImporter::SetupProperties(const Importer* pImp) { settings.skipSpaceRepresentations = pImp->GetPropertyBool(AI_CONFIG_IMPORT_IFC_SKIP_SPACE_REPRESENTATIONS,true); - settings.skipCurveRepresentations = pImp->GetPropertyBool(AI_CONFIG_IMPORT_IFC_SKIP_CURVE_REPRESENTATIONS,true); settings.useCustomTriangulation = pImp->GetPropertyBool(AI_CONFIG_IMPORT_IFC_CUSTOM_TRIANGULATION,true); - - settings.conicSamplingAngle = 10.f; - settings.skipAnnotations = true; + settings.conicSamplingAngle = std::min(std::max(pImp->GetPropertyFloat(AI_CONFIG_IMPORT_IFC_SMOOTHING_ANGLE, AI_IMPORT_IFC_DEFAULT_SMOOTHING_ANGLE), 5.0f), 120.0f); + settings.cylindricalTessellation = std::min(std::max(pImp->GetPropertyInteger(AI_CONFIG_IMPORT_IFC_CYLINDRICAL_TESSELLATION, AI_IMPORT_IFC_DEFAULT_CYLINDRICAL_TESSELLATION), 3), 180); + settings.skipAnnotations = true; } diff --git a/code/IFCLoader.h b/code/IFCLoader.h index e301a329d..4cf116f8e 100644 --- a/code/IFCLoader.h +++ b/code/IFCLoader.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, @@ -107,18 +108,18 @@ public: { Settings() : skipSpaceRepresentations() - , skipCurveRepresentations() , useCustomTriangulation() , skipAnnotations() , conicSamplingAngle(10.f) + , cylindricalTessellation(32) {} bool skipSpaceRepresentations; - bool skipCurveRepresentations; bool useCustomTriangulation; bool skipAnnotations; float conicSamplingAngle; + int cylindricalTessellation; }; diff --git a/code/IFCMaterial.cpp b/code/IFCMaterial.cpp index ae2fa3619..aa11c5c22 100644 --- a/code/IFCMaterial.cpp +++ b/code/IFCMaterial.cpp @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, @@ -42,19 +43,17 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * @brief Implementation of conversion routines to convert IFC materials to aiMaterial */ - - #ifndef ASSIMP_BUILD_NO_IFC_IMPORTER + #include "IFCUtil.h" #include #include namespace Assimp { - namespace IFC { +namespace IFC { // ------------------------------------------------------------------------------------------------ -int ConvertShadingMode(const std::string& name) -{ +static int ConvertShadingMode(const std::string& name) { if (name == "BLINN") { return aiShadingMode_Blinn; } @@ -69,8 +68,7 @@ int ConvertShadingMode(const std::string& name) } // ------------------------------------------------------------------------------------------------ -void FillMaterial(aiMaterial* mat,const IFC::IfcSurfaceStyle* surf,ConversionData& conv) -{ +static void FillMaterial(aiMaterial* mat,const IFC::IfcSurfaceStyle* surf,ConversionData& conv) { aiString name; name.Set((surf->Name? surf->Name.Get() : "IfcSurfaceStyle_Unnamed")); mat->AddProperty(&name,AI_MATKEY_NAME); @@ -134,8 +132,7 @@ void FillMaterial(aiMaterial* mat,const IFC::IfcSurfaceStyle* surf,ConversionDat } // ------------------------------------------------------------------------------------------------ -unsigned int ProcessMaterials(uint64_t id, unsigned int prevMatId, ConversionData& conv, bool forceDefaultMat) -{ +unsigned int ProcessMaterials(uint64_t id, unsigned int prevMatId, ConversionData& conv, bool forceDefaultMat) { STEP::DB::RefMapRange range = conv.db.GetRefs().equal_range(id); for(;range.first != range.second; ++range.first) { if(const IFC::IfcStyledItem* const styled = conv.db.GetObject((*range.first).second)->ToPtr()) { @@ -162,31 +159,33 @@ unsigned int ProcessMaterials(uint64_t id, unsigned int prevMatId, ConversionDat unsigned int matindex = static_cast(conv.materials.size() - 1); conv.cached_materials[surf] = matindex; return matindex; + } + } } } } - } - } // no local material defined. If there's global one, use that instead - if( prevMatId != std::numeric_limits::max() ) + if ( prevMatId != std::numeric_limits::max() ) { return prevMatId; + } // we're still here - create an default material if required, or simply fail otherwise - if( !forceDefaultMat ) + if ( !forceDefaultMat ) { return std::numeric_limits::max(); + } aiString name; name.Set(""); // ConvertColorToString( color, name); // look if there's already a default material with this base color - for( size_t a = 0; a < conv.materials.size(); ++a ) - { + for( size_t a = 0; a < conv.materials.size(); ++a ) { aiString mname; conv.materials[a]->Get(AI_MATKEY_NAME, mname); - if( name == mname ) - return (unsigned int)a; + if ( name == mname ) { + return ( unsigned int )a; + } } // we're here, yet - no default material with suitable color available. Generate one @@ -203,4 +202,4 @@ unsigned int ProcessMaterials(uint64_t id, unsigned int prevMatId, ConversionDat } // ! IFC } // ! Assimp -#endif +#endif // ASSIMP_BUILD_NO_IFC_IMPORTER diff --git a/code/IFCOpenings.cpp b/code/IFCOpenings.cpp index c2a7439ee..f40b49fe4 100644 --- a/code/IFCOpenings.cpp +++ b/code/IFCOpenings.cpp @@ -901,13 +901,21 @@ size_t CloseWindows(ContourVector& contours, curmesh.verts.reserve(curmesh.verts.size() + (*it).contour.size() * 4); curmesh.vertcnt.reserve(curmesh.vertcnt.size() + (*it).contour.size()); + bool reverseCountourFaces = false; + // compare base poly normal and contour normal to detect if we need to reverse the face winding - IfcVector3 basePolyNormal = TempMesh::ComputePolygonNormal( curmesh.verts.data(), curmesh.vertcnt.front()); - std::vector worldSpaceContourVtx( it->contour.size()); - for( size_t a = 0; a < it->contour.size(); ++a ) - worldSpaceContourVtx[a] = minv * IfcVector3( it->contour[a].x, it->contour[a].y, 0.0); - IfcVector3 contourNormal = TempMesh::ComputePolygonNormal( worldSpaceContourVtx.data(), worldSpaceContourVtx.size()); - bool reverseCountourFaces = (contourNormal * basePolyNormal) > 0.0; + if(curmesh.vertcnt.size() > 0) { + IfcVector3 basePolyNormal = TempMesh::ComputePolygonNormal(curmesh.verts.data(), curmesh.vertcnt.front()); + + std::vector worldSpaceContourVtx(it->contour.size()); + + for(size_t a = 0; a < it->contour.size(); ++a) + worldSpaceContourVtx[a] = minv * IfcVector3(it->contour[a].x, it->contour[a].y, 0.0); + + IfcVector3 contourNormal = TempMesh::ComputePolygonNormal(worldSpaceContourVtx.data(), worldSpaceContourVtx.size()); + + reverseCountourFaces = (contourNormal * basePolyNormal) > 0.0; + } // XXX this algorithm is really a bit inefficient - both in terms // of constant factor and of asymptotic runtime. diff --git a/code/IFCProfile.cpp b/code/IFCProfile.cpp index a84f98f58..e94d98a04 100644 --- a/code/IFCProfile.cpp +++ b/code/IFCProfile.cpp @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, @@ -101,7 +102,7 @@ void ProcessOpenProfile(const IfcArbitraryOpenProfileDef& def, TempMesh& meshout } // ------------------------------------------------------------------------------------------------ -void ProcessParametrizedProfile(const IfcParameterizedProfileDef& def, TempMesh& meshout, ConversionData& /*conv*/) +void ProcessParametrizedProfile(const IfcParameterizedProfileDef& def, TempMesh& meshout, ConversionData& conv) { if(const IfcRectangleProfileDef* const cprofile = def.ToPtr()) { const IfcFloat x = cprofile->XDim*0.5f, y = cprofile->YDim*0.5f; @@ -117,7 +118,7 @@ void ProcessParametrizedProfile(const IfcParameterizedProfileDef& def, TempMesh& if(def.ToPtr()) { // TODO } - const size_t segments = 32; + const size_t segments = conv.settings.cylindricalTessellation; const IfcFloat delta = AI_MATH_TWO_PI_F/segments, radius = circle->Radius; meshout.verts.reserve(segments); diff --git a/code/IFCUtil.cpp b/code/IFCUtil.cpp index 7caebbcd4..f5bd56a00 100644 --- a/code/IFCUtil.cpp +++ b/code/IFCUtil.cpp @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, @@ -49,7 +50,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "IFCUtil.h" #include "PolyTools.h" #include "ProcessHelper.h" -#include "Defines.h" +#include namespace Assimp { namespace IFC { diff --git a/code/IFCUtil.h b/code/IFCUtil.h index 43d20a434..f90f421d6 100644 --- a/code/IFCUtil.h +++ b/code/IFCUtil.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/IOStreamBuffer.h b/code/IOStreamBuffer.h index 8fb58e548..b80810084 100644 --- a/code/IOStreamBuffer.h +++ b/code/IOStreamBuffer.h @@ -4,7 +4,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, @@ -44,7 +45,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include "ParsingUtils.h" -#include +#include namespace Assimp { @@ -70,8 +71,8 @@ public: /// @return true if successful. bool close(); - /// @brief Returns the filesize. - /// @return The filesize. + /// @brief Returns the file-size. + /// @return The file-size. size_t size() const; /// @brief Returns the cache size. @@ -97,7 +98,7 @@ public: /// @brief Will read the next line. /// @param buffer The buffer for the next line. /// @return true if successful. - bool getNextLine( std::vector &buffer ); + bool getNextDataLine( std::vector &buffer, T continuationToken ); private: IOStream *m_stream; @@ -228,15 +229,35 @@ size_t IOStreamBuffer::getFilePos() const { template inline -bool IOStreamBuffer::getNextLine( std::vector &buffer ) { +bool IOStreamBuffer::getNextDataLine( std::vector &buffer, T continuationToken ) { buffer.resize( m_cacheSize ); if ( m_cachePos == m_cacheSize || 0 == m_filePos ) { if ( !readNextBlock() ) { return false; } } + + bool continuationFound( false ), endOfDataLine( false ); size_t i = 0; - while ( !IsLineEnd( m_cache[ m_cachePos ] ) ) { + while ( !endOfDataLine ) { + if ( continuationToken == m_cache[ m_cachePos ] ) { + continuationFound = true; + ++m_cachePos; + } + if ( IsLineEnd( m_cache[ m_cachePos ] ) ) { + if ( !continuationFound ) { + // the end of the data line + break; + } else { + // skip line end + while ( m_cache[m_cachePos] != '\n') { + ++m_cachePos; + } + ++m_cachePos; + continuationFound = false; + } + } + buffer[ i ] = m_cache[ m_cachePos ]; m_cachePos++; i++; @@ -246,6 +267,7 @@ bool IOStreamBuffer::getNextLine( std::vector &buffer ) { } } } + buffer[ i ] = '\n'; m_cachePos++; diff --git a/code/IRRLoader.cpp b/code/IRRLoader.cpp index 7145f9b66..0a1edf253 100644 --- a/code/IRRLoader.cpp +++ b/code/IRRLoader.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. @@ -65,7 +66,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include #include - +#include using namespace Assimp; using namespace irr; diff --git a/code/IRRLoader.h b/code/IRRLoader.h index fab2391d6..b8f0df918 100644 --- a/code/IRRLoader.h +++ b/code/IRRLoader.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/IRRMeshLoader.cpp b/code/IRRMeshLoader.cpp index 853ead15f..a63a2a134 100644 --- a/code/IRRMeshLoader.cpp +++ b/code/IRRMeshLoader.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. @@ -54,9 +55,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include #include +#include #include "Macros.h" - using namespace Assimp; using namespace irr; using namespace irr::io; diff --git a/code/IRRMeshLoader.h b/code/IRRMeshLoader.h index 6c208224c..312dbbfe0 100644 --- a/code/IRRMeshLoader.h +++ b/code/IRRMeshLoader.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/IRRShared.cpp b/code/IRRShared.cpp index e38ad1378..bfe408629 100644 --- a/code/IRRShared.cpp +++ b/code/IRRShared.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/code/Importer.cpp b/code/Importer.cpp index d60dfb6b0..eb0119693 100644 --- a/code/Importer.cpp +++ b/code/Importer.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. @@ -45,6 +46,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include +#include // ------------------------------------------------------------------------------------------------ /* Uncomment this line to prevent Assimp from catching unknown exceptions. @@ -65,8 +67,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "BaseImporter.h" #include "BaseProcess.h" -#include "DefaultIOStream.h" -#include "DefaultIOSystem.h" #include "DefaultProgressHandler.h" #include "GenericProperty.h" #include "ProcessHelper.h" @@ -81,6 +81,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include +#include +#include + #ifndef ASSIMP_BUILD_NO_VALIDATEDS_PROCESS # include "ValidateDataStructure.h" #endif diff --git a/code/Importer.h b/code/Importer.h index a0df1a6c1..e0fb57f5b 100644 --- a/code/Importer.h +++ b/code/Importer.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, @@ -44,8 +45,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #define INCLUDED_AI_IMPORTER_H #include -#include #include +#include #include struct aiScene; diff --git a/code/ImporterRegistry.cpp b/code/ImporterRegistry.cpp index 95a1867e0..5d04b267e 100644 --- a/code/ImporterRegistry.cpp +++ b/code/ImporterRegistry.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. @@ -46,6 +47,9 @@ directly (unless you are adding new loaders), instead use the corresponding preprocessor flag to selectively disable formats. */ +#include +#include "BaseImporter.h" + // ------------------------------------------------------------------------------------------------ // Importers // (include_new_importers_here) @@ -188,6 +192,9 @@ corresponding preprocessor flag to selectively disable formats. #ifndef ASSIMP_BUILD_NO_X3D_IMPORTER # include "X3DImporter.hpp" #endif +#ifndef ASSIMP_BUILD_NO_MMD_IMPORTER +# include "MMDImporter.h" +#endif namespace Assimp { @@ -332,11 +339,14 @@ void GetImporterInstanceList(std::vector< BaseImporter* >& out) out.push_back( new C4DImporter() ); #endif #if ( !defined ASSIMP_BUILD_NO_3MF_IMPORTER ) - out.push_back(new D3MFImporter() ); + out.push_back( new D3MFImporter() ); #endif #ifndef ASSIMP_BUILD_NO_X3D_IMPORTER out.push_back( new X3DImporter() ); #endif +#ifndef ASSIMP_BUILD_NO_MMD_IMPORTER + out.push_back( new MMDImporter() ); +#endif } /** will delete all registered importers. */ diff --git a/code/ImproveCacheLocality.cpp b/code/ImproveCacheLocality.cpp index 9fd76508b..7f0727e8b 100644 --- a/code/ImproveCacheLocality.cpp +++ b/code/ImproveCacheLocality.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/code/ImproveCacheLocality.h b/code/ImproveCacheLocality.h index d43f37f50..d91388c41 100644 --- a/code/ImproveCacheLocality.h +++ b/code/ImproveCacheLocality.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/JoinVerticesProcess.cpp b/code/JoinVerticesProcess.cpp index 9cd34e1d0..17b0ab07f 100644 --- a/code/JoinVerticesProcess.cpp +++ b/code/JoinVerticesProcess.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/code/JoinVerticesProcess.h b/code/JoinVerticesProcess.h index b1a9aa910..a3204782a 100644 --- a/code/JoinVerticesProcess.h +++ b/code/JoinVerticesProcess.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/LWOAnimation.cpp b/code/LWOAnimation.cpp index 10bc54b16..cbd12fe1a 100644 --- a/code/LWOAnimation.cpp +++ b/code/LWOAnimation.cpp @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/LWOAnimation.h b/code/LWOAnimation.h index 257abecdd..11f71bd93 100644 --- a/code/LWOAnimation.h +++ b/code/LWOAnimation.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/LWOBLoader.cpp b/code/LWOBLoader.cpp index 639675294..6a07f81a7 100644 --- a/code/LWOBLoader.cpp +++ b/code/LWOBLoader.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/code/LWOFileData.h b/code/LWOFileData.h index d67cf7ec8..7fa9a216d 100644 --- a/code/LWOFileData.h +++ b/code/LWOFileData.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/LWOLoader.cpp b/code/LWOLoader.cpp index 4a45efb91..5ec07800d 100644 --- a/code/LWOLoader.cpp +++ b/code/LWOLoader.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. @@ -54,10 +55,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "ProcessHelper.h" #include "ConvertToLHProcess.h" #include +#include #include #include #include - +#include using namespace Assimp; @@ -65,7 +67,7 @@ static const aiImporterDesc desc = { "LightWave/Modo Object Importer", "", "", - "http://www.newtek.com/lightwave.html\nhttp://www.luxology.com/modo/", + "https://www.lightwave3d.com/lightwave_sdk/", aiImporterFlags_SupportTextFlavour, 0, 0, diff --git a/code/LWOLoader.h b/code/LWOLoader.h index 09d66cf24..b92e5aab4 100644 --- a/code/LWOLoader.h +++ b/code/LWOLoader.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, @@ -49,6 +50,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "LWOFileData.h" #include "BaseImporter.h" +#include + struct aiTexture; struct aiNode; struct aiMaterial; diff --git a/code/LWOMaterial.cpp b/code/LWOMaterial.cpp index 42a6f8c5e..e2ba894af 100644 --- a/code/LWOMaterial.cpp +++ b/code/LWOMaterial.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/code/LWSLoader.cpp b/code/LWSLoader.cpp index 6ca3cf589..aa05d63c9 100644 --- a/code/LWSLoader.cpp +++ b/code/LWSLoader.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. @@ -58,9 +59,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include #include +#include #include - using namespace Assimp; static const aiImporterDesc desc = { diff --git a/code/LWSLoader.h b/code/LWSLoader.h index 9547b67bb..28b4495df 100644 --- a/code/LWSLoader.h +++ b/code/LWSLoader.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/LimitBoneWeightsProcess.cpp b/code/LimitBoneWeightsProcess.cpp index e35fe1462..0bb4a4be3 100644 --- a/code/LimitBoneWeightsProcess.cpp +++ b/code/LimitBoneWeightsProcess.cpp @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/LimitBoneWeightsProcess.h b/code/LimitBoneWeightsProcess.h index f6907cf26..3826dbe58 100644 --- a/code/LimitBoneWeightsProcess.h +++ b/code/LimitBoneWeightsProcess.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/LineSplitter.h b/code/LineSplitter.h index 0fa47380e..10ca1d35a 100644 --- a/code/LineSplitter.h +++ b/code/LineSplitter.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/LogAux.h b/code/LogAux.h index f754903c6..432da5cd5 100644 --- a/code/LogAux.h +++ b/code/LogAux.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/MD2FileData.h b/code/MD2FileData.h index f7a494335..f65193264 100644 --- a/code/MD2FileData.h +++ b/code/MD2FileData.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, @@ -46,8 +47,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #define AI_MD2FILEHELPER_H_INC #include -#include -#include #include #include diff --git a/code/MD2Loader.cpp b/code/MD2Loader.cpp index b4c124774..cb494d5b2 100644 --- a/code/MD2Loader.cpp +++ b/code/MD2Loader.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. @@ -50,6 +51,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include #include +#include + #include using namespace Assimp; diff --git a/code/MD2Loader.h b/code/MD2Loader.h index 126c16359..a7566dc64 100644 --- a/code/MD2Loader.h +++ b/code/MD2Loader.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/MD2NormalTable.h b/code/MD2NormalTable.h index 5b1344bd6..98fbc1d7a 100644 --- a/code/MD2NormalTable.h +++ b/code/MD2NormalTable.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/MD3FileData.h b/code/MD3FileData.h index 3a59d0d1d..262d75322 100644 --- a/code/MD3FileData.h +++ b/code/MD3FileData.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/MD3Loader.cpp b/code/MD3Loader.cpp index 0736e84b9..8047b82ba 100644 --- a/code/MD3Loader.cpp +++ b/code/MD3Loader.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. @@ -62,10 +63,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include #include +#include #include - - using namespace Assimp; static const aiImporterDesc desc = { diff --git a/code/MD3Loader.h b/code/MD3Loader.h index 6b8143a97..ff5b56a52 100644 --- a/code/MD3Loader.h +++ b/code/MD3Loader.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/MD5Loader.cpp b/code/MD5Loader.cpp index 0703e92de..172c98a30 100644 --- a/code/MD5Loader.cpp +++ b/code/MD5Loader.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. @@ -56,6 +57,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include #include +#include #include using namespace Assimp; diff --git a/code/MD5Loader.h b/code/MD5Loader.h index 9dfc08226..afb07a62d 100644 --- a/code/MD5Loader.h +++ b/code/MD5Loader.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/MD5Parser.cpp b/code/MD5Parser.cpp index 9379deab1..8076e5bc4 100644 --- a/code/MD5Parser.cpp +++ b/code/MD5Parser.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/code/MD5Parser.h b/code/MD5Parser.h index 78ade8430..bafcaf962 100644 --- a/code/MD5Parser.h +++ b/code/MD5Parser.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/MDCFileData.h b/code/MDCFileData.h index c98828c28..2ce96db5a 100644 --- a/code/MDCFileData.h +++ b/code/MDCFileData.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/MDCLoader.cpp b/code/MDCLoader.cpp index d97215864..21aca53ff 100644 --- a/code/MDCLoader.cpp +++ b/code/MDCLoader.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. @@ -52,6 +53,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include #include +#include #include diff --git a/code/MDCLoader.h b/code/MDCLoader.h index fcfbc642d..5f3b365fd 100644 --- a/code/MDCLoader.h +++ b/code/MDCLoader.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/MDLDefaultColorMap.h b/code/MDLDefaultColorMap.h index 6db696af0..800c717c5 100644 --- a/code/MDLDefaultColorMap.h +++ b/code/MDLDefaultColorMap.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/MDLFileData.h b/code/MDLFileData.h index 536bf082a..6ba5b5aa2 100644 --- a/code/MDLFileData.h +++ b/code/MDLFileData.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/MDLLoader.cpp b/code/MDLLoader.cpp index f82e7abfe..ad63dd40b 100644 --- a/code/MDLLoader.cpp +++ b/code/MDLLoader.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. @@ -58,10 +59,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include #include +#include #include - using namespace Assimp; static const aiImporterDesc desc = { diff --git a/code/MDLLoader.h b/code/MDLLoader.h index 62e451cbe..8709426e6 100644 --- a/code/MDLLoader.h +++ b/code/MDLLoader.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/MDLMaterialLoader.cpp b/code/MDLMaterialLoader.cpp index 3425d7b09..91dcb49cc 100644 --- a/code/MDLMaterialLoader.cpp +++ b/code/MDLMaterialLoader.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. @@ -52,8 +53,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include #include +#include #include "qnan.h" -#include "Defines.h" using namespace Assimp; @@ -545,10 +546,6 @@ void MDLImporter::ParseSkinLump_3DGS_MDL7( } else if (iMasked || !iType || (iType && iWidth && iHeight)) { - // ***** STANDARD COLOR TEXTURE ***** - if(pcNew!= nullptr) - delete pcNew; - pcNew = new aiTexture(); if (!iHeight || !iWidth) { diff --git a/code/MMDCpp14.h b/code/MMDCpp14.h new file mode 100644 index 000000000..ad112de0f --- /dev/null +++ b/code/MMDCpp14.h @@ -0,0 +1,42 @@ +#pragma once + +#ifndef MMD_CPP14_H +#define MMD_CPP14_H + +#include +#include +#include +#include + +namespace mmd { + template struct _Unique_if { + typedef std::unique_ptr _Single_object; + }; + + template struct _Unique_if { + typedef std::unique_ptr _Unknown_bound; + }; + + template struct _Unique_if { + typedef void _Known_bound; + }; + + template + typename _Unique_if::_Single_object + make_unique(Args&&... args) { + return std::unique_ptr(new T(std::forward(args)...)); + } + + template + typename _Unique_if::_Unknown_bound + make_unique(size_t n) { + typedef typename std::remove_extent::type U; + return std::unique_ptr(new U[n]()); + } + + template + typename _Unique_if::_Known_bound + make_unique(Args&&...) = delete; +} + +#endif diff --git a/code/MMDImporter.cpp b/code/MMDImporter.cpp new file mode 100644 index 000000000..149761c34 --- /dev/null +++ b/code/MMDImporter.cpp @@ -0,0 +1,370 @@ +/* +--------------------------------------------------------------------------- +Open Asset Import Library (assimp) +--------------------------------------------------------------------------- + +Copyright (c) 2006-2016, assimp 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 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. +--------------------------------------------------------------------------- +*/ + +#ifndef ASSIMP_BUILD_NO_MMD_IMPORTER + +#include "MMDImporter.h" +#include "MMDPmdParser.h" +#include "MMDPmxParser.h" +#include "MMDVmdParser.h" +#include "ConvertToLHProcess.h" +#include +#include +#include +#include +#include +#include +#include + +static const aiImporterDesc desc = {"MMD Importer", + "", + "", + "surfaces supported?", + aiImporterFlags_SupportTextFlavour, + 0, + 0, + 0, + 0, + "pmx"}; + +namespace Assimp { + +using namespace std; + +// ------------------------------------------------------------------------------------------------ +// Default constructor +MMDImporter::MMDImporter() + : m_Buffer(), + // m_pRootObject( NULL ), + m_strAbsPath("") { + DefaultIOSystem io; + m_strAbsPath = io.getOsSeparator(); +} + +// ------------------------------------------------------------------------------------------------ +// Destructor. +MMDImporter::~MMDImporter() { + // delete m_pRootObject; + // m_pRootObject = NULL; +} + +// ------------------------------------------------------------------------------------------------ +// Returns true, if file is an pmx file. +bool MMDImporter::CanRead(const std::string &pFile, IOSystem *pIOHandler, + bool checkSig) const { + if (!checkSig) // Check File Extension + { + return SimpleExtensionCheck(pFile, "pmx"); + } else // Check file Header + { + static const char *pTokens[] = {"PMX "}; + return BaseImporter::SearchFileHeaderForToken(pIOHandler, pFile, pTokens, + 1); + } +} + +// ------------------------------------------------------------------------------------------------ +const aiImporterDesc *MMDImporter::GetInfo() const { return &desc; } + +// ------------------------------------------------------------------------------------------------ +// MMD import implementation +void MMDImporter::InternReadFile(const std::string &file, aiScene *pScene, + IOSystem *pIOHandler) { + // Read file by istream + std::filebuf fb; + if (!fb.open(file, std::ios::in | std::ios::binary)) { + throw DeadlyImportError("Failed to open file " + file + "."); + } + + std::istream fileStream(&fb); + + // Get the file-size and validate it, throwing an exception when fails + fileStream.seekg(0, fileStream.end); + size_t fileSize = fileStream.tellg(); + fileStream.seekg(0, fileStream.beg); + + if (fileSize < sizeof(pmx::PmxModel)) { + throw DeadlyImportError(file + " is too small."); + } + + pmx::PmxModel model; + model.Read(&fileStream); + + CreateDataFromImport(&model, pScene); +} + +// ------------------------------------------------------------------------------------------------ +void MMDImporter::CreateDataFromImport(const pmx::PmxModel *pModel, + aiScene *pScene) { + if (pModel == NULL) { + return; + } + + aiNode *pNode = new aiNode; + if (!pModel->model_name.empty()) { + pNode->mName.Set(pModel->model_name); + } else { + ai_assert(false); + } + + pScene->mRootNode = pNode; + + pNode = new aiNode; + pScene->mRootNode->addChildren(1, &pNode); + pNode->mName.Set(string(pModel->model_name) + string("_mesh")); + + // split mesh by materials + pNode->mNumMeshes = pModel->material_count; + pNode->mMeshes = new unsigned int[pNode->mNumMeshes]; + for (unsigned int index = 0; index < pNode->mNumMeshes; index++) { + pNode->mMeshes[index] = index; + } + + pScene->mNumMeshes = pModel->material_count; + pScene->mMeshes = new aiMesh *[pScene->mNumMeshes]; + for (unsigned int i = 0, indexStart = 0; i < pScene->mNumMeshes; i++) { + const int indexCount = pModel->materials[i].index_count; + + pScene->mMeshes[i] = CreateMesh(pModel, indexStart, indexCount); + pScene->mMeshes[i]->mName = pModel->materials[i].material_name; + pScene->mMeshes[i]->mMaterialIndex = i; + indexStart += indexCount; + } + + // create node hierarchy for bone position + aiNode **ppNode = new aiNode *[pModel->bone_count]; + for (auto i = 0; i < pModel->bone_count; i++) { + ppNode[i] = new aiNode(pModel->bones[i].bone_name); + } + + for (auto i = 0; i < pModel->bone_count; i++) { + const pmx::PmxBone &bone = pModel->bones[i]; + + if (bone.parent_index < 0) { + pScene->mRootNode->addChildren(1, ppNode + i); + } else { + ppNode[bone.parent_index]->addChildren(1, ppNode + i); + + aiVector3D v3 = aiVector3D( + bone.position[0] - pModel->bones[bone.parent_index].position[0], + bone.position[1] - pModel->bones[bone.parent_index].position[1], + bone.position[2] - pModel->bones[bone.parent_index].position[2]); + aiMatrix4x4::Translation(v3, ppNode[i]->mTransformation); + } + } + + // create materials + pScene->mNumMaterials = pModel->material_count; + pScene->mMaterials = new aiMaterial *[pScene->mNumMaterials]; + for (unsigned int i = 0; i < pScene->mNumMaterials; i++) { + pScene->mMaterials[i] = CreateMaterial(&pModel->materials[i], pModel); + } + + // Convert everything to OpenGL space + MakeLeftHandedProcess convertProcess; + convertProcess.Execute(pScene); + + FlipUVsProcess uvFlipper; + uvFlipper.Execute(pScene); + + FlipWindingOrderProcess windingFlipper; + windingFlipper.Execute(pScene); +} + +// ------------------------------------------------------------------------------------------------ +aiMesh *MMDImporter::CreateMesh(const pmx::PmxModel *pModel, + const int indexStart, const int indexCount) { + aiMesh *pMesh = new aiMesh; + + pMesh->mNumVertices = indexCount; + + pMesh->mNumFaces = indexCount / 3; + pMesh->mFaces = new aiFace[pMesh->mNumFaces]; + + const int numIndices = 3; // trianglular face + for (unsigned int index = 0; index < pMesh->mNumFaces; index++) { + pMesh->mFaces[index].mNumIndices = numIndices; + unsigned int *indices = new unsigned int[numIndices]; + indices[0] = numIndices * index; + indices[1] = numIndices * index + 1; + indices[2] = numIndices * index + 2; + pMesh->mFaces[index].mIndices = indices; + } + + pMesh->mVertices = new aiVector3D[pMesh->mNumVertices]; + pMesh->mNormals = new aiVector3D[pMesh->mNumVertices]; + pMesh->mTextureCoords[0] = new aiVector3D[pMesh->mNumVertices]; + pMesh->mNumUVComponents[0] = 2; + + // additional UVs + for (int i = 1; i <= pModel->setting.uv; i++) { + pMesh->mTextureCoords[i] = new aiVector3D[pMesh->mNumVertices]; + pMesh->mNumUVComponents[i] = 4; + } + + map> bone_vertex_map; + + // fill in contents and create bones + for (int index = 0; index < indexCount; index++) { + const pmx::PmxVertex *v = + &pModel->vertices[pModel->indices[indexStart + index]]; + const float *position = v->position; + pMesh->mVertices[index].Set(position[0], position[1], position[2]); + const float *normal = v->normal; + + pMesh->mNormals[index].Set(normal[0], normal[1], normal[2]); + pMesh->mTextureCoords[0][index].x = v->uv[0]; + pMesh->mTextureCoords[0][index].y = v->uv[1]; + + for (int i = 1; i <= pModel->setting.uv; i++) { + // TODO: wrong here? use quaternion transform? + pMesh->mTextureCoords[i][index].x = v->uva[i][0]; + pMesh->mTextureCoords[i][index].y = v->uva[i][1]; + } + + // handle bone map + const auto vsBDEF1_ptr = + dynamic_cast(v->skinning.get()); + const auto vsBDEF2_ptr = + dynamic_cast(v->skinning.get()); + const auto vsBDEF4_ptr = + dynamic_cast(v->skinning.get()); + const auto vsSDEF_ptr = + dynamic_cast(v->skinning.get()); + switch (v->skinning_type) { + case pmx::PmxVertexSkinningType::BDEF1: + bone_vertex_map[vsBDEF1_ptr->bone_index].push_back( + aiVertexWeight(index, 1.0)); + break; + case pmx::PmxVertexSkinningType::BDEF2: + bone_vertex_map[vsBDEF2_ptr->bone_index1].push_back( + aiVertexWeight(index, vsBDEF2_ptr->bone_weight)); + bone_vertex_map[vsBDEF2_ptr->bone_index2].push_back( + aiVertexWeight(index, 1.0 - vsBDEF2_ptr->bone_weight)); + break; + case pmx::PmxVertexSkinningType::BDEF4: + bone_vertex_map[vsBDEF4_ptr->bone_index1].push_back( + aiVertexWeight(index, vsBDEF4_ptr->bone_weight1)); + bone_vertex_map[vsBDEF4_ptr->bone_index2].push_back( + aiVertexWeight(index, vsBDEF4_ptr->bone_weight2)); + bone_vertex_map[vsBDEF4_ptr->bone_index3].push_back( + aiVertexWeight(index, vsBDEF4_ptr->bone_weight3)); + bone_vertex_map[vsBDEF4_ptr->bone_index4].push_back( + aiVertexWeight(index, vsBDEF4_ptr->bone_weight4)); + break; + case pmx::PmxVertexSkinningType::SDEF: // TODO: how to use sdef_c, sdef_r0, + // sdef_r1? + bone_vertex_map[vsSDEF_ptr->bone_index1].push_back( + aiVertexWeight(index, vsSDEF_ptr->bone_weight)); + bone_vertex_map[vsSDEF_ptr->bone_index2].push_back( + aiVertexWeight(index, 1.0 - vsSDEF_ptr->bone_weight)); + break; + case pmx::PmxVertexSkinningType::QDEF: + const auto vsQDEF_ptr = + dynamic_cast(v->skinning.get()); + bone_vertex_map[vsQDEF_ptr->bone_index1].push_back( + aiVertexWeight(index, vsQDEF_ptr->bone_weight1)); + bone_vertex_map[vsQDEF_ptr->bone_index2].push_back( + aiVertexWeight(index, vsQDEF_ptr->bone_weight2)); + bone_vertex_map[vsQDEF_ptr->bone_index3].push_back( + aiVertexWeight(index, vsQDEF_ptr->bone_weight3)); + bone_vertex_map[vsQDEF_ptr->bone_index4].push_back( + aiVertexWeight(index, vsQDEF_ptr->bone_weight4)); + break; + } + } + + // make all bones for each mesh + // assign bone weights to skinned bones (otherwise just initialize) + auto bone_ptr_ptr = new aiBone *[pModel->bone_count]; + pMesh->mNumBones = pModel->bone_count; + pMesh->mBones = bone_ptr_ptr; + for (auto ii = 0; ii < pModel->bone_count; ++ii) { + auto pBone = new aiBone; + const auto &pmxBone = pModel->bones[ii]; + pBone->mName = pmxBone.bone_name; + aiVector3D pos(pmxBone.position[0], pmxBone.position[1], pmxBone.position[2]); + aiMatrix4x4::Translation(-pos, pBone->mOffsetMatrix); + auto it = bone_vertex_map.find(ii); + if (it != bone_vertex_map.end()) { + pBone->mNumWeights = it->second.size(); + pBone->mWeights = it->second.data(); + it->second.swap(*(new vector)); + } + bone_ptr_ptr[ii] = pBone; + } + + return pMesh; +} + +// ------------------------------------------------------------------------------------------------ +aiMaterial *MMDImporter::CreateMaterial(const pmx::PmxMaterial *pMat, + const pmx::PmxModel *pModel) { + aiMaterial *mat = new aiMaterial(); + aiString name(pMat->material_english_name); + mat->AddProperty(&name, AI_MATKEY_NAME); + + aiColor3D diffuse(pMat->diffuse[0], pMat->diffuse[1], pMat->diffuse[2]); + mat->AddProperty(&diffuse, 1, AI_MATKEY_COLOR_DIFFUSE); + aiColor3D specular(pMat->specular[0], pMat->specular[1], pMat->specular[2]); + mat->AddProperty(&specular, 1, AI_MATKEY_COLOR_SPECULAR); + aiColor3D ambient(pMat->ambient[0], pMat->ambient[1], pMat->ambient[2]); + mat->AddProperty(&ambient, 1, AI_MATKEY_COLOR_AMBIENT); + + float opacity = pMat->diffuse[3]; + mat->AddProperty(&opacity, 1, AI_MATKEY_OPACITY); + float shininess = pMat->specularlity; + mat->AddProperty(&shininess, 1, AI_MATKEY_SHININESS_STRENGTH); + + aiString texture_path(pModel->textures[pMat->diffuse_texture_index]); + mat->AddProperty(&texture_path, AI_MATKEY_TEXTURE(aiTextureType_DIFFUSE, 0)); + int mapping_uvwsrc = 0; + mat->AddProperty(&mapping_uvwsrc, 1, + AI_MATKEY_UVWSRC(aiTextureType_DIFFUSE, 0)); + + return mat; +} + +// ------------------------------------------------------------------------------------------------ + +} // Namespace Assimp + +#endif // !! ASSIMP_BUILD_NO_MMD_IMPORTER diff --git a/code/MMDImporter.h b/code/MMDImporter.h new file mode 100644 index 000000000..e660abaaa --- /dev/null +++ b/code/MMDImporter.h @@ -0,0 +1,96 @@ +/* +Open Asset Import Library (assimp) +---------------------------------------------------------------------- + +Copyright (c) 2006-2016, assimp 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 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. + +---------------------------------------------------------------------- +*/ +#ifndef MMD_FILE_IMPORTER_H_INC +#define MMD_FILE_IMPORTER_H_INC + +#include "BaseImporter.h" +#include "MMDPmxParser.h" +#include +#include + +struct aiMesh; + +namespace Assimp { + +// ------------------------------------------------------------------------------------------------ +/// \class MMDImporter +/// \brief Imports MMD a pmx/pmd/vmd file +// ------------------------------------------------------------------------------------------------ +class MMDImporter : public BaseImporter { +public: + /// \brief Default constructor + MMDImporter(); + + /// \brief Destructor + ~MMDImporter(); + +public: + /// \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 extension. + const aiImporterDesc* GetInfo () const; + + //! \brief File import implementation. + void InternReadFile(const std::string& pFile, aiScene* pScene, IOSystem* pIOHandler); + + //! \brief Create the data from imported content. + void CreateDataFromImport(const pmx::PmxModel* pModel, aiScene* pScene); + + //! \brief Create the mesh + aiMesh* CreateMesh(const pmx::PmxModel* pModel, const int indexStart, const int indexCount); + + //! \brief Create the material + aiMaterial* CreateMaterial(const pmx::PmxMaterial* pMat, const pmx::PmxModel* pModel); + +private: + //! Data buffer + std::vector m_Buffer; + //! Absolute pathname of model in file system + std::string m_strAbsPath; +}; + +// ------------------------------------------------------------------------------------------------ + +} // Namespace Assimp + +#endif \ No newline at end of file diff --git a/code/MMDPmdParser.h b/code/MMDPmdParser.h new file mode 100644 index 000000000..375c323df --- /dev/null +++ b/code/MMDPmdParser.h @@ -0,0 +1,630 @@ +#pragma once + +#include +#include +#include +#include +#include +#include "MMDCpp14.h" + +namespace pmd +{ + /// ヘッダ + class PmdHeader + { + public: + /// モデル名 + std::string name; + /// モデル名(英語) + std::string name_english; + /// コメント + std::string comment; + /// コメント(英語) + std::string comment_english; + + bool Read(std::ifstream* stream) + { + char buffer[256]; + stream->read(buffer, 20); + name = std::string(buffer); + stream->read(buffer, 256); + comment = std::string(buffer); + return true; + } + + bool ReadExtension(std::ifstream* stream) + { + char buffer[256]; + stream->read(buffer, 20); + name_english = std::string(buffer); + stream->read(buffer, 256); + comment_english = std::string(buffer); + return true; + } + }; + + /// 頂点 + class PmdVertex + { + public: + /// 位置 + float position[3]; + + /// 法線 + float normal[3]; + + /// UV座標 + float uv[2]; + + /// 関連ボーンインデックス + uint16_t bone_index[2]; + + /// ボーンウェイト + uint8_t bone_weight; + + /// エッジ不可視 + bool edge_invisible; + + bool Read(std::ifstream* stream) + { + stream->read((char*) position, sizeof(float) * 3); + stream->read((char*) normal, sizeof(float) * 3); + stream->read((char*) uv, sizeof(float) * 2); + stream->read((char*) bone_index, sizeof(uint16_t) * 2); + stream->read((char*) &bone_weight, sizeof(uint8_t)); + stream->read((char*) &edge_invisible, sizeof(uint8_t)); + return true; + } + }; + + /// 材質 + class PmdMaterial + { + public: + /// 減衰色 + float diffuse[4]; + /// 光沢度 + float power; + /// 光沢色 + float specular[3]; + /// 環境色 + float ambient[3]; + /// トーンインデックス + uint8_t toon_index; + /// エッジ + uint8_t edge_flag; + /// インデックス数 + uint32_t index_count; + /// テクスチャファイル名 + std::string texture_filename; + /// スフィアファイル名 + std::string sphere_filename; + + bool Read(std::ifstream* stream) + { + char buffer[20]; + stream->read((char*) &diffuse, sizeof(float) * 4); + stream->read((char*) &power, sizeof(float)); + stream->read((char*) &specular, sizeof(float) * 3); + stream->read((char*) &ambient, sizeof(float) * 3); + stream->read((char*) &toon_index, sizeof(uint8_t)); + stream->read((char*) &edge_flag, sizeof(uint8_t)); + stream->read((char*) &index_count, sizeof(uint32_t)); + stream->read((char*) &buffer, sizeof(char) * 20); + char* pstar = strchr(buffer, '*'); + if (NULL == pstar) + { + texture_filename = std::string(buffer); + sphere_filename.clear(); + } + else { + *pstar = (char)NULL; + texture_filename = std::string(buffer); + sphere_filename = std::string(pstar+1); + } + return true; + } + }; + + enum class BoneType : uint8_t + { + Rotation, + RotationAndMove, + IkEffector, + Unknown, + IkEffectable, + RotationEffectable, + IkTarget, + Invisible, + Twist, + RotationMovement + }; + + /// ボーン + class PmdBone + { + public: + /// ボーン名 + std::string name; + /// ボーン名(英語) + std::string name_english; + /// 親ボーン番号 + uint16_t parent_bone_index; + /// 末端ボーン番号 + uint16_t tail_pos_bone_index; + /// ボーン種類 + BoneType bone_type; + /// IKボーン番号 + uint16_t ik_parent_bone_index; + /// ボーンのヘッドの位置 + float bone_head_pos[3]; + + void Read(std::istream *stream) + { + char buffer[20]; + stream->read(buffer, 20); + name = std::string(buffer); + stream->read((char*) &parent_bone_index, sizeof(uint16_t)); + stream->read((char*) &tail_pos_bone_index, sizeof(uint16_t)); + stream->read((char*) &bone_type, sizeof(uint8_t)); + stream->read((char*) &ik_parent_bone_index, sizeof(uint16_t)); + stream->read((char*) &bone_head_pos, sizeof(float) * 3); + } + + void ReadExpantion(std::istream *stream) + { + char buffer[20]; + stream->read(buffer, 20); + name_english = std::string(buffer); + } + }; + + /// IK + class PmdIk + { + public: + /// IKボーン番号 + uint16_t ik_bone_index; + /// IKターゲットボーン番号 + uint16_t target_bone_index; + /// 再帰回数 + uint16_t interations; + /// 角度制限 + float angle_limit; + /// 影響下ボーン番号 + std::vector ik_child_bone_index; + + void Read(std::istream *stream) + { + stream->read((char *) &ik_bone_index, sizeof(uint16_t)); + stream->read((char *) &target_bone_index, sizeof(uint16_t)); + uint8_t ik_chain_length; + stream->read((char*) &ik_chain_length, sizeof(uint8_t)); + stream->read((char *) &interations, sizeof(uint16_t)); + stream->read((char *) &angle_limit, sizeof(float)); + ik_child_bone_index.resize(ik_chain_length); + for (int i = 0; i < ik_chain_length; i++) + { + stream->read((char *) &ik_child_bone_index[i], sizeof(uint16_t)); + } + } + }; + + class PmdFaceVertex + { + public: + int vertex_index; + float position[3]; + + void Read(std::istream *stream) + { + stream->read((char *) &vertex_index, sizeof(int)); + stream->read((char *) position, sizeof(float) * 3); + } + }; + + enum class FaceCategory : uint8_t + { + Base, + Eyebrow, + Eye, + Mouth, + Other + }; + + class PmdFace + { + public: + std::string name; + FaceCategory type; + std::vector vertices; + std::string name_english; + + void Read(std::istream *stream) + { + char buffer[20]; + stream->read(buffer, 20); + name = std::string(buffer); + int vertex_count; + stream->read((char*) &vertex_count, sizeof(int)); + stream->read((char*) &type, sizeof(uint8_t)); + vertices.resize(vertex_count); + for (int i = 0; i < vertex_count; i++) + { + vertices[i].Read(stream); + } + } + + void ReadExpantion(std::istream *stream) + { + char buffer[20]; + stream->read(buffer, 20); + name_english = std::string(buffer); + } + }; + + /// ボーン枠用の枠名 + class PmdBoneDispName + { + public: + std::string bone_disp_name; + std::string bone_disp_name_english; + + void Read(std::istream *stream) + { + char buffer[50]; + stream->read(buffer, 50); + bone_disp_name = std::string(buffer); + bone_disp_name_english.clear(); + } + void ReadExpantion(std::istream *stream) + { + char buffer[50]; + stream->read(buffer, 50); + bone_disp_name_english = std::string(buffer); + } + }; + + class PmdBoneDisp + { + public: + uint16_t bone_index; + uint8_t bone_disp_index; + + void Read(std::istream *stream) + { + stream->read((char*) &bone_index, sizeof(uint16_t)); + stream->read((char*) &bone_disp_index, sizeof(uint8_t)); + } + }; + + /// 衝突形状 + enum class RigidBodyShape : uint8_t + { + /// 球 + Sphere = 0, + /// 直方体 + Box = 1, + /// カプセル + Cpusel = 2 + }; + + /// 剛体タイプ + enum class RigidBodyType : uint8_t + { + /// ボーン追従 + BoneConnected = 0, + /// 物理演算 + Physics = 1, + /// 物理演算(Bone位置合せ) + ConnectedPhysics = 2 + }; + + /// 剛体 + class PmdRigidBody + { + public: + /// 名前 + std::string name; + /// 関連ボーン番号 + uint16_t related_bone_index; + /// グループ番号 + uint8_t group_index; + /// マスク + uint16_t mask; + /// 形状 + RigidBodyShape shape; + /// 大きさ + float size[3]; + /// 位置 + float position[3]; + /// 回転 + float orientation[3]; + /// 質量 + float weight; + /// 移動ダンピング + float linear_damping; + /// 回転ダンピング + float anglar_damping; + /// 反発係数 + float restitution; + /// 摩擦係数 + float friction; + /// 演算方法 + RigidBodyType rigid_type; + + void Read(std::istream *stream) + { + char buffer[20]; + stream->read(buffer, sizeof(char) * 20); + name = (std::string(buffer)); + stream->read((char*) &related_bone_index, sizeof(uint16_t)); + stream->read((char*) &group_index, sizeof(uint8_t)); + stream->read((char*) &mask, sizeof(uint16_t)); + stream->read((char*) &shape, sizeof(uint8_t)); + stream->read((char*) size, sizeof(float) * 3); + stream->read((char*) position, sizeof(float) * 3); + stream->read((char*) orientation, sizeof(float) * 3); + stream->read((char*) &weight, sizeof(float)); + stream->read((char*) &linear_damping, sizeof(float)); + stream->read((char*) &anglar_damping, sizeof(float)); + stream->read((char*) &restitution, sizeof(float)); + stream->read((char*) &friction, sizeof(float)); + stream->read((char*) &rigid_type, sizeof(char)); + } + }; + + /// 剛体の拘束 + class PmdConstraint + { + public: + /// 名前 + std::string name; + /// 剛体Aのインデックス + uint32_t rigid_body_index_a; + /// 剛体Bのインデックス + uint32_t rigid_body_index_b; + /// 位置 + float position[3]; + /// 回転 + float orientation[3]; + /// 最小移動制限 + float linear_lower_limit[3]; + /// 最大移動制限 + float linear_upper_limit[3]; + /// 最小回転制限 + float angular_lower_limit[3]; + /// 最大回転制限 + float angular_upper_limit[3]; + /// 移動に対する復元力 + float linear_stiffness[3]; + /// 回転に対する復元力 + float angular_stiffness[3]; + + void Read(std::istream *stream) + { + char buffer[20]; + stream->read(buffer, 20); + name = std::string(buffer); + stream->read((char *) &rigid_body_index_a, sizeof(uint32_t)); + stream->read((char *) &rigid_body_index_b, sizeof(uint32_t)); + stream->read((char *) position, sizeof(float) * 3); + stream->read((char *) orientation, sizeof(float) * 3); + stream->read((char *) linear_lower_limit, sizeof(float) * 3); + stream->read((char *) linear_upper_limit, sizeof(float) * 3); + stream->read((char *) angular_lower_limit, sizeof(float) * 3); + stream->read((char *) angular_upper_limit, sizeof(float) * 3); + stream->read((char *) linear_stiffness, sizeof(float) * 3); + stream->read((char *) angular_stiffness, sizeof(float) * 3); + } + }; + + /// PMDモデル + class PmdModel + { + public: + float version; + PmdHeader header; + std::vector vertices; + std::vector indices; + std::vector materials; + std::vector bones; + std::vector iks; + std::vector faces; + std::vector faces_indices; + std::vector bone_disp_name; + std::vector bone_disp; + std::vector toon_filenames; + std::vector rigid_bodies; + std::vector constraints; + + static std::unique_ptr LoadFromFile(const char *filename) + { + std::ifstream stream(filename, std::ios::binary); + if (stream.fail()) + { + std::cerr << "could not open \"" << filename << "\"" << std::endl; + return nullptr; + } + auto result = LoadFromStream(&stream); + stream.close(); + return result; + } + + /// ファイルからPmdModelを生成する + static std::unique_ptr LoadFromStream(std::ifstream *stream) + { + auto result = mmd::make_unique(); + char buffer[100]; + + // magic + char magic[3]; + stream->read(magic, 3); + if (magic[0] != 'P' || magic[1] != 'm' || magic[2] != 'd') + { + std::cerr << "invalid file" << std::endl; + return nullptr; + } + + // version + stream->read((char*) &(result->version), sizeof(float)); + if (result ->version != 1.0f) + { + std::cerr << "invalid version" << std::endl; + return nullptr; + } + + // header + result->header.Read(stream); + + // vertices + uint32_t vertex_num; + stream->read((char*) &vertex_num, sizeof(uint32_t)); + result->vertices.resize(vertex_num); + for (uint32_t i = 0; i < vertex_num; i++) + { + result->vertices[i].Read(stream); + } + + // indices + uint32_t index_num; + stream->read((char*) &index_num, sizeof(uint32_t)); + result->indices.resize(index_num); + for (uint32_t i = 0; i < index_num; i++) + { + stream->read((char*) &result->indices[i], sizeof(uint16_t)); + } + + // materials + uint32_t material_num; + stream->read((char*) &material_num, sizeof(uint32_t)); + result->materials.resize(material_num); + for (uint32_t i = 0; i < material_num; i++) + { + result->materials[i].Read(stream); + } + + // bones + uint16_t bone_num; + stream->read((char*) &bone_num, sizeof(uint16_t)); + result->bones.resize(bone_num); + for (uint32_t i = 0; i < bone_num; i++) + { + result->bones[i].Read(stream); + } + + // iks + uint16_t ik_num; + stream->read((char*) &ik_num, sizeof(uint16_t)); + result->iks.resize(ik_num); + for (uint32_t i = 0; i < ik_num; i++) + { + result->iks[i].Read(stream); + } + + // faces + uint16_t face_num; + stream->read((char*) &face_num, sizeof(uint16_t)); + result->faces.resize(face_num); + for (uint32_t i = 0; i < face_num; i++) + { + result->faces[i].Read(stream); + } + + // face frames + uint8_t face_frame_num; + stream->read((char*) &face_frame_num, sizeof(uint8_t)); + result->faces_indices.resize(face_frame_num); + for (uint32_t i = 0; i < face_frame_num; i++) + { + stream->read((char*) &result->faces_indices[i], sizeof(uint16_t)); + } + + // bone names + uint8_t bone_disp_num; + stream->read((char*) &bone_disp_num, sizeof(uint8_t)); + result->bone_disp_name.resize(bone_disp_num); + for (uint32_t i = 0; i < bone_disp_num; i++) + { + result->bone_disp_name[i].Read(stream); + } + + // bone frame + uint32_t bone_frame_num; + stream->read((char*) &bone_frame_num, sizeof(uint32_t)); + result->bone_disp.resize(bone_frame_num); + for (uint32_t i = 0; i < bone_frame_num; i++) + { + result->bone_disp[i].Read(stream); + } + + // english name + bool english; + stream->read((char*) &english, sizeof(char)); + if (english) + { + result->header.ReadExtension(stream); + for (uint32_t i = 0; i < bone_num; i++) + { + result->bones[i].ReadExpantion(stream); + } + for (uint32_t i = 0; i < face_num; i++) + { + if (result->faces[i].type == pmd::FaceCategory::Base) + { + continue; + } + result->faces[i].ReadExpantion(stream); + } + for (uint32_t i = 0; i < result->bone_disp_name.size(); i++) + { + result->bone_disp_name[i].ReadExpantion(stream); + } + } + + // toon textures + if (stream->peek() == std::ios::traits_type::eof()) + { + result->toon_filenames.clear(); + } + else { + result->toon_filenames.resize(10); + for (uint32_t i = 0; i < 10; i++) + { + stream->read(buffer, 100); + result->toon_filenames[i] = std::string(buffer); + } + } + + // physics + if (stream->peek() == std::ios::traits_type::eof()) + { + result->rigid_bodies.clear(); + result->constraints.clear(); + } + else { + uint32_t rigid_body_num; + stream->read((char*) &rigid_body_num, sizeof(uint32_t)); + result->rigid_bodies.resize(rigid_body_num); + for (uint32_t i = 0; i < rigid_body_num; i++) + { + result->rigid_bodies[i].Read(stream); + } + uint32_t constraint_num; + stream->read((char*) &constraint_num, sizeof(uint32_t)); + result->constraints.resize(constraint_num); + for (uint32_t i = 0; i < constraint_num; i++) + { + result->constraints[i].Read(stream); + } + } + + if (stream->peek() != std::ios::traits_type::eof()) + { + std::cerr << "there is unknown data" << std::endl; + } + + return result; + } + }; +} diff --git a/code/MMDPmxParser.cpp b/code/MMDPmxParser.cpp new file mode 100644 index 000000000..352259df5 --- /dev/null +++ b/code/MMDPmxParser.cpp @@ -0,0 +1,608 @@ +#include +#include "MMDPmxParser.h" +#include "Exceptional.h" +#include "../contrib/ConvertUTF/ConvertUTF.h" + +namespace pmx +{ + /// インデックス値を読み込む + int ReadIndex(std::istream *stream, int size) + { + switch (size) + { + case 1: + uint8_t tmp8; + stream->read((char*) &tmp8, sizeof(uint8_t)); + if (255 == tmp8) + { + return -1; + } + else { + return (int) tmp8; + } + case 2: + uint16_t tmp16; + stream->read((char*) &tmp16, sizeof(uint16_t)); + if (65535 == tmp16) + { + return -1; + } + else { + return (int) tmp16; + } + case 4: + int tmp32; + stream->read((char*) &tmp32, sizeof(int)); + return tmp32; + default: + return -1; + } + } + + /// 文字列を読み込む + std::string ReadString(std::istream *stream, uint8_t encoding) + { + int size; + stream->read((char*) &size, sizeof(int)); + std::vector buffer; + if (size == 0) + { + return std::string(""); + } + buffer.reserve(size); + stream->read((char*) buffer.data(), size); + if (encoding == 0) + { + // UTF16 to UTF8 + std::string result; + + const char* sourceStart = buffer.data(); + const unsigned int targetSize = size * 3; // enough to encode + char* targetStart = new char[targetSize](); + const char* targetReserved = targetStart; + ConversionFlags flags = ConversionFlags::lenientConversion; + + ConversionResult conversionResult; + if( ( conversionResult = ConvertUTF16toUTF8( + (const UTF16**)&sourceStart, (const UTF16*)(sourceStart + size), + (UTF8**)&targetStart, (UTF8*)(targetStart + targetSize), + flags) ) != ConversionResult::conversionOK) { + throw DeadlyImportError( "Convert " + std::string(sourceStart) + " to UTF8 is not valid." ); + } + + result.assign(targetReserved, targetStart - targetReserved); + delete[] targetReserved; + return result; + } + else + { + // the name is already UTF8 + return std::string((const char*)buffer.data(), size); + } + } + + void PmxSetting::Read(std::istream *stream) + { + uint8_t count; + stream->read((char*) &count, sizeof(uint8_t)); + if (count < 8) + { + throw; + } + stream->read((char*) &encoding, sizeof(uint8_t)); + stream->read((char*) &uv, sizeof(uint8_t)); + stream->read((char*) &vertex_index_size, sizeof(uint8_t)); + stream->read((char*) &texture_index_size, sizeof(uint8_t)); + stream->read((char*) &material_index_size, sizeof(uint8_t)); + stream->read((char*) &bone_index_size, sizeof(uint8_t)); + stream->read((char*) &morph_index_size, sizeof(uint8_t)); + stream->read((char*) &rigidbody_index_size, sizeof(uint8_t)); + uint8_t temp; + for (int i = 8; i < count; i++) + { + stream->read((char*)&temp, sizeof(uint8_t)); + } + } + + void PmxVertexSkinningBDEF1::Read(std::istream *stream, PmxSetting *setting) + { + this->bone_index = ReadIndex(stream, setting->bone_index_size); + } + + void PmxVertexSkinningBDEF2::Read(std::istream *stream, PmxSetting *setting) + { + this->bone_index1 = ReadIndex(stream, setting->bone_index_size); + this->bone_index2 = ReadIndex(stream, setting->bone_index_size); + stream->read((char*) &this->bone_weight, sizeof(float)); + } + + void PmxVertexSkinningBDEF4::Read(std::istream *stream, PmxSetting *setting) + { + this->bone_index1 = ReadIndex(stream, setting->bone_index_size); + this->bone_index2 = ReadIndex(stream, setting->bone_index_size); + this->bone_index3 = ReadIndex(stream, setting->bone_index_size); + this->bone_index4 = ReadIndex(stream, setting->bone_index_size); + stream->read((char*) &this->bone_weight1, sizeof(float)); + stream->read((char*) &this->bone_weight2, sizeof(float)); + stream->read((char*) &this->bone_weight3, sizeof(float)); + stream->read((char*) &this->bone_weight4, sizeof(float)); + } + + void PmxVertexSkinningSDEF::Read(std::istream *stream, PmxSetting *setting) + { + this->bone_index1 = ReadIndex(stream, setting->bone_index_size); + this->bone_index2 = ReadIndex(stream, setting->bone_index_size); + stream->read((char*) &this->bone_weight, sizeof(float)); + stream->read((char*) this->sdef_c, sizeof(float) * 3); + stream->read((char*) this->sdef_r0, sizeof(float) * 3); + stream->read((char*) this->sdef_r1, sizeof(float) * 3); + } + + void PmxVertexSkinningQDEF::Read(std::istream *stream, PmxSetting *setting) + { + this->bone_index1 = ReadIndex(stream, setting->bone_index_size); + this->bone_index2 = ReadIndex(stream, setting->bone_index_size); + this->bone_index3 = ReadIndex(stream, setting->bone_index_size); + this->bone_index4 = ReadIndex(stream, setting->bone_index_size); + stream->read((char*) &this->bone_weight1, sizeof(float)); + stream->read((char*) &this->bone_weight2, sizeof(float)); + stream->read((char*) &this->bone_weight3, sizeof(float)); + stream->read((char*) &this->bone_weight4, sizeof(float)); + } + + void PmxVertex::Read(std::istream *stream, PmxSetting *setting) + { + stream->read((char*) this->position, sizeof(float) * 3); + stream->read((char*) this->normal, sizeof(float) * 3); + stream->read((char*) this->uv, sizeof(float) * 2); + for (int i = 0; i < setting->uv; ++i) + { + stream->read((char*) this->uva[i], sizeof(float) * 4); + } + stream->read((char*) &this->skinning_type, sizeof(PmxVertexSkinningType)); + switch (this->skinning_type) + { + case PmxVertexSkinningType::BDEF1: + this->skinning = mmd::make_unique(); + break; + case PmxVertexSkinningType::BDEF2: + this->skinning = mmd::make_unique(); + break; + case PmxVertexSkinningType::BDEF4: + this->skinning = mmd::make_unique(); + break; + case PmxVertexSkinningType::SDEF: + this->skinning = mmd::make_unique(); + break; + case PmxVertexSkinningType::QDEF: + this->skinning = mmd::make_unique(); + break; + default: + throw "invalid skinning type"; + } + this->skinning->Read(stream, setting); + stream->read((char*) &this->edge, sizeof(float)); + } + + void PmxMaterial::Read(std::istream *stream, PmxSetting *setting) + { + this->material_name = std::move(ReadString(stream, setting->encoding)); + this->material_english_name = std::move(ReadString(stream, setting->encoding)); + stream->read((char*) this->diffuse, sizeof(float) * 4); + stream->read((char*) this->specular, sizeof(float) * 3); + stream->read((char*) &this->specularlity, sizeof(float)); + stream->read((char*) this->ambient, sizeof(float) * 3); + stream->read((char*) &this->flag, sizeof(uint8_t)); + stream->read((char*) this->edge_color, sizeof(float) * 4); + stream->read((char*) &this->edge_size, sizeof(float)); + this->diffuse_texture_index = ReadIndex(stream, setting->texture_index_size); + this->sphere_texture_index = ReadIndex(stream, setting->texture_index_size); + stream->read((char*) &this->sphere_op_mode, sizeof(uint8_t)); + stream->read((char*) &this->common_toon_flag, sizeof(uint8_t)); + if (this->common_toon_flag) + { + stream->read((char*) &this->toon_texture_index, sizeof(uint8_t)); + } + else { + this->toon_texture_index = ReadIndex(stream, setting->texture_index_size); + } + this->memo = std::move(ReadString(stream, setting->encoding)); + stream->read((char*) &this->index_count, sizeof(int)); + } + + void PmxIkLink::Read(std::istream *stream, PmxSetting *setting) + { + this->link_target = ReadIndex(stream, setting->bone_index_size); + stream->read((char*) &this->angle_lock, sizeof(uint8_t)); + if (angle_lock == 1) + { + stream->read((char*) this->max_radian, sizeof(float) * 3); + stream->read((char*) this->min_radian, sizeof(float) * 3); + } + } + + void PmxBone::Read(std::istream *stream, PmxSetting *setting) + { + this->bone_name = std::move(ReadString(stream, setting->encoding)); + this->bone_english_name = std::move(ReadString(stream, setting->encoding)); + stream->read((char*) this->position, sizeof(float) * 3); + this->parent_index = ReadIndex(stream, setting->bone_index_size); + stream->read((char*) &this->level, sizeof(int)); + stream->read((char*) &this->bone_flag, sizeof(uint16_t)); + if (this->bone_flag & 0x0001) { + this->target_index = ReadIndex(stream, setting->bone_index_size); + } + else { + stream->read((char*)this->offset, sizeof(float) * 3); + } + if (this->bone_flag & (0x0100 | 0x0200)) { + this->grant_parent_index = ReadIndex(stream, setting->bone_index_size); + stream->read((char*) &this->grant_weight, sizeof(float)); + } + if (this->bone_flag & 0x0400) { + stream->read((char*)this->lock_axis_orientation, sizeof(float) * 3); + } + if (this->bone_flag & 0x0800) { + stream->read((char*)this->local_axis_x_orientation, sizeof(float) * 3); + stream->read((char*)this->local_axis_y_orientation, sizeof(float) * 3); + } + if (this->bone_flag & 0x2000) { + stream->read((char*) &this->key, sizeof(int)); + } + if (this->bone_flag & 0x0020) { + this->ik_target_bone_index = ReadIndex(stream, setting->bone_index_size); + stream->read((char*) &ik_loop, sizeof(int)); + stream->read((char*) &ik_loop_angle_limit, sizeof(float)); + stream->read((char*) &ik_link_count, sizeof(int)); + this->ik_links = mmd::make_unique(ik_link_count); + for (int i = 0; i < ik_link_count; i++) { + ik_links[i].Read(stream, setting); + } + } + } + + void PmxMorphVertexOffset::Read(std::istream *stream, PmxSetting *setting) + { + this->vertex_index = ReadIndex(stream, setting->vertex_index_size); + stream->read((char*)this->position_offset, sizeof(float) * 3); + } + + void PmxMorphUVOffset::Read(std::istream *stream, PmxSetting *setting) + { + this->vertex_index = ReadIndex(stream, setting->vertex_index_size); + stream->read((char*)this->uv_offset, sizeof(float) * 4); + } + + void PmxMorphBoneOffset::Read(std::istream *stream, PmxSetting *setting) + { + this->bone_index = ReadIndex(stream, setting->bone_index_size); + stream->read((char*)this->translation, sizeof(float) * 3); + stream->read((char*)this->rotation, sizeof(float) * 4); + } + + void PmxMorphMaterialOffset::Read(std::istream *stream, PmxSetting *setting) + { + this->material_index = ReadIndex(stream, setting->material_index_size); + stream->read((char*) &this->offset_operation, sizeof(uint8_t)); + stream->read((char*)this->diffuse, sizeof(float) * 4); + stream->read((char*)this->specular, sizeof(float) * 3); + stream->read((char*) &this->specularity, sizeof(float)); + stream->read((char*)this->ambient, sizeof(float) * 3); + stream->read((char*)this->edge_color, sizeof(float) * 4); + stream->read((char*) &this->edge_size, sizeof(float)); + stream->read((char*)this->texture_argb, sizeof(float) * 4); + stream->read((char*)this->sphere_texture_argb, sizeof(float) * 4); + stream->read((char*)this->toon_texture_argb, sizeof(float) * 4); + } + + void PmxMorphGroupOffset::Read(std::istream *stream, PmxSetting *setting) + { + this->morph_index = ReadIndex(stream, setting->morph_index_size); + stream->read((char*) &this->morph_weight, sizeof(float)); + } + + void PmxMorphFlipOffset::Read(std::istream *stream, PmxSetting *setting) + { + this->morph_index = ReadIndex(stream, setting->morph_index_size); + stream->read((char*) &this->morph_value, sizeof(float)); + } + + void PmxMorphImplusOffset::Read(std::istream *stream, PmxSetting *setting) + { + this->rigid_body_index = ReadIndex(stream, setting->rigidbody_index_size); + stream->read((char*) &this->is_local, sizeof(uint8_t)); + stream->read((char*)this->velocity, sizeof(float) * 3); + stream->read((char*)this->angular_torque, sizeof(float) * 3); + } + + void PmxMorph::Read(std::istream *stream, PmxSetting *setting) + { + this->morph_name = ReadString(stream, setting->encoding); + this->morph_english_name = ReadString(stream, setting->encoding); + stream->read((char*) &category, sizeof(MorphCategory)); + stream->read((char*) &morph_type, sizeof(MorphType)); + stream->read((char*) &this->offset_count, sizeof(int)); + switch (this->morph_type) + { + case MorphType::Group: + group_offsets = mmd::make_unique(this->offset_count); + for (int i = 0; i < offset_count; i++) + { + group_offsets[i].Read(stream, setting); + } + break; + case MorphType::Vertex: + vertex_offsets = mmd::make_unique(this->offset_count); + for (int i = 0; i < offset_count; i++) + { + vertex_offsets[i].Read(stream, setting); + } + break; + case MorphType::Bone: + bone_offsets = mmd::make_unique(this->offset_count); + for (int i = 0; i < offset_count; i++) + { + bone_offsets[i].Read(stream, setting); + } + break; + case MorphType::Matrial: + material_offsets = mmd::make_unique(this->offset_count); + for (int i = 0; i < offset_count; i++) + { + material_offsets[i].Read(stream, setting); + } + break; + case MorphType::UV: + case MorphType::AdditionalUV1: + case MorphType::AdditionalUV2: + case MorphType::AdditionalUV3: + case MorphType::AdditionalUV4: + uv_offsets = mmd::make_unique(this->offset_count); + for (int i = 0; i < offset_count; i++) + { + uv_offsets[i].Read(stream, setting); + } + break; + default: + throw; + } + } + + void PmxFrameElement::Read(std::istream *stream, PmxSetting *setting) + { + stream->read((char*) &this->element_target, sizeof(uint8_t)); + if (this->element_target == 0x00) + { + this->index = ReadIndex(stream, setting->bone_index_size); + } + else { + this->index = ReadIndex(stream, setting->morph_index_size); + } + } + + void PmxFrame::Read(std::istream *stream, PmxSetting *setting) + { + this->frame_name = ReadString(stream, setting->encoding); + this->frame_english_name = ReadString(stream, setting->encoding); + stream->read((char*) &this->frame_flag, sizeof(uint8_t)); + stream->read((char*) &this->element_count, sizeof(int)); + this->elements = mmd::make_unique(this->element_count); + for (int i = 0; i < this->element_count; i++) + { + this->elements[i].Read(stream, setting); + } + } + + void PmxRigidBody::Read(std::istream *stream, PmxSetting *setting) + { + this->girid_body_name = ReadString(stream, setting->encoding); + this->girid_body_english_name = ReadString(stream, setting->encoding); + this->target_bone = ReadIndex(stream, setting->bone_index_size); + stream->read((char*) &this->group, sizeof(uint8_t)); + stream->read((char*) &this->mask, sizeof(uint16_t)); + stream->read((char*) &this->shape, sizeof(uint8_t)); + stream->read((char*) this->size, sizeof(float) * 3); + stream->read((char*) this->position, sizeof(float) * 3); + stream->read((char*) this->orientation, sizeof(float) * 3); + stream->read((char*) &this->mass, sizeof(float)); + stream->read((char*) &this->move_attenuation, sizeof(float)); + stream->read((char*) &this->rotation_attenuation, sizeof(float)); + stream->read((char*) &this->repulsion, sizeof(float)); + stream->read((char*) &this->friction, sizeof(float)); + stream->read((char*) &this->physics_calc_type, sizeof(uint8_t)); + } + + void PmxJointParam::Read(std::istream *stream, PmxSetting *setting) + { + this->rigid_body1 = ReadIndex(stream, setting->rigidbody_index_size); + this->rigid_body2 = ReadIndex(stream, setting->rigidbody_index_size); + stream->read((char*) this->position, sizeof(float) * 3); + stream->read((char*) this->orientaiton, sizeof(float) * 3); + stream->read((char*) this->move_limitation_min, sizeof(float) * 3); + stream->read((char*) this->move_limitation_max, sizeof(float) * 3); + stream->read((char*) this->rotation_limitation_min, sizeof(float) * 3); + stream->read((char*) this->rotation_limitation_max, sizeof(float) * 3); + stream->read((char*) this->spring_move_coefficient, sizeof(float) * 3); + stream->read((char*) this->spring_rotation_coefficient, sizeof(float) * 3); + } + + void PmxJoint::Read(std::istream *stream, PmxSetting *setting) + { + this->joint_name = ReadString(stream, setting->encoding); + this->joint_english_name = ReadString(stream, setting->encoding); + stream->read((char*) &this->joint_type, sizeof(uint8_t)); + this->param.Read(stream, setting); + } + + void PmxAncherRigidBody::Read(std::istream *stream, PmxSetting *setting) + { + this->related_rigid_body = ReadIndex(stream, setting->rigidbody_index_size); + this->related_vertex = ReadIndex(stream, setting->vertex_index_size); + stream->read((char*) &this->is_near, sizeof(uint8_t)); + } + + void PmxSoftBody::Read(std::istream *stream, PmxSetting *setting) + { + // 未実装 + std::cerr << "Not Implemented Exception" << std::endl; + throw; + } + + void PmxModel::Init() + { + this->version = 0.0f; + this->model_name.clear(); + this->model_english_name.clear(); + this->model_comment.clear(); + this->model_english_comment.clear(); + this->vertex_count = 0; + this->vertices = nullptr; + this->index_count = 0; + this->indices = nullptr; + this->texture_count = 0; + this->textures = nullptr; + this->material_count = 0; + this->materials = nullptr; + this->bone_count = 0; + this->bones = nullptr; + this->morph_count = 0; + this->morphs = nullptr; + this->frame_count = 0; + this->frames = nullptr; + this->rigid_body_count = 0; + this->rigid_bodies = nullptr; + this->joint_count = 0; + this->joints = nullptr; + this->soft_body_count = 0; + this->soft_bodies = nullptr; + } + + void PmxModel::Read(std::istream *stream) + { + // マジック + char magic[4]; + stream->read((char*) magic, sizeof(char) * 4); + if (magic[0] != 0x50 || magic[1] != 0x4d || magic[2] != 0x58 || magic[3] != 0x20) + { + std::cerr << "invalid magic number." << std::endl; + throw; + } + // バージョン + stream->read((char*) &version, sizeof(float)); + if (version != 2.0f && version != 2.1f) + { + std::cerr << "this is not ver2.0 or ver2.1 but " << version << "." << std::endl; + throw; + } + // ファイル設定 + this->setting.Read(stream); + + // モデル情報 + this->model_name = std::move(ReadString(stream, setting.encoding)); + this->model_english_name = std::move(ReadString(stream, setting.encoding)); + this->model_comment = std::move(ReadString(stream, setting.encoding)); + this->model_english_comment = std::move(ReadString(stream, setting.encoding)); + + // 頂点 + stream->read((char*) &vertex_count, sizeof(int)); + this->vertices = mmd::make_unique(vertex_count); + for (int i = 0; i < vertex_count; i++) + { + vertices[i].Read(stream, &setting); + } + + // 面 + stream->read((char*) &index_count, sizeof(int)); + this->indices = mmd::make_unique(index_count); + for (int i = 0; i < index_count; i++) + { + this->indices[i] = ReadIndex(stream, setting.vertex_index_size); + } + + // テクスチャ + stream->read((char*) &texture_count, sizeof(int)); + this->textures = mmd::make_unique(texture_count); + for (int i = 0; i < texture_count; i++) + { + this->textures[i] = ReadString(stream, setting.encoding); + } + + // マテリアル + stream->read((char*) &material_count, sizeof(int)); + this->materials = mmd::make_unique(material_count); + for (int i = 0; i < material_count; i++) + { + this->materials[i].Read(stream, &setting); + } + + // ボーン + stream->read((char*) &this->bone_count, sizeof(int)); + this->bones = mmd::make_unique(this->bone_count); + for (int i = 0; i < this->bone_count; i++) + { + this->bones[i].Read(stream, &setting); + } + + // モーフ + stream->read((char*) &this->morph_count, sizeof(int)); + this->morphs = mmd::make_unique(this->morph_count); + for (int i = 0; i < this->morph_count; i++) + { + this->morphs[i].Read(stream, &setting); + } + + // 表示枠 + stream->read((char*) &this->frame_count, sizeof(int)); + this->frames = mmd::make_unique(this->frame_count); + for (int i = 0; i < this->frame_count; i++) + { + this->frames[i].Read(stream, &setting); + } + + // 剛体 + stream->read((char*) &this->rigid_body_count, sizeof(int)); + this->rigid_bodies = mmd::make_unique(this->rigid_body_count); + for (int i = 0; i < this->rigid_body_count; i++) + { + this->rigid_bodies[i].Read(stream, &setting); + } + + // ジョイント + stream->read((char*) &this->joint_count, sizeof(int)); + this->joints = mmd::make_unique(this->joint_count); + for (int i = 0; i < this->joint_count; i++) + { + this->joints[i].Read(stream, &setting); + } + + //// ソフトボディ + //if (this->version == 2.1f) + //{ + // stream->read((char*) &this->soft_body_count, sizeof(int)); + // this->soft_bodies = mmd::make_unique(this->soft_body_count); + // for (int i = 0; i < this->soft_body_count; i++) + // { + // this->soft_bodies[i].Read(stream, &setting); + // } + //} + } + + //std::unique_ptr ReadFromFile(const char *filename) + //{ + // auto stream = std::ifstream(filename, std::ios_base::binary); + // auto pmx = PmxModel::ReadFromStream(&stream); + // if (!stream.eof()) + // { + // std::cerr << "don't reach the end of file." << std::endl; + // } + // stream.close(); + // return pmx; + //} + + //std::unique_ptr ReadFromStream(std::istream *stream) + //{ + // auto pmx = mmd::make_unique(); + // pmx->Read(stream); + // return pmx; + //} +} diff --git a/code/MMDPmxParser.h b/code/MMDPmxParser.h new file mode 100644 index 000000000..7cb94b9b6 --- /dev/null +++ b/code/MMDPmxParser.h @@ -0,0 +1,860 @@ +#pragma once + +#include +#include +#include +#include +#include +#include "MMDCpp14.h" + +namespace pmx +{ + /// インデックス設定 + class PmxSetting + { + public: + PmxSetting() + : encoding(0) + , uv(0) + , vertex_index_size(0) + , texture_index_size(0) + , material_index_size(0) + , bone_index_size(0) + , morph_index_size(0) + , rigidbody_index_size(0) + {} + + /// エンコード方式 + uint8_t encoding; + /// 追加UV数 + uint8_t uv; + /// 頂点インデックスサイズ + uint8_t vertex_index_size; + /// テクスチャインデックスサイズ + uint8_t texture_index_size; + /// マテリアルインデックスサイズ + uint8_t material_index_size; + /// ボーンインデックスサイズ + uint8_t bone_index_size; + /// モーフインデックスサイズ + uint8_t morph_index_size; + /// 剛体インデックスサイズ + uint8_t rigidbody_index_size; + void Read(std::istream *stream); + }; + + /// 頂点スキニングタイプ + enum class PmxVertexSkinningType : uint8_t + { + BDEF1 = 0, + BDEF2 = 1, + BDEF4 = 2, + SDEF = 3, + QDEF = 4, + }; + + /// 頂点スキニング + class PmxVertexSkinning + { + public: + virtual void Read(std::istream *stream, PmxSetting *setting) = 0; + }; + + class PmxVertexSkinningBDEF1 : public PmxVertexSkinning + { + public: + PmxVertexSkinningBDEF1() + : bone_index(0) + {} + + int bone_index; + void Read(std::istream *stresam, PmxSetting *setting); + }; + + class PmxVertexSkinningBDEF2 : public PmxVertexSkinning + { + public: + PmxVertexSkinningBDEF2() + : bone_index1(0) + , bone_index2(0) + , bone_weight(0.0f) + {} + + int bone_index1; + int bone_index2; + float bone_weight; + void Read(std::istream *stresam, PmxSetting *setting); + }; + + class PmxVertexSkinningBDEF4 : public PmxVertexSkinning + { + public: + PmxVertexSkinningBDEF4() + : bone_index1(0) + , bone_index2(0) + , bone_index3(0) + , bone_index4(0) + , bone_weight1(0.0f) + , bone_weight2(0.0f) + , bone_weight3(0.0f) + , bone_weight4(0.0f) + {} + + int bone_index1; + int bone_index2; + int bone_index3; + int bone_index4; + float bone_weight1; + float bone_weight2; + float bone_weight3; + float bone_weight4; + void Read(std::istream *stresam, PmxSetting *setting); + }; + + class PmxVertexSkinningSDEF : public PmxVertexSkinning + { + public: + PmxVertexSkinningSDEF() + : bone_index1(0) + , bone_index2(0) + , bone_weight(0.0f) + { + for (int i = 0; i < 3; ++i) { + sdef_c[i] = 0.0f; + sdef_r0[i] = 0.0f; + sdef_r1[i] = 0.0f; + } + } + + int bone_index1; + int bone_index2; + float bone_weight; + float sdef_c[3]; + float sdef_r0[3]; + float sdef_r1[3]; + void Read(std::istream *stresam, PmxSetting *setting); + }; + + class PmxVertexSkinningQDEF : public PmxVertexSkinning + { + public: + PmxVertexSkinningQDEF() + : bone_index1(0) + , bone_index2(0) + , bone_index3(0) + , bone_index4(0) + , bone_weight1(0.0f) + , bone_weight2(0.0f) + , bone_weight3(0.0f) + , bone_weight4(0.0f) + {} + + int bone_index1; + int bone_index2; + int bone_index3; + int bone_index4; + float bone_weight1; + float bone_weight2; + float bone_weight3; + float bone_weight4; + void Read(std::istream *stresam, PmxSetting *setting); + }; + + /// 頂点 + class PmxVertex + { + public: + PmxVertex() + : edge(0.0f) + { + uv[0] = uv[1] = 0.0f; + for (int i = 0; i < 3; ++i) { + position[i] = 0.0f; + normal[i] = 0.0f; + } + for (int i = 0; i < 4; ++i) { + for (int k = 0; k < 4; ++k) { + uva[i][k] = 0.0f; + } + } + } + + /// 位置 + float position[3]; + /// 法線 + float normal[3]; + /// テクスチャ座標 + float uv[2]; + /// 追加テクスチャ座標 + float uva[4][4]; + /// スキニングタイプ + PmxVertexSkinningType skinning_type; + /// スキニング + std::unique_ptr skinning; + /// エッジ倍率 + float edge; + void Read(std::istream *stream, PmxSetting *setting); + }; + + /// マテリアル + class PmxMaterial + { + public: + PmxMaterial() + : specularlity(0.0f) + , flag(0) + , edge_size(0.0f) + , diffuse_texture_index(0) + , sphere_texture_index(0) + , sphere_op_mode(0) + , common_toon_flag(0) + , toon_texture_index(0) + , index_count(0) + { + for (int i = 0; i < 3; ++i) { + specular[i] = 0.0f; + ambient[i] = 0.0f; + edge_color[i] = 0.0f; + } + for (int i = 0; i < 4; ++i) { + diffuse[i] = 0.0f; + } + } + + /// モデル名 + std::string material_name; + /// モデル英名 + std::string material_english_name; + /// 減衰色 + float diffuse[4]; + /// 光沢色 + float specular[3]; + /// 光沢度 + float specularlity; + /// 環境色 + float ambient[3]; + /// 描画フラグ + uint8_t flag; + /// エッジ色 + float edge_color[4]; + /// エッジサイズ + float edge_size; + /// アルベドテクスチャインデックス + int diffuse_texture_index; + /// スフィアテクスチャインデックス + int sphere_texture_index; + /// スフィアテクスチャ演算モード + uint8_t sphere_op_mode; + /// 共有トゥーンフラグ + uint8_t common_toon_flag; + /// トゥーンテクスチャインデックス + int toon_texture_index; + /// メモ + std::string memo; + /// 頂点インデックス数 + int index_count; + void Read(std::istream *stream, PmxSetting *setting); + }; + + /// リンク + class PmxIkLink + { + public: + PmxIkLink() + : link_target(0) + , angle_lock(0) + { + for (int i = 0; i < 3; ++i) { + max_radian[i] = 0.0f; + min_radian[i] = 0.0f; + } + } + + /// リンクボーンインデックス + int link_target; + /// 角度制限 + uint8_t angle_lock; + /// 最大制限角度 + float max_radian[3]; + /// 最小制限角度 + float min_radian[3]; + void Read(std::istream *stream, PmxSetting *settingn); + }; + + /// ボーン + class PmxBone + { + public: + PmxBone() + : parent_index(0) + , level(0) + , bone_flag(0) + , target_index(0) + , grant_parent_index(0) + , grant_weight(0.0f) + , key(0) + , ik_target_bone_index(0) + , ik_loop(0) + , ik_loop_angle_limit(0.0f) + , ik_link_count(0) + { + for (int i = 0; i < 3; ++i) { + position[i] = 0.0f; + offset[i] = 0.0f; + lock_axis_orientation[i] = 0.0f; + local_axis_x_orientation[i] = 0.0f; + local_axis_y_orientation[i] = 0.0f; + } + } + + /// ボーン名 + std::string bone_name; + /// ボーン英名 + std::string bone_english_name; + /// 位置 + float position[3]; + /// 親ボーンインデックス + int parent_index; + /// 階層 + int level; + /// ボーンフラグ + uint16_t bone_flag; + /// 座標オフセット(has Target) + float offset[3]; + /// 接続先ボーンインデックス(not has Target) + int target_index; + /// 付与親ボーンインデックス + int grant_parent_index; + /// 付与率 + float grant_weight; + /// 固定軸の方向 + float lock_axis_orientation[3]; + /// ローカル軸のX軸方向 + float local_axis_x_orientation[3]; + /// ローカル軸のY軸方向 + float local_axis_y_orientation[3]; + /// 外部親変形のkey値 + int key; + /// IKターゲットボーン + int ik_target_bone_index; + /// IKループ回数 + int ik_loop; + /// IKループ計算時の角度制限(ラジアン) + float ik_loop_angle_limit; + /// IKリンク数 + int ik_link_count; + /// IKリンク + std::unique_ptr ik_links; + void Read(std::istream *stream, PmxSetting *setting); + }; + + enum class MorphType : uint8_t + { + Group = 0, + Vertex = 1, + Bone = 2, + UV = 3, + AdditionalUV1 = 4, + AdditionalUV2 = 5, + AdditionalUV3 = 6, + AdditionalUV4 = 7, + Matrial = 8, + Flip = 9, + Implus = 10, + }; + + enum class MorphCategory : uint8_t + { + ReservedCategory = 0, + Eyebrow = 1, + Eye = 2, + Mouth = 3, + Other = 4, + }; + + class PmxMorphOffset + { + public: + void virtual Read(std::istream *stream, PmxSetting *setting) = 0; + }; + + class PmxMorphVertexOffset : public PmxMorphOffset + { + public: + PmxMorphVertexOffset() + : vertex_index(0) + { + for (int i = 0; i < 3; ++i) { + position_offset[i] = 0.0f; + } + } + int vertex_index; + float position_offset[3]; + void Read(std::istream *stream, PmxSetting *setting); //override; + }; + + class PmxMorphUVOffset : public PmxMorphOffset + { + public: + PmxMorphUVOffset() + : vertex_index(0) + { + for (int i = 0; i < 4; ++i) { + uv_offset[i] = 0.0f; + } + } + int vertex_index; + float uv_offset[4]; + void Read(std::istream *stream, PmxSetting *setting); //override; + }; + + class PmxMorphBoneOffset : public PmxMorphOffset + { + public: + PmxMorphBoneOffset() + : bone_index(0) + { + for (int i = 0; i < 3; ++i) { + translation[i] = 0.0f; + } + for (int i = 0; i < 4; ++i) { + rotation[i] = 0.0f; + } + } + int bone_index; + float translation[3]; + float rotation[4]; + void Read(std::istream *stream, PmxSetting *setting); //override; + }; + + class PmxMorphMaterialOffset : public PmxMorphOffset + { + public: + PmxMorphMaterialOffset() + : specularity(0.0f) + , edge_size(0.0f) + { + for (int i = 0; i < 3; ++i) { + specular[i] = 0.0f; + ambient[i] = 0.0f; + } + for (int i = 0; i < 4; ++i) { + diffuse[i] = 0.0f; + edge_color[i] = 0.0f; + texture_argb[i] = 0.0f; + sphere_texture_argb[i] = 0.0f; + toon_texture_argb[i] = 0.0f; + } + } + int material_index; + uint8_t offset_operation; + float diffuse[4]; + float specular[3]; + float specularity; + float ambient[3]; + float edge_color[4]; + float edge_size; + float texture_argb[4]; + float sphere_texture_argb[4]; + float toon_texture_argb[4]; + void Read(std::istream *stream, PmxSetting *setting); //override; + }; + + class PmxMorphGroupOffset : public PmxMorphOffset + { + public: + PmxMorphGroupOffset() + : morph_index(0) + , morph_weight(0.0f) + {} + int morph_index; + float morph_weight; + void Read(std::istream *stream, PmxSetting *setting); //override; + }; + + class PmxMorphFlipOffset : public PmxMorphOffset + { + public: + PmxMorphFlipOffset() + : morph_index(0) + , morph_value(0.0f) + {} + int morph_index; + float morph_value; + void Read(std::istream *stream, PmxSetting *setting); //override; + }; + + class PmxMorphImplusOffset : public PmxMorphOffset + { + public: + PmxMorphImplusOffset() + : rigid_body_index(0) + , is_local(0) + { + for (int i = 0; i < 3; ++i) { + velocity[i] = 0.0f; + angular_torque[i] = 0.0f; + } + } + int rigid_body_index; + uint8_t is_local; + float velocity[3]; + float angular_torque[3]; + void Read(std::istream *stream, PmxSetting *setting); //override; + }; + + /// モーフ + class PmxMorph + { + public: + PmxMorph() + : offset_count(0) + { + } + /// モーフ名 + std::string morph_name; + /// モーフ英名 + std::string morph_english_name; + /// カテゴリ + MorphCategory category; + /// モーフタイプ + MorphType morph_type; + /// オフセット数 + int offset_count; + /// 頂点モーフ配列 + std::unique_ptr vertex_offsets; + /// UVモーフ配列 + std::unique_ptr uv_offsets; + /// ボーンモーフ配列 + std::unique_ptr bone_offsets; + /// マテリアルモーフ配列 + std::unique_ptr material_offsets; + /// グループモーフ配列 + std::unique_ptr group_offsets; + /// フリップモーフ配列 + std::unique_ptr flip_offsets; + /// インパルスモーフ配列 + std::unique_ptr implus_offsets; + void Read(std::istream *stream, PmxSetting *setting); + }; + + /// 枠内要素 + class PmxFrameElement + { + public: + PmxFrameElement() + : element_target(0) + , index(0) + { + } + /// 要素対象 + uint8_t element_target; + /// 要素対象インデックス + int index; + void Read(std::istream *stream, PmxSetting *setting); + }; + + /// 表示枠 + class PmxFrame + { + public: + PmxFrame() + : frame_flag(0) + , element_count(0) + { + } + /// 枠名 + std::string frame_name; + /// 枠英名 + std::string frame_english_name; + /// 特殊枠フラグ + uint8_t frame_flag; + /// 枠内要素数 + int element_count; + /// 枠内要素配列 + std::unique_ptr elements; + void Read(std::istream *stream, PmxSetting *setting); + }; + + class PmxRigidBody + { + public: + PmxRigidBody() + : target_bone(0) + , group(0) + , mask(0) + , shape(0) + , mass(0.0f) + , move_attenuation(0.0f) + , rotation_attenuation(0.0f) + , repulsion(0.0f) + , friction(0.0f) + , physics_calc_type(0) + { + for (int i = 0; i < 3; ++i) { + size[i] = 0.0f; + position[i] = 0.0f; + orientation[i] = 0.0f; + } + } + /// 剛体名 + std::string girid_body_name; + /// 剛体英名 + std::string girid_body_english_name; + /// 関連ボーンインデックス + int target_bone; + /// グループ + uint8_t group; + /// マスク + uint16_t mask; + /// 形状 + uint8_t shape; + float size[3]; + float position[3]; + float orientation[3]; + float mass; + float move_attenuation; + float rotation_attenuation; + float repulsion; + float friction; + uint8_t physics_calc_type; + void Read(std::istream *stream, PmxSetting *setting); + }; + + enum class PmxJointType : uint8_t + { + Generic6DofSpring = 0, + Generic6Dof = 1, + Point2Point = 2, + ConeTwist = 3, + Slider = 5, + Hinge = 6 + }; + + class PmxJointParam + { + public: + PmxJointParam() + : rigid_body1(0) + , rigid_body2(0) + { + for (int i = 0; i < 3; ++i) { + position[i] = 0.0f; + orientaiton[i] = 0.0f; + move_limitation_min[i] = 0.0f; + move_limitation_max[i] = 0.0f; + rotation_limitation_min[i] = 0.0f; + rotation_limitation_max[i] = 0.0f; + spring_move_coefficient[i] = 0.0f; + spring_rotation_coefficient[i] = 0.0f; + } + } + int rigid_body1; + int rigid_body2; + float position[3]; + float orientaiton[3]; + float move_limitation_min[3]; + float move_limitation_max[3]; + float rotation_limitation_min[3]; + float rotation_limitation_max[3]; + float spring_move_coefficient[3]; + float spring_rotation_coefficient[3]; + void Read(std::istream *stream, PmxSetting *setting); + }; + + class PmxJoint + { + public: + std::string joint_name; + std::string joint_english_name; + PmxJointType joint_type; + PmxJointParam param; + void Read(std::istream *stream, PmxSetting *setting); + }; + + enum PmxSoftBodyFlag : uint8_t + { + BLink = 0x01, + Cluster = 0x02, + Link = 0x04 + }; + + class PmxAncherRigidBody + { + public: + PmxAncherRigidBody() + : related_rigid_body(0) + , related_vertex(0) + , is_near(false) + {} + int related_rigid_body; + int related_vertex; + bool is_near; + void Read(std::istream *stream, PmxSetting *setting); + }; + + class PmxSoftBody + { + public: + PmxSoftBody() + : shape(0) + , target_material(0) + , group(0) + , mask(0) + , blink_distance(0) + , cluster_count(0) + , mass(0.0) + , collisioni_margin(0.0) + , aero_model(0) + , VCF(0.0f) + , DP(0.0f) + , DG(0.0f) + , LF(0.0f) + , PR(0.0f) + , VC(0.0f) + , DF(0.0f) + , MT(0.0f) + , CHR(0.0f) + , KHR(0.0f) + , SHR(0.0f) + , AHR(0.0f) + , SRHR_CL(0.0f) + , SKHR_CL(0.0f) + , SSHR_CL(0.0f) + , SR_SPLT_CL(0.0f) + , SK_SPLT_CL(0.0f) + , SS_SPLT_CL(0.0f) + , V_IT(0) + , P_IT(0) + , D_IT(0) + , C_IT(0) + , LST(0.0f) + , AST(0.0f) + , VST(0.0f) + , anchor_count(0) + , pin_vertex_count(0) + {} + std::string soft_body_name; + std::string soft_body_english_name; + uint8_t shape; + int target_material; + uint8_t group; + uint16_t mask; + PmxSoftBodyFlag flag; + int blink_distance; + int cluster_count; + float mass; + float collisioni_margin; + int aero_model; + float VCF; + float DP; + float DG; + float LF; + float PR; + float VC; + float DF; + float MT; + float CHR; + float KHR; + float SHR; + float AHR; + float SRHR_CL; + float SKHR_CL; + float SSHR_CL; + float SR_SPLT_CL; + float SK_SPLT_CL; + float SS_SPLT_CL; + int V_IT; + int P_IT; + int D_IT; + int C_IT; + float LST; + float AST; + float VST; + int anchor_count; + std::unique_ptr anchers; + int pin_vertex_count; + std::unique_ptr pin_vertices; + void Read(std::istream *stream, PmxSetting *setting); + }; + + /// PMXモデル + class PmxModel + { + public: + PmxModel() + : version(0.0f) + , vertex_count(0) + , index_count(0) + , texture_count(0) + , material_count(0) + , bone_count(0) + , morph_count(0) + , frame_count(0) + , rigid_body_count(0) + , joint_count(0) + , soft_body_count(0) + {} + + /// バージョン + float version; + /// 設定 + PmxSetting setting; + /// モデル名 + std::string model_name; + /// モデル英名 + std::string model_english_name; + /// コメント + std::string model_comment; + /// 英語コメント + std::string model_english_comment; + /// 頂点数 + int vertex_count; + /// 頂点配列 + std::unique_ptr vertices; + /// インデックス数 + int index_count; + /// インデックス配列 + std::unique_ptr indices; + /// テクスチャ数 + int texture_count; + /// テクスチャ配列 + std::unique_ptr< std::string []> textures; + /// マテリアル数 + int material_count; + /// マテリアル + std::unique_ptr materials; + /// ボーン数 + int bone_count; + /// ボーン配列 + std::unique_ptr bones; + /// モーフ数 + int morph_count; + /// モーフ配列 + std::unique_ptr morphs; + /// 表示枠数 + int frame_count; + /// 表示枠配列 + std::unique_ptr frames; + /// 剛体数 + int rigid_body_count; + /// 剛体配列 + std::unique_ptr rigid_bodies; + /// ジョイント数 + int joint_count; + /// ジョイント配列 + std::unique_ptr joints; + /// ソフトボディ数 + int soft_body_count; + /// ソフトボディ配列 + std::unique_ptr soft_bodies; + /// モデル初期化 + void Init(); + /// モデル読み込み + void Read(std::istream *stream); + ///// ファイルからモデルの読み込み + //static std::unique_ptr ReadFromFile(const char *filename); + ///// 入力ストリームからモデルの読み込み + //static std::unique_ptr ReadFromStream(std::istream *stream); + }; +} diff --git a/code/MMDVmdParser.h b/code/MMDVmdParser.h new file mode 100644 index 000000000..380a10c5d --- /dev/null +++ b/code/MMDVmdParser.h @@ -0,0 +1,367 @@ +#pragma once + +#include +#include +#include +#include +#include +#include +#include "MMDCpp14.h" + +namespace vmd +{ + /// ボーンフレーム + class VmdBoneFrame + { + public: + /// ボーン名 + std::string name; + /// フレーム番号 + int frame; + /// 位置 + float position[3]; + /// 回転 + float orientation[4]; + /// 補間曲線 + char interpolation[4][4][4]; + + void Read(std::istream* stream) + { + char buffer[15]; + stream->read((char*) buffer, sizeof(char)*15); + name = std::string(buffer); + stream->read((char*) &frame, sizeof(int)); + stream->read((char*) position, sizeof(float)*3); + stream->read((char*) orientation, sizeof(float)*4); + stream->read((char*) interpolation, sizeof(char) * 4 * 4 * 4); + } + + void Write(std::ostream* stream) + { + stream->write((char*)name.c_str(), sizeof(char) * 15); + stream->write((char*)&frame, sizeof(int)); + stream->write((char*)position, sizeof(float) * 3); + stream->write((char*)orientation, sizeof(float) * 4); + stream->write((char*)interpolation, sizeof(char) * 4 * 4 * 4); + } + }; + + /// 表情フレーム + class VmdFaceFrame + { + public: + /// 表情名 + std::string face_name; + /// 表情の重み + float weight; + /// フレーム番号 + uint32_t frame; + + void Read(std::istream* stream) + { + char buffer[15]; + stream->read((char*) &buffer, sizeof(char) * 15); + face_name = std::string(buffer); + stream->read((char*) &frame, sizeof(int)); + stream->read((char*) &weight, sizeof(float)); + } + + void Write(std::ostream* stream) + { + stream->write((char*)face_name.c_str(), sizeof(char) * 15); + stream->write((char*)&frame, sizeof(int)); + stream->write((char*)&weight, sizeof(float)); + } + }; + + /// カメラフレーム + class VmdCameraFrame + { + public: + /// フレーム番号 + int frame; + /// 距離 + float distance; + /// 位置 + float position[3]; + /// 回転 + float orientation[3]; + /// 補間曲線 + char interpolation[6][4]; + /// 視野角 + float angle; + /// 不明データ + char unknown[3]; + + void Read(std::istream *stream) + { + stream->read((char*) &frame, sizeof(int)); + stream->read((char*) &distance, sizeof(float)); + stream->read((char*) position, sizeof(float) * 3); + stream->read((char*) orientation, sizeof(float) * 3); + stream->read((char*) interpolation, sizeof(char) * 24); + stream->read((char*) &angle, sizeof(float)); + stream->read((char*) unknown, sizeof(char) * 3); + } + + void Write(std::ostream *stream) + { + stream->write((char*)&frame, sizeof(int)); + stream->write((char*)&distance, sizeof(float)); + stream->write((char*)position, sizeof(float) * 3); + stream->write((char*)orientation, sizeof(float) * 3); + stream->write((char*)interpolation, sizeof(char) * 24); + stream->write((char*)&angle, sizeof(float)); + stream->write((char*)unknown, sizeof(char) * 3); + } + }; + + /// ライトフレーム + class VmdLightFrame + { + public: + /// フレーム番号 + int frame; + /// 色 + float color[3]; + /// 位置 + float position[3]; + + void Read(std::istream* stream) + { + stream->read((char*) &frame, sizeof(int)); + stream->read((char*) color, sizeof(float) * 3); + stream->read((char*) position, sizeof(float) * 3); + } + + void Write(std::ostream* stream) + { + stream->write((char*)&frame, sizeof(int)); + stream->write((char*)color, sizeof(float) * 3); + stream->write((char*)position, sizeof(float) * 3); + } + }; + + /// IKの有効無効 + class VmdIkEnable + { + public: + std::string ik_name; + bool enable; + }; + + /// IKフレーム + class VmdIkFrame + { + public: + int frame; + bool display; + std::vector ik_enable; + + void Read(std::istream *stream) + { + char buffer[20]; + stream->read((char*) &frame, sizeof(int)); + stream->read((char*) &display, sizeof(uint8_t)); + int ik_count; + stream->read((char*) &ik_count, sizeof(int)); + ik_enable.resize(ik_count); + for (int i = 0; i < ik_count; i++) + { + stream->read(buffer, 20); + ik_enable[i].ik_name = std::string(buffer); + stream->read((char*) &ik_enable[i].enable, sizeof(uint8_t)); + } + } + + void Write(std::ostream *stream) + { + stream->write((char*)&frame, sizeof(int)); + stream->write((char*)&display, sizeof(uint8_t)); + int ik_count = static_cast(ik_enable.size()); + stream->write((char*)&ik_count, sizeof(int)); + for (int i = 0; i < ik_count; i++) + { + const VmdIkEnable& ik_enable = this->ik_enable.at(i); + stream->write(ik_enable.ik_name.c_str(), 20); + stream->write((char*)&ik_enable.enable, sizeof(uint8_t)); + } + } + }; + + /// VMDモーション + class VmdMotion + { + public: + /// モデル名 + std::string model_name; + /// バージョン + int version; + /// ボーンフレーム + std::vector bone_frames; + /// 表情フレーム + std::vector face_frames; + /// カメラフレーム + std::vector camera_frames; + /// ライトフレーム + std::vector light_frames; + /// IKフレーム + std::vector ik_frames; + + static std::unique_ptr LoadFromFile(char const *filename) + { + std::ifstream stream(filename, std::ios::binary); + auto result = LoadFromStream(&stream); + stream.close(); + return result; + } + + static std::unique_ptr LoadFromStream(std::ifstream *stream) + { + + char buffer[30]; + auto result = mmd::make_unique(); + + // magic and version + stream->read((char*) buffer, 30); + if (strncmp(buffer, "Vocaloid Motion Data", 20)) + { + std::cerr << "invalid vmd file." << std::endl; + return nullptr; + } + result->version = std::atoi(buffer + 20); + + // name + stream->read(buffer, 20); + result->model_name = std::string(buffer); + + // bone frames + int bone_frame_num; + stream->read((char*) &bone_frame_num, sizeof(int)); + result->bone_frames.resize(bone_frame_num); + for (int i = 0; i < bone_frame_num; i++) + { + result->bone_frames[i].Read(stream); + } + + // face frames + int face_frame_num; + stream->read((char*) &face_frame_num, sizeof(int)); + result->face_frames.resize(face_frame_num); + for (int i = 0; i < face_frame_num; i++) + { + result->face_frames[i].Read(stream); + } + + // camera frames + int camera_frame_num; + stream->read((char*) &camera_frame_num, sizeof(int)); + result->camera_frames.resize(camera_frame_num); + for (int i = 0; i < camera_frame_num; i++) + { + result->camera_frames[i].Read(stream); + } + + // light frames + int light_frame_num; + stream->read((char*) &light_frame_num, sizeof(int)); + result->light_frames.resize(light_frame_num); + for (int i = 0; i < light_frame_num; i++) + { + result->light_frames[i].Read(stream); + } + + // unknown2 + stream->read(buffer, 4); + + // ik frames + if (stream->peek() != std::ios::traits_type::eof()) + { + int ik_num; + stream->read((char*) &ik_num, sizeof(int)); + result->ik_frames.resize(ik_num); + for (int i = 0; i < ik_num; i++) + { + result->ik_frames[i].Read(stream); + } + } + + if (stream->peek() != std::ios::traits_type::eof()) + { + std::cerr << "vmd stream has unknown data." << std::endl; + } + + return result; + } + + bool SaveToFile(const std::u16string& filename) + { + // TODO: How to adapt u16string to string? + /* + std::ofstream stream(filename.c_str(), std::ios::binary); + auto result = SaveToStream(&stream); + stream.close(); + return result; + */ + return false; + } + + bool SaveToStream(std::ofstream *stream) + { + std::string magic = "Vocaloid Motion Data 0002\0"; + magic.resize(30); + + // magic and version + stream->write(magic.c_str(), 30); + + // name + stream->write(model_name.c_str(), 20); + + // bone frames + const int bone_frame_num = static_cast(bone_frames.size()); + stream->write(reinterpret_cast(&bone_frame_num), sizeof(int)); + for (int i = 0; i < bone_frame_num; i++) + { + bone_frames[i].Write(stream); + } + + // face frames + const int face_frame_num = static_cast(face_frames.size()); + stream->write(reinterpret_cast(&face_frame_num), sizeof(int)); + for (int i = 0; i < face_frame_num; i++) + { + face_frames[i].Write(stream); + } + + // camera frames + const int camera_frame_num = static_cast(camera_frames.size()); + stream->write(reinterpret_cast(&camera_frame_num), sizeof(int)); + for (int i = 0; i < camera_frame_num; i++) + { + camera_frames[i].Write(stream); + } + + // light frames + const int light_frame_num = static_cast(light_frames.size()); + stream->write(reinterpret_cast(&light_frame_num), sizeof(int)); + for (int i = 0; i < light_frame_num; i++) + { + light_frames[i].Write(stream); + } + + // self shadow datas + const int self_shadow_num = 0; + stream->write(reinterpret_cast(&self_shadow_num), sizeof(int)); + + // ik frames + const int ik_num = static_cast(ik_frames.size()); + stream->write(reinterpret_cast(&ik_num), sizeof(int)); + for (int i = 0; i < ik_num; i++) + { + ik_frames[i].Write(stream); + } + + return true; + } + }; +} diff --git a/code/MS3DLoader.cpp b/code/MS3DLoader.cpp index c50ccc46e..64ec1e076 100644 --- a/code/MS3DLoader.cpp +++ b/code/MS3DLoader.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. @@ -53,7 +54,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include #include - +#include +#include using namespace Assimp; diff --git a/code/MS3DLoader.h b/code/MS3DLoader.h index 22d12e3cf..b4b19b3ad 100644 --- a/code/MS3DLoader.h +++ b/code/MS3DLoader.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/MakeVerboseFormat.cpp b/code/MakeVerboseFormat.cpp index be68bf3d6..ee82caafe 100644 --- a/code/MakeVerboseFormat.cpp +++ b/code/MakeVerboseFormat.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/code/MakeVerboseFormat.h b/code/MakeVerboseFormat.h index 1b32cf19e..9832a3f65 100644 --- a/code/MakeVerboseFormat.h +++ b/code/MakeVerboseFormat.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/MaterialSystem.cpp b/code/MaterialSystem.cpp index 5fcf28a4f..be73ff897 100644 --- a/code/MaterialSystem.cpp +++ b/code/MaterialSystem.cpp @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/MaterialSystem.h b/code/MaterialSystem.h index 6726e0518..b083a5bb8 100644 --- a/code/MaterialSystem.h +++ b/code/MaterialSystem.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/MemoryIOWrapper.h b/code/MemoryIOWrapper.h index d6aaafae0..9bd245337 100644 --- a/code/MemoryIOWrapper.h +++ b/code/MemoryIOWrapper.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/NDOLoader.cpp b/code/NDOLoader.cpp index cf3d6edf6..2586bac3e 100644 --- a/code/NDOLoader.cpp +++ b/code/NDOLoader.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. @@ -49,7 +50,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include #include +#include #include "StreamReader.h" +#include using namespace Assimp; diff --git a/code/NFFLoader.cpp b/code/NFFLoader.cpp index 8cc1624d5..fa005ede4 100644 --- a/code/NFFLoader.cpp +++ b/code/NFFLoader.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. @@ -54,6 +55,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include #include +#include #include diff --git a/code/NFFLoader.h b/code/NFFLoader.h index 2b5232645..0640d4405 100644 --- a/code/NFFLoader.h +++ b/code/NFFLoader.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/OFFLoader.cpp b/code/OFFLoader.cpp index cb2226bf6..2723beb0e 100644 --- a/code/OFFLoader.cpp +++ b/code/OFFLoader.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. @@ -54,7 +55,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include #include - +#include using namespace Assimp; diff --git a/code/OFFLoader.h b/code/OFFLoader.h index f01dc6244..29a4927bd 100644 --- a/code/OFFLoader.h +++ b/code/OFFLoader.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/ObjExporter.cpp b/code/ObjExporter.cpp index d10dfcd45..14035c262 100644 --- a/code/ObjExporter.cpp +++ b/code/ObjExporter.cpp @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, @@ -86,11 +87,16 @@ static const std::string MaterialExt = ".mtl"; ObjExporter::ObjExporter(const char* _filename, const aiScene* pScene) : filename(_filename) , pScene(pScene) -, endl("\n") , vp() , vn() , vt() -, vc() { +, vc() +, vpMap() +, vnMap() +, vtMap() +, vcMap() +, meshes() +, endl("\n") { // make sure that all formatting happens using the standard, C locale and not the user's current locale const std::locale& l = std::locale("C"); mOutput.imbue(l); @@ -121,14 +127,17 @@ std::string ObjExporter :: GetMaterialLibName() } // ------------------------------------------------------------------------------------------------ -std::string ObjExporter :: GetMaterialLibFileName() -{ +std::string ObjExporter::GetMaterialLibFileName() { + // Remove existing .obj file extention so that the final material file name will be fileName.mtl and not fileName.obj.mtl + size_t lastdot = filename.find_last_of('.'); + if (lastdot != std::string::npos) + return filename.substr(0, lastdot) + MaterialExt; + return filename + MaterialExt; } // ------------------------------------------------------------------------------------------------ -void ObjExporter :: WriteHeader(std::ostringstream& out) -{ +void ObjExporter :: WriteHeader(std::ostringstream& out) { out << "# File produced by Open Asset Import Library (http://www.assimp.sf.net)" << endl; out << "# (assimp v" << aiGetVersionMajor() << '.' << aiGetVersionMinor() << '.' << aiGetVersionRevision() << ")" << endl << endl; } diff --git a/code/ObjExporter.h b/code/ObjExporter.h index 8e92a7db5..0ba042b0b 100644 --- a/code/ObjExporter.h +++ b/code/ObjExporter.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, @@ -97,16 +98,13 @@ private: void WriteHeader(std::ostringstream& out); void WriteMaterialFile(); void WriteGeometryFile(); - std::string GetMaterialName(unsigned int index); - void AddMesh(const aiString& name, const aiMesh* m, const aiMatrix4x4& mat); void AddNode(const aiNode* nd, const aiMatrix4x4& mParent); private: - const std::string filename; + std::string filename; const aiScene* const pScene; - std::vector vp, vn, vt; std::vector vc; diff --git a/code/ObjFileData.h b/code/ObjFileData.h index 1c6f80ce1..2658f8a2a 100644 --- a/code/ObjFileData.h +++ b/code/ObjFileData.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/ObjFileImporter.cpp b/code/ObjFileImporter.cpp index 9a5a56c5e..9f3bdef97 100644 --- a/code/ObjFileImporter.cpp +++ b/code/ObjFileImporter.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. @@ -41,16 +42,17 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #ifndef ASSIMP_BUILD_NO_OBJ_IMPORTER -#include "DefaultIOSystem.h" #include "ObjFileImporter.h" #include "ObjFileParser.h" #include "ObjFileData.h" #include "IOStreamBuffer.h" #include +#include #include #include #include #include +#include static const aiImporterDesc desc = { "Wavefront Object Importer", @@ -613,9 +615,12 @@ void ObjFileImporter::createMaterials(const ObjFile::Model* pModel, aiScene* pSc mat->AddProperty( &pCurrentMaterial->ior, 1, AI_MATKEY_REFRACTI ); // Adding textures + const int uvwIndex = 0; + if ( 0 != pCurrentMaterial->texture.length ) { mat->AddProperty( &pCurrentMaterial->texture, AI_MATKEY_TEXTURE_DIFFUSE(0)); + mat->AddProperty( &uvwIndex, 1, AI_MATKEY_UVWSRC_DIFFUSE(0) ); if (pCurrentMaterial->clamp[ObjFile::Material::TextureDiffuseType]) { addTextureMappingModeProperty(mat, aiTextureType_DIFFUSE); @@ -625,6 +630,7 @@ void ObjFileImporter::createMaterials(const ObjFile::Model* pModel, aiScene* pSc if ( 0 != pCurrentMaterial->textureAmbient.length ) { mat->AddProperty( &pCurrentMaterial->textureAmbient, AI_MATKEY_TEXTURE_AMBIENT(0)); + mat->AddProperty( &uvwIndex, 1, AI_MATKEY_UVWSRC_AMBIENT(0) ); if (pCurrentMaterial->clamp[ObjFile::Material::TextureAmbientType]) { addTextureMappingModeProperty(mat, aiTextureType_AMBIENT); @@ -632,11 +638,15 @@ void ObjFileImporter::createMaterials(const ObjFile::Model* pModel, aiScene* pSc } if ( 0 != pCurrentMaterial->textureEmissive.length ) + { mat->AddProperty( &pCurrentMaterial->textureEmissive, AI_MATKEY_TEXTURE_EMISSIVE(0)); + mat->AddProperty( &uvwIndex, 1, AI_MATKEY_UVWSRC_EMISSIVE(0) ); + } if ( 0 != pCurrentMaterial->textureSpecular.length ) { mat->AddProperty( &pCurrentMaterial->textureSpecular, AI_MATKEY_TEXTURE_SPECULAR(0)); + mat->AddProperty( &uvwIndex, 1, AI_MATKEY_UVWSRC_SPECULAR(0) ); if (pCurrentMaterial->clamp[ObjFile::Material::TextureSpecularType]) { addTextureMappingModeProperty(mat, aiTextureType_SPECULAR); @@ -646,6 +656,7 @@ void ObjFileImporter::createMaterials(const ObjFile::Model* pModel, aiScene* pSc if ( 0 != pCurrentMaterial->textureBump.length ) { mat->AddProperty( &pCurrentMaterial->textureBump, AI_MATKEY_TEXTURE_HEIGHT(0)); + mat->AddProperty( &uvwIndex, 1, AI_MATKEY_UVWSRC_HEIGHT(0) ); if (pCurrentMaterial->clamp[ObjFile::Material::TextureBumpType]) { addTextureMappingModeProperty(mat, aiTextureType_HEIGHT); @@ -655,6 +666,7 @@ void ObjFileImporter::createMaterials(const ObjFile::Model* pModel, aiScene* pSc if ( 0 != pCurrentMaterial->textureNormal.length ) { mat->AddProperty( &pCurrentMaterial->textureNormal, AI_MATKEY_TEXTURE_NORMALS(0)); + mat->AddProperty( &uvwIndex, 1, AI_MATKEY_UVWSRC_NORMALS(0) ); if (pCurrentMaterial->clamp[ObjFile::Material::TextureNormalType]) { addTextureMappingModeProperty(mat, aiTextureType_NORMALS); @@ -671,6 +683,7 @@ void ObjFileImporter::createMaterials(const ObjFile::Model* pModel, aiScene* pSc for( unsigned i = 0; i < count; i++ ) { mat->AddProperty(&pCurrentMaterial->textureReflection[i], AI_MATKEY_TEXTURE_REFLECTION(i)); + mat->AddProperty( &uvwIndex, 1, AI_MATKEY_UVWSRC_REFLECTION(i) ); if(pCurrentMaterial->clamp[type]) addTextureMappingModeProperty(mat, aiTextureType_REFLECTION, 1, i); @@ -680,6 +693,7 @@ void ObjFileImporter::createMaterials(const ObjFile::Model* pModel, aiScene* pSc if ( 0 != pCurrentMaterial->textureDisp.length ) { mat->AddProperty( &pCurrentMaterial->textureDisp, AI_MATKEY_TEXTURE_DISPLACEMENT(0) ); + mat->AddProperty( &uvwIndex, 1, AI_MATKEY_UVWSRC_DISPLACEMENT(0) ); if (pCurrentMaterial->clamp[ObjFile::Material::TextureDispType]) { addTextureMappingModeProperty(mat, aiTextureType_DISPLACEMENT); @@ -689,6 +703,7 @@ void ObjFileImporter::createMaterials(const ObjFile::Model* pModel, aiScene* pSc if ( 0 != pCurrentMaterial->textureOpacity.length ) { mat->AddProperty( &pCurrentMaterial->textureOpacity, AI_MATKEY_TEXTURE_OPACITY(0)); + mat->AddProperty( &uvwIndex, 1, AI_MATKEY_UVWSRC_OPACITY(0) ); if (pCurrentMaterial->clamp[ObjFile::Material::TextureOpacityType]) { addTextureMappingModeProperty(mat, aiTextureType_OPACITY); @@ -698,6 +713,7 @@ void ObjFileImporter::createMaterials(const ObjFile::Model* pModel, aiScene* pSc if ( 0 != pCurrentMaterial->textureSpecularity.length ) { mat->AddProperty( &pCurrentMaterial->textureSpecularity, AI_MATKEY_TEXTURE_SHININESS(0)); + mat->AddProperty( &uvwIndex, 1, AI_MATKEY_UVWSRC_SHININESS(0) ); if (pCurrentMaterial->clamp[ObjFile::Material::TextureSpecularityType]) { addTextureMappingModeProperty(mat, aiTextureType_SHININESS); diff --git a/code/ObjFileImporter.h b/code/ObjFileImporter.h index bd3f42f27..302cf951a 100644 --- a/code/ObjFileImporter.h +++ b/code/ObjFileImporter.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/ObjFileMtlImporter.cpp b/code/ObjFileMtlImporter.cpp index 4759f10e2..69f35a67d 100644 --- a/code/ObjFileMtlImporter.cpp +++ b/code/ObjFileMtlImporter.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/code/ObjFileMtlImporter.h b/code/ObjFileMtlImporter.h index 54e4b7cef..c9bcc9a9f 100644 --- a/code/ObjFileMtlImporter.h +++ b/code/ObjFileMtlImporter.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, @@ -112,4 +113,4 @@ private: } // Namespace Assimp -#endif +#endif // OBJFILEMTLIMPORTER_H_INC diff --git a/code/ObjFileParser.cpp b/code/ObjFileParser.cpp index 6980f0dab..5f95bb96d 100644 --- a/code/ObjFileParser.cpp +++ b/code/ObjFileParser.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. @@ -45,8 +46,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "ObjTools.h" #include "ObjFileData.h" #include "ParsingUtils.h" -#include "DefaultIOSystem.h" #include "BaseImporter.h" +#include #include #include #include @@ -56,9 +57,18 @@ namespace Assimp { const std::string ObjFileParser::DEFAULT_MATERIAL = AI_DEFAULT_MATERIAL_NAME; -// ------------------------------------------------------------------- -// Constructor with loaded data and directories. -ObjFileParser::ObjFileParser( IOStreamBuffer &streamBuffer, const std::string &modelName, +ObjFileParser::ObjFileParser() +: m_DataIt() +, m_DataItEnd() +, m_pModel( NULL ) +, m_uiLine( 0 ) +, m_pIO( nullptr ) +, m_progress( nullptr ) +, m_originalObjFileName() { + // empty +} + +ObjFileParser::ObjFileParser( IOStreamBuffer &streamBuffer, const std::string &modelName, IOSystem *io, ProgressHandler* progress, const std::string &originalObjFileName) : m_DataIt(), @@ -85,21 +95,42 @@ ObjFileParser::ObjFileParser( IOStreamBuffer &streamBuffer, const std::str parseFile( streamBuffer ); } -// ------------------------------------------------------------------- -// Destructor ObjFileParser::~ObjFileParser() { delete m_pModel; m_pModel = NULL; } -// ------------------------------------------------------------------- -// Returns a pointer to the model instance. +void ObjFileParser::setBuffer( std::vector &buffer ) { + m_DataIt = buffer.begin(); + m_DataItEnd = buffer.end(); +} + ObjFile::Model *ObjFileParser::GetModel() const { return m_pModel; } -// ------------------------------------------------------------------- -// File parsing method. +/*void ignoreNewLines(IOStreamBuffer &streamBuffer, std::vector &buffer) +{ + auto curPosition = buffer.begin(); + do + { + while (*curPosition!='\n'&&*curPosition!='\\') + { + ++curPosition; + } + if (*curPosition=='\\') + { + std::vector tempBuf; + do + { + streamBuffer.getNextDataLine(tempBuf, '\\' ); + } while (tempBuf[0]=='\n'); + *curPosition = ' '; + std::copy(tempBuf.cbegin(), tempBuf.cend(), ++curPosition); + } + } while (*curPosition!='\n'); +}*/ + void ObjFileParser::parseFile( IOStreamBuffer &streamBuffer ) { // only update every 100KB or it'll be too slow //const unsigned int updateProgressEveryBytes = 100 * 1024; @@ -111,11 +142,11 @@ void ObjFileParser::parseFile( IOStreamBuffer &streamBuffer ) { size_t lastFilePos( 0 ); std::vector buffer; - while ( streamBuffer.getNextLine( buffer ) ) { + while ( streamBuffer.getNextDataLine( buffer, '\\' ) ) { m_DataIt = buffer.begin(); m_DataItEnd = buffer.end(); - // Handle progress reporting + // Handle progress reporting const size_t filePos( streamBuffer.getFilePos() ); if ( lastFilePos < filePos ) { processed += static_cast(filePos); @@ -130,7 +161,7 @@ void ObjFileParser::parseFile( IOStreamBuffer &streamBuffer ) { { ++m_DataIt; if (*m_DataIt == ' ' || *m_DataIt == '\t') { - size_t numComponents = getNumComponentsInLine(); + size_t numComponents = getNumComponentsInDataDefinition(); if (numComponents == 3) { // read in vertex definition getVector3(m_pModel->m_Vertices); @@ -214,7 +245,6 @@ void ObjFileParser::parseFile( IOStreamBuffer &streamBuffer ) { default: { pf_skip_line: - m_DataIt = skipLine( m_DataIt, m_DataItEnd, m_uiLine ); } break; @@ -222,11 +252,14 @@ pf_skip_line: } } -// ------------------------------------------------------------------- -// Copy the next word in a temporary buffer void ObjFileParser::copyNextWord(char *pBuffer, size_t length) { size_t index = 0; m_DataIt = getNextWord(m_DataIt, m_DataItEnd); + if ( *m_DataIt == '\\' ) { + m_DataIt++; + m_DataIt++; + m_DataIt = getNextWord( m_DataIt, m_DataItEnd ); + } while( m_DataIt != m_DataItEnd && !IsSpaceOrNewLine( *m_DataIt ) ) { pBuffer[index] = *m_DataIt; index++; @@ -240,21 +273,44 @@ void ObjFileParser::copyNextWord(char *pBuffer, size_t length) { pBuffer[index] = '\0'; } -size_t ObjFileParser::getNumComponentsInLine() { +static bool isDataDefinitionEnd( const char *tmp ) { + if ( *tmp == '\\' ) { + tmp++; + if ( IsLineEnd( *tmp ) ) { + tmp++; + return true; + } + } + return false; +} + +size_t ObjFileParser::getNumComponentsInDataDefinition() { size_t numComponents( 0 ); const char* tmp( &m_DataIt[0] ); - while( !IsLineEnd( *tmp ) ) { + bool end_of_definition = false; + while ( !end_of_definition ) { + if ( isDataDefinitionEnd( tmp ) ) { + tmp += 2; + } else if ( IsLineEnd( *tmp ) ) { + end_of_definition = true; + } if ( !SkipSpaces( &tmp ) ) { break; } + const bool isNum( IsNumeric( *tmp ) ); SkipToken( tmp ); - ++numComponents; + if ( isNum ) { + ++numComponents; + } + if ( !SkipSpaces( &tmp ) ) { + break; + } } return numComponents; } void ObjFileParser::getVector( std::vector &point3d_array ) { - size_t numComponents = getNumComponentsInLine(); + size_t numComponents = getNumComponentsInDataDefinition(); ai_real x, y, z; if( 2 == numComponents ) { copyNextWord( m_buffer, Buffersize ); @@ -279,8 +335,6 @@ void ObjFileParser::getVector( std::vector &point3d_array ) { m_DataIt = skipLine( m_DataIt, m_DataItEnd, m_uiLine ); } -// ------------------------------------------------------------------- -// Get values for a new 3D vector instance void ObjFileParser::getVector3( std::vector &point3d_array ) { ai_real x, y, z; copyNextWord(m_buffer, Buffersize); @@ -365,10 +419,6 @@ static const std::string DefaultObjName = "defaultobject"; // ------------------------------------------------------------------- // Get values for a new face instance void ObjFileParser::getFace( aiPrimitiveType type ) { - //copyNextLine(m_buffer, Buffersize); - //char *pPtr = m_DataIt; - //char *pPtr = m_buffer; - //char *pEnd = &pPtr[Buffersize]; m_DataIt = getNextToken( m_DataIt, m_DataItEnd ); if ( m_DataIt == m_DataItEnd || *m_DataIt == '\0' ) { return; @@ -539,14 +589,7 @@ void ObjFileParser::getMaterialDesc() { // ------------------------------------------------------------------- // Get a comment, values will be skipped void ObjFileParser::getComment() { - while (m_DataIt != m_DataItEnd) { - if ( '\n' == (*m_DataIt)) { - ++m_DataIt; - break; - } else { - ++m_DataIt; - } - } + m_DataIt = skipLine( m_DataIt, m_DataItEnd, m_uiLine ); } // ------------------------------------------------------------------- diff --git a/code/ObjFileParser.h b/code/ObjFileParser.h index 55be305bb..fa5b3ca31 100644 --- a/code/ObjFileParser.h +++ b/code/ObjFileParser.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, @@ -64,7 +65,7 @@ class ProgressHandler; /// \class ObjFileParser /// \brief Parser for a obj waveform file -class ObjFileParser { +class ASSIMP_API ObjFileParser { public: static const size_t Buffersize = 4096; typedef std::vector DataArray; @@ -72,20 +73,26 @@ public: typedef std::vector::const_iterator ConstDataArrayIt; public: - /// \brief Constructor with data array. - ObjFileParser( IOStreamBuffer &streamBuffer, const std::string &strModelName, IOSystem* io, ProgressHandler* progress, const std::string &originalObjFileName); - /// \brief Destructor + /// @brief The default constructor. + ObjFileParser(); + /// @brief Constructor with data array. + ObjFileParser( IOStreamBuffer &streamBuffer, const std::string &modelName, IOSystem* io, ProgressHandler* progress, const std::string &originalObjFileName); + /// @brief Destructor ~ObjFileParser(); - /// \brief Model getter. + /// @brief If you want to load in-core data. + void setBuffer( std::vector &buffer ); + /// @brief Model getter. ObjFile::Model *GetModel() const; -private: +protected: /// Parse the loaded file void parseFile( IOStreamBuffer &streamBuffer ); /// Method to copy the new delimited word in the current line. void copyNextWord(char *pBuffer, size_t length); /// Method to copy the new line. // void copyNextLine(char *pBuffer, size_t length); + /// Get the number of components in a line. + size_t getNumComponentsInDataDefinition(); /// Stores the vector void getVector( std::vector &point3d_array ); /// Stores the following 3d vector. @@ -124,8 +131,6 @@ private: bool needsNewMesh( const std::string &rMaterialName ); /// Error report in token void reportErrorTokenInFace(); - /// Get the number of components in a line. - size_t getNumComponentsInLine(); private: // Copy and assignment constructor should be private @@ -149,9 +154,8 @@ private: IOSystem *m_pIO; //! Pointer to progress handler ProgressHandler* m_progress; - /// Path to the current model - // name of the obj file where the buffer comes from - const std::string& m_originalObjFileName; + /// Path to the current model, name of the obj file where the buffer comes from + const std::string m_originalObjFileName; }; } // Namespace Assimp diff --git a/code/ObjTools.h b/code/ObjTools.h index 8dee62f18..7236cedc0 100644 --- a/code/ObjTools.h +++ b/code/ObjTools.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, @@ -78,8 +79,10 @@ inline Char_T getNextWord( Char_T pBuffer, Char_T pEnd ) { while ( !isEndOfBuffer( pBuffer, pEnd ) ) { - if( !IsSpaceOrNewLine( *pBuffer ) || IsLineEnd( *pBuffer ) ) - break; + if ( !IsSpaceOrNewLine( *pBuffer ) || IsLineEnd( *pBuffer ) ) { + //if ( *pBuffer != '\\' ) + break; + } pBuffer++; } return pBuffer; @@ -113,14 +116,16 @@ inline char_t skipLine( char_t it, char_t end, unsigned int &uiLine ) { while( !isEndOfBuffer( it, end ) && !IsLineEnd( *it ) ) { ++it; } - if ( it != end ) - { + + if ( it != end ) { ++it; ++uiLine; } // fix .. from time to time there are spaces at the beginning of a material line - while ( it != end && (*it == '\t' || *it == ' ') ) + while ( it != end && ( *it == '\t' || *it == ' ' ) ) { ++it; + } + return it; } diff --git a/code/OgreBinarySerializer.cpp b/code/OgreBinarySerializer.cpp index 59bd0d92d..95aec221f 100644 --- a/code/OgreBinarySerializer.cpp +++ b/code/OgreBinarySerializer.cpp @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/OgreBinarySerializer.h b/code/OgreBinarySerializer.h index 067e36a63..c48e33dd6 100644 --- a/code/OgreBinarySerializer.h +++ b/code/OgreBinarySerializer.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/OgreImporter.cpp b/code/OgreImporter.cpp index 504f6a96f..4dc802574 100644 --- a/code/OgreImporter.cpp +++ b/code/OgreImporter.cpp @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, @@ -40,12 +41,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #ifndef ASSIMP_BUILD_NO_OGRE_IMPORTER - - #include "OgreImporter.h" #include "OgreBinarySerializer.h" #include "OgreXmlSerializer.h" #include +#include #include static const aiImporterDesc desc = { diff --git a/code/OgreImporter.h b/code/OgreImporter.h index 8b2179502..2b3009096 100644 --- a/code/OgreImporter.h +++ b/code/OgreImporter.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/OgreMaterial.cpp b/code/OgreMaterial.cpp index bdcd0285a..dfb77ffef 100644 --- a/code/OgreMaterial.cpp +++ b/code/OgreMaterial.cpp @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/OgreParsingUtils.h b/code/OgreParsingUtils.h index def3cf733..d1895374f 100644 --- a/code/OgreParsingUtils.h +++ b/code/OgreParsingUtils.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/OgreStructs.cpp b/code/OgreStructs.cpp index d9cd547d6..09597950a 100644 --- a/code/OgreStructs.cpp +++ b/code/OgreStructs.cpp @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/OgreStructs.h b/code/OgreStructs.h index c4e86a805..04383bc4e 100644 --- a/code/OgreStructs.h +++ b/code/OgreStructs.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/OgreXmlSerializer.cpp b/code/OgreXmlSerializer.cpp index 16767252d..b5d20cdf6 100644 --- a/code/OgreXmlSerializer.cpp +++ b/code/OgreXmlSerializer.cpp @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/OgreXmlSerializer.h b/code/OgreXmlSerializer.h index 47b4cafc0..01b9a7b23 100644 --- a/code/OgreXmlSerializer.h +++ b/code/OgreXmlSerializer.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/OpenGEXExporter.cpp b/code/OpenGEXExporter.cpp index cf06c9f39..ea3c770ec 100644 --- a/code/OpenGEXExporter.cpp +++ b/code/OpenGEXExporter.cpp @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/OpenGEXExporter.h b/code/OpenGEXExporter.h index f9757f41c..9df9d853e 100644 --- a/code/OpenGEXExporter.h +++ b/code/OpenGEXExporter.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/OpenGEXImporter.cpp b/code/OpenGEXImporter.cpp index a605e0f41..93c0169d2 100644 --- a/code/OpenGEXImporter.cpp +++ b/code/OpenGEXImporter.cpp @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, @@ -40,7 +41,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #ifndef ASSIMP_BUILD_NO_OPENGEX_IMPORTER #include "OpenGEXImporter.h" -#include "DefaultIOSystem.h" +#include #include #include "MakeVerboseFormat.h" #include "StringComparison.h" @@ -48,11 +49,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include #include +#include #include -static const std::string OpenGexExt = "ogex"; - static const aiImporterDesc desc = { "Open Game Engine Exchange", "", @@ -63,7 +63,7 @@ static const aiImporterDesc desc = { 0, 0, 0, - OpenGexExt.c_str() + "ogex" }; namespace Grammar { @@ -196,7 +196,6 @@ namespace Grammar { return NoneType; } - } // Namespace Grammar namespace Assimp { @@ -288,7 +287,7 @@ OpenGEXImporter::~OpenGEXImporter() { bool OpenGEXImporter::CanRead( const std::string &file, IOSystem *pIOHandler, bool checkSig ) const { bool canRead( false ); if( !checkSig ) { - canRead = SimpleExtensionCheck( file, OpenGexExt.c_str() ); + canRead = SimpleExtensionCheck( file, "ogex" ); } else { static const char *token[] = { "Metric", "GeometryNode", "VertexArray (attrib", "IndexArray" }; canRead = BaseImporter::SearchFileHeaderForToken( pIOHandler, file, token, 4 ); @@ -523,6 +522,10 @@ void OpenGEXImporter::handleObjectRefNode( DDLNode *node, aiScene *pScene ) { if ( !objRefNames.empty() ) { m_unresolvedRefStack.push_back( new RefInfo( m_currentNode, RefInfo::MeshRef, objRefNames ) ); } + } else if ( m_tokenType == Grammar::LightNodeToken ) { + // TODO! + } else if ( m_tokenType == Grammar::CameraNodeToken ) { + // TODO! } } @@ -602,6 +605,13 @@ void OpenGEXImporter::handleCameraObject( ODDLParser::DDLNode *node, aiScene *pS //------------------------------------------------------------------------------------------------ void OpenGEXImporter::handleLightObject( ODDLParser::DDLNode *node, aiScene *pScene ) { + aiLight *light( new aiLight ); + m_lightCache.push_back( light ); + std::string objName = node->getName(); + if ( !objName.empty() ) { + light->mName.Set( objName ); + } + m_currentLight = light; Property *prop( node->findPropertyByName( "type" ) ); if ( nullptr != prop ) { @@ -917,7 +927,7 @@ void OpenGEXImporter::handleIndexArrayNode( ODDLParser::DDLNode *node, aiScene * } //------------------------------------------------------------------------------------------------ -static void getColorRGB( aiColor3D *pColor, DataArrayList *colList ) { +static void getColorRGB3( aiColor3D *pColor, DataArrayList *colList ) { if( nullptr == pColor || nullptr == colList ) { return; } @@ -931,6 +941,23 @@ static void getColorRGB( aiColor3D *pColor, DataArrayList *colList ) { pColor->b = val->getFloat(); } +//------------------------------------------------------------------------------------------------ +static void getColorRGB4( aiColor4D *pColor, DataArrayList *colList ) { + if ( nullptr == pColor || nullptr == colList ) { + return; + } + + ai_assert( 4 == colList->m_numItems ); + Value *val( colList->m_dataList ); + pColor->r = val->getFloat(); + val = val->getNext(); + pColor->g = val->getFloat(); + val = val->getNext(); + pColor->b = val->getFloat(); + val = val->getNext(); + pColor->a = val->getFloat(); +} + //------------------------------------------------------------------------------------------------ enum ColorType { NoneColor = 0, @@ -981,7 +1008,17 @@ void OpenGEXImporter::handleColorNode( ODDLParser::DDLNode *node, aiScene *pScen return; } aiColor3D col; - getColorRGB( &col, colList ); + if ( 3 == colList->m_numItems ) { + aiColor3D col3; + getColorRGB3( &col3, colList ); + col = col3; + } else { + aiColor4D col4; + getColorRGB4( &col4, colList ); + col.r = col4.r; + col.g = col4.g; + col.b = col4.b; + } const ColorType colType( getColorType( prop->m_key ) ); if( DiffuseColor == colType ) { m_currentMaterial->AddProperty( &col, 1, AI_MATKEY_COLOR_DIFFUSE ); diff --git a/code/OpenGEXImporter.h b/code/OpenGEXImporter.h index 103b27903..e3a0735f6 100644 --- a/code/OpenGEXImporter.h +++ b/code/OpenGEXImporter.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, @@ -47,6 +48,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include +#include namespace ODDLParser { class DDLNode; @@ -130,7 +132,6 @@ protected: void copyMeshes( aiScene *pScene ); void copyCameras( aiScene *pScene ); void copyLights( aiScene *pScene ); - void resolveReferences(); void pushNode( aiNode *node, aiScene *pScene ); aiNode *popNode(); diff --git a/code/OpenGEXStructs.h b/code/OpenGEXStructs.h index 910b03f60..6144a10c5 100644 --- a/code/OpenGEXStructs.h +++ b/code/OpenGEXStructs.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/OptimizeGraph.cpp b/code/OptimizeGraph.cpp index 4d033ee31..8b3df0820 100644 --- a/code/OptimizeGraph.cpp +++ b/code/OptimizeGraph.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/code/OptimizeGraph.h b/code/OptimizeGraph.h index 7b3a1d0de..22d53afff 100644 --- a/code/OptimizeGraph.h +++ b/code/OptimizeGraph.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/OptimizeMeshes.cpp b/code/OptimizeMeshes.cpp index 2bb9c5717..efbd51bd0 100644 --- a/code/OptimizeMeshes.cpp +++ b/code/OptimizeMeshes.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/code/OptimizeMeshes.h b/code/OptimizeMeshes.h index fc8b6a10b..bcefe9247 100644 --- a/code/OptimizeMeshes.h +++ b/code/OptimizeMeshes.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/ParsingUtils.h b/code/ParsingUtils.h index 2371ee606..7da664374 100644 --- a/code/ParsingUtils.h +++ b/code/ParsingUtils.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/PlyExporter.cpp b/code/PlyExporter.cpp index 1d14c9219..2844cbd39 100644 --- a/code/PlyExporter.cpp +++ b/code/PlyExporter.cpp @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/PlyExporter.h b/code/PlyExporter.h index be4fa466f..ce242692c 100644 --- a/code/PlyExporter.h +++ b/code/PlyExporter.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/PlyLoader.cpp b/code/PlyLoader.cpp index 8b0471326..7cfa06727 100644 --- a/code/PlyLoader.cpp +++ b/code/PlyLoader.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. @@ -51,7 +52,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include #include - +#include using namespace Assimp; @@ -90,14 +91,16 @@ namespace // ------------------------------------------------------------------------------------------------ // Constructor to be privately used by Importer PLYImporter::PLYImporter() - : mBuffer(), - pcDOM() -{} +: mBuffer() +, pcDOM(){ + // empty +} // ------------------------------------------------------------------------------------------------ // Destructor, private as well -PLYImporter::~PLYImporter() -{} +PLYImporter::~PLYImporter() { + // empty +} // ------------------------------------------------------------------------------------------------ // Returns whether the class can handle the format of the given file. diff --git a/code/PlyLoader.h b/code/PlyLoader.h index 3297524a9..6c3825aa4 100644 --- a/code/PlyLoader.h +++ b/code/PlyLoader.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, @@ -53,7 +54,7 @@ struct aiNode; struct aiMaterial; struct aiMesh; -namespace Assimp { +namespace Assimp { using namespace PLY; diff --git a/code/PlyParser.cpp b/code/PlyParser.cpp index edc13ce10..7e5a07d8e 100644 --- a/code/PlyParser.cpp +++ b/code/PlyParser.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. @@ -53,9 +54,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. using namespace Assimp; // ------------------------------------------------------------------------------------------------ -PLY::EDataType PLY::Property::ParseDataType(const char* pCur,const char** pCurOut) -{ - ai_assert(NULL != pCur && NULL != pCurOut); +PLY::EDataType PLY::Property::ParseDataType(const char* pCur,const char** pCurOut) { + ai_assert( NULL != pCur ); + ai_assert( NULL != pCurOut ); + PLY::EDataType eOut = PLY::EDT_INVALID; if (TokenMatch(pCur,"char",4) || @@ -100,33 +102,25 @@ PLY::EDataType PLY::Property::ParseDataType(const char* pCur,const char** pCurOu DefaultLogger::get()->info("Found unknown data type in PLY file. This is OK"); } *pCurOut = pCur; + return eOut; } // ------------------------------------------------------------------------------------------------ -PLY::ESemantic PLY::Property::ParseSemantic(const char* pCur,const char** pCurOut) -{ - ai_assert(NULL != pCur && NULL != pCurOut); +PLY::ESemantic PLY::Property::ParseSemantic(const char* pCur,const char** pCurOut) { + ai_assert (NULL != pCur ); + ai_assert( NULL != pCurOut ); PLY::ESemantic eOut = PLY::EST_INVALID; - if (TokenMatch(pCur,"red",3)) - { + if (TokenMatch(pCur,"red",3)) { eOut = PLY::EST_Red; - } - else if (TokenMatch(pCur,"green",5)) - { + } else if (TokenMatch(pCur,"green",5)) { eOut = PLY::EST_Green; - } - else if (TokenMatch(pCur,"blue",4)) - { + } else if (TokenMatch(pCur,"blue",4)) { eOut = PLY::EST_Blue; - } - else if (TokenMatch(pCur,"alpha",5)) - { + } else if (TokenMatch(pCur,"alpha",5)) { eOut = PLY::EST_Alpha; - } - else if (TokenMatch(pCur,"vertex_index",12) || TokenMatch(pCur,"vertex_indices",14)) - { + } else if (TokenMatch(pCur,"vertex_index",12) || TokenMatch(pCur,"vertex_indices",14)) { eOut = PLY::EST_VertexIndex; } else if (TokenMatch(pCur,"material_index",14)) @@ -202,40 +196,28 @@ PLY::ESemantic PLY::Property::ParseSemantic(const char* pCur,const char** pCurOu eOut = PLY::EST_Blue; } // NOTE: Blender3D exports texture coordinates as s,t tuples - else if (TokenMatch(pCur,"u",1) || TokenMatch(pCur,"s",1) || TokenMatch(pCur,"tx",2)) + else if (TokenMatch(pCur,"u",1) || TokenMatch(pCur,"s",1) || TokenMatch(pCur,"tx",2) || TokenMatch(pCur,"texture_u",9)) { eOut = PLY::EST_UTextureCoord; } - else if (TokenMatch(pCur,"v",1) || TokenMatch(pCur,"t",1) || TokenMatch(pCur,"ty",2)) + else if (TokenMatch(pCur,"v",1) || TokenMatch(pCur,"t",1) || TokenMatch(pCur,"ty",2) || TokenMatch(pCur,"texture_v",9)) { eOut = PLY::EST_VTextureCoord; } else if (TokenMatch(pCur,"x",1)) { eOut = PLY::EST_XCoord; - } - else if (TokenMatch(pCur,"y",1)) - { + } else if (TokenMatch(pCur,"y",1)) { eOut = PLY::EST_YCoord; - } - else if (TokenMatch(pCur,"z",1)) - { + } else if (TokenMatch(pCur,"z",1)) { eOut = PLY::EST_ZCoord; - } - else if (TokenMatch(pCur,"nx",2)) - { + } else if (TokenMatch(pCur,"nx",2)) { eOut = PLY::EST_XNormal; - } - else if (TokenMatch(pCur,"ny",2)) - { + } else if (TokenMatch(pCur,"ny",2)) { eOut = PLY::EST_YNormal; - } - else if (TokenMatch(pCur,"nz",2)) - { + } else if (TokenMatch(pCur,"nz",2)) { eOut = PLY::EST_ZNormal; - } - else - { + } else { DefaultLogger::get()->info("Found unknown property semantic in file. This is ok"); SkipLine(&pCur); } @@ -248,7 +230,8 @@ bool PLY::Property::ParseProperty (const char* pCur, const char** pCurOut, PLY::Property* pOut) { - ai_assert(NULL != pCur && NULL != pCurOut); + ai_assert( NULL != pCur ); + ai_assert( NULL != pCurOut ); // Forms supported: // "property float x" @@ -256,7 +239,9 @@ bool PLY::Property::ParseProperty (const char* pCur, *pCurOut = pCur; // skip leading spaces - if (!SkipSpaces(pCur,&pCur))return false; + if (!SkipSpaces(pCur,&pCur)) { + return false; + } // skip the "property" string at the beginning if (!TokenMatch(pCur,"property",8)) @@ -265,7 +250,9 @@ bool PLY::Property::ParseProperty (const char* pCur, return false; } // get next word - if (!SkipSpaces(pCur,&pCur))return false; + if (!SkipSpaces(pCur,&pCur)) { + return false; + } if (TokenMatch(pCur,"list",4)) { pOut->bIsList = true; @@ -313,6 +300,7 @@ bool PLY::Property::ParseProperty (const char* pCur, SkipSpacesAndLineEnd(pCur,&pCur); *pCurOut = pCur; + return true; } @@ -350,6 +338,7 @@ PLY::EElementSemantic PLY::Element::ParseSemantic(const char* pCur, eOut = PLY::EEST_Material; } *pCurOut = pCur; + return eOut; } @@ -358,13 +347,17 @@ bool PLY::Element::ParseElement (const char* pCur, const char** pCurOut, PLY::Element* pOut) { - ai_assert(NULL != pCur && NULL != pCurOut && NULL != pOut); + ai_assert( NULL != pCur ); + ai_assert( NULL != pCurOut ); + ai_assert( NULL != pOut ); // Example format: "element vertex 8" *pCurOut = pCur; // skip leading spaces - if (!SkipSpaces(&pCur))return false; + if (!SkipSpaces(&pCur)) { + return false; + } // skip the "element" string at the beginning if (!TokenMatch(pCur,"element",7)) @@ -405,6 +398,7 @@ bool PLY::Element::ParseElement (const char* pCur, pOut->alProperties.push_back(prop); } *pCurOut = pCur; + return true; } @@ -412,30 +406,35 @@ bool PLY::Element::ParseElement (const char* pCur, bool PLY::DOM::SkipComments (const char* pCur, const char** pCurOut) { - ai_assert(NULL != pCur && NULL != pCurOut); + ai_assert( NULL != pCur ); + ai_assert( NULL != pCurOut ); *pCurOut = pCur; // skip spaces - if (!SkipSpaces(pCur,&pCur))return false; + if (!SkipSpaces(pCur,&pCur)) { + return false; + } if (TokenMatch(pCur,"comment",7)) { - if ( !IsLineEnd(pCur[-1]) ) - { - SkipLine(pCur,&pCur); - } + if ( !IsLineEnd(pCur[-1]) ) + { + SkipLine(pCur,&pCur); + } SkipComments(pCur,&pCur); *pCurOut = pCur; return true; } *pCurOut = pCur; + return false; } // ------------------------------------------------------------------------------------------------ -bool PLY::DOM::ParseHeader (const char* pCur,const char** pCurOut,bool isBinary) -{ - ai_assert(NULL != pCur && NULL != pCurOut); +bool PLY::DOM::ParseHeader (const char* pCur,const char** pCurOut,bool isBinary) { + ai_assert( NULL != pCur ); + ai_assert( NULL != pCurOut ); + DefaultLogger::get()->debug("PLY::DOM::ParseHeader() begin"); // after ply and format line @@ -479,7 +478,8 @@ bool PLY::DOM::ParseElementInstanceLists ( const char* pCur, const char** pCurOut) { - ai_assert(NULL != pCur && NULL != pCurOut); + ai_assert( NULL != pCur ); + ai_assert( NULL != pCurOut ); DefaultLogger::get()->debug("PLY::DOM::ParseElementInstanceLists() begin"); *pCurOut = pCur; @@ -507,7 +507,8 @@ bool PLY::DOM::ParseElementInstanceListsBinary ( const char** pCurOut, bool p_bBE) { - ai_assert(NULL != pCur && NULL != pCurOut); + ai_assert( NULL != pCur ); + ai_assert( NULL != pCurOut); DefaultLogger::get()->debug("PLY::DOM::ParseElementInstanceListsBinary() begin"); *pCurOut = pCur; @@ -532,7 +533,8 @@ bool PLY::DOM::ParseElementInstanceListsBinary ( // ------------------------------------------------------------------------------------------------ bool PLY::DOM::ParseInstanceBinary (const char* pCur,DOM* p_pcOut,bool p_bBE) { - ai_assert(NULL != pCur && NULL != p_pcOut); + ai_assert( NULL != pCur ); + ai_assert( NULL != p_pcOut ); DefaultLogger::get()->debug("PLY::DOM::ParseInstanceBinary() begin"); @@ -580,7 +582,10 @@ bool PLY::ElementInstanceList::ParseInstanceList ( const PLY::Element* pcElement, PLY::ElementInstanceList* p_pcOut) { - ai_assert(NULL != pCur && NULL != pCurOut && NULL != pcElement && NULL != p_pcOut); + ai_assert( NULL != pCur ); + ai_assert( NULL != pCurOut ); + ai_assert( NULL != pcElement ); + ai_assert( NULL != p_pcOut ); if (EEST_INVALID == pcElement->eSemantic || pcElement->alProperties.empty()) { @@ -614,7 +619,10 @@ bool PLY::ElementInstanceList::ParseInstanceListBinary ( PLY::ElementInstanceList* p_pcOut, bool p_bBE /* = false */) { - ai_assert(NULL != pCur && NULL != pCurOut && NULL != pcElement && NULL != p_pcOut); + ai_assert( NULL != pCur ); + ai_assert( NULL != pCurOut ); + ai_assert( NULL != pcElement ); + ai_assert( NULL != p_pcOut ); // we can add special handling code for unknown element semantics since // we can't skip it as a whole block (we don't know its exact size @@ -636,9 +644,14 @@ bool PLY::ElementInstance::ParseInstance ( const PLY::Element* pcElement, PLY::ElementInstance* p_pcOut) { - ai_assert(NULL != pCur && NULL != pCurOut && NULL != pcElement && NULL != p_pcOut); + ai_assert( NULL != pCur ); + ai_assert( NULL != pCurOut ); + ai_assert( NULL != pcElement ); + ai_assert( NULL != p_pcOut ); - if (!SkipSpaces(pCur, &pCur))return false; + if (!SkipSpaces(pCur, &pCur)) { + return false; + } // allocate enough storage p_pcOut->alProperties.resize(pcElement->alProperties.size()); @@ -671,7 +684,10 @@ bool PLY::ElementInstance::ParseInstanceBinary ( PLY::ElementInstance* p_pcOut, bool p_bBE /* = false */) { - ai_assert(NULL != pCur && NULL != pCurOut && NULL != pcElement && NULL != p_pcOut); + ai_assert( NULL != pCur ); + ai_assert( NULL != pCurOut ); + ai_assert( NULL != pcElement ); + ai_assert( NULL != p_pcOut ); // allocate enough storage p_pcOut->alProperties.resize(pcElement->alProperties.size()); @@ -696,12 +712,17 @@ bool PLY::ElementInstance::ParseInstanceBinary ( bool PLY::PropertyInstance::ParseInstance (const char* pCur,const char** pCurOut, const PLY::Property* prop, PLY::PropertyInstance* p_pcOut) { - ai_assert(NULL != pCur && NULL != pCurOut && NULL != prop && NULL != p_pcOut); + ai_assert( NULL != pCur ); + ai_assert( NULL != pCurOut ); + ai_assert( NULL != prop ); + ai_assert( NULL != p_pcOut ); *pCurOut = pCur; // skip spaces at the beginning - if (!SkipSpaces(pCur, &pCur))return false; + if (!SkipSpaces(pCur, &pCur)) { + return false; + } if (prop->bIsList) { @@ -741,7 +762,10 @@ bool PLY::PropertyInstance::ParseInstanceBinary ( PLY::PropertyInstance* p_pcOut, bool p_bBE) { - ai_assert(NULL != pCur && NULL != pCurOut && NULL != prop && NULL != p_pcOut); + ai_assert( NULL != pCur ); + ai_assert( NULL != pCurOut ); + ai_assert( NULL != prop ); + ai_assert( NULL != p_pcOut ); if (prop->bIsList) { @@ -770,8 +794,7 @@ bool PLY::PropertyInstance::ParseInstanceBinary ( } // ------------------------------------------------------------------------------------------------ -PLY::PropertyInstance::ValueUnion PLY::PropertyInstance::DefaultValue( - PLY::EDataType eType) +PLY::PropertyInstance::ValueUnion PLY::PropertyInstance::DefaultValue( PLY::EDataType eType ) { PLY::PropertyInstance::ValueUnion out; @@ -798,7 +821,9 @@ bool PLY::PropertyInstance::ParseValue( PLY::EDataType eType, PLY::PropertyInstance::ValueUnion* out) { - ai_assert(NULL != pCur && NULL != pCurOut && NULL != out); + ai_assert( NULL != pCur ); + ai_assert( NULL != pCurOut ); + ai_assert( NULL != out ); bool ret = true; *pCurOut = pCur; @@ -827,7 +852,6 @@ bool PLY::PropertyInstance::ParseValue( break; case EDT_Double: - double d; pCur = fast_atoreal_move(pCur,d); out->fDouble = (double)d; @@ -835,8 +859,10 @@ bool PLY::PropertyInstance::ParseValue( default: ret = false; + break; } *pCurOut = pCur; + return ret; } @@ -848,7 +874,9 @@ bool PLY::PropertyInstance::ParseValueBinary( PLY::PropertyInstance::ValueUnion* out, bool p_bBE) { - ai_assert(NULL != pCur && NULL != pCurOut && NULL != out); + ai_assert( NULL != pCur ); + ai_assert( NULL != pCurOut ); + ai_assert( NULL != out ); bool ret = true; switch (eType) @@ -925,6 +953,7 @@ bool PLY::PropertyInstance::ParseValueBinary( ret = false; } *pCurOut = pCur; + return ret; } diff --git a/code/PlyParser.h b/code/PlyParser.h index 30791e22b..930536e2d 100644 --- a/code/PlyParser.h +++ b/code/PlyParser.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/PolyTools.h b/code/PolyTools.h index 80e1dd173..1089327ae 100644 --- a/code/PolyTools.h +++ b/code/PolyTools.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/PostStepRegistry.cpp b/code/PostStepRegistry.cpp index 31518c132..c80c373e5 100644 --- a/code/PostStepRegistry.cpp +++ b/code/PostStepRegistry.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/code/PretransformVertices.cpp b/code/PretransformVertices.cpp index bcb3913c3..26b8aee34 100644 --- a/code/PretransformVertices.cpp +++ b/code/PretransformVertices.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/code/PretransformVertices.h b/code/PretransformVertices.h index 28bd95a67..65b4938b0 100644 --- a/code/PretransformVertices.h +++ b/code/PretransformVertices.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/ProcessHelper.cpp b/code/ProcessHelper.cpp index 501d44484..c255979bd 100644 --- a/code/ProcessHelper.cpp +++ b/code/ProcessHelper.cpp @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/ProcessHelper.h b/code/ProcessHelper.h index c70e23f5f..a49115936 100644 --- a/code/ProcessHelper.h +++ b/code/ProcessHelper.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/Profiler.h b/code/Profiler.h index 9354339a2..40d436b52 100644 --- a/code/Profiler.h +++ b/code/Profiler.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/Q3BSPFileData.h b/code/Q3BSPFileData.h index ab46db24f..b836795f8 100644 --- a/code/Q3BSPFileData.h +++ b/code/Q3BSPFileData.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/Q3BSPFileImporter.cpp b/code/Q3BSPFileImporter.cpp index 198ecdd73..9d6d8e870 100644 --- a/code/Q3BSPFileImporter.cpp +++ b/code/Q3BSPFileImporter.cpp @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, @@ -40,7 +41,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #ifndef ASSIMP_BUILD_NO_Q3BSP_IMPORTER -#include "DefaultIOSystem.h" #include "Q3BSPFileImporter.h" #include "Q3BSPZipArchive.h" #include "Q3BSPFileParser.h" @@ -56,6 +56,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include #include +#include +#include #include #include #include "StringComparison.h" diff --git a/code/Q3BSPFileImporter.h b/code/Q3BSPFileImporter.h index ee8991bea..cf53d4db0 100644 --- a/code/Q3BSPFileImporter.h +++ b/code/Q3BSPFileImporter.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, @@ -42,30 +43,27 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "BaseImporter.h" +#include + struct aiMesh; struct aiNode; struct aiFace; struct aiMaterial; struct aiTexture; -namespace Assimp -{ -namespace Q3BSP -{ - -class Q3BSPZipArchive; -struct Q3BSPModel; -struct sQ3BSPFace; - +namespace Assimp { +namespace Q3BSP { + class Q3BSPZipArchive; + struct Q3BSPModel; + struct sQ3BSPFace; } + // ------------------------------------------------------------------------------------------------ /** Loader to import BSP-levels from a PK3 archive or from a unpacked BSP-level. */ // ------------------------------------------------------------------------------------------------ -class Q3BSPFileImporter : public BaseImporter -{ +class Q3BSPFileImporter : public BaseImporter { public: - /// @brief Default constructor. Q3BSPFileImporter(); diff --git a/code/Q3BSPFileParser.cpp b/code/Q3BSPFileParser.cpp index 0dabaf87d..69721fc2d 100644 --- a/code/Q3BSPFileParser.cpp +++ b/code/Q3BSPFileParser.cpp @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, @@ -42,10 +43,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #ifndef ASSIMP_BUILD_NO_Q3BSP_IMPORTER #include "Q3BSPFileParser.h" -#include "DefaultIOSystem.h" #include "Q3BSPFileData.h" #include "Q3BSPZipArchive.h" #include +#include #include namespace Assimp { diff --git a/code/Q3BSPFileParser.h b/code/Q3BSPFileParser.h index 8363d31c0..1ee6d4aef 100644 --- a/code/Q3BSPFileParser.h +++ b/code/Q3BSPFileParser.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/Q3BSPZipArchive.cpp b/code/Q3BSPZipArchive.cpp index 16455c10a..86f399659 100644 --- a/code/Q3BSPZipArchive.cpp +++ b/code/Q3BSPZipArchive.cpp @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/Q3BSPZipArchive.h b/code/Q3BSPZipArchive.h index 4dcd7a849..280c44fc0 100644 --- a/code/Q3BSPZipArchive.h +++ b/code/Q3BSPZipArchive.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/Q3DLoader.cpp b/code/Q3DLoader.cpp index d9dc29672..5aa639d09 100644 --- a/code/Q3DLoader.cpp +++ b/code/Q3DLoader.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. @@ -53,6 +54,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include #include +#include using namespace Assimp; diff --git a/code/Q3DLoader.h b/code/Q3DLoader.h index fb1dd1818..97184a5ff 100644 --- a/code/Q3DLoader.h +++ b/code/Q3DLoader.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/RawLoader.cpp b/code/RawLoader.cpp index 57e0fc119..e14b5140d 100644 --- a/code/RawLoader.cpp +++ b/code/RawLoader.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. @@ -54,7 +55,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include #include - +#include using namespace Assimp; diff --git a/code/RawLoader.h b/code/RawLoader.h index 984141a04..0a1a35815 100644 --- a/code/RawLoader.h +++ b/code/RawLoader.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/RemoveComments.cpp b/code/RemoveComments.cpp index 8290d2217..37d74124d 100644 --- a/code/RemoveComments.cpp +++ b/code/RemoveComments.cpp @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/RemoveComments.h b/code/RemoveComments.h index 856ed74bf..0a00a8f0f 100644 --- a/code/RemoveComments.h +++ b/code/RemoveComments.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, @@ -44,7 +45,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #ifndef AI_REMOVE_COMMENTS_H_INC #define AI_REMOVE_COMMENTS_H_INC -#include + #include namespace Assimp { diff --git a/code/RemoveRedundantMaterials.cpp b/code/RemoveRedundantMaterials.cpp index a9954b946..154bf63ca 100644 --- a/code/RemoveRedundantMaterials.cpp +++ b/code/RemoveRedundantMaterials.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/code/RemoveRedundantMaterials.h b/code/RemoveRedundantMaterials.h index 60efad9a4..cb4ec02bb 100644 --- a/code/RemoveRedundantMaterials.h +++ b/code/RemoveRedundantMaterials.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/RemoveVCProcess.cpp b/code/RemoveVCProcess.cpp index 473460452..016757dbb 100644 --- a/code/RemoveVCProcess.cpp +++ b/code/RemoveVCProcess.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. @@ -305,7 +306,7 @@ bool RemoveVCProcess::ProcessMesh(aiMesh* pMesh) if (!pMesh->mColors[i])break; if (configDeleteFlags & aiComponent_COLORSn(i) || b) { - delete pMesh->mColors[i]; + delete [] pMesh->mColors[i]; pMesh->mColors[i] = NULL; ret = true; diff --git a/code/RemoveVCProcess.h b/code/RemoveVCProcess.h index a9173a815..5735bf419 100644 --- a/code/RemoveVCProcess.h +++ b/code/RemoveVCProcess.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/SGSpatialSort.cpp b/code/SGSpatialSort.cpp index 84061888e..7a80381e2 100644 --- a/code/SGSpatialSort.cpp +++ b/code/SGSpatialSort.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. @@ -47,7 +48,6 @@ the 3ds loader handling smooth groups correctly */ using namespace Assimp; - // ------------------------------------------------------------------------------------------------ SGSpatialSort::SGSpatialSort() { @@ -88,12 +88,11 @@ void SGSpatialSort::FindPositions( const aiVector3D& pPosition, float dist = pPosition * mPlaneNormal; float minDist = dist - pRadius, maxDist = dist + pRadius; - // clear the array in this strange fashion because a simple clear() would also deallocate - // the array which we want to avoid - poResults.erase( poResults.begin(), poResults.end()); + // clear the array + poResults.clear(); // quick check for positions outside the range - if( mPositions.size() == 0) + if( mPositions.empty() ) return; if( maxDist < mPositions.front().mDistance) return; diff --git a/code/SGSpatialSort.h b/code/SGSpatialSort.h index 59a5c37d6..e7cd38724 100644 --- a/code/SGSpatialSort.h +++ b/code/SGSpatialSort.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/SIBImporter.cpp b/code/SIBImporter.cpp index aaf4b0b26..87e0d1585 100644 --- a/code/SIBImporter.cpp +++ b/code/SIBImporter.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. @@ -61,7 +62,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include #include +#include +#include using namespace Assimp; @@ -76,25 +79,26 @@ static const aiImporterDesc desc = { "sib" }; -struct SIBChunk -{ +struct SIBChunk { uint32_t Tag; uint32_t Size; } PACK_STRUCT; -enum { POS, NRM, UV, N }; +enum { + POS, + NRM, + UV, + N +}; typedef std::pair SIBPair; -static SIBPair makePair(uint32_t a, uint32_t b) { return (a pos, nrm, uv; @@ -105,15 +109,13 @@ struct SIBMesh std::map edgeMap; }; -struct SIBObject -{ +struct SIBObject { aiString name; aiMatrix4x4 axis; size_t meshIdx, meshCount; }; -struct SIB -{ +struct SIB { std::vector mtls; std::vector meshes; std::vector lights; @@ -121,8 +123,7 @@ struct SIB }; // ------------------------------------------------------------------------------------------------ -static SIBEdge& GetEdge(SIBMesh* mesh, uint32_t posA, uint32_t posB) -{ +static SIBEdge& GetEdge(SIBMesh* mesh, uint32_t posA, uint32_t posB) { SIBPair pair = (posA < posB) ? SIBPair(posA, posB) : SIBPair(posB, posA); std::map::iterator it = mesh->edgeMap.find(pair); if (it != mesh->edgeMap.end()) @@ -388,7 +389,7 @@ static void ConnectFaces(SIBMesh* mesh) // with non-2-manifold surfaces, but then so does Silo to begin with. if (edge.faceA == 0xffffffff) edge.faceA = static_cast(faceIdx); - else + else if (edge.faceB == 0xffffffff) edge.faceB = static_cast(faceIdx); prev = next; @@ -432,12 +433,17 @@ static aiVector3D CalculateVertexNormal(SIBMesh* mesh, uint32_t faceIdx, uint32_ { SIBEdge& edge = GetEdge(mesh, posA, posB); - // Move to whichever side we didn't just come from. - if (!edge.creased) { - if (edge.faceA != prevFaceIdx && edge.faceA != faceIdx) - nextFaceIdx = edge.faceA; - else if (edge.faceB != prevFaceIdx && edge.faceB != faceIdx) - nextFaceIdx = edge.faceB; + // Non-manifold meshes can produce faces which share + // positions but have no edge entry, so check it. + if (edge.faceA == faceIdx || edge.faceB == faceIdx) + { + // Move to whichever side we didn't just come from. + if (!edge.creased) { + if (edge.faceA != prevFaceIdx && edge.faceA != faceIdx && edge.faceA != 0xffffffff) + nextFaceIdx = edge.faceA; + else if (edge.faceB != prevFaceIdx && edge.faceB != faceIdx && edge.faceB != 0xffffffff) + nextFaceIdx = edge.faceB; + } } } diff --git a/code/SIBImporter.h b/code/SIBImporter.h index bd71104c6..e7e2ec0b9 100644 --- a/code/SIBImporter.h +++ b/code/SIBImporter.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/SMDLoader.cpp b/code/SMDLoader.cpp index 408125771..1e9f86bea 100644 --- a/code/SMDLoader.cpp +++ b/code/SMDLoader.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. @@ -54,6 +55,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include #include +#include #include using namespace Assimp; diff --git a/code/SMDLoader.h b/code/SMDLoader.h index f45c49a7e..c50b327e3 100644 --- a/code/SMDLoader.h +++ b/code/SMDLoader.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/STEPFile.h b/code/STEPFile.h index 9a830c068..529d4edbd 100644 --- a/code/STEPFile.h +++ b/code/STEPFile.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, @@ -438,13 +439,17 @@ namespace STEP { // ------------------------------------------------------------------------------ /** Base class for all concrete object instances */ // ------------------------------------------------------------------------------ - class Object - { + class Object { public: - - virtual ~Object() {} Object(const char* classname = "unknown") - : classname(classname) {} + : id( 0 ) + , classname(classname) { + // empty + } + + virtual ~Object() { + // empty + } public: @@ -459,7 +464,6 @@ namespace STEP { return dynamic_cast(*this); } - template const T* ToPtr() const { return dynamic_cast(this); @@ -471,7 +475,6 @@ namespace STEP { } public: - uint64_t GetID() const { return id; } @@ -489,7 +492,6 @@ namespace STEP { const char* const classname; }; - template size_t GenericFill(const STEP::DB& db, const EXPRESS::LIST& params, T* in); // (intentionally undefined) diff --git a/code/STEPFileEncoding.cpp b/code/STEPFileEncoding.cpp index aff0b618d..0bf868d1c 100644 --- a/code/STEPFileEncoding.cpp +++ b/code/STEPFileEncoding.cpp @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/STEPFileEncoding.h b/code/STEPFileEncoding.h index 3aec83056..56615c8f6 100644 --- a/code/STEPFileEncoding.h +++ b/code/STEPFileEncoding.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/STEPFileReader.cpp b/code/STEPFileReader.cpp index afaa53a45..d014c1a5d 100644 --- a/code/STEPFileReader.cpp +++ b/code/STEPFileReader.cpp @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/STEPFileReader.h b/code/STEPFileReader.h index c5bc88a5e..fb8c86f59 100644 --- a/code/STEPFileReader.h +++ b/code/STEPFileReader.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/STLExporter.cpp b/code/STLExporter.cpp index 3905cbcaf..629296724 100644 --- a/code/STLExporter.cpp +++ b/code/STLExporter.cpp @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/STLExporter.h b/code/STLExporter.h index 44b12344f..7fb6a3e75 100644 --- a/code/STLExporter.h +++ b/code/STLExporter.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/STLLoader.cpp b/code/STLLoader.cpp index 7d3e3224c..5c592aaf5 100644 --- a/code/STLLoader.cpp +++ b/code/STLLoader.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. @@ -52,6 +53,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include #include +#include using namespace Assimp; diff --git a/code/STLLoader.h b/code/STLLoader.h index a0d82dbe8..87ed3288d 100644 --- a/code/STLLoader.h +++ b/code/STLLoader.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/SceneCombiner.cpp b/code/SceneCombiner.cpp index a4f832e8f..a879f3123 100644 --- a/code/SceneCombiner.cpp +++ b/code/SceneCombiner.cpp @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/SceneCombiner.h b/code/SceneCombiner.h index a6ba06768..af008b134 100644 --- a/code/SceneCombiner.h +++ b/code/SceneCombiner.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, @@ -46,7 +47,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include -#include "Defines.h" +#include #include #include #include diff --git a/code/ScenePreprocessor.cpp b/code/ScenePreprocessor.cpp index 327da0b35..0a6366b7d 100644 --- a/code/ScenePreprocessor.cpp +++ b/code/ScenePreprocessor.cpp @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/ScenePreprocessor.h b/code/ScenePreprocessor.h index 9c4b422a2..3311036c3 100644 --- a/code/ScenePreprocessor.h +++ b/code/ScenePreprocessor.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/ScenePrivate.h b/code/ScenePrivate.h index dd4d0a5e1..90d34bade 100644 --- a/code/ScenePrivate.h +++ b/code/ScenePrivate.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/SkeletonMeshBuilder.cpp b/code/SkeletonMeshBuilder.cpp index c01b575da..e9f427113 100644 --- a/code/SkeletonMeshBuilder.cpp +++ b/code/SkeletonMeshBuilder.cpp @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/SkeletonMeshBuilder.h b/code/SkeletonMeshBuilder.h index 3c518e8cd..7a7e7b8ff 100644 --- a/code/SkeletonMeshBuilder.h +++ b/code/SkeletonMeshBuilder.h @@ -4,7 +4,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/SmoothingGroups.h b/code/SmoothingGroups.h index 75c59d1cb..7a7e2e429 100644 --- a/code/SmoothingGroups.h +++ b/code/SmoothingGroups.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/SortByPTypeProcess.cpp b/code/SortByPTypeProcess.cpp index 74867184a..e4b314e02 100644 --- a/code/SortByPTypeProcess.cpp +++ b/code/SortByPTypeProcess.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/code/SortByPTypeProcess.h b/code/SortByPTypeProcess.h index f96985cb3..0be7925ff 100644 --- a/code/SortByPTypeProcess.h +++ b/code/SortByPTypeProcess.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/SpatialSort.cpp b/code/SpatialSort.cpp index 3825dc33a..fa78d8bb6 100644 --- a/code/SpatialSort.cpp +++ b/code/SpatialSort.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. @@ -269,7 +270,7 @@ void SpatialSort::FindIdenticalPositions( const aiVector3D& pPosition, // clear the array in this strange fashion because a simple clear() would also deallocate // the array which we want to avoid - poResults.erase( poResults.begin(), poResults.end()); + poResults.resize( 0 ); // do a binary search for the minimal distance to start the iteration there unsigned int index = (unsigned int)mPositions.size() / 2; diff --git a/code/SpatialSort.h b/code/SpatialSort.h index 367e0f6a6..36b7a2767 100644 --- a/code/SpatialSort.h +++ b/code/SpatialSort.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/SplitByBoneCountProcess.cpp b/code/SplitByBoneCountProcess.cpp index 4d01bf0ee..a73dfe81e 100644 --- a/code/SplitByBoneCountProcess.cpp +++ b/code/SplitByBoneCountProcess.cpp @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/SplitByBoneCountProcess.h b/code/SplitByBoneCountProcess.h index 816d18357..434ef9866 100644 --- a/code/SplitByBoneCountProcess.h +++ b/code/SplitByBoneCountProcess.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/SplitLargeMeshes.cpp b/code/SplitLargeMeshes.cpp index 5e21ec6b8..2066f7989 100644 --- a/code/SplitLargeMeshes.cpp +++ b/code/SplitLargeMeshes.cpp @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/SplitLargeMeshes.h b/code/SplitLargeMeshes.h index 9be27a8f1..7556e9fe8 100644 --- a/code/SplitLargeMeshes.h +++ b/code/SplitLargeMeshes.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/StandardShapes.cpp b/code/StandardShapes.cpp index eed8ddabc..4346a8d76 100644 --- a/code/StandardShapes.cpp +++ b/code/StandardShapes.cpp @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, @@ -47,8 +48,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "StandardShapes.h" #include "StringComparison.h" -#include "Defines.h" #include +#include #include namespace Assimp { diff --git a/code/StandardShapes.h b/code/StandardShapes.h index faa250a2e..a31de566c 100644 --- a/code/StandardShapes.h +++ b/code/StandardShapes.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/StdOStreamLogStream.h b/code/StdOStreamLogStream.h index 249e30458..d9993b246 100644 --- a/code/StdOStreamLogStream.h +++ b/code/StdOStreamLogStream.h @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/code/StepExporter.cpp b/code/StepExporter.cpp index eb84ac594..ae5c12a4c 100644 --- a/code/StepExporter.cpp +++ b/code/StepExporter.cpp @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, @@ -48,7 +49,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "BaseImporter.h" #include "fast_atof.h" #include "SceneCombiner.h" -#include "DefaultIOSystem.h" #include #include #include @@ -56,6 +56,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include #include "Exceptional.h" +#include #include #include #include diff --git a/code/StepExporter.h b/code/StepExporter.h index b51280c6c..e5cdda7a1 100644 --- a/code/StepExporter.h +++ b/code/StepExporter.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/StreamReader.h b/code/StreamReader.h index 89367494a..494aed146 100644 --- a/code/StreamReader.h +++ b/code/StreamReader.h @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. @@ -50,7 +51,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "Exceptional.h" #include #include -#include "Defines.h" +#include namespace Assimp { @@ -243,7 +244,7 @@ public: * * @param limit Maximum number of bytes to be read from * the beginning of the file. Specifying UINT_MAX - * resets the limit to the original end of the stream. + * resets the limit to the original end of the stream. * Returns the previously set limit. */ unsigned int SetReadLimit(unsigned int _limit) { unsigned int prev = GetReadLimit(); @@ -290,12 +291,12 @@ private: throw DeadlyImportError("End of file or stream limit was reached"); } -#ifdef __arm__ +///*#ifdef __arm__ T f; ::memcpy (&f, current, sizeof(T)); -#else - T f = *((const T*)current); -#endif +//#else*/ +// T f = *((const T*)current); +//#endif Intern :: Getter() (&f,le); current += sizeof(T); diff --git a/code/StreamWriter.h b/code/StreamWriter.h index 12239bf7f..26873fb5b 100644 --- a/code/StreamWriter.h +++ b/code/StreamWriter.h @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/code/StringComparison.h b/code/StringComparison.h index 0e1dbe4b8..ed5f4bd6a 100644 --- a/code/StringComparison.h +++ b/code/StringComparison.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, @@ -56,7 +57,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include #include -#include namespace Assimp { diff --git a/code/StringUtils.h b/code/StringUtils.h index 15f7db2e7..64f66e6b9 100644 --- a/code/StringUtils.h +++ b/code/StringUtils.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, @@ -40,12 +41,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #ifndef INCLUDED_AI_STRINGUTILS_H #define INCLUDED_AI_STRINGUTILS_H -#include -#include -#include -#include #include -#include +#include +#include /// @fn ai_snprintf /// @brief The portable version of the function snprintf ( C99 standard ), which works on visual studio compilers 2013 and earlier. diff --git a/code/Subdivision.cpp b/code/Subdivision.cpp index 7bc30c53a..ef5840dac 100644 --- a/code/Subdivision.cpp +++ b/code/Subdivision.cpp @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/Subdivision.h b/code/Subdivision.h index 658640f55..b8ce228d2 100644 --- a/code/Subdivision.h +++ b/code/Subdivision.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/TargetAnimation.cpp b/code/TargetAnimation.cpp index ecf6f0dcf..ab6b3d12f 100644 --- a/code/TargetAnimation.cpp +++ b/code/TargetAnimation.cpp @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/TargetAnimation.h b/code/TargetAnimation.h index 79cef599e..21b66e591 100644 --- a/code/TargetAnimation.h +++ b/code/TargetAnimation.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/TerragenLoader.cpp b/code/TerragenLoader.cpp index 854959f19..ecf33aae9 100644 --- a/code/TerragenLoader.cpp +++ b/code/TerragenLoader.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. @@ -51,7 +52,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include #include - +#include using namespace Assimp; diff --git a/code/TerragenLoader.h b/code/TerragenLoader.h index c216a2186..a95bd6bff 100644 --- a/code/TerragenLoader.h +++ b/code/TerragenLoader.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/TextureTransform.cpp b/code/TextureTransform.cpp index 948ec013b..76f0ce58c 100644 --- a/code/TextureTransform.cpp +++ b/code/TextureTransform.cpp @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/TextureTransform.h b/code/TextureTransform.h index ccad3bdd9..7f1e4572f 100644 --- a/code/TextureTransform.h +++ b/code/TextureTransform.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/TinyFormatter.h b/code/TinyFormatter.h index 1182e3a5a..1612282fb 100644 --- a/code/TinyFormatter.h +++ b/code/TinyFormatter.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/TriangulateProcess.cpp b/code/TriangulateProcess.cpp index 883a45e3d..e2d77a80f 100644 --- a/code/TriangulateProcess.cpp +++ b/code/TriangulateProcess.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/code/TriangulateProcess.h b/code/TriangulateProcess.h index 97b5004e1..6775eca7c 100644 --- a/code/TriangulateProcess.h +++ b/code/TriangulateProcess.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/UnrealLoader.cpp b/code/UnrealLoader.cpp index 790002235..c8382cb01 100644 --- a/code/UnrealLoader.cpp +++ b/code/UnrealLoader.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. @@ -60,6 +61,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include #include +#include #include diff --git a/code/UnrealLoader.h b/code/UnrealLoader.h index 93648ca82..a2ceb3d54 100644 --- a/code/UnrealLoader.h +++ b/code/UnrealLoader.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/ValidateDataStructure.cpp b/code/ValidateDataStructure.cpp index 44e361f71..a536058bc 100644 --- a/code/ValidateDataStructure.cpp +++ b/code/ValidateDataStructure.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/code/ValidateDataStructure.h b/code/ValidateDataStructure.h index 87f158b37..6daf9b87d 100644 --- a/code/ValidateDataStructure.h +++ b/code/ValidateDataStructure.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/Version.cpp b/code/Version.cpp index 556156392..fd8ed622c 100644 --- a/code/Version.cpp +++ b/code/Version.cpp @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team All rights reserved. @@ -41,8 +41,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // Actually just a dummy, used by the compiler to build the precompiled header. -#include "./../include/assimp/version.h" -#include "./../include/assimp/scene.h" +#include +#include #include "ScenePrivate.h" static const unsigned int MajorVersion = 3; @@ -55,7 +55,7 @@ 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) 2008-2016, assimp team\n" +"(c) 2008-2017, assimp team\n" "License under the terms and conditions of the 3-clause BSD license\n" "http://assimp.sourceforge.net\n" ; diff --git a/code/Vertex.h b/code/Vertex.h index 88840eab7..1f1685ae9 100644 --- a/code/Vertex.h +++ b/code/Vertex.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/VertexTriangleAdjacency.cpp b/code/VertexTriangleAdjacency.cpp index 6de55ab34..09c0a51a7 100644 --- a/code/VertexTriangleAdjacency.cpp +++ b/code/VertexTriangleAdjacency.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/code/VertexTriangleAdjacency.h b/code/VertexTriangleAdjacency.h index 218607508..ed7b83a6b 100644 --- a/code/VertexTriangleAdjacency.h +++ b/code/VertexTriangleAdjacency.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/Win32DebugLogStream.h b/code/Win32DebugLogStream.h index de8606ebc..0833712f9 100644 --- a/code/Win32DebugLogStream.h +++ b/code/Win32DebugLogStream.h @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/code/X3DImporter.cpp b/code/X3DImporter.cpp index cbeaa4623..7a11e2680 100644 --- a/code/X3DImporter.cpp +++ b/code/X3DImporter.cpp @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, @@ -49,7 +50,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "StringUtils.h" // Header files, Assimp. -#include "DefaultIOSystem.h" +#include #include "fast_atof.h" // Header files, stdlib. @@ -73,24 +74,29 @@ const aiImporterDesc X3DImporter::Description = { "x3d" }; -void X3DImporter::Clear() -{ +X3DImporter::X3DImporter() +: NodeElement_Cur( nullptr ) +, mReader( nullptr ) { + // empty +} + +X3DImporter::~X3DImporter() { + delete mReader; + // Clear() is accounting if data already is deleted. So, just check again if all data is deleted. + Clear(); +} + +void X3DImporter::Clear() { NodeElement_Cur = nullptr; // Delete all elements - if(NodeElement_List.size()) - { - for(std::list::iterator it = NodeElement_List.begin(); it != NodeElement_List.end(); it++) delete *it; - + if(NodeElement_List.size()) { + for ( std::list::iterator it = NodeElement_List.begin(); it != NodeElement_List.end(); it++ ) { + delete *it; + } NodeElement_List.clear(); } } -X3DImporter::~X3DImporter() -{ - delete mReader; - // Clear() is accounting if data already is deleted. So, just check again if all data is deleted. - Clear(); -} /*********************************************************************************************************************************************/ /************************************************************ Functions: find set ************************************************************/ @@ -235,7 +241,7 @@ void X3DImporter::XML_CheckNode_MustBeEmpty() void X3DImporter::XML_CheckNode_SkipUnsupported(const std::string& pParentNodeName) { - const size_t Uns_Skip_Len = 189; + static const size_t Uns_Skip_Len = 190; const char* Uns_Skip[ Uns_Skip_Len ] = { // CAD geometry component "CADAssembly", "CADFace", "CADLayer", "CADPart", "IndexedQuadSet", "QuadSet", @@ -262,7 +268,7 @@ void X3DImporter::XML_CheckNode_SkipUnsupported(const std::string& pParentNodeNa "PositionInterpolator", "PositionInterpolator2D", "ScalarInterpolator", "SplinePositionInterpolator", "SplinePositionInterpolator2D", "SplineScalarInterpolator", "SquadOrientationInterpolator", // Key device sensor component - "KeySensor", "StringSensor" + "KeySensor", "StringSensor", // Layering component "Layer", "LayerSet", "Viewport", // Layout component diff --git a/code/X3DImporter.hpp b/code/X3DImporter.hpp index 2978643ad..494a44f77 100644 --- a/code/X3DImporter.hpp +++ b/code/X3DImporter.hpp @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, @@ -56,8 +57,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "BaseImporter.h" #include "irrXMLWrapper.h" -namespace Assimp -{ +namespace Assimp { /// \class X3DImporter /// Class that holding scene graph which include: groups, geometry, metadata etc. @@ -199,9 +199,7 @@ public: /***********************************************/ /// Default constructor. - X3DImporter() - : NodeElement_Cur( nullptr ), mReader( nullptr ) - {} + X3DImporter(); /// Default destructor. ~X3DImporter(); @@ -211,7 +209,7 @@ public: /***********************************************/ /// Parse X3D file and fill scene graph. The function has no return value. Result can be found by analyzing the generated graph. - /// Also exception can be throwed if trouble will found. + /// Also exception can be thrown if trouble will found. /// \param [in] pFile - name of file to be parsed. /// \param [in] pIOHandler - pointer to IO helper object. void ParseFile( const std::string& pFile, IOSystem* pIOHandler ); diff --git a/code/X3DImporter_Geometry2D.cpp b/code/X3DImporter_Geometry2D.cpp index bfa1834ec..895ba8798 100644 --- a/code/X3DImporter_Geometry2D.cpp +++ b/code/X3DImporter_Geometry2D.cpp @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/X3DImporter_Geometry3D.cpp b/code/X3DImporter_Geometry3D.cpp index 614f202cc..10dde6501 100644 --- a/code/X3DImporter_Geometry3D.cpp +++ b/code/X3DImporter_Geometry3D.cpp @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/X3DImporter_Group.cpp b/code/X3DImporter_Group.cpp index e476ba58b..e7df97b4b 100644 --- a/code/X3DImporter_Group.cpp +++ b/code/X3DImporter_Group.cpp @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/X3DImporter_Light.cpp b/code/X3DImporter_Light.cpp index 54f56e76e..ff450f7a9 100644 --- a/code/X3DImporter_Light.cpp +++ b/code/X3DImporter_Light.cpp @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/X3DImporter_Macro.hpp b/code/X3DImporter_Macro.hpp index 445edfe91..6281efcd5 100644 --- a/code/X3DImporter_Macro.hpp +++ b/code/X3DImporter_Macro.hpp @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/X3DImporter_Metadata.cpp b/code/X3DImporter_Metadata.cpp index 1f57d9f63..febc9cc2f 100644 --- a/code/X3DImporter_Metadata.cpp +++ b/code/X3DImporter_Metadata.cpp @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/X3DImporter_Networking.cpp b/code/X3DImporter_Networking.cpp index 4a75c9e66..69987e0ff 100644 --- a/code/X3DImporter_Networking.cpp +++ b/code/X3DImporter_Networking.cpp @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, @@ -48,7 +49,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "X3DImporter_Macro.hpp" // Header files, Assimp. -#include "DefaultIOSystem.h" +#include namespace Assimp { diff --git a/code/X3DImporter_Node.hpp b/code/X3DImporter_Node.hpp index 5d258dfef..7061d06bc 100644 --- a/code/X3DImporter_Node.hpp +++ b/code/X3DImporter_Node.hpp @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, @@ -466,42 +467,29 @@ public: /// \class CX3DImporter_NodeElement_Geometry3D /// Three-dimensional body. -class CX3DImporter_NodeElement_Geometry3D : public CX3DImporter_NodeElement -{ - /***********************************************/ - /****************** Variables ******************/ - /***********************************************/ - +class CX3DImporter_NodeElement_Geometry3D : public CX3DImporter_NodeElement { public: + std::list Vertices; ///< Vertices list. + size_t NumIndices;///< Number of indices in one face. + bool Solid; ///< Flag: if true then render must use back-face culling, else render must draw both sides of object. - std::list Vertices;///< Vertices list. - size_t NumIndices;///< Number of indices in one face. - bool Solid;///< Flag: if true then render must use back-face culling, else render must draw both sides of object. - - /***********************************************/ - /****************** Functions ******************/ - /***********************************************/ - -private: - - /// \fn CX3DImporter_NodeElement_Geometry3D(const CX3DImporter_NodeElement_Geometry3D& pNode) - /// Disabled copy constructor. - CX3DImporter_NodeElement_Geometry3D(const CX3DImporter_NodeElement_Geometry3D& pNode); - - /// \fn CX3DImporter_NodeElement_Geometry3D& operator=(const CX3DImporter_NodeElement_Geometry3D& pNode) - /// Disabled assign operator. - CX3DImporter_NodeElement_Geometry3D& operator=(const CX3DImporter_NodeElement_Geometry3D& pNode); - -public: - - /// \fn CX3DImporter_NodeElement_Geometry3D(const EType pType, CX3DImporter_NodeElement* pParent) /// Constructor. /// \param [in] pParent - pointer to parent node. /// \param [in] pType - type of geometry object. CX3DImporter_NodeElement_Geometry3D(const EType pType, CX3DImporter_NodeElement* pParent) - : CX3DImporter_NodeElement(pType, pParent), Solid(true) - {} + : CX3DImporter_NodeElement(pType, pParent) + , Vertices() + , NumIndices( 0 ) + , Solid(true) { + // empty + } +private: + /// Disabled copy constructor. + CX3DImporter_NodeElement_Geometry3D(const CX3DImporter_NodeElement_Geometry3D& pNode); + + /// Disabled assign operator. + CX3DImporter_NodeElement_Geometry3D& operator=(const CX3DImporter_NodeElement_Geometry3D& pNode); };// class CX3DImporter_NodeElement_Geometry3D /// \class CX3DImporter_NodeElement_ElevationGrid @@ -687,45 +675,35 @@ struct CX3DImporter_NodeElement_Appearance : public CX3DImporter_NodeElement /// \class CX3DImporter_NodeElement_Material /// Material. -class CX3DImporter_NodeElement_Material : public CX3DImporter_NodeElement -{ - /***********************************************/ - /****************** Variables ******************/ - /***********************************************/ - +class CX3DImporter_NodeElement_Material : public CX3DImporter_NodeElement { public: + float AmbientIntensity;///< Specifies how much ambient light from light sources this surface shall reflect. + aiColor3D DiffuseColor; ///< Reflects all X3D light sources depending on the angle of the surface with respect to the light source. + aiColor3D EmissiveColor; ///< Models "glowing" objects. This can be useful for displaying pre-lit models. + float Shininess; ///< Lower shininess values produce soft glows, while higher values result in sharper, smaller highlights. + aiColor3D SpecularColor; ///< The specularColor and shininess fields determine the specular highlights. + float Transparency; ///< Specifies how "clear" an object is, with 1.0 being completely transparent, and 0.0 completely opaque. - float AmbientIntensity;///< Specifies how much ambient light from light sources this surface shall reflect. - aiColor3D DiffuseColor;///< Reflects all X3D light sources depending on the angle of the surface with respect to the light source. - aiColor3D EmissiveColor;///< Models "glowing" objects. This can be useful for displaying pre-lit models. - float Shininess;///< Lower shininess values produce soft glows, while higher values result in sharper, smaller highlights. - aiColor3D SpecularColor;///< The specularColor and shininess fields determine the specular highlights. - float Transparency;///< Specifies how "clear" an object is, with 1.0 being completely transparent, and 0.0 completely opaque. - - /***********************************************/ - /****************** Functions ******************/ - /***********************************************/ - -private: - - /// \fn CX3DImporter_NodeElement_Material(const CX3DImporter_NodeElement_Material& pNode) - /// Disabled copy constructor. - CX3DImporter_NodeElement_Material(const CX3DImporter_NodeElement_Material& pNode); - - /// \fn CX3DImporter_NodeElement_Material& operator=(const CX3DImporter_NodeElement_Material& pNode) - /// Disabled assign operator. - CX3DImporter_NodeElement_Material& operator=(const CX3DImporter_NodeElement_Material& pNode); - -public: - - /// \fn CX3DImporter_NodeElement_Material(const EType pType, CX3DImporter_NodeElement* pParent) /// Constructor. /// \param [in] pParent - pointer to parent node. /// \param [in] pType - type of geometry object. CX3DImporter_NodeElement_Material(CX3DImporter_NodeElement* pParent) - : CX3DImporter_NodeElement(ENET_Material, pParent) - {} + : CX3DImporter_NodeElement(ENET_Material, pParent) + , AmbientIntensity( 0.0f ) + , DiffuseColor() + , EmissiveColor() + , Shininess( 0.0f ) + , SpecularColor() + , Transparency( 1.0f ) { + // empty + } +private: + /// Disabled copy constructor. + CX3DImporter_NodeElement_Material(const CX3DImporter_NodeElement_Material& pNode); + + /// Disabled assign operator. + CX3DImporter_NodeElement_Material& operator=(const CX3DImporter_NodeElement_Material& pNode); };// class CX3DImporter_NodeElement_Material /// \struct CX3DImporter_NodeElement_ImageTexture diff --git a/code/X3DImporter_Postprocess.cpp b/code/X3DImporter_Postprocess.cpp index 6ae47b736..0e3f3a8ae 100644 --- a/code/X3DImporter_Postprocess.cpp +++ b/code/X3DImporter_Postprocess.cpp @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, @@ -503,6 +504,9 @@ void X3DImporter::Postprocess_BuildMesh(const CX3DImporter_NodeElement& pNodeEle // copy additional information from children for(std::list::iterator ch_it = tnemesh.Child.begin(); ch_it != tnemesh.Child.end(); ch_it++) { + if ( nullptr == *pMesh ) { + break; + } if((*ch_it)->Type == CX3DImporter_NodeElement::ENET_Color) MeshGeometry_AddColor(**pMesh, ((CX3DImporter_NodeElement_Color*)*ch_it)->Value,tnemesh.ColorPerVertex); else if((*ch_it)->Type == CX3DImporter_NodeElement::ENET_ColorRGBA) @@ -627,10 +631,10 @@ void X3DImporter::Postprocess_BuildNode(const CX3DImporter_NodeElement& pNodeEle } else { - for(size_t i = 0; i < (size_t)tne_group.Choice; i++) chit_begin++;// forward iterator to choosen node. + for(size_t i = 0; i < (size_t)tne_group.Choice; i++) chit_begin++;// forward iterator to chosen node. chit_end = chit_begin; - chit_end++;// point end iterator to next element after choosen. + chit_end++;// point end iterator to next element after chosen node. } }// if(tne_group.UseChoice) }// if(pNodeElement.Type == CX3DImporter_NodeElement::ENET_Group) diff --git a/code/X3DImporter_Rendering.cpp b/code/X3DImporter_Rendering.cpp index 29dc28765..a950d3f64 100644 --- a/code/X3DImporter_Rendering.cpp +++ b/code/X3DImporter_Rendering.cpp @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/X3DImporter_Shape.cpp b/code/X3DImporter_Shape.cpp index 7b3c7da77..55ce7fa99 100644 --- a/code/X3DImporter_Shape.cpp +++ b/code/X3DImporter_Shape.cpp @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/X3DImporter_Texturing.cpp b/code/X3DImporter_Texturing.cpp index 8372a231b..40ea47797 100644 --- a/code/X3DImporter_Texturing.cpp +++ b/code/X3DImporter_Texturing.cpp @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/XFileExporter.cpp b/code/XFileExporter.cpp index eeb5a1de1..df22f0f45 100644 --- a/code/XFileExporter.cpp +++ b/code/XFileExporter.cpp @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, @@ -48,7 +49,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "BaseImporter.h" #include "fast_atof.h" #include "SceneCombiner.h" -#include "DefaultIOSystem.h" +#include #include #include #include diff --git a/code/XFileExporter.h b/code/XFileExporter.h index 389c7010c..8d3478276 100644 --- a/code/XFileExporter.h +++ b/code/XFileExporter.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/XFileHelper.h b/code/XFileHelper.h index 69f2a98f6..e7c02c7c6 100644 --- a/code/XFileHelper.h +++ b/code/XFileHelper.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, @@ -51,7 +52,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include #include -#include "Defines.h" +#include namespace Assimp { diff --git a/code/XFileImporter.cpp b/code/XFileImporter.cpp index 3b149a18a..f2b1dde7e 100644 --- a/code/XFileImporter.cpp +++ b/code/XFileImporter.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. @@ -47,17 +48,17 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "XFileImporter.h" #include "XFileParser.h" -#include "Defines.h" #include "TinyFormatter.h" #include "ConvertToLHProcess.h" +#include #include #include #include +#include + #include #include - - using namespace Assimp; using namespace Assimp::Formatter; diff --git a/code/XFileImporter.h b/code/XFileImporter.h index 1de56cbc5..528dcb851 100644 --- a/code/XFileImporter.h +++ b/code/XFileImporter.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/XFileParser.cpp b/code/XFileParser.cpp index 83d017d92..f6030a0e0 100644 --- a/code/XFileParser.cpp +++ b/code/XFileParser.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/code/XFileParser.h b/code/XFileParser.h index b0c874627..ec823bac0 100644 --- a/code/XFileParser.h +++ b/code/XFileParser.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/XGLLoader.cpp b/code/XGLLoader.cpp index d14e9968d..bafcda3f2 100644 --- a/code/XGLLoader.cpp +++ b/code/XGLLoader.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. @@ -52,6 +53,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "MemoryIOWrapper.h" #include #include +#include #include #include diff --git a/code/XGLLoader.h b/code/XGLLoader.h index c8a68ba31..97ae5f8a3 100644 --- a/code/XGLLoader.h +++ b/code/XGLLoader.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, @@ -52,6 +53,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include #include +#include struct aiNode; diff --git a/code/XMLTools.h b/code/XMLTools.h index 7339a2fc8..5d31f885e 100644 --- a/code/XMLTools.h +++ b/code/XMLTools.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/fast_atof.h b/code/fast_atof.h index 965ff0717..be1e59221 100644 --- a/code/fast_atof.h +++ b/code/fast_atof.h @@ -1,3 +1,5 @@ +#pragma once + // Copyright (C) 2002-2007 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine" and the "irrXML" project. // For conditions of distribution and use, see copyright notice in irrlicht.h and irrXML.h @@ -22,6 +24,7 @@ #include #include "StringComparison.h" +#include #ifdef _MSC_VER @@ -192,7 +195,7 @@ inline uint64_t strtoul10_64( const char* in, const char** out=0, unsigned int* uint64_t value = 0; if ( *in < '0' || *in > '9' ) - throw std::invalid_argument(std::string("The string \"") + in + "\" cannot be converted into a value."); + throw std::invalid_argument(std::string("The string \"") + in + "\" cannot be converted into a value."); bool running = true; while ( running ) @@ -202,8 +205,12 @@ inline uint64_t strtoul10_64( const char* in, const char** out=0, unsigned int* const uint64_t new_value = ( value * 10 ) + ( *in - '0' ); - if (new_value < value) /* numeric overflow, we rely on you */ - throw std::overflow_error(std::string("Converting the string \"") + in + "\" into a value resulted in overflow."); + // numeric overflow, we rely on you + if ( new_value < value ) { + DefaultLogger::get()->warn( std::string( "Converting the string \"" ) + in + "\" into a value resulted in overflow." ); + return 0; + } + //throw std::overflow_error(); value = new_value; diff --git a/code/glTFAsset.h b/code/glTFAsset.h index 2a0de7bf3..41d0dfd06 100644 --- a/code/glTFAsset.h +++ b/code/glTFAsset.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, @@ -45,8 +46,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * KHR_binary_glTF: full * KHR_materials_common: full */ -#ifndef glTFAsset_H_INC -#define glTFAsset_H_INC +#ifndef GLTFASSET_H_INC +#define GLTFASSET_H_INC + +#ifndef ASSIMP_BUILD_NO_GLTF_IMPORTER #include #include @@ -62,7 +65,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #ifdef ASSIMP_API # include -# include "DefaultIOSystem.h" +# include # include "ByteSwapper.h" #else # include @@ -210,6 +213,7 @@ namespace glTF ComponentType_UNSIGNED_BYTE = 5121, ComponentType_SHORT = 5122, ComponentType_UNSIGNED_SHORT = 5123, + ComponentType_UNSIGNED_INT = 5125, ComponentType_FLOAT = 5126 }; @@ -220,13 +224,15 @@ namespace glTF case ComponentType_UNSIGNED_SHORT: return 2; + case ComponentType_UNSIGNED_INT: case ComponentType_FLOAT: return 4; - //case Accessor::ComponentType_BYTE: - //case Accessor::ComponentType_UNSIGNED_BYTE: - default: + case ComponentType_BYTE: + case ComponentType_UNSIGNED_BYTE: return 1; + default: + throw DeadlyImportError("GLTF: Unsupported Component Type "+t); } } @@ -1183,4 +1189,6 @@ namespace glTF // Include the implementation of the methods #include "glTFAsset.inl" -#endif +#endif // ASSIMP_BUILD_NO_GLTF_IMPORTER + +#endif // GLTFASSET_H_INC diff --git a/code/glTFAsset.inl b/code/glTFAsset.inl index 4ec8c2ffe..fe29dde70 100644 --- a/code/glTFAsset.inl +++ b/code/glTFAsset.inl @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/glTFAssetWriter.h b/code/glTFAssetWriter.h index 4d2d3c919..186d32a15 100644 --- a/code/glTFAssetWriter.h +++ b/code/glTFAssetWriter.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, @@ -45,8 +46,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * KHR_binary_glTF: full * KHR_materials_common: full */ -#ifndef glTFAssetWriter_H_INC -#define glTFAssetWriter_H_INC +#ifndef GLTFASSETWRITER_H_INC +#define GLTFASSETWRITER_H_INC + +#ifndef ASSIMP_BUILD_NO_GLTF_IMPORTER #include "glTFAsset.h" @@ -87,4 +90,6 @@ public: // Include the implementation of the methods #include "glTFAssetWriter.inl" -#endif +#endif // ASSIMP_BUILD_NO_GLTF_IMPORTER + +#endif // GLTFASSETWRITER_H_INC diff --git a/code/glTFAssetWriter.inl b/code/glTFAssetWriter.inl index 1e545b497..d3a553c27 100644 --- a/code/glTFAssetWriter.inl +++ b/code/glTFAssetWriter.inl @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/glTFExporter.cpp b/code/glTFExporter.cpp index 203a46040..1fbd17d1b 100644 --- a/code/glTFExporter.cpp +++ b/code/glTFExporter.cpp @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, @@ -511,7 +512,7 @@ void glTFExporter::ExportMeshes() // Variables needed for compression. END. std::string fname = std::string(mFilename); - std::string bufferIdPrefix = fname.substr(0, fname.find(".")); + std::string bufferIdPrefix = fname.substr(0, fname.rfind(".gltf")); std::string bufferId = mAsset->FindUniqueID("", bufferIdPrefix.c_str()); Ref b = mAsset->GetBodyBuffer(); @@ -582,7 +583,7 @@ void glTFExporter::ExportMeshes() if (v) p.attributes.position.push_back(v); /******************** Normals ********************/ - if(comp_allow && (aim->mNormals > 0)) idx_srcdata_normal = b->byteLength;// Store index of normals array. + if(comp_allow && (aim->mNormals != 0)) idx_srcdata_normal = b->byteLength;// Store index of normals array. Ref n = ExportData(*mAsset, meshId, b, aim->mNumVertices, aim->mNormals, AttribType::VEC3, AttribType::VEC3, ComponentType_FLOAT); if (n) p.attributes.normal.push_back(n); @@ -839,36 +840,52 @@ void glTFExporter::ExportMetadata() asset.generator = buffer; } -inline void ExtractAnimationData(Asset& mAsset, std::string& animId, Ref& animRef, Ref& buffer, const aiNodeAnim* nodeChannel) +inline void ExtractAnimationData(Asset& mAsset, std::string& animId, Ref& animRef, Ref& buffer, const aiNodeAnim* nodeChannel, float ticksPerSecond) { // Loop over the data and check to see if it exactly matches an existing buffer. // If yes, then reference the existing corresponding accessor. // Otherwise, add to the buffer and create a new accessor. + size_t counts[3] = { + nodeChannel->mNumPositionKeys, + nodeChannel->mNumScalingKeys, + nodeChannel->mNumRotationKeys, + }; + size_t numKeyframes = 1; + for (int i = 0; i < 3; ++i) { + if (counts[i] > numKeyframes) { + numKeyframes = counts[i]; + } + } + //------------------------------------------------------- // Extract TIME parameter data. // Check if the timeStamps are the same for mPositionKeys, mRotationKeys, and mScalingKeys. if(nodeChannel->mNumPositionKeys > 0) { typedef float TimeType; std::vector timeData; - timeData.resize(nodeChannel->mNumPositionKeys); - for (size_t i = 0; i < nodeChannel->mNumPositionKeys; ++i) { - timeData[i] = nodeChannel->mPositionKeys[i].mTime; // Check if we have to cast type here. e.g. uint16_t() + timeData.resize(numKeyframes); + for (size_t i = 0; i < numKeyframes; ++i) { + size_t frameIndex = i * nodeChannel->mNumPositionKeys / numKeyframes; + // mTime is measured in ticks, but GLTF time is measured in seconds, so convert. + // Check if we have to cast type here. e.g. uint16_t() + timeData[i] = nodeChannel->mPositionKeys[frameIndex].mTime / ticksPerSecond; } - Ref timeAccessor = ExportData(mAsset, animId, buffer, nodeChannel->mNumPositionKeys, &timeData[0], AttribType::SCALAR, AttribType::SCALAR, ComponentType_FLOAT); + Ref timeAccessor = ExportData(mAsset, animId, buffer, numKeyframes, &timeData[0], AttribType::SCALAR, AttribType::SCALAR, ComponentType_FLOAT); if (timeAccessor) animRef->Parameters.TIME = timeAccessor; } //------------------------------------------------------- // Extract translation parameter data if(nodeChannel->mNumPositionKeys > 0) { - C_STRUCT aiVector3D* translationData = new aiVector3D[nodeChannel->mNumPositionKeys]; - for (size_t i = 0; i < nodeChannel->mNumPositionKeys; ++i) { - translationData[i] = nodeChannel->mPositionKeys[i].mValue; + C_STRUCT aiVector3D* translationData = new aiVector3D[numKeyframes]; + for (size_t i = 0; i < numKeyframes; ++i) { + size_t frameIndex = i * nodeChannel->mNumPositionKeys / numKeyframes; + translationData[i] = nodeChannel->mPositionKeys[frameIndex].mValue; } - Ref tranAccessor = ExportData(mAsset, animId, buffer, nodeChannel->mNumPositionKeys, translationData, AttribType::VEC3, AttribType::VEC3, ComponentType_FLOAT); + Ref tranAccessor = ExportData(mAsset, animId, buffer, numKeyframes, translationData, AttribType::VEC3, AttribType::VEC3, ComponentType_FLOAT); if ( tranAccessor ) { animRef->Parameters.translation = tranAccessor; } @@ -878,12 +895,13 @@ inline void ExtractAnimationData(Asset& mAsset, std::string& animId, RefmNumScalingKeys > 0) { - C_STRUCT aiVector3D* scaleData = new aiVector3D[nodeChannel->mNumScalingKeys]; - for (size_t i = 0; i < nodeChannel->mNumScalingKeys; ++i) { - scaleData[i] = nodeChannel->mScalingKeys[i].mValue; + C_STRUCT aiVector3D* scaleData = new aiVector3D[numKeyframes]; + for (size_t i = 0; i < numKeyframes; ++i) { + size_t frameIndex = i * nodeChannel->mNumScalingKeys / numKeyframes; + scaleData[i] = nodeChannel->mScalingKeys[frameIndex].mValue; } - Ref scaleAccessor = ExportData(mAsset, animId, buffer, nodeChannel->mNumScalingKeys, scaleData, AttribType::VEC3, AttribType::VEC3, ComponentType_FLOAT); + Ref scaleAccessor = ExportData(mAsset, animId, buffer, numKeyframes, scaleData, AttribType::VEC3, AttribType::VEC3, ComponentType_FLOAT); if ( scaleAccessor ) { animRef->Parameters.scale = scaleAccessor; } @@ -893,15 +911,16 @@ inline void ExtractAnimationData(Asset& mAsset, std::string& animId, RefmNumRotationKeys > 0) { - vec4* rotationData = new vec4[nodeChannel->mNumRotationKeys]; - for (size_t i = 0; i < nodeChannel->mNumRotationKeys; ++i) { - rotationData[i][0] = nodeChannel->mRotationKeys[i].mValue.x; - rotationData[i][1] = nodeChannel->mRotationKeys[i].mValue.y; - rotationData[i][2] = nodeChannel->mRotationKeys[i].mValue.z; - rotationData[i][3] = nodeChannel->mRotationKeys[i].mValue.w; + vec4* rotationData = new vec4[numKeyframes]; + for (size_t i = 0; i < numKeyframes; ++i) { + size_t frameIndex = i * nodeChannel->mNumRotationKeys / numKeyframes; + rotationData[i][0] = nodeChannel->mRotationKeys[frameIndex].mValue.x; + rotationData[i][1] = nodeChannel->mRotationKeys[frameIndex].mValue.y; + rotationData[i][2] = nodeChannel->mRotationKeys[frameIndex].mValue.z; + rotationData[i][3] = nodeChannel->mRotationKeys[frameIndex].mValue.w; } - Ref rotAccessor = ExportData(mAsset, animId, buffer, nodeChannel->mNumRotationKeys, rotationData, AttribType::VEC4, AttribType::VEC4, ComponentType_FLOAT); + Ref rotAccessor = ExportData(mAsset, animId, buffer, numKeyframes, rotationData, AttribType::VEC4, AttribType::VEC4, ComponentType_FLOAT); if ( rotAccessor ) { animRef->Parameters.rotation = rotAccessor; } @@ -931,7 +950,7 @@ void glTFExporter::ExportAnimations() Ref animRef = mAsset->animations.Create(name); /******************* Parameters ********************/ - ExtractAnimationData(*mAsset, name, animRef, bufferRef, nodeChannel); + ExtractAnimationData(*mAsset, name, animRef, bufferRef, nodeChannel, anim->mTicksPerSecond); for (unsigned int j = 0; j < 3; ++j) { std::string channelType; diff --git a/code/glTFExporter.h b/code/glTFExporter.h index 49df9193e..c813fff44 100644 --- a/code/glTFExporter.h +++ b/code/glTFExporter.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, @@ -44,6 +45,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #ifndef AI_GLTFEXPORTER_H_INC #define AI_GLTFEXPORTER_H_INC +#ifndef ASSIMP_BUILD_NO_GLTF_IMPORTER + #include #include @@ -110,4 +113,6 @@ namespace Assimp } -#endif +#endif // ASSIMP_BUILD_NO_GLTF_IMPORTER + +#endif // AI_GLTFEXPORTER_H_INC diff --git a/code/glTFImporter.cpp b/code/glTFImporter.cpp index 65a600f83..0ded26294 100644 --- a/code/glTFImporter.cpp +++ b/code/glTFImporter.cpp @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, @@ -48,6 +49,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include #include +#include + #include #include "MakeVerboseFormat.h" diff --git a/code/glTFImporter.h b/code/glTFImporter.h index 5d06730a5..46f450f86 100644 --- a/code/glTFImporter.h +++ b/code/glTFImporter.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, @@ -41,7 +42,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #define AI_GLTFIMPORTER_H_INC #include "BaseImporter.h" -#include "DefaultIOSystem.h" +#include struct aiNode; diff --git a/code/irrXMLWrapper.h b/code/irrXMLWrapper.h index 5b47faefe..d7c76bf87 100644 --- a/code/irrXMLWrapper.h +++ b/code/irrXMLWrapper.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, @@ -42,7 +43,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #define INCLUDED_AI_IRRXML_WRAPPER // some long includes .... -#include "./../contrib/irrXML/irrXML.h" +#include #include "./../include/assimp/IOStream.hpp" #include "BaseImporter.h" #include diff --git a/code/qnan.h b/code/qnan.h index 80d6229f9..fcff16b74 100644 --- a/code/qnan.h +++ b/code/qnan.h @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/code/res/assimp.rc b/code/res/assimp.rc index 78f9d852b..0fe98c05d 100644 --- a/code/res/assimp.rc +++ b/code/res/assimp.rc @@ -1,80 +1,80 @@ -// 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 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 - +// 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 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/code/scene.cpp b/code/scene.cpp index fe95b3ae4..467a2895d 100644 --- a/code/scene.cpp +++ b/code/scene.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/contrib/CMakeLists.txt b/contrib/CMakeLists.txt new file mode 100644 index 000000000..362f1653d --- /dev/null +++ b/contrib/CMakeLists.txt @@ -0,0 +1,4 @@ +# Compile internal irrXML only if system is not requested +if( NOT SYSTEM_IRRXML ) + add_subdirectory(irrXML) +endif( NOT SYSTEM_IRRXML ) diff --git a/contrib/irrXML/CMakeLists.txt b/contrib/irrXML/CMakeLists.txt new file mode 100644 index 000000000..82ede3a04 --- /dev/null +++ b/contrib/irrXML/CMakeLists.txt @@ -0,0 +1,13 @@ +set( IrrXML_SRCS + CXMLReaderImpl.h + heapsort.h + irrArray.h + irrString.h + irrTypes.h + irrXML.cpp + irrXML.h +) + +add_library(IrrXML STATIC ${IrrXML_SRCS}) +set(IRRXML_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}" CACHE INTERNAL "IrrXML_Include" ) +set(IRRXML_LIBRARY "IrrXML" CACHE INTERNAL "IrrXML" ) diff --git a/contrib/poly2tri/poly2tri/sweep/cdt.cc b/contrib/poly2tri/poly2tri/sweep/cdt.cc index f013e47e3..d7838257c 100644 --- a/contrib/poly2tri/poly2tri/sweep/cdt.cc +++ b/contrib/poly2tri/poly2tri/sweep/cdt.cc @@ -1,72 +1,72 @@ -/* - * Poly2Tri Copyright (c) 2009-2010, Poly2Tri Contributors - * http://code.google.com/p/poly2tri/ - * - * All rights reserved. - * - * 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 Poly2Tri 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. - */ -#include "cdt.h" - -namespace p2t { - -CDT::CDT(std::vector polyline) -{ - sweep_context_ = new SweepContext(polyline); - sweep_ = new Sweep; -} - -void CDT::AddHole(std::vector polyline) -{ - sweep_context_->AddHole(polyline); -} - -void CDT::AddPoint(Point* point) { - sweep_context_->AddPoint(point); -} - -void CDT::Triangulate() -{ - sweep_->Triangulate(*sweep_context_); -} - -std::vector CDT::GetTriangles() -{ - return sweep_context_->GetTriangles(); -} - -std::list CDT::GetMap() -{ - return sweep_context_->GetMap(); -} - -CDT::~CDT() -{ - delete sweep_context_; - delete sweep_; -} - -} - +/* + * Poly2Tri Copyright (c) 2009-2010, Poly2Tri Contributors + * http://code.google.com/p/poly2tri/ + * + * All rights reserved. + * + * 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 Poly2Tri 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. + */ +#include "cdt.h" + +namespace p2t { + +CDT::CDT(std::vector polyline) +{ + sweep_context_ = new SweepContext(polyline); + sweep_ = new Sweep; +} + +void CDT::AddHole(std::vector polyline) +{ + sweep_context_->AddHole(polyline); +} + +void CDT::AddPoint(Point* point) { + sweep_context_->AddPoint(point); +} + +void CDT::Triangulate() +{ + sweep_->Triangulate(*sweep_context_); +} + +std::vector CDT::GetTriangles() +{ + return sweep_context_->GetTriangles(); +} + +std::list CDT::GetMap() +{ + return sweep_context_->GetMap(); +} + +CDT::~CDT() +{ + delete sweep_context_; + delete sweep_; +} + +} + diff --git a/contrib/poly2tri/poly2tri/sweep/sweep.cc b/contrib/poly2tri/poly2tri/sweep/sweep.cc index d3e35aebf..ed7c49ac4 100644 --- a/contrib/poly2tri/poly2tri/sweep/sweep.cc +++ b/contrib/poly2tri/poly2tri/sweep/sweep.cc @@ -1,750 +1,750 @@ -/* - * Poly2Tri Copyright (c) 2009-2010, Poly2Tri Contributors - * http://code.google.com/p/poly2tri/ - * - * All rights reserved. - * - * 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 Poly2Tri 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. - */ -#include -#include "sweep.h" -#include "sweep_context.h" -#include "advancing_front.h" -#include "../common/utils.h" - -namespace p2t { - -// Triangulate simple polygon with holes -void Sweep::Triangulate(SweepContext& tcx) -{ - tcx.InitTriangulation(); - tcx.CreateAdvancingFront(nodes_); - // Sweep points; build mesh - SweepPoints(tcx); - // Clean up - FinalizationPolygon(tcx); -} - -void Sweep::SweepPoints(SweepContext& tcx) -{ - for (int i = 1; i < tcx.point_count(); i++) { - Point& point = *tcx.GetPoint(i); - Node* node = &PointEvent(tcx, point); - for (unsigned int i = 0; i < point.edge_list.size(); i++) { - EdgeEvent(tcx, point.edge_list[i], node); - } - } -} - -void Sweep::FinalizationPolygon(SweepContext& tcx) -{ - // Get an Internal triangle to start with - Triangle* t = tcx.front()->head()->next->triangle; - Point* p = tcx.front()->head()->next->point; - while (!t->GetConstrainedEdgeCW(*p)) { - t = t->NeighborCCW(*p); - } - - // Collect interior triangles constrained by edges - tcx.MeshClean(*t); -} - -Node& Sweep::PointEvent(SweepContext& tcx, Point& point) -{ - Node& node = tcx.LocateNode(point); - Node& new_node = NewFrontTriangle(tcx, point, node); - - // Only need to check +epsilon since point never have smaller - // x value than node due to how we fetch nodes from the front - if (point.x <= node.point->x + EPSILON) { - Fill(tcx, node); - } - - //tcx.AddNode(new_node); - - FillAdvancingFront(tcx, new_node); - return new_node; -} - -void Sweep::EdgeEvent(SweepContext& tcx, Edge* edge, Node* node) -{ - tcx.edge_event.constrained_edge = edge; - tcx.edge_event.right = (edge->p->x > edge->q->x); - - if (IsEdgeSideOfTriangle(*node->triangle, *edge->p, *edge->q)) { - return; - } - - // For now we will do all needed filling - // TODO: integrate with flip process might give some better performance - // but for now this avoid the issue with cases that needs both flips and fills - FillEdgeEvent(tcx, edge, node); - EdgeEvent(tcx, *edge->p, *edge->q, node->triangle, *edge->q); -} - -void Sweep::EdgeEvent(SweepContext& tcx, Point& ep, Point& eq, Triangle* triangle, Point& point) -{ - if (IsEdgeSideOfTriangle(*triangle, ep, eq)) { - return; - } - - Point* p1 = triangle->PointCCW(point); - Orientation o1 = Orient2d(eq, *p1, ep); - if (o1 == COLLINEAR) { - // ASSIMP_CHANGE (aramis_acg) - throw std::runtime_error("EdgeEvent - collinear points not supported"); - if( triangle->Contains(&eq, p1)) { - triangle->MarkConstrainedEdge(&eq, p1 ); - // We are modifying the constraint maybe it would be better to - // not change the given constraint and just keep a variable for the new constraint - tcx.edge_event.constrained_edge->q = p1; - triangle = &triangle->NeighborAcross(point); - EdgeEvent( tcx, ep, *p1, triangle, *p1 ); - } else { - // ASSIMP_CHANGE (aramis_acg) - std::runtime_error("EdgeEvent - collinear points not supported"); - } - return; - } - - Point* p2 = triangle->PointCW(point); - Orientation o2 = Orient2d(eq, *p2, ep); - if (o2 == COLLINEAR) { - // ASSIMP_CHANGE (aramis_acg) - throw std::runtime_error("EdgeEvent - collinear points not supported"); - - if( triangle->Contains(&eq, p2)) { - triangle->MarkConstrainedEdge(&eq, p2 ); - // We are modifying the constraint maybe it would be better to - // not change the given constraint and just keep a variable for the new constraint - tcx.edge_event.constrained_edge->q = p2; - triangle = &triangle->NeighborAcross(point); - EdgeEvent( tcx, ep, *p2, triangle, *p2 ); - } else { - // ASSIMP_CHANGE (aramis_acg) - throw std::runtime_error("EdgeEvent - collinear points not supported"); - } - return; - } - - if (o1 == o2) { - // Need to decide if we are rotating CW or CCW to get to a triangle - // that will cross edge - if (o1 == CW) { - triangle = triangle->NeighborCCW(point); - } else{ - triangle = triangle->NeighborCW(point); - } - EdgeEvent(tcx, ep, eq, triangle, point); - } else { - // This triangle crosses constraint so lets flippin start! - FlipEdgeEvent(tcx, ep, eq, triangle, point); - } -} - -bool Sweep::IsEdgeSideOfTriangle(Triangle& triangle, Point& ep, Point& eq) -{ - int index = triangle.EdgeIndex(&ep, &eq); - - if (index != -1) { - triangle.MarkConstrainedEdge(index); - Triangle* t = triangle.GetNeighbor(index); - if (t) { - t->MarkConstrainedEdge(&ep, &eq); - } - return true; - } - return false; -} - -Node& Sweep::NewFrontTriangle(SweepContext& tcx, Point& point, Node& node) -{ - Triangle* triangle = new Triangle(point, *node.point, *node.next->point); - - triangle->MarkNeighbor(*node.triangle); - tcx.AddToMap(triangle); - - Node* new_node = new Node(point); - nodes_.push_back(new_node); - - new_node->next = node.next; - new_node->prev = &node; - node.next->prev = new_node; - node.next = new_node; - - if (!Legalize(tcx, *triangle)) { - tcx.MapTriangleToNodes(*triangle); - } - - return *new_node; -} - -void Sweep::Fill(SweepContext& tcx, Node& node) -{ - Triangle* triangle = new Triangle(*node.prev->point, *node.point, *node.next->point); - - // TODO: should copy the constrained_edge value from neighbor triangles - // for now constrained_edge values are copied during the legalize - triangle->MarkNeighbor(*node.prev->triangle); - triangle->MarkNeighbor(*node.triangle); - - tcx.AddToMap(triangle); - - // Update the advancing front - node.prev->next = node.next; - node.next->prev = node.prev; - - // If it was legalized the triangle has already been mapped - if (!Legalize(tcx, *triangle)) { - tcx.MapTriangleToNodes(*triangle); - } - -} - -void Sweep::FillAdvancingFront(SweepContext& tcx, Node& n) -{ - - // Fill right holes - Node* node = n.next; - - while (node->next) { - double angle = HoleAngle(*node); - if (angle > PI_2 || angle < -PI_2) break; - Fill(tcx, *node); - node = node->next; - } - - // Fill left holes - node = n.prev; - - while (node->prev) { - double angle = HoleAngle(*node); - if (angle > PI_2 || angle < -PI_2) break; - Fill(tcx, *node); - node = node->prev; - } - - // Fill right basins - if (n.next && n.next->next) { - double angle = BasinAngle(n); - if (angle < PI_3div4) { - FillBasin(tcx, n); - } - } -} - -double Sweep::BasinAngle(Node& node) -{ - double ax = node.point->x - node.next->next->point->x; - double ay = node.point->y - node.next->next->point->y; - return atan2(ay, ax); -} - -double Sweep::HoleAngle(Node& node) -{ - /* Complex plane - * ab = cosA +i*sinA - * ab = (ax + ay*i)(bx + by*i) = (ax*bx + ay*by) + i(ax*by-ay*bx) - * atan2(y,x) computes the principal value of the argument function - * applied to the complex number x+iy - * Where x = ax*bx + ay*by - * y = ax*by - ay*bx - */ - double ax = node.next->point->x - node.point->x; - double ay = node.next->point->y - node.point->y; - double bx = node.prev->point->x - node.point->x; - double by = node.prev->point->y - node.point->y; - return atan2(ax * by - ay * bx, ax * bx + ay * by); -} - -bool Sweep::Legalize(SweepContext& tcx, Triangle& t) -{ - // To legalize a triangle we start by finding if any of the three edges - // violate the Delaunay condition - for (int i = 0; i < 3; i++) { - if (t.delaunay_edge[i]) - continue; - - Triangle* ot = t.GetNeighbor(i); - - if (ot) { - Point* p = t.GetPoint(i); - Point* op = ot->OppositePoint(t, *p); - int oi = ot->Index(op); - - // If this is a Constrained Edge or a Delaunay Edge(only during recursive legalization) - // then we should not try to legalize - if (ot->constrained_edge[oi] || ot->delaunay_edge[oi]) { - t.constrained_edge[i] = ot->constrained_edge[oi]; - continue; - } - - bool inside = Incircle(*p, *t.PointCCW(*p), *t.PointCW(*p), *op); - - if (inside) { - // Lets mark this shared edge as Delaunay - t.delaunay_edge[i] = true; - ot->delaunay_edge[oi] = true; - - // Lets rotate shared edge one vertex CW to legalize it - RotateTrianglePair(t, *p, *ot, *op); - - // We now got one valid Delaunay Edge shared by two triangles - // This gives us 4 new edges to check for Delaunay - - // Make sure that triangle to node mapping is done only one time for a specific triangle - bool not_legalized = !Legalize(tcx, t); - if (not_legalized) { - tcx.MapTriangleToNodes(t); - } - - not_legalized = !Legalize(tcx, *ot); - if (not_legalized) - tcx.MapTriangleToNodes(*ot); - - // Reset the Delaunay edges, since they only are valid Delaunay edges - // until we add a new triangle or point. - // XXX: need to think about this. Can these edges be tried after we - // return to previous recursive level? - t.delaunay_edge[i] = false; - ot->delaunay_edge[oi] = false; - - // If triangle have been legalized no need to check the other edges since - // the recursive legalization will handles those so we can end here. - return true; - } - } - } - return false; -} - -bool Sweep::Incircle(Point& pa, Point& pb, Point& pc, Point& pd) -{ - double adx = pa.x - pd.x; - double ady = pa.y - pd.y; - double bdx = pb.x - pd.x; - double bdy = pb.y - pd.y; - - double adxbdy = adx * bdy; - double bdxady = bdx * ady; - double oabd = adxbdy - bdxady; - - if (oabd <= 0) - return false; - - double cdx = pc.x - pd.x; - double cdy = pc.y - pd.y; - - double cdxady = cdx * ady; - double adxcdy = adx * cdy; - double ocad = cdxady - adxcdy; - - if (ocad <= 0) - return false; - - double bdxcdy = bdx * cdy; - double cdxbdy = cdx * bdy; - - double alift = adx * adx + ady * ady; - double blift = bdx * bdx + bdy * bdy; - double clift = cdx * cdx + cdy * cdy; - - double det = alift * (bdxcdy - cdxbdy) + blift * ocad + clift * oabd; - - return det > 0; -} - -void Sweep::RotateTrianglePair(Triangle& t, Point& p, Triangle& ot, Point& op) -{ - Triangle* n1, *n2, *n3, *n4; - n1 = t.NeighborCCW(p); - n2 = t.NeighborCW(p); - n3 = ot.NeighborCCW(op); - n4 = ot.NeighborCW(op); - - bool ce1, ce2, ce3, ce4; - ce1 = t.GetConstrainedEdgeCCW(p); - ce2 = t.GetConstrainedEdgeCW(p); - ce3 = ot.GetConstrainedEdgeCCW(op); - ce4 = ot.GetConstrainedEdgeCW(op); - - bool de1, de2, de3, de4; - de1 = t.GetDelunayEdgeCCW(p); - de2 = t.GetDelunayEdgeCW(p); - de3 = ot.GetDelunayEdgeCCW(op); - de4 = ot.GetDelunayEdgeCW(op); - - t.Legalize(p, op); - ot.Legalize(op, p); - - // Remap delaunay_edge - ot.SetDelunayEdgeCCW(p, de1); - t.SetDelunayEdgeCW(p, de2); - t.SetDelunayEdgeCCW(op, de3); - ot.SetDelunayEdgeCW(op, de4); - - // Remap constrained_edge - ot.SetConstrainedEdgeCCW(p, ce1); - t.SetConstrainedEdgeCW(p, ce2); - t.SetConstrainedEdgeCCW(op, ce3); - ot.SetConstrainedEdgeCW(op, ce4); - - // Remap neighbors - // XXX: might optimize the markNeighbor by keeping track of - // what side should be assigned to what neighbor after the - // rotation. Now mark neighbor does lots of testing to find - // the right side. - t.ClearNeighbors(); - ot.ClearNeighbors(); - if (n1) ot.MarkNeighbor(*n1); - if (n2) t.MarkNeighbor(*n2); - if (n3) t.MarkNeighbor(*n3); - if (n4) ot.MarkNeighbor(*n4); - t.MarkNeighbor(ot); -} - -void Sweep::FillBasin(SweepContext& tcx, Node& node) -{ - if (Orient2d(*node.point, *node.next->point, *node.next->next->point) == CCW) { - tcx.basin.left_node = node.next->next; - } else { - tcx.basin.left_node = node.next; - } - - // Find the bottom and right node - tcx.basin.bottom_node = tcx.basin.left_node; - while (tcx.basin.bottom_node->next - && tcx.basin.bottom_node->point->y >= tcx.basin.bottom_node->next->point->y) { - tcx.basin.bottom_node = tcx.basin.bottom_node->next; - } - if (tcx.basin.bottom_node == tcx.basin.left_node) { - // No valid basin - return; - } - - tcx.basin.right_node = tcx.basin.bottom_node; - while (tcx.basin.right_node->next - && tcx.basin.right_node->point->y < tcx.basin.right_node->next->point->y) { - tcx.basin.right_node = tcx.basin.right_node->next; - } - if (tcx.basin.right_node == tcx.basin.bottom_node) { - // No valid basins - return; - } - - tcx.basin.width = tcx.basin.right_node->point->x - tcx.basin.left_node->point->x; - tcx.basin.left_highest = tcx.basin.left_node->point->y > tcx.basin.right_node->point->y; - - FillBasinReq(tcx, tcx.basin.bottom_node); -} - -void Sweep::FillBasinReq(SweepContext& tcx, Node* node) -{ - // if shallow stop filling - if (IsShallow(tcx, *node)) { - return; - } - - Fill(tcx, *node); - - if (node->prev == tcx.basin.left_node && node->next == tcx.basin.right_node) { - return; - } else if (node->prev == tcx.basin.left_node) { - Orientation o = Orient2d(*node->point, *node->next->point, *node->next->next->point); - if (o == CW) { - return; - } - node = node->next; - } else if (node->next == tcx.basin.right_node) { - Orientation o = Orient2d(*node->point, *node->prev->point, *node->prev->prev->point); - if (o == CCW) { - return; - } - node = node->prev; - } else { - // Continue with the neighbor node with lowest Y value - if (node->prev->point->y < node->next->point->y) { - node = node->prev; - } else { - node = node->next; - } - } - - FillBasinReq(tcx, node); -} - -bool Sweep::IsShallow(SweepContext& tcx, Node& node) -{ - double height; - - if (tcx.basin.left_highest) { - height = tcx.basin.left_node->point->y - node.point->y; - } else { - height = tcx.basin.right_node->point->y - node.point->y; - } - - // if shallow stop filling - if (tcx.basin.width > height) { - return true; - } - return false; -} - -void Sweep::FillEdgeEvent(SweepContext& tcx, Edge* edge, Node* node) -{ - if (tcx.edge_event.right) { - FillRightAboveEdgeEvent(tcx, edge, node); - } else { - FillLeftAboveEdgeEvent(tcx, edge, node); - } -} - -void Sweep::FillRightAboveEdgeEvent(SweepContext& tcx, Edge* edge, Node* node) -{ - while (node->next->point->x < edge->p->x) { - // Check if next node is below the edge - if (Orient2d(*edge->q, *node->next->point, *edge->p) == CCW) { - FillRightBelowEdgeEvent(tcx, edge, *node); - } else { - node = node->next; - } - } -} - -void Sweep::FillRightBelowEdgeEvent(SweepContext& tcx, Edge* edge, Node& node) -{ - if (node.point->x < edge->p->x) { - if (Orient2d(*node.point, *node.next->point, *node.next->next->point) == CCW) { - // Concave - FillRightConcaveEdgeEvent(tcx, edge, node); - } else{ - // Convex - FillRightConvexEdgeEvent(tcx, edge, node); - // Retry this one - FillRightBelowEdgeEvent(tcx, edge, node); - } - } -} - -void Sweep::FillRightConcaveEdgeEvent(SweepContext& tcx, Edge* edge, Node& node) -{ - Fill(tcx, *node.next); - if (node.next->point != edge->p) { - // Next above or below edge? - if (Orient2d(*edge->q, *node.next->point, *edge->p) == CCW) { - // Below - if (Orient2d(*node.point, *node.next->point, *node.next->next->point) == CCW) { - // Next is concave - FillRightConcaveEdgeEvent(tcx, edge, node); - } else { - // Next is convex - } - } - } - -} - -void Sweep::FillRightConvexEdgeEvent(SweepContext& tcx, Edge* edge, Node& node) -{ - // Next concave or convex? - if (Orient2d(*node.next->point, *node.next->next->point, *node.next->next->next->point) == CCW) { - // Concave - FillRightConcaveEdgeEvent(tcx, edge, *node.next); - } else{ - // Convex - // Next above or below edge? - if (Orient2d(*edge->q, *node.next->next->point, *edge->p) == CCW) { - // Below - FillRightConvexEdgeEvent(tcx, edge, *node.next); - } else{ - // Above - } - } -} - -void Sweep::FillLeftAboveEdgeEvent(SweepContext& tcx, Edge* edge, Node* node) -{ - while (node->prev->point->x > edge->p->x) { - // Check if next node is below the edge - if (Orient2d(*edge->q, *node->prev->point, *edge->p) == CW) { - FillLeftBelowEdgeEvent(tcx, edge, *node); - } else { - node = node->prev; - } - } -} - -void Sweep::FillLeftBelowEdgeEvent(SweepContext& tcx, Edge* edge, Node& node) -{ - if (node.point->x > edge->p->x) { - if (Orient2d(*node.point, *node.prev->point, *node.prev->prev->point) == CW) { - // Concave - FillLeftConcaveEdgeEvent(tcx, edge, node); - } else { - // Convex - FillLeftConvexEdgeEvent(tcx, edge, node); - // Retry this one - FillLeftBelowEdgeEvent(tcx, edge, node); - } - } -} - -void Sweep::FillLeftConvexEdgeEvent(SweepContext& tcx, Edge* edge, Node& node) -{ - // Next concave or convex? - if (Orient2d(*node.prev->point, *node.prev->prev->point, *node.prev->prev->prev->point) == CW) { - // Concave - FillLeftConcaveEdgeEvent(tcx, edge, *node.prev); - } else{ - // Convex - // Next above or below edge? - if (Orient2d(*edge->q, *node.prev->prev->point, *edge->p) == CW) { - // Below - FillLeftConvexEdgeEvent(tcx, edge, *node.prev); - } else{ - // Above - } - } -} - -void Sweep::FillLeftConcaveEdgeEvent(SweepContext& tcx, Edge* edge, Node& node) -{ - Fill(tcx, *node.prev); - if (node.prev->point != edge->p) { - // Next above or below edge? - if (Orient2d(*edge->q, *node.prev->point, *edge->p) == CW) { - // Below - if (Orient2d(*node.point, *node.prev->point, *node.prev->prev->point) == CW) { - // Next is concave - FillLeftConcaveEdgeEvent(tcx, edge, node); - } else{ - // Next is convex - } - } - } - -} - -void Sweep::FlipEdgeEvent(SweepContext& tcx, Point& ep, Point& eq, Triangle* t, Point& p) -{ - Triangle& ot = t->NeighborAcross(p); - Point& op = *ot.OppositePoint(*t, p); - - if (InScanArea(p, *t->PointCCW(p), *t->PointCW(p), op)) { - // Lets rotate shared edge one vertex CW - RotateTrianglePair(*t, p, ot, op); - tcx.MapTriangleToNodes(*t); - tcx.MapTriangleToNodes(ot); - - if (p == eq && op == ep) { - if (eq == *tcx.edge_event.constrained_edge->q && ep == *tcx.edge_event.constrained_edge->p) { - t->MarkConstrainedEdge(&ep, &eq); - ot.MarkConstrainedEdge(&ep, &eq); - Legalize(tcx, *t); - Legalize(tcx, ot); - } else { - // XXX: I think one of the triangles should be legalized here? - } - } else { - Orientation o = Orient2d(eq, op, ep); - t = &NextFlipTriangle(tcx, (int)o, *t, ot, p, op); - FlipEdgeEvent(tcx, ep, eq, t, p); - } - } else { - Point& newP = NextFlipPoint(ep, eq, ot, op); - FlipScanEdgeEvent(tcx, ep, eq, *t, ot, newP); - EdgeEvent(tcx, ep, eq, t, p); - } -} - -Triangle& Sweep::NextFlipTriangle(SweepContext& tcx, int o, Triangle& t, Triangle& ot, Point& p, Point& op) -{ - if (o == CCW) { - // ot is not crossing edge after flip - int edge_index = ot.EdgeIndex(&p, &op); - ot.delaunay_edge[edge_index] = true; - Legalize(tcx, ot); - ot.ClearDelunayEdges(); - return t; - } - - // t is not crossing edge after flip - int edge_index = t.EdgeIndex(&p, &op); - - t.delaunay_edge[edge_index] = true; - Legalize(tcx, t); - t.ClearDelunayEdges(); - return ot; -} - -Point& Sweep::NextFlipPoint(Point& ep, Point& eq, Triangle& ot, Point& op) -{ - Orientation o2d = Orient2d(eq, op, ep); - if (o2d == CW) { - // Right - return *ot.PointCCW(op); - } else if (o2d == CCW) { - // Left - return *ot.PointCW(op); - } else{ - //throw new RuntimeException("[Unsupported] Opposing point on constrained edge"); - // ASSIMP_CHANGE (aramis_acg) - throw std::runtime_error("[Unsupported] Opposing point on constrained edge"); - } -} - -void Sweep::FlipScanEdgeEvent(SweepContext& tcx, Point& ep, Point& eq, Triangle& flip_triangle, - Triangle& t, Point& p) -{ - Triangle& ot = t.NeighborAcross(p); - Point& op = *ot.OppositePoint(t, p); - - if (InScanArea(eq, *flip_triangle.PointCCW(eq), *flip_triangle.PointCW(eq), op)) { - // flip with new edge op->eq - FlipEdgeEvent(tcx, eq, op, &ot, op); - // TODO: Actually I just figured out that it should be possible to - // improve this by getting the next ot and op before the the above - // flip and continue the flipScanEdgeEvent here - // set new ot and op here and loop back to inScanArea test - // also need to set a new flip_triangle first - // Turns out at first glance that this is somewhat complicated - // so it will have to wait. - } else{ - Point& newP = NextFlipPoint(ep, eq, ot, op); - FlipScanEdgeEvent(tcx, ep, eq, flip_triangle, ot, newP); - } -} - -Sweep::~Sweep() { - - // Clean up memory - for(unsigned int i = 0; i < nodes_.size(); i++) { - delete nodes_[i]; - } - -} - -} - +/* + * Poly2Tri Copyright (c) 2009-2010, Poly2Tri Contributors + * http://code.google.com/p/poly2tri/ + * + * All rights reserved. + * + * 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 Poly2Tri 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. + */ +#include +#include "sweep.h" +#include "sweep_context.h" +#include "advancing_front.h" +#include "../common/utils.h" + +namespace p2t { + +// Triangulate simple polygon with holes +void Sweep::Triangulate(SweepContext& tcx) +{ + tcx.InitTriangulation(); + tcx.CreateAdvancingFront(nodes_); + // Sweep points; build mesh + SweepPoints(tcx); + // Clean up + FinalizationPolygon(tcx); +} + +void Sweep::SweepPoints(SweepContext& tcx) +{ + for (int i = 1; i < tcx.point_count(); i++) { + Point& point = *tcx.GetPoint(i); + Node* node = &PointEvent(tcx, point); + for (unsigned int i = 0; i < point.edge_list.size(); i++) { + EdgeEvent(tcx, point.edge_list[i], node); + } + } +} + +void Sweep::FinalizationPolygon(SweepContext& tcx) +{ + // Get an Internal triangle to start with + Triangle* t = tcx.front()->head()->next->triangle; + Point* p = tcx.front()->head()->next->point; + while (!t->GetConstrainedEdgeCW(*p)) { + t = t->NeighborCCW(*p); + } + + // Collect interior triangles constrained by edges + tcx.MeshClean(*t); +} + +Node& Sweep::PointEvent(SweepContext& tcx, Point& point) +{ + Node& node = tcx.LocateNode(point); + Node& new_node = NewFrontTriangle(tcx, point, node); + + // Only need to check +epsilon since point never have smaller + // x value than node due to how we fetch nodes from the front + if (point.x <= node.point->x + EPSILON) { + Fill(tcx, node); + } + + //tcx.AddNode(new_node); + + FillAdvancingFront(tcx, new_node); + return new_node; +} + +void Sweep::EdgeEvent(SweepContext& tcx, Edge* edge, Node* node) +{ + tcx.edge_event.constrained_edge = edge; + tcx.edge_event.right = (edge->p->x > edge->q->x); + + if (IsEdgeSideOfTriangle(*node->triangle, *edge->p, *edge->q)) { + return; + } + + // For now we will do all needed filling + // TODO: integrate with flip process might give some better performance + // but for now this avoid the issue with cases that needs both flips and fills + FillEdgeEvent(tcx, edge, node); + EdgeEvent(tcx, *edge->p, *edge->q, node->triangle, *edge->q); +} + +void Sweep::EdgeEvent(SweepContext& tcx, Point& ep, Point& eq, Triangle* triangle, Point& point) +{ + if (IsEdgeSideOfTriangle(*triangle, ep, eq)) { + return; + } + + Point* p1 = triangle->PointCCW(point); + Orientation o1 = Orient2d(eq, *p1, ep); + if (o1 == COLLINEAR) { + // ASSIMP_CHANGE (aramis_acg) + throw std::runtime_error("EdgeEvent - collinear points not supported"); + if( triangle->Contains(&eq, p1)) { + triangle->MarkConstrainedEdge(&eq, p1 ); + // We are modifying the constraint maybe it would be better to + // not change the given constraint and just keep a variable for the new constraint + tcx.edge_event.constrained_edge->q = p1; + triangle = &triangle->NeighborAcross(point); + EdgeEvent( tcx, ep, *p1, triangle, *p1 ); + } else { + // ASSIMP_CHANGE (aramis_acg) + std::runtime_error("EdgeEvent - collinear points not supported"); + } + return; + } + + Point* p2 = triangle->PointCW(point); + Orientation o2 = Orient2d(eq, *p2, ep); + if (o2 == COLLINEAR) { + // ASSIMP_CHANGE (aramis_acg) + throw std::runtime_error("EdgeEvent - collinear points not supported"); + + if( triangle->Contains(&eq, p2)) { + triangle->MarkConstrainedEdge(&eq, p2 ); + // We are modifying the constraint maybe it would be better to + // not change the given constraint and just keep a variable for the new constraint + tcx.edge_event.constrained_edge->q = p2; + triangle = &triangle->NeighborAcross(point); + EdgeEvent( tcx, ep, *p2, triangle, *p2 ); + } else { + // ASSIMP_CHANGE (aramis_acg) + throw std::runtime_error("EdgeEvent - collinear points not supported"); + } + return; + } + + if (o1 == o2) { + // Need to decide if we are rotating CW or CCW to get to a triangle + // that will cross edge + if (o1 == CW) { + triangle = triangle->NeighborCCW(point); + } else{ + triangle = triangle->NeighborCW(point); + } + EdgeEvent(tcx, ep, eq, triangle, point); + } else { + // This triangle crosses constraint so lets flippin start! + FlipEdgeEvent(tcx, ep, eq, triangle, point); + } +} + +bool Sweep::IsEdgeSideOfTriangle(Triangle& triangle, Point& ep, Point& eq) +{ + int index = triangle.EdgeIndex(&ep, &eq); + + if (index != -1) { + triangle.MarkConstrainedEdge(index); + Triangle* t = triangle.GetNeighbor(index); + if (t) { + t->MarkConstrainedEdge(&ep, &eq); + } + return true; + } + return false; +} + +Node& Sweep::NewFrontTriangle(SweepContext& tcx, Point& point, Node& node) +{ + Triangle* triangle = new Triangle(point, *node.point, *node.next->point); + + triangle->MarkNeighbor(*node.triangle); + tcx.AddToMap(triangle); + + Node* new_node = new Node(point); + nodes_.push_back(new_node); + + new_node->next = node.next; + new_node->prev = &node; + node.next->prev = new_node; + node.next = new_node; + + if (!Legalize(tcx, *triangle)) { + tcx.MapTriangleToNodes(*triangle); + } + + return *new_node; +} + +void Sweep::Fill(SweepContext& tcx, Node& node) +{ + Triangle* triangle = new Triangle(*node.prev->point, *node.point, *node.next->point); + + // TODO: should copy the constrained_edge value from neighbor triangles + // for now constrained_edge values are copied during the legalize + triangle->MarkNeighbor(*node.prev->triangle); + triangle->MarkNeighbor(*node.triangle); + + tcx.AddToMap(triangle); + + // Update the advancing front + node.prev->next = node.next; + node.next->prev = node.prev; + + // If it was legalized the triangle has already been mapped + if (!Legalize(tcx, *triangle)) { + tcx.MapTriangleToNodes(*triangle); + } + +} + +void Sweep::FillAdvancingFront(SweepContext& tcx, Node& n) +{ + + // Fill right holes + Node* node = n.next; + + while (node->next) { + double angle = HoleAngle(*node); + if (angle > PI_2 || angle < -PI_2) break; + Fill(tcx, *node); + node = node->next; + } + + // Fill left holes + node = n.prev; + + while (node->prev) { + double angle = HoleAngle(*node); + if (angle > PI_2 || angle < -PI_2) break; + Fill(tcx, *node); + node = node->prev; + } + + // Fill right basins + if (n.next && n.next->next) { + double angle = BasinAngle(n); + if (angle < PI_3div4) { + FillBasin(tcx, n); + } + } +} + +double Sweep::BasinAngle(Node& node) +{ + double ax = node.point->x - node.next->next->point->x; + double ay = node.point->y - node.next->next->point->y; + return atan2(ay, ax); +} + +double Sweep::HoleAngle(Node& node) +{ + /* Complex plane + * ab = cosA +i*sinA + * ab = (ax + ay*i)(bx + by*i) = (ax*bx + ay*by) + i(ax*by-ay*bx) + * atan2(y,x) computes the principal value of the argument function + * applied to the complex number x+iy + * Where x = ax*bx + ay*by + * y = ax*by - ay*bx + */ + double ax = node.next->point->x - node.point->x; + double ay = node.next->point->y - node.point->y; + double bx = node.prev->point->x - node.point->x; + double by = node.prev->point->y - node.point->y; + return atan2(ax * by - ay * bx, ax * bx + ay * by); +} + +bool Sweep::Legalize(SweepContext& tcx, Triangle& t) +{ + // To legalize a triangle we start by finding if any of the three edges + // violate the Delaunay condition + for (int i = 0; i < 3; i++) { + if (t.delaunay_edge[i]) + continue; + + Triangle* ot = t.GetNeighbor(i); + + if (ot) { + Point* p = t.GetPoint(i); + Point* op = ot->OppositePoint(t, *p); + int oi = ot->Index(op); + + // If this is a Constrained Edge or a Delaunay Edge(only during recursive legalization) + // then we should not try to legalize + if (ot->constrained_edge[oi] || ot->delaunay_edge[oi]) { + t.constrained_edge[i] = ot->constrained_edge[oi]; + continue; + } + + bool inside = Incircle(*p, *t.PointCCW(*p), *t.PointCW(*p), *op); + + if (inside) { + // Lets mark this shared edge as Delaunay + t.delaunay_edge[i] = true; + ot->delaunay_edge[oi] = true; + + // Lets rotate shared edge one vertex CW to legalize it + RotateTrianglePair(t, *p, *ot, *op); + + // We now got one valid Delaunay Edge shared by two triangles + // This gives us 4 new edges to check for Delaunay + + // Make sure that triangle to node mapping is done only one time for a specific triangle + bool not_legalized = !Legalize(tcx, t); + if (not_legalized) { + tcx.MapTriangleToNodes(t); + } + + not_legalized = !Legalize(tcx, *ot); + if (not_legalized) + tcx.MapTriangleToNodes(*ot); + + // Reset the Delaunay edges, since they only are valid Delaunay edges + // until we add a new triangle or point. + // XXX: need to think about this. Can these edges be tried after we + // return to previous recursive level? + t.delaunay_edge[i] = false; + ot->delaunay_edge[oi] = false; + + // If triangle have been legalized no need to check the other edges since + // the recursive legalization will handles those so we can end here. + return true; + } + } + } + return false; +} + +bool Sweep::Incircle(Point& pa, Point& pb, Point& pc, Point& pd) +{ + double adx = pa.x - pd.x; + double ady = pa.y - pd.y; + double bdx = pb.x - pd.x; + double bdy = pb.y - pd.y; + + double adxbdy = adx * bdy; + double bdxady = bdx * ady; + double oabd = adxbdy - bdxady; + + if (oabd <= 0) + return false; + + double cdx = pc.x - pd.x; + double cdy = pc.y - pd.y; + + double cdxady = cdx * ady; + double adxcdy = adx * cdy; + double ocad = cdxady - adxcdy; + + if (ocad <= 0) + return false; + + double bdxcdy = bdx * cdy; + double cdxbdy = cdx * bdy; + + double alift = adx * adx + ady * ady; + double blift = bdx * bdx + bdy * bdy; + double clift = cdx * cdx + cdy * cdy; + + double det = alift * (bdxcdy - cdxbdy) + blift * ocad + clift * oabd; + + return det > 0; +} + +void Sweep::RotateTrianglePair(Triangle& t, Point& p, Triangle& ot, Point& op) +{ + Triangle* n1, *n2, *n3, *n4; + n1 = t.NeighborCCW(p); + n2 = t.NeighborCW(p); + n3 = ot.NeighborCCW(op); + n4 = ot.NeighborCW(op); + + bool ce1, ce2, ce3, ce4; + ce1 = t.GetConstrainedEdgeCCW(p); + ce2 = t.GetConstrainedEdgeCW(p); + ce3 = ot.GetConstrainedEdgeCCW(op); + ce4 = ot.GetConstrainedEdgeCW(op); + + bool de1, de2, de3, de4; + de1 = t.GetDelunayEdgeCCW(p); + de2 = t.GetDelunayEdgeCW(p); + de3 = ot.GetDelunayEdgeCCW(op); + de4 = ot.GetDelunayEdgeCW(op); + + t.Legalize(p, op); + ot.Legalize(op, p); + + // Remap delaunay_edge + ot.SetDelunayEdgeCCW(p, de1); + t.SetDelunayEdgeCW(p, de2); + t.SetDelunayEdgeCCW(op, de3); + ot.SetDelunayEdgeCW(op, de4); + + // Remap constrained_edge + ot.SetConstrainedEdgeCCW(p, ce1); + t.SetConstrainedEdgeCW(p, ce2); + t.SetConstrainedEdgeCCW(op, ce3); + ot.SetConstrainedEdgeCW(op, ce4); + + // Remap neighbors + // XXX: might optimize the markNeighbor by keeping track of + // what side should be assigned to what neighbor after the + // rotation. Now mark neighbor does lots of testing to find + // the right side. + t.ClearNeighbors(); + ot.ClearNeighbors(); + if (n1) ot.MarkNeighbor(*n1); + if (n2) t.MarkNeighbor(*n2); + if (n3) t.MarkNeighbor(*n3); + if (n4) ot.MarkNeighbor(*n4); + t.MarkNeighbor(ot); +} + +void Sweep::FillBasin(SweepContext& tcx, Node& node) +{ + if (Orient2d(*node.point, *node.next->point, *node.next->next->point) == CCW) { + tcx.basin.left_node = node.next->next; + } else { + tcx.basin.left_node = node.next; + } + + // Find the bottom and right node + tcx.basin.bottom_node = tcx.basin.left_node; + while (tcx.basin.bottom_node->next + && tcx.basin.bottom_node->point->y >= tcx.basin.bottom_node->next->point->y) { + tcx.basin.bottom_node = tcx.basin.bottom_node->next; + } + if (tcx.basin.bottom_node == tcx.basin.left_node) { + // No valid basin + return; + } + + tcx.basin.right_node = tcx.basin.bottom_node; + while (tcx.basin.right_node->next + && tcx.basin.right_node->point->y < tcx.basin.right_node->next->point->y) { + tcx.basin.right_node = tcx.basin.right_node->next; + } + if (tcx.basin.right_node == tcx.basin.bottom_node) { + // No valid basins + return; + } + + tcx.basin.width = tcx.basin.right_node->point->x - tcx.basin.left_node->point->x; + tcx.basin.left_highest = tcx.basin.left_node->point->y > tcx.basin.right_node->point->y; + + FillBasinReq(tcx, tcx.basin.bottom_node); +} + +void Sweep::FillBasinReq(SweepContext& tcx, Node* node) +{ + // if shallow stop filling + if (IsShallow(tcx, *node)) { + return; + } + + Fill(tcx, *node); + + if (node->prev == tcx.basin.left_node && node->next == tcx.basin.right_node) { + return; + } else if (node->prev == tcx.basin.left_node) { + Orientation o = Orient2d(*node->point, *node->next->point, *node->next->next->point); + if (o == CW) { + return; + } + node = node->next; + } else if (node->next == tcx.basin.right_node) { + Orientation o = Orient2d(*node->point, *node->prev->point, *node->prev->prev->point); + if (o == CCW) { + return; + } + node = node->prev; + } else { + // Continue with the neighbor node with lowest Y value + if (node->prev->point->y < node->next->point->y) { + node = node->prev; + } else { + node = node->next; + } + } + + FillBasinReq(tcx, node); +} + +bool Sweep::IsShallow(SweepContext& tcx, Node& node) +{ + double height; + + if (tcx.basin.left_highest) { + height = tcx.basin.left_node->point->y - node.point->y; + } else { + height = tcx.basin.right_node->point->y - node.point->y; + } + + // if shallow stop filling + if (tcx.basin.width > height) { + return true; + } + return false; +} + +void Sweep::FillEdgeEvent(SweepContext& tcx, Edge* edge, Node* node) +{ + if (tcx.edge_event.right) { + FillRightAboveEdgeEvent(tcx, edge, node); + } else { + FillLeftAboveEdgeEvent(tcx, edge, node); + } +} + +void Sweep::FillRightAboveEdgeEvent(SweepContext& tcx, Edge* edge, Node* node) +{ + while (node->next->point->x < edge->p->x) { + // Check if next node is below the edge + if (Orient2d(*edge->q, *node->next->point, *edge->p) == CCW) { + FillRightBelowEdgeEvent(tcx, edge, *node); + } else { + node = node->next; + } + } +} + +void Sweep::FillRightBelowEdgeEvent(SweepContext& tcx, Edge* edge, Node& node) +{ + if (node.point->x < edge->p->x) { + if (Orient2d(*node.point, *node.next->point, *node.next->next->point) == CCW) { + // Concave + FillRightConcaveEdgeEvent(tcx, edge, node); + } else{ + // Convex + FillRightConvexEdgeEvent(tcx, edge, node); + // Retry this one + FillRightBelowEdgeEvent(tcx, edge, node); + } + } +} + +void Sweep::FillRightConcaveEdgeEvent(SweepContext& tcx, Edge* edge, Node& node) +{ + Fill(tcx, *node.next); + if (node.next->point != edge->p) { + // Next above or below edge? + if (Orient2d(*edge->q, *node.next->point, *edge->p) == CCW) { + // Below + if (Orient2d(*node.point, *node.next->point, *node.next->next->point) == CCW) { + // Next is concave + FillRightConcaveEdgeEvent(tcx, edge, node); + } else { + // Next is convex + } + } + } + +} + +void Sweep::FillRightConvexEdgeEvent(SweepContext& tcx, Edge* edge, Node& node) +{ + // Next concave or convex? + if (Orient2d(*node.next->point, *node.next->next->point, *node.next->next->next->point) == CCW) { + // Concave + FillRightConcaveEdgeEvent(tcx, edge, *node.next); + } else{ + // Convex + // Next above or below edge? + if (Orient2d(*edge->q, *node.next->next->point, *edge->p) == CCW) { + // Below + FillRightConvexEdgeEvent(tcx, edge, *node.next); + } else{ + // Above + } + } +} + +void Sweep::FillLeftAboveEdgeEvent(SweepContext& tcx, Edge* edge, Node* node) +{ + while (node->prev->point->x > edge->p->x) { + // Check if next node is below the edge + if (Orient2d(*edge->q, *node->prev->point, *edge->p) == CW) { + FillLeftBelowEdgeEvent(tcx, edge, *node); + } else { + node = node->prev; + } + } +} + +void Sweep::FillLeftBelowEdgeEvent(SweepContext& tcx, Edge* edge, Node& node) +{ + if (node.point->x > edge->p->x) { + if (Orient2d(*node.point, *node.prev->point, *node.prev->prev->point) == CW) { + // Concave + FillLeftConcaveEdgeEvent(tcx, edge, node); + } else { + // Convex + FillLeftConvexEdgeEvent(tcx, edge, node); + // Retry this one + FillLeftBelowEdgeEvent(tcx, edge, node); + } + } +} + +void Sweep::FillLeftConvexEdgeEvent(SweepContext& tcx, Edge* edge, Node& node) +{ + // Next concave or convex? + if (Orient2d(*node.prev->point, *node.prev->prev->point, *node.prev->prev->prev->point) == CW) { + // Concave + FillLeftConcaveEdgeEvent(tcx, edge, *node.prev); + } else{ + // Convex + // Next above or below edge? + if (Orient2d(*edge->q, *node.prev->prev->point, *edge->p) == CW) { + // Below + FillLeftConvexEdgeEvent(tcx, edge, *node.prev); + } else{ + // Above + } + } +} + +void Sweep::FillLeftConcaveEdgeEvent(SweepContext& tcx, Edge* edge, Node& node) +{ + Fill(tcx, *node.prev); + if (node.prev->point != edge->p) { + // Next above or below edge? + if (Orient2d(*edge->q, *node.prev->point, *edge->p) == CW) { + // Below + if (Orient2d(*node.point, *node.prev->point, *node.prev->prev->point) == CW) { + // Next is concave + FillLeftConcaveEdgeEvent(tcx, edge, node); + } else{ + // Next is convex + } + } + } + +} + +void Sweep::FlipEdgeEvent(SweepContext& tcx, Point& ep, Point& eq, Triangle* t, Point& p) +{ + Triangle& ot = t->NeighborAcross(p); + Point& op = *ot.OppositePoint(*t, p); + + if (InScanArea(p, *t->PointCCW(p), *t->PointCW(p), op)) { + // Lets rotate shared edge one vertex CW + RotateTrianglePair(*t, p, ot, op); + tcx.MapTriangleToNodes(*t); + tcx.MapTriangleToNodes(ot); + + if (p == eq && op == ep) { + if (eq == *tcx.edge_event.constrained_edge->q && ep == *tcx.edge_event.constrained_edge->p) { + t->MarkConstrainedEdge(&ep, &eq); + ot.MarkConstrainedEdge(&ep, &eq); + Legalize(tcx, *t); + Legalize(tcx, ot); + } else { + // XXX: I think one of the triangles should be legalized here? + } + } else { + Orientation o = Orient2d(eq, op, ep); + t = &NextFlipTriangle(tcx, (int)o, *t, ot, p, op); + FlipEdgeEvent(tcx, ep, eq, t, p); + } + } else { + Point& newP = NextFlipPoint(ep, eq, ot, op); + FlipScanEdgeEvent(tcx, ep, eq, *t, ot, newP); + EdgeEvent(tcx, ep, eq, t, p); + } +} + +Triangle& Sweep::NextFlipTriangle(SweepContext& tcx, int o, Triangle& t, Triangle& ot, Point& p, Point& op) +{ + if (o == CCW) { + // ot is not crossing edge after flip + int edge_index = ot.EdgeIndex(&p, &op); + ot.delaunay_edge[edge_index] = true; + Legalize(tcx, ot); + ot.ClearDelunayEdges(); + return t; + } + + // t is not crossing edge after flip + int edge_index = t.EdgeIndex(&p, &op); + + t.delaunay_edge[edge_index] = true; + Legalize(tcx, t); + t.ClearDelunayEdges(); + return ot; +} + +Point& Sweep::NextFlipPoint(Point& ep, Point& eq, Triangle& ot, Point& op) +{ + Orientation o2d = Orient2d(eq, op, ep); + if (o2d == CW) { + // Right + return *ot.PointCCW(op); + } else if (o2d == CCW) { + // Left + return *ot.PointCW(op); + } else{ + //throw new RuntimeException("[Unsupported] Opposing point on constrained edge"); + // ASSIMP_CHANGE (aramis_acg) + throw std::runtime_error("[Unsupported] Opposing point on constrained edge"); + } +} + +void Sweep::FlipScanEdgeEvent(SweepContext& tcx, Point& ep, Point& eq, Triangle& flip_triangle, + Triangle& t, Point& p) +{ + Triangle& ot = t.NeighborAcross(p); + Point& op = *ot.OppositePoint(t, p); + + if (InScanArea(eq, *flip_triangle.PointCCW(eq), *flip_triangle.PointCW(eq), op)) { + // flip with new edge op->eq + FlipEdgeEvent(tcx, eq, op, &ot, op); + // TODO: Actually I just figured out that it should be possible to + // improve this by getting the next ot and op before the the above + // flip and continue the flipScanEdgeEvent here + // set new ot and op here and loop back to inScanArea test + // also need to set a new flip_triangle first + // Turns out at first glance that this is somewhat complicated + // so it will have to wait. + } else{ + Point& newP = NextFlipPoint(ep, eq, ot, op); + FlipScanEdgeEvent(tcx, ep, eq, flip_triangle, ot, newP); + } +} + +Sweep::~Sweep() { + + // Clean up memory + for(unsigned int i = 0; i < nodes_.size(); i++) { + delete nodes_[i]; + } + +} + +} + diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt new file mode 100644 index 000000000..f7ce7b726 --- /dev/null +++ b/doc/CMakeLists.txt @@ -0,0 +1,42 @@ +find_package( Doxygen REQUIRED ) + +set( HTML_OUTPUT "AssimpDoc_Html" CACHE STRING "Output directory for generated HTML documentation. Defaults to AssimpDoc_Html." ) + +# Enable Microsoft CHM help style only on Windows +set( MICROSOFT_HELP_WORKSHOP "NO") +if( MSVC ) + set( MICROSOFT_HELP_WORKSHOP "YES" ) +endif( MSVC ) + +configure_file( + ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in + ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile + @ONLY +) + +add_custom_target( + docs ALL + DEPENDS docs.done +) + +add_custom_command( + OUTPUT docs.done + COMMAND ${DOXYGEN_EXECUTABLE} + COMMAND ${CMAKE_COMMAND} -E touch docs.done + COMMENT "Generating assimp documentation" + VERBATIM + ) + +if( DEFINED CMAKE_INSTALL_DOCDIR ) + install( + DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${HTML_OUTPUT} + DESTINATION ${CMAKE_INSTALL_DOCDIR} + ) + install(FILES + ${CMAKE_CURRENT_SOURCE_DIR}/AssimpDoc_Html/AnimationOverview.png + ${CMAKE_CURRENT_SOURCE_DIR}/AssimpDoc_Html/AnimationOverview.svg + ${CMAKE_CURRENT_SOURCE_DIR}/AssimpDoc_Html/dragonsplash.png + DESTINATION ${CMAKE_INSTALL_DOCDIR}/${HTML_OUTPUT} + ) +endif( DEFINED CMAKE_INSTALL_DOCDIR ) + diff --git a/doc/Doxyfile b/doc/Doxyfile.in similarity index 98% rename from doc/Doxyfile rename to doc/Doxyfile.in index 64dd5d2cc..ebb6b72b8 100644 --- a/doc/Doxyfile +++ b/doc/Doxyfile.in @@ -140,7 +140,8 @@ FULL_PATH_NAMES = NO # relative paths, which will be relative from the directory where doxygen is # started. -STRIP_FROM_PATH = +STRIP_FROM_PATH = @PROJECT_SOURCE_DIR@ \ + @PROJECT_BINARY_DIR@ # The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of # the path mentioned in the documentation of a class, which tells @@ -339,22 +340,6 @@ INLINE_SIMPLE_STRUCTS = NO TYPEDEF_HIDES_STRUCT = YES -# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to -# determine which symbols to keep in memory and which to flush to disk. -# When the cache is full, less often used symbols will be written to disk. -# For small to medium size projects (<1000 input files) the default value is -# probably good enough. For larger projects a too small cache size can cause -# doxygen to be busy swapping symbols to and from disk most of the time -# causing a significant performance penalty. -# If the system has enough physical memory increasing the cache will improve the -# performance by keeping more symbols in memory. Note that the value works on -# a logarithmic scale so increasing the size by one will roughly double the -# memory usage. The cache size is given by this formula: -# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, -# corresponding to a cache size of 2^16 = 65536 symbols. - -SYMBOL_CACHE_SIZE = 0 - # Similar to the SYMBOL_CACHE_SIZE the size of the symbol lookup cache can be # set using LOOKUP_CACHE_SIZE. This cache is used to resolve symbols given # their name and scope. Since this can be an expensive process and often the @@ -677,9 +662,12 @@ WARN_LOGFILE = # directories like "/usr/src/myproject". Separate the files or directories # with spaces. -INPUT = ../include/ \ - ../doc/dox.h \ - ../code/BaseImporter.h +INPUT = @doxy_main_page@ \ + @PROJECT_SOURCE_DIR@ \ + @PROJECT_BINARY_DIR@ \ + @PROJECT_SOURCE_DIR@/include/ \ + @PROJECT_SOURCE_DIR@/doc/dox.h \ + @PROJECT_SOURCE_DIR@/code/BaseImporter.h # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is @@ -919,7 +907,7 @@ GENERATE_HTML = YES # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `html' will be used as the default path. -HTML_OUTPUT = AssimpDoc_Html +HTML_OUTPUT = @HTML_OUTPUT@ # The HTML_FILE_EXTENSION tag can be used to specify the file extension for # each generated HTML page (for example: .htm,.php,.asp). If it is left blank @@ -953,7 +941,7 @@ HTML_FOOTER = # HTML_EXTRA_STYLESHEET instead of this one, as it is more robust and this # tag will in the future become obsolete. -HTML_STYLESHEET = style.css +# HTML_STYLESHEET = @CMAKE_CURRENT_SOURCE_DIR@/style.css # The HTML_EXTRA_STYLESHEET tag can be used to specify an additional # user-defined cascading style sheet that is included after the standard @@ -1064,7 +1052,7 @@ DOCSET_PUBLISHER_NAME = Publisher # Microsoft HTML help workshop to generate a compiled HTML help file (.chm) # of the generated HTML documentation. -GENERATE_HTMLHELP = YES +GENERATE_HTMLHELP = @MICROSOFT_HELP_WORKSHOP@ # If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can # be used to specify the file name of the resulting .chm file. You @@ -1504,18 +1492,6 @@ GENERATE_XML = NO XML_OUTPUT = xml -# The XML_SCHEMA tag can be used to specify an XML schema, -# which can be used by a validating XML parser to check the -# syntax of the XML files. - -XML_SCHEMA = - -# The XML_DTD tag can be used to specify an XML DTD, -# which can be used by a validating XML parser to check the -# syntax of the XML files. - -XML_DTD = - # If the XML_PROGRAMLISTING tag is set to YES Doxygen will # dump the program listings (including syntax highlighting # and cross-referencing information) to the XML output. Note that diff --git a/doc/Preamble.txt b/doc/Preamble.txt index 0722a48e1..102b2792d 100644 --- a/doc/Preamble.txt +++ b/doc/Preamble.txt @@ -3,12 +3,12 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2012, assimp team +Copyright (c) 2006-2017, assimp 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 +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 @@ -25,16 +25,16 @@ conditions are met: derived from this software without specific prior written permission of the assimp team. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --------------------------------------------------------------------------- -*/ \ No newline at end of file +*/ diff --git a/doc/architecture/Assimp_Arch_Import.class.violet.html b/doc/architecture/Assimp_Arch_Import.class.violet.html index a7ed8c6ce..264468f98 100644 --- a/doc/architecture/Assimp_Arch_Import.class.violet.html +++ b/doc/architecture/Assimp_Arch_Import.class.violet.html @@ -20,8 +20,8 @@ - - + + 1 255 @@ -37,620 +37,318 @@ - Assimpo::Exporter + Importer - aiScene* mScene; -IOSystem* mIOHandler; -struct ExportFormatEntry { - aiExportFormatDesc mDescription; - fpExportFunc mExportFunction; -}; - + - const aiExportDataBlob* ExportToBlob( const aiScene* pScene, ... ); -const aiExportDataBlob* ExportToBlob( const aiScene* pScene, ...); -aiReturn Export( const aiScene* pScene, ... ); -aiReturn Export( const aiScene* pScene, ...); - - + RegisterLoader() +UnregisterLoader() +ReadFile() - - - 1 - - 255 - 255 - 255 - 255 - - - 0 - 0 - 0 - 255 - - - - IOSystem - - - - - - bool Exists( const std::string& pFile) const; -bool Exists( const char* pFile) const; -virtual char getOsSeparator() const; - -virtual IOStream* Open(const char* pFile, - const char* pMode = "rb"); -IOStream* Open(const std::string& pFile, const std::string& pMode = std::string("rb")); -void Close( IOStream* pFile); - - - - - - - - + + 1 - - ObjExporter + + IOSystem - - File contains function pointer: -ExportSceneObj + + - + + + + + + 1 + + + + + BaseImporter + + + + + + CanRead() +InternRead() + + + + + + + 1 + + + + + ObjImporter + + + + + + CanRead() +InternRead() + + + + + + + 1 + + + + + glTFImporter + + + + + + CanRead() +InternRead() + + - - - - - - - - - 1 - - - - - - - - - 1 - - - - - - - - - 1 - - - - - - + + + + + + - + 1 - - - - - - - - + + + + + + + + + + + + 1 - - - - - - + + + + + + + + + + - + 1 - - - - - - - + + + + + + + 1 - - - - - - - - + + + + + + + + + + + + 1 - - - - - - - - - 1 - + + + + + ]]>

- embedded diagram image + embedded diagram image \ No newline at end of file diff --git a/doc/architecture/Assimp_Arch_export.class.violet.html b/doc/architecture/Assimp_Arch_export.class.violet.html new file mode 100644 index 000000000..85f68d68d --- /dev/null +++ b/doc/architecture/Assimp_Arch_export.class.violet.html @@ -0,0 +1,648 @@ + + + + + + + + + This file was generated with Violet UML Editor 2.1.0. +   ( View Source / Download Violet ) +
+
+ +
+
+ embedded diagram image + + \ No newline at end of file diff --git a/doc/architecture/assimp-process.png b/doc/architecture/assimp-process.png new file mode 100644 index 000000000..6507cb34c Binary files /dev/null and b/doc/architecture/assimp-process.png differ diff --git a/doc/architecture/assimp_usecase.ucase.violet.html b/doc/architecture/assimp_usecase.ucase.violet.html new file mode 100644 index 000000000..3045add42 --- /dev/null +++ b/doc/architecture/assimp_usecase.ucase.violet.html @@ -0,0 +1,875 @@ + + + + + + + + + This file was generated with Violet UML Editor 2.1.0. +   ( View Source / Download Violet ) +
+
+ +
+
+ embedded diagram image + + \ No newline at end of file diff --git a/doc/architecture/exporter.png b/doc/architecture/exporter.png new file mode 100644 index 000000000..b2e5b3d93 Binary files /dev/null and b/doc/architecture/exporter.png differ diff --git a/doc/architecture/process.class.violet.html b/doc/architecture/process.class.violet.html new file mode 100644 index 000000000..d4f77d909 --- /dev/null +++ b/doc/architecture/process.class.violet.html @@ -0,0 +1,337 @@ + + + + + + + + + This file was generated with Violet UML Editor 2.1.0. +   ( View Source / Download Violet ) +
+
+ +
+
+ embedded diagram image + + \ No newline at end of file diff --git a/doc/architecture/usecases.png b/doc/architecture/usecases.png new file mode 100644 index 000000000..584ebc890 Binary files /dev/null and b/doc/architecture/usecases.png differ diff --git a/doc/dox.h b/doc/dox.h index f051e5c00..46ca23251 100644 --- a/doc/dox.h +++ b/doc/dox.h @@ -453,7 +453,7 @@ by calling it as a singleton with the requested logging-type. To see how this wo using namespace Assimp; // Create a logger instance -DefaultLogger::create("",Logger::VERBOSE); +DefaultLogger::create("", Logger::VERBOSE); // Now I am ready for logging my stuff DefaultLogger::get()->info("this is my info-call"); @@ -472,22 +472,9 @@ Just derivate your own logger from the abstract base class LogStream and overwri @code // Example stream -class myStream : - public LogStream +class myStream : public LogStream { public: - // Constructor - myStream() - { - // empty - } - - // Destructor - ~myStream() - { - // empty - } - // Write womethink using your own functionality void write(const char* message) { @@ -496,10 +483,10 @@ public: }; // Select the kinds of messages you want to receive on this log stream -const unsigned int severity = Logger::DEBUGGING|Logger::INFO|Logger::ERR|Logger::WARN; +const unsigned int severity = Logger::Debugging|Logger::Info|Logger::Err|Logger::Warn; // Attaching it to the default logger -Assimp::DefaultLogger::get()->attachStream( new myStream(), severity ); +Assimp::DefaultLogger::get()->attachStream( new myStream, severity ); @endcode @@ -512,10 +499,10 @@ flag set: @code unsigned int severity = 0; -severity |= Logger::DEBUGGING; +severity |= Logger::Debugging; // Detach debug messages from you self defined stream -Assimp::DefaultLogger::get()->attachStream( new myStream(), severity ); +Assimp::DefaultLogger::get()->attachStream( new myStream, severity ); @endcode @@ -743,6 +730,8 @@ need them at all. Normally textures used by assets are stored in separate files, however, there are file formats embedding their textures directly into the model file. Such textures are loaded into an aiTexture structure. +For embedded textures, the value of `AI_MATKEY_TEXTURE(textureType, index)` will be `*` where +`` is the index of the texture in aiScene::mTextures.
There are two cases:
@@ -930,7 +919,7 @@ All material key constants start with 'AI_MATKEY' (it's an ugly macro for histor TEXTURE(t,n) aiString n/a - Defines the path to the n'th texture on the stack 't', where 'n' is any value >= 0 and 't' is one of the #aiTextureType enumerated values. + Defines the path of the n'th texture on the stack 't', where 'n' is any value >= 0 and 't' is one of the #aiTextureType enumerated values. Either a filepath or `*`, where `` is the index of an embedded texture in aiScene::mTextures. See the 'Textures' section above. diff --git a/code/DefaultIOStream.h b/include/assimp/DefaultIOStream.h similarity index 98% rename from code/DefaultIOStream.h rename to include/assimp/DefaultIOStream.h index 294c5b797..3668b27ec 100644 --- a/code/DefaultIOStream.h +++ b/include/assimp/DefaultIOStream.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, @@ -45,7 +46,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include #include -#include "Defines.h" +#include namespace Assimp { diff --git a/code/DefaultIOSystem.h b/include/assimp/DefaultIOSystem.h similarity index 97% rename from code/DefaultIOSystem.h rename to include/assimp/DefaultIOSystem.h index 49960a847..d7cf031cf 100644 --- a/code/DefaultIOSystem.h +++ b/include/assimp/DefaultIOSystem.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, @@ -48,7 +49,7 @@ namespace Assimp { // --------------------------------------------------------------------------- /** Default implementation of IOSystem using the standard C file functions */ -class DefaultIOSystem : public IOSystem +class ASSIMP_API DefaultIOSystem : public IOSystem { public: /** Constructor. */ diff --git a/include/assimp/DefaultLogger.hpp b/include/assimp/DefaultLogger.hpp index 52574d5ea..4f1a7e1f4 100644 --- a/include/assimp/DefaultLogger.hpp +++ b/include/assimp/DefaultLogger.hpp @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/code/Defines.h b/include/assimp/Defines.h similarity index 100% rename from code/Defines.h rename to include/assimp/Defines.h diff --git a/include/assimp/Exporter.hpp b/include/assimp/Exporter.hpp index 72224da3c..2c141ded2 100644 --- a/include/assimp/Exporter.hpp +++ b/include/assimp/Exporter.hpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/include/assimp/IOStream.hpp b/include/assimp/IOStream.hpp index b0bc5ebb6..ce5907a47 100644 --- a/include/assimp/IOStream.hpp +++ b/include/assimp/IOStream.hpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/include/assimp/IOSystem.hpp b/include/assimp/IOSystem.hpp index 83d927453..e7a216e4e 100644 --- a/include/assimp/IOSystem.hpp +++ b/include/assimp/IOSystem.hpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/include/assimp/Importer.hpp b/include/assimp/Importer.hpp index 86023fe91..f42a2deaf 100644 --- a/include/assimp/Importer.hpp +++ b/include/assimp/Importer.hpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. @@ -52,7 +53,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // Public ASSIMP data structures #include -#include namespace Assimp { // ======================================================================= diff --git a/include/assimp/LogStream.hpp b/include/assimp/LogStream.hpp index 477fe5321..049640ec0 100644 --- a/include/assimp/LogStream.hpp +++ b/include/assimp/LogStream.hpp @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, @@ -43,8 +44,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef INCLUDED_AI_LOGSTREAM_H #define INCLUDED_AI_LOGSTREAM_H + #include "types.h" + namespace Assimp { + class IOSystem; // ------------------------------------------------------------------------------------ diff --git a/include/assimp/Logger.hpp b/include/assimp/Logger.hpp index 7f355b5bf..0875b6d7d 100644 --- a/include/assimp/Logger.hpp +++ b/include/assimp/Logger.hpp @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, @@ -45,7 +46,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #define INCLUDED_AI_LOGGER_H #include "types.h" -namespace Assimp { + +namespace Assimp { + class LogStream; // Maximum length of a log message. Longer messages are rejected. diff --git a/include/assimp/NullLogger.hpp b/include/assimp/NullLogger.hpp index 64b59a4a0..191db1aaa 100644 --- a/include/assimp/NullLogger.hpp +++ b/include/assimp/NullLogger.hpp @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, @@ -46,7 +47,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #define INCLUDED_AI_NULLLOGGER_H #include "Logger.hpp" -namespace Assimp { + +namespace Assimp { + // --------------------------------------------------------------------------- /** @brief CPP-API: Empty logging implementation. * diff --git a/include/assimp/ProgressHandler.hpp b/include/assimp/ProgressHandler.hpp index 1ac016efb..2c5b2f4c5 100644 --- a/include/assimp/ProgressHandler.hpp +++ b/include/assimp/ProgressHandler.hpp @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/include/assimp/ai_assert.h b/include/assimp/ai_assert.h index fa63c329c..d8dbac8d2 100644 --- a/include/assimp/ai_assert.h +++ b/include/assimp/ai_assert.h @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/include/assimp/anim.h b/include/assimp/anim.h index 970be9989..f8774b8fd 100644 --- a/include/assimp/anim.h +++ b/include/assimp/anim.h @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. @@ -477,6 +478,8 @@ struct aiAnimation { for( unsigned int a = 0; a < mNumMorphMeshChannels; a++) { delete mMorphMeshChannels[a]; } + + delete [] mMorphMeshChannels; } } #endif // __cplusplus diff --git a/include/assimp/camera.h b/include/assimp/camera.h index 6b9fbbea5..7b7bd0922 100644 --- a/include/assimp/camera.h +++ b/include/assimp/camera.h @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/include/assimp/cexport.h b/include/assimp/cexport.h index f77d23c05..44b06fb3c 100644 --- a/include/assimp/cexport.h +++ b/include/assimp/cexport.h @@ -49,7 +49,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #ifndef ASSIMP_BUILD_NO_EXPORT // Public ASSIMP data structures -#include #include #ifdef __cplusplus diff --git a/include/assimp/cfileio.h b/include/assimp/cfileio.h index 5f46f7c4c..63eeb59b0 100644 --- a/include/assimp/cfileio.h +++ b/include/assimp/cfileio.h @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/include/assimp/cimport.h b/include/assimp/cimport.h index 6d3fa4aea..98be269d3 100644 --- a/include/assimp/cimport.h +++ b/include/assimp/cimport.h @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. @@ -46,7 +47,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #ifndef AI_ASSIMP_H_INC #define AI_ASSIMP_H_INC -#include #include #include "importerdesc.h" diff --git a/include/assimp/color4.h b/include/assimp/color4.h index 6cd6a35b3..48e7aad30 100644 --- a/include/assimp/color4.h +++ b/include/assimp/color4.h @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. @@ -45,7 +46,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #ifndef AI_COLOR4D_H_INC #define AI_COLOR4D_H_INC -#include "./Compiler/pushpack1.h" #include "defs.h" #ifdef __cplusplus @@ -89,7 +89,7 @@ public: // Red, green, blue and alpha color values TReal r, g, b, a; -} PACK_STRUCT; // !struct aiColor4D +}; // !struct aiColor4D typedef aiColor4t aiColor4D; @@ -97,10 +97,8 @@ typedef aiColor4t aiColor4D; struct aiColor4D { ai_real r, g, b, a; -} PACK_STRUCT; +}; #endif // __cplusplus -#include "./Compiler/poppack1.h" - #endif // AI_COLOR4D_H_INC diff --git a/include/assimp/color4.inl b/include/assimp/color4.inl index 219372ef2..6f4bf0261 100644 --- a/include/assimp/color4.inl +++ b/include/assimp/color4.inl @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. @@ -76,12 +77,34 @@ AI_FORCE_INLINE const aiColor4t& aiColor4t::operator /= (TReal f) // ------------------------------------------------------------------------------------------------ template AI_FORCE_INLINE TReal aiColor4t::operator[](unsigned int i) const { - return *(&r + i); + //return *(&r + i); + switch ( i ) { + case 0: + return r; + case 1: + return g; + case 2: + return b; + default: + break; + } + return r; } // ------------------------------------------------------------------------------------------------ template AI_FORCE_INLINE TReal& aiColor4t::operator[](unsigned int i) { - return *(&r + i); +// return *(&r + i); + switch ( i ) { + case 0: + return r; + case 1: + return g; + case 2: + return b; + default: + break; + } + return r; } // ------------------------------------------------------------------------------------------------ template diff --git a/include/assimp/config.h.in b/include/assimp/config.h.in index 148a68868..db197822e 100644 --- a/include/assimp/config.h.in +++ b/include/assimp/config.h.in @@ -323,7 +323,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. /** @brief Set the maximum number of bones affecting a single vertex * * This is used by the #aiProcess_LimitBoneWeights PostProcess-Step. - * @note The default value is AI_LBW_MAX_WEIGHTS + * @note The default value is AI_LMW_MAX_WEIGHTS * Property type: integer.*/ #define AI_CONFIG_PP_LBW_MAX_WEIGHTS \ "PP_LBW_MAX_WEIGHTS" @@ -844,14 +844,6 @@ enum aiComponent #define AI_CONFIG_IMPORT_OGRE_TEXTURETYPE_FROM_FILENAME \ "IMPORT_OGRE_TEXTURETYPE_FROM_FILENAME" -/** @brief Specifies whether the IFC loader skips over IfcSpace elements. - * - * IfcSpace elements (and their geometric representations) are used to - * represent, well, free space in a building storey.
- * Property type: Bool. Default value: true. - */ -#define AI_CONFIG_IMPORT_IFC_SKIP_SPACE_REPRESENTATIONS "IMPORT_IFC_SKIP_SPACE_REPRESENTATIONS" - /** @brief Specifies whether the Android JNI asset extraction is supported. * * Turn on this option if you want to manage assets in native @@ -860,17 +852,14 @@ enum aiComponent */ #define AI_CONFIG_ANDROID_JNI_ASSIMP_MANAGER_SUPPORT "AI_CONFIG_ANDROID_JNI_ASSIMP_MANAGER_SUPPORT" - // --------------------------------------------------------------------------- -/** @brief Specifies whether the IFC loader skips over - * shape representations of type 'Curve2D'. +/** @brief Specifies whether the IFC loader skips over IfcSpace elements. * - * A lot of files contain both a faceted mesh representation and a outline - * with a presentation type of 'Curve2D'. Currently Assimp doesn't convert those, - * so turning this option off just clutters the log with errors.
+ * IfcSpace elements (and their geometric representations) are used to + * represent, well, free space in a building storey.
* Property type: Bool. Default value: true. */ -#define AI_CONFIG_IMPORT_IFC_SKIP_CURVE_REPRESENTATIONS "IMPORT_IFC_SKIP_CURVE_REPRESENTATIONS" +#define AI_CONFIG_IMPORT_IFC_SKIP_SPACE_REPRESENTATIONS "IMPORT_IFC_SKIP_SPACE_REPRESENTATIONS" // --------------------------------------------------------------------------- /** @brief Specifies whether the IFC loader will use its own, custom triangulation @@ -887,6 +876,38 @@ enum aiComponent */ #define AI_CONFIG_IMPORT_IFC_CUSTOM_TRIANGULATION "IMPORT_IFC_CUSTOM_TRIANGULATION" +// --------------------------------------------------------------------------- +/** @brief Set the tessellation conic angle for IFC smoothing curves. + * + * This is used by the IFC importer to determine the tessellation parameter + * for smoothing curves. + * @note The default value is AI_IMPORT_IFC_DEFAULT_SMOOTHING_ANGLE and the + * accepted values are in range [5.0, 120.0]. + * Property type: Float. + */ +#define AI_CONFIG_IMPORT_IFC_SMOOTHING_ANGLE "IMPORT_IFC_SMOOTHING_ANGLE" + +// default value for AI_CONFIG_IMPORT_IFC_SMOOTHING_ANGLE +#if (!defined AI_IMPORT_IFC_DEFAULT_SMOOTHING_ANGLE) +# define AI_IMPORT_IFC_DEFAULT_SMOOTHING_ANGLE 10.0f +#endif + +// --------------------------------------------------------------------------- +/** @brief Set the tessellation for IFC cylindrical shapes. + * + * This is used by the IFC importer to determine the tessellation parameter + * for cylindrical shapes, i.e. the number of segments used to aproximate a circle. + * @note The default value is AI_IMPORT_IFC_DEFAULT_CYLINDRICAL_TESSELLATION and the + * accepted values are in range [3, 180]. + * Property type: Integer. + */ +#define AI_CONFIG_IMPORT_IFC_CYLINDRICAL_TESSELLATION "IMPORT_IFC_CYLINDRICAL_TESSELLATION" + +// default value for AI_CONFIG_IMPORT_IFC_CYLINDRICAL_TESSELLATION +#if (!defined AI_IMPORT_IFC_DEFAULT_CYLINDRICAL_TESSELLATION) +# define AI_IMPORT_IFC_DEFAULT_CYLINDRICAL_TESSELLATION 32 +#endif + // --------------------------------------------------------------------------- /** @brief Specifies whether the Collada loader will ignore the provided up direction. * diff --git a/include/assimp/defs.h b/include/assimp/defs.h index cfe69984a..20b234f90 100644 --- a/include/assimp/defs.h +++ b/include/assimp/defs.h @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/include/assimp/importerdesc.h b/include/assimp/importerdesc.h index 455f83cce..6b83b8aa2 100644 --- a/include/assimp/importerdesc.h +++ b/include/assimp/importerdesc.h @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/include/assimp/light.h b/include/assimp/light.h index 9a7893b52..324339a97 100644 --- a/include/assimp/light.h +++ b/include/assimp/light.h @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/include/assimp/material.h b/include/assimp/material.h index 23a45878e..a12e7d076 100644 --- a/include/assimp/material.h +++ b/include/assimp/material.h @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/include/assimp/material.inl b/include/assimp/material.inl index cd610fd58..6c4d16f7b 100644 --- a/include/assimp/material.inl +++ b/include/assimp/material.inl @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/include/assimp/matrix3x3.h b/include/assimp/matrix3x3.h index 4c36dda6b..3cf575e38 100644 --- a/include/assimp/matrix3x3.h +++ b/include/assimp/matrix3x3.h @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. @@ -46,7 +47,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #ifndef AI_MATRIX3X3_H_INC #define AI_MATRIX3X3_H_INC -#include "./Compiler/pushpack1.h" #include "defs.h" #ifdef __cplusplus @@ -153,7 +153,7 @@ public: /** @brief A function for creating a rotation matrix that rotates a * 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 + * Output: mtx[3][3] -- a 3x3 matrix in column-major form * 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 @@ -165,7 +165,7 @@ public: TReal a1, a2, a3; TReal b1, b2, b3; TReal c1, c2, c3; -} PACK_STRUCT; +}; typedef aiMatrix3x3t aiMatrix3x3; @@ -175,10 +175,8 @@ struct aiMatrix3x3 { ai_real a1, a2, a3; ai_real b1, b2, b3; ai_real c1, c2, c3; -} PACK_STRUCT; +}; #endif // __cplusplus -#include "./Compiler/poppack1.h" - #endif // AI_MATRIX3X3_H_INC diff --git a/include/assimp/matrix3x3.inl b/include/assimp/matrix3x3.inl index c290258dd..14f2cd2fc 100644 --- a/include/assimp/matrix3x3.inl +++ b/include/assimp/matrix3x3.inl @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. @@ -101,16 +102,34 @@ inline aiMatrix3x3t aiMatrix3x3t::operator* (const aiMatrix3x3t -inline TReal* aiMatrix3x3t::operator[] (unsigned int p_iIndex) -{ - return &this->a1 + p_iIndex * 3; +inline TReal* aiMatrix3x3t::operator[] (unsigned int p_iIndex) { + switch ( p_iIndex ) { + case 0: + return &a1; + case 1: + return &b1; + case 2: + return &c1; + default: + break; + } + return &a1; } // ------------------------------------------------------------------------------------------------ template -inline const TReal* aiMatrix3x3t::operator[] (unsigned int p_iIndex) const -{ - return &this->a1 + p_iIndex * 3; +inline const TReal* aiMatrix3x3t::operator[] (unsigned int p_iIndex) const { + switch ( p_iIndex ) { + case 0: + return &a1; + case 1: + return &b1; + case 2: + return &c1; + default: + break; + } + return &a1; } // ------------------------------------------------------------------------------------------------ diff --git a/include/assimp/matrix4x4.h b/include/assimp/matrix4x4.h index 3f7eb3adf..77e295436 100644 --- a/include/assimp/matrix4x4.h +++ b/include/assimp/matrix4x4.h @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. @@ -46,7 +47,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #define AI_MATRIX4X4_H_INC #include "vector3.h" -#include "./Compiler/pushpack1.h" #include "defs.h" #ifdef __cplusplus @@ -113,6 +113,8 @@ public: // matrix multiplication. aiMatrix4x4t& operator *= (const aiMatrix4x4t& m); aiMatrix4x4t operator * (const aiMatrix4x4t& m) const; + aiMatrix4x4t operator * (const TReal& aFloat) const; + aiMatrix4x4t operator + (const aiMatrix4x4t& aMatrix) const; template operator aiMatrix4x4t () const; @@ -257,7 +259,7 @@ public: TReal b1, b2, b3, b4; TReal c1, c2, c3, c4; TReal d1, d2, d3, d4; -} PACK_STRUCT; +}; typedef aiMatrix4x4t aiMatrix4x4; @@ -268,11 +270,9 @@ struct aiMatrix4x4 { ai_real b1, b2, b3, b4; ai_real c1, c2, c3, c4; ai_real d1, d2, d3, d4; -} PACK_STRUCT; +}; #endif // __cplusplus -#include "./Compiler/poppack1.h" - #endif // AI_MATRIX4X4_H_INC diff --git a/include/assimp/matrix4x4.inl b/include/assimp/matrix4x4.inl index 17f0b3f4f..b15d50a09 100644 --- a/include/assimp/matrix4x4.inl +++ b/include/assimp/matrix4x4.inl @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. @@ -155,6 +156,54 @@ inline aiMatrix4x4t& aiMatrix4x4t::operator *= (const aiMatrix4x4t return *this; } +// ---------------------------------------------------------------------------------------- +template +inline aiMatrix4x4t aiMatrix4x4t::operator* (const TReal& aFloat) const +{ + aiMatrix4x4t temp( + a1 * aFloat, + a2 * aFloat, + a3 * aFloat, + a4 * aFloat, + b1 * aFloat, + b2 * aFloat, + b3 * aFloat, + b4 * aFloat, + c1 * aFloat, + c2 * aFloat, + c3 * aFloat, + c4 * aFloat, + d1 * aFloat, + d2 * aFloat, + d3 * aFloat, + d4 * aFloat); + return temp; +} + +// ---------------------------------------------------------------------------------------- +template +inline aiMatrix4x4t aiMatrix4x4t::operator+ (const aiMatrix4x4t& m) const +{ + aiMatrix4x4t temp( + m.a1 + a1, + m.a2 + a2, + m.a3 + a3, + m.a4 + a4, + m.b1 + b1, + m.b2 + b2, + m.b3 + b3, + m.b4 + b4, + m.c1 + c1, + m.c2 + c2, + m.c3 + c3, + m.c4 + c4, + m.d1 + d1, + m.d2 + d2, + m.d3 + d3, + m.d4 + d4); + return temp; +} + // ---------------------------------------------------------------------------------------- template inline aiMatrix4x4t aiMatrix4x4t::operator* (const aiMatrix4x4t& m) const @@ -243,9 +292,19 @@ inline TReal* aiMatrix4x4t::operator[](unsigned int p_iIndex) { if (p_iIndex > 3) { return NULL; } - - // XXX this is UB. Has been for years. The fact that it works now does not make it better. - return &this->a1 + p_iIndex * 4; + switch ( p_iIndex ) { + case 0: + return &a1; + case 1: + return &b1; + case 2: + return &c1; + case 3: + return &d1; + default: + break; + } + return &a1; } // ---------------------------------------------------------------------------------------- @@ -255,8 +314,19 @@ inline const TReal* aiMatrix4x4t::operator[](unsigned int p_iIndex) const return NULL; } - // XXX same - return &this->a1 + p_iIndex * 4; + switch ( p_iIndex ) { + case 0: + return &a1; + case 1: + return &b1; + case 2: + return &c1; + case 3: + return &d1; + default: + break; + } + return &a1; } // ---------------------------------------------------------------------------------------- diff --git a/include/assimp/mesh.h b/include/assimp/mesh.h index 8ba8d1221..c8648c778 100644 --- a/include/assimp/mesh.h +++ b/include/assimp/mesh.h @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team All rights reserved. @@ -55,7 +55,7 @@ extern "C" { // --------------------------------------------------------------------------- // Limits. These values are required to match the settings Assimp was -// compiled against. Therfore, do not redefine them unless you build the +// compiled against. Therefore, do not redefine them unless you build the // library from source using the same definitions. // --------------------------------------------------------------------------- @@ -377,8 +377,10 @@ struct aiAnimMesh * from language bindings. */ unsigned int mNumVertices; - -/** Weight of the AnimMesh. */ + + /** + * Weight of the AnimMesh. + */ float mWeight; #ifdef __cplusplus @@ -389,6 +391,7 @@ struct aiAnimMesh , mTangents( NULL ) , mBitangents( NULL ) , mNumVertices( 0 ) + , mWeight( 0.0f ) { // fixme consider moving this to the ctor initializer list as well for( unsigned int a = 0; a < AI_MAX_NUMBER_OF_TEXTURECOORDS; a++){ @@ -633,7 +636,9 @@ struct aiMesh * Note! Currently only works with Collada loader.*/ C_STRUCT aiAnimMesh** mAnimMeshes; - /** Method of morphing when animeshes are specified. */ + /** + * Method of morphing when animeshes are specified. + */ unsigned int mMethod; #ifdef __cplusplus @@ -653,6 +658,7 @@ struct aiMesh , mMaterialIndex( 0 ) , mNumAnimMeshes( 0 ) , mAnimMeshes( NULL ) + , mMethod( 0 ) { for( unsigned int a = 0; a < AI_MAX_NUMBER_OF_TEXTURECOORDS; a++) { diff --git a/include/assimp/metadata.h b/include/assimp/metadata.h index 3b52553b0..ded08d14b 100644 --- a/include/assimp/metadata.h +++ b/include/assimp/metadata.h @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. @@ -133,7 +134,6 @@ struct aiMetadata { // empty } - /** * @brief The destructor. */ @@ -198,6 +198,37 @@ struct aiMetadata { return data; } + /** + * @brief Deallocates property fields + keys. + */ + static inline + void Dealloc( aiMetadata *metadata ) { + delete metadata; + } + + template + inline void Add(const std::string& key, const T& value) + { + aiString* new_keys = new aiString[mNumProperties + 1]; + aiMetadataEntry* new_values = new aiMetadataEntry[mNumProperties + 1]; + + for(unsigned int i = 0; i < mNumProperties; ++i) + { + new_keys[i] = mKeys[i]; + new_values[i] = mValues[i]; + } + + delete mKeys; + delete mValues; + + mKeys = new_keys; + mValues = new_values; + + mNumProperties++; + + Set(mNumProperties - 1, key, value); + } + template inline bool Set( unsigned index, const std::string& key, const T& value ) { diff --git a/include/assimp/port/AndroidJNI/AndroidJNIIOSystem.h b/include/assimp/port/AndroidJNI/AndroidJNIIOSystem.h index 6f806f922..41d800487 100644 --- a/include/assimp/port/AndroidJNI/AndroidJNIIOSystem.h +++ b/include/assimp/port/AndroidJNI/AndroidJNIIOSystem.h @@ -45,7 +45,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #ifndef AI_ANDROIDJNIIOSYSTEM_H_INC #define AI_ANDROIDJNIIOSYSTEM_H_INC -#include "../code/DefaultIOSystem.h" +#include #include #include #include diff --git a/include/assimp/postprocess.h b/include/assimp/postprocess.h index 53c22da13..b35bc34f5 100644 --- a/include/assimp/postprocess.h +++ b/include/assimp/postprocess.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/include/assimp/quaternion.h b/include/assimp/quaternion.h index fdc4d266b..a5cb67a9a 100644 --- a/include/assimp/quaternion.h +++ b/include/assimp/quaternion.h @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) ---------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. Redistribution and use of this software in source and binary forms, diff --git a/include/assimp/quaternion.inl b/include/assimp/quaternion.inl index 68cb5a236..d0bf5831c 100644 --- a/include/assimp/quaternion.inl +++ b/include/assimp/quaternion.inl @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/include/assimp/scene.h b/include/assimp/scene.h index b52db9883..4d027456c 100644 --- a/include/assimp/scene.h +++ b/include/assimp/scene.h @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/include/assimp/texture.h b/include/assimp/texture.h index ab52c79a2..c09ef2cbe 100644 --- a/include/assimp/texture.h +++ b/include/assimp/texture.h @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/include/assimp/types.h b/include/assimp/types.h index 7904413b0..0012a0bba 100644 --- a/include/assimp/types.h +++ b/include/assimp/types.h @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. @@ -115,8 +116,6 @@ const size_t MAXLEN = 1024; # define MAXLEN 1024 #endif -#include "./Compiler/pushpack1.h" - // ---------------------------------------------------------------------------------- /** Represents a plane in a three-dimensional, euclidean space */ @@ -133,7 +132,7 @@ struct aiPlane //! Plane equation ai_real a,b,c,d; -} PACK_STRUCT; // !struct aiPlane +}; // !struct aiPlane // ---------------------------------------------------------------------------------- /** Represents a ray @@ -151,7 +150,7 @@ struct aiRay //! Position and direction of the ray C_STRUCT aiVector3D pos, dir; -} PACK_STRUCT; // !struct aiRay +}; // !struct aiRay // ---------------------------------------------------------------------------------- /** Represents a color in Red-Green-Blue space. @@ -227,8 +226,7 @@ struct aiColor3D //! Red, green and blue color values ai_real r, g, b; -} /*PACK_STRUCT*/; // !struct aiColor3D -#include "./Compiler/poppack1.h" +}; // !struct aiColor3D // ---------------------------------------------------------------------------------- /** Represents an UTF-8 string, zero byte terminated. diff --git a/include/assimp/vector2.h b/include/assimp/vector2.h index 4122273c5..564d1f8b5 100644 --- a/include/assimp/vector2.h +++ b/include/assimp/vector2.h @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/include/assimp/vector2.inl b/include/assimp/vector2.inl index ce6521139..5ce13eece 100644 --- a/include/assimp/vector2.inl +++ b/include/assimp/vector2.inl @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/include/assimp/vector3.h b/include/assimp/vector3.h index 891beb28c..946e36cc5 100644 --- a/include/assimp/vector3.h +++ b/include/assimp/vector3.h @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. @@ -51,7 +52,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # include #endif -#include "./Compiler/pushpack1.h" #include "defs.h" #ifdef __cplusplus @@ -126,7 +126,7 @@ public: const aiVector3t SymMul(const aiVector3t& o); TReal x, y, z; -} PACK_STRUCT; +}; typedef aiVector3t aiVector3D; @@ -135,16 +135,12 @@ typedef aiVector3t aiVector3D; struct aiVector3D { ai_real x, y, z; -} PACK_STRUCT; +}; #endif // __cplusplus -#include "./Compiler/poppack1.h" - #ifdef __cplusplus - - #endif // __cplusplus #endif // AI_VECTOR3D_H_INC diff --git a/include/assimp/vector3.inl b/include/assimp/vector3.inl index 22b5bca03..a074bb23a 100644 --- a/include/assimp/vector3.inl +++ b/include/assimp/vector3.inl @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. @@ -141,12 +142,34 @@ AI_FORCE_INLINE aiVector3t& aiVector3t::operator *= (const aiMatri // ------------------------------------------------------------------------------------------------ template AI_FORCE_INLINE TReal aiVector3t::operator[](unsigned int i) const { - return *(&x + i); +// return *(&x + i); + switch (i) { + case 0: + return x; + case 1: + return y; + case 2: + return z; + default: + break; + } + return x; } // ------------------------------------------------------------------------------------------------ template AI_FORCE_INLINE TReal& aiVector3t::operator[](unsigned int i) { - return *(&x + i); +// return *(&x + i); + switch (i) { + case 0: + return x; + case 1: + return y; + case 2: + return z; + default: + break; + } + return x; } // ------------------------------------------------------------------------------------------------ template diff --git a/include/assimp/version.h b/include/assimp/version.h index a9b2beb5b..b85e6ccc8 100644 --- a/include/assimp/version.h +++ b/include/assimp/version.h @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/packaging/windows-innosetup/script.iss b/packaging/windows-innosetup/script.iss index d8e0d082a..f301bc4eb 100644 --- a/packaging/windows-innosetup/script.iss +++ b/packaging/windows-innosetup/script.iss @@ -19,35 +19,32 @@ VersionInfoCompany=Assimp Development Team ArchitecturesInstallIn64BitMode=x64 [Types] -Name: "full"; Description: "Full installation" +Name: "full"; Description: "Full installation" Name: "compact"; Description: "Compact installation, no test models or language bindings" -Name: "custom"; Description: "Custom installation"; Flags: iscustom +Name: "custom"; Description: "Custom installation"; Flags: iscustom [Components] -Name: "main"; Description: "Main Files (32 and 64 Bit)"; Types: full compact custom; Flags: fixed -Name: "tools"; Description: "Asset Viewer & Command Line Tools (32 and 64 Bit)"; Types: full compact -Name: "help"; Description: "Help Files"; Types: full compact -Name: "samples"; Description: "Samples"; Types: full -;Name: "wsource"; Description: "Source Code"; Types: full -Name: "test"; Description: "Test Models (BSD-licensed)"; Types: full +Name: "main"; Description: "Main Files (32 and 64 Bit)"; Types: full compact custom; Flags: fixed +Name: "tools"; Description: "Asset Viewer & Command Line Tools (32 and 64 Bit)"; Types: full compact +Name: "help"; Description: "Help Files"; Types: full compact +Name: "samples"; Description: "Samples"; Types: full +Name: "test"; Description: "Test Models (BSD-licensed)"; Types: full Name: "test_nonbsd"; Description: "Test Models (other (free) licenses)"; Types: full -Name: "pyassimp"; Description: "Python Bindings"; Types: full -Name: "dassimp"; Description: "D Bindings"; Types: full -Name: "assimp_net"; Description: "C#/.NET Bindings"; Types: full -;Name: "vc8"; Description: "VC8 project files"; Types: full -;Name: "vc9"; Description: "VC9 project files"; Types: full +Name: "pyassimp"; Description: "Python Bindings"; Types: full +Name: "dassimp"; Description: "D Bindings"; Types: full +Name: "assimp_net"; Description: "C#/.NET Bindings"; Types: full [Run] -Filename: "{app}\stub\vcredist_x86.exe"; Parameters: "/qb"; StatusMsg: "Installing VS2012 SP1 redistributable package (32 Bit)"; Check: not IsWin64 -Filename: "{app}\stub\vcredist_x64.exe"; Parameters: "/qb"; StatusMsg: "Installing VS2012 SP1 redistributable package (64 Bit)"; Check: IsWin64 +Filename: "{app}\stub\vc_redist.x86.exe"; Parameters: "/qb"; StatusMsg: "Installing VS2015 redistributable package (32 Bit)"; Check: not IsWin64 +Filename: "{app}\stub\vc_redist.x64.exe"; Parameters: "/qb"; StatusMsg: "Installing VS2015 redistributable package (64 Bit)"; Check: IsWin64 [Files] Source: "readme_installer.txt"; DestDir: "{app}"; Flags: isreadme ; Installer stub -Source: "vcredist_x86.exe"; DestDir: "{app}\stub\"; Check: not IsWin64 -Source: "vcredist_x64.exe"; DestDir: "{app}\stub\"; Check: IsWin64 +Source: "vc_redist.x86.exe"; DestDir: "{app}\stub\"; Check: not IsWin64 +Source: "vc_redist.x64.exe"; DestDir: "{app}\stub\"; Check: IsWin64 ; Common stuff Source: "..\..\CREDITS"; DestDir: "{app}" @@ -58,18 +55,18 @@ Source: "WEB"; DestDir: "{app}" Source: "..\..\scripts\*"; DestDir: "{app}\scripts"; Flags: recursesubdirs ; x86 binaries -Source: "..\..\bin\assimp_release-dll_Win32\Assimp32.dll"; DestDir: "{app}\bin\x86" -Source: "..\..\bin\assimpview_release-dll_Win32\assimp_view.exe"; DestDir: "{app}\bin\x86"; Components: tools -Source: "D3DCompiler_42.dll"; DestDir: "{app}\bin\x86"; Components: tools -Source: "D3DX9_42.dll"; DestDir: "{app}\bin\x86"; Components: tools -Source: "..\..\bin\assimpcmd_release-dll_Win32\assimp.exe"; DestDir: "{app}\bin\x86"; Components: tools +Source: "..\..\bin\release\x86\assimp-vc140-mt.dll"; DestDir: "{app}\bin\x86" +Source: "..\..\bin\release\x86\assimp_viewer.exe"; DestDir: "{app}\bin\x86"; Components: tools +Source: "D3DCompiler_42.dll"; DestDir: "{app}\bin\x86"; Components: tools +Source: "D3DX9_42.dll"; DestDir: "{app}\bin\x86"; Components: tools +Source: "..\..\bin\release\x86\assimp.exe"; DestDir: "{app}\bin\x86"; Components: tools ; x64 binaries -Source: "..\..\bin\assimp_release-dll_x64\Assimp64.dll"; DestDir: "{app}\bin\x64" -Source: "..\..\bin\assimpview_release-dll_x64\assimp_view.exe"; DestDir: "{app}\bin\x64"; Components: tools -Source: "D3DCompiler_42_x64.dll"; DestDir: "{app}\bin\x64"; DestName: "D3DCompiler_42.dll"; Components: tools -Source: "D3DX9_42_x64.dll"; DestDir: "{app}\bin\x64"; DestName: "D3DX9_42.dll"; Components: tools -Source: "..\..\bin\assimpcmd_release-dll_x64\assimp.exe"; DestDir: "{app}\bin\x64"; Components: tools +Source: "..\..\bin\release\x64\assimp-vc140-mt.dll"; DestDir: "{app}\bin\x64" +Source: "..\..\bin\release\x64\assimp_viewer.exe"; DestDir: "{app}\bin\x64"; Components: tools +Source: "D3DCompiler_42_x64.dll"; DestDir: "{app}\bin\x64"; DestName: "D3DCompiler_42.dll"; Components: tools +Source: "D3DX9_42_x64.dll"; DestDir: "{app}\bin\x64"; DestName: "D3DX9_42.dll"; Components: tools +Source: "..\..\bin\release\x64\assimp.exe"; DestDir: "{app}\bin\x64"; Components: tools ; Documentation Source: "..\..\doc\AssimpDoc_Html\AssimpDoc.chm"; DestDir: "{app}\doc"; Components: help @@ -77,8 +74,8 @@ Source: "..\..\doc\AssimpCmdDoc_Html\AssimpCmdDoc.chm"; DestDir: "{app}\doc"; Co Source: "..\..\doc\datastructure.xml"; DestDir: "{app}\doc"; Components: help ; Import libraries -Source: "..\..\lib\assimp_release-dll_Win32\assimp.lib"; DestDir: "{app}\lib\x86" -Source: "..\..\lib\assimp_release-dll_x64\assimp.lib"; DestDir: "{app}\lib\x64" +Source: "..\..\lib\release\x86\assimp.lib"; DestDir: "{app}\lib\x86" +Source: "..\..\lib\release\x64\assimp.lib"; DestDir: "{app}\lib\x64" ; Samples Source: "..\..\samples\*"; DestDir: "{app}\samples"; Flags: recursesubdirs; Components: samples @@ -90,15 +87,15 @@ Source: "..\..\include\*"; DestDir: "{app}\include"; Flags: recursesubdirs Source: "..\..\port\dAssimp\*"; DestDir: "{app}\port\D"; Flags: recursesubdirs; Components: dassimp ; Assimp.NET -Source: "..\..\port\Assimp.NET\*"; DestDir: "{app}\port\C#"; Flags: recursesubdirs; Components: assimp_net +;Source: "..\..\port\Assimp.NET\*"; DestDir: "{app}\port\C#"; Flags: recursesubdirs; Components: assimp_net ; PyAssimp -Source: "..\..\port\PyAssimp\*"; DestDir: "{app}\port\Python"; Excludes: "*.pyc,*.dll"; Flags: recursesubdirs; Components: pyassimp +;Source: "..\..\port\PyAssimp\*"; DestDir: "{app}\port\Python"; Excludes: "*.pyc,*.dll"; Flags: recursesubdirs; Components: pyassimp ; Test repository -Source: "..\..\test\models\*"; DestDir: "{app}\test\models"; Flags: recursesubdirs; Components: test -Source: "..\..\test\regression\*"; DestDir: "{app}\test\regression"; Flags: recursesubdirs; Components: test -Source: "..\..\test\models-nonbsd\*"; DestDir: "{app}\test\models-nonbsd"; Flags: recursesubdirs; Components: test_nonbsd +;Source: "..\..\test\models\*"; DestDir: "{app}\test\models"; Flags: recursesubdirs; Components: test +;Source: "..\..\test\regression\*"; DestDir: "{app}\test\regression"; Flags: recursesubdirs; Components: test +;Source: "..\..\test\models-nonbsd\*"; DestDir: "{app}\test\models-nonbsd"; Flags: recursesubdirs; Components: test_nonbsd ; Source Code & Workspaces ;Source: "..\..\code\*"; Excludes: "*.o"; DestDir: "{app}\code"; Flags: recursesubdirs; Components: wsource diff --git a/port/AndroidJNI/AndroidJNIIOSystem.cpp b/port/AndroidJNI/AndroidJNIIOSystem.cpp index 43bb9213d..e276ea59f 100644 --- a/port/AndroidJNI/AndroidJNIIOSystem.cpp +++ b/port/AndroidJNI/AndroidJNIIOSystem.cpp @@ -46,14 +46,16 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #if __ANDROID__ and __ANDROID_API__ > 9 and defined(AI_CONFIG_ANDROID_JNI_ASSIMP_MANAGER_SUPPORT) +#include #include +#include #include #include #include #include #include #include -#include +#include #include using namespace Assimp; @@ -100,6 +102,27 @@ void AndroidJNIIOSystem::AndroidActivityInit(ANativeActivity* activity) mApkAssetManager = activity->assetManager; } +// ------------------------------------------------------------------------------------------------ +// Create the directory for the extracted resource +static int mkpath(std::string path, mode_t mode) +{ + if (mkdir(path.c_str(), mode) == -1) { + switch(errno) { + case ENOENT: + if (mkpath(path.substr(0, path.find_last_of('/')), mode) == -1) + return -1; + else + return mkdir(path.c_str(), mode); + case EEXIST: + return 0; + default: + return -1; + } + } + + return 0; +} + // ------------------------------------------------------------------------------------------------ // Extracts android asset bool AndroidJNIIOSystem::AndroidExtractAsset(std::string name) @@ -131,6 +154,15 @@ bool AndroidJNIIOSystem::AndroidExtractAsset(std::string name) // Close AAsset_close(asset); + // Prepare directory for output buffer + std::string directoryNewPath = newPath; + directoryNewPath = dirname(&directoryNewPath[0]); + + if (mkpath(directoryNewPath, S_IRUSR | S_IWUSR | S_IXUSR) == -1) { + __android_log_print(ANDROID_LOG_ERROR, "assimp", + "Can not create the directory for the output file"); + } + // Prepare output buffer std::ofstream assetExtracted(newPath.c_str(), std::ios::out | std::ios::binary); diff --git a/port/PyAssimp/pyassimp/core.py b/port/PyAssimp/pyassimp/core.py index 27ec44c97..ac3df9290 100644 --- a/port/PyAssimp/pyassimp/core.py +++ b/port/PyAssimp/pyassimp/core.py @@ -70,7 +70,7 @@ def make_tuple(ai_obj, type = None): def _init_face(aiFace): aiFace.indices = [aiFace.mIndices[i] for i in range(aiFace.mNumIndices)] assimp_struct_inits = { structs.Face : _init_face } - + def call_init(obj, caller = None): if helper.hasattr_silent(obj,'contents'): #pointer _init(obj.contents, obj, caller) @@ -85,12 +85,12 @@ def _is_init_type(obj): # so it breaks the 'is iterable' check. # Basically: # FIXME! - elif not bool(obj): + elif not bool(obj): return False tname = obj.__class__.__name__ return not (tname[:2] == 'c_' or tname == 'Structure' \ or tname == 'POINTER') and not isinstance(obj,int) - + def _init(self, target = None, parent = None): """ Custom initialize() for C structs, adds safely accessible member functionality. @@ -100,8 +100,8 @@ def _init(self, target = None, parent = None): """ if not target: target = self - - dirself = dir(self) + + dirself = dir(self) for m in dirself: if m.startswith("_"): @@ -119,11 +119,12 @@ def _init(self, target = None, parent = None): if m == 'mName': obj = self.mName - target.name = str(obj.data.decode("utf-8")) + uni = unicode(obj.data, errors='ignore') + target.name = str( uni ) target.__class__.__repr__ = lambda x: str(x.__class__) + "(" + x.name + ")" target.__class__.__str__ = lambda x: x.name continue - + name = m[1:].lower() obj = getattr(self, m) @@ -144,7 +145,7 @@ def _init(self, target = None, parent = None): if helper.hasattr_silent(self, 'mNum' + m[1:]): length = getattr(self, 'mNum' + m[1:]) - + # -> special case: properties are # stored as a dict. if m == 'mProperties': @@ -156,7 +157,7 @@ def _init(self, target = None, parent = None): setattr(target, name, []) logger.debug(str(self) + ": " + name + " is an empty list.") continue - + try: if obj._type_ in structs.assimp_structs_as_tuple: @@ -166,7 +167,7 @@ def _init(self, target = None, parent = None): logger.debug(str(self) + ": Added an array of numpy arrays (type "+ str(type(obj)) + ") as self." + name) else: setattr(target, name, [make_tuple(obj[i]) for i in range(length)]) - + logger.debug(str(self) + ": Added a list of lists (type "+ str(type(obj)) + ") as self." + name) else: @@ -191,7 +192,7 @@ def _init(self, target = None, parent = None): sys.exit(1) except ValueError as e: - + logger.error("In " + str(self) + "->" + name + ": " + str(e) + ". Quitting now.") if "setting an array element with a sequence" in str(e): logger.error("Note that pyassimp does not currently " @@ -200,13 +201,13 @@ def _init(self, target = None, parent = None): " a post-processing to triangulate your" " faces.") raise e - + else: # starts with 'm' but not iterable setattr(target, name, obj) logger.debug("Added " + name + " as self." + name + " (type: " + str(type(obj)) + ")") - + if _is_init_type(obj): call_init(obj, target) @@ -265,34 +266,34 @@ def recur_pythonize(node, scene): for c in node.children: recur_pythonize(c, scene) -def load(filename, +def load(filename, file_type = None, processing = postprocess.aiProcess_Triangulate): ''' Load a model into a scene. On failure throws AssimpError. - + Arguments --------- filename: Either a filename or a file object to load model from. If a file object is passed, file_type MUST be specified Otherwise Assimp has no idea which importer to use. - This is named 'filename' so as to not break legacy code. + This is named 'filename' so as to not break legacy code. processing: assimp postprocessing parameters. Verbose keywords are imported from postprocessing, and the parameters can be combined bitwise to generate the final processing value. Note that the default value will triangulate quad faces. Example of generating other possible values: - processing = (pyassimp.postprocess.aiProcess_Triangulate | + processing = (pyassimp.postprocess.aiProcess_Triangulate | pyassimp.postprocess.aiProcess_OptimizeMeshes) file_type: string of file extension, such as 'stl' - + Returns --------- Scene object with model data ''' - + if hasattr(filename, 'read'): ''' - This is the case where a file object has been passed to load. + This is the case where a file object has been passed to load. It is calling the following function: const aiScene* aiImportFileFromMemory(const char* pBuffer, unsigned int pLength, @@ -302,14 +303,14 @@ def load(filename, if file_type == None: raise AssimpError('File type must be specified when passing file objects!') data = filename.read() - model = _assimp_lib.load_mem(data, - len(data), - processing, + model = _assimp_lib.load_mem(data, + len(data), + processing, file_type) else: # a filename string has been passed model = _assimp_lib.load(filename.encode("ascii"), processing) - + if not model: raise AssimpError('Could not import file!') scene = _init(model.contents) @@ -317,22 +318,22 @@ def load(filename, return scene def export(scene, - filename, + filename, file_type = None, processing = postprocess.aiProcess_Triangulate): ''' Export a scene. On failure throws AssimpError. - + Arguments --------- scene: scene to export. - filename: Filename that the scene should be exported to. + filename: Filename that the scene should be exported to. file_type: string of file exporter to use. For example "collada". processing: assimp postprocessing parameters. Verbose keywords are imported from postprocessing, and the parameters can be combined bitwise to generate the final processing value. Note that the default value will triangulate quad faces. Example of generating other possible values: - processing = (pyassimp.postprocess.aiProcess_Triangulate | + processing = (pyassimp.postprocess.aiProcess_Triangulate | pyassimp.postprocess.aiProcess_OptimizeMeshes) ''' @@ -400,7 +401,7 @@ def _finalize_mesh(mesh, target): fillarray("mColors") fillarray("mTextureCoords") - + # prepare faces if numpy: faces = numpy.array([f.indices for f in target.faces], dtype=numpy.int32) @@ -429,7 +430,7 @@ class PropertyGetter(dict): yield k[0], v -def _get_properties(properties, length): +def _get_properties(properties, length): """ Convenience Function to get the material properties as a dict and values in a python format. @@ -439,7 +440,8 @@ def _get_properties(properties, length): for p in [properties[i] for i in range(length)]: #the name p = p.contents - key = (str(p.mKey.data.decode("utf-8")).split('.')[1], p.mSemantic) + uni = unicode(p.mKey.data, errors='ignore') + key = (str(uni).split('.')[1], p.mSemantic) #the data from ctypes import POINTER, cast, c_int, c_float, sizeof @@ -447,7 +449,9 @@ def _get_properties(properties, length): arr = cast(p.mData, POINTER(c_float * int(p.mDataLength/sizeof(c_float)) )).contents value = [x for x in arr] elif p.mType == 3: #string can't be an array - value = cast(p.mData, POINTER(structs.MaterialPropertyString)).contents.data.decode("utf-8") + uni = unicode(cast(p.mData, POINTER(structs.MaterialPropertyString)).contents.data, errors='ignore') + value = uni + elif p.mType == 4: arr = cast(p.mData, POINTER(c_int * int(p.mDataLength/sizeof(c_int)) )).contents value = [x for x in arr] @@ -464,11 +468,11 @@ def _get_properties(properties, length): def decompose_matrix(matrix): if not isinstance(matrix, structs.Matrix4x4): raise AssimpError("pyassimp.decompose_matrix failed: Not a Matrix4x4!") - + scaling = structs.Vector3D() rotation = structs.Quaternion() position = structs.Vector3D() - + from ctypes import byref, pointer _assimp_lib.dll.aiDecomposeMatrix(pointer(matrix), byref(scaling), byref(rotation), byref(position)) return scaling._init(), rotation._init(), position._init() diff --git a/port/PyAssimp/pyassimp/helper.py b/port/PyAssimp/pyassimp/helper.py index b281e94cf..99d0b1758 100644 --- a/port/PyAssimp/pyassimp/helper.py +++ b/port/PyAssimp/pyassimp/helper.py @@ -8,6 +8,7 @@ import os import ctypes from ctypes import POINTER import operator +import sys try: import numpy except: numpy = None @@ -39,7 +40,9 @@ elif os.name=='nt': for dir_candidate in path_dirs: if 'assimp' in dir_candidate.lower(): additional_dirs.append(dir_candidate) - + +additional_dirs += sys.path + #print(additional_dirs) def vec2tuple(x): """ Converts a VECTOR3D to a Tuple """ diff --git a/port/PyAssimp/pyassimp/material.py b/port/PyAssimp/pyassimp/material.py new file mode 100644 index 000000000..97b143a62 --- /dev/null +++ b/port/PyAssimp/pyassimp/material.py @@ -0,0 +1,89 @@ +##
Dummy value. +# +# No texture, but the value to be used as 'texture semantic' +# (#aiMaterialProperty::mSemantic) for all material properties +# *not* related to textures. +# +aiTextureType_NONE = 0x0 + +##
The texture is combined with the result of the diffuse +# lighting equation. +# +aiTextureType_DIFFUSE = 0x1 + +##
The texture is combined with the result of the specular +# lighting equation. +# +aiTextureType_SPECULAR = 0x2 + +##
The texture is combined with the result of the ambient +# lighting equation. +# +aiTextureType_AMBIENT = 0x3 + +##
The texture is added to the result of the lighting +# calculation. It isn't influenced by incoming light. +# +aiTextureType_EMISSIVE = 0x4 + +##
The texture is a height map. +# +# By convention, higher gray-scale values stand for +# higher elevations from the base height. +# +aiTextureType_HEIGHT = 0x5 + +##
The texture is a (tangent space) normal-map. +# +# Again, there are several conventions for tangent-space +# normal maps. Assimp does (intentionally) not +# distinguish here. +# +aiTextureType_NORMALS = 0x6 + +##
The texture defines the glossiness of the material. +# +# The glossiness is in fact the exponent of the specular +# (phong) lighting equation. Usually there is a conversion +# function defined to map the linear color values in the +# texture to a suitable exponent. Have fun. +# +aiTextureType_SHININESS = 0x7 + +##
The texture defines per-pixel opacity. +# +# Usually 'white' means opaque and 'black' means +# 'transparency'. Or quite the opposite. Have fun. +# +aiTextureType_OPACITY = 0x8 + +##
Displacement texture +# +# The exact purpose and format is application-dependent. +# Higher color values stand for higher vertex displacements. +# +aiTextureType_DISPLACEMENT = 0x9 + +##
Lightmap texture (aka Ambient Occlusion) +# +# Both 'Lightmaps' and dedicated 'ambient occlusion maps' are +# covered by this material property. The texture contains a +# scaling value for the final color value of a pixel. Its +# intensity is not affected by incoming light. +# +aiTextureType_LIGHTMAP = 0xA + +##
Reflection texture +# +#Contains the color of a perfect mirror reflection. +#Rarely used, almost never for real-time applications. +# +aiTextureType_REFLECTION = 0xB + +##
Unknown texture +# +# A texture reference that does not match any of the definitions +# above is considered to be 'unknown'. It is still imported +# but is excluded from any further postprocessing. +# +aiTextureType_UNKNOWN = 0xC diff --git a/port/PyAssimp/scripts/3d_viewer.py b/port/PyAssimp/scripts/3d_viewer.py index b60f0e219..3a579eb61 100755 --- a/port/PyAssimp/scripts/3d_viewer.py +++ b/port/PyAssimp/scripts/3d_viewer.py @@ -55,7 +55,26 @@ ENTITY = "entity" CAMERA = "camera" MESH = "mesh" -FLAT_VERTEX_SHADER = """ +FLAT_VERTEX_SHADER_120 = """ +#version 120 + +uniform mat4 u_viewProjectionMatrix; +uniform mat4 u_modelMatrix; + +uniform vec4 u_materialDiffuse; + +attribute vec3 a_vertex; + +varying vec4 v_color; + +void main(void) +{ + v_color = u_materialDiffuse; + gl_Position = u_viewProjectionMatrix * u_modelMatrix * vec4(a_vertex, 1.0); +} +""" + +FLAT_VERTEX_SHADER_130 = """ #version 130 uniform mat4 u_viewProjectionMatrix; @@ -74,7 +93,46 @@ void main(void) } """ -BASIC_VERTEX_SHADER = """ +BASIC_VERTEX_SHADER_120 = """ +#version 120 + +uniform mat4 u_viewProjectionMatrix; +uniform mat4 u_modelMatrix; +uniform mat3 u_normalMatrix; +uniform vec3 u_lightPos; + +uniform vec4 u_materialDiffuse; + +attribute vec3 a_vertex; +attribute vec3 a_normal; + +varying vec4 v_color; + +void main(void) +{ + // Now the normal is in world space, as we pass the light in world space. + vec3 normal = u_normalMatrix * a_normal; + + float dist = distance(a_vertex, u_lightPos); + + // go to https://www.desmos.com/calculator/nmnaud1hrw to play with the parameters + // att is not used for now + float att=1.0/(1.0+0.8*dist*dist); + + vec3 surf2light = normalize(u_lightPos - a_vertex); + vec3 norm = normalize(normal); + float dcont=max(0.0,dot(norm,surf2light)); + + float ambient = 0.3; + float intensity = dcont + 0.3 + ambient; + + v_color = u_materialDiffuse * intensity; + + gl_Position = u_viewProjectionMatrix * u_modelMatrix * vec4(a_vertex, 1.0); +} +""" + +BASIC_VERTEX_SHADER_130 = """ #version 130 uniform mat4 u_viewProjectionMatrix; @@ -113,7 +171,17 @@ void main(void) } """ -BASIC_FRAGMENT_SHADER = """ +BASIC_FRAGMENT_SHADER_120 = """ +#version 120 + +varying vec4 v_color; + +void main() { + gl_FragColor = v_color; +} +""" + +BASIC_FRAGMENT_SHADER_130 = """ #version 130 in vec4 v_color; @@ -123,7 +191,42 @@ void main() { } """ -GOOCH_VERTEX_SHADER = """ +GOOCH_VERTEX_SHADER_120 = """ +#version 120 + +// attributes +attribute vec3 a_vertex; // xyz - position +attribute vec3 a_normal; // xyz - normal + +// uniforms +uniform mat4 u_modelMatrix; +uniform mat4 u_viewProjectionMatrix; +uniform mat3 u_normalMatrix; +uniform vec3 u_lightPos; +uniform vec3 u_camPos; + +// output data from vertex to fragment shader +varying vec3 o_normal; +varying vec3 o_lightVector; + +/////////////////////////////////////////////////////////////////// + +void main(void) +{ + // transform position and normal to world space + vec4 positionWorld = u_modelMatrix * vec4(a_vertex, 1.0); + vec3 normalWorld = u_normalMatrix * a_normal; + + // calculate and pass vectors required for lighting + o_lightVector = u_lightPos - positionWorld.xyz; + o_normal = normalWorld; + + // project world space position to the screen and output it + gl_Position = u_viewProjectionMatrix * positionWorld; +} +""" + +GOOCH_VERTEX_SHADER_130 = """ #version 130 // attributes @@ -158,7 +261,56 @@ void main(void) } """ -GOOCH_FRAGMENT_SHADER = """ +GOOCH_FRAGMENT_SHADER_120 = """ +#version 120 + +// data from vertex shader +varying vec3 o_normal; +varying vec3 o_lightVector; + +// diffuse color of the object +uniform vec4 u_materialDiffuse; +// cool color of gooch shading +uniform vec3 u_coolColor; +// warm color of gooch shading +uniform vec3 u_warmColor; +// how much to take from object color in final cool color +uniform float u_alpha; +// how much to take from object color in final warm color +uniform float u_beta; + +/////////////////////////////////////////////////////////// + +void main(void) +{ + // normlize vectors for lighting + vec3 normalVector = normalize(o_normal); + vec3 lightVector = normalize(o_lightVector); + // intensity of diffuse lighting [-1, 1] + float diffuseLighting = dot(lightVector, normalVector); + // map intensity of lighting from range [-1; 1] to [0, 1] + float interpolationValue = (1.0 + diffuseLighting)/2; + + ////////////////////////////////////////////////////////////////// + + // cool color mixed with color of the object + vec3 coolColorMod = u_coolColor + vec3(u_materialDiffuse) * u_alpha; + // warm color mixed with color of the object + vec3 warmColorMod = u_warmColor + vec3(u_materialDiffuse) * u_beta; + // interpolation of cool and warm colors according + // to lighting intensity. The lower the light intensity, + // the larger part of the cool color is used + vec3 colorOut = mix(coolColorMod, warmColorMod, interpolationValue); + + ////////////////////////////////////////////////////////////////// + + // save color + gl_FragColor.rgb = colorOut; + gl_FragColor.a = 1; +} +""" + +GOOCH_FRAGMENT_SHADER_130 = """ #version 130 // data from vertex shader @@ -207,10 +359,32 @@ void main(void) // save color resultingColor.rgb = colorOut; resultingColor.a = 1; -} +} """ -SILHOUETTE_VERTEX_SHADER = """ +SILHOUETTE_VERTEX_SHADER_120 = """ +#version 120 + +attribute vec3 a_vertex; // xyz - position +attribute vec3 a_normal; // xyz - normal + +uniform mat4 u_modelMatrix; +uniform mat4 u_viewProjectionMatrix; +uniform mat4 u_modelViewMatrix; +uniform vec4 u_materialDiffuse; +uniform float u_bordersize; // width of the border + +varying vec4 v_color; + +void main(void){ + v_color = u_materialDiffuse; + float distToCamera = -(u_modelViewMatrix * vec4(a_vertex, 1.0)).z; + vec4 tPos = vec4(a_vertex + a_normal * u_bordersize * distToCamera, 1.0); + gl_Position = u_viewProjectionMatrix * u_modelMatrix * tPos; +} +""" + +SILHOUETTE_VERTEX_SHADER_130 = """ #version 130 in vec3 a_vertex; // xyz - position @@ -288,7 +462,17 @@ class PyAssimp3DViewer: glClearColor(0.18, 0.18, 0.18, 1.0) - self.prepare_shaders() + shader_compilation_succeeded = False + try: + self.set_shaders_v130() + self.prepare_shaders() + except RuntimeError, message: + sys.stderr.write("%s\n" % message) + sys.stdout.write("Could not compile shaders in version 1.30, trying version 1.20\n") + + if not shader_compilation_succeeded: + self.set_shaders_v120() + self.prepare_shaders() self.scene = None self.meshes = {} # stores the OpenGL vertex/faces/normals buffers pointers @@ -315,11 +499,29 @@ class PyAssimp3DViewer: self.is_panning = False self.is_zooming = False + def set_shaders_v120(self): + self.BASIC_VERTEX_SHADER = BASIC_VERTEX_SHADER_120 + self.FLAT_VERTEX_SHADER = FLAT_VERTEX_SHADER_120 + self.SILHOUETTE_VERTEX_SHADER = SILHOUETTE_VERTEX_SHADER_120 + self.GOOCH_VERTEX_SHADER = GOOCH_VERTEX_SHADER_120 + + self.BASIC_FRAGMENT_SHADER = BASIC_FRAGMENT_SHADER_120 + self.GOOCH_FRAGMENT_SHADER = GOOCH_FRAGMENT_SHADER_120 + + def set_shaders_v130(self): + self.BASIC_VERTEX_SHADER = BASIC_VERTEX_SHADER_130 + self.FLAT_VERTEX_SHADER = FLAT_VERTEX_SHADER_130 + self.SILHOUETTE_VERTEX_SHADER = SILHOUETTE_VERTEX_SHADER_130 + self.GOOCH_VERTEX_SHADER = GOOCH_VERTEX_SHADER_130 + + self.BASIC_FRAGMENT_SHADER = BASIC_FRAGMENT_SHADER_130 + self.GOOCH_FRAGMENT_SHADER = GOOCH_FRAGMENT_SHADER_130 + def prepare_shaders(self): ### Base shader - vertex = shaders.compileShader(BASIC_VERTEX_SHADER, GL_VERTEX_SHADER) - fragment = shaders.compileShader(BASIC_FRAGMENT_SHADER, GL_FRAGMENT_SHADER) + vertex = shaders.compileShader(self.BASIC_VERTEX_SHADER, GL_VERTEX_SHADER) + fragment = shaders.compileShader(self.BASIC_FRAGMENT_SHADER, GL_FRAGMENT_SHADER) self.shader = shaders.compileProgram(vertex, fragment) @@ -332,7 +534,7 @@ class PyAssimp3DViewer: 'a_normal'), self.shader) ### Flat shader - flatvertex = shaders.compileShader(FLAT_VERTEX_SHADER, GL_VERTEX_SHADER) + flatvertex = shaders.compileShader(self.FLAT_VERTEX_SHADER, GL_VERTEX_SHADER) self.flatshader = shaders.compileProgram(flatvertex, fragment) self.set_shader_accessors(('u_modelMatrix', @@ -341,7 +543,7 @@ class PyAssimp3DViewer: ('a_vertex',), self.flatshader) ### Silhouette shader - silh_vertex = shaders.compileShader(SILHOUETTE_VERTEX_SHADER, GL_VERTEX_SHADER) + silh_vertex = shaders.compileShader(self.SILHOUETTE_VERTEX_SHADER, GL_VERTEX_SHADER) self.silhouette_shader = shaders.compileProgram(silh_vertex, fragment) self.set_shader_accessors(('u_modelMatrix', @@ -354,8 +556,8 @@ class PyAssimp3DViewer: 'a_normal'), self.silhouette_shader) ### Gooch shader - gooch_vertex = shaders.compileShader(GOOCH_VERTEX_SHADER, GL_VERTEX_SHADER) - gooch_fragment = shaders.compileShader(GOOCH_FRAGMENT_SHADER, GL_FRAGMENT_SHADER) + gooch_vertex = shaders.compileShader(self.GOOCH_VERTEX_SHADER, GL_VERTEX_SHADER) + gooch_fragment = shaders.compileShader(self.GOOCH_FRAGMENT_SHADER, GL_FRAGMENT_SHADER) self.gooch_shader = shaders.compileProgram(gooch_vertex, gooch_fragment) self.set_shader_accessors(('u_modelMatrix', diff --git a/port/PyAssimp/setup.py b/port/PyAssimp/setup.py index e683f7a81..8f3cdcae2 100644 --- a/port/PyAssimp/setup.py +++ b/port/PyAssimp/setup.py @@ -9,5 +9,7 @@ setup(name='pyassimp', url='https://github.com/assimp/assimp', packages=['pyassimp'], data_files=[('share/pyassimp', ['README.md']), - ('share/examples/pyassimp', ['scripts/' + f for f in os.listdir('scripts/')])], requires=['numpy'] + ('share/examples/pyassimp', ['scripts/' + f for f in os.listdir('scripts/')]), + ('lib/', [f for f in os.listdir('../../lib') if os.path.isfile(f)])], + requires=['numpy'] ) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 8fd04267b..b0be474d8 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -1,7 +1,8 @@ # Open Asset Import Library (assimp) # ---------------------------------------------------------------------- # -# Copyright (c) 2006-2016, assimp team +# Copyright (c) 2006-2017, assimp team + # All rights reserved. # # Redistribution and use of this software in source and binary forms, @@ -37,7 +38,8 @@ #---------------------------------------------------------------------- cmake_minimum_required( VERSION 2.6 ) -#INCLUDE( AddGTest ) +include( CTest ) +enable_testing() INCLUDE_DIRECTORIES( ../contrib/gtest/include @@ -103,10 +105,15 @@ SET( TEST_SRCS unit/SceneDiffer.cpp unit/utSIBImporter.cpp unit/utObjImportExport.cpp + unit/utObjTools.cpp + unit/utOpenGEXImportExport.cpp unit/utPretransformVertices.cpp + unit/utPLYImportExport.cpp + unit/utPMXImporter.cpp unit/utRemoveComments.cpp unit/utRemoveComponent.cpp unit/utRemoveRedundantMaterials.cpp + unit/utRemoveVCProcess.cpp unit/utScenePreprocessor.cpp unit/utSharedPPData.cpp unit/utStringUtils.cpp @@ -119,7 +126,9 @@ SET( TEST_SRCS unit/utTypes.cpp unit/utVertexTriangleAdjacency.cpp unit/utVersion.cpp + unit/utVector3.cpp unit/utXImporterExporter.cpp + unit/utD3MFImportExport.cpp ) SOURCE_GROUP( tests FILES ${TEST_SRCS} ) @@ -149,15 +158,6 @@ ENDIF(MSVC) target_link_libraries( unit assimp ${platform_libs} ) add_subdirectory(headercheck) -#if (ASSIMP_COVERALLS) -# include(Coveralls) -# -# set(COVERAGE_SRCS ${assimp_src} ${TEST_SRCS} ) -# -# # Create the coveralls target. -# coveralls_setup( -# "${COVERAGE_SRCS}" # The source files. -# ON # If we should upload. -# "${PROJECT_SOURCE_DIR}/cmake-modules/") # (Optional) Alternate project cmake module path. -#endif() + +add_test( unittests unit ) diff --git a/test/models-nonbsd/MMD/Alicia_blade.pmx b/test/models-nonbsd/MMD/Alicia_blade.pmx new file mode 100644 index 000000000..cdd7709cc Binary files /dev/null and b/test/models-nonbsd/MMD/Alicia_blade.pmx differ diff --git a/test/models-nonbsd/MMD/readme.txt b/test/models-nonbsd/MMD/readme.txt new file mode 100644 index 000000000..d8c882420 --- /dev/null +++ b/test/models-nonbsd/MMD/readme.txt @@ -0,0 +1,49 @@ +———————————————————————— +ニコニ立体公式キャラクター「ニコニ立体ちゃん」 +http://3d.nicovideo.jp/alicia/ +version 4 +©dwango, inc. All rights reserved. +———————————————————————— + + +この度は、ニコニ立体公式キャラクター「ニコニ立体ちゃん」をダウンロードいただきましてありがとうございます。 + +◯ 内容物 +1. MikuMikuDance(MMD)用ファイル2種 (ニコニ立体ちゃん本体・ビーム彫刻刀) +2. MMD用モーションファイル16種 (ニコファーレのモーションキャプチャーデバイスを用いて収録) +2. FBXファイル2種 (MMD用データ、Unity用データ) + MAXファイル(オリジナルデータ) +3. Unity Package1種 +4. ニコニ立体ちゃん壁紙1種 + + +◯よくある質問 +* 「ニコニ立体ちゃん」と「アリシア・ソリッド」、正式名称はどちら? +キャラクターの本名はアリシア・ソリッドですが、クレジット等での表記はニコニ立体ちゃんが正式名称となります。 +作品発表の際には「ニコニ立体ちゃん」タグをご活用ください。 + +* ニコニ立体ちゃんを用いた、年齢制限のある二次創作物の公開は可能なのか? +利用規約にある禁止事項に抵触しない限りにおいて可能です。 + + +◯ 利用規約抜粋 +必ず利用規約( http://3d.nicovideo.jp/alicia/rule.html )をご確認ください。 +利用規約の改訂などによって下記抜粋と利用規約の内容が異なる場合は利用規約が優先されます。 + +* 非営利、営利に関わらず個人(同人サークルなど、法人を除く団体を含む)の利用が可能です。 +* 二次創作物について株式会社ドワンゴ(以下、当社)のクレジットを表記する必要はありません。 +* 改変物を配布することができます。 +* niconico内でキャラクターやモーションを利用した作品を投稿する場合は、コンテンツツリーの親作品にキャラクター( http://3d.nicovideo.jp/works/td14712 )を登録するよう努めるものとします。 + + +◯禁止事項 +* 第三者の知的財産権その他一切の権利及び名誉を侵害しないこと。 +* 当社(当社が提供するサービス等を含む)及び当社キャラクターの名誉・品位傷つける行為をしないこと。 +* 公序良俗に反する行為や目的、暴力的な表現、反社会的な行為や目的、特定の信条や宗教、政治的発言のため利用しないこと。 +* 当社の公式商品であるかのような誤解を招く利用をしないこと。 +* その他、当社が不適切と判断する行為に利用しないこと。 + + +◯ クレジット +企画: 株式会社ドワンゴ +キャラクターデザイン: 黒星紅白 +モデリング: 雨刻 \ No newline at end of file diff --git a/test/models/OBJ/spider.mtl b/test/models/OBJ/spider.mtl index 38207dcc6..d225a7c62 100644 --- a/test/models/OBJ/spider.mtl +++ b/test/models/OBJ/spider.mtl @@ -1,38 +1,38 @@ -# -# spider.mtl -# - -newmtl Skin -Ka 0.200000 0.200000 0.200000 -Kd 0.827451 0.792157 0.772549 -Ks 0.000000 0.000000 0.000000 -Ns 0.000000 -map_Kd .\wal67ar_small.jpg - -newmtl Brusttex -Ka 0.200000 0.200000 0.200000 -Kd 0.800000 0.800000 0.800000 -Ks 0.000000 0.000000 0.000000 -Ns 0.000000 -map_Kd .\wal69ar_small.jpg - -newmtl HLeibTex -Ka 0.200000 0.200000 0.200000 -Kd 0.690196 0.639216 0.615686 -Ks 0.000000 0.000000 0.000000 -Ns 0.000000 -map_Kd .\SpiderTex.jpg - -newmtl BeinTex -Ka 0.200000 0.200000 0.200000 -Kd 0.800000 0.800000 0.800000 -Ks 0.000000 0.000000 0.000000 -Ns 0.000000 -map_Kd .\drkwood2.jpg - -newmtl Augentex -Ka 0.200000 0.200000 0.200000 -Kd 0.800000 0.800000 0.800000 -Ks 0.000000 0.000000 0.000000 -Ns 0.000000 +# +# spider.mtl +# + +newmtl Skin +Ka 0.200000 0.200000 0.200000 +Kd 0.827451 0.792157 0.772549 +Ks 0.000000 0.000000 0.000000 +Ns 0.000000 +map_Kd .\wal67ar_small.jpg + +newmtl Brusttex +Ka 0.200000 0.200000 0.200000 +Kd 0.800000 0.800000 0.800000 +Ks 0.000000 0.000000 0.000000 +Ns 0.000000 +map_Kd .\wal69ar_small.jpg + +newmtl HLeibTex +Ka 0.200000 0.200000 0.200000 +Kd 0.690196 0.639216 0.615686 +Ks 0.000000 0.000000 0.000000 +Ns 0.000000 +map_Kd .\SpiderTex.jpg + +newmtl BeinTex +Ka 0.200000 0.200000 0.200000 +Kd 0.800000 0.800000 0.800000 +Ks 0.000000 0.000000 0.000000 +Ns 0.000000 +map_Kd .\drkwood2.jpg + +newmtl Augentex +Ka 0.200000 0.200000 0.200000 +Kd 0.800000 0.800000 0.800000 +Ks 0.000000 0.000000 0.000000 +Ns 0.000000 map_Kd .\engineflare1.jpg \ No newline at end of file diff --git a/test/models/OBJ/spider.obj b/test/models/OBJ/spider.obj index 4c1e8339b..3e8e70fbd 100644 --- a/test/models/OBJ/spider.obj +++ b/test/models/OBJ/spider.obj @@ -1,3226 +1,3436 @@ -# File produced by Open Asset Import Library (http://www.assimp.sf.net) -# (assimp v3.3.4279196) - -mtllib spider.obj.mtl - -# 722 vertex positions -v 1.160378932952881 4.512683868408203 6.449167251586914 -v 22.65617179870605 10.21453857421875 16.86968994140625 -v 4.568314075469971 16.85711288452148 5.619616985321045 -v 14.40229797363281 32.89186859130859 3.414829015731812 -v 27.52080917358398 27.08032608032227 11.45156478881836 -v 39.18625640869141 16.23099708557129 12.6327018737793 -v -6.442715167999268 10.77740478515625 -0.5375289916992188 -v -8.120363235473633 15.6844596862793 -10.5 -v -0.8867700099945068 23.4237174987793 -4.342854022979736 -v -0.8867700099945068 23.4237174987793 -16.65714454650879 -v 14.40229797363281 32.89186859130859 -26.41482543945313 -v 12.95316505432129 36.87333679199219 -11.5 -v 30.52731704711914 37.50395202636719 -2.733282089233398 -v 30.52731704711914 37.50395202636719 -20.26671600341797 -v 44.30125045776367 33.96472930908203 -11.5 -v 45.09496688842773 27.71094512939453 2.684845924377441 -v 57.93621826171875 30.27653312683105 -11.5 -v 54.50359344482422 5.934020042419434 -11.5 -v 51.09176254272461 11.23489952087402 2.684845924377441 -v 45.09496688842773 27.71094512939453 -25.68484497070313 -v 39.18625640869141 16.23099708557129 -35.63270568847656 -v 51.09176254272461 11.23489952087402 -25.68484497070313 -v 27.52080917358398 27.08032608032227 -34.45156478881836 -v 4.568314075469971 16.85711288452148 -26.6196174621582 -v 1.160378932952881 4.512683868408203 -27.44916915893555 -v 22.65617179870605 10.21453857421875 -39.86968994140625 -v 7.838881015777588 -6.414187908172607 -26.6196174621582 -v 30.91004180908203 -12.4627857208252 -26.41482543945313 -v 37.22381591796875 0.4215309917926788 -34.45156478881836 -v 46.22711181640625 -5.630886077880859 -20.26671600341797 -v 32.35918426513672 -16.44425201416016 -11.5 -v 30.91004180908203 -12.4627857208252 3.414829015731812 -v 46.22711181640625 -5.630886077880859 -2.733282089233398 -v 4.405118942260742 -14.23004245758057 -16.65714454650879 -v -4.681486129760742 -8.784435272216797 -10.5 -v 4.405118942260742 -14.23004245758057 -4.342854022979736 -v -4.421391010284424 -3.605049133300781 -0.5375289916992188 -v 7.838881015777588 -6.414187908172607 5.619616985321045 -v 37.22381591796875 0.4215309917926788 11.45156478881836 -v -9.876476287841797 2.961555004119873 -10.5 -v -6.442715167999268 10.77740478515625 -20.46247100830078 -v -4.421391010284424 -3.605049133300781 -20.46247100830078 -v -41.85661315917969 -0.7548459768295288 9.430771827697754 -v -27.9502124786377 1.303017020225525 3.0814208984375 -v -32.62586212158203 10.86018753051758 8.47976016998291 -v -24.40152359008789 12.2247486114502 -3.122689962387085 -v -18.8264045715332 5.435883045196533 0.5830910205841064 -v -11.22126770019531 -4.132546901702881 1.127722024917603 -v -44.88201522827148 11.88719749450684 1.421121001243591 -v -44.84470367431641 15.22849273681641 -10 -v -35.57024002075195 16.59859085083008 -2.941359043121338 -v -35.57024002075195 16.59859085083008 -17.05864334106445 -v -24.40152359008789 12.2247486114502 -16.87730979919434 -v -23.77848243713379 14.14228057861328 -10 -v -8.432302474975586 6.445052146911621 -5.95761775970459 -v -8.432302474975586 6.445052146911621 -14.04238128662109 -v -1.337092995643616 1.108109951019287 -10 -v -3.30927300453186 -1.735224008560181 -0.5947030186653137 -v -0.4196679890155792 -7.642198085784912 -10 -v -6.305181980133057 -14.18209838867188 -10 -v -6.229438781738281 -10.72257518768311 -0.5947030186653137 -v -3.30927300453186 -1.735224008560181 -19.40529632568359 -v -11.22126770019531 -4.132546901702881 -21.12771987915039 -v -6.229438781738281 -10.72257518768311 -19.40529632568359 -v -18.8264045715332 5.435883045196533 -20.58309173583984 -v -32.62586212158203 10.86018753051758 -28.47975921630859 -v -41.85661315917969 -0.7548459768295288 -29.43077087402344 -v -27.9502124786377 1.303017020225525 -23.0814208984375 -v -39.19473266601563 -9.356718063354492 -28.47975921630859 -v -31.49889755249023 -9.618716239929199 -16.87730979919434 -v -22.99813652038574 -7.403382778167725 -20.58309173583984 -v -49.71383666992188 -2.983590126037598 1.421121001243591 -v -39.19473266601563 -9.356718063354492 8.47976016998291 -v -22.99813652038574 -7.403382778167725 0.5830910205841064 -v -31.49889755249023 -9.618716239929199 -3.122689962387085 -v -50.63702392578125 8.975393295288086 -10 -v -51.64759063720703 -5.708693981170654 -10 -v -44.88201522827148 11.88719749450684 -21.42111587524414 -v -49.71383666992188 -2.983590126037598 -21.42111587524414 -v -40.67147827148438 -3.47288703918457 -21.36916732788086 -v -41.96333312988281 -2.246160984039307 -18.48523330688477 -v -44.64511871337891 -3.443838119506836 -21.08979034423828 -v -87.6058349609375 -39.9835319519043 -104.3517227172852 -v -87.87104797363281 -40.01747512817383 -103.8583068847656 -v -87.9501953125 -39.45514678955078 -104.2601852416992 -v -47.09840393066406 7.389261245727539 -39.58503341674805 -v -47.14669799804688 8.704387664794922 -37.68162155151367 -v -55.4437255859375 28.01696014404297 -51.02064895629883 -v -55.80507659912109 29.50034332275391 -50.36057662963867 -v -56.41304779052734 27.51875305175781 -54.60213470458984 -v -57.93299102783203 29.20790100097656 -55.03944778442383 -v -67.98501586914063 13.43557167053223 -79.02035522460938 -v -69.89360046386719 14.10584259033203 -80.14413452148438 -v -81.67832183837891 -31.37918090820313 -101.2915573120117 -v -82.77850341796875 -29.84352111816406 -101.2665863037109 -v -45.27461242675781 -1.921316027641296 -17.56256103515625 -v -88.2349853515625 -39.3502311706543 -103.8660430908203 -v -48.86238861083984 8.964324951171875 -36.15071487426758 -v -56.92498016357422 29.82746124267578 -49.55580902099609 -v -60.01216888427734 29.56021118164063 -54.08668899536133 -v -72.06874084472656 14.20652008056641 -79.36090087890625 -v -83.47474670410156 -29.51860809326172 -100.4707794189453 -v -48.11187744140625 -2.742969989776611 -19.29600143432617 -v -88.2457275390625 -39.74774169921875 -103.4660797119141 -v -50.95351028442383 7.973351955413818 -36.14510726928711 -v -57.96013641357422 28.75201416015625 -49.21238708496094 -v -61.08487701416016 28.31040191650391 -52.46125793457031 -v -72.87251281738281 13.66179847717285 -77.26039123535156 -v -83.24275207519531 -30.64902877807617 -99.50344848632813 -v -48.33858871459961 -4.09240198135376 -22.38015365600586 -v -87.97438049316406 -40.34838485717773 -103.3615341186523 -v -51.84541320800781 6.477696895599365 -37.66901397705078 -v -58.13103866577148 27.08382415771484 -49.58887100219727 -v -60.34334564208984 26.39956665039063 -51.38712310791016 -v -71.69966125488281 12.8818302154541 -75.42439270019531 -v -82.25722503662109 -32.38360595703125 -99.09293365478516 -v -45.78402709960938 -4.953472137451172 -24.49265670776367 -v -87.62525177001953 -40.69983673095703 -103.6310958862305 -v -50.86646270751953 5.603586196899414 -39.57491683959961 -v -57.30899810791016 26.07907104492188 -50.40177917480469 -v -58.34596252441406 25.26664733886719 -51.67315673828125 -v -69.433349609375 12.45395088195801 -75.23539733886719 -v -81.26026153564453 -33.41617965698242 -99.54843139648438 -v -42.37185668945313 -4.677759170532227 -24.04270935058594 -v -87.46121978759766 -40.53748321533203 -104.0717544555664 -v -48.75384521484375 6.009276866912842 -40.42763137817383 -v -56.11302947998047 26.49437713623047 -51.03896713256836 -v -56.59683609008789 25.76473236083984 -53.10398483276367 -v -67.78019714355469 12.70041084289551 -76.83576965332031 -v -81.00263214111328 -32.96916198730469 -100.5268630981445 -v -45.856201171875 -3.096683979034424 0.9894610047340393 -v -42.83802795410156 -1.822747945785522 -1.17337703704834 -v -41.96012115478516 -3.15467095375061 1.817621946334839 -v -92.29042816162109 -39.21158981323242 57.38248825073242 -v -92.26210784912109 -39.83740234375 57.07994079589844 -v -91.95950317382813 -39.73274230957031 57.5407600402832 -v -49.36812591552734 8.476757049560547 19.08589744567871 -v -49.19630432128906 7.804555892944336 21.29348754882813 -v -54.25469207763672 27.27288055419922 30.44888496398926 -v -54.92575836181641 28.34239959716797 29.36605453491211 -v -57.45500946044922 28.70623016357422 33.83551406860352 -v -55.48647308349609 27.49809265136719 33.97690582275391 -v -67.46834564208984 9.109057426452637 43.49641799926758 -v -69.61196136474609 9.454971313476563 44.29645156860352 -v -87.01417541503906 -30.51413726806641 52.42203521728516 -v -85.97149658203125 -32.07468414306641 52.63847351074219 -v -45.98867797851563 -1.450130939483643 -2.535742998123169 -v -92.60006713867188 -39.16170501708984 56.99636840820313 -v -50.88497161865234 7.785149097442627 17.48099899291992 -v -55.98342132568359 28.08773803710938 28.45757293701172 -v -59.41564178466797 28.14698791503906 32.74097061157227 -v -71.61580657958984 8.682785987854004 43.43437957763672 -v -87.75607299804688 -30.29622077941895 51.63100051879883 -v -49.03958129882813 -2.317409992218018 -1.243530988693237 -v -92.65523529052734 -39.6205940246582 56.67316055297852 -v -52.60464477539063 6.250553131103516 17.68733215332031 -v -56.63124847412109 26.70069122314453 28.40756416320801 -v -59.89194488525391 26.24149322509766 31.51743125915527 -v -71.97093963623047 7.37397575378418 41.55935287475586 -v -87.63851928710938 -31.58496475219727 50.86106491088867 -v -49.69331359863281 -3.771508932113647 1.730138063430786 -v -92.41441345214844 -40.24274826049805 56.65629577636719 -v -53.23219299316406 5.028540134429932 19.54948425292969 -v -56.38141632080078 25.22571563720703 29.25366592407227 -v -58.52523040771484 24.42458915710449 31.08627510070801 -v -70.40996551513672 6.514069080352783 40.08333206176758 -v -86.75009155273438 -33.40998077392578 50.69198608398438 -v -47.45761871337891 -4.717469215393066 4.146055221557617 -v -92.05893707275391 -40.55963134765625 56.95841217041016 -v -52.29503631591797 5.039290904998779 21.6652717590332 -v -55.42203521728516 24.77352905273438 30.3587532043457 -v -56.34468841552734 24.06446647644043 31.77214431762695 -v -68.10823822021484 6.750600814819336 40.11775207519531 -v -85.75971984863281 -34.3969612121582 51.2510871887207 -v -44.01602935791016 -4.442947864532471 4.184988975524902 -v -91.85649871826172 -40.33267974853516 57.35205459594727 -v -50.4989013671875 6.274747848510742 22.44142532348633 -v -54.47554779052734 25.68461608886719 30.89064788818359 -v -54.99231719970703 25.43232727050781 33.05861282348633 -v -66.79914093017578 7.905498027801514 41.6367301940918 -v -85.4132080078125 -33.80271530151367 52.11734008789063 -v -32.53578186035156 -3.15467095375061 -19.16253662109375 -v -34.38373184204102 -1.822747945785522 -16.65216445922852 -v -36.48015213012695 -3.096683979034424 -19.71685028076172 -v -43.38578033447266 -41.58316040039063 -95.21874237060547 -v -43.91326141357422 -41.58873748779297 -95.02735137939453 -v -43.69423675537109 -41.06890106201172 -95.43450164794922 -v -35.0989875793457 7.804555892944336 -38.97930526733398 -v -36.35158920288086 8.476757049560547 -37.15337371826172 -v -37.55405807495117 27.27288055419922 -51.63281631469727 -v -38.67663192749023 28.34239959716797 -51.03059768676758 -v -36.8568000793457 27.49809265136719 -55.3040657043457 -v -38.63229751586914 28.70623016357422 -56.16587829589844 -v -39.32158660888672 4.109056949615479 -79.20964813232422 -v -40.77798843383789 4.454970836639404 -80.97431182861328 -v -40.8770866394043 -32.42660522460938 -89.88973236083984 -v -41.6864128112793 -30.95858383178711 -90.76108551025391 -v -37.81033325195313 -1.450130939483643 -16.44955062866211 -v -44.16765594482422 -40.94609069824219 -95.34366607666016 -v -38.46767044067383 7.785149097442627 -36.52191925048828 -v -40.04683303833008 28.08773803710938 -50.77265167236328 -v -40.87752914428711 28.14698791503906 -56.19830703735352 -v -42.94440460205078 3.682785987854004 -81.22965240478516 -v -42.73056793212891 -30.60493469238281 -90.66996002197266 -v -40.23527908325195 -2.317409992218018 -18.70730972290039 -v -44.44951629638672 -41.30718231201172 -95.01465606689453 -v -39.85378265380859 6.250553131103516 -37.56044387817383 -v -40.63287734985352 26.70069122314453 -51.05325317382813 -v -41.90177536010742 26.24149322509766 -55.37683486938477 -v -44.18946838378906 2.373975992202759 -79.78339385986328 -v -43.2232666015625 -31.63191223144531 -89.68506622314453 -v -39.8325309753418 -3.771508932113647 -21.72522735595703 -v -44.32761383056641 -41.88030242919922 -94.69525909423828 -v -39.4661750793457 5.028540134429932 -39.48690414428711 -v -39.99345779418945 25.22571563720703 -51.66109085083008 -v -40.93375778198242 24.42458915710449 -54.3200798034668 -v -43.57563781738281 1.514069080352783 -77.72464752197266 -v -42.79354858398438 -33.2662239074707 -88.54798126220703 -v -36.90536880493164 -4.717469215393066 -23.23079490661621 -v -43.89371490478516 -42.23382568359375 -94.62592315673828 -v -37.59667587280273 5.039290904998779 -40.85063934326172 -v -38.61006164550781 24.77352905273438 -52.13843154907227 -v -38.70241546630859 24.06446647644043 -53.82379531860352 -v -41.56508255004883 1.750601053237915 -76.60358428955078 -v -41.76493453979492 -34.27718353271484 -88.11498260498047 -v -33.65802383422852 -4.442947864532471 -22.09029006958008 -v -43.47456359863281 -42.10161590576172 -94.85892486572266 -v -35.65310668945313 6.274747848510742 -40.62473678588867 -v -37.52444076538086 25.68461608886719 -52.12581634521484 -v -36.88800048828125 25.43232727050781 -54.26172637939453 -v -39.6718864440918 2.905498027801514 -77.26450347900391 -v -40.91205215454102 -33.90352249145508 -88.71208953857422 -v -36.01900863647461 -3.216418027877808 -1.765162944793701 -v -34.50244522094727 -1.655421018600464 -5.032196044921875 -v -32.20283126831055 -2.602406978607178 -2.728740930557251 -v -28.69635772705078 -38.61240768432617 75.69805145263672 -v -28.86252021789551 -39.28370666503906 75.62229156494141 -v -28.3271656036377 -39.13187408447266 75.69469451904297 -v -36.10787582397461 8.519889831542969 15.56240081787109 -v -34.57637023925781 8.107364654541016 17.24739646911621 -v -39.05897903442383 27.08562469482422 30.08821868896484 -v -40.40615463256836 27.93409729003906 29.60663604736328 -v -39.89728164672852 28.39327239990234 34.70915603637695 -v -38.03726577758789 27.49446105957031 33.66647720336914 -v -34.5403938293457 17.31492233276367 46.75900650024414 -v -35.8452262878418 17.43609428405762 48.66624069213867 -v -28.96659469604492 -31.87043952941895 66.61157989501953 -v -28.00870513916016 -33.48403930664063 66.39229583740234 -v -37.94406127929688 -1.883904933929443 -4.875525951385498 -v -29.19070816040039 -38.59844589233398 75.64435577392578 -v -38.12530136108398 7.461886882781982 15.15559387207031 -v -41.7304801940918 27.44197845458984 29.49332809448242 -v -41.99584579467773 27.45536041259766 34.97609710693359 -v -37.80666732788086 16.30614280700684 49.14663314819336 -v -30.06003952026367 -31.71491622924805 66.54987335205078 -v -39.93606948852539 -3.115807056427002 -2.376658916473389 -v -29.43793296813965 -39.1004524230957 75.57405853271484 -v -39.1094856262207 5.730080127716064 16.33332061767578 -v -42.03471374511719 25.97990417480469 29.83365058898926 -v -42.752685546875 25.38702392578125 34.26618957519531 -v -38.94770431518555 14.77594661712646 47.83845138549805 -v -30.46564483642578 -33.13447570800781 66.25366973876953 -v -38.97844314575195 -4.423483848571777 0.5826259851455688 -v -29.25189590454102 -39.74045181274414 75.54013824462891 -v -38.3193473815918 4.6285400390625 18.20871162414551 -v -41.08975601196289 24.6487865447998 30.3713264465332 -v -41.59787368774414 23.74571800231934 33.11403656005859 -v -38.40911865234375 13.99774074554443 45.72681045532227 -v -29.87803268432617 -35.06025695800781 65.94594573974609 -v -35.79229736328125 -4.822233200073242 1.77397894859314 -v -28.77267646789551 -40.03646850585938 75.56807708740234 -v -36.34981918334961 4.986735820770264 19.36955642700195 -v -39.6071891784668 24.45104026794434 30.70144844055176 -v -39.40102005004883 23.76740074157715 32.38723373413086 -v -36.59642791748047 14.5575475692749 44.40173721313477 -v -28.7396183013916 -36.04206466674805 65.85849761962891 -v -32.77687454223633 -4.011776924133301 0.3002820014953613 -v -28.36112785339355 -39.7656364440918 75.63690948486328 -v -34.68405532836914 6.534968852996826 18.94173622131348 -v -38.70342254638672 25.53554534912109 30.5754222869873 -v -37.81640243530273 25.43576812744141 32.63310623168945 -v -34.87471389770508 16.03384399414063 44.86114120483398 -v -27.90771293640137 -35.34060668945313 66.05712127685547 -v -26.45577621459961 -3.443838119506836 -2.149142980575562 -v -26.46640014648438 -2.246160984039307 -5.887526988983154 -v -23.49448394775391 -3.47288703918457 -4.813465118408203 -v 5.039107799530029 -39.45514678955078 86.51023101806641 -v 4.668338775634766 -40.01747512817383 86.33621978759766 -v 5.211228847503662 -39.9835319519043 86.19824981689453 -v -16.25835037231445 8.704387664794922 11.1760082244873 -v -14.85560417175293 7.389261245727539 12.46347618103027 -v -12.42665863037109 28.01696014404297 26.41044998168945 -v -13.15249061584473 29.50034332275391 26.21185684204102 -v -11.26496505737305 29.20790100097656 30.99277114868164 -v -10.52369499206543 27.51875305175781 29.59563827514648 -v -0.9972569942474365 13.43557167053223 54.88214111328125 -v -1.514698028564453 14.10584259033203 57.03571319580078 -v 3.385565996170044 -29.84352111816406 80.76795196533203 -v 3.675970077514648 -31.37918090820313 79.70648956298828 -v -29.43033599853516 -1.921316027641296 -4.146553039550781 -v 4.587766170501709 -39.3502311706543 86.69120025634766 -v -18.55141067504883 8.964324951171875 11.34670639038086 -v -14.50934600830078 29.82746124267578 26.45841026306152 -v -13.3946418762207 29.56021118164063 31.82656478881836 -v -3.589093923568726 14.20652008056641 58.0562744140625 -v 2.445001125335693 -29.51860809326172 81.25101470947266 -v -30.15432739257813 -2.742969989776611 -0.9014430046081543 -v 4.197091102600098 -39.74774169921875 86.60486602783203 -v -20.00806045532227 7.973351955413818 12.8470344543457 -v -15.4754638671875 28.75201416015625 26.9644775390625 -v -15.30904579162598 28.31040191650391 31.46907806396484 -v -5.658416748046875 13.66179847717285 57.17532348632813 -v 1.562493085861206 -30.64902877807617 80.79186248779297 -v -28.0932731628418 -4.09240198135376 1.404078960418701 -v 4.161306858062744 -40.34838485717773 86.31630706787109 -v -19.53142166137695 6.477696895599365 14.54720878601074 -v -15.32335662841797 27.08382415771484 27.34894752502441 -v -15.56659698486328 26.39956665039063 30.18951416015625 -v -6.164387226104736 12.8818302154541 55.05625915527344 -v 1.402615070343018 -32.38360595703125 79.73628997802734 -v -24.79911041259766 -4.953472137451172 1.033954977989197 -v 4.507323265075684 -40.69983673095703 86.04276275634766 -v -17.48039627075195 5.603586196899414 15.16696166992188 -v -14.16756820678711 26.07907104492188 27.32230758666992 -v -13.97334671020508 25.26664733886719 28.95141792297363 -v -4.726027011871338 12.45395088195801 53.29472351074219 -v 2.08576488494873 -33.41617965698242 78.87914276123047 -v -22.75246810913086 -4.677759170532227 -1.733124017715454 -v 4.974565982818604 -40.53748321533203 85.99021148681641 -v -15.39944839477539 6.009276866912842 14.2396240234375 -v -12.87841987609863 26.49437713623047 26.90462684631348 -v -11.72904586791992 25.76473236083984 28.68713760375977 -v -2.426440954208374 12.70041084289551 53.21726226806641 -v 3.097472906112671 -32.96916198730469 78.86588287353516 -v -23.49448394775391 -3.47288703918457 -15.18653869628906 -v -26.46640014648438 -2.246160984039307 -14.11247634887695 -v -26.45577621459961 -3.443838119506836 -17.85086059570313 -v 5.211228847503662 -39.9835319519043 -106.1982498168945 -v 4.668338775634766 -40.01747512817383 -106.3362197875977 -v 5.039107799530029 -39.45514678955078 -106.5102310180664 -v -14.85560417175293 7.389261245727539 -32.46347808837891 -v -16.25835037231445 8.704387664794922 -31.17601013183594 -v -12.42665863037109 28.01696014404297 -46.41044616699219 -v -13.15249061584473 29.50034332275391 -46.21185302734375 -v -10.52369499206543 27.51875305175781 -49.59563446044922 -v -11.26496505737305 29.20790100097656 -50.99276733398438 -v -0.9972569942474365 13.43557167053223 -74.88213348388672 -v -1.514698028564453 14.10584259033203 -77.03571319580078 -v 3.675970077514648 -31.37918090820313 -99.70648956298828 -v 3.38556694984436 -29.84352111816406 -100.767951965332 -v -29.43033599853516 -1.921316027641296 -15.85345077514648 -v 4.587764739990234 -39.3502311706543 -106.6912002563477 -v -18.55141067504883 8.964324951171875 -31.34671020507813 -v -14.50934600830078 29.82746124267578 -46.45841217041016 -v -13.3946418762207 29.56021118164063 -51.82656097412109 -v -3.589093923568726 14.20652008056641 -78.05626678466797 -v 2.445001125335693 -29.51860809326172 -101.2510147094727 -v -30.15432739257813 -2.742969989776611 -19.09856033325195 -v 4.197090148925781 -39.74774169921875 -106.604866027832 -v -20.00806045532227 7.973351955413818 -32.8470344543457 -v -15.4754638671875 28.75201416015625 -46.9644775390625 -v -15.30904579162598 28.31040191650391 -51.46907806396484 -v -5.658416748046875 13.66179847717285 -77.17531585693359 -v 1.562493085861206 -30.64902877807617 -100.791862487793 -v -28.0932731628418 -4.09240198135376 -21.40408325195313 -v 4.161307811737061 -40.34838485717773 -106.3163070678711 -v -19.53142166137695 6.477696895599365 -34.54721069335938 -v -15.32335662841797 27.08382415771484 -47.34894561767578 -v -15.56659698486328 26.39956665039063 -50.18951416015625 -v -6.164387226104736 12.8818302154541 -75.05625152587891 -v 1.402615070343018 -32.38360595703125 -99.73628997802734 -v -24.79911041259766 -4.953472137451172 -21.03395843505859 -v 4.50732421875 -40.69983673095703 -106.0427627563477 -v -17.48039627075195 5.603586196899414 -35.16696166992188 -v -14.16756820678711 26.07907104492188 -47.32230377197266 -v -13.97334671020508 25.26664733886719 -48.951416015625 -v -4.726027011871338 12.45395088195801 -73.29471588134766 -v 2.08576488494873 -33.41617965698242 -98.87914276123047 -v -22.75246810913086 -4.677759170532227 -18.26688003540039 -v 4.974565982818604 -40.53748321533203 -105.9902114868164 -v -15.39944839477539 6.009276866912842 -34.2396240234375 -v -12.87841987609863 26.49437713623047 -46.90462493896484 -v -11.72904586791992 25.76473236083984 -48.6871337890625 -v -2.426440954208374 12.70041084289551 -73.21726226806641 -v 3.097472906112671 -32.96916198730469 -98.86588287353516 -v -14.25648880004883 -6.954940795898438 -3.301691055297852 -v -14.10265731811523 -6.075778961181641 -7.124460220336914 -v -11.2052116394043 -7.280231952667236 -5.841878890991211 -v 19.74986457824707 -37.60753631591797 68.32992553710938 -v 19.34836387634277 -38.14849472045898 68.15628051757813 -v 19.89711761474609 -38.15519714355469 68.03912353515625 -v -4.907510757446289 6.093640804290771 10.12681770324707 -v -2.877649068832397 5.517601013183594 11.07694053649902 -v 1.745674014091492 26.13694000244141 21.00781440734863 -v 0.4745520055294037 27.20939636230469 20.97971534729004 -v 3.233434915542603 28.02400207519531 25.24942970275879 -v 4.282450199127197 26.64773559570313 23.71314430236816 -v 14.8602180480957 5.642467975616455 47.61897277832031 -v 14.56025314331055 6.223588943481445 49.83868408203125 -v 18.9760627746582 -28.07810020446777 62.27335357666016 -v 19.20066070556641 -29.66015243530273 61.26537322998047 -v -17.11595153808594 -5.533359050750732 -5.528418064117432 -v 19.30024719238281 -37.46723175048828 68.48995971679688 -v -7.036674976348877 5.467060089111328 10.78174591064453 -v -0.8241369724273682 27.00916290283203 21.51090049743652 -v 1.346554040908813 27.59506225585938 26.51851081848145 -v 12.85833549499512 5.598269939422607 51.27650451660156 -v 18.04227828979492 -27.67663192749023 62.70982360839844 -v -17.97599411010742 -6.06142520904541 -2.255570888519287 -v 18.88686752319336 -37.83989715576172 68.39877319335938 -v -7.661820888519287 4.109711170196533 12.54856109619141 -v -1.172435998916626 25.68704986572266 22.20140266418457 -v 0.0426269993185997 25.68392181396484 26.56466102600098 -v 11.03606128692627 4.237391948699951 50.84969329833984 -v 17.10253143310547 -28.75799560546875 62.24617767333984 -v -16.03519439697266 -7.262344837188721 0.2294789999723434 -v 18.82099342346191 -38.44494247436523 68.12506103515625 -v -6.312249183654785 3.043694019317627 14.09679794311523 -v -0.3080709874629974 24.23861885070801 22.53124809265137 -v 0.3035619854927063 23.72967147827148 25.3531436920166 -v 10.46565055847168 3.165694952011108 48.87973022460938 -v 16.8643856048584 -30.50795555114746 61.23151397705078 -v -12.75498580932617 -8.23180103302002 0.05550599843263626 -v 19.15221405029297 -38.82671737670898 67.87483215332031 -v -4.004155158996582 3.07171893119812 14.26059532165527 -v 1.118067026138306 23.75459671020508 22.25203132629395 -v 1.932853937149048 23.20393180847168 23.79626274108887 -v 11.57662582397461 3.190187931060791 46.84990692138672 -v 17.50724792480469 -31.60873603820801 60.42989349365234 -v -10.6054573059082 -8.239757537841797 -2.646497964859009 -v 19.63114547729492 -38.69778442382813 67.83663940429688 -v -2.475620031356812 4.172726154327393 12.91663932800293 -v 2.032040119171143 24.59943771362305 21.57402229309082 -v 3.703634023666382 24.50261497497559 23.06640815734863 -v 13.53237915039063 4.292479038238525 46.28885650634766 -v 18.54694938659668 -31.23143768310547 60.44495391845703 -v -12.53854370117188 -7.280231952667236 -13.491455078125 -v -15.43598937988281 -6.075778961181641 -12.2088737487793 -v -15.58982086181641 -6.954940795898438 -16.03164291381836 -v 18.56378555297852 -38.15519714355469 -87.37246704101563 -v 18.0150318145752 -38.14849472045898 -87.4896240234375 -v 18.41653251647949 -37.60753631591797 -87.66326904296875 -v -4.210980892181396 5.517601013183594 -30.41027450561523 -v -6.240842819213867 6.093640804290771 -29.46015167236328 -v 0.4123420119285583 26.13694000244141 -40.34114837646484 -v -0.8587800264358521 27.20939636230469 -40.31304931640625 -v 2.949118137359619 26.64773559570313 -43.04647827148438 -v 1.900102972984314 28.02400207519531 -44.582763671875 -v 13.52688598632813 5.642467975616455 -66.95231628417969 -v 13.22692108154297 6.223588943481445 -69.17202758789063 -v 17.86732864379883 -29.66015243530273 -80.59872436523438 -v 17.64273071289063 -28.07810020446777 -81.60670471191406 -v -18.44928359985352 -5.533359050750732 -13.80491638183594 -v 17.96691513061523 -37.46723175048828 -87.82330322265625 -v -8.370006561279297 5.467060089111328 -30.11508178710938 -v -2.157469034194946 27.00916290283203 -40.84423828125 -v 0.01322199963033199 27.59506225585938 -45.85184478759766 -v 11.52500343322754 5.598269939422607 -70.60984802246094 -v 16.70894622802734 -27.67663192749023 -82.04316711425781 -v -19.309326171875 -6.06142520904541 -17.07776260375977 -v 17.55353546142578 -37.83989715576172 -87.73211669921875 -v -8.995153427124023 4.109711170196533 -31.88189697265625 -v -2.505768060684204 25.68704986572266 -41.53473663330078 -v -1.290704965591431 25.68392181396484 -45.89799499511719 -v 9.702729225158691 4.237391948699951 -70.18302917480469 -v 15.76919937133789 -28.75799560546875 -81.57952880859375 -v -17.36852645874023 -7.262344837188721 -19.56281280517578 -v 17.48766136169434 -38.44494247436523 -87.45840454101563 -v -7.645581245422363 3.043694019317627 -33.43013000488281 -v -1.641402959823608 24.23861885070801 -41.86458587646484 -v -1.029770016670227 23.72967147827148 -44.68647766113281 -v 9.132317543029785 3.165694952011108 -68.21307373046875 -v 15.53105354309082 -30.50795555114746 -80.56486511230469 -v -14.08831787109375 -8.23180103302002 -19.38883972167969 -v 17.81888198852539 -38.82671737670898 -87.20817565917969 -v -5.33748722076416 3.07171893119812 -33.59392929077148 -v -0.2152650058269501 23.75459671020508 -41.58536529541016 -v 0.5995219945907593 23.20393180847168 -43.12960052490234 -v 10.24329376220703 3.190187931060791 -66.18324279785156 -v 16.17391586303711 -31.60873603820801 -79.76324462890625 -v -11.93878936767578 -8.239757537841797 -16.68683624267578 -v 18.29781341552734 -38.69778442382813 -87.16998291015625 -v -3.808951854705811 4.172726154327393 -32.24997329711914 -v 0.6987079977989197 24.59943771362305 -40.90735626220703 -v 2.370301961898804 24.50261497497559 -42.39974212646484 -v 12.19904708862305 4.292479038238525 -65.6221923828125 -v 17.2136173248291 -31.23143768310547 -79.77830505371094 -v -66.77298736572266 -11.88561820983887 -0.2029989957809448 -v -61.49651336669922 6.340155124664307 -5.812275886535645 -v -62.98685073852539 9.870844841003418 -6.308485984802246 -v -61.44757843017578 8.190096855163574 -3.647036075592041 -v -63.97118377685547 3.661695003509521 -3.830467939376831 -v -64.84598541259766 4.368710994720459 -2.075659990310669 -v -62.55780410766602 11.30561256408691 -3.485913991928101 -v -67.13710784912109 4.622090816497803 -1.531195998191833 -v -63.99109649658203 13.34076976776123 -5.450253009796143 -v -69.11919403076172 4.231084823608398 -2.607095956802368 -v -64.66820526123047 12.76302528381348 -8.06086254119873 -v -69.29987335205078 3.490133047103882 -4.493171215057373 -v -64.07926177978516 10.00739574432373 -9.351896286010742 -v -67.54299163818359 2.957120895385742 -5.769162178039551 -v -62.66775894165039 7.148978233337402 -8.351184844970703 -v -65.17147064208984 3.033509969711304 -5.474239826202393 -v -66.72484588623047 1.179926037788391 10.02946090698242 -v -58.21265029907227 12.08680152893066 -3.032124042510986 -v -55.28428649902344 12.61780071258545 -0.7646610140800476 -v -55.50985717773438 10.27971935272217 -2.97612190246582 -v -59.68946075439453 8.144949913024902 1.861809968948364 -v -57.9158821105957 6.628377914428711 1.958868980407715 -v -52.63722610473633 10.23327159881592 -1.25485098361969 -v -56.29685974121094 6.188433170318604 3.356508016586304 -v -51.75783920288086 11.98240089416504 0.8355600237846375 -v -56.05172729492188 7.156466007232666 5.002277851104736 -v -53.53396987915039 14.21004676818848 1.72101902961731 -v -57.36484146118164 8.803488731384277 5.656900882720947 -v -56.62808227539063 15.23869514465332 0.7346760034561157 -v -59.24757766723633 9.889246940612793 4.827473163604736 -v -58.71025466918945 14.29374885559082 -1.380638957023621 -v -60.28214263916016 9.596194267272949 3.138458967208862 -v -53.9999885559082 26.33333778381348 -9.944446563720703 -v -44.00383377075195 24.25179481506348 -7.336516857147217 -v -43.19998550415039 24.25179481506348 -9.944446563720703 -v -46.64442825317383 24.25179481506348 -0.7607110142707825 -v -53.9999885559082 2.333333969116211 -9.944446563720703 -v -50.9999885559082 3.941030979156494 -4.748294830322266 -v -53.9999885559082 3.941030979156494 -3.944447040557861 -v -53.9999885559082 24.72564125061035 -3.944446086883545 -v -55.80000305175781 6.941027164459229 -4.748294830322266 -v -56.99998474121094 24.72564125061035 -4.748292922973633 -v -57.99615859985352 5.774363040924072 -6.944447040557861 -v -59.19614028930664 24.72564125061035 -6.944447040557861 -v -58.80000686645508 5.774363040924072 -9.944446563720703 -v -59.99999237060547 24.72564125061035 -9.944446563720703 -v -45.44443130493164 8.333334922790527 -0.08162699639797211 -v -48.80383682250977 8.333334922790527 -0.9444469809532166 -v -53.9999885559082 10.66667366027832 1.822437047958374 -v -59.19614028930664 8.333334922790527 -0.9444469809532166 -v -62.9999885559082 8.333334922790527 -4.748293876647949 -v -64.19229888916016 7.533350944519043 -9.944446563720703 -v -43.60768508911133 8.333334922790527 -9.944446563720703 -v -37.19998550415039 18.65442848205566 -9.944446563720703 -v -39.25212478637695 18.65442848205566 -0.06191999837756157 -v -43.64442825317383 18.65442848205566 3.756353855133057 -v -53.9999885559082 14.33333778381348 2.055552959442139 -v -61.41007232666016 13.47619915008545 -1.042665958404541 -v -64.60929870605469 13.47619915008545 -6.367094039916992 -v -66.39998626708984 12.33334636688232 -9.944446563720703 -v -38.80768203735352 21.88604164123535 -9.944446563720703 -v -40.64442825317383 21.88604164123535 -0.7607129812240601 -v -44.44827651977539 21.88604164123535 2.546009063720703 -v -53.9999885559082 20.33333778381348 0.4478580057621002 -v -60.29326629638672 19.47619819641113 -2.199142932891846 -v -63.06387329101563 19.47619819641113 -6.810235023498535 -v -64.39229583740234 20.33333778381348 -9.944446563720703 -v -63.32090759277344 15.14286994934082 -6.139256000518799 -v -62.36603164672852 15.39914894104004 -5.604844093322754 -v -62.33220672607422 15.06181526184082 -5.486823081970215 -v -62.95563125610352 14.64286994934082 -5.390261173248291 -v -62.37112808227539 14.47619819641113 -4.191868782043457 -v -62.07738494873047 15.07085609436035 -4.598177909851074 -v -61.73810577392578 15.73718452453613 -3.414914131164551 -v -61.64052581787109 15.30952644348145 -2.693876981735229 -v -61.55341339111328 16.74508094787598 -2.770823001861572 -v -61.42134857177734 16.64286994934082 -2.244477033615112 -v -61.58245086669922 17.63445472717285 -2.87214994430542 -v -61.56745147705078 17.80952644348145 -2.544080018997192 -v -61.72498321533203 18.15569496154785 -3.369262933731079 -v -61.85970306396484 18.47619819641113 -3.143272876739502 -v -62.29808807373047 18.64286994934082 -4.042075157165527 -v -61.89406585693359 18.04158973693848 -3.958856105804443 -v -62.73646926879883 18.14286994934082 -4.940859794616699 -v -62.07035064697266 17.69966316223145 -4.573657035827637 -v -62.11862945556641 16.98106575012207 -4.741918087005615 -v -62.95563125610352 16.97619819641113 -5.390261173248291 -v -62.20188140869141 16.16166877746582 -5.032281875610352 -v -63.24786376953125 16.30952644348145 -5.989458084106445 -v -15.18229866027832 -14.32931900024414 -14.04238128662109 -v -32.1219482421875 -11.5362491607666 -10 -v -15.18229866027832 -14.32931900024414 -5.95761775970459 -v -44.94972991943359 -12.26852130889893 -17.05864334106445 -v -44.94972991943359 -12.26852130889893 -2.941359043121338 -v -43.19998550415039 24.25179481506348 -9.988886833190918 -v -44.00383377075195 24.25179481506348 -12.59681606292725 -v -53.9999885559082 26.33333778381348 -9.988886833190918 -v -46.64442825317383 24.25179481506348 -19.17262077331543 -v -53.9999885559082 3.941030979156494 -15.9888858795166 -v -50.9999885559082 3.941030979156494 -15.18503856658936 -v -53.9999885559082 2.333333969116211 -9.988886833190918 -v -53.9999885559082 24.72564125061035 -15.9888858795166 -v -55.80000305175781 6.941027164459229 -15.18503856658936 -v -56.99998474121094 24.72564125061035 -15.18503952026367 -v -57.99615859985352 5.774363040924072 -12.98888683319092 -v -59.19614028930664 24.72564125061035 -12.98888683319092 -v -58.80000686645508 5.774363040924072 -9.988886833190918 -v -59.99999237060547 24.72564125061035 -9.988886833190918 -v -48.80383682250977 8.333334922790527 -18.9888858795166 -v -45.44443130493164 8.333334922790527 -19.85170555114746 -v -53.9999885559082 10.66667366027832 -21.75576972961426 -v -59.19614028930664 8.333334922790527 -18.9888858795166 -v -62.9999885559082 8.333334922790527 -15.18503856658936 -v -64.19229888916016 7.533350944519043 -9.988886833190918 -v -37.19998550415039 18.65442848205566 -9.988886833190918 -v -43.60768508911133 8.333334922790527 -9.988886833190918 -v -39.25212478637695 18.65442848205566 -19.87141227722168 -v -43.64442825317383 18.65442848205566 -23.68968772888184 -v -53.9999885559082 14.33333778381348 -21.9888858795166 -v -61.41007232666016 13.47619915008545 -18.89066886901855 -v -64.60929870605469 13.47619915008545 -13.56623935699463 -v -66.39998626708984 12.33334636688232 -9.988886833190918 -v -40.64442825317383 21.88604164123535 -19.17262077331543 -v -38.80768203735352 21.88604164123535 -9.988886833190918 -v -44.44827651977539 21.88604164123535 -22.47934150695801 -v -53.9999885559082 20.33333778381348 -20.38118934631348 -v -60.29326629638672 19.47619819641113 -17.73418998718262 -v -63.06387329101563 19.47619819641113 -13.12309837341309 -v -64.39229583740234 20.33333778381348 -9.988886833190918 -v -62.33220672607422 15.06181526184082 -14.44650936126709 -v -62.36603164672852 15.39914894104004 -14.32849025726318 -v -63.32090759277344 15.14286994934082 -13.79407787322998 -v -62.95563125610352 14.64286994934082 -14.54307270050049 -v -62.37112808227539 14.47619819641113 -15.74146461486816 -v -62.07738494873047 15.07085609436035 -15.33515357971191 -v -61.73810577392578 15.73718452453613 -16.51841926574707 -v -61.64052581787109 15.30952644348145 -17.23945426940918 -v -61.42134857177734 16.64286994934082 -17.68885612487793 -v -61.55341339111328 16.74508094787598 -17.16251182556152 -v -61.56745147705078 17.80952644348145 -17.38925361633301 -v -61.58245086669922 17.63445472717285 -17.06118202209473 -v -61.72498321533203 18.15569496154785 -16.5640697479248 -v -61.85970306396484 18.47619819641113 -16.79006004333496 -v -62.29808807373047 18.64286994934082 -15.89125633239746 -v -61.89406585693359 18.04158973693848 -15.97447776794434 -v -62.73646926879883 18.14286994934082 -14.99247264862061 -v -62.07035064697266 17.69966316223145 -15.35967445373535 -v -62.11862945556641 16.98106575012207 -15.19141483306885 -v -62.95563125610352 16.97619819641113 -14.54307270050049 -v -62.20188140869141 16.16166877746582 -14.90105247497559 -v -63.24786376953125 16.30952644348145 -13.94387531280518 -v -66.59115600585938 -11.97652816772461 -20.11215209960938 -v -61.26576614379883 8.099187850952148 -16.66811561584473 -v -62.80503845214844 9.779933929443359 -14.00666618347168 -v -61.31470108032227 6.249245166778564 -14.50287628173828 -v -64.66415405273438 4.277801990509033 -18.2394905090332 -v -63.78934860229492 3.570785999298096 -16.48468399047852 -v -62.37599182128906 11.21470260620117 -16.82923698425293 -v -66.95527648925781 4.531181812286377 -18.78395462036133 -v -63.80926132202148 13.24985885620117 -14.86489868164063 -v -68.93736267089844 4.140174865722656 -17.70805549621582 -v -64.48637390136719 12.67211532592773 -12.25428771972656 -v -69.1180419921875 3.399224042892456 -15.82198143005371 -v -63.89742660522461 9.916484832763672 -10.96325492858887 -v -67.36116027832031 2.8662109375 -14.54598999023438 -v -62.48594665527344 7.058069229125977 -11.96396636962891 -v -64.98963928222656 2.942600965499878 -14.84091186523438 -v -66.72484588623047 1.234470963478088 -28.69612312316895 -v -55.50985717773438 10.33426475524902 -15.69054412841797 -v -55.28428649902344 12.6723461151123 -17.90200424194336 -v -58.21265029907227 12.14134788513184 -15.63454246520996 -v -57.9158821105957 6.682922840118408 -20.62553215026855 -v -59.68946075439453 8.199495315551758 -20.52847480773926 -v -52.63722610473633 10.28781700134277 -17.41181564331055 -v -56.29685974121094 6.242978096008301 -22.02317237854004 -v -51.75783920288086 12.03694534301758 -19.50222587585449 -v -56.05172729492188 7.211010932922363 -23.66894340515137 -v -53.53396987915039 14.26459121704102 -20.38768196105957 -v -57.36484146118164 8.858034133911133 -24.32356452941895 -v -56.62808227539063 15.29323959350586 -19.40134239196777 -v -59.24757766723633 9.943792343139648 -23.49413871765137 -v -58.71025466918945 14.34829330444336 -17.28602600097656 -v -60.28214263916016 9.650739669799805 -21.80512428283691 -v -59.67054748535156 17.67085647583008 -1.853034973144531 -v -58.74361419677734 17.51846694946289 -2.271703958511353 -v -59.46704864501953 18.40674209594727 -2.53897500038147 -v -60.63759613037109 18.10347366333008 -2.337920904159546 -v -61.55588531494141 18.15423965454102 -3.37207293510437 -v -60.57522583007813 18.69086074829102 -3.431842088699341 -v -61.64485168457031 18.26233291625977 -4.609260082244873 -v -61.38417816162109 17.94110488891602 -5.717274188995361 -v -61.48154449462891 16.98392105102539 -6.448155879974365 -v -62.26735687255859 17.28479385375977 -5.621510982513428 -v -62.61495971679688 16.49116897583008 -5.094202995300293 -v -62.20498657226563 16.13167190551758 -6.081917762756348 -v -61.27806091308594 15.97928333282471 -6.500585079193115 -v -62.26735687255859 15.54427146911621 -4.988009929656982 -v -61.38417816162109 14.97993564605713 -4.639497756958008 -v -61.48154449462891 15.24338626861572 -5.814656257629395 -v -60.47430419921875 15.08453464508057 -3.54331111907959 -v -61.64485168457031 15.44609451293945 -3.584233999252319 -v -61.55588531494141 16.32414627075195 -2.705970048904419 -v -60.57522583007813 15.87463855743408 -2.406815052032471 -v -59.56442260742188 15.70901966094971 -2.636348009109497 -v -60.63759613037109 17.02777481079102 -1.946398019790649 -v -59.46704864501953 16.66621780395508 -1.905473947525024 -v -61.74577331542969 17.31189346313477 -2.839264869689941 -v -62.3682861328125 17.41006851196289 -4.243031024932861 -v -62.3682861328125 16.33436965942383 -3.851508140563965 -v -59.46704864501953 18.14007568359375 -17.19435882568359 -v -58.74361419677734 17.25180053710938 -17.46162986755371 -v -59.67054748535156 17.40419006347656 -17.88029861450195 -v -60.63759613037109 17.83680725097656 -17.39541244506836 -v -60.57522583007813 18.4241943359375 -16.30149078369141 -v -61.55588531494141 17.8875732421875 -16.36125946044922 -v -61.64485168457031 17.99566650390625 -15.12407302856445 -v -62.26735687255859 17.01812744140625 -14.1118221282959 -v -61.48154449462891 16.71725463867188 -13.28517723083496 -v -61.38417816162109 17.6744384765625 -14.01605987548828 -v -62.20498657226563 15.86500549316406 -13.65141487121582 -v -62.61495971679688 16.22450256347656 -14.63912963867188 -v -61.27806091308594 15.71261596679688 -13.23274803161621 -v -62.26735687255859 15.27760314941406 -14.74532318115234 -v -61.48154449462891 14.97671890258789 -13.91867828369141 -v -61.38417816162109 14.7132682800293 -15.09383583068848 -v -61.64485168457031 15.17942810058594 -16.14909934997559 -v -60.47430419921875 14.81786727905273 -16.19002342224121 -v -60.57522583007813 15.60797119140625 -17.32651901245117 -v -61.55588531494141 16.05747985839844 -17.02736282348633 -v -59.56442260742188 15.44235229492188 -17.09698486328125 -v -60.63759613037109 16.7611083984375 -17.78693389892578 -v -59.46704864501953 16.39955139160156 -17.82785987854004 -v -61.74577331542969 17.04522705078125 -16.89406776428223 -v -62.3682861328125 17.14340209960938 -15.49030303955078 -v -62.3682861328125 16.06770324707031 -15.8818244934082 - -# 302 UV coordinates -vt 0.1861920058727264 0.2227180004119873 0 -vt 0.5031800270080566 0.03906299918889999 0 -vt 0.2364480048418045 0.2373390048742294 0 -vt 0.3814640045166016 0.2761969864368439 0 -vt 0.5749170184135437 0.134553998708725 0 -vt 0.7469409704208374 0.1137370020151138 0 -vt 0.07407300174236298 0.3458549976348877 0 -vt 0.04933400079607964 0.5214380025863647 0 -vt 0.1560039967298508 0.4129219949245453 0 -vt 0.1560039967298508 0.6299539804458618 0 -vt 0.3814640045166016 0.8019279837608337 0 -vt 0.3600949943065643 0.5390629768371582 0 -vt 0.6192520260810852 0.384553998708725 0 -vt 0.6192520260810852 0.6935709714889526 0 -vt 0.8223689794540405 0.5390629768371582 0 -vt 0.8340740203857422 0.2890630066394806 0 -vt 1.023437976837158 0.5390629768371582 0 -vt 0.9728180170059204 0.5390629768371582 0 -vt 0.9225059747695923 0.2890630066394806 0 -vt 0.8340740203857422 0.7890629768371582 0 -vt 0.7469409704208374 0.9643880128860474 0 -vt 0.9225059747695923 0.7890629768371582 0 -vt 0.5749170184135437 0.9435709714889526 0 -vt 0.2364480048418045 0.8055369853973389 0 -vt 0.1861920058727264 0.8201580047607422 0 -vt 0.5031800270080566 1.039062976837158 0 -vt 0.2846769988536835 0.8055369853973389 0 -vt 0.6248959898948669 0.8019279837608337 0 -vt 0.7180020213127136 0.9435709714889526 0 -vt 0.8507689833641052 0.6935709714889526 0 -vt 0.646265983581543 0.5390629768371582 0 -vt 0.6248959898948669 0.2761969864368439 0 -vt 0.8507689833641052 0.384553998708725 0 -vt 0.2340410053730011 0.6299539804458618 0 -vt 0.1000450029969215 0.5214380025863647 0 -vt 0.2340410053730011 0.4129219949245453 0 -vt 0.1038810014724731 0.3458549976348877 0 -vt 0.2846769988536835 0.2373390048742294 0 -vt 0.7180020213127136 0.134553998708725 0 -vt 0.02343799918889999 0.5214380025863647 0 -vt 0.07407300174236298 0.6970210075378418 0 -vt 0.1038810014724731 0.6970210075378418 0 -vt -0.06587100028991699 -0.4100160002708435 0 -vt 0.4030880033969879 -0.109436996281147 0 -vt 0.1274410039186478 -0.364995002746582 0 -vt 0.4030880033969879 0.1842669993638992 0 -vt 0.6787350177764893 0.008834999985992908 0 -vt 1.058290958404541 -0.01694799959659576 0 -vt -0.3185659945011139 -0.03083699941635132 0 -vt -0.3557040095329285 0.5098400115966797 0 -vt -0.04291899874806404 0.175683006644249 0 -vt -0.04291899874806404 0.8439980149269104 0 -vt 0.4030880033969879 0.8354139924049377 0 -vt 0.4030880033969879 0.5098400115966797 0 -vt 1.035338997840881 0.3184730112552643 0 -vt 1.035338997840881 0.7012069821357727 0 -vt 1.348124027252197 0.5098400115966797 0 -vt 1.310984969139099 0.06459199637174606 0 -vt 1.481344938278198 0.5098400115966797 0 -vt 1.310984969139099 0.9550889730453491 0 -vt 1.058290958404541 1.03662896156311 0 -vt 0.6787350177764893 1.010846018791199 0 -vt 0.1274410039186478 1.384675025939941 0 -vt -0.06587100028991699 1.429695963859558 0 -vt 0.4030880033969879 1.129117012023926 0 -vt -0.4889250099658966 0.5098400115966797 0 -vt -0.3185659945011139 1.050518035888672 0 -vt 0 1 0 -vt 0 0 0 -vt 0 0.1666669994592667 0 -vt 0.1428570002317429 0.1666669994592667 0 -vt 0.1428570002317429 0 0 -vt 0 0.3333329856395721 0 -vt 0.1428570002317429 0.3333329856395721 0 -vt 0 0.5 0 -vt 0.1428570002317429 0.5 0 -vt 0 0.6666669845581055 0 -vt 0.1428570002317429 0.6666669845581055 0 -vt 0 0.8333330154418945 0 -vt 0.1428570002317429 0.8333330154418945 0 -vt 0.1428570002317429 1 0 -vt 0.2857140004634857 0 0 -vt 0.2857140004634857 0.1666669994592667 0 -vt 0.2857140004634857 0.3333329856395721 0 -vt 0.2857140004634857 0.5 0 -vt 0.2857140004634857 0.6666669845581055 0 -vt 0.2857140004634857 0.8333330154418945 0 -vt 0.2857140004634857 1 0 -vt 0.4285709857940674 0.1666669994592667 0 -vt 0.4285709857940674 0 0 -vt 0.4285709857940674 0.3333329856395721 0 -vt 0.4285709857940674 0.5 0 -vt 0.4285709857940674 0.6666669845581055 0 -vt 0.4285709857940674 0.8333330154418945 0 -vt 0.4285709857940674 1 0 -vt 0.5714290142059326 0 0 -vt 0.5714290142059326 0.1666669994592667 0 -vt 0.5714290142059326 0.3333329856395721 0 -vt 0.5714290142059326 0.5 0 -vt 0.5714290142059326 0.6666669845581055 0 -vt 0.5714290142059326 0.8333330154418945 0 -vt 0.5714290142059326 1 0 -vt 0.7142860293388367 0.1666669994592667 0 -vt 0.7142860293388367 0 0 -vt 0.7142860293388367 0.3333329856395721 0 -vt 0.7142860293388367 0.5 0 -vt 0.7142860293388367 0.6666669845581055 0 -vt 0.7142860293388367 0.8333330154418945 0 -vt 0.7142860293388367 1 0 -vt 0.8571429848670959 0 0 -vt 0.8571429848670959 0.1666669994592667 0 -vt 0.8571429848670959 0.3333329856395721 0 -vt 0.8571429848670959 0.5 0 -vt 0.8571429848670959 0.6666669845581055 0 -vt 0.8571429848670959 0.8333330154418945 0 -vt 0.8571429848670959 1 0 -vt 1 0.1666669994592667 0 -vt 1 0 0 -vt 1 0.3333329856395721 0 -vt 1 0.5 0 -vt 1 0.6666669845581055 0 -vt 1 0.8333330154418945 0 -vt 1 1 0 -vt 0.3329190015792847 0.2726939916610718 0 -vt 0.4468950033187866 0.3977729976177216 0 -vt 0.4569770097732544 0.4220040142536163 0 -vt 0.4028989970684052 0.4104689955711365 0 -vt 0.4066259860992432 0.379391998052597 0 -vt 0.3709700107574463 0.3842439949512482 0 -vt 0.3996250033378601 0.4318499863147736 0 -vt 0.3599070012569427 0.3859829902648926 0 -vt 0.439538985490799 0.4458169937133789 0 -vt 0.3817679882049561 0.3832989931106567 0 -vt 0.4925839900970459 0.4418520033359528 0 -vt 0.420091986656189 0.3782140016555786 0 -vt 0.5188159942626953 0.4229409992694855 0 -vt 0.4460189938545227 0.3745560050010681 0 -vt 0.4984830021858215 0.4033240079879761 0 -vt 0.4400259852409363 0.3750799894332886 0 -vt 0.3448100090026855 0.3380840122699738 0 -vt 0.4880180060863495 0.4240910112857819 0 -vt 0.4631580114364624 0.428277999162674 0 -vt 0.487405002117157 0.409841001033783 0 -vt 0.4343610107898712 0.3930070102214813 0 -vt 0.4332970082759857 0.3810479938983917 0 -vt 0.468531996011734 0.4094749987125397 0 -vt 0.4179730117321014 0.377579003572464 0 -vt 0.4456129968166351 0.4232679903507233 0 -vt 0.3999280035495758 0.3852129876613617 0 -vt 0.4359039962291718 0.4408339858055115 0 -vt 0.392751008272171 0.3982000052928925 0 -vt 0.4467189908027649 0.4489449858665466 0 -vt 0.4018450081348419 0.4067620038986206 0 -vt 0.4699110090732574 0.4414939880371094 0 -vt 0.4203630089759827 0.4044510126113892 0 -vt 0.1903489977121353 0.9132689833641052 0 -vt 0 0.9132689833641052 0 -vt 0.6703060269355774 0.9132689833641052 0 -vt 0.3792589902877808 0.06698700040578842 0 -vt 0.4379310011863708 0.06698700040578842 0 -vt 0.4379310011863708 0.9330130219459534 0 -vt 0.3792589902877808 0.1919869929552078 0 -vt 0.3792589902877808 0.9330130219459534 0 -vt 0.2189649939537048 0.1433759927749634 0 -vt 0.2189649939537048 0.9330130219459534 0 -vt 0 0.1433759927749634 0 -vt 0 0.9330130219459534 0 -vt 0.719871997833252 0.25 0 -vt 0.6568959951400757 0.25 0 -vt 0.8588460087776184 0.3472220003604889 0 -vt 0.3792589902877808 0.25 0 -vt 0 0.2166669964790344 0 -vt 0 0.25 0 -vt 0 0.6800450086593628 0 -vt 0.721310019493103 0.6800450086593628 0 -vt 1 0.6800450086593628 0 -vt 0.8758609890937805 0.5 0 -vt 0.6497269868850708 0.4642859995365143 0 -vt 0.2611050009727478 0.4642859995365143 0 -vt 0 0.4166670143604279 0 -vt 0 0.8146960139274597 0 -vt 0.6703060269355774 0.8146960139274597 0 -vt 0.9116590023040771 0.8146960139274597 0 -vt 0.7585179805755615 0.75 0 -vt 0.5653179883956909 0.7142860293388367 0 -vt 0.2287610024213791 0.7142860293388367 0 -vt 0 0.75 0 -vt 0.2777349948883057 0.5337309837341309 0 -vt 0.3167409896850586 0.5444089770317078 0 -vt 0.3253549933433533 0.5303530097007751 0 -vt 0.3324030041694641 0.5128970146179199 0 -vt 0.419871985912323 0.5059530138969421 0 -vt 0.3902159929275513 0.5307300090789795 0 -vt 0.4765799939632416 0.558493971824646 0 -vt 0.5292080044746399 0.5406749844551086 0 -vt 0.5235919952392578 0.6004890203475952 0 -vt 0.5620089769363403 0.5962309837341309 0 -vt 0.5161960124969482 0.6375470161437988 0 -vt 0.5401409864425659 0.6448410153388977 0 -vt 0.4799120128154755 0.6592649817466736 0 -vt 0.4964070022106171 0.6726189851760864 0 -vt 0.4308049976825714 0.6795639991760254 0 -vt 0.4368790090084076 0.6545109748840332 0 -vt 0.3652040064334869 0.6587309837341309 0 -vt 0.3920060098171234 0.6402639746665955 0 -vt 0.379723995923996 0.6103219985961914 0 -vt 0.3324030041694641 0.6101189851760864 0 -vt 0.3585309982299805 0.5761809945106506 0 -vt 0.2886680066585541 0.5823410153388977 0 -vt 0.445345014333725 0.6860769987106323 0 -vt 0.607125997543335 0.786342978477478 0 -vt 0.8164219856262207 0.6093729734420776 0 -vt 0.9782029986381531 0.754476010799408 0 -vt 0.445345014333725 0.5 0 -vt 0.445345014333725 0.3139230012893677 0 -vt 0.8164219856262207 0.3906269967556 0 -vt 0.1835779994726181 0.69098299741745 0 -vt 0.1835779994726181 0.30901700258255 0 -vt 0.02179699949920177 0.19098299741745 0 -vt 0.2835640013217926 0 0 -vt 0.607125997543335 0.2136570066213608 0 -vt 0.9782029986381531 0.2455240041017532 0 -vt 0.2835640013217926 1 0 -vt 0.02179699949920177 0.80901700258255 0 -vt 1 0.9132689833641052 0 -vt 0.8096510171890259 0.9132689833641052 0 -vt 0.329694002866745 0.9132689833641052 0 -vt 0.5620689988136292 0.06698700040578842 0 -vt 0.6207410097122192 0.06698700040578842 0 -vt 0.5620689988136292 0.9330130219459534 0 -vt 0.6207410097122192 0.1919869929552078 0 -vt 0.6207410097122192 0.9330130219459534 0 -vt 0.7810350060462952 0.1433759927749634 0 -vt 0.7810350060462952 0.9330130219459534 0 -vt 1 0.1433759927749634 0 -vt 1 0.9330130219459534 0 -vt 0.3431040048599243 0.25 0 -vt 0.280128002166748 0.25 0 -vt 0.1411540061235428 0.3472220003604889 0 -vt 0.6207410097122192 0.25 0 -vt 1 0.2166669964790344 0 -vt 1 0.25 0 -vt 0.2786900103092194 0.6800450086593628 0 -vt 0.1241390034556389 0.5 0 -vt 0.3502730131149292 0.4642859995365143 0 -vt 0.7388949990272522 0.4642859995365143 0 -vt 1 0.4166670143604279 0 -vt 0.329694002866745 0.8146960139274597 0 -vt 1 0.8146960139274597 0 -vt 0.08834099769592285 0.8146960139274597 0 -vt 0.2414820045232773 0.75 0 -vt 0.4346820116043091 0.7142860293388367 0 -vt 0.7712389826774597 0.7142860293388367 0 -vt 1 0.75 0 -vt 0.6746450066566467 0.5303530097007751 0 -vt 0.6832590103149414 0.5444089770317078 0 -vt 0.7222650051116943 0.5337309837341309 0 -vt 0.6675969958305359 0.5128970146179199 0 -vt 0.580128014087677 0.5059530138969421 0 -vt 0.6097840070724487 0.5307300090789795 0 -vt 0.523419976234436 0.558493971824646 0 -vt 0.4707919955253601 0.5406749844551086 0 -vt 0.4379909932613373 0.5962309837341309 0 -vt 0.4764080047607422 0.6004890203475952 0 -vt 0.4598590135574341 0.6448410153388977 0 -vt 0.4838039875030518 0.6375470161437988 0 -vt 0.5200880169868469 0.6592649817466736 0 -vt 0.5035930275917053 0.6726189851760864 0 -vt 0.5691949725151062 0.6795639991760254 0 -vt 0.5631210207939148 0.6545109748840332 0 -vt 0.6347960233688354 0.6587309837341309 0 -vt 0.6079949736595154 0.6402639746665955 0 -vt 0.6202759742736816 0.6103219985961914 0 -vt 0.6675969958305359 0.6101189851760864 0 -vt 0.6414690017700195 0.5761809945106506 0 -vt 0.7113320231437683 0.5823410153388977 0 -vt 1.046875 0.7720100283622742 0 -vt 0.9567909836769104 0.7309449911117554 0 -vt 0.8992829918861389 0.9703119993209839 0 -vt 0.9425439834594727 0.8885890245437622 0 -vt 0.7200279831886292 0.9022690057754517 0 -vt 0.7071679830551147 1.046875 0 -vt 0.4538260102272034 0.9313979744911194 0 -vt 0.2154179960489273 0.8448349833488464 0 -vt 0.05815599858760834 0.5868980288505554 0 -vt 0.2360229939222336 0.6679760217666626 0 -vt 0.349481999874115 0.4541139900684357 0 -vt 0.1369580030441284 0.3572390079498291 0 -vt 0.046875 0.3161740005016327 0 -vt 0.3723309934139252 0.1989489942789078 0 -vt 0.4473200142383575 0.046875 0 -vt 0.1944639980792999 0.11786799877882 0 -vt 0.6831830143928528 0.07506199926137924 0 -vt 0.674377977848053 0.1724929958581924 0 -vt 0.8633509874343872 0.4091059863567352 0 -vt 0.9277200102806091 0.287975013256073 0 -vt 0.8783320188522339 0.2433450073003769 0 -vt 1.026785969734192 0.5987160205841064 0 -vt 1.035591959953308 0.5012850165367126 0 -vt 0.8346710205078125 0.6752780079841614 0 -vt 0.5326259732246399 0.7017340064048767 0 -vt 0.6168689727783203 0.4118610024452209 0 - -# 747 vertex normals -vn -0.5375880002975464 -0.07179799675941467 0.840146005153656 -vn -0.1515550017356873 -0.01711099967360497 0.9883009791374207 -vn -0.510263979434967 0.3471930027008057 0.7868220210075378 -vn -0.383882999420166 0.7247530221939087 0.572160005569458 -vn 0.006790999788790941 0.5470830202102661 0.8370509743690491 -vn 0.4419640004634857 0.160861998796463 0.8824920058250427 -vn -0.8104130029678345 0.1847179979085922 0.5559759736061096 -vn -0.9155340194702148 0.4022400081157684 0 -vn -0.710112988948822 0.6201850175857544 0.3333309888839722 -vn -0.7216730117797852 0.6078910231590271 -0.3311449885368347 -vn -0.4136289954185486 0.7018579840660095 -0.5799199938774109 -vn -0.4094110131263733 0.9123499989509583 0.0004339999868534505 -vn 0.1323229968547821 0.9380099773406982 0.3203549981117249 -vn 0.1323229968547821 0.9380099773406982 -0.3203549981117249 -vn 0.3397679924964905 0.940509021282196 0 -vn 0.4818519949913025 0.6178590059280396 0.6213449835777283 -vn 0.8813369870185852 0.4724879860877991 0 -vn 0.9429519772529602 -0.3329299986362457 0 -vn 0.7952039837837219 -0.09252200275659561 0.5992419719696045 -vn 0.4818519949913025 0.6178590059280396 -0.6213449835777283 -vn 0.4419640004634857 0.160861998796463 -0.8824920058250427 -vn 0.7952039837837219 -0.09252200275659561 -0.5992419719696045 -vn -0.01252099964767694 0.539700984954834 -0.841763973236084 -vn -0.5448579788208008 0.3272939920425415 -0.7720159888267517 -vn -0.5613030195236206 -0.07517900317907333 -0.8241890072822571 -vn -0.1957750022411346 -0.0270760003477335 -0.9802749752998352 -vn -0.2998470067977905 -0.5292649865150452 -0.793707013130188 -vn 0.1448850035667419 -0.802478015422821 -0.578823983669281 -vn 0.343163013458252 -0.4203700125217438 -0.8399569988250732 -vn 0.7043060064315796 -0.6335020065307617 -0.3203549981117249 -vn 0.2609860002994537 -0.9653429985046387 0.0003220000071451068 -vn 0.173225998878479 -0.8032519817352295 0.569894015789032 -vn 0.7043060064315796 -0.6335020065307617 0.3203549981117249 -vn -0.3462300002574921 -0.8729979991912842 -0.3435100018978119 -vn -0.769195020198822 -0.6390140056610107 0 -vn -0.334289014339447 -0.8776149749755859 0.3435750007629395 -vn -0.7281039953231812 -0.4009419977664948 0.5559759736061096 -vn -0.2649039924144745 -0.5273450016975403 0.8072999715805054 -vn 0.3593209981918335 -0.4139899909496307 0.8363620042800903 -vn -0.9902679920196533 -0.1391730010509491 -0 -vn -0.8104130029678345 0.1847179979085922 -0.5559759736061096 -vn -0.7281039953231812 -0.4009419977664948 -0.5559759736061096 -vn -0.2362789958715439 0.02918500080704689 0.9712470173835754 -vn 0.3209069967269897 -0.1081760004162788 0.9409130215644836 -vn 0.2328509986400604 0.4920690059661865 0.8388379812240601 -vn 0.4011589884757996 0.816008985042572 0.4161730110645294 -vn 0.3620760142803192 0.3835749924182892 0.8495709896087646 -vn 0.1260980069637299 -0.04097200185060501 0.9911710023880005 -vn -0.604686975479126 0.6148959994316101 0.5062180161476135 -vn -0.4789099991321564 0.8778640031814575 0 -vn 0.03857599943876266 0.9693480134010315 0.2426449954509735 -vn 0.03857599943876266 0.9693480134010315 -0.2426449954509735 -vn 0.4011589884757996 0.816008985042572 -0.4161730110645294 -vn 0.3609150052070618 0.9325990080833435 0 -vn 0.4944109916687012 0.798675000667572 0.3430379927158356 -vn 0.4944109916687012 0.798675000667572 -0.3430379927158356 -vn 0.8612650036811829 0.5081560015678406 0 -vn 0.6479099988937378 0.2460869997739792 0.7208700180053711 -vn 0.9510570168495178 -0.30901700258255 0 -vn 0.7433170080184937 -0.668940007686615 0 -vn 0.5354629755020142 -0.3628270030021667 0.7626510262489319 -vn 0.6479099988937378 0.2460860013961792 -0.7208700180053711 -vn 0.1260980069637299 -0.04097200185060501 -0.9911710023880005 -vn 0.5354629755020142 -0.3628270030021667 -0.7626510262489319 -vn 0.3620760142803192 0.3835749924182892 -0.8495709896087646 -vn 0.2328509986400604 0.4920690059661865 -0.8388379812240601 -vn -0.2362789958715439 0.02918500080704689 -0.9712470173835754 -vn 0.3209069967269897 -0.1081760004162788 -0.9409130215644836 -vn 0.1329340040683746 -0.4152190089225769 -0.8999559879302979 -vn 0.1888570040464401 -0.9709110260009766 -0.1471920013427734 -vn 0.1993210017681122 -0.4351809918880463 -0.8780030012130737 -vn -0.8620179891586304 0.08302299678325653 0.5000320076942444 -vn 0.1329340040683746 -0.4152190089225769 0.8999559879302979 -vn 0.1993210017681122 -0.4351809918880463 0.8780019879341125 -vn 0.1888570040464401 -0.9709110260009766 0.1471920013427734 -vn -0.9302049875259399 0.3670400083065033 0 -vn -0.9976400136947632 0.0686580017209053 0 -vn -0.604686975479126 0.6148959994316101 -0.5062180161476135 -vn -0.8620179891586304 0.08302299678325653 -0.5000320076942444 -vn 0.02138300053775311 -0.9165120124816895 0.3994359970092773 -vn -0.7818620204925537 -0.4315609931945801 -0.4499419927597046 -vn 0.9563360214233398 0.2284609973430634 -0.1822829991579056 -vn 0.8339009881019592 -0.1045610010623932 -0.5419189929962158 -vn 0.767799973487854 0.6018419861793518 0.2197020053863525 -vn 0.5461239814758301 0.7825490236282349 0.2989400029182434 -vn 0.9109249711036682 0.174918994307518 -0.3736560046672821 -vn 0.7487580180168152 0.6616759896278381 -0.03931299969553947 -vn 0.949258029460907 -0.04748500138521194 -0.3108929991722107 -vn 0.4068360030651093 0.8022599816322327 -0.4368790090084076 -vn 0.7691559791564941 0.182668998837471 -0.6123980283737183 -vn 0.1995120048522949 0.6090829968452454 -0.7676020264625549 -vn 0.6676030158996582 0.001959000015631318 -0.7445150017738342 -vn -0.0993880033493042 0.4149369895458221 -0.9044049978256226 -vn 0.3527739942073822 0.07949899882078171 -0.932325005531311 -vn -0.2833180129528046 0.4208430051803589 -0.8617550134658813 -vn -0.05747900158166885 0.8575270175933838 0.5112180113792419 -vn 0.1317239999771118 0.7430220246315002 0.6561769843101501 -vn -0.005809000227600336 0.8595520257949829 0.5110160112380981 -vn -0.3505710065364838 0.931430995464325 -0.09765499830245972 -vn -0.6476929783821106 0.6648160219192505 -0.372173011302948 -vn -0.8983089923858643 0.4048080146312714 -0.1707939952611923 -vn -0.8662490248680115 0.4800429940223694 -0.1384589970111847 -vn -0.7151209712028503 0.3602499961853027 0.5990179777145386 -vn -0.8666250109672546 0.3417699933052063 0.3635300099849701 -vn -0.6623769998550415 0.2970130145549774 0.6877800226211548 -vn -0.8117250204086304 0.3888390064239502 0.4357819855213165 -vn -0.9508990049362183 0.2433879971504211 0.1911900043487549 -vn -0.8467730283737183 0.07804299890995026 0.5261989831924438 -vn -0.7594159841537476 0.1409499943256378 0.6351540088653564 -vn -0.9400110244750977 -0.3405149877071381 -0.02069300040602684 -vn -0.9724000096321106 -0.2049909979104996 0.1114299967885017 -vn -0.8170300126075745 -0.3317660093307495 0.4715850055217743 -vn -0.6166999936103821 -0.3858979940414429 0.6861220002174377 -vn -0.5654150247573853 -0.4132109880447388 0.7138370275497437 -vn -0.3424369990825653 -0.3165769875049591 0.884598970413208 -vn -0.2633169889450073 -0.3102239966392517 0.9134690165519714 -vn -0.4920729994773865 -0.6772800087928772 -0.5469520092010498 -vn -0.2165350019931793 -0.8325880169868469 -0.5098140239715576 -vn -0.336313009262085 -0.9366880059242249 -0.09751000255346298 -vn 0.08508399873971939 -0.8829479813575745 0.4616970121860504 -vn 0.1960570067167282 -0.7339509725570679 0.6502910256385803 -vn 0.454815000295639 -0.6157029867172241 0.6434699892997742 -vn 0.4893380105495453 -0.7108240127563477 0.5052499771118164 -vn 0.4581849873065948 -0.6546030044555664 -0.6013000011444092 -vn 0.2736169993877411 -0.5752760171890259 -0.7708380222320557 -vn 0.5572580099105835 -0.6418589949607849 -0.526764988899231 -vn 0.7707909941673279 -0.6368250250816345 0.01830600015819073 -vn 0.8732380270957947 -0.4872829914093018 0.003169999923557043 -vn 0.8787599802017212 -0.285726010799408 -0.3822849988937378 -vn 0.7752519845962524 -0.4531359970569611 -0.4400599896907806 -vn 0.07676800340414047 -0.9022539854049683 -0.4243170022964478 -vn -0.7608579993247986 -0.310029000043869 0.5700669884681702 -vn 0.6989830136299133 0.6327279806137085 -0.333285003900528 -vn 0.9189450144767761 -0.0186110008507967 0.3939450085163116 -vn 0.9469230175018311 0.2427060008049011 0.2107869982719421 -vn 0.5977060198783875 0.7759019732475281 -0.2018010020256042 -vn 0.8984569907188416 0.3959749937057495 0.1896820068359375 -vn 0.5849769711494446 0.7775779962539673 -0.2305970042943954 -vn 0.06112100183963776 0.8655030131340027 0.4971610009670258 -vn 0.81489098072052 0.173455998301506 0.5530520081520081 -vn 0.488323986530304 0.05219599977135658 0.8711000084877014 -vn -0.07333800196647644 0.3724580109119415 0.9251469969749451 -vn -0.1685570031404495 0.420635998249054 0.8914330005645752 -vn 0.5626059770584106 0.01164999976754189 0.8266429901123047 -vn 0.424549013376236 0.2200690060853958 0.8782529830932617 -vn -0.2022739946842194 0.5748890042304993 0.792834997177124 -vn -0.2014950066804886 0.8707110285758972 -0.4486219882965088 -vn -0.1475190073251724 0.7000659704208374 -0.6986740231513977 -vn -0.247406005859375 0.6800289750099182 -0.6901819705963135 -vn -0.6592289805412292 0.7426900267601013 -0.1175960004329681 -vn -0.8238279819488525 0.5144019722938538 0.2381149977445602 -vn -0.8807550072669983 0.462224006652832 0.1030530035495758 -vn -0.8354460000991821 0.5381479859352112 0.1114759966731071 -vn -0.8354330062866211 0.2911489903926849 -0.4661380052566528 -vn -0.7990170121192932 0.4768629968166351 -0.3662959933280945 -vn -0.7965649962425232 -0.008375000208616257 -0.6044949889183044 -vn -0.7460759878158569 0.1244580000638962 -0.654125988483429 -vn -0.8470270037651062 0.2575120031833649 -0.4650079905986786 -vn -0.7743350267410278 0.09411299973726273 -0.6257380247116089 -vn -0.7994340062141418 0.06731099635362625 -0.5969709753990173 -vn -0.914825975894928 -0.4032889902591705 0.0212399996817112 -vn -0.9607080221176147 -0.2765470147132874 0.02371999993920326 -vn -0.7760940194129944 -0.562736988067627 -0.2846130132675171 -vn -0.2481050044298172 -0.5148569941520691 -0.820589005947113 -vn -0.2315990030765533 -0.2342070043087006 -0.9441980123519897 -vn -0.2359499931335449 -0.3241190016269684 -0.9161189794540405 -vn -0.3423370122909546 -0.4482719898223877 -0.825747013092041 -vn -0.3890469968318939 -0.6779909729957581 0.6236749887466431 -vn -0.2865490019321442 -0.8684669733047485 0.4045419991016388 -vn -0.05829200148582458 -0.911346971988678 0.407490998506546 -vn 0.4559510052204132 -0.7950720191001892 -0.3999620079994202 -vn 0.4897150099277496 -0.5246649980545044 -0.6963520050048828 -vn 0.5158429741859436 -0.6365799903869629 -0.5733000040054321 -vn 0.423911988735199 -0.8095009922981262 -0.4062100052833557 -vn 0.5356029868125916 -0.6355810165405273 0.5560269951820374 -vn 0.4908620119094849 -0.4675160050392151 0.7351760268211365 -vn 0.7313770055770874 -0.3685759902000427 0.5737929940223694 -vn 0.8901190161705017 -0.3876970112323761 0.2395379990339279 -vn 0.8836299777030945 -0.404119998216629 0.2363989949226379 -vn 0.8226990103721619 -0.324539989233017 0.4667330086231232 -vn 0.7892469763755798 -0.4085890054702759 0.4584139883518219 -vn -0.07298800349235535 -0.9022539854049683 0.4249840080738068 -vn -0.2881479859352112 -0.512224018573761 -0.8090720176696777 -vn 0.9188060164451599 0.3839870095252991 0.09137199819087982 -vn 0.993162989616394 0.114096000790596 -0.02468799985945225 -vn 0.4343830049037933 0.7090979814529419 0.5554199814796448 -vn 0.4718630015850067 0.8051769733428955 0.3592160046100616 -vn 0.8680509924888611 0.4418930113315582 0.2263129949569702 -vn 0.3869659900665283 0.8111780285835266 0.4384610056877136 -vn 0.9717289805412292 0.2360440045595169 0.005162999965250492 -vn 0.2779389917850494 0.90385901927948 -0.3252519965171814 -vn 0.9075610041618347 0.1839890033006668 -0.377467006444931 -vn 0.3897979855537415 0.4576799869537354 -0.7991160154342651 -vn 0.9741809964179993 -0.04597700014710426 -0.2210370004177094 -vn 0.4417490065097809 0.2665829956531525 -0.8566160202026367 -vn 0.8866739869117737 0.01747499965131283 -0.4620650112628937 -vn 0.3720920085906982 0.3275539875030518 -0.8684790134429932 -vn -0.3850800096988678 0.8340460062026978 0.3950709998607635 -vn -0.4761059880256653 0.6599609851837158 0.581184983253479 -vn -0.5561609864234924 0.6855729818344116 0.4697610139846802 -vn -0.6268590092658997 0.7454360127449036 -0.2266560047864914 -vn -0.5542709827423096 0.4361459910869598 -0.7089149951934814 -vn -0.5615590214729309 0.3103019893169403 -0.7670490145683289 -vn -0.5438100099563599 0.4169149994850159 -0.7283220291137695 -vn -0.9747139811515808 0.1763579994440079 0.1372230052947998 -vn -0.9172520041465759 0.3692820072174072 0.1492629945278168 -vn -0.9827640056610107 -0.03630400076508522 0.1812669932842255 -vn -0.9872050285339355 0.07037699967622757 0.1430840045213699 -vn -0.9887080192565918 0.09066099673509598 -0.119318999350071 -vn -0.9954649806022644 0.06980500370264053 -0.0646279975771904 -vn -0.9868990182876587 0.1531080007553101 -0.0508820004761219 -vn -0.7857019901275635 -0.5462189912796021 -0.2903740108013153 -vn -0.8021669983863831 -0.4474230110645294 -0.3953999876976013 -vn -0.7882999777793884 -0.6091880202293396 -0.08644299954175949 -vn -0.6353080272674561 -0.5868319869041443 0.5020080208778381 -vn -0.7489200234413147 -0.3426479995250702 0.5671960115432739 -vn -0.8290749788284302 -0.1998199969530106 0.5222129821777344 -vn -0.8114089965820313 -0.2435930073261261 0.5312989950180054 -vn -0.02972600050270557 -0.7129759788513184 -0.7005580067634583 -vn -0.1212550029158592 -0.8703849911689758 -0.4772070050239563 -vn 0.1511760056018829 -0.9298509955406189 -0.3354449868202209 -vn 0.2028409987688065 -0.8257309794425964 0.5263310074806213 -vn 0.08091399818658829 -0.5281829833984375 0.8452659845352173 -vn 0.01067500002682209 -0.4742409884929657 0.8803300261497498 -vn 0.0144889997318387 -0.6355460286140442 0.7719269990921021 -vn 0.7427240014076233 -0.5451459884643555 -0.3888140022754669 -vn 0.7865099906921387 -0.3833020031452179 -0.4842329919338226 -vn 0.9205939769744873 -0.3581419885158539 -0.1556950062513351 -vn 0.8897669911384583 -0.3594259917736053 0.2812969982624054 -vn 0.8730049729347229 -0.2942259907722473 0.3889650106430054 -vn 0.9076560139656067 -0.2917299866676331 0.3017520010471344 -vn 0.8630970120429993 -0.4457089900970459 0.2375019937753677 -vn 0.04144300147891045 -0.9088649749755859 -0.415026992559433 -vn -0.1099570021033287 -0.08454799652099609 0.9903339743614197 -vn 0.2451310008764267 0.7632600069046021 -0.5977830290794373 -vn 0.9554449915885925 0.2843270003795624 -0.07926099747419357 -vn 0.8238049745559692 0.5351709723472595 -0.1869129985570908 -vn 0.2853530049324036 0.8679130077362061 -0.4065710008144379 -vn 0.7501500248908997 0.5809810161590576 -0.3158090114593506 -vn 0.193001002073288 0.8577240109443665 -0.4765090048313141 -vn 0.1220619976520538 0.9612579941749573 0.2471510022878647 -vn 0.8907639980316162 0.4299469888210297 -0.147257000207901 -vn 0.8693600296974182 0.404801994562149 0.2834579944610596 -vn 0.3425579965114594 0.6023179888725281 0.7210180163383484 -vn 0.4495930075645447 0.5570510029792786 0.6982550024986267 -vn 0.9799709916114807 0.1605979949235916 0.1177510023117065 -vn 0.9129520058631897 0.3300270140171051 0.2400040030479431 -vn 0.3969599902629852 0.7427070140838623 0.5392670035362244 -vn -0.5626519918441772 0.7477009892463684 -0.3526549935340881 -vn -0.640733003616333 0.5571630001068115 -0.5282340049743652 -vn -0.7121180295944214 0.5705819725990295 -0.4090529978275299 -vn -0.7194139957427979 0.6329879760742188 0.2859529852867126 -vn -0.5416349768638611 0.3929080069065094 0.7431390285491943 -vn -0.5068719983100891 0.4453279972076416 0.7380809783935547 -vn -0.5300359725952148 0.6580139994621277 0.5348640084266663 -vn -0.9993979930877686 0.002857000101357698 -0.03458600118756294 -vn -0.9778590202331543 0.2025559991598129 -0.05256599932909012 -vn -0.9748870134353638 -0.2087630033493042 -0.07754799723625183 -vn -0.9908090233802795 -0.1349709928035736 -0.00891099963337183 -vn -0.9714679718017578 -0.08408299833536148 0.2217649966478348 -vn -0.9839869737625122 -0.0358319990336895 0.1746020019054413 -vn -0.9879299998283386 0.05565499886870384 0.1445589959621429 -vn -0.6447849869728088 -0.6683390140533447 0.3709119856357574 -vn -0.6672559976577759 -0.5719799995422363 0.4770840108394623 -vn -0.6573889851570129 -0.7345010042190552 0.1683689951896667 -vn -0.5605350136756897 -0.7363070249557495 -0.3790149986743927 -vn -0.692903995513916 -0.5403270125389099 -0.4774209856987 -vn -0.805446982383728 -0.4507080018520355 -0.3848600089550018 -vn -0.8070970177650452 -0.5522969961166382 -0.2087150067090988 -vn 0.1668089926242828 -0.6945620179176331 0.699828028678894 -vn 0.08150500059127808 -0.8694409728050232 0.4872680008411407 -vn 0.3440600037574768 -0.8835279941558838 0.3178069889545441 -vn 0.3032650053501129 -0.806547999382019 -0.5074549913406372 -vn 0.1325059980154037 -0.5874869823455811 -0.7983120083808899 -vn 0.02260999940335751 -0.6936299800872803 -0.719976007938385 -vn 0.04509999975562096 -0.9239140152931213 -0.3799329996109009 -vn 0.8621219992637634 -0.401540994644165 0.3090479969978333 -vn 0.8867239952087402 -0.2328619956970215 0.3993679881095886 -vn 0.9798589944839478 -0.1908919960260391 0.05861499905586243 -vn 0.9012619853019714 -0.1982769966125488 -0.3852449953556061 -vn 0.8543739914894104 -0.1819390058517456 -0.4867680072784424 -vn 0.9012380242347717 -0.2525070011615753 -0.3521510064601898 -vn 0.8982779979705811 -0.4129990041255951 -0.1500930041074753 -vn -0.272473007440567 -0.9165120124816895 -0.2928540110588074 -vn 0.2474620044231415 -0.4315969944000244 0.8674600124359131 -vn 0.3753190040588379 0.6018419861793518 -0.7049270272254944 -vn 0.9690999984741211 -0.1045589968562126 -0.2234120070934296 -vn 0.7954490184783936 0.2284629940986633 -0.5613070130348206 -vn 0.1643320024013519 0.7825480103492737 -0.6005110144615173 -vn 0.9015669822692871 0.174918994307518 -0.395700991153717 -vn 0.5484110116958618 0.6616759896278381 -0.5113030076026917 -vn 0.596875011920929 0.8022609949111938 0.01082899980247021 -vn 0.8830479979515076 -0.04748399928212166 -0.4668749868869781 -vn 0.9758470058441162 0.1404889971017838 -0.1672890037298203 -vn 0.6950060129165649 0.6005629897117615 0.3953349888324738 -vn 0.8043910264968872 0.3754850029945374 0.4603970050811768 -vn 0.9504550099372864 -0.06233000010251999 -0.3045510053634644 -vn 0.9899749755859375 0.07949800044298172 -0.1167469993233681 -vn 0.7676119804382324 0.4208459854125977 0.4833849966526031 -vn -0.4076670110225677 0.8575270175933838 -0.3137750029563904 -vn -0.3805089890956879 0.7430220246315002 -0.550574004650116 -vn -0.371628999710083 0.8595520257949829 -0.3508029878139496 -vn -0.1732809990644455 0.931430995464325 0.320017009973526 -vn -0.08834400027990341 0.681833028793335 0.7261540293693542 -vn -0.09786199778318405 0.460783988237381 0.882099986076355 -vn -0.07521700114011765 0.4800420105457306 0.8740149736404419 -vn -0.9276620149612427 0.3602499961853027 0.09830199927091599 -vn -0.8635100126266479 0.3417719900608063 0.3708679974079132 -vn -0.9548730254173279 0.2970120012760162 -0.001296999980695546 -vn -0.877348005771637 0.388837993144989 0.2811869978904724 -vn -0.7982050180435181 0.2586430013179779 0.5440329909324646 -vn -0.8309450149536133 0.1299329996109009 0.5409700274467468 -vn -0.80000901222229 0.1409460008144379 0.5831969976425171 -vn -0.6381030082702637 -0.3405129909515381 0.6905620098114014 -vn -0.7556419968605042 -0.2049909979104996 0.6220800280570984 -vn -0.9067860245704651 -0.3317669928073883 0.2601329982280731 -vn -0.9219499826431274 -0.3858990073204041 -0.03300400078296661 -vn -0.9323030114173889 -0.3608480095863342 -0.02450799942016602 -vn -0.9716429710388184 -0.2363799959421158 0.005919000133872032 -vn -0.9500359892845154 -0.3102270066738129 0.03450300171971321 -vn 0.05162100121378899 -0.6772800087928772 0.7339119911193848 -vn 0.2163099944591522 -0.8325870037078857 0.509909987449646 -vn -0.1634809970855713 -0.9366880059242249 0.3096620142459869 -vn -0.2730129957199097 -0.8829479813575745 -0.3819249868392944 -vn -0.3344889879226685 -0.7286760210990906 -0.5976189970970154 -vn -0.4082350134849548 -0.6025800108909607 -0.6857410073280334 -vn -0.3718569874763489 -0.7108250260353088 -0.5970349907875061 -vn 0.7508220076560974 -0.6546019911766052 0.08810699731111526 -vn 0.7445650100708008 -0.5752760171890259 0.3386459946632385 -vn 0.7660269737243652 -0.6418589949607849 -0.03493599966168404 -vn 0.5222679972648621 -0.6368250250816345 -0.5671759843826294 -vn 0.5276669859886169 -0.5274670124053955 -0.6658419966697693 -vn 0.6410369873046875 -0.3752210140228271 -0.6695380210876465 -vn 0.6145420074462891 -0.4531340003013611 -0.6457610130310059 -vn -0.2724759876728058 -0.9165120124816895 0.2928540110588074 -vn 0.2474450021982193 -0.4315490126609802 -0.8674880266189575 -vn 0.7954490184783936 0.2284629940986633 0.5613070130348206 -vn 0.9690999984741211 -0.1045589968562126 0.2234120070934296 -vn 0.3753179907798767 0.6018419861793518 0.7049270272254944 -vn 0.1643320024013519 0.7825480103492737 0.6005110144615173 -vn 0.9015669822692871 0.174918994307518 0.395700991153717 -vn 0.5484099984169006 0.6616759896278381 0.5113030076026917 -vn 0.8830469846725464 -0.04748500138521194 0.4668749868869781 -vn 0.596875011920929 0.8022609949111938 -0.01082899980247021 -vn 0.9758470058441162 0.1404889971017838 0.1672890037298203 -vn 0.6950060129165649 0.6005640029907227 -0.3953360021114349 -vn 0.9504539966583252 -0.06233000010251999 0.3045510053634644 -vn 0.8043910264968872 0.3754850029945374 -0.4603970050811768 -vn 0.9899749755859375 0.07949800044298172 0.1167469993233681 -vn 0.767611026763916 0.4208459854125977 -0.4833849966526031 -vn -0.4076670110225677 0.8575270175933838 0.3137750029563904 -vn -0.3805089890956879 0.7430220246315002 0.550574004650116 -vn -0.371628999710083 0.8595520257949829 0.3508029878139496 -vn -0.1732809990644455 0.931430995464325 -0.320017009973526 -vn -0.0883449986577034 0.681833028793335 -0.7261540293693542 -vn -0.09786199778318405 0.460783988237381 -0.882099986076355 -vn -0.07521700114011765 0.4800420105457306 -0.8740149736404419 -vn -0.9276620149612427 0.3602499961853027 -0.09830199927091599 -vn -0.8635100126266479 0.3417719900608063 -0.3708679974079132 -vn -0.9548730254173279 0.2970120012760162 0.001296999980695546 -vn -0.877348005771637 0.388837993144989 -0.2811869978904724 -vn -0.7982050180435181 0.2586430013179779 -0.5440329909324646 -vn -0.8309450149536133 0.1299329996109009 -0.5409700274467468 -vn -0.8000100255012512 0.1409450024366379 -0.5831959843635559 -vn -0.6381030082702637 -0.3405129909515381 -0.6905620098114014 -vn -0.7556419968605042 -0.2049909979104996 -0.6220809817314148 -vn -0.9067860245704651 -0.3317669928073883 -0.2601329982280731 -vn -0.9219499826431274 -0.3858990073204041 0.03300400078296661 -vn -0.9323030114173889 -0.3608480095863342 0.02450799942016602 -vn -0.9716429710388184 -0.2363799959421158 -0.005919000133872032 -vn -0.9500359892845154 -0.3102270066738129 -0.03450300171971321 -vn 0.05162100121378899 -0.6772800087928772 -0.7339119911193848 -vn 0.2163099944591522 -0.8325870037078857 -0.509909987449646 -vn -0.1634809970855713 -0.9366869926452637 -0.3096620142459869 -vn -0.2730129957199097 -0.8829479813575745 0.3819249868392944 -vn -0.3344880044460297 -0.7286760210990906 0.5976200103759766 -vn -0.4082350134849548 -0.6025800108909607 0.6857410073280334 -vn -0.3718569874763489 -0.7108250260353088 0.5970349907875061 -vn 0.7508220076560974 -0.6546019911766052 -0.08810699731111526 -vn 0.7445650100708008 -0.5752760171890259 -0.3386459946632385 -vn 0.7660269737243652 -0.6418589949607849 0.03493599966168404 -vn 0.5222679972648621 -0.6368250250816345 0.5671769976615906 -vn 0.5276669859886169 -0.5274670124053955 0.6658419966697693 -vn 0.6410369873046875 -0.3752210140228271 0.6695380210876465 -vn 0.6145420074462891 -0.4531340003013611 0.6457610130310059 -vn -0.287102997303009 -0.9309409856796265 -0.2256560027599335 -vn 0.1843679994344711 -0.4218010008335114 0.8877459764480591 -vn 0.07405100017786026 0.6319169998168945 -0.7714899778366089 -vn 0.8553329706192017 0.06064699962735176 -0.5145170092582703 -vn 0.7307729721069336 0.3228900134563446 -0.6014260053634644 -vn 0.2098069936037064 0.7427859902381897 -0.6358069777488708 -vn 0.6162220239639282 0.3713270127773285 -0.6945400238037109 -vn 0.09581899642944336 0.7464309930801392 -0.6585279703140259 -vn 0.4080640077590942 0.9123439788818359 0.03336000069975853 -vn 0.8213359713554382 0.1804669946432114 -0.5411459803581238 -vn 0.969681978225708 0.1661700010299683 -0.17917600274086 -vn 0.7540370225906372 0.5044180154800415 0.4207040071487427 -vn 0.828561007976532 0.3165900111198425 0.4617980122566223 -vn 0.9432830214500427 -0.08009400218725204 -0.3221819996833801 -vn 0.9967989921569824 0.009220999665558338 -0.07941699773073196 -vn 0.775767982006073 0.3821409940719604 0.5021479725837708 -vn -0.5359219908714294 0.8157860040664673 -0.2174420058727264 -vn -0.7117419838905334 0.631197988986969 -0.3082410097122192 -vn -0.7205860018730164 0.6709820032119751 -0.1747539937496185 -vn -0.4114960134029388 0.7961680293083191 0.4436070024967194 -vn -0.0943790003657341 0.527301013469696 0.8444210290908813 -vn -0.06975200027227402 0.4077039957046509 0.9104459881782532 -vn -0.07522699981927872 0.5093169808387756 0.8572840094566345 -vn -0.899321973323822 0.2172179967164993 0.3795219957828522 -vn -0.8569710254669189 0.4048359990119934 0.318917989730835 -vn -0.9294880032539368 0.002263000002130866 0.3688459992408752 -vn -0.9130200147628784 0.1119910031557083 0.3922390043735504 -vn -0.7752439975738525 0.1555069983005524 0.6122210025787354 -vn -0.809952974319458 0.130293995141983 0.5718389749526978 -vn -0.8099700212478638 0.21145099401474 0.5470259785652161 -vn -0.5124379992485046 -0.4739649891853333 0.7160750031471252 -vn -0.4707460105419159 -0.3654879927635193 0.8030049800872803 -vn -0.6227080225944519 -0.5545240044593811 0.5520300269126892 -vn -0.8047950267791748 -0.5929269790649414 -0.02723599970340729 -vn -0.9356880187988281 -0.3495660126209259 -0.04786499962210655 -vn -0.9798259735107422 -0.1990929991006851 0.01738799922168255 -vn -0.9696599841117859 -0.2444050014019012 0.004995000082999468 -vn 0.3460299968719482 -0.6453220248222351 0.6810449957847595 -vn 0.1500509977340698 -0.8165979981422424 0.5573610067367554 -vn 0.305963009595871 -0.9033949971199036 0.3004390001296997 -vn -0.1068940013647079 -0.8791000247001648 -0.4644969999790192 -vn -0.3793039917945862 -0.6047009825706482 -0.70033198595047 -vn -0.4574509859085083 -0.5502709746360779 -0.6985269784927368 -vn -0.3967710137367249 -0.701295018196106 -0.5922489762306213 -vn 0.8359060287475586 -0.5488340258598328 -0.006517999805510044 -vn 0.9236019849777222 -0.3818440139293671 0.03396600112318993 -vn 0.8632140159606934 -0.3933719992637634 -0.3164179921150208 -vn 0.6054999828338623 -0.4316779971122742 -0.6685979962348938 -vn 0.5342289805412292 -0.3754520118236542 -0.7573869824409485 -vn 0.6098309755325317 -0.3671579957008362 -0.7023540139198303 -vn 0.6060940027236938 -0.5121269822120667 -0.6085860133171082 -vn -0.2871040105819702 -0.9309409856796265 0.2256550043821335 -vn 0.1843840032815933 -0.4217509925365448 -0.8877660036087036 -vn 0.7307729721069336 0.3228900134563446 0.6014260053634644 -vn 0.8553329706192017 0.06064699962735176 0.5145170092582703 -vn 0.07405100017786026 0.6319169998168945 0.7714899778366089 -vn 0.2098069936037064 0.7427859902381897 0.6358069777488708 -vn 0.6162220239639282 0.3713270127773285 0.6945400238037109 -vn 0.09581799805164337 0.7464309930801392 0.6585279703140259 -vn 0.8213359713554382 0.1804669946432114 0.5411450266838074 -vn 0.4080640077590942 0.9123439788818359 -0.03336000069975853 -vn 0.969681978225708 0.1661700010299683 0.17917500436306 -vn 0.7540370225906372 0.5044180154800415 -0.4207040071487427 -vn 0.9432830214500427 -0.08009400218725204 0.3221819996833801 -vn 0.8285599946975708 0.3165900111198425 -0.4617989957332611 -vn 0.9967989921569824 0.009220999665558338 0.07941699773073196 -vn 0.775767982006073 0.3821409940719604 -0.5021479725837708 -vn -0.5359219908714294 0.8157860040664673 0.2174420058727264 -vn -0.7117419838905334 0.631197988986969 0.3082410097122192 -vn -0.7205860018730164 0.6709820032119751 0.1747539937496185 -vn -0.4114960134029388 0.7961680293083191 -0.4436070024967194 -vn -0.09437999874353409 0.527301013469696 -0.8444210290908813 -vn -0.06975200027227402 0.4077039957046509 -0.9104459881782532 -vn -0.07522699981927872 0.5093169808387756 -0.8572850227355957 -vn -0.899321973323822 0.2172179967164993 -0.3795219957828522 -vn -0.8569710254669189 0.4048359990119934 -0.318917989730835 -vn -0.9294880032539368 0.002263000002130866 -0.3688449859619141 -vn -0.9130200147628784 0.1119910031557083 -0.3922390043735504 -vn -0.7752439975738525 0.1555059999227524 -0.6122210025787354 -vn -0.8099520206451416 0.130293995141983 -0.5718389749526978 -vn -0.8099690079689026 0.21144999563694 -0.5470269918441772 -vn -0.5124379992485046 -0.4739649891853333 -0.7160750031471252 -vn -0.4707460105419159 -0.3654879927635193 -0.8030049800872803 -vn -0.6227080225944519 -0.5545240044593811 -0.5520300269126892 -vn -0.8047950267791748 -0.5929279923439026 0.02723599970340729 -vn -0.9356880187988281 -0.3495660126209259 0.04786499962210655 -vn -0.9798259735107422 -0.1990929991006851 -0.01738799922168255 -vn -0.9696599841117859 -0.2444050014019012 -0.004995000082999468 -vn 0.3460299968719482 -0.6453220248222351 -0.6810449957847595 -vn 0.1500509977340698 -0.8165979981422424 -0.5573610067367554 -vn 0.3059639930725098 -0.9033949971199036 -0.3004390001296997 -vn -0.1068949997425079 -0.8791000247001648 0.464495986700058 -vn -0.3793050050735474 -0.6047009825706482 0.70033198595047 -vn -0.4574509859085083 -0.5502709746360779 0.6985269784927368 -vn -0.3967710137367249 -0.7012940049171448 0.5922489762306213 -vn 0.8359060287475586 -0.5488340258598328 0.006517999805510044 -vn 0.9236019849777222 -0.3818440139293671 -0.03396600112318993 -vn 0.8632140159606934 -0.3933730125427246 0.3164179921150208 -vn 0.6054999828338623 -0.4316790103912354 0.6685979962348938 -vn 0.5342299938201904 -0.3754520118236542 0.7573869824409485 -vn 0.6098309755325317 -0.3671579957008362 0.7023540139198303 -vn 0.6060940027236938 -0.5121260285377502 0.6085860133171082 -vn 0 0 0 -vn 0.8919450044631958 0.3336060047149658 -0.3051899969577789 -vn 0.8852859735488892 -0.05170800164341927 0.4621630012989044 -vn 0.8717010021209717 -0.4864040017127991 -0.05957400053739548 -vn 0.6025350093841553 -0.1140230000019073 0.7899060249328613 -vn 0.7673320174217224 -0.6138780117034912 0.1853529959917068 -vn 0.6157039999961853 -0.2387659996747971 0.750931978225708 -vn -0.1322280019521713 0.07659800350666046 0.9882550239562988 -vn -0.1344829946756363 0.2189230024814606 0.9664300084114075 -vn -0.08265399932861328 0.3330360054969788 0.9392849802970886 -vn -0.7942630052566528 0.3628509938716888 0.4873250126838684 -vn -0.686972975730896 0.5388749837875366 0.4875270128250122 -vn -0.9116560220718384 -0.2424139976501465 -0.3318400084972382 -vn -0.903469979763031 -0.005853999871760607 -0.4286110103130341 -vn -0.8802070021629333 0.2844929993152618 -0.3798680007457733 -vn -0.3590719997882843 -0.2934069931507111 -0.8859909772872925 -vn -0.5312150120735168 -0.1616500020027161 -0.8316730260848999 -vn 0.5217099785804749 -0.3334519863128662 -0.7852569818496704 -vn 0.4982230067253113 -0.5182129740715027 -0.6951469779014587 -vn 0.3192520141601563 -0.6669300198554993 -0.6732630133628845 -vn 0.4172089993953705 0.6029300093650818 -0.6800090074539185 -vn -0.3909519910812378 -0.5063930153846741 -0.7685850262641907 -vn -0.785847008228302 -0.2199160009622574 -0.5779989957809448 -vn -0.1128029972314835 -0.7670649886131287 -0.6315749883651733 -vn -0.6768519878387451 -0.4520730078220367 -0.5809479951858521 -vn -0.07061299681663513 -0.7851089835166931 -0.6153200268745422 -vn 0.4044640064239502 -0.913004994392395 -0.05320600047707558 -vn 0.5100409984588623 -0.8511109948158264 -0.1243719980120659 -vn 0.600862979888916 -0.7767530083656311 -0.188727006316185 -vn 0.7341600060462952 -0.2982490062713623 0.6099640130996704 -vn 0.8028550148010254 -0.2451270073652267 0.5434489846229553 -vn 0.2039200067520142 0.286547988653183 0.9361129999160767 -vn 0.2590579986572266 0.3469229936599731 0.90140700340271 -vn 0.3050769865512848 0.4136070013046265 0.857820987701416 -vn -0.3951399922370911 0.6723129749298096 0.6259869933128357 -vn -0.3882040083408356 0.6723269820213318 0.6302970051765442 -vn -0.8444070219993591 0.5085629820823669 -0.1683440059423447 -vn -0.9073770046234131 0.4102010130882263 -0.09166599810123444 -vn -0.9431279897689819 0.3317759931087494 0.02084000036120415 -vn -0.03268500044941902 0.9875209927558899 0.1540600061416626 -vn 0.2856169939041138 0.9530180096626282 0.1008900031447411 -vn 0.3564079999923706 0.9297230243682861 0.092678003013134 -vn 0.05804499983787537 0.9152950048446655 0.3985790014266968 -vn -0.4380980134010315 -0.8398249745368958 0.3205699920654297 -vn 0.0398080013692379 -0.7493849992752075 0.6609370112419128 -vn -0.4364219903945923 -0.7586889863014221 0.4836600124835968 -vn -0.1446219980716705 0.8584669828414917 0.4920569956302643 -vn -0.3905079960823059 -0.8025469779968262 0.4510230123996735 -vn -0.3789550065994263 0.7686259746551514 0.5153710246086121 -vn -0.3518399894237518 -0.8554270267486572 0.3800710141658783 -vn -0.5039129853248596 0.8112840056419373 0.2964630126953125 -vn -0.4345029890537262 -0.8862379789352417 0.1605930030345917 -vn -0.5895540118217468 0.7668499946594238 0.2537069916725159 -vn 0.4611240029335022 -0.5667420029640198 0.682765007019043 -vn -0.03327900171279907 -0.5302489995956421 0.8471890091896057 -vn -0.1550759971141815 -0.4793860018253326 0.8637940287590027 -vn -0.3325540125370026 -0.6754969954490662 0.6581119894981384 -vn -0.6243529915809631 -0.6490340232849121 0.434671014547348 -vn -0.6404299736022949 -0.7232750058174133 0.258307009935379 -vn 0.8391460180282593 -0.5209720134735107 0.1562740057706833 -vn 0.9793859720230103 -0.04739199951291084 0.1963589936494827 -vn 0.8591970205307007 -0.01306600030511618 0.5114780068397522 -vn 0.1697809994220734 0.01797799952328205 0.9853180050849915 -vn -0.2981239855289459 0.09316399693489075 0.949970006942749 -vn -0.6025810241699219 0.1407950073480606 0.785539984703064 -vn -0.7606229782104492 0.3568800091743469 0.5422999858856201 -vn -0.9164419770240784 -0.01278399955481291 0.3999640047550201 -vn 0.7099589705467224 0.6897799968719482 0.1419920027256012 -vn 0.6163280010223389 0.7111549973487854 0.3382270038127899 -vn 0.1215279996395111 0.6381019949913025 0.7602999806404114 -vn -0.3081580102443695 0.474483996629715 0.8245630264282227 -vn -0.5849490165710449 0.4978660047054291 0.64028400182724 -vn -0.8313949704170227 0.3698750138282776 0.414698988199234 -vn -0.7773889899253845 0.439754992723465 0.4497570097446442 -vn -0.7120980024337769 0.07437500357627869 0.6981300115585327 -vn -0.5221620202064514 -0.5821250081062317 0.6232789754867554 -vn -0.5362930297851563 0.8426250219345093 0.04870999976992607 -vn -0.6278550028800964 0.7403159737586975 0.2402739971876144 -vn -0.817995011806488 0.4767960011959076 0.3217920064926147 -vn -0.7291709780693054 0.6557949781417847 0.1955550014972687 -vn -0.9585440158843994 0.2151080071926117 0.1868750005960464 -vn -0.9505919814109802 0.1639280021190643 0.2636339962482452 -vn -0.9833920001983643 -0.02283000014722347 0.1800519973039627 -vn -0.8917449712753296 0.1107539981603622 0.4387759864330292 -vn -0.9918580055236816 -0.08782999962568283 0.09221799671649933 -vn -0.8591039776802063 0.04482100158929825 0.5098350048065186 -vn -0.8949519991874695 -0.4028989970684052 0.1916580051183701 -vn -0.9036110043525696 0.009092999622225761 0.4282569885253906 -vn -0.8893200159072876 0.01745700091123581 0.4569520056247711 -vn -0.7315409779548645 -0.4924210011959076 0.4715610146522522 -vn -0.7941030263900757 -0.1783780008554459 0.581017017364502 -vn -0.6259329915046692 -0.3735530078411102 0.6845920085906982 -vn -0.5845080018043518 -0.1848309934139252 0.7900559902191162 -vn -0.8015180230140686 -0.1042689979076385 0.5888090133666992 -vn -0.6420310139656067 -0.2967270016670227 0.7069290280342102 -vn -0.8202810287475586 -0.1234560012817383 0.5584779977798462 -vn 0.01690500043332577 -0.9364719986915588 -0.3503330051898956 -vn -0.09879499673843384 -0.7398999929428101 -0.6654229760169983 -vn -0.06946200132369995 -0.9367489814758301 -0.3430390059947968 -vn 0.123930998146534 -0.9922909736633301 0 -vn 0.03589100018143654 -0.8559809923171997 -0.5157600045204163 -vn -0.0289510004222393 -0.999580979347229 0 -vn 0.01690500043332577 -0.9364719986915588 0.3503330051898956 -vn -0.06946200132369995 -0.9367489814758301 0.3430390059947968 -vn -0.3344019949436188 -0.9161610007286072 -0.2209639996290207 -vn -0.7904769778251648 -0.6124920248985291 -0 -vn -0.3344019949436188 -0.9161610007286072 0.2209639996290207 -vn -0.7410100102424622 -0.556659996509552 0.375544011592865 -vn -0.2743130028247833 -0.8896610140800476 0.3650420010089874 -vn -0.09879499673843384 -0.7398999929428101 0.6654229760169983 -vn 0.03589100018143654 -0.8559809923171997 0.5157600045204163 -vn -0.2743130028247833 -0.8896610140800476 -0.3650420010089874 -vn -0.7410100102424622 -0.556659996509552 -0.375544011592865 -vn 0.3564079999923706 0.9297230243682861 -0.092678003013134 -vn 0.2856169939041138 0.9530180096626282 -0.1008900031447411 -vn -0.03268500044941902 0.9875209927558899 -0.1540600061416626 -vn 0.05804499983787537 0.9152950048446655 -0.3985790014266968 -vn -0.4364219903945923 -0.7586889863014221 -0.4836600124835968 -vn 0.0398080013692379 -0.7493849992752075 -0.6609370112419128 -vn -0.4380980134010315 -0.8398249745368958 -0.3205699920654297 -vn -0.1446219980716705 0.8584669828414917 -0.4920569956302643 -vn -0.3905079960823059 -0.8025469779968262 -0.4510230123996735 -vn -0.3789550065994263 0.7686259746551514 -0.5153710246086121 -vn -0.3518399894237518 -0.8554270267486572 -0.3800710141658783 -vn -0.5039129853248596 0.8112840056419373 -0.2964630126953125 -vn -0.4345029890537262 -0.8862379789352417 -0.1605930030345917 -vn -0.5895540118217468 0.7668499946594238 -0.2537069916725159 -vn -0.03327900171279907 -0.5302489995956421 -0.8471890091896057 -vn 0.4611240029335022 -0.5667420029640198 -0.682765007019043 -vn -0.1550759971141815 -0.4793860018253326 -0.8637940287590027 -vn -0.3325540125370026 -0.6754969954490662 -0.6581119894981384 -vn -0.624351978302002 -0.6490340232849121 -0.434671014547348 -vn -0.6404299736022949 -0.7232750058174133 -0.258307009935379 -vn 0.9793859720230103 -0.04739199951291084 -0.1963589936494827 -vn 0.8391469717025757 -0.5209720134735107 -0.1562740057706833 -vn 0.8591970205307007 -0.01306699961423874 -0.5114780068397522 -vn 0.1697809994220734 0.01797799952328205 -0.9853180050849915 -vn -0.2981239855289459 0.09316399693489075 -0.949970006942749 -vn -0.6025800108909607 0.1407950073480606 -0.785539984703064 -vn -0.7606229782104492 0.3568800091743469 -0.5422999858856201 -vn -0.9164419770240784 -0.01278399955481291 -0.3999640047550201 -vn 0.6163280010223389 0.7111549973487854 -0.3382270038127899 -vn 0.7099589705467224 0.6897799968719482 -0.1419920027256012 -vn 0.1215270012617111 0.6381019949913025 -0.7602999806404114 -vn -0.3081580102443695 0.474483996629715 -0.8245630264282227 -vn -0.5849490165710449 0.4978669881820679 -0.64028400182724 -vn -0.8313949704170227 0.3698750138282776 -0.414698988199234 -vn -0.7773889899253845 0.439754992723465 -0.4497570097446442 -vn -0.5362920165061951 0.8426259756088257 -0.04870999976992607 -vn -0.522163987159729 -0.5821229815483093 -0.6232799887657166 -vn -0.7120980024337769 0.07437700033187866 -0.6981289982795715 -vn -0.6278539896011353 0.7403159737586975 -0.2402739971876144 -vn -0.817995011806488 0.4767970144748688 -0.3217920064926147 -vn -0.7291709780693054 0.6557959914207458 -0.1955550014972687 -vn -0.9585440158843994 0.2151080071926117 -0.1868750005960464 -vn -0.9505919814109802 0.1639280021190643 -0.2636339962482452 -vn -0.8917449712753296 0.1107529997825623 -0.4387759864330292 -vn -0.9833920001983643 -0.02283000014722347 -0.1800529956817627 -vn -0.8591039776802063 0.04482100158929825 -0.5098339915275574 -vn -0.9918580055236816 -0.08783099800348282 -0.09221699833869934 -vn -0.8949530124664307 -0.4028989970684052 -0.1916570067405701 -vn -0.9036110043525696 0.009092999622225761 -0.4282569885253906 -vn -0.8893200159072876 0.0174579992890358 -0.4569520056247711 -vn -0.7315409779548645 -0.4924199879169464 -0.4715610146522522 -vn -0.7941030263900757 -0.1783780008554459 -0.5810179710388184 -vn -0.625931978225708 -0.3735530078411102 -0.6845930218696594 -vn -0.5845069885253906 -0.1848299950361252 -0.7900559902191162 -vn -0.8015180230140686 -0.1042689979076385 -0.5888090133666992 -vn -0.6420310139656067 -0.2967270016670227 -0.7069299817085266 -vn -0.8202810287475586 -0.1234560012817383 -0.5584779977798462 -vn 0.8919439911842346 0.3336179852485657 0.3051789999008179 -vn 0.6025350093841553 -0.1140210032463074 -0.7899050116539001 -vn 0.8717020153999329 -0.4864020049571991 0.05957499891519547 -vn 0.8852850198745728 -0.05170699954032898 -0.4621649980545044 -vn 0.7673349976539612 -0.6138749718666077 -0.1853519976139069 -vn 0.6157060265541077 -0.2387650012969971 -0.7509310245513916 -vn -0.1322280019521713 0.07659800350666046 -0.9882550239562988 -vn -0.1344819962978363 0.2189230024814606 -0.9664300084114075 -vn -0.08265399932861328 0.3330360054969788 -0.9392840266227722 -vn -0.7942630052566528 0.3628509938716888 -0.4873250126838684 -vn -0.686972975730896 0.5388749837875366 -0.487525999546051 -vn -0.9116560220718384 -0.2424139976501465 0.3318400084972382 -vn -0.903469979763031 -0.005853999871760607 0.4286110103130341 -vn -0.8802070021629333 0.2844929993152618 0.3798680007457733 -vn -0.3590719997882843 -0.2934069931507111 0.8859909772872925 -vn -0.5312150120735168 -0.1616500020027161 0.8316730260848999 -vn 0.5217090249061584 -0.3334519863128662 0.7852579951286316 -vn 0.4982230067253113 -0.5182120203971863 0.6951479911804199 -vn 0.319252997636795 -0.6669290065765381 0.6732640266418457 -vn 0.4172079861164093 0.602931022644043 0.6800090074539185 -vn -0.1128029972314835 -0.7670649886131287 0.6315749883651733 -vn -0.785847008228302 -0.2199160009622574 0.5779979825019836 -vn -0.3909519910812378 -0.5063920021057129 0.7685850262641907 -vn -0.6768519878387451 -0.4520730078220367 0.5809479951858521 -vn -0.07061299681663513 -0.7851079702377319 0.6153200268745422 -vn 0.4044640064239502 -0.913004994392395 0.05320600047707558 -vn 0.5100420117378235 -0.8511109948158264 0.1243719980120659 -vn 0.600862979888916 -0.7767530083656311 0.188727006316185 -vn 0.7341600060462952 -0.2982490062713623 -0.6099640130996704 -vn 0.8028540015220642 -0.2451270073652267 -0.5434499979019165 -vn 0.2039200067520142 0.286547988653183 -0.9361129999160767 -vn 0.2590579986572266 0.3469229936599731 -0.90140700340271 -vn 0.3050769865512848 0.4136070013046265 -0.857820987701416 -vn -0.3951399922370911 0.6723120212554932 -0.6259880065917969 -vn -0.3882040083408356 0.6723269820213318 -0.6302970051765442 -vn -0.8444070219993591 0.5085629820823669 0.1683440059423447 -vn -0.9073770046234131 0.4102010130882263 0.09166599810123444 -vn -0.9431279897689819 0.3317759931087494 -0.02084000036120415 -vn 0.09283199906349182 0.3405439853668213 0.9356340169906616 -vn 0.4332149922847748 0.3082599937915802 0.8469359874725342 -vn 0.07513599842786789 0.7418090105056763 0.666388988494873 -vn -0.3755930066108704 0.6224439740180969 0.6866539716720581 -vn -0.6413879990577698 0.6895880103111267 0.3362880051136017 -vn -0.3539179861545563 0.8731229901313782 0.3352580070495605 -vn -0.6627640128135681 0.7462409734725952 -0.06218799948692322 -vn -0.5455629825592041 0.6585090160369873 -0.5183889865875244 -vn -0.5422859787940979 0.2685939967632294 -0.7961050271987915 -vn -0.7763820290565491 0.4680269956588745 -0.4221160113811493 -vn -0.9955589771270752 -0.03219699859619141 -0.08845899999141693 -vn -0.7381539940834045 -0.2307370007038116 -0.633948028087616 -vn -0.433216005563736 -0.3082579970359802 -0.8469359874725342 -vn -0.7763850092887878 -0.6298570036888123 -0.02251699939370155 -vn -0.4675639867782593 -0.8743969798088074 0.1296679973602295 -vn -0.5422919988632202 -0.7174760103225708 -0.4372040033340454 -vn -0.1898339986801147 -0.8541020154953003 0.4842230081558228 -vn -0.5458049774169922 -0.7113950252532959 0.4427349865436554 -vn -0.6413909792900085 -0.3120909929275513 0.7008680105209351 -vn -0.2153560072183609 -0.6237800121307373 0.7513459920883179 -vn 0.03750099986791611 -0.724698007106781 0.6880459785461426 -vn -0.3755939900875092 -0.03544300049543381 0.9261069893836975 -vn 0.07813700288534164 -0.2686049938201904 0.9600759744644165 -vn -0.7573850154876709 0.2233279943466187 0.6135900020599365 -vn -0.902417004108429 0.4006629884243011 0.1584679931402206 -vn -0.902417004108429 -0.2050659954547882 0.3789339959621429 -vn 0.07513599842786789 0.7418090105056763 -0.666388988494873 -vn 0.4332149922847748 0.3082599937915802 -0.8469359874725342 -vn 0.09283199906349182 0.3405439853668213 -0.935634970664978 -vn -0.3755930066108704 0.6224439740180969 -0.6866539716720581 -vn -0.3539179861545563 0.8731229901313782 -0.3352569937705994 -vn -0.6413879990577698 0.6895880103111267 -0.3362880051136017 -vn -0.6627640128135681 0.7462409734725952 0.06218799948692322 -vn -0.7763820290565491 0.4680269956588745 0.4221160113811493 -vn -0.5422859787940979 0.2685939967632294 0.7961050271987915 -vn -0.5455620288848877 0.6585100293159485 0.5183889865875244 -vn -0.7381539940834045 -0.2307370007038116 0.633948028087616 -vn -0.9955589771270752 -0.03219600021839142 0.08845899999141693 -vn -0.433216005563736 -0.3082579970359802 0.8469359874725342 -vn -0.7763850092887878 -0.6298559904098511 0.02251699939370155 -vn -0.5422919988632202 -0.717477023601532 0.4372040033340454 -vn -0.4675650000572205 -0.8743969798088074 -0.1296679973602295 -vn -0.5458049774169922 -0.7113940119743347 -0.4427359998226166 -vn -0.1898339986801147 -0.8541020154953003 -0.4842230081558228 -vn -0.2153560072183609 -0.6237789988517761 -0.7513459920883179 -vn -0.6413909792900085 -0.3120909929275513 -0.7008690237998962 -vn 0.03750099986791611 -0.724698007106781 -0.6880459785461426 -vn -0.3755939900875092 -0.03544300049543381 -0.9261059761047363 -vn 0.07813599705696106 -0.2686049938201904 -0.9600759744644165 -vn -0.7573840022087097 0.2233279943466187 -0.6135900020599365 -vn -0.902417004108429 0.4006629884243011 -0.1584679931402206 -vn -0.902417004108429 -0.2050659954547882 -0.3789339959621429 - -# Mesh 'HLeib01_HLeib01_HLeib01_HLeib01' with 80 faces -g HLeib01_HLeib01_HLeib01_HLeib01 -usemtl HLeibTex -f 1/1/1 2/2/2 3/3/3 -f 4/4/4 3/3/3 5/5/5 -f 6/6/6 5/5/5 2/2/2 -f 3/3/3 2/2/2 5/5/5 -f 1/1/1 3/3/3 7/7/7 -f 8/8/8 7/7/7 9/9/9 -f 4/4/4 9/9/9 3/3/3 -f 7/7/7 3/3/3 9/9/9 -f 8/8/8 9/9/9 10/10/10 -f 11/11/11 10/10/10 12/12/12 -f 4/4/4 12/12/12 9/9/9 -f 10/10/10 9/9/9 12/12/12 -f 4/4/4 13/13/13 12/12/12 -f 11/11/11 12/12/12 14/14/14 -f 15/15/15 14/14/14 13/13/13 -f 12/12/12 13/13/13 14/14/14 -f 4/4/4 5/5/5 13/13/13 -f 15/15/15 13/13/13 16/16/16 -f 6/6/6 16/16/16 5/5/5 -f 13/13/13 5/5/5 16/16/16 -f 15/15/15 16/16/16 17/17/17 -f 18/18/18 17/17/17 19/19/19 -f 6/6/6 19/19/19 16/16/16 -f 17/17/17 16/16/16 19/19/19 -f 15/15/15 17/17/17 20/20/20 -f 21/21/21 20/20/20 22/22/22 -f 18/18/18 22/22/22 17/17/17 -f 20/20/20 17/17/17 22/22/22 -f 11/11/11 14/14/14 23/23/23 -f 21/21/21 23/23/23 20/20/20 -f 15/15/15 20/20/20 14/14/14 -f 23/23/23 14/14/14 20/20/20 -f 11/11/11 23/23/23 24/24/24 -f 25/25/25 24/24/24 26/26/26 -f 21/21/21 26/26/26 23/23/23 -f 24/24/24 23/23/23 26/26/26 -f 25/25/25 26/26/26 27/27/27 -f 28/28/28 27/27/27 29/29/29 -f 21/21/21 29/29/29 26/26/26 -f 27/27/27 26/26/26 29/29/29 -f 28/28/28 29/29/29 30/30/30 -f 18/18/18 30/30/30 22/22/22 -f 21/21/21 22/22/22 29/29/29 -f 30/30/30 29/29/29 22/22/22 -f 28/28/28 30/30/30 31/31/31 -f 32/32/32 31/31/31 33/33/33 -f 18/18/18 33/33/33 30/30/30 -f 31/31/31 30/30/30 33/33/33 -f 28/28/28 31/31/31 34/34/34 -f 35/35/35 34/34/34 36/36/36 -f 32/32/32 36/36/36 31/31/31 -f 34/34/34 31/31/31 36/36/36 -f 35/35/35 36/36/36 37/37/37 -f 1/1/1 37/37/37 38/38/38 -f 32/32/32 38/38/38 36/36/36 -f 37/37/37 36/36/36 38/38/38 -f 1/1/1 38/38/38 2/2/2 -f 6/6/6 2/2/2 39/39/39 -f 32/32/32 39/39/39 38/38/38 -f 2/2/2 38/38/38 39/39/39 -f 32/32/32 33/33/33 39/39/39 -f 6/6/6 39/39/39 19/19/19 -f 18/18/18 19/19/19 33/33/33 -f 39/39/39 33/33/33 19/19/19 -f 8/8/8 40/40/40 7/7/7 -f 1/1/1 7/7/7 37/37/37 -f 35/35/35 37/37/37 40/40/40 -f 7/7/7 40/40/40 37/37/37 -f 8/8/8 41/41/41 40/40/40 -f 35/35/35 40/40/40 42/42/42 -f 25/25/25 42/42/42 41/41/41 -f 40/40/40 41/41/41 42/42/42 -f 8/8/8 10/10/10 41/41/41 -f 25/25/25 41/41/41 24/24/24 -f 11/11/11 24/24/24 10/10/10 -f 41/41/41 10/10/10 24/24/24 -f 28/28/28 34/34/34 27/27/27 -f 25/25/25 27/27/27 42/42/42 -f 35/35/35 42/42/42 34/34/34 -f 27/27/27 34/34/34 42/42/42 - -# Mesh 'OK_OK_OK_OK' with 60 faces -g OK_OK_OK_OK -usemtl Skin -f 43/43/43 44/44/44 45/45/45 -f 46/46/46 45/45/45 47/47/47 -f 48/48/48 47/47/47 44/44/44 -f 45/45/45 44/44/44 47/47/47 -f 43/43/43 45/45/45 49/49/49 -f 50/50/50 49/49/49 51/51/51 -f 46/46/46 51/51/51 45/45/45 -f 49/49/49 45/45/45 51/51/51 -f 50/50/50 51/51/51 52/52/52 -f 53/53/53 52/52/52 54/54/54 -f 46/46/46 54/54/54 51/51/51 -f 52/52/52 51/51/51 54/54/54 -f 46/46/46 55/55/55 54/54/54 -f 53/53/53 54/54/54 56/56/56 -f 57/57/57 56/56/56 55/55/55 -f 54/54/54 55/55/55 56/56/56 -f 46/46/46 47/47/47 55/55/55 -f 57/57/57 55/55/55 58/58/58 -f 48/48/48 58/58/58 47/47/47 -f 55/55/55 47/47/47 58/58/58 -f 57/57/57 58/58/58 59/59/59 -f 60/57/60 59/59/59 61/58/61 -f 48/48/48 61/58/61 58/58/58 -f 59/59/59 58/58/58 61/58/61 -f 57/57/57 59/59/59 62/60/62 -f 63/61/63 62/60/62 64/60/64 -f 60/57/60 64/60/64 59/59/59 -f 62/60/62 59/59/59 64/60/64 -f 53/53/53 56/56/56 65/62/65 -f 63/61/63 65/62/65 62/60/62 -f 57/57/57 62/60/62 56/56/56 -f 65/62/65 56/56/56 62/60/62 -f 53/53/53 65/62/65 66/63/66 -f 67/64/67 66/63/66 68/65/68 -f 63/61/63 68/65/68 65/62/65 -f 66/63/66 65/62/65 68/65/68 -f 67/64/67 68/65/68 69/63/69 -f 70/53/70 69/63/69 71/62/71 -f 63/61/63 71/62/71 68/65/68 -f 69/63/69 68/65/68 71/62/71 -f 63/61/63 64/60/64 71/62/71 -f 43/43/43 72/49/72 73/45/73 -f 43/43/43 73/45/73 44/44/44 -f 48/48/48 44/44/44 74/47/74 -f 75/46/75 74/47/74 73/45/73 -f 44/44/44 73/45/73 74/47/74 -f 48/48/48 74/47/74 61/58/61 -f 50/50/50 76/66/76 49/49/49 -f 43/43/43 49/49/49 72/49/72 -f 77/50/77 72/49/72 76/66/76 -f 49/49/49 76/66/76 72/49/72 -f 50/50/50 78/67/78 76/66/76 -f 77/50/77 76/66/76 79/67/79 -f 67/64/67 79/67/79 78/67/78 -f 76/66/76 78/67/78 79/67/79 -f 50/50/50 52/52/52 78/67/78 -f 67/64/67 78/67/78 66/63/66 -f 53/53/53 66/63/66 52/52/52 -f 78/67/78 52/52/52 66/63/66 -f 67/64/67 69/63/69 79/67/79 - -# Mesh 'Bein1Li_Bein1Li_Bein1Li_Bein1Li' with 98 faces -g Bein1Li_Bein1Li_Bein1Li_Bein1Li -usemtl BeinTex -f 80/68/80 81/68/80 82/68/80 -f 83/68/81 84/68/81 85/68/81 -f 80/69/82 86/70/83 87/71/84 -f 80/69/82 87/71/84 81/72/85 -f 86/70/83 88/73/86 87/71/84 -f 88/73/86 89/74/87 87/71/84 -f 88/73/86 90/75/88 91/76/89 -f 88/73/86 91/76/89 89/74/87 -f 90/75/88 92/77/90 91/76/89 -f 92/77/90 93/78/91 91/76/89 -f 92/77/90 94/79/92 95/80/93 -f 92/77/90 95/80/93 93/78/91 -f 94/79/92 83/68/94 95/80/93 -f 83/68/94 85/81/95 95/80/93 -f 81/68/80 96/68/80 82/68/80 -f 85/68/81 84/68/81 97/68/81 -f 81/72/85 87/71/84 96/82/96 -f 87/71/84 98/83/97 96/82/96 -f 87/71/84 89/74/87 99/84/98 -f 87/71/84 99/84/98 98/83/97 -f 89/74/87 91/76/89 99/84/98 -f 91/76/89 100/85/99 99/84/98 -f 91/76/89 93/78/91 101/86/100 -f 91/76/89 101/86/100 100/85/99 -f 93/78/91 95/80/93 101/86/100 -f 95/80/93 102/87/101 101/86/100 -f 95/80/93 85/81/95 97/88/102 -f 95/80/93 97/88/102 102/87/101 -f 96/68/80 103/68/80 82/68/80 -f 97/68/81 84/68/81 104/68/81 -f 96/82/96 98/83/97 105/89/103 -f 96/82/96 105/89/103 103/90/104 -f 98/83/97 99/84/98 105/89/103 -f 99/84/98 106/91/105 105/89/103 -f 99/84/98 100/85/99 107/92/106 -f 99/84/98 107/92/106 106/91/105 -f 100/85/99 101/86/100 107/92/106 -f 101/86/100 108/93/107 107/92/106 -f 101/86/100 102/87/101 109/94/108 -f 101/86/100 109/94/108 108/93/107 -f 102/87/101 97/88/102 109/94/108 -f 97/88/102 104/95/109 109/94/108 -f 103/68/80 110/68/80 82/68/80 -f 104/68/81 84/68/81 111/68/81 -f 103/90/104 105/89/103 110/96/110 -f 105/89/103 112/97/111 110/96/110 -f 105/89/103 106/91/105 113/98/112 -f 105/89/103 113/98/112 112/97/111 -f 106/91/105 107/92/106 113/98/112 -f 107/92/106 114/99/113 113/98/112 -f 107/92/106 108/93/107 115/100/114 -f 107/92/106 115/100/114 114/99/113 -f 108/93/107 109/94/108 115/100/114 -f 109/94/108 116/101/115 115/100/114 -f 109/94/108 104/95/109 111/102/116 -f 109/94/108 111/102/116 116/101/115 -f 110/68/80 117/68/80 82/68/80 -f 111/68/81 84/68/81 118/68/81 -f 110/96/110 112/97/111 119/103/117 -f 110/96/110 119/103/117 117/104/118 -f 112/97/111 113/98/112 119/103/117 -f 113/98/112 120/105/119 119/103/117 -f 113/98/112 114/99/113 121/106/120 -f 113/98/112 121/106/120 120/105/119 -f 114/99/113 115/100/114 121/106/120 -f 115/100/114 122/107/121 121/106/120 -f 115/100/114 116/101/115 123/108/122 -f 115/100/114 123/108/122 122/107/121 -f 116/101/115 111/102/116 123/108/122 -f 111/102/116 118/109/123 123/108/122 -f 117/68/80 124/68/80 82/68/80 -f 118/68/81 84/68/81 125/68/81 -f 117/104/118 119/103/117 124/110/124 -f 119/103/117 126/111/125 124/110/124 -f 119/103/117 120/105/119 127/112/126 -f 119/103/117 127/112/126 126/111/125 -f 120/105/119 121/106/120 127/112/126 -f 121/106/120 128/113/127 127/112/126 -f 121/106/120 122/107/121 129/114/128 -f 121/106/120 129/114/128 128/113/127 -f 122/107/121 123/108/122 129/114/128 -f 123/108/122 130/115/129 129/114/128 -f 123/108/122 118/109/123 125/116/130 -f 123/108/122 125/116/130 130/115/129 -f 124/68/80 80/68/80 82/68/80 -f 125/68/81 84/68/81 83/68/81 -f 124/110/124 126/111/125 86/117/83 -f 124/110/124 86/117/83 80/118/82 -f 126/111/125 127/112/126 86/117/83 -f 127/112/126 88/119/86 86/117/83 -f 127/112/126 128/113/127 90/120/88 -f 127/112/126 90/120/88 88/119/86 -f 128/113/127 129/114/128 90/120/88 -f 129/114/128 92/121/90 90/120/88 -f 129/114/128 130/115/129 94/122/92 -f 129/114/128 94/122/92 92/121/90 -f 130/115/129 125/116/130 94/122/92 -f 125/116/130 83/123/94 94/122/92 - -# Mesh 'Bein1Re_Bein1Re_Bein1Re_Bein1Re' with 98 faces -g Bein1Re_Bein1Re_Bein1Re_Bein1Re -usemtl BeinTex -f 131/68/131 132/68/131 133/68/131 -f 134/68/132 135/68/132 136/68/132 -f 137/71/133 138/70/134 133/69/135 -f 132/72/136 137/71/133 133/69/135 -f 137/71/133 139/73/137 138/70/134 -f 137/71/133 140/74/138 139/73/137 -f 141/76/139 142/75/140 139/73/137 -f 140/74/138 141/76/139 139/73/137 -f 141/76/139 143/77/141 142/75/140 -f 141/76/139 144/78/142 143/77/141 -f 145/80/143 146/79/144 143/77/141 -f 144/78/142 145/80/143 143/77/141 -f 145/80/143 136/68/145 146/79/144 -f 145/80/143 134/81/146 136/68/145 -f 131/68/131 147/68/131 132/68/131 -f 148/68/132 135/68/132 134/68/132 -f 147/82/147 137/71/133 132/72/136 -f 147/82/147 149/83/148 137/71/133 -f 150/84/149 140/74/138 137/71/133 -f 149/83/148 150/84/149 137/71/133 -f 150/84/149 141/76/139 140/74/138 -f 150/84/149 151/85/150 141/76/139 -f 152/86/151 144/78/142 141/76/139 -f 151/85/150 152/86/151 141/76/139 -f 152/86/151 145/80/143 144/78/142 -f 152/86/151 153/87/152 145/80/143 -f 148/88/153 134/81/146 145/80/143 -f 153/87/152 148/88/153 145/80/143 -f 131/68/131 154/68/131 147/68/131 -f 155/68/132 135/68/132 148/68/132 -f 156/89/154 149/83/148 147/82/147 -f 154/90/155 156/89/154 147/82/147 -f 156/89/154 150/84/149 149/83/148 -f 156/89/154 157/91/156 150/84/149 -f 158/92/157 151/85/150 150/84/149 -f 157/91/156 158/92/157 150/84/149 -f 158/92/157 152/86/151 151/85/150 -f 158/92/157 159/93/158 152/86/151 -f 160/94/159 153/87/152 152/86/151 -f 159/93/158 160/94/159 152/86/151 -f 160/94/159 148/88/153 153/87/152 -f 160/94/159 155/95/160 148/88/153 -f 131/68/131 161/68/131 154/68/131 -f 162/68/132 135/68/132 155/68/132 -f 161/96/161 156/89/154 154/90/155 -f 161/96/161 163/97/162 156/89/154 -f 164/98/163 157/91/156 156/89/154 -f 163/97/162 164/98/163 156/89/154 -f 164/98/163 158/92/157 157/91/156 -f 164/98/163 165/99/164 158/92/157 -f 166/100/165 159/93/158 158/92/157 -f 165/99/164 166/100/165 158/92/157 -f 166/100/165 160/94/159 159/93/158 -f 166/100/165 167/101/166 160/94/159 -f 162/102/167 155/95/160 160/94/159 -f 167/101/166 162/102/167 160/94/159 -f 131/68/131 168/68/131 161/68/131 -f 169/68/132 135/68/132 162/68/132 -f 170/103/168 163/97/162 161/96/161 -f 168/104/169 170/103/168 161/96/161 -f 170/103/168 164/98/163 163/97/162 -f 170/103/168 171/105/170 164/98/163 -f 172/106/171 165/99/164 164/98/163 -f 171/105/170 172/106/171 164/98/163 -f 172/106/171 166/100/165 165/99/164 -f 172/106/171 173/107/172 166/100/165 -f 174/108/173 167/101/166 166/100/165 -f 173/107/172 174/108/173 166/100/165 -f 174/108/173 162/102/167 167/101/166 -f 174/108/173 169/109/174 162/102/167 -f 131/68/131 175/68/131 168/68/131 -f 176/68/132 135/68/132 169/68/132 -f 175/110/175 170/103/168 168/104/169 -f 175/110/175 177/111/176 170/103/168 -f 178/112/177 171/105/170 170/103/168 -f 177/111/176 178/112/177 170/103/168 -f 178/112/177 172/106/171 171/105/170 -f 178/112/177 179/113/178 172/106/171 -f 180/114/179 173/107/172 172/106/171 -f 179/113/178 180/114/179 172/106/171 -f 180/114/179 174/108/173 173/107/172 -f 180/114/179 181/115/180 174/108/173 -f 176/116/181 169/109/174 174/108/173 -f 181/115/180 176/116/181 174/108/173 -f 131/68/131 133/68/131 175/68/131 -f 136/68/132 135/68/132 176/68/132 -f 138/117/134 177/111/176 175/110/175 -f 133/118/135 138/117/134 175/110/175 -f 138/117/134 178/112/177 177/111/176 -f 138/117/134 139/119/137 178/112/177 -f 142/120/140 179/113/178 178/112/177 -f 139/119/137 142/120/140 178/112/177 -f 142/120/140 180/114/179 179/113/178 -f 142/120/140 143/121/141 180/114/179 -f 146/122/144 181/115/180 180/114/179 -f 143/121/141 146/122/144 180/114/179 -f 146/122/144 176/116/181 181/115/180 -f 146/122/144 136/123/145 176/116/181 - -# Mesh 'Bein2Li_Bein2Li_Bein2Li_Bein2Li' with 98 faces -g Bein2Li_Bein2Li_Bein2Li_Bein2Li -usemtl BeinTex -f 182/68/182 183/68/182 184/68/182 -f 185/68/183 186/68/183 187/68/183 -f 182/69/184 188/70/185 189/71/186 -f 182/69/184 189/71/186 183/72/187 -f 188/70/185 190/73/188 189/71/186 -f 190/73/188 191/74/189 189/71/186 -f 190/73/188 192/75/190 193/76/191 -f 190/73/188 193/76/191 191/74/189 -f 192/75/190 194/77/192 193/76/191 -f 194/77/192 195/78/193 193/76/191 -f 194/77/192 196/79/194 197/80/195 -f 194/77/192 197/80/195 195/78/193 -f 196/79/194 185/68/196 197/80/195 -f 185/68/196 187/81/197 197/80/195 -f 183/68/182 198/68/182 184/68/182 -f 187/68/183 186/68/183 199/68/183 -f 183/72/187 189/71/186 198/82/198 -f 189/71/186 200/83/199 198/82/198 -f 189/71/186 191/74/189 201/84/200 -f 189/71/186 201/84/200 200/83/199 -f 191/74/189 193/76/191 201/84/200 -f 193/76/191 202/85/201 201/84/200 -f 193/76/191 195/78/193 203/86/202 -f 193/76/191 203/86/202 202/85/201 -f 195/78/193 197/80/195 203/86/202 -f 197/80/195 204/87/203 203/86/202 -f 197/80/195 187/81/197 199/88/204 -f 197/80/195 199/88/204 204/87/203 -f 198/68/182 205/68/182 184/68/182 -f 199/68/183 186/68/183 206/68/183 -f 198/82/198 200/83/199 207/89/205 -f 198/82/198 207/89/205 205/90/206 -f 200/83/199 201/84/200 207/89/205 -f 201/84/200 208/91/207 207/89/205 -f 201/84/200 202/85/201 209/92/208 -f 201/84/200 209/92/208 208/91/207 -f 202/85/201 203/86/202 209/92/208 -f 203/86/202 210/93/209 209/92/208 -f 203/86/202 204/87/203 211/94/210 -f 203/86/202 211/94/210 210/93/209 -f 204/87/203 199/88/204 211/94/210 -f 199/88/204 206/95/211 211/94/210 -f 205/68/182 212/68/182 184/68/182 -f 206/68/183 186/68/183 213/68/183 -f 205/90/206 207/89/205 212/96/212 -f 207/89/205 214/97/213 212/96/212 -f 207/89/205 208/91/207 215/98/214 -f 207/89/205 215/98/214 214/97/213 -f 208/91/207 209/92/208 215/98/214 -f 209/92/208 216/99/215 215/98/214 -f 209/92/208 210/93/209 217/100/216 -f 209/92/208 217/100/216 216/99/215 -f 210/93/209 211/94/210 217/100/216 -f 211/94/210 218/101/217 217/100/216 -f 211/94/210 206/95/211 213/102/218 -f 211/94/210 213/102/218 218/101/217 -f 212/68/182 219/68/182 184/68/182 -f 213/68/183 186/68/183 220/68/183 -f 212/96/212 214/97/213 221/103/219 -f 212/96/212 221/103/219 219/104/220 -f 214/97/213 215/98/214 221/103/219 -f 215/98/214 222/105/221 221/103/219 -f 215/98/214 216/99/215 223/106/222 -f 215/98/214 223/106/222 222/105/221 -f 216/99/215 217/100/216 223/106/222 -f 217/100/216 224/107/223 223/106/222 -f 217/100/216 218/101/217 225/108/224 -f 217/100/216 225/108/224 224/107/223 -f 218/101/217 213/102/218 225/108/224 -f 213/102/218 220/109/225 225/108/224 -f 219/68/182 226/68/182 184/68/182 -f 220/68/183 186/68/183 227/68/183 -f 219/104/220 221/103/219 226/110/226 -f 221/103/219 228/111/227 226/110/226 -f 221/103/219 222/105/221 229/112/228 -f 221/103/219 229/112/228 228/111/227 -f 222/105/221 223/106/222 229/112/228 -f 223/106/222 230/113/229 229/112/228 -f 223/106/222 224/107/223 231/114/230 -f 223/106/222 231/114/230 230/113/229 -f 224/107/223 225/108/224 231/114/230 -f 225/108/224 232/115/231 231/114/230 -f 225/108/224 220/109/225 227/116/232 -f 225/108/224 227/116/232 232/115/231 -f 226/68/182 182/68/182 184/68/182 -f 227/68/183 186/68/183 185/68/183 -f 226/110/226 228/111/227 188/117/185 -f 226/110/226 188/117/185 182/118/184 -f 228/111/227 229/112/228 188/117/185 -f 229/112/228 190/119/188 188/117/185 -f 229/112/228 230/113/229 192/120/190 -f 229/112/228 192/120/190 190/119/188 -f 230/113/229 231/114/230 192/120/190 -f 231/114/230 194/121/192 192/120/190 -f 231/114/230 232/115/231 196/122/194 -f 231/114/230 196/122/194 194/121/192 -f 232/115/231 227/116/232 196/122/194 -f 227/116/232 185/123/196 196/122/194 - -# Mesh 'Bein2Re_Bein2Re_Bein2Re_Bein2Re' with 98 faces -g Bein2Re_Bein2Re_Bein2Re_Bein2Re -usemtl BeinTex -f 233/68/233 234/68/233 235/68/233 -f 236/68/234 237/68/234 238/68/234 -f 239/71/235 240/70/236 235/69/237 -f 234/72/238 239/71/235 235/69/237 -f 239/71/235 241/73/239 240/70/236 -f 239/71/235 242/74/240 241/73/239 -f 243/76/241 244/75/242 241/73/239 -f 242/74/240 243/76/241 241/73/239 -f 243/76/241 245/77/243 244/75/242 -f 243/76/241 246/78/244 245/77/243 -f 247/80/245 248/79/246 245/77/243 -f 246/78/244 247/80/245 245/77/243 -f 247/80/245 238/68/247 248/79/246 -f 247/80/245 236/81/248 238/68/247 -f 233/68/233 249/68/233 234/68/233 -f 250/68/234 237/68/234 236/68/234 -f 249/82/249 239/71/235 234/72/238 -f 249/82/249 251/83/250 239/71/235 -f 252/84/251 242/74/240 239/71/235 -f 251/83/250 252/84/251 239/71/235 -f 252/84/251 243/76/241 242/74/240 -f 252/84/251 253/85/252 243/76/241 -f 254/86/253 246/78/244 243/76/241 -f 253/85/252 254/86/253 243/76/241 -f 254/86/253 247/80/245 246/78/244 -f 254/86/253 255/87/254 247/80/245 -f 250/88/255 236/81/248 247/80/245 -f 255/87/254 250/88/255 247/80/245 -f 233/68/233 256/68/233 249/68/233 -f 257/68/234 237/68/234 250/68/234 -f 258/89/256 251/83/250 249/82/249 -f 256/90/257 258/89/256 249/82/249 -f 258/89/256 252/84/251 251/83/250 -f 258/89/256 259/91/258 252/84/251 -f 260/92/259 253/85/252 252/84/251 -f 259/91/258 260/92/259 252/84/251 -f 260/92/259 254/86/253 253/85/252 -f 260/92/259 261/93/260 254/86/253 -f 262/94/261 255/87/254 254/86/253 -f 261/93/260 262/94/261 254/86/253 -f 262/94/261 250/88/255 255/87/254 -f 262/94/261 257/95/262 250/88/255 -f 233/68/233 263/68/233 256/68/233 -f 264/68/234 237/68/234 257/68/234 -f 263/96/263 258/89/256 256/90/257 -f 263/96/263 265/97/264 258/89/256 -f 266/98/265 259/91/258 258/89/256 -f 265/97/264 266/98/265 258/89/256 -f 266/98/265 260/92/259 259/91/258 -f 266/98/265 267/99/266 260/92/259 -f 268/100/267 261/93/260 260/92/259 -f 267/99/266 268/100/267 260/92/259 -f 268/100/267 262/94/261 261/93/260 -f 268/100/267 269/101/268 262/94/261 -f 264/102/269 257/95/262 262/94/261 -f 269/101/268 264/102/269 262/94/261 -f 233/68/233 270/68/233 263/68/233 -f 271/68/234 237/68/234 264/68/234 -f 272/103/270 265/97/264 263/96/263 -f 270/104/271 272/103/270 263/96/263 -f 272/103/270 266/98/265 265/97/264 -f 272/103/270 273/105/272 266/98/265 -f 274/106/273 267/99/266 266/98/265 -f 273/105/272 274/106/273 266/98/265 -f 274/106/273 268/100/267 267/99/266 -f 274/106/273 275/107/274 268/100/267 -f 276/108/275 269/101/268 268/100/267 -f 275/107/274 276/108/275 268/100/267 -f 276/108/275 264/102/269 269/101/268 -f 276/108/275 271/109/276 264/102/269 -f 233/68/233 277/68/233 270/68/233 -f 278/68/234 237/68/234 271/68/234 -f 277/110/277 272/103/270 270/104/271 -f 277/110/277 279/111/278 272/103/270 -f 280/112/279 273/105/272 272/103/270 -f 279/111/278 280/112/279 272/103/270 -f 280/112/279 274/106/273 273/105/272 -f 280/112/279 281/113/280 274/106/273 -f 282/114/281 275/107/274 274/106/273 -f 281/113/280 282/114/281 274/106/273 -f 282/114/281 276/108/275 275/107/274 -f 282/114/281 283/115/282 276/108/275 -f 278/116/283 271/109/276 276/108/275 -f 283/115/282 278/116/283 276/108/275 -f 233/68/233 235/68/233 277/68/233 -f 238/68/234 237/68/234 278/68/234 -f 240/117/236 279/111/278 277/110/277 -f 235/118/237 240/117/236 277/110/277 -f 240/117/236 280/112/279 279/111/278 -f 240/117/236 241/119/239 280/112/279 -f 244/120/242 281/113/280 280/112/279 -f 241/119/239 244/120/242 280/112/279 -f 244/120/242 282/114/281 281/113/280 -f 244/120/242 245/121/243 282/114/281 -f 248/122/246 283/115/282 282/114/281 -f 245/121/243 248/122/246 282/114/281 -f 248/122/246 278/116/283 283/115/282 -f 248/122/246 238/123/247 278/116/283 - -# Mesh 'Bein3Re_Bein3Re_Bein3Re_Bein3Re' with 98 faces -g Bein3Re_Bein3Re_Bein3Re_Bein3Re -usemtl BeinTex -f 284/68/284 285/68/284 286/68/284 -f 287/68/285 288/68/285 289/68/285 -f 290/71/286 291/70/287 286/69/288 -f 285/72/289 290/71/286 286/69/288 -f 290/71/286 292/73/290 291/70/287 -f 290/71/286 293/74/291 292/73/290 -f 294/76/292 295/75/293 292/73/290 -f 293/74/291 294/76/292 292/73/290 -f 294/76/292 296/77/294 295/75/293 -f 294/76/292 297/78/295 296/77/294 -f 298/80/296 299/79/297 296/77/294 -f 297/78/295 298/80/296 296/77/294 -f 298/80/296 289/68/298 299/79/297 -f 298/80/296 287/81/299 289/68/298 -f 284/68/284 300/68/284 285/68/284 -f 301/68/285 288/68/285 287/68/285 -f 300/82/300 290/71/286 285/72/289 -f 300/82/300 302/83/301 290/71/286 -f 303/84/302 293/74/291 290/71/286 -f 302/83/301 303/84/302 290/71/286 -f 303/84/302 294/76/292 293/74/291 -f 303/84/302 304/85/303 294/76/292 -f 305/86/304 297/78/295 294/76/292 -f 304/85/303 305/86/304 294/76/292 -f 305/86/304 298/80/296 297/78/295 -f 305/86/304 306/87/305 298/80/296 -f 301/88/306 287/81/299 298/80/296 -f 306/87/305 301/88/306 298/80/296 -f 284/68/284 307/68/284 300/68/284 -f 308/68/285 288/68/285 301/68/285 -f 309/89/307 302/83/301 300/82/300 -f 307/90/308 309/89/307 300/82/300 -f 309/89/307 303/84/302 302/83/301 -f 309/89/307 310/91/309 303/84/302 -f 311/92/310 304/85/303 303/84/302 -f 310/91/309 311/92/310 303/84/302 -f 311/92/310 305/86/304 304/85/303 -f 311/92/310 312/93/311 305/86/304 -f 313/94/312 306/87/305 305/86/304 -f 312/93/311 313/94/312 305/86/304 -f 313/94/312 301/88/306 306/87/305 -f 313/94/312 308/95/313 301/88/306 -f 284/68/284 314/68/284 307/68/284 -f 315/68/285 288/68/285 308/68/285 -f 314/96/314 309/89/307 307/90/308 -f 314/96/314 316/97/315 309/89/307 -f 317/98/316 310/91/309 309/89/307 -f 316/97/315 317/98/316 309/89/307 -f 317/98/316 311/92/310 310/91/309 -f 317/98/316 318/99/317 311/92/310 -f 319/100/318 312/93/311 311/92/310 -f 318/99/317 319/100/318 311/92/310 -f 319/100/318 313/94/312 312/93/311 -f 319/100/318 320/101/319 313/94/312 -f 315/102/320 308/95/313 313/94/312 -f 320/101/319 315/102/320 313/94/312 -f 284/68/284 321/68/284 314/68/284 -f 322/68/285 288/68/285 315/68/285 -f 323/103/321 316/97/315 314/96/314 -f 321/104/322 323/103/321 314/96/314 -f 323/103/321 317/98/316 316/97/315 -f 323/103/321 324/105/323 317/98/316 -f 325/106/324 318/99/317 317/98/316 -f 324/105/323 325/106/324 317/98/316 -f 325/106/324 319/100/318 318/99/317 -f 325/106/324 326/107/325 319/100/318 -f 327/108/326 320/101/319 319/100/318 -f 326/107/325 327/108/326 319/100/318 -f 327/108/326 315/102/320 320/101/319 -f 327/108/326 322/109/327 315/102/320 -f 284/68/284 328/68/284 321/68/284 -f 329/68/285 288/68/285 322/68/285 -f 328/110/328 323/103/321 321/104/322 -f 328/110/328 330/111/329 323/103/321 -f 331/112/330 324/105/323 323/103/321 -f 330/111/329 331/112/330 323/103/321 -f 331/112/330 325/106/324 324/105/323 -f 331/112/330 332/113/331 325/106/324 -f 333/114/332 326/107/325 325/106/324 -f 332/113/331 333/114/332 325/106/324 -f 333/114/332 327/108/326 326/107/325 -f 333/114/332 334/115/333 327/108/326 -f 329/116/334 322/109/327 327/108/326 -f 334/115/333 329/116/334 327/108/326 -f 284/68/284 286/68/284 328/68/284 -f 289/68/285 288/68/285 329/68/285 -f 291/117/287 330/111/329 328/110/328 -f 286/118/288 291/117/287 328/110/328 -f 291/117/287 331/112/330 330/111/329 -f 291/117/287 292/119/290 331/112/330 -f 295/120/293 332/113/331 331/112/330 -f 292/119/290 295/120/293 331/112/330 -f 295/120/293 333/114/332 332/113/331 -f 295/120/293 296/121/294 333/114/332 -f 299/122/297 334/115/333 333/114/332 -f 296/121/294 299/122/297 333/114/332 -f 299/122/297 329/116/334 334/115/333 -f 299/122/297 289/123/298 329/116/334 - -# Mesh 'Bein3Li_Bein3Li_Bein3Li_Bein3Li' with 98 faces -g Bein3Li_Bein3Li_Bein3Li_Bein3Li -usemtl BeinTex -f 335/68/335 336/68/335 337/68/335 -f 338/68/336 339/68/336 340/68/336 -f 335/69/337 341/70/338 342/71/339 -f 335/69/337 342/71/339 336/72/340 -f 341/70/338 343/73/341 342/71/339 -f 343/73/341 344/74/342 342/71/339 -f 343/73/341 345/75/343 346/76/344 -f 343/73/341 346/76/344 344/74/342 -f 345/75/343 347/77/345 346/76/344 -f 347/77/345 348/78/346 346/76/344 -f 347/77/345 349/79/347 350/80/348 -f 347/77/345 350/80/348 348/78/346 -f 349/79/347 338/68/349 350/80/348 -f 338/68/349 340/81/350 350/80/348 -f 336/68/335 351/68/335 337/68/335 -f 340/68/336 339/68/336 352/68/336 -f 336/72/340 342/71/339 351/82/351 -f 342/71/339 353/83/352 351/82/351 -f 342/71/339 344/74/342 354/84/353 -f 342/71/339 354/84/353 353/83/352 -f 344/74/342 346/76/344 354/84/353 -f 346/76/344 355/85/354 354/84/353 -f 346/76/344 348/78/346 356/86/355 -f 346/76/344 356/86/355 355/85/354 -f 348/78/346 350/80/348 356/86/355 -f 350/80/348 357/87/356 356/86/355 -f 350/80/348 340/81/350 352/88/357 -f 350/80/348 352/88/357 357/87/356 -f 351/68/335 358/68/335 337/68/335 -f 352/68/336 339/68/336 359/68/336 -f 351/82/351 353/83/352 360/89/358 -f 351/82/351 360/89/358 358/90/359 -f 353/83/352 354/84/353 360/89/358 -f 354/84/353 361/91/360 360/89/358 -f 354/84/353 355/85/354 362/92/361 -f 354/84/353 362/92/361 361/91/360 -f 355/85/354 356/86/355 362/92/361 -f 356/86/355 363/93/362 362/92/361 -f 356/86/355 357/87/356 364/94/363 -f 356/86/355 364/94/363 363/93/362 -f 357/87/356 352/88/357 364/94/363 -f 352/88/357 359/95/364 364/94/363 -f 358/68/335 365/68/335 337/68/335 -f 359/68/336 339/68/336 366/68/336 -f 358/90/359 360/89/358 365/96/365 -f 360/89/358 367/97/366 365/96/365 -f 360/89/358 361/91/360 368/98/367 -f 360/89/358 368/98/367 367/97/366 -f 361/91/360 362/92/361 368/98/367 -f 362/92/361 369/99/368 368/98/367 -f 362/92/361 363/93/362 370/100/369 -f 362/92/361 370/100/369 369/99/368 -f 363/93/362 364/94/363 370/100/369 -f 364/94/363 371/101/370 370/100/369 -f 364/94/363 359/95/364 366/102/371 -f 364/94/363 366/102/371 371/101/370 -f 365/68/335 372/68/335 337/68/335 -f 366/68/336 339/68/336 373/68/336 -f 365/96/365 367/97/366 374/103/372 -f 365/96/365 374/103/372 372/104/373 -f 367/97/366 368/98/367 374/103/372 -f 368/98/367 375/105/374 374/103/372 -f 368/98/367 369/99/368 376/106/375 -f 368/98/367 376/106/375 375/105/374 -f 369/99/368 370/100/369 376/106/375 -f 370/100/369 377/107/376 376/106/375 -f 370/100/369 371/101/370 378/108/377 -f 370/100/369 378/108/377 377/107/376 -f 371/101/370 366/102/371 378/108/377 -f 366/102/371 373/109/378 378/108/377 -f 372/68/335 379/68/335 337/68/335 -f 373/68/336 339/68/336 380/68/336 -f 372/104/373 374/103/372 379/110/379 -f 374/103/372 381/111/380 379/110/379 -f 374/103/372 375/105/374 382/112/381 -f 374/103/372 382/112/381 381/111/380 -f 375/105/374 376/106/375 382/112/381 -f 376/106/375 383/113/382 382/112/381 -f 376/106/375 377/107/376 384/114/383 -f 376/106/375 384/114/383 383/113/382 -f 377/107/376 378/108/377 384/114/383 -f 378/108/377 385/115/384 384/114/383 -f 378/108/377 373/109/378 380/116/385 -f 378/108/377 380/116/385 385/115/384 -f 379/68/335 335/68/335 337/68/335 -f 380/68/336 339/68/336 338/68/336 -f 379/110/379 381/111/380 341/117/338 -f 379/110/379 341/117/338 335/118/337 -f 381/111/380 382/112/381 341/117/338 -f 382/112/381 343/119/341 341/117/338 -f 382/112/381 383/113/382 345/120/343 -f 382/112/381 345/120/343 343/119/341 -f 383/113/382 384/114/383 345/120/343 -f 384/114/383 347/121/345 345/120/343 -f 384/114/383 385/115/384 349/122/347 -f 384/114/383 349/122/347 347/121/345 -f 385/115/384 380/116/385 349/122/347 -f 380/116/385 338/123/349 349/122/347 - -# Mesh 'Bein4Re_Bein4Re_Bein4Re_Bein4Re' with 98 faces -g Bein4Re_Bein4Re_Bein4Re_Bein4Re -usemtl BeinTex -f 386/68/386 387/68/386 388/68/386 -f 389/68/387 390/68/387 391/68/387 -f 392/71/388 393/70/389 388/69/390 -f 387/72/391 392/71/388 388/69/390 -f 392/71/388 394/73/392 393/70/389 -f 392/71/388 395/74/393 394/73/392 -f 396/76/394 397/75/395 394/73/392 -f 395/74/393 396/76/394 394/73/392 -f 396/76/394 398/77/396 397/75/395 -f 396/76/394 399/78/397 398/77/396 -f 400/80/398 401/79/399 398/77/396 -f 399/78/397 400/80/398 398/77/396 -f 400/80/398 391/68/400 401/79/399 -f 400/80/398 389/81/401 391/68/400 -f 386/68/386 402/68/386 387/68/386 -f 403/68/387 390/68/387 389/68/387 -f 402/82/402 392/71/388 387/72/391 -f 402/82/402 404/83/403 392/71/388 -f 405/84/404 395/74/393 392/71/388 -f 404/83/403 405/84/404 392/71/388 -f 405/84/404 396/76/394 395/74/393 -f 405/84/404 406/85/405 396/76/394 -f 407/86/406 399/78/397 396/76/394 -f 406/85/405 407/86/406 396/76/394 -f 407/86/406 400/80/398 399/78/397 -f 407/86/406 408/87/407 400/80/398 -f 403/88/408 389/81/401 400/80/398 -f 408/87/407 403/88/408 400/80/398 -f 386/68/386 409/68/386 402/68/386 -f 410/68/387 390/68/387 403/68/387 -f 411/89/409 404/83/403 402/82/402 -f 409/90/410 411/89/409 402/82/402 -f 411/89/409 405/84/404 404/83/403 -f 411/89/409 412/91/411 405/84/404 -f 413/92/412 406/85/405 405/84/404 -f 412/91/411 413/92/412 405/84/404 -f 413/92/412 407/86/406 406/85/405 -f 413/92/412 414/93/413 407/86/406 -f 415/94/414 408/87/407 407/86/406 -f 414/93/413 415/94/414 407/86/406 -f 415/94/414 403/88/408 408/87/407 -f 415/94/414 410/95/415 403/88/408 -f 386/68/386 416/68/386 409/68/386 -f 417/68/387 390/68/387 410/68/387 -f 416/96/416 411/89/409 409/90/410 -f 416/96/416 418/97/417 411/89/409 -f 419/98/418 412/91/411 411/89/409 -f 418/97/417 419/98/418 411/89/409 -f 419/98/418 413/92/412 412/91/411 -f 419/98/418 420/99/419 413/92/412 -f 421/100/420 414/93/413 413/92/412 -f 420/99/419 421/100/420 413/92/412 -f 421/100/420 415/94/414 414/93/413 -f 421/100/420 422/101/421 415/94/414 -f 417/102/422 410/95/415 415/94/414 -f 422/101/421 417/102/422 415/94/414 -f 386/68/386 423/68/386 416/68/386 -f 424/68/387 390/68/387 417/68/387 -f 425/103/423 418/97/417 416/96/416 -f 423/104/424 425/103/423 416/96/416 -f 425/103/423 419/98/418 418/97/417 -f 425/103/423 426/105/425 419/98/418 -f 427/106/426 420/99/419 419/98/418 -f 426/105/425 427/106/426 419/98/418 -f 427/106/426 421/100/420 420/99/419 -f 427/106/426 428/107/427 421/100/420 -f 429/108/428 422/101/421 421/100/420 -f 428/107/427 429/108/428 421/100/420 -f 429/108/428 417/102/422 422/101/421 -f 429/108/428 424/109/429 417/102/422 -f 386/68/386 430/68/386 423/68/386 -f 431/68/387 390/68/387 424/68/387 -f 430/110/430 425/103/423 423/104/424 -f 430/110/430 432/111/431 425/103/423 -f 433/112/432 426/105/425 425/103/423 -f 432/111/431 433/112/432 425/103/423 -f 433/112/432 427/106/426 426/105/425 -f 433/112/432 434/113/433 427/106/426 -f 435/114/434 428/107/427 427/106/426 -f 434/113/433 435/114/434 427/106/426 -f 435/114/434 429/108/428 428/107/427 -f 435/114/434 436/115/435 429/108/428 -f 431/116/436 424/109/429 429/108/428 -f 436/115/435 431/116/436 429/108/428 -f 386/68/386 388/68/386 430/68/386 -f 391/68/387 390/68/387 431/68/387 -f 393/117/389 432/111/431 430/110/430 -f 388/118/390 393/117/389 430/110/430 -f 393/117/389 433/112/432 432/111/431 -f 393/117/389 394/119/392 433/112/432 -f 397/120/395 434/113/433 433/112/432 -f 394/119/392 397/120/395 433/112/432 -f 397/120/395 435/114/434 434/113/433 -f 397/120/395 398/121/396 435/114/434 -f 401/122/399 436/115/435 435/114/434 -f 398/121/396 401/122/399 435/114/434 -f 401/122/399 431/116/436 436/115/435 -f 401/122/399 391/123/400 431/116/436 - -# Mesh 'Bein4Li_Bein4Li_Bein4Li_Bein4Li' with 98 faces -g Bein4Li_Bein4Li_Bein4Li_Bein4Li -usemtl BeinTex -f 437/68/437 438/68/437 439/68/437 -f 440/68/438 441/68/438 442/68/438 -f 437/69/439 443/70/440 444/71/441 -f 437/69/439 444/71/441 438/72/442 -f 443/70/440 445/73/443 444/71/441 -f 445/73/443 446/74/444 444/71/441 -f 445/73/443 447/75/445 448/76/446 -f 445/73/443 448/76/446 446/74/444 -f 447/75/445 449/77/447 448/76/446 -f 449/77/447 450/78/448 448/76/446 -f 449/77/447 451/79/449 452/80/450 -f 449/77/447 452/80/450 450/78/448 -f 451/79/449 440/68/451 452/80/450 -f 440/68/451 442/81/452 452/80/450 -f 438/68/437 453/68/437 439/68/437 -f 442/68/438 441/68/438 454/68/438 -f 438/72/442 444/71/441 453/82/453 -f 444/71/441 455/83/454 453/82/453 -f 444/71/441 446/74/444 456/84/455 -f 444/71/441 456/84/455 455/83/454 -f 446/74/444 448/76/446 456/84/455 -f 448/76/446 457/85/456 456/84/455 -f 448/76/446 450/78/448 458/86/457 -f 448/76/446 458/86/457 457/85/456 -f 450/78/448 452/80/450 458/86/457 -f 452/80/450 459/87/458 458/86/457 -f 452/80/450 442/81/452 454/88/459 -f 452/80/450 454/88/459 459/87/458 -f 453/68/437 460/68/437 439/68/437 -f 454/68/438 441/68/438 461/68/438 -f 453/82/453 455/83/454 462/89/460 -f 453/82/453 462/89/460 460/90/461 -f 455/83/454 456/84/455 462/89/460 -f 456/84/455 463/91/462 462/89/460 -f 456/84/455 457/85/456 464/92/463 -f 456/84/455 464/92/463 463/91/462 -f 457/85/456 458/86/457 464/92/463 -f 458/86/457 465/93/464 464/92/463 -f 458/86/457 459/87/458 466/94/465 -f 458/86/457 466/94/465 465/93/464 -f 459/87/458 454/88/459 466/94/465 -f 454/88/459 461/95/466 466/94/465 -f 460/68/437 467/68/437 439/68/437 -f 461/68/438 441/68/438 468/68/438 -f 460/90/461 462/89/460 467/96/467 -f 462/89/460 469/97/468 467/96/467 -f 462/89/460 463/91/462 470/98/469 -f 462/89/460 470/98/469 469/97/468 -f 463/91/462 464/92/463 470/98/469 -f 464/92/463 471/99/470 470/98/469 -f 464/92/463 465/93/464 472/100/471 -f 464/92/463 472/100/471 471/99/470 -f 465/93/464 466/94/465 472/100/471 -f 466/94/465 473/101/472 472/100/471 -f 466/94/465 461/95/466 468/102/473 -f 466/94/465 468/102/473 473/101/472 -f 467/68/437 474/68/437 439/68/437 -f 468/68/438 441/68/438 475/68/438 -f 467/96/467 469/97/468 476/103/474 -f 467/96/467 476/103/474 474/104/475 -f 469/97/468 470/98/469 476/103/474 -f 470/98/469 477/105/476 476/103/474 -f 470/98/469 471/99/470 478/106/477 -f 470/98/469 478/106/477 477/105/476 -f 471/99/470 472/100/471 478/106/477 -f 472/100/471 479/107/478 478/106/477 -f 472/100/471 473/101/472 480/108/479 -f 472/100/471 480/108/479 479/107/478 -f 473/101/472 468/102/473 480/108/479 -f 468/102/473 475/109/480 480/108/479 -f 474/68/437 481/68/437 439/68/437 -f 475/68/438 441/68/438 482/68/438 -f 474/104/475 476/103/474 481/110/481 -f 476/103/474 483/111/482 481/110/481 -f 476/103/474 477/105/476 484/112/483 -f 476/103/474 484/112/483 483/111/482 -f 477/105/476 478/106/477 484/112/483 -f 478/106/477 485/113/484 484/112/483 -f 478/106/477 479/107/478 486/114/485 -f 478/106/477 486/114/485 485/113/484 -f 479/107/478 480/108/479 486/114/485 -f 480/108/479 487/115/486 486/114/485 -f 480/108/479 475/109/480 482/116/487 -f 480/108/479 482/116/487 487/115/486 -f 481/68/437 437/68/437 439/68/437 -f 482/68/438 441/68/438 440/68/438 -f 481/110/481 483/111/482 443/117/440 -f 481/110/481 443/117/440 437/118/439 -f 483/111/482 484/112/483 443/117/440 -f 484/112/483 445/119/443 443/117/440 -f 484/112/483 485/113/484 447/120/445 -f 484/112/483 447/120/445 445/119/443 -f 485/113/484 486/114/485 447/120/445 -f 486/114/485 449/121/447 447/120/445 -f 486/114/485 487/115/486 451/122/449 -f 486/114/485 451/122/449 449/121/447 -f 487/115/486 482/116/487 451/122/449 -f 482/116/487 440/123/451 451/122/449 - -# Mesh 'Zahn_Zahn_Zahn_Zahn' with 42 faces -g Zahn_Zahn_Zahn_Zahn -usemtl BeinTex -f 488/124/488 488/124/488 488/124/488 -f 489/125/489 490/126/489 491/127/489 -f 488/124/490 492/128/491 493/129/492 -f 488/124/490 493/129/492 488/124/488 -f 492/128/491 489/125/493 493/129/492 -f 489/125/493 491/127/494 493/129/492 -f 488/124/488 488/124/488 488/124/488 -f 491/127/489 490/126/489 494/130/489 -f 488/124/488 493/129/492 488/124/495 -f 493/129/492 495/131/496 488/124/495 -f 493/129/492 491/127/494 494/130/497 -f 493/129/492 494/130/497 495/131/496 -f 488/124/488 488/124/488 488/124/488 -f 494/130/489 490/126/489 496/132/489 -f 488/124/495 495/131/496 497/133/498 -f 488/124/495 497/133/498 488/124/488 -f 495/131/496 494/130/497 497/133/498 -f 494/130/497 496/132/499 497/133/498 -f 488/124/488 488/124/488 488/124/488 -f 496/132/489 490/126/489 498/134/489 -f 488/124/488 497/133/498 488/124/500 -f 497/133/498 499/135/501 488/124/500 -f 497/133/498 496/132/499 498/134/502 -f 497/133/498 498/134/502 499/135/501 -f 488/124/488 488/124/488 488/124/488 -f 498/134/489 490/126/489 500/136/489 -f 488/124/500 499/135/501 501/137/503 -f 488/124/500 501/137/503 488/124/488 -f 499/135/501 498/134/502 501/137/503 -f 498/134/502 500/136/504 501/137/503 -f 488/124/488 488/124/488 488/124/488 -f 500/136/489 490/126/489 502/138/489 -f 488/124/488 501/137/503 488/124/505 -f 501/137/503 503/139/506 488/124/505 -f 501/137/503 500/136/504 502/138/507 -f 501/137/503 502/138/507 503/139/506 -f 488/124/488 488/124/488 488/124/488 -f 502/138/489 490/126/489 489/125/489 -f 488/124/505 503/139/506 492/128/491 -f 488/124/505 492/128/491 488/124/490 -f 503/139/506 502/138/507 492/128/491 -f 502/138/507 489/125/493 492/128/491 - -# Mesh 'klZahn_klZahn_klZahn_klZahn' with 42 faces -g klZahn_klZahn_klZahn_klZahn -usemtl BeinTex -f 504/140/488 504/140/488 504/140/488 -f 505/141/508 506/142/508 507/143/508 -f 504/140/509 508/144/510 509/145/511 -f 504/140/509 509/145/511 504/140/488 -f 508/144/510 505/141/512 509/145/511 -f 505/141/512 507/143/513 509/145/511 -f 504/140/488 504/140/488 504/140/488 -f 507/143/508 506/142/508 510/146/508 -f 504/140/488 509/145/511 504/140/514 -f 509/145/511 511/147/515 504/140/514 -f 509/145/511 507/143/513 510/146/516 -f 509/145/511 510/146/516 511/147/515 -f 504/140/488 504/140/488 504/140/488 -f 510/146/508 506/142/508 512/148/508 -f 504/140/514 511/147/515 513/149/517 -f 504/140/514 513/149/517 504/140/488 -f 511/147/515 510/146/516 513/149/517 -f 510/146/516 512/148/518 513/149/517 -f 504/140/488 504/140/488 504/140/488 -f 512/148/508 506/142/508 514/150/508 -f 504/140/488 513/149/517 504/140/519 -f 513/149/517 515/151/520 504/140/519 -f 513/149/517 512/148/518 514/150/521 -f 513/149/517 514/150/521 515/151/520 -f 504/140/488 504/140/488 504/140/488 -f 514/150/508 506/142/508 516/152/508 -f 504/140/519 515/151/520 517/153/522 -f 504/140/519 517/153/522 504/140/488 -f 515/151/520 514/150/521 517/153/522 -f 514/150/521 516/152/523 517/153/522 -f 504/140/488 504/140/488 504/140/488 -f 516/152/508 506/142/508 518/154/508 -f 504/140/488 517/153/522 504/140/524 -f 517/153/522 519/155/525 504/140/524 -f 517/153/522 516/152/523 518/154/526 -f 517/153/522 518/154/526 519/155/525 -f 504/140/488 504/140/488 504/140/488 -f 518/154/508 506/142/508 505/141/508 -f 504/140/524 519/155/525 508/144/510 -f 504/140/524 508/144/510 504/140/509 -f 519/155/525 518/154/526 508/144/510 -f 518/154/526 505/141/512 508/144/510 - -# Mesh 'Kopf_Kopf_Kopf_Kopf' with 90 faces -g Kopf_Kopf_Kopf_Kopf -usemtl Skin -f 520/68/527 521/156/528 522/157/529 -f 520/68/527 523/158/530 521/156/528 -f 524/69/531 525/159/532 526/160/533 -f 520/68/527 527/161/534 523/158/530 -f 524/69/531 526/160/533 528/162/535 -f 520/68/527 529/163/536 527/161/534 -f 524/69/531 528/162/535 530/164/537 -f 520/68/527 531/165/538 529/163/536 -f 524/69/531 530/164/537 532/166/539 -f 520/68/527 533/167/540 531/165/538 -f 534/168/541 535/169/542 525/159/532 -f 525/159/532 535/169/542 536/170/543 -f 525/159/532 536/170/543 526/160/533 -f 526/160/533 536/170/543 528/162/535 -f 536/170/543 537/169/544 528/162/535 -f 528/162/535 537/169/544 538/171/545 -f 528/162/535 538/171/545 530/164/537 -f 530/164/537 538/171/545 532/166/539 -f 538/171/545 539/172/546 532/166/539 -f 540/173/547 541/174/548 534/168/541 -f 541/174/548 542/175/549 534/168/541 -f 534/168/541 542/175/549 543/176/550 -f 534/168/541 543/176/550 535/169/542 -f 535/169/542 543/176/550 536/170/543 -f 543/176/550 544/177/551 536/170/543 -f 536/170/543 544/177/551 545/178/552 -f 536/170/543 545/178/552 537/169/544 -f 537/169/544 545/178/552 538/171/545 -f 545/178/552 546/179/553 538/171/545 -f 538/171/545 546/179/553 547/180/554 -f 538/171/545 547/180/554 539/172/546 -f 541/174/548 548/181/555 549/182/556 -f 541/174/548 549/182/556 542/175/549 -f 542/175/549 549/182/556 543/176/550 -f 549/182/556 550/183/557 543/176/550 -f 543/176/550 550/183/557 551/184/558 -f 543/176/550 551/184/558 544/177/551 -f 544/177/551 551/184/558 545/178/552 -f 551/184/558 552/185/559 545/178/552 -f 546/179/553 553/186/560 547/180/554 -f 553/186/560 554/187/561 547/180/554 -f 548/181/555 522/157/529 549/182/556 -f 522/157/529 521/156/528 549/182/556 -f 549/182/556 521/156/528 523/158/530 -f 549/182/556 523/158/530 550/183/557 -f 550/183/557 523/158/530 551/184/558 -f 523/158/530 527/161/534 551/184/558 -f 551/184/558 527/161/534 529/163/536 -f 551/184/558 529/163/536 552/185/559 -f 552/185/559 529/163/536 553/186/560 -f 529/163/536 531/165/538 553/186/560 -f 553/186/560 531/165/538 533/167/540 -f 553/186/560 533/167/540 554/187/561 -f 555/188/562 556/189/563 557/190/564 -f 546/179/553 558/191/565 557/190/564 -f 557/190/564 555/188/562 546/179/553 -f 559/192/566 558/191/565 546/179/553 -f 558/191/565 559/192/566 560/193/567 -f 560/193/567 557/190/564 558/191/565 -f 561/194/568 560/193/567 559/192/566 -f 559/192/566 562/195/569 561/194/568 -f 563/196/570 561/194/568 564/197/571 -f 562/195/569 564/197/571 561/194/568 -f 565/198/572 563/196/570 566/199/573 -f 563/196/570 564/197/571 566/199/573 -f 566/199/573 567/200/574 565/198/572 -f 566/199/573 568/201/575 567/200/574 -f 568/201/575 569/202/576 567/200/574 -f 570/203/577 567/200/574 569/202/576 -f 569/202/576 571/204/578 570/203/577 -f 572/205/579 570/203/577 571/204/578 -f 573/206/580 572/205/579 571/204/578 -f 571/204/578 574/207/581 573/206/580 -f 575/208/582 573/206/580 574/207/581 -f 574/207/581 576/209/583 575/208/582 -f 556/189/563 575/208/582 576/209/583 -f 576/209/583 555/188/562 556/189/563 -f 555/188/562 553/186/560 546/179/553 -f 555/188/562 576/209/583 553/186/560 -f 576/209/583 574/207/581 553/186/560 -f 574/207/581 571/204/578 553/186/560 -f 571/204/578 569/202/576 553/186/560 -f 552/185/559 553/186/560 569/202/576 -f 569/202/576 568/201/575 552/185/559 -f 568/201/575 566/199/573 552/185/559 -f 559/192/566 546/179/553 545/178/552 -f 562/195/569 559/192/566 545/178/552 -f 564/197/571 562/195/569 545/178/552 -f 545/178/552 552/185/559 566/199/573 -f 564/197/571 566/199/573 545/178/552 - -# Mesh 'Brust_Brust_Brust_Brust' with 20 faces -g Brust_Brust_Brust_Brust -usemtl Skin -f 70/210/584 71/211/585 577/212/586 -f 60/120/587 577/212/586 64/213/588 -f 577/212/586 71/211/585 64/213/588 -f 70/210/584 577/212/586 578/214/589 -f 75/215/590 578/214/589 579/216/591 -f 60/120/587 579/216/591 577/212/586 -f 578/214/589 577/212/586 579/216/591 -f 70/210/584 578/214/589 580/217/592 -f 77/75/593 580/217/592 581/218/594 -f 75/215/590 581/218/594 578/214/589 -f 580/217/592 578/214/589 581/218/594 -f 77/75/593 581/218/594 72/219/595 -f 75/215/590 73/220/596 581/218/594 -f 72/219/595 581/218/594 73/220/596 -f 75/215/590 579/216/591 74/221/597 -f 60/120/587 61/222/598 579/216/591 -f 74/221/597 579/216/591 61/222/598 -f 70/210/584 580/217/592 69/223/599 -f 77/75/593 79/224/600 580/217/592 -f 69/223/599 580/217/592 79/224/600 - -# Mesh 'Kopf2_Kopf2_Kopf2_Kopf2' with 90 faces -g Kopf2_Kopf2_Kopf2_Kopf2 -usemtl Skin -f 582/225/601 583/226/602 584/123/603 -f 583/226/602 585/227/604 584/123/603 -f 586/228/605 587/229/606 588/118/607 -f 585/227/604 589/230/608 584/123/603 -f 590/231/609 586/228/605 588/118/607 -f 589/230/608 591/232/610 584/123/603 -f 592/233/611 590/231/609 588/118/607 -f 591/232/610 593/234/612 584/123/603 -f 594/235/613 592/233/611 588/118/607 -f 593/234/612 595/236/614 584/123/603 -f 587/229/606 596/237/615 597/238/616 -f 598/239/617 596/237/615 587/229/606 -f 586/228/605 598/239/617 587/229/606 -f 590/231/609 598/239/617 586/228/605 -f 590/231/609 599/237/618 598/239/617 -f 600/240/619 599/237/618 590/231/609 -f 592/233/611 600/240/619 590/231/609 -f 594/235/613 600/240/619 592/233/611 -f 594/235/613 601/241/620 600/240/619 -f 597/238/616 602/176/621 603/242/622 -f 597/238/616 604/243/623 602/176/621 -f 605/174/624 604/243/623 597/238/616 -f 596/237/615 605/174/624 597/238/616 -f 598/239/617 605/174/624 596/237/615 -f 598/239/617 606/244/625 605/174/624 -f 607/245/626 606/244/625 598/239/617 -f 599/237/618 607/245/626 598/239/617 -f 600/240/619 607/245/626 599/237/618 -f 600/240/619 608/246/627 607/245/626 -f 609/247/628 608/246/627 600/240/619 -f 601/241/620 609/247/628 600/240/619 -f 610/248/629 611/249/630 602/176/621 -f 604/243/623 610/248/629 602/176/621 -f 605/174/624 610/248/629 604/243/623 -f 605/174/624 612/250/631 610/248/629 -f 613/251/632 612/250/631 605/174/624 -f 606/244/625 613/251/632 605/174/624 -f 607/245/626 613/251/632 606/244/625 -f 607/245/626 614/252/633 613/251/632 -f 609/247/628 615/253/634 608/246/627 -f 609/247/628 616/254/635 615/253/634 -f 610/248/629 582/225/601 611/249/630 -f 610/248/629 583/226/602 582/225/601 -f 585/227/604 583/226/602 610/248/629 -f 612/250/631 585/227/604 610/248/629 -f 613/251/632 585/227/604 612/250/631 -f 613/251/632 589/230/608 585/227/604 -f 591/232/610 589/230/608 613/251/632 -f 614/252/633 591/232/610 613/251/632 -f 615/253/634 591/232/610 614/252/633 -f 615/253/634 593/234/612 591/232/610 -f 595/236/614 593/234/612 615/253/634 -f 616/254/635 595/236/614 615/253/634 -f 617/255/636 618/256/637 619/257/638 -f 617/255/636 620/258/639 608/246/627 -f 608/246/627 619/257/638 617/255/636 -f 608/246/627 620/258/639 621/259/640 -f 622/260/641 621/259/640 620/258/639 -f 620/258/639 617/255/636 622/260/641 -f 621/259/640 622/260/641 623/261/642 -f 623/261/642 624/262/643 621/259/640 -f 625/263/644 623/261/642 626/264/645 -f 623/261/642 625/263/644 624/262/643 -f 627/265/646 626/264/645 628/266/647 -f 627/265/646 625/263/644 626/264/645 -f 628/266/647 629/267/648 627/265/646 -f 629/267/648 630/268/649 627/265/646 -f 629/267/648 631/269/650 630/268/649 -f 631/269/650 629/267/648 632/270/651 -f 632/270/651 633/271/652 631/269/650 -f 633/271/652 632/270/651 634/272/653 -f 633/271/652 634/272/653 635/273/654 -f 635/273/654 636/274/655 633/271/652 -f 636/274/655 635/273/654 637/275/656 -f 637/275/656 638/276/657 636/274/655 -f 638/276/657 637/275/656 618/256/637 -f 618/256/637 619/257/638 638/276/657 -f 608/246/627 615/253/634 619/257/638 -f 615/253/634 638/276/657 619/257/638 -f 615/253/634 636/274/655 638/276/657 -f 615/253/634 633/271/652 636/274/655 -f 615/253/634 631/269/650 633/271/652 -f 631/269/650 615/253/634 614/252/633 -f 614/252/633 630/268/649 631/269/650 -f 614/252/633 627/265/646 630/268/649 -f 607/245/626 608/246/627 621/259/640 -f 607/245/626 621/259/640 624/262/643 -f 607/245/626 624/262/643 625/263/644 -f 627/265/646 614/252/633 607/245/626 -f 607/245/626 627/265/646 625/263/644 - -# Mesh 'Zahn2_Zahn2_Zahn2_Zahn2' with 42 faces -g Zahn2_Zahn2_Zahn2_Zahn2 -usemtl BeinTex -f 639/124/488 639/124/488 639/124/488 -f 640/127/658 641/126/658 642/125/658 -f 643/129/659 644/128/660 639/124/661 -f 639/124/488 643/129/659 639/124/661 -f 643/129/659 642/125/662 644/128/660 -f 643/129/659 640/127/663 642/125/662 -f 639/124/488 639/124/488 639/124/488 -f 645/130/658 641/126/658 640/127/658 -f 639/124/664 643/129/659 639/124/488 -f 639/124/664 646/131/665 643/129/659 -f 645/130/666 640/127/663 643/129/659 -f 646/131/665 645/130/666 643/129/659 -f 639/124/488 639/124/488 639/124/488 -f 647/132/658 641/126/658 645/130/658 -f 648/133/667 646/131/665 639/124/664 -f 639/124/488 648/133/667 639/124/664 -f 648/133/667 645/130/666 646/131/665 -f 648/133/667 647/132/668 645/130/666 -f 639/124/488 639/124/488 639/124/488 -f 649/134/658 641/126/658 647/132/658 -f 639/124/669 648/133/667 639/124/488 -f 639/124/669 650/135/670 648/133/667 -f 649/134/671 647/132/668 648/133/667 -f 650/135/670 649/134/671 648/133/667 -f 639/124/488 639/124/488 639/124/488 -f 651/136/658 641/126/658 649/134/658 -f 652/137/672 650/135/670 639/124/669 -f 639/124/488 652/137/672 639/124/669 -f 652/137/672 649/134/671 650/135/670 -f 652/137/672 651/136/673 649/134/671 -f 639/124/488 639/124/488 639/124/488 -f 653/138/658 641/126/658 651/136/658 -f 639/124/674 652/137/672 639/124/488 -f 639/124/674 654/139/675 652/137/672 -f 653/138/676 651/136/673 652/137/672 -f 654/139/675 653/138/676 652/137/672 -f 639/124/488 639/124/488 639/124/488 -f 642/125/658 641/126/658 653/138/658 -f 644/128/660 654/139/675 639/124/674 -f 639/124/661 644/128/660 639/124/674 -f 644/128/660 653/138/676 654/139/675 -f 644/128/660 642/125/662 653/138/676 - -# Mesh 'klZahn2_klZahn2_klZahn2_klZahn2' with 42 faces -g klZahn2_klZahn2_klZahn2_klZahn2 -usemtl BeinTex -f 655/140/488 655/140/488 655/140/488 -f 656/143/677 657/142/677 658/141/677 -f 659/145/678 660/144/679 655/140/680 -f 655/140/488 659/145/678 655/140/680 -f 659/145/678 658/141/681 660/144/679 -f 659/145/678 656/143/682 658/141/681 -f 655/140/488 655/140/488 655/140/488 -f 661/146/677 657/142/677 656/143/677 -f 655/140/683 659/145/678 655/140/488 -f 655/140/683 662/147/684 659/145/678 -f 661/146/685 656/143/682 659/145/678 -f 662/147/684 661/146/685 659/145/678 -f 655/140/488 655/140/488 655/140/488 -f 663/148/677 657/142/677 661/146/677 -f 664/149/686 662/147/684 655/140/683 -f 655/140/488 664/149/686 655/140/683 -f 664/149/686 661/146/685 662/147/684 -f 664/149/686 663/148/687 661/146/685 -f 655/140/488 655/140/488 655/140/488 -f 665/150/677 657/142/677 663/148/677 -f 655/140/688 664/149/686 655/140/488 -f 655/140/688 666/151/689 664/149/686 -f 665/150/690 663/148/687 664/149/686 -f 666/151/689 665/150/690 664/149/686 -f 655/140/488 655/140/488 655/140/488 -f 667/152/677 657/142/677 665/150/677 -f 668/153/691 666/151/689 655/140/688 -f 655/140/488 668/153/691 655/140/688 -f 668/153/691 665/150/690 666/151/689 -f 668/153/691 667/152/692 665/150/690 -f 655/140/488 655/140/488 655/140/488 -f 669/154/677 657/142/677 667/152/677 -f 655/140/693 668/153/691 655/140/488 -f 655/140/693 670/155/694 668/153/691 -f 669/154/695 667/152/692 668/153/691 -f 670/155/694 669/154/695 668/153/691 -f 655/140/488 655/140/488 655/140/488 -f 658/141/677 657/142/677 669/154/677 -f 660/144/679 670/155/694 655/140/693 -f 655/140/680 660/144/679 655/140/693 -f 660/144/679 669/154/695 670/155/694 -f 660/144/679 658/141/681 669/154/695 - -# Mesh 'Auge_Auge_Auge_Auge' with 38 faces -g Auge_Auge_Auge_Auge -usemtl Augentex -f 671/277/696 672/278/697 673/279/698 -f 671/277/696 673/279/698 674/280/699 -f 675/281/700 674/280/699 676/282/701 -f 674/280/699 673/279/698 676/282/701 -f 675/281/700 676/282/701 677/283/702 -f 678/284/703 679/285/704 680/286/705 -f 681/287/706 680/286/705 682/288/707 -f 683/289/708 682/288/707 679/285/704 -f 680/286/705 679/285/704 682/288/707 -f 681/287/706 682/288/707 684/290/709 -f 685/291/710 684/290/709 686/292/711 -f 683/289/708 686/292/711 682/288/707 -f 684/290/709 682/288/707 686/292/711 -f 685/291/710 687/293/712 688/294/713 -f 689/295/714 688/294/713 690/296/715 -f 691/297/716 690/296/715 687/293/712 -f 688/294/713 687/293/712 690/296/715 -f 689/295/714 690/296/715 692/298/717 -f 671/277/696 692/298/717 693/299/718 -f 691/297/716 693/299/718 690/296/715 -f 692/298/717 690/296/715 693/299/718 -f 671/277/696 693/299/718 672/278/697 -f 675/281/700 694/300/719 674/280/699 -f 671/277/696 674/280/699 692/298/717 -f 689/295/714 692/298/717 694/300/719 -f 674/280/699 694/300/719 692/298/717 -f 675/281/700 695/301/720 694/300/719 -f 689/295/714 694/300/719 696/302/721 -f 681/287/706 696/302/721 695/301/720 -f 694/300/719 695/301/720 696/302/721 -f 675/281/700 677/283/702 695/301/720 -f 681/287/706 695/301/720 680/286/705 -f 678/284/703 680/286/705 677/283/702 -f 695/301/720 677/283/702 680/286/705 -f 685/291/710 688/294/713 684/290/709 -f 681/287/706 684/290/709 696/302/721 -f 689/295/714 696/302/721 688/294/713 -f 684/290/709 688/294/713 696/302/721 - -# Mesh 'Duplicate05_Duplicate05_Duplicate05_Duplicate05' with 38 faces -g Duplicate05_Duplicate05_Duplicate05_Duplicate05 -usemtl Augentex -f 697/279/722 698/278/723 699/277/724 -f 700/280/725 697/279/722 699/277/724 -f 701/282/726 700/280/725 702/281/727 -f 701/282/726 697/279/722 700/280/725 -f 703/283/728 701/282/726 702/281/727 -f 704/286/729 705/285/730 706/284/731 -f 707/288/732 704/286/729 708/287/733 -f 705/285/730 707/288/732 709/289/734 -f 707/288/732 705/285/730 704/286/729 -f 710/290/735 707/288/732 708/287/733 -f 711/292/736 710/290/735 712/291/737 -f 707/288/732 711/292/736 709/289/734 -f 711/292/736 707/288/732 710/290/735 -f 713/294/738 714/293/739 712/291/737 -f 715/296/740 713/294/738 716/295/741 -f 714/293/739 715/296/740 717/297/742 -f 715/296/740 714/293/739 713/294/738 -f 718/298/743 715/296/740 716/295/741 -f 719/299/744 718/298/743 699/277/724 -f 715/296/740 719/299/744 717/297/742 -f 719/299/744 715/296/740 718/298/743 -f 698/278/723 719/299/744 699/277/724 -f 700/280/725 720/300/745 702/281/727 -f 718/298/743 700/280/725 699/277/724 -f 720/300/745 718/298/743 716/295/741 -f 718/298/743 720/300/745 700/280/725 -f 720/300/745 721/301/746 702/281/727 -f 722/302/747 720/300/745 716/295/741 -f 721/301/746 722/302/747 708/287/733 -f 722/302/747 721/301/746 720/300/745 -f 721/301/746 703/283/728 702/281/727 -f 704/286/729 721/301/746 708/287/733 -f 703/283/728 704/286/729 706/284/731 -f 704/286/729 703/283/728 721/301/746 -f 710/290/735 713/294/738 712/291/737 -f 722/302/747 710/290/735 708/287/733 -f 713/294/738 722/302/747 716/295/741 -f 722/302/747 713/294/738 710/290/735 - +# Wavefront OBJ exported by MilkShape 3D + +mtllib spider.mtl + +v 1.160379 4.512684 6.449167 +v 22.656172 10.214539 16.869690 +v 4.568314 16.857113 5.619617 +v 14.402298 32.891869 3.414829 +v 27.520809 27.080326 11.451565 +v 39.186256 16.230997 12.632702 +v -6.442715 10.777405 -0.537529 +v -8.120363 15.684460 -10.500000 +v -0.886770 23.423717 -4.342854 +v -0.886770 23.423717 -16.657145 +v 14.402298 32.891869 -26.414825 +v 12.953165 36.873337 -11.500000 +v 30.527317 37.503952 -2.733282 +v 30.527317 37.503952 -20.266716 +v 44.301250 33.964729 -11.500000 +v 45.094967 27.710945 2.684846 +v 57.936218 30.276533 -11.500000 +v 54.503593 5.934020 -11.500000 +v 51.091763 11.234900 2.684846 +v 45.094967 27.710945 -25.684845 +v 39.186256 16.230997 -35.632706 +v 51.091763 11.234900 -25.684845 +v 27.520809 27.080326 -34.451565 +v 4.568314 16.857113 -26.619617 +v 1.160379 4.512684 -27.449169 +v 22.656172 10.214539 -39.869690 +v 7.838881 -6.414188 -26.619617 +v 30.910042 -12.462786 -26.414825 +v 37.223816 0.421531 -34.451565 +v 46.227112 -5.630886 -20.266716 +v 32.359184 -16.444252 -11.500000 +v 30.910042 -12.462786 3.414829 +v 46.227112 -5.630886 -2.733282 +v 4.405119 -14.230042 -16.657145 +v -4.681486 -8.784435 -10.500000 +v 4.405119 -14.230042 -4.342854 +v -4.421391 -3.605049 -0.537529 +v 7.838881 -6.414188 5.619617 +v 37.223816 0.421531 11.451565 +v -9.876476 2.961555 -10.500000 +v -6.442715 10.777405 -20.462471 +v -4.421391 -3.605049 -20.462471 +v -41.856613 -0.754846 9.430772 +v -27.950212 1.303017 3.081421 +v -32.625862 10.860188 8.479760 +v -24.401524 12.224749 -3.122690 +v -18.826405 5.435883 0.583091 +v -11.221268 -4.132547 1.127722 +v -44.882015 11.887197 1.421121 +v -44.844704 15.228493 -10.000000 +v -35.570240 16.598591 -2.941359 +v -35.570240 16.598591 -17.058643 +v -24.401524 12.224749 -16.877310 +v -23.778482 14.142281 -10.000000 +v -8.432302 6.445052 -5.957618 +v -8.432302 6.445052 -14.042381 +v -1.337093 1.108110 -10.000000 +v -3.309273 -1.735224 -0.594703 +v -0.419668 -7.642198 -10.000000 +v -6.305182 -14.182098 -10.000000 +v -6.229439 -10.722575 -0.594703 +v -3.309273 -1.735224 -19.405296 +v -11.221268 -4.132547 -21.127720 +v -6.229439 -10.722575 -19.405296 +v -18.826405 5.435883 -20.583092 +v -32.625862 10.860188 -28.479759 +v -41.856613 -0.754846 -29.430771 +v -27.950212 1.303017 -23.081421 +v -39.194733 -9.356718 -28.479759 +v -31.498898 -9.618716 -16.877310 +v -22.998137 -7.403383 -20.583092 +v -31.498898 -9.618716 -3.122690 +v -51.647591 -5.708694 -10.000000 +v -49.713837 -2.983590 1.421121 +v -39.194733 -9.356718 8.479760 +v -22.998137 -7.403383 0.583091 +v -50.637024 8.975393 -10.000000 +v -44.882015 11.887197 -21.421116 +v -49.713837 -2.983590 -21.421116 +v -40.671478 -3.472887 -21.369167 +v -47.098404 7.389261 -39.585033 +v -55.443726 28.016960 -51.020649 +v -56.413048 27.518753 -54.602135 +v -67.985016 13.435572 -79.020355 +v -81.678322 -31.379181 -101.291557 +v -87.605835 -39.983532 -104.351723 +v -41.963333 -2.246161 -18.485233 +v -47.146698 8.704388 -37.681622 +v -55.805077 29.500343 -50.360577 +v -57.932991 29.207901 -55.039448 +v -69.893600 14.105843 -80.144135 +v -82.778503 -29.843521 -101.266586 +v -87.950195 -39.455147 -104.260185 +v -45.274612 -1.921316 -17.562561 +v -48.862389 8.964325 -36.150715 +v -56.924980 29.827461 -49.555809 +v -60.012169 29.560211 -54.086689 +v -72.068741 14.206520 -79.360901 +v -83.474747 -29.518608 -100.470779 +v -88.234985 -39.350231 -103.866043 +v -48.111877 -2.742970 -19.296001 +v -50.953510 7.973352 -36.145107 +v -57.960136 28.752014 -49.212387 +v -61.084877 28.310402 -52.461258 +v -72.872513 13.661798 -77.260391 +v -83.242752 -30.649029 -99.503448 +v -88.245728 -39.747742 -103.466080 +v -48.338589 -4.092402 -22.380154 +v -51.845413 6.477697 -37.669014 +v -58.131039 27.083824 -49.588871 +v -60.343346 26.399567 -51.387123 +v -71.699661 12.881830 -75.424393 +v -82.257225 -32.383606 -99.092934 +v -87.974380 -40.348385 -103.361534 +v -45.784027 -4.953472 -24.492657 +v -50.866463 5.603586 -39.574917 +v -57.308998 26.079071 -50.401779 +v -58.345963 25.266647 -51.673157 +v -69.433350 12.453951 -75.235397 +v -81.260262 -33.416180 -99.548431 +v -87.625252 -40.699837 -103.631096 +v -42.371857 -4.677759 -24.042709 +v -48.753845 6.009277 -40.427631 +v -56.113029 26.494377 -51.038967 +v -56.596836 25.764732 -53.103985 +v -67.780197 12.700411 -76.835770 +v -81.002632 -32.969162 -100.526863 +v -87.461220 -40.537483 -104.071754 +v -87.871048 -40.017475 -103.858307 +v -44.645119 -3.443838 -21.089790 +v -41.960121 -3.154671 1.817622 +v -49.196304 7.804556 21.293488 +v -54.254692 27.272881 30.448885 +v -55.486473 27.498093 33.976906 +v -67.468346 9.109057 43.496418 +v -85.971497 -32.074684 52.638474 +v -91.959503 -39.732742 57.540760 +v -42.838028 -1.822748 -1.173377 +v -49.368126 8.476757 19.085897 +v -54.925758 28.342400 29.366055 +v -57.455009 28.706230 33.835514 +v -69.611961 9.454971 44.296452 +v -87.014175 -30.514137 52.422035 +v -92.290428 -39.211590 57.382488 +v -45.988678 -1.450131 -2.535743 +v -50.884972 7.785149 17.480999 +v -55.983421 28.087738 28.457573 +v -59.415642 28.146988 32.740971 +v -71.615807 8.682786 43.434380 +v -87.756073 -30.296221 51.631001 +v -92.600067 -39.161705 56.996368 +v -49.039581 -2.317410 -1.243531 +v -52.604645 6.250553 17.687332 +v -56.631248 26.700691 28.407564 +v -59.891945 26.241493 31.517431 +v -71.970940 7.373976 41.559353 +v -87.638519 -31.584965 50.861065 +v -92.655235 -39.620594 56.673161 +v -49.693314 -3.771509 1.730138 +v -53.232193 5.028540 19.549484 +v -56.381416 25.225716 29.253666 +v -58.525230 24.424589 31.086275 +v -70.409966 6.514069 40.083332 +v -86.750092 -33.409981 50.691986 +v -92.414413 -40.242748 56.656296 +v -47.457619 -4.717469 4.146055 +v -52.295036 5.039291 21.665272 +v -55.422035 24.773529 30.358753 +v -56.344688 24.064466 31.772144 +v -68.108238 6.750601 40.117752 +v -85.759720 -34.396961 51.251087 +v -92.058937 -40.559631 56.958412 +v -44.016029 -4.442948 4.184989 +v -50.498901 6.274748 22.441425 +v -54.475548 25.684616 30.890648 +v -54.992317 25.432327 33.058613 +v -66.799141 7.905498 41.636730 +v -85.413208 -33.802715 52.117340 +v -91.856499 -40.332680 57.352055 +v -92.262108 -39.837402 57.079941 +v -45.856201 -3.096684 0.989461 +v -32.535782 -3.154671 -19.162537 +v -35.098988 7.804556 -38.979305 +v -37.554058 27.272881 -51.632816 +v -36.856800 27.498093 -55.304066 +v -39.321587 4.109057 -79.209648 +v -40.877087 -32.426605 -89.889732 +v -43.385780 -41.583160 -95.218742 +v -34.383732 -1.822748 -16.652164 +v -36.351589 8.476757 -37.153374 +v -38.676632 28.342400 -51.030598 +v -38.632298 28.706230 -56.165878 +v -40.777988 4.454971 -80.974312 +v -41.686413 -30.958584 -90.761086 +v -43.694237 -41.068901 -95.434502 +v -37.810333 -1.450131 -16.449551 +v -38.467670 7.785149 -36.521919 +v -40.046833 28.087738 -50.772652 +v -40.877529 28.146988 -56.198307 +v -42.944405 3.682786 -81.229652 +v -42.730568 -30.604935 -90.669960 +v -44.167656 -40.946091 -95.343666 +v -40.235279 -2.317410 -18.707310 +v -39.853783 6.250553 -37.560444 +v -40.632877 26.700691 -51.053253 +v -41.901775 26.241493 -55.376835 +v -44.189468 2.373976 -79.783394 +v -43.223267 -31.631912 -89.685066 +v -44.449516 -41.307182 -95.014656 +v -39.832531 -3.771509 -21.725227 +v -39.466175 5.028540 -39.486904 +v -39.993458 25.225716 -51.661091 +v -40.933758 24.424589 -54.320080 +v -43.575638 1.514069 -77.724648 +v -42.793549 -33.266224 -88.547981 +v -44.327614 -41.880302 -94.695259 +v -36.905369 -4.717469 -23.230795 +v -37.596676 5.039291 -40.850639 +v -38.610062 24.773529 -52.138432 +v -38.702415 24.064466 -53.823795 +v -41.565083 1.750601 -76.603584 +v -41.764935 -34.277184 -88.114983 +v -43.893715 -42.233826 -94.625923 +v -33.658024 -4.442948 -22.090290 +v -35.653107 6.274748 -40.624737 +v -37.524441 25.684616 -52.125816 +v -36.888000 25.432327 -54.261726 +v -39.671886 2.905498 -77.264503 +v -40.912052 -33.903522 -88.712090 +v -43.474564 -42.101616 -94.858925 +v -43.913261 -41.588737 -95.027351 +v -36.480152 -3.096684 -19.716850 +v -32.202831 -2.602407 -2.728741 +v -34.576370 8.107365 17.247396 +v -39.058979 27.085625 30.088219 +v -38.037266 27.494461 33.666477 +v -34.540394 17.314922 46.759007 +v -28.008705 -33.484039 66.392296 +v -28.327166 -39.131874 75.694695 +v -34.502445 -1.655421 -5.032196 +v -36.107876 8.519890 15.562401 +v -40.406155 27.934097 29.606636 +v -39.897282 28.393272 34.709156 +v -35.845226 17.436094 48.666241 +v -28.966595 -31.870440 66.611580 +v -28.696358 -38.612408 75.698051 +v -37.944061 -1.883905 -4.875526 +v -38.125301 7.461887 15.155594 +v -41.730480 27.441978 29.493328 +v -41.995846 27.455360 34.976097 +v -37.806667 16.306143 49.146633 +v -30.060040 -31.714916 66.549873 +v -29.190708 -38.598446 75.644356 +v -39.936069 -3.115807 -2.376659 +v -39.109486 5.730080 16.333321 +v -42.034714 25.979904 29.833651 +v -42.752686 25.387024 34.266190 +v -38.947704 14.775947 47.838451 +v -30.465645 -33.134476 66.253670 +v -29.437933 -39.100452 75.574059 +v -38.978443 -4.423484 0.582626 +v -38.319347 4.628540 18.208712 +v -41.089756 24.648787 30.371326 +v -41.597874 23.745718 33.114037 +v -38.409119 13.997741 45.726810 +v -29.878033 -35.060257 65.945946 +v -29.251896 -39.740452 75.540138 +v -35.792297 -4.822233 1.773979 +v -36.349819 4.986736 19.369556 +v -39.607189 24.451040 30.701448 +v -39.401020 23.767401 32.387234 +v -36.596428 14.557548 44.401737 +v -28.739618 -36.042065 65.858498 +v -28.772676 -40.036469 75.568077 +v -32.776875 -4.011777 0.300282 +v -34.684055 6.534969 18.941736 +v -38.703423 25.535545 30.575422 +v -37.816402 25.435768 32.633106 +v -34.874714 16.033844 44.861141 +v -27.907713 -35.340607 66.057121 +v -28.361128 -39.765636 75.636909 +v -28.862520 -39.283707 75.622292 +v -36.019009 -3.216418 -1.765163 +v -23.494484 -3.472887 -4.813465 +v -14.855604 7.389261 12.463476 +v -12.426659 28.016960 26.410450 +v -10.523695 27.518753 29.595638 +v -0.997257 13.435572 54.882141 +v 3.675970 -31.379181 79.706490 +v 5.211229 -39.983532 86.198250 +v -26.466400 -2.246161 -5.887527 +v -16.258350 8.704388 11.176008 +v -13.152491 29.500343 26.211857 +v -11.264965 29.207901 30.992771 +v -1.514698 14.105843 57.035713 +v 3.385566 -29.843521 80.767952 +v 5.039108 -39.455147 86.510231 +v -29.430336 -1.921316 -4.146553 +v -18.551411 8.964325 11.346706 +v -14.509346 29.827461 26.458410 +v -13.394642 29.560211 31.826565 +v -3.589094 14.206520 58.056274 +v 2.445001 -29.518608 81.251015 +v 4.587766 -39.350231 86.691200 +v -30.154327 -2.742970 -0.901443 +v -20.008060 7.973352 12.847034 +v -15.475464 28.752014 26.964478 +v -15.309046 28.310402 31.469078 +v -5.658417 13.661798 57.175323 +v 1.562493 -30.649029 80.791862 +v 4.197091 -39.747742 86.604866 +v -28.093273 -4.092402 1.404079 +v -19.531422 6.477697 14.547209 +v -15.323357 27.083824 27.348948 +v -15.566597 26.399567 30.189514 +v -6.164387 12.881830 55.056259 +v 1.402615 -32.383606 79.736290 +v 4.161307 -40.348385 86.316307 +v -24.799110 -4.953472 1.033955 +v -17.480396 5.603586 15.166962 +v -14.167568 26.079071 27.322308 +v -13.973347 25.266647 28.951418 +v -4.726027 12.453951 53.294724 +v 2.085765 -33.416180 78.879143 +v 4.507323 -40.699837 86.042763 +v -22.752468 -4.677759 -1.733124 +v -15.399448 6.009277 14.239624 +v -12.878420 26.494377 26.904627 +v -11.729046 25.764732 28.687138 +v -2.426441 12.700411 53.217262 +v 3.097473 -32.969162 78.865883 +v 4.974566 -40.537483 85.990211 +v 4.668339 -40.017475 86.336220 +v -26.455776 -3.443838 -2.149143 +v -23.494484 -3.472887 -15.186539 +v -14.855604 7.389261 -32.463478 +v -12.426659 28.016960 -46.410446 +v -10.523695 27.518753 -49.595634 +v -0.997257 13.435572 -74.882133 +v 3.675970 -31.379181 -99.706490 +v 5.211229 -39.983532 -106.198250 +v -26.466400 -2.246161 -14.112476 +v -16.258350 8.704388 -31.176010 +v -13.152491 29.500343 -46.211853 +v -11.264965 29.207901 -50.992767 +v -1.514698 14.105843 -77.035713 +v 3.385567 -29.843521 -100.767952 +v 5.039108 -39.455147 -106.510231 +v -29.430336 -1.921316 -15.853451 +v -18.551411 8.964325 -31.346710 +v -14.509346 29.827461 -46.458412 +v -13.394642 29.560211 -51.826561 +v -3.589094 14.206520 -78.056267 +v 2.445001 -29.518608 -101.251015 +v 4.587765 -39.350231 -106.691200 +v -30.154327 -2.742970 -19.098560 +v -20.008060 7.973352 -32.847034 +v -15.475464 28.752014 -46.964478 +v -15.309046 28.310402 -51.469078 +v -5.658417 13.661798 -77.175316 +v 1.562493 -30.649029 -100.791862 +v 4.197090 -39.747742 -106.604866 +v -28.093273 -4.092402 -21.404083 +v -19.531422 6.477697 -34.547211 +v -15.323357 27.083824 -47.348946 +v -15.566597 26.399567 -50.189514 +v -6.164387 12.881830 -75.056252 +v 1.402615 -32.383606 -99.736290 +v 4.161308 -40.348385 -106.316307 +v -24.799110 -4.953472 -21.033958 +v -17.480396 5.603586 -35.166962 +v -14.167568 26.079071 -47.322304 +v -13.973347 25.266647 -48.951416 +v -4.726027 12.453951 -73.294716 +v 2.085765 -33.416180 -98.879143 +v 4.507324 -40.699837 -106.042763 +v -22.752468 -4.677759 -18.266880 +v -15.399448 6.009277 -34.239624 +v -12.878420 26.494377 -46.904625 +v -11.729046 25.764732 -48.687134 +v -2.426441 12.700411 -73.217262 +v 3.097473 -32.969162 -98.865883 +v 4.974566 -40.537483 -105.990211 +v 4.668339 -40.017475 -106.336220 +v -26.455776 -3.443838 -17.850861 +v -11.205212 -7.280232 -5.841879 +v -2.877649 5.517601 11.076941 +v 1.745674 26.136940 21.007814 +v 4.282450 26.647736 23.713144 +v 14.860218 5.642468 47.618973 +v 19.200661 -29.660152 61.265373 +v 19.897118 -38.155197 68.039124 +v -14.102657 -6.075779 -7.124460 +v -4.907511 6.093641 10.126818 +v 0.474552 27.209396 20.979715 +v 3.233435 28.024002 25.249430 +v 14.560253 6.223589 49.838684 +v 18.976063 -28.078100 62.273354 +v 19.749865 -37.607536 68.329926 +v -17.115952 -5.533359 -5.528418 +v -7.036675 5.467060 10.781746 +v -0.824137 27.009163 21.510900 +v 1.346554 27.595062 26.518511 +v 12.858335 5.598270 51.276505 +v 18.042278 -27.676632 62.709824 +v 19.300247 -37.467232 68.489960 +v -17.975994 -6.061425 -2.255571 +v -7.661821 4.109711 12.548561 +v -1.172436 25.687050 22.201403 +v 0.042627 25.683922 26.564661 +v 11.036061 4.237392 50.849693 +v 17.102531 -28.757996 62.246178 +v 18.886868 -37.839897 68.398773 +v -16.035194 -7.262345 0.229479 +v -6.312249 3.043694 14.096798 +v -0.308071 24.238619 22.531248 +v 0.303562 23.729671 25.353144 +v 10.465651 3.165695 48.879730 +v 16.864386 -30.507956 61.231514 +v 18.820993 -38.444942 68.125061 +v -12.754986 -8.231801 0.055506 +v -4.004155 3.071719 14.260595 +v 1.118067 23.754597 22.252031 +v 1.932854 23.203932 23.796263 +v 11.576626 3.190188 46.849907 +v 17.507248 -31.608736 60.429893 +v 19.152214 -38.826717 67.874832 +v -10.605457 -8.239758 -2.646498 +v -2.475620 4.172726 12.916639 +v 2.032040 24.599438 21.574022 +v 3.703634 24.502615 23.066408 +v 13.532379 4.292479 46.288857 +v 18.546949 -31.231438 60.444954 +v 19.631145 -38.697784 67.836639 +v 19.348364 -38.148495 68.156281 +v -14.256489 -6.954941 -3.301691 +v -12.538544 -7.280232 -13.491455 +v -4.210981 5.517601 -30.410275 +v 0.412342 26.136940 -40.341148 +v 2.949118 26.647736 -43.046478 +v 13.526886 5.642468 -66.952316 +v 17.867329 -29.660152 -80.598724 +v 18.563786 -38.155197 -87.372467 +v -15.435989 -6.075779 -12.208874 +v -6.240843 6.093641 -29.460152 +v -0.858780 27.209396 -40.313049 +v 1.900103 28.024002 -44.582764 +v 13.226921 6.223589 -69.172028 +v 17.642731 -28.078100 -81.606705 +v 18.416533 -37.607536 -87.663269 +v -18.449284 -5.533359 -13.804916 +v -8.370007 5.467060 -30.115082 +v -2.157469 27.009163 -40.844238 +v 0.013222 27.595062 -45.851845 +v 11.525003 5.598270 -70.609848 +v 16.708946 -27.676632 -82.043167 +v 17.966915 -37.467232 -87.823303 +v -19.309326 -6.061425 -17.077763 +v -8.995153 4.109711 -31.881897 +v -2.505768 25.687050 -41.534737 +v -1.290705 25.683922 -45.897995 +v 9.702729 4.237392 -70.183029 +v 15.769199 -28.757996 -81.579529 +v 17.553535 -37.839897 -87.732117 +v -17.368526 -7.262345 -19.562813 +v -7.645581 3.043694 -33.430130 +v -1.641403 24.238619 -41.864586 +v -1.029770 23.729671 -44.686478 +v 9.132318 3.165695 -68.213074 +v 15.531054 -30.507956 -80.564865 +v 17.487661 -38.444942 -87.458405 +v -14.088318 -8.231801 -19.388840 +v -5.337487 3.071719 -33.593929 +v -0.215265 23.754597 -41.585365 +v 0.599522 23.203932 -43.129601 +v 10.243294 3.190188 -66.183243 +v 16.173916 -31.608736 -79.763245 +v 17.818882 -38.826717 -87.208176 +v -11.938789 -8.239758 -16.686836 +v -3.808952 4.172726 -32.249973 +v 0.698708 24.599438 -40.907356 +v 2.370302 24.502615 -42.399742 +v 12.199047 4.292479 -65.622192 +v 17.213617 -31.231438 -79.778305 +v 18.297813 -38.697784 -87.169983 +v 18.015032 -38.148495 -87.489624 +v -15.589821 -6.954941 -16.031643 +v -66.772987 -11.885618 -0.202999 +v -63.971184 3.661695 -3.830468 +v -61.496513 6.340155 -5.812276 +v -66.772987 -11.885618 -0.202999 +v -64.845985 4.368711 -2.075660 +v -61.447578 8.190097 -3.647036 +v -66.772987 -11.885618 -0.202999 +v -67.137108 4.622091 -1.531196 +v -62.557804 11.305613 -3.485914 +v -66.772987 -11.885618 -0.202999 +v -69.119194 4.231085 -2.607096 +v -63.991096 13.340770 -5.450253 +v -66.772987 -11.885618 -0.202999 +v -69.299873 3.490133 -4.493171 +v -64.668205 12.763025 -8.060863 +v -66.772987 -11.885618 -0.202999 +v -67.542992 2.957121 -5.769162 +v -64.079262 10.007396 -9.351896 +v -66.772987 -11.885618 -0.202999 +v -65.171471 3.033510 -5.474240 +v -62.667759 7.148978 -8.351185 +v -62.986851 9.870845 -6.308486 +v -66.772987 -11.885618 -0.202999 +v -66.724846 1.179926 10.029461 +v -59.689461 8.144950 1.861810 +v -58.212650 12.086802 -3.032124 +v -66.724846 1.179926 10.029461 +v -57.915882 6.628378 1.958869 +v -55.509857 10.279719 -2.976122 +v -66.724846 1.179926 10.029461 +v -56.296860 6.188433 3.356508 +v -52.637226 10.233272 -1.254851 +v -66.724846 1.179926 10.029461 +v -56.051727 7.156466 5.002278 +v -51.757839 11.982401 0.835560 +v -66.724846 1.179926 10.029461 +v -57.364841 8.803489 5.656901 +v -53.533970 14.210047 1.721019 +v -66.724846 1.179926 10.029461 +v -59.247578 9.889247 4.827473 +v -56.628082 15.238695 0.734676 +v -66.724846 1.179926 10.029461 +v -60.282143 9.596194 3.138459 +v -58.710255 14.293749 -1.380639 +v -55.284286 12.617801 -0.764661 +v -66.724846 1.179926 10.029461 +v -53.999989 26.333338 -9.944447 +v -53.999989 2.333334 -9.944447 +v -50.999989 3.941031 -4.748295 +v -53.999989 3.941031 -3.944447 +v -55.800003 6.941027 -4.748295 +v -57.996159 5.774363 -6.944447 +v -58.800007 5.774363 -9.944447 +v -43.607685 8.333335 -9.944447 +v -45.444431 8.333335 -0.081627 +v -48.803837 8.333335 -0.944447 +v -53.999989 10.666674 1.822437 +v -59.196140 8.333335 -0.944447 +v -62.999989 8.333335 -4.748294 +v -64.192299 7.533351 -9.944447 +v -37.199986 18.654428 -9.944447 +v -39.252125 18.654428 -0.061920 +v -43.644428 18.654428 3.756354 +v -53.999989 14.333338 2.055553 +v -61.410072 13.476199 -1.042666 +v -64.609299 13.476199 -6.367094 +v -66.399986 12.333346 -9.944447 +v -38.807682 21.886042 -9.944447 +v -40.644428 21.886042 -0.760713 +v -44.448277 21.886042 2.546009 +v -53.999989 20.333338 0.447858 +v -60.293266 19.476198 -2.199143 +v -63.063873 19.476198 -6.810235 +v -64.392296 20.333338 -9.944447 +v -43.199986 24.251795 -9.944447 +v -44.003834 24.251795 -7.336517 +v -46.644428 24.251795 -0.760711 +v -53.999989 24.725641 -3.944446 +v -56.999985 24.725641 -4.748293 +v -59.196140 24.725641 -6.944447 +v -59.999992 24.725641 -9.944447 +v -61.567451 17.809526 -2.544080 +v -61.859703 18.476198 -3.143273 +v -62.298088 18.642870 -4.042075 +v -62.736469 18.142870 -4.940860 +v -62.955631 16.976198 -5.390261 +v -63.247864 16.309526 -5.989458 +v -63.320908 15.142870 -6.139256 +v -62.955631 14.642870 -5.390261 +v -62.371128 14.476198 -4.191869 +v -61.640526 15.309526 -2.693877 +v -61.421349 16.642870 -2.244477 +v -61.724983 18.155695 -3.369263 +v -61.894066 18.041590 -3.958856 +v -62.070351 17.699663 -4.573657 +v -62.118629 16.981066 -4.741918 +v -62.201881 16.161669 -5.032282 +v -62.366032 15.399149 -5.604844 +v -62.332207 15.061815 -5.486823 +v -62.077385 15.070856 -4.598178 +v -61.738106 15.737185 -3.414914 +v -61.553413 16.745081 -2.770823 +v -61.582451 17.634455 -2.872150 +v -6.305182 -14.182098 -10.000000 +v -6.229439 -10.722575 -0.594703 +v -6.229439 -10.722575 -19.405296 +v -39.194733 -9.356718 -28.479759 +v -31.498898 -9.618716 -16.877310 +v -22.998137 -7.403383 -20.583092 +v -15.182299 -14.329319 -14.042381 +v -32.121948 -11.536249 -10.000000 +v -31.498898 -9.618716 -3.122690 +v -15.182299 -14.329319 -5.957618 +v -44.949730 -12.268521 -17.058643 +v -51.647591 -5.708694 -10.000000 +v -44.949730 -12.268521 -2.941359 +v -49.713837 -2.983590 1.421121 +v -39.194733 -9.356718 8.479760 +v -22.998137 -7.403383 0.583091 +v -49.713837 -2.983590 -21.421116 +v -53.999989 26.333338 -9.988887 +v -53.999989 2.333334 -9.988887 +v -50.999989 3.941031 -15.185039 +v -53.999989 3.941031 -15.988886 +v -55.800003 6.941027 -15.185039 +v -57.996159 5.774363 -12.988887 +v -58.800007 5.774363 -9.988887 +v -43.607685 8.333335 -9.988887 +v -45.444431 8.333335 -19.851706 +v -48.803837 8.333335 -18.988886 +v -53.999989 10.666674 -21.755770 +v -59.196140 8.333335 -18.988886 +v -62.999989 8.333335 -15.185039 +v -64.192299 7.533351 -9.988887 +v -37.199986 18.654428 -9.988887 +v -39.252125 18.654428 -19.871412 +v -43.644428 18.654428 -23.689688 +v -53.999989 14.333338 -21.988886 +v -61.410072 13.476199 -18.890669 +v -64.609299 13.476199 -13.566239 +v -66.399986 12.333346 -9.988887 +v -38.807682 21.886042 -9.988887 +v -40.644428 21.886042 -19.172621 +v -44.448277 21.886042 -22.479342 +v -53.999989 20.333338 -20.381189 +v -60.293266 19.476198 -17.734190 +v -63.063873 19.476198 -13.123098 +v -64.392296 20.333338 -9.988887 +v -43.199986 24.251795 -9.988887 +v -44.003834 24.251795 -12.596816 +v -46.644428 24.251795 -19.172621 +v -53.999989 24.725641 -15.988886 +v -56.999985 24.725641 -15.185040 +v -59.196140 24.725641 -12.988887 +v -59.999992 24.725641 -9.988887 +v -61.567451 17.809526 -17.389254 +v -61.859703 18.476198 -16.790060 +v -62.298088 18.642870 -15.891256 +v -62.736469 18.142870 -14.992473 +v -62.955631 16.976198 -14.543073 +v -63.247864 16.309526 -13.943875 +v -63.320908 15.142870 -13.794078 +v -62.955631 14.642870 -14.543073 +v -62.371128 14.476198 -15.741465 +v -61.640526 15.309526 -17.239454 +v -61.421349 16.642870 -17.688856 +v -61.724983 18.155695 -16.564070 +v -61.894066 18.041590 -15.974478 +v -62.070351 17.699663 -15.359674 +v -62.118629 16.981066 -15.191415 +v -62.201881 16.161669 -14.901052 +v -62.366032 15.399149 -14.328490 +v -62.332207 15.061815 -14.446509 +v -62.077385 15.070856 -15.335154 +v -61.738106 15.737185 -16.518419 +v -61.553413 16.745081 -17.162512 +v -61.582451 17.634455 -17.061182 +v -66.591156 -11.976528 -20.112152 +v -63.789349 3.570786 -16.484684 +v -61.314701 6.249245 -14.502876 +v -66.591156 -11.976528 -20.112152 +v -64.664154 4.277802 -18.239491 +v -61.265766 8.099188 -16.668116 +v -66.591156 -11.976528 -20.112152 +v -66.955276 4.531182 -18.783955 +v -62.375992 11.214703 -16.829237 +v -66.591156 -11.976528 -20.112152 +v -68.937363 4.140175 -17.708055 +v -63.809261 13.249859 -14.864899 +v -66.591156 -11.976528 -20.112152 +v -69.118042 3.399224 -15.821981 +v -64.486374 12.672115 -12.254288 +v -66.591156 -11.976528 -20.112152 +v -67.361160 2.866211 -14.545990 +v -63.897427 9.916485 -10.963255 +v -66.591156 -11.976528 -20.112152 +v -64.989639 2.942601 -14.840912 +v -62.485947 7.058069 -11.963966 +v -62.805038 9.779934 -14.006666 +v -66.591156 -11.976528 -20.112152 +v -66.724846 1.234471 -28.696123 +v -59.689461 8.199495 -20.528475 +v -58.212650 12.141348 -15.634542 +v -66.724846 1.234471 -28.696123 +v -57.915882 6.682923 -20.625532 +v -55.509857 10.334265 -15.690544 +v -66.724846 1.234471 -28.696123 +v -56.296860 6.242978 -22.023172 +v -52.637226 10.287817 -17.411816 +v -66.724846 1.234471 -28.696123 +v -56.051727 7.211011 -23.668943 +v -51.757839 12.036945 -19.502226 +v -66.724846 1.234471 -28.696123 +v -57.364841 8.858034 -24.323565 +v -53.533970 14.264591 -20.387682 +v -66.724846 1.234471 -28.696123 +v -59.247578 9.943792 -23.494139 +v -56.628082 15.293240 -19.401342 +v -66.724846 1.234471 -28.696123 +v -60.282143 9.650740 -21.805124 +v -58.710255 14.348293 -17.286026 +v -55.284286 12.672346 -17.902004 +v -66.724846 1.234471 -28.696123 +v -59.670547 17.670856 -1.853035 +v -58.743614 17.518467 -2.271704 +v -59.467049 18.406742 -2.538975 +v -60.637596 18.103474 -2.337921 +v -61.555885 18.154240 -3.372073 +v -60.575226 18.690861 -3.431842 +v -61.644852 18.262333 -4.609260 +v -61.384178 17.941105 -5.717274 +v -61.278061 15.979283 -6.500585 +v -61.481544 16.983921 -6.448156 +v -62.267357 17.284794 -5.621511 +v -62.614960 16.491169 -5.094203 +v -62.204987 16.131672 -6.081918 +v -62.267357 15.544271 -4.988010 +v -61.384178 14.979936 -4.639498 +v -61.481544 15.243386 -5.814656 +v -60.474304 15.084535 -3.543311 +v -59.564423 15.709020 -2.636348 +v -61.644852 15.446095 -3.584234 +v -61.555885 16.324146 -2.705970 +v -60.575226 15.874639 -2.406815 +v -60.637596 17.027775 -1.946398 +v -59.467049 16.666218 -1.905474 +v -61.745773 17.311893 -2.839265 +v -62.368286 17.410069 -4.243031 +v -62.368286 16.334370 -3.851508 +v -59.670547 17.404190 -17.880299 +v -58.743614 17.251801 -17.461630 +v -59.467049 18.140076 -17.194359 +v -60.637596 17.836807 -17.395412 +v -61.555885 17.887573 -16.361259 +v -60.575226 18.424194 -16.301491 +v -61.644852 17.995667 -15.124073 +v -61.384178 17.674438 -14.016060 +v -61.278061 15.712616 -13.232748 +v -61.481544 16.717255 -13.285177 +v -62.267357 17.018127 -14.111822 +v -62.614960 16.224503 -14.639130 +v -62.204987 15.865005 -13.651415 +v -62.267357 15.277603 -14.745323 +v -61.384178 14.713268 -15.093836 +v -61.481544 14.976719 -13.918678 +v -60.474304 14.817867 -16.190023 +v -59.564423 15.442352 -17.096985 +v -61.644852 15.179428 -16.149099 +v -61.555885 16.057480 -17.027363 +v -60.575226 15.607971 -17.326519 +v -60.637596 16.761108 -17.786934 +v -59.467049 16.399551 -17.827860 +v -61.745773 17.045227 -16.894068 +v -62.368286 17.143402 -15.490303 +v -62.368286 16.067703 -15.881825 +# 762 vertices + +vt 0.186192 0.222718 +vt 0.503180 0.039063 +vt 0.236448 0.237339 +vt 0.381464 0.276197 +vt 0.574917 0.134554 +vt 0.746941 0.113737 +vt 0.074073 0.345855 +vt 0.049334 0.521438 +vt 0.156004 0.412922 +vt 0.156004 0.629954 +vt 0.381464 0.801928 +vt 0.360095 0.539063 +vt 0.619252 0.384554 +vt 0.619252 0.693571 +vt 0.822369 0.539063 +vt 0.834074 0.289063 +vt 1.023438 0.539063 +vt 0.972818 0.539063 +vt 0.922506 0.289063 +vt 0.834074 0.789063 +vt 0.746941 0.964388 +vt 0.922506 0.789063 +vt 0.574917 0.943571 +vt 0.236448 0.805537 +vt 0.186192 0.820158 +vt 0.503180 1.039063 +vt 0.284677 0.805537 +vt 0.624896 0.801928 +vt 0.718002 0.943571 +vt 0.850769 0.693571 +vt 0.646266 0.539063 +vt 0.624896 0.276197 +vt 0.850769 0.384554 +vt 0.234041 0.629954 +vt 0.100045 0.521438 +vt 0.234041 0.412922 +vt 0.103881 0.345855 +vt 0.284677 0.237339 +vt 0.718002 0.134554 +vt 0.023438 0.521438 +vt 0.074073 0.697021 +vt 0.103881 0.697021 +vt -0.065871 -0.410016 +vt 0.403088 -0.109437 +vt 0.127441 -0.364995 +vt 0.403088 0.184267 +vt 0.678735 0.008835 +vt 1.058291 -0.016948 +vt -0.318566 -0.030837 +vt -0.355704 0.509840 +vt -0.042919 0.175683 +vt -0.042919 0.843998 +vt 0.403088 0.835414 +vt 0.403088 0.509840 +vt 1.035339 0.318473 +vt 1.035339 0.701207 +vt 1.348124 0.509840 +vt 1.310985 0.064592 +vt 1.481345 0.509840 +vt 1.310985 0.955089 +vt 1.058291 1.036629 +vt 0.678735 1.010846 +vt 0.127441 1.384675 +vt -0.065871 1.429696 +vt 0.403088 1.129117 +vt -0.488925 0.509840 +vt -0.318566 1.050518 +vt 0.000000 1.000000 +vt 0.000000 0.000000 +vt 0.000000 0.166667 +vt 0.142857 0.166667 +vt 0.142857 0.000000 +vt 0.000000 0.333333 +vt 0.142857 0.333333 +vt 0.000000 0.500000 +vt 0.142857 0.500000 +vt 0.000000 0.666667 +vt 0.142857 0.666667 +vt 0.000000 0.833333 +vt 0.142857 0.833333 +vt 0.142857 1.000000 +vt 0.285714 0.000000 +vt 0.285714 0.166667 +vt 0.285714 0.333333 +vt 0.285714 0.500000 +vt 0.285714 0.666667 +vt 0.285714 0.833333 +vt 0.285714 1.000000 +vt 0.428571 0.166667 +vt 0.428571 0.000000 +vt 0.428571 0.333333 +vt 0.428571 0.500000 +vt 0.428571 0.666667 +vt 0.428571 0.833333 +vt 0.428571 1.000000 +vt 0.571429 0.000000 +vt 0.571429 0.166667 +vt 0.571429 0.333333 +vt 0.571429 0.500000 +vt 0.571429 0.666667 +vt 0.571429 0.833333 +vt 0.571429 1.000000 +vt 0.714286 0.166667 +vt 0.714286 0.000000 +vt 0.714286 0.333333 +vt 0.714286 0.500000 +vt 0.714286 0.666667 +vt 0.714286 0.833333 +vt 0.714286 1.000000 +vt 0.857143 0.000000 +vt 0.857143 0.166667 +vt 0.857143 0.333333 +vt 0.857143 0.500000 +vt 0.857143 0.666667 +vt 0.857143 0.833333 +vt 0.857143 1.000000 +vt 1.000000 0.166667 +vt 1.000000 0.000000 +vt 1.000000 0.333333 +vt 1.000000 0.500000 +vt 1.000000 0.666667 +vt 1.000000 0.833333 +vt 1.000000 1.000000 +vt 0.332919 0.272694 +vt 0.446895 0.397773 +vt 0.456977 0.422004 +vt 0.402899 0.410469 +vt 0.406626 0.379392 +vt 0.370970 0.384244 +vt 0.399625 0.431850 +vt 0.359907 0.385983 +vt 0.439539 0.445817 +vt 0.381768 0.383299 +vt 0.492584 0.441852 +vt 0.420092 0.378214 +vt 0.518816 0.422941 +vt 0.446019 0.374556 +vt 0.498483 0.403324 +vt 0.440026 0.375080 +vt 0.344810 0.338084 +vt 0.488018 0.424091 +vt 0.463158 0.428278 +vt 0.487405 0.409841 +vt 0.434361 0.393007 +vt 0.433297 0.381048 +vt 0.468532 0.409475 +vt 0.417973 0.377579 +vt 0.445613 0.423268 +vt 0.399928 0.385213 +vt 0.435904 0.440834 +vt 0.392751 0.398200 +vt 0.446719 0.448945 +vt 0.401845 0.406762 +vt 0.469911 0.441494 +vt 0.420363 0.404451 +vt 0.190349 0.913269 +vt 0.000000 0.913269 +vt 0.670306 0.913269 +vt 0.379259 0.066987 +vt 0.437931 0.066987 +vt 0.437931 0.933013 +vt 0.379259 0.191987 +vt 0.379259 0.933013 +vt 0.218965 0.143376 +vt 0.218965 0.933013 +vt 0.000000 0.143376 +vt 0.000000 0.933013 +vt 0.719872 0.250000 +vt 0.656896 0.250000 +vt 0.858846 0.347222 +vt 0.379259 0.250000 +vt 0.000000 0.216667 +vt 0.000000 0.250000 +vt 0.000000 0.680045 +vt 0.721310 0.680045 +vt 1.000000 0.680045 +vt 0.875861 0.500000 +vt 0.649727 0.464286 +vt 0.261105 0.464286 +vt 0.000000 0.416667 +vt 0.000000 0.814696 +vt 0.670306 0.814696 +vt 0.911659 0.814696 +vt 0.758518 0.750000 +vt 0.565318 0.714286 +vt 0.228761 0.714286 +vt 0.000000 0.750000 +vt 0.277735 0.533731 +vt 0.316741 0.544409 +vt 0.325355 0.530353 +vt 0.332403 0.512897 +vt 0.419872 0.505953 +vt 0.390216 0.530730 +vt 0.476580 0.558494 +vt 0.529208 0.540675 +vt 0.523592 0.600489 +vt 0.562009 0.596231 +vt 0.516196 0.637547 +vt 0.540141 0.644841 +vt 0.479912 0.659265 +vt 0.496407 0.672619 +vt 0.430805 0.679564 +vt 0.436879 0.654511 +vt 0.365204 0.658731 +vt 0.392006 0.640264 +vt 0.379724 0.610322 +vt 0.332403 0.610119 +vt 0.358531 0.576181 +vt 0.288668 0.582341 +vt 0.445345 0.686077 +vt 0.607126 0.786343 +vt 0.816422 0.609373 +vt 0.978203 0.754476 +vt 0.445345 0.500000 +vt 0.445345 0.313923 +vt 0.816422 0.390627 +vt 0.183578 0.690983 +vt 0.183578 0.309017 +vt 0.021797 0.190983 +vt 0.283564 0.000000 +vt 0.607126 0.213657 +vt 0.978203 0.245524 +vt 0.283564 1.000000 +vt 0.021797 0.809017 +vt 1.000000 0.913269 +vt 0.809651 0.913269 +vt 0.329694 0.913269 +vt 0.562069 0.066987 +vt 0.620741 0.066987 +vt 0.562069 0.933013 +vt 0.620741 0.191987 +vt 0.620741 0.933013 +vt 0.781035 0.143376 +vt 0.781035 0.933013 +vt 1.000000 0.143376 +vt 1.000000 0.933013 +vt 0.343104 0.250000 +vt 0.280128 0.250000 +vt 0.141154 0.347222 +vt 0.620741 0.250000 +vt 1.000000 0.216667 +vt 1.000000 0.250000 +vt 0.278690 0.680045 +vt 0.124139 0.500000 +vt 0.350273 0.464286 +vt 0.738895 0.464286 +vt 1.000000 0.416667 +vt 0.329694 0.814696 +vt 1.000000 0.814696 +vt 0.088341 0.814696 +vt 0.241482 0.750000 +vt 0.434682 0.714286 +vt 0.771239 0.714286 +vt 1.000000 0.750000 +vt 0.674645 0.530353 +vt 0.683259 0.544409 +vt 0.722265 0.533731 +vt 0.667597 0.512897 +vt 0.580128 0.505953 +vt 0.609784 0.530730 +vt 0.523420 0.558494 +vt 0.470792 0.540675 +vt 0.437991 0.596231 +vt 0.476408 0.600489 +vt 0.459859 0.644841 +vt 0.483804 0.637547 +vt 0.520088 0.659265 +vt 0.503593 0.672619 +vt 0.569195 0.679564 +vt 0.563121 0.654511 +vt 0.634796 0.658731 +vt 0.607995 0.640264 +vt 0.620276 0.610322 +vt 0.667597 0.610119 +vt 0.641469 0.576181 +vt 0.711332 0.582341 +vt 1.046875 0.772010 +vt 0.956791 0.730945 +vt 0.899283 0.970312 +vt 0.942544 0.888589 +vt 0.720028 0.902269 +vt 0.707168 1.046875 +vt 0.453826 0.931398 +vt 0.215418 0.844835 +vt 0.058156 0.586898 +vt 0.236023 0.667976 +vt 0.349482 0.454114 +vt 0.136958 0.357239 +vt 0.046875 0.316174 +vt 0.372331 0.198949 +vt 0.447320 0.046875 +vt 0.194464 0.117868 +vt 0.683183 0.075062 +vt 0.674378 0.172493 +vt 0.863351 0.409106 +vt 0.927720 0.287975 +vt 0.878332 0.243345 +vt 1.026786 0.598716 +vt 1.035592 0.501285 +vt 0.834671 0.675278 +vt 0.532626 0.701734 +vt 0.616869 0.411861 +# 302 texture coordinates + +vn -0.537588 -0.071798 0.840146 +vn -0.151555 -0.017111 0.988301 +vn -0.510264 0.347193 0.786822 +vn -0.383883 0.724753 0.572160 +vn 0.006791 0.547083 0.837051 +vn 0.441964 0.160862 0.882492 +vn -0.810413 0.184718 0.555976 +vn -0.915534 0.402240 -0.000000 +vn -0.710113 0.620185 0.333331 +vn -0.721673 0.607891 -0.331145 +vn -0.413629 0.701858 -0.579920 +vn -0.409411 0.912350 0.000434 +vn 0.132323 0.938010 0.320355 +vn 0.132323 0.938010 -0.320355 +vn 0.339768 0.940509 -0.000000 +vn 0.481852 0.617859 0.621345 +vn 0.881337 0.472488 -0.000000 +vn 0.942952 -0.332930 -0.000000 +vn 0.795204 -0.092522 0.599242 +vn 0.481852 0.617859 -0.621345 +vn 0.441964 0.160862 -0.882492 +vn 0.795204 -0.092522 -0.599242 +vn -0.012521 0.539701 -0.841764 +vn -0.544858 0.327294 -0.772016 +vn -0.561303 -0.075179 -0.824189 +vn -0.195775 -0.027076 -0.980275 +vn -0.299847 -0.529265 -0.793707 +vn 0.144885 -0.802478 -0.578824 +vn 0.343163 -0.420370 -0.839957 +vn 0.704306 -0.633502 -0.320355 +vn 0.260986 -0.965343 0.000322 +vn 0.173226 -0.803252 0.569894 +vn 0.704306 -0.633502 0.320355 +vn -0.346230 -0.872998 -0.343510 +vn -0.769195 -0.639014 0.000000 +vn -0.334289 -0.877615 0.343575 +vn -0.728104 -0.400942 0.555976 +vn -0.264904 -0.527345 0.807300 +vn 0.359321 -0.413990 0.836362 +vn -0.990268 -0.139173 -0.000000 +vn -0.810413 0.184718 -0.555976 +vn -0.728104 -0.400942 -0.555976 +vn -0.236279 0.029185 0.971247 +vn 0.320907 -0.108176 0.940913 +vn 0.232851 0.492069 0.838838 +vn 0.401159 0.816009 0.416173 +vn 0.362076 0.383575 0.849571 +vn 0.126098 -0.040972 0.991171 +vn -0.604687 0.614896 0.506218 +vn -0.478910 0.877864 -0.000000 +vn 0.038576 0.969348 0.242645 +vn 0.038576 0.969348 -0.242645 +vn 0.401159 0.816009 -0.416173 +vn 0.360915 0.932599 0.000000 +vn 0.494411 0.798675 0.343038 +vn 0.494411 0.798675 -0.343038 +vn 0.861265 0.508156 -0.000000 +vn 0.647910 0.246087 0.720870 +vn 0.951057 -0.309017 -0.000000 +vn 0.743317 -0.668940 -0.000000 +vn 0.535463 -0.362827 0.762651 +vn 0.647910 0.246086 -0.720870 +vn 0.126098 -0.040972 -0.991171 +vn 0.535463 -0.362827 -0.762651 +vn 0.362076 0.383575 -0.849571 +vn 0.232851 0.492069 -0.838838 +vn -0.236279 0.029185 -0.971247 +vn 0.320907 -0.108176 -0.940913 +vn 0.132934 -0.415219 -0.899956 +vn 0.188857 -0.970911 -0.147192 +vn 0.199321 -0.435181 -0.878003 +vn -0.862018 0.083023 0.500032 +vn 0.132934 -0.415219 0.899956 +vn 0.199321 -0.435181 0.878002 +vn 0.188857 -0.970911 0.147192 +vn -0.930205 0.367040 -0.000000 +vn -0.997640 0.068658 -0.000000 +vn -0.604687 0.614896 -0.506218 +vn -0.862018 0.083023 -0.500032 +vn 0.021383 -0.916512 0.399436 +vn -0.781862 -0.431561 -0.449942 +vn 0.956336 0.228461 -0.182283 +vn 0.833901 -0.104561 -0.541919 +vn 0.767800 0.601842 0.219702 +vn 0.546124 0.782549 0.298940 +vn 0.910925 0.174919 -0.373656 +vn 0.748758 0.661676 -0.039313 +vn 0.949258 -0.047485 -0.310893 +vn 0.406836 0.802260 -0.436879 +vn 0.769156 0.182669 -0.612398 +vn 0.199512 0.609083 -0.767602 +vn 0.667603 0.001959 -0.744515 +vn -0.099388 0.414937 -0.904405 +vn 0.352774 0.079499 -0.932325 +vn -0.283318 0.420843 -0.861755 +vn -0.057479 0.857527 0.511218 +vn 0.131724 0.743022 0.656177 +vn -0.005809 0.859552 0.511016 +vn -0.350571 0.931431 -0.097655 +vn -0.647693 0.664816 -0.372173 +vn -0.898309 0.404808 -0.170794 +vn -0.866249 0.480043 -0.138459 +vn -0.715121 0.360250 0.599018 +vn -0.866625 0.341770 0.363530 +vn -0.662377 0.297013 0.687780 +vn -0.811725 0.388839 0.435782 +vn -0.950899 0.243388 0.191190 +vn -0.846773 0.078043 0.526199 +vn -0.759416 0.140950 0.635154 +vn -0.940011 -0.340515 -0.020693 +vn -0.972400 -0.204991 0.111430 +vn -0.817030 -0.331766 0.471585 +vn -0.616700 -0.385898 0.686122 +vn -0.565415 -0.413211 0.713837 +vn -0.342437 -0.316577 0.884599 +vn -0.263317 -0.310224 0.913469 +vn -0.492073 -0.677280 -0.546952 +vn -0.216535 -0.832588 -0.509814 +vn -0.336313 -0.936688 -0.097510 +vn 0.085084 -0.882948 0.461697 +vn 0.196057 -0.733951 0.650291 +vn 0.454815 -0.615703 0.643470 +vn 0.489338 -0.710824 0.505250 +vn 0.458185 -0.654603 -0.601300 +vn 0.273617 -0.575276 -0.770838 +vn 0.557258 -0.641859 -0.526765 +vn 0.770791 -0.636825 0.018306 +vn 0.873238 -0.487283 0.003170 +vn 0.878760 -0.285726 -0.382285 +vn 0.775252 -0.453136 -0.440060 +vn 0.076768 -0.902254 -0.424317 +vn -0.760858 -0.310029 0.570067 +vn 0.698983 0.632728 -0.333285 +vn 0.918945 -0.018611 0.393945 +vn 0.946923 0.242706 0.210787 +vn 0.597706 0.775902 -0.201801 +vn 0.898457 0.395975 0.189682 +vn 0.584977 0.777578 -0.230597 +vn 0.061121 0.865503 0.497161 +vn 0.814891 0.173456 0.553052 +vn 0.488324 0.052196 0.871100 +vn -0.073338 0.372458 0.925147 +vn -0.168557 0.420636 0.891433 +vn 0.562606 0.011650 0.826643 +vn 0.424549 0.220069 0.878253 +vn -0.202274 0.574889 0.792835 +vn -0.201495 0.870711 -0.448622 +vn -0.147519 0.700066 -0.698674 +vn -0.247406 0.680029 -0.690182 +vn -0.659229 0.742690 -0.117596 +vn -0.823828 0.514402 0.238115 +vn -0.880755 0.462224 0.103053 +vn -0.835446 0.538148 0.111476 +vn -0.835433 0.291149 -0.466138 +vn -0.799017 0.476863 -0.366296 +vn -0.796565 -0.008375 -0.604495 +vn -0.746076 0.124458 -0.654126 +vn -0.847027 0.257512 -0.465008 +vn -0.774335 0.094113 -0.625738 +vn -0.799434 0.067311 -0.596971 +vn -0.914826 -0.403289 0.021240 +vn -0.960708 -0.276547 0.023720 +vn -0.776094 -0.562737 -0.284613 +vn -0.248105 -0.514857 -0.820589 +vn -0.231599 -0.234207 -0.944198 +vn -0.235950 -0.324119 -0.916119 +vn -0.342337 -0.448272 -0.825747 +vn -0.389047 -0.677991 0.623675 +vn -0.286549 -0.868467 0.404542 +vn -0.058292 -0.911347 0.407491 +vn 0.455951 -0.795072 -0.399962 +vn 0.489715 -0.524665 -0.696352 +vn 0.515843 -0.636580 -0.573300 +vn 0.423912 -0.809501 -0.406210 +vn 0.535603 -0.635581 0.556027 +vn 0.490862 -0.467516 0.735176 +vn 0.731377 -0.368576 0.573793 +vn 0.890119 -0.387697 0.239538 +vn 0.883630 -0.404120 0.236399 +vn 0.822699 -0.324540 0.466733 +vn 0.789247 -0.408589 0.458414 +vn -0.072988 -0.902254 0.424984 +vn -0.288148 -0.512224 -0.809072 +vn 0.918806 0.383987 0.091372 +vn 0.993163 0.114096 -0.024688 +vn 0.434383 0.709098 0.555420 +vn 0.471863 0.805177 0.359216 +vn 0.868051 0.441893 0.226313 +vn 0.386966 0.811178 0.438461 +vn 0.971729 0.236044 0.005163 +vn 0.277939 0.903859 -0.325252 +vn 0.907561 0.183989 -0.377467 +vn 0.389798 0.457680 -0.799116 +vn 0.974181 -0.045977 -0.221037 +vn 0.441749 0.266583 -0.856616 +vn 0.886674 0.017475 -0.462065 +vn 0.372092 0.327554 -0.868479 +vn -0.385080 0.834046 0.395071 +vn -0.476106 0.659961 0.581185 +vn -0.556161 0.685573 0.469761 +vn -0.626859 0.745436 -0.226656 +vn -0.554271 0.436146 -0.708915 +vn -0.561559 0.310302 -0.767049 +vn -0.543810 0.416915 -0.728322 +vn -0.974714 0.176358 0.137223 +vn -0.917252 0.369282 0.149263 +vn -0.982764 -0.036304 0.181267 +vn -0.987205 0.070377 0.143084 +vn -0.988708 0.090661 -0.119319 +vn -0.995465 0.069805 -0.064628 +vn -0.986899 0.153108 -0.050882 +vn -0.785702 -0.546219 -0.290374 +vn -0.802167 -0.447423 -0.395400 +vn -0.788300 -0.609188 -0.086443 +vn -0.635308 -0.586832 0.502008 +vn -0.748920 -0.342648 0.567196 +vn -0.829075 -0.199820 0.522213 +vn -0.811409 -0.243593 0.531299 +vn -0.029726 -0.712976 -0.700558 +vn -0.121255 -0.870385 -0.477207 +vn 0.151176 -0.929851 -0.335445 +vn 0.202841 -0.825731 0.526331 +vn 0.080914 -0.528183 0.845266 +vn 0.010675 -0.474241 0.880330 +vn 0.014489 -0.635546 0.771927 +vn 0.742724 -0.545146 -0.388814 +vn 0.786510 -0.383302 -0.484233 +vn 0.920594 -0.358142 -0.155695 +vn 0.889767 -0.359426 0.281297 +vn 0.873005 -0.294226 0.388965 +vn 0.907656 -0.291730 0.301752 +vn 0.863097 -0.445709 0.237502 +vn 0.041443 -0.908865 -0.415027 +vn -0.109957 -0.084548 0.990334 +vn 0.245131 0.763260 -0.597783 +vn 0.955445 0.284327 -0.079261 +vn 0.823805 0.535171 -0.186913 +vn 0.285353 0.867913 -0.406571 +vn 0.750150 0.580981 -0.315809 +vn 0.193001 0.857724 -0.476509 +vn 0.122062 0.961258 0.247151 +vn 0.890764 0.429947 -0.147257 +vn 0.869360 0.404802 0.283458 +vn 0.342558 0.602318 0.721018 +vn 0.449593 0.557051 0.698255 +vn 0.979971 0.160598 0.117751 +vn 0.912952 0.330027 0.240004 +vn 0.396960 0.742707 0.539267 +vn -0.562652 0.747701 -0.352655 +vn -0.640733 0.557163 -0.528234 +vn -0.712118 0.570582 -0.409053 +vn -0.719414 0.632988 0.285953 +vn -0.541635 0.392908 0.743139 +vn -0.506872 0.445328 0.738081 +vn -0.530036 0.658014 0.534864 +vn -0.999398 0.002857 -0.034586 +vn -0.977859 0.202556 -0.052566 +vn -0.974887 -0.208763 -0.077548 +vn -0.990809 -0.134971 -0.008911 +vn -0.971468 -0.084083 0.221765 +vn -0.983987 -0.035832 0.174602 +vn -0.987930 0.055655 0.144559 +vn -0.644785 -0.668339 0.370912 +vn -0.667256 -0.571980 0.477084 +vn -0.657389 -0.734501 0.168369 +vn -0.560535 -0.736307 -0.379015 +vn -0.692904 -0.540327 -0.477421 +vn -0.805447 -0.450708 -0.384860 +vn -0.807097 -0.552297 -0.208715 +vn 0.166809 -0.694562 0.699828 +vn 0.081505 -0.869441 0.487268 +vn 0.344060 -0.883528 0.317807 +vn 0.303265 -0.806548 -0.507455 +vn 0.132506 -0.587487 -0.798312 +vn 0.022610 -0.693630 -0.719976 +vn 0.045100 -0.923914 -0.379933 +vn 0.862122 -0.401541 0.309048 +vn 0.886724 -0.232862 0.399368 +vn 0.979859 -0.190892 0.058615 +vn 0.901262 -0.198277 -0.385245 +vn 0.854374 -0.181939 -0.486768 +vn 0.901238 -0.252507 -0.352151 +vn 0.898278 -0.412999 -0.150093 +vn -0.272473 -0.916512 -0.292854 +vn 0.247462 -0.431597 0.867460 +vn 0.375319 0.601842 -0.704927 +vn 0.969100 -0.104559 -0.223412 +vn 0.795449 0.228463 -0.561307 +vn 0.164332 0.782548 -0.600511 +vn 0.901567 0.174919 -0.395701 +vn 0.548411 0.661676 -0.511303 +vn 0.596875 0.802261 0.010829 +vn 0.883048 -0.047484 -0.466875 +vn 0.975847 0.140489 -0.167289 +vn 0.695006 0.600563 0.395335 +vn 0.804391 0.375485 0.460397 +vn 0.950455 -0.062330 -0.304551 +vn 0.989975 0.079498 -0.116747 +vn 0.767612 0.420846 0.483385 +vn -0.407667 0.857527 -0.313775 +vn -0.380509 0.743022 -0.550574 +vn -0.371629 0.859552 -0.350803 +vn -0.173281 0.931431 0.320017 +vn -0.088344 0.681833 0.726154 +vn -0.097862 0.460784 0.882100 +vn -0.075217 0.480042 0.874015 +vn -0.927662 0.360250 0.098302 +vn -0.863510 0.341772 0.370868 +vn -0.954873 0.297012 -0.001297 +vn -0.877348 0.388838 0.281187 +vn -0.798205 0.258643 0.544033 +vn -0.830945 0.129933 0.540970 +vn -0.800009 0.140946 0.583197 +vn -0.638103 -0.340513 0.690562 +vn -0.755642 -0.204991 0.622080 +vn -0.906786 -0.331767 0.260133 +vn -0.921950 -0.385899 -0.033004 +vn -0.932303 -0.360848 -0.024508 +vn -0.971643 -0.236380 0.005919 +vn -0.950036 -0.310227 0.034503 +vn 0.051621 -0.677280 0.733912 +vn 0.216310 -0.832587 0.509910 +vn -0.163481 -0.936688 0.309662 +vn -0.273013 -0.882948 -0.381925 +vn -0.334489 -0.728676 -0.597619 +vn -0.408235 -0.602580 -0.685741 +vn -0.371857 -0.710825 -0.597035 +vn 0.750822 -0.654602 0.088107 +vn 0.744565 -0.575276 0.338646 +vn 0.766027 -0.641859 -0.034936 +vn 0.522268 -0.636825 -0.567176 +vn 0.527667 -0.527467 -0.665842 +vn 0.641037 -0.375221 -0.669538 +vn 0.614542 -0.453134 -0.645761 +vn -0.272476 -0.916512 0.292854 +vn 0.247445 -0.431549 -0.867488 +vn 0.795449 0.228463 0.561307 +vn 0.969100 -0.104559 0.223412 +vn 0.375318 0.601842 0.704927 +vn 0.164332 0.782548 0.600511 +vn 0.901567 0.174919 0.395701 +vn 0.548410 0.661676 0.511303 +vn 0.883047 -0.047485 0.466875 +vn 0.596875 0.802261 -0.010829 +vn 0.975847 0.140489 0.167289 +vn 0.695006 0.600564 -0.395336 +vn 0.950454 -0.062330 0.304551 +vn 0.804391 0.375485 -0.460397 +vn 0.989975 0.079498 0.116747 +vn 0.767611 0.420846 -0.483385 +vn -0.407667 0.857527 0.313775 +vn -0.380509 0.743022 0.550574 +vn -0.371629 0.859552 0.350803 +vn -0.173281 0.931431 -0.320017 +vn -0.088345 0.681833 -0.726154 +vn -0.097862 0.460784 -0.882100 +vn -0.075217 0.480042 -0.874015 +vn -0.927662 0.360250 -0.098302 +vn -0.863510 0.341772 -0.370868 +vn -0.954873 0.297012 0.001297 +vn -0.877348 0.388838 -0.281187 +vn -0.798205 0.258643 -0.544033 +vn -0.830945 0.129933 -0.540970 +vn -0.800010 0.140945 -0.583196 +vn -0.638103 -0.340513 -0.690562 +vn -0.755642 -0.204991 -0.622081 +vn -0.906786 -0.331767 -0.260133 +vn -0.921950 -0.385899 0.033004 +vn -0.932303 -0.360848 0.024508 +vn -0.971643 -0.236380 -0.005919 +vn -0.950036 -0.310227 -0.034503 +vn 0.051621 -0.677280 -0.733912 +vn 0.216310 -0.832587 -0.509910 +vn -0.163481 -0.936687 -0.309662 +vn -0.273013 -0.882948 0.381925 +vn -0.334488 -0.728676 0.597620 +vn -0.408235 -0.602580 0.685741 +vn -0.371857 -0.710825 0.597035 +vn 0.750822 -0.654602 -0.088107 +vn 0.744565 -0.575276 -0.338646 +vn 0.766027 -0.641859 0.034936 +vn 0.522268 -0.636825 0.567177 +vn 0.527667 -0.527467 0.665842 +vn 0.641037 -0.375221 0.669538 +vn 0.614542 -0.453134 0.645761 +vn -0.287103 -0.930941 -0.225656 +vn 0.184368 -0.421801 0.887746 +vn 0.074051 0.631917 -0.771490 +vn 0.855333 0.060647 -0.514517 +vn 0.730773 0.322890 -0.601426 +vn 0.209807 0.742786 -0.635807 +vn 0.616222 0.371327 -0.694540 +vn 0.095819 0.746431 -0.658528 +vn 0.408064 0.912344 0.033360 +vn 0.821336 0.180467 -0.541146 +vn 0.969682 0.166170 -0.179176 +vn 0.754037 0.504418 0.420704 +vn 0.828561 0.316590 0.461798 +vn 0.943283 -0.080094 -0.322182 +vn 0.996799 0.009221 -0.079417 +vn 0.775768 0.382141 0.502148 +vn -0.535922 0.815786 -0.217442 +vn -0.711742 0.631198 -0.308241 +vn -0.720586 0.670982 -0.174754 +vn -0.411496 0.796168 0.443607 +vn -0.094379 0.527301 0.844421 +vn -0.069752 0.407704 0.910446 +vn -0.075227 0.509317 0.857284 +vn -0.899322 0.217218 0.379522 +vn -0.856971 0.404836 0.318918 +vn -0.929488 0.002263 0.368846 +vn -0.913020 0.111991 0.392239 +vn -0.775244 0.155507 0.612221 +vn -0.809953 0.130294 0.571839 +vn -0.809970 0.211451 0.547026 +vn -0.512438 -0.473965 0.716075 +vn -0.470746 -0.365488 0.803005 +vn -0.622708 -0.554524 0.552030 +vn -0.804795 -0.592927 -0.027236 +vn -0.935688 -0.349566 -0.047865 +vn -0.979826 -0.199093 0.017388 +vn -0.969660 -0.244405 0.004995 +vn 0.346030 -0.645322 0.681045 +vn 0.150051 -0.816598 0.557361 +vn 0.305963 -0.903395 0.300439 +vn -0.106894 -0.879100 -0.464497 +vn -0.379304 -0.604701 -0.700332 +vn -0.457451 -0.550271 -0.698527 +vn -0.396771 -0.701295 -0.592249 +vn 0.835906 -0.548834 -0.006518 +vn 0.923602 -0.381844 0.033966 +vn 0.863214 -0.393372 -0.316418 +vn 0.605500 -0.431678 -0.668598 +vn 0.534229 -0.375452 -0.757387 +vn 0.609831 -0.367158 -0.702354 +vn 0.606094 -0.512127 -0.608586 +vn -0.287104 -0.930941 0.225655 +vn 0.184384 -0.421751 -0.887766 +vn 0.730773 0.322890 0.601426 +vn 0.855333 0.060647 0.514517 +vn 0.074051 0.631917 0.771490 +vn 0.209807 0.742786 0.635807 +vn 0.616222 0.371327 0.694540 +vn 0.095818 0.746431 0.658528 +vn 0.821336 0.180467 0.541145 +vn 0.408064 0.912344 -0.033360 +vn 0.969682 0.166170 0.179175 +vn 0.754037 0.504418 -0.420704 +vn 0.943283 -0.080094 0.322182 +vn 0.828560 0.316590 -0.461799 +vn 0.996799 0.009221 0.079417 +vn 0.775768 0.382141 -0.502148 +vn -0.535922 0.815786 0.217442 +vn -0.711742 0.631198 0.308241 +vn -0.720586 0.670982 0.174754 +vn -0.411496 0.796168 -0.443607 +vn -0.094380 0.527301 -0.844421 +vn -0.069752 0.407704 -0.910446 +vn -0.075227 0.509317 -0.857285 +vn -0.899322 0.217218 -0.379522 +vn -0.856971 0.404836 -0.318918 +vn -0.929488 0.002263 -0.368845 +vn -0.913020 0.111991 -0.392239 +vn -0.775244 0.155506 -0.612221 +vn -0.809952 0.130294 -0.571839 +vn -0.809969 0.211450 -0.547027 +vn -0.512438 -0.473965 -0.716075 +vn -0.470746 -0.365488 -0.803005 +vn -0.622708 -0.554524 -0.552030 +vn -0.804795 -0.592928 0.027236 +vn -0.935688 -0.349566 0.047865 +vn -0.979826 -0.199093 -0.017388 +vn -0.969660 -0.244405 -0.004995 +vn 0.346030 -0.645322 -0.681045 +vn 0.150051 -0.816598 -0.557361 +vn 0.305964 -0.903395 -0.300439 +vn -0.106895 -0.879100 0.464496 +vn -0.379305 -0.604701 0.700332 +vn -0.457451 -0.550271 0.698527 +vn -0.396771 -0.701294 0.592249 +vn 0.835906 -0.548834 0.006518 +vn 0.923602 -0.381844 -0.033966 +vn 0.863214 -0.393373 0.316418 +vn 0.605500 -0.431679 0.668598 +vn 0.534230 -0.375452 0.757387 +vn 0.609831 -0.367158 0.702354 +vn 0.606094 -0.512126 0.608586 +vn 0.000000 0.000000 0.000000 +vn 0.891945 0.333606 -0.305190 +vn 0.885286 -0.051708 0.462163 +vn 0.871701 -0.486404 -0.059574 +vn 0.602535 -0.114023 0.789906 +vn 0.767332 -0.613878 0.185353 +vn 0.615704 -0.238766 0.750932 +vn -0.132228 0.076598 0.988255 +vn -0.134483 0.218923 0.966430 +vn -0.082654 0.333036 0.939285 +vn -0.794263 0.362851 0.487325 +vn -0.686973 0.538875 0.487527 +vn -0.911656 -0.242414 -0.331840 +vn -0.903470 -0.005854 -0.428611 +vn -0.880207 0.284493 -0.379868 +vn -0.359072 -0.293407 -0.885991 +vn -0.531215 -0.161650 -0.831673 +vn 0.521710 -0.333452 -0.785257 +vn 0.498223 -0.518213 -0.695147 +vn 0.319252 -0.666930 -0.673263 +vn 0.417209 0.602930 -0.680009 +vn -0.390952 -0.506393 -0.768585 +vn -0.785847 -0.219916 -0.577999 +vn -0.112803 -0.767065 -0.631575 +vn -0.676852 -0.452073 -0.580948 +vn -0.070613 -0.785109 -0.615320 +vn 0.404464 -0.913005 -0.053206 +vn 0.510041 -0.851111 -0.124372 +vn 0.600863 -0.776753 -0.188727 +vn 0.734160 -0.298249 0.609964 +vn 0.802855 -0.245127 0.543449 +vn 0.203920 0.286548 0.936113 +vn 0.259058 0.346923 0.901407 +vn 0.305077 0.413607 0.857821 +vn -0.395140 0.672313 0.625987 +vn -0.388204 0.672327 0.630297 +vn -0.844407 0.508563 -0.168344 +vn -0.907377 0.410201 -0.091666 +vn -0.943128 0.331776 0.020840 +vn -0.032685 0.987521 0.154060 +vn 0.285617 0.953018 0.100890 +vn 0.356408 0.929723 0.092678 +vn 0.058045 0.915295 0.398579 +vn -0.438098 -0.839825 0.320570 +vn 0.039808 -0.749385 0.660937 +vn -0.436422 -0.758689 0.483660 +vn -0.144622 0.858467 0.492057 +vn -0.390508 -0.802547 0.451023 +vn -0.378955 0.768626 0.515371 +vn -0.351840 -0.855427 0.380071 +vn -0.503913 0.811284 0.296463 +vn -0.434503 -0.886238 0.160593 +vn -0.589554 0.766850 0.253707 +vn 0.461124 -0.566742 0.682765 +vn -0.033279 -0.530249 0.847189 +vn -0.155076 -0.479386 0.863794 +vn -0.332554 -0.675497 0.658112 +vn -0.624353 -0.649034 0.434671 +vn -0.640430 -0.723275 0.258307 +vn 0.839146 -0.520972 0.156274 +vn 0.979386 -0.047392 0.196359 +vn 0.859197 -0.013066 0.511478 +vn 0.169781 0.017978 0.985318 +vn -0.298124 0.093164 0.949970 +vn -0.602581 0.140795 0.785540 +vn -0.760623 0.356880 0.542300 +vn -0.916442 -0.012784 0.399964 +vn 0.709959 0.689780 0.141992 +vn 0.616328 0.711155 0.338227 +vn 0.121528 0.638102 0.760300 +vn -0.308158 0.474484 0.824563 +vn -0.584949 0.497866 0.640284 +vn -0.831395 0.369875 0.414699 +vn -0.777389 0.439755 0.449757 +vn -0.712098 0.074375 0.698130 +vn -0.522162 -0.582125 0.623279 +vn -0.536293 0.842625 0.048710 +vn -0.627855 0.740316 0.240274 +vn -0.817995 0.476796 0.321792 +vn -0.729171 0.655795 0.195555 +vn -0.958544 0.215108 0.186875 +vn -0.950592 0.163928 0.263634 +vn -0.983392 -0.022830 0.180052 +vn -0.891745 0.110754 0.438776 +vn -0.991858 -0.087830 0.092218 +vn -0.859104 0.044821 0.509835 +vn -0.894952 -0.402899 0.191658 +vn -0.903611 0.009093 0.428257 +vn -0.889320 0.017457 0.456952 +vn -0.731541 -0.492421 0.471561 +vn -0.794103 -0.178378 0.581017 +vn -0.625933 -0.373553 0.684592 +vn -0.584508 -0.184831 0.790056 +vn -0.801518 -0.104269 0.588809 +vn -0.642031 -0.296727 0.706929 +vn -0.820281 -0.123456 0.558478 +vn 0.016905 -0.936472 -0.350333 +vn -0.098795 -0.739900 -0.665423 +vn -0.069462 -0.936749 -0.343039 +vn 0.123931 -0.992291 -0.000000 +vn 0.035891 -0.855981 -0.515760 +vn -0.028951 -0.999581 0.000000 +vn 0.016905 -0.936472 0.350333 +vn -0.069462 -0.936749 0.343039 +vn -0.334402 -0.916161 -0.220964 +vn -0.790477 -0.612492 -0.000000 +vn -0.334402 -0.916161 0.220964 +vn -0.741010 -0.556660 0.375544 +vn -0.274313 -0.889661 0.365042 +vn -0.098795 -0.739900 0.665423 +vn 0.035891 -0.855981 0.515760 +vn -0.274313 -0.889661 -0.365042 +vn -0.741010 -0.556660 -0.375544 +vn 0.356408 0.929723 -0.092678 +vn 0.285617 0.953018 -0.100890 +vn -0.032685 0.987521 -0.154060 +vn 0.058045 0.915295 -0.398579 +vn -0.436422 -0.758689 -0.483660 +vn 0.039808 -0.749385 -0.660937 +vn -0.438098 -0.839825 -0.320570 +vn -0.144622 0.858467 -0.492057 +vn -0.390508 -0.802547 -0.451023 +vn -0.378955 0.768626 -0.515371 +vn -0.351840 -0.855427 -0.380071 +vn -0.503913 0.811284 -0.296463 +vn -0.434503 -0.886238 -0.160593 +vn -0.589554 0.766850 -0.253707 +vn -0.033279 -0.530249 -0.847189 +vn 0.461124 -0.566742 -0.682765 +vn -0.155076 -0.479386 -0.863794 +vn -0.332554 -0.675497 -0.658112 +vn -0.624352 -0.649034 -0.434671 +vn -0.640430 -0.723275 -0.258307 +vn 0.979386 -0.047392 -0.196359 +vn 0.839147 -0.520972 -0.156274 +vn 0.859197 -0.013067 -0.511478 +vn 0.169781 0.017978 -0.985318 +vn -0.298124 0.093164 -0.949970 +vn -0.602580 0.140795 -0.785540 +vn -0.760623 0.356880 -0.542300 +vn -0.916442 -0.012784 -0.399964 +vn 0.616328 0.711155 -0.338227 +vn 0.709959 0.689780 -0.141992 +vn 0.121527 0.638102 -0.760300 +vn -0.308158 0.474484 -0.824563 +vn -0.584949 0.497867 -0.640284 +vn -0.831395 0.369875 -0.414699 +vn -0.777389 0.439755 -0.449757 +vn -0.536292 0.842626 -0.048710 +vn -0.522164 -0.582123 -0.623280 +vn -0.712098 0.074377 -0.698129 +vn -0.627854 0.740316 -0.240274 +vn -0.817995 0.476797 -0.321792 +vn -0.729171 0.655796 -0.195555 +vn -0.958544 0.215108 -0.186875 +vn -0.950592 0.163928 -0.263634 +vn -0.891745 0.110753 -0.438776 +vn -0.983392 -0.022830 -0.180053 +vn -0.859104 0.044821 -0.509834 +vn -0.991858 -0.087831 -0.092217 +vn -0.894953 -0.402899 -0.191657 +vn -0.903611 0.009093 -0.428257 +vn -0.889320 0.017458 -0.456952 +vn -0.731541 -0.492420 -0.471561 +vn -0.794103 -0.178378 -0.581018 +vn -0.625932 -0.373553 -0.684593 +vn -0.584507 -0.184830 -0.790056 +vn -0.801518 -0.104269 -0.588809 +vn -0.642031 -0.296727 -0.706930 +vn -0.820281 -0.123456 -0.558478 +vn 0.891944 0.333618 0.305179 +vn 0.602535 -0.114021 -0.789905 +vn 0.871702 -0.486402 0.059575 +vn 0.885285 -0.051707 -0.462165 +vn 0.767335 -0.613875 -0.185352 +vn 0.615706 -0.238765 -0.750931 +vn -0.132228 0.076598 -0.988255 +vn -0.134482 0.218923 -0.966430 +vn -0.082654 0.333036 -0.939284 +vn -0.794263 0.362851 -0.487325 +vn -0.686973 0.538875 -0.487526 +vn -0.911656 -0.242414 0.331840 +vn -0.903470 -0.005854 0.428611 +vn -0.880207 0.284493 0.379868 +vn -0.359072 -0.293407 0.885991 +vn -0.531215 -0.161650 0.831673 +vn 0.521709 -0.333452 0.785258 +vn 0.498223 -0.518212 0.695148 +vn 0.319253 -0.666929 0.673264 +vn 0.417208 0.602931 0.680009 +vn -0.112803 -0.767065 0.631575 +vn -0.785847 -0.219916 0.577998 +vn -0.390952 -0.506392 0.768585 +vn -0.676852 -0.452073 0.580948 +vn -0.070613 -0.785108 0.615320 +vn 0.404464 -0.913005 0.053206 +vn 0.510042 -0.851111 0.124372 +vn 0.600863 -0.776753 0.188727 +vn 0.734160 -0.298249 -0.609964 +vn 0.802854 -0.245127 -0.543450 +vn 0.203920 0.286548 -0.936113 +vn 0.259058 0.346923 -0.901407 +vn 0.305077 0.413607 -0.857821 +vn -0.395140 0.672312 -0.625988 +vn -0.388204 0.672327 -0.630297 +vn -0.844407 0.508563 0.168344 +vn -0.907377 0.410201 0.091666 +vn -0.943128 0.331776 -0.020840 +vn 0.092832 0.340544 0.935634 +vn 0.433215 0.308260 0.846936 +vn 0.075136 0.741809 0.666389 +vn -0.375593 0.622444 0.686654 +vn -0.641388 0.689588 0.336288 +vn -0.353918 0.873123 0.335258 +vn -0.662764 0.746241 -0.062188 +vn -0.545563 0.658509 -0.518389 +vn -0.542286 0.268594 -0.796105 +vn -0.776382 0.468027 -0.422116 +vn -0.995559 -0.032197 -0.088459 +vn -0.738154 -0.230737 -0.633948 +vn -0.433216 -0.308258 -0.846936 +vn -0.776385 -0.629857 -0.022517 +vn -0.467564 -0.874397 0.129668 +vn -0.542292 -0.717476 -0.437204 +vn -0.189834 -0.854102 0.484223 +vn -0.545805 -0.711395 0.442735 +vn -0.641391 -0.312091 0.700868 +vn -0.215356 -0.623780 0.751346 +vn 0.037501 -0.724698 0.688046 +vn -0.375594 -0.035443 0.926107 +vn 0.078137 -0.268605 0.960076 +vn -0.757385 0.223328 0.613590 +vn -0.902417 0.400663 0.158468 +vn -0.902417 -0.205066 0.378934 +vn 0.075136 0.741809 -0.666389 +vn 0.433215 0.308260 -0.846936 +vn 0.092832 0.340544 -0.935635 +vn -0.375593 0.622444 -0.686654 +vn -0.353918 0.873123 -0.335257 +vn -0.641388 0.689588 -0.336288 +vn -0.662764 0.746241 0.062188 +vn -0.776382 0.468027 0.422116 +vn -0.542286 0.268594 0.796105 +vn -0.545562 0.658510 0.518389 +vn -0.738154 -0.230737 0.633948 +vn -0.995559 -0.032196 0.088459 +vn -0.433216 -0.308258 0.846936 +vn -0.776385 -0.629856 0.022517 +vn -0.542292 -0.717477 0.437204 +vn -0.467565 -0.874397 -0.129668 +vn -0.545805 -0.711394 -0.442736 +vn -0.189834 -0.854102 -0.484223 +vn -0.215356 -0.623779 -0.751346 +vn -0.641391 -0.312091 -0.700869 +vn 0.037501 -0.724698 -0.688046 +vn -0.375594 -0.035443 -0.926106 +vn 0.078136 -0.268605 -0.960076 +vn -0.757384 0.223328 -0.613590 +vn -0.902417 0.400663 -0.158468 +vn -0.902417 -0.205066 -0.378934 +# 747 normals + +g HLeib01 +usemtl HLeibTex +s 1 +f 1/1/1 2/2/2 3/3/3 +f 4/4/4 3/3/3 5/5/5 +f 6/6/6 5/5/5 2/2/2 +f 3/3/3 2/2/2 5/5/5 +f 1/1/1 3/3/3 7/7/7 +f 8/8/8 7/7/7 9/9/9 +f 4/4/4 9/9/9 3/3/3 +f 7/7/7 3/3/3 9/9/9 +f 8/8/8 9/9/9 10/10/10 +f 11/11/11 10/10/10 12/12/12 +f 4/4/4 12/12/12 9/9/9 +f 10/10/10 9/9/9 12/12/12 +f 4/4/4 13/13/13 12/12/12 +f 11/11/11 12/12/12 14/14/14 +f 15/15/15 14/14/14 13/13/13 +f 12/12/12 13/13/13 14/14/14 +f 4/4/4 5/5/5 13/13/13 +f 15/15/15 13/13/13 16/16/16 +f 6/6/6 16/16/16 5/5/5 +f 13/13/13 5/5/5 16/16/16 +f 15/15/15 16/16/16 17/17/17 +f 18/18/18 17/17/17 19/19/19 +f 6/6/6 19/19/19 16/16/16 +f 17/17/17 16/16/16 19/19/19 +f 15/15/15 17/17/17 20/20/20 +f 21/21/21 20/20/20 22/22/22 +f 18/18/18 22/22/22 17/17/17 +f 20/20/20 17/17/17 22/22/22 +f 11/11/11 14/14/14 23/23/23 +f 21/21/21 23/23/23 20/20/20 +f 15/15/15 20/20/20 14/14/14 +f 23/23/23 14/14/14 20/20/20 +f 11/11/11 23/23/23 24/24/24 +f 25/25/25 24/24/24 26/26/26 +f 21/21/21 26/26/26 23/23/23 +f 24/24/24 23/23/23 26/26/26 +f 25/25/25 26/26/26 27/27/27 +f 28/28/28 27/27/27 29/29/29 +f 21/21/21 29/29/29 26/26/26 +f 27/27/27 26/26/26 29/29/29 +f 28/28/28 29/29/29 30/30/30 +f 18/18/18 30/30/30 22/22/22 +f 21/21/21 22/22/22 29/29/29 +f 30/30/30 29/29/29 22/22/22 +f 28/28/28 30/30/30 31/31/31 +f 32/32/32 31/31/31 33/33/33 +f 18/18/18 33/33/33 30/30/30 +f 31/31/31 30/30/30 33/33/33 +f 28/28/28 31/31/31 34/34/34 +f 35/35/35 34/34/34 36/36/36 +f 32/32/32 36/36/36 31/31/31 +f 34/34/34 31/31/31 36/36/36 +f 35/35/35 36/36/36 37/37/37 +f 1/1/1 37/37/37 38/38/38 +f 32/32/32 38/38/38 36/36/36 +f 37/37/37 36/36/36 38/38/38 +f 1/1/1 38/38/38 2/2/2 +f 6/6/6 2/2/2 39/39/39 +f 32/32/32 39/39/39 38/38/38 +f 2/2/2 38/38/38 39/39/39 +f 32/32/32 33/33/33 39/39/39 +f 6/6/6 39/39/39 19/19/19 +f 18/18/18 19/19/19 33/33/33 +f 39/39/39 33/33/33 19/19/19 +f 8/8/8 40/40/40 7/7/7 +f 1/1/1 7/7/7 37/37/37 +f 35/35/35 37/37/37 40/40/40 +f 7/7/7 40/40/40 37/37/37 +f 8/8/8 41/41/41 40/40/40 +f 35/35/35 40/40/40 42/42/42 +f 25/25/25 42/42/42 41/41/41 +f 40/40/40 41/41/41 42/42/42 +f 8/8/8 10/10/10 41/41/41 +f 25/25/25 41/41/41 24/24/24 +f 11/11/11 24/24/24 10/10/10 +f 41/41/41 10/10/10 24/24/24 +f 28/28/28 34/34/34 27/27/27 +f 25/25/25 27/27/27 42/42/42 +f 35/35/35 42/42/42 34/34/34 +f 27/27/27 34/34/34 42/42/42 +# 80 triangles in group + +g OK +usemtl Skin +f 43/43/43 44/44/44 45/45/45 +f 46/46/46 45/45/45 47/47/47 +f 48/48/48 47/47/47 44/44/44 +f 45/45/45 44/44/44 47/47/47 +f 43/43/43 45/45/45 49/49/49 +f 50/50/50 49/49/49 51/51/51 +f 46/46/46 51/51/51 45/45/45 +f 49/49/49 45/45/45 51/51/51 +f 50/50/50 51/51/51 52/52/52 +f 53/53/53 52/52/52 54/54/54 +f 46/46/46 54/54/54 51/51/51 +f 52/52/52 51/51/51 54/54/54 +f 46/46/46 55/55/55 54/54/54 +f 53/53/53 54/54/54 56/56/56 +f 57/57/57 56/56/56 55/55/55 +f 54/54/54 55/55/55 56/56/56 +f 46/46/46 47/47/47 55/55/55 +f 57/57/57 55/55/55 58/58/58 +f 48/48/48 58/58/58 47/47/47 +f 55/55/55 47/47/47 58/58/58 +f 57/57/57 58/58/58 59/59/59 +f 60/57/60 59/59/59 61/58/61 +f 48/48/48 61/58/61 58/58/58 +f 59/59/59 58/58/58 61/58/61 +f 57/57/57 59/59/59 62/60/62 +f 63/61/63 62/60/62 64/60/64 +f 60/57/60 64/60/64 59/59/59 +f 62/60/62 59/59/59 64/60/64 +f 53/53/53 56/56/56 65/62/65 +f 63/61/63 65/62/65 62/60/62 +f 57/57/57 62/60/62 56/56/56 +f 65/62/65 56/56/56 62/60/62 +f 53/53/53 65/62/65 66/63/66 +f 67/64/67 66/63/66 68/65/68 +f 63/61/63 68/65/68 65/62/65 +f 66/63/66 65/62/65 68/65/68 +f 67/64/67 68/65/68 69/63/69 +f 70/53/70 69/63/69 71/62/71 +f 63/61/63 71/62/71 68/65/68 +f 69/63/69 68/65/68 71/62/71 +f 63/61/63 64/60/64 71/62/71 +f 43/43/43 74/49/72 75/45/73 +f 43/43/43 75/45/73 44/44/44 +f 48/48/48 44/44/44 76/47/74 +f 72/46/75 76/47/74 75/45/73 +f 44/44/44 75/45/73 76/47/74 +f 48/48/48 76/47/74 61/58/61 +f 50/50/50 77/66/76 49/49/49 +f 43/43/43 49/49/49 74/49/72 +f 73/50/77 74/49/72 77/66/76 +f 49/49/49 77/66/76 74/49/72 +f 50/50/50 78/67/78 77/66/76 +f 73/50/77 77/66/76 79/67/79 +f 67/64/67 79/67/79 78/67/78 +f 77/66/76 78/67/78 79/67/79 +f 50/50/50 52/52/52 78/67/78 +f 67/64/67 78/67/78 66/63/66 +f 53/53/53 66/63/66 52/52/52 +f 78/67/78 52/52/52 66/63/66 +f 67/64/67 69/63/69 79/67/79 +# 60 triangles in group + +g Bein1Li +usemtl BeinTex +s 2 +f 80/68/80 87/68/80 130/68/80 +f 86/68/81 129/68/81 93/68/81 +s 1 +f 80/69/82 81/70/83 88/71/84 +f 80/69/82 88/71/84 87/72/85 +f 81/70/83 82/73/86 88/71/84 +f 82/73/86 89/74/87 88/71/84 +f 82/73/86 83/75/88 90/76/89 +f 82/73/86 90/76/89 89/74/87 +f 83/75/88 84/77/90 90/76/89 +f 84/77/90 91/78/91 90/76/89 +f 84/77/90 85/79/92 92/80/93 +f 84/77/90 92/80/93 91/78/91 +f 85/79/92 86/68/94 92/80/93 +f 86/68/94 93/81/95 92/80/93 +s 2 +f 87/68/80 94/68/80 130/68/80 +f 93/68/81 129/68/81 100/68/81 +s 1 +f 87/72/85 88/71/84 94/82/96 +f 88/71/84 95/83/97 94/82/96 +f 88/71/84 89/74/87 96/84/98 +f 88/71/84 96/84/98 95/83/97 +f 89/74/87 90/76/89 96/84/98 +f 90/76/89 97/85/99 96/84/98 +f 90/76/89 91/78/91 98/86/100 +f 90/76/89 98/86/100 97/85/99 +f 91/78/91 92/80/93 98/86/100 +f 92/80/93 99/87/101 98/86/100 +f 92/80/93 93/81/95 100/88/102 +f 92/80/93 100/88/102 99/87/101 +s 2 +f 94/68/80 101/68/80 130/68/80 +f 100/68/81 129/68/81 107/68/81 +s 1 +f 94/82/96 95/83/97 102/89/103 +f 94/82/96 102/89/103 101/90/104 +f 95/83/97 96/84/98 102/89/103 +f 96/84/98 103/91/105 102/89/103 +f 96/84/98 97/85/99 104/92/106 +f 96/84/98 104/92/106 103/91/105 +f 97/85/99 98/86/100 104/92/106 +f 98/86/100 105/93/107 104/92/106 +f 98/86/100 99/87/101 106/94/108 +f 98/86/100 106/94/108 105/93/107 +f 99/87/101 100/88/102 106/94/108 +f 100/88/102 107/95/109 106/94/108 +s 2 +f 101/68/80 108/68/80 130/68/80 +f 107/68/81 129/68/81 114/68/81 +s 1 +f 101/90/104 102/89/103 108/96/110 +f 102/89/103 109/97/111 108/96/110 +f 102/89/103 103/91/105 110/98/112 +f 102/89/103 110/98/112 109/97/111 +f 103/91/105 104/92/106 110/98/112 +f 104/92/106 111/99/113 110/98/112 +f 104/92/106 105/93/107 112/100/114 +f 104/92/106 112/100/114 111/99/113 +f 105/93/107 106/94/108 112/100/114 +f 106/94/108 113/101/115 112/100/114 +f 106/94/108 107/95/109 114/102/116 +f 106/94/108 114/102/116 113/101/115 +s 2 +f 108/68/80 115/68/80 130/68/80 +f 114/68/81 129/68/81 121/68/81 +s 1 +f 108/96/110 109/97/111 116/103/117 +f 108/96/110 116/103/117 115/104/118 +f 109/97/111 110/98/112 116/103/117 +f 110/98/112 117/105/119 116/103/117 +f 110/98/112 111/99/113 118/106/120 +f 110/98/112 118/106/120 117/105/119 +f 111/99/113 112/100/114 118/106/120 +f 112/100/114 119/107/121 118/106/120 +f 112/100/114 113/101/115 120/108/122 +f 112/100/114 120/108/122 119/107/121 +f 113/101/115 114/102/116 120/108/122 +f 114/102/116 121/109/123 120/108/122 +s 2 +f 115/68/80 122/68/80 130/68/80 +f 121/68/81 129/68/81 128/68/81 +s 1 +f 115/104/118 116/103/117 122/110/124 +f 116/103/117 123/111/125 122/110/124 +f 116/103/117 117/105/119 124/112/126 +f 116/103/117 124/112/126 123/111/125 +f 117/105/119 118/106/120 124/112/126 +f 118/106/120 125/113/127 124/112/126 +f 118/106/120 119/107/121 126/114/128 +f 118/106/120 126/114/128 125/113/127 +f 119/107/121 120/108/122 126/114/128 +f 120/108/122 127/115/129 126/114/128 +f 120/108/122 121/109/123 128/116/130 +f 120/108/122 128/116/130 127/115/129 +s 2 +f 122/68/80 80/68/80 130/68/80 +f 128/68/81 129/68/81 86/68/81 +s 1 +f 122/110/124 123/111/125 81/117/83 +f 122/110/124 81/117/83 80/118/82 +f 123/111/125 124/112/126 81/117/83 +f 124/112/126 82/119/86 81/117/83 +f 124/112/126 125/113/127 83/120/88 +f 124/112/126 83/120/88 82/119/86 +f 125/113/127 126/114/128 83/120/88 +f 126/114/128 84/121/90 83/120/88 +f 126/114/128 127/115/129 85/122/92 +f 126/114/128 85/122/92 84/121/90 +f 127/115/129 128/116/130 85/122/92 +f 128/116/130 86/123/94 85/122/92 +# 98 triangles in group + +g Bein1Re +usemtl BeinTex +s 2 +f 181/68/131 138/68/131 131/68/131 +f 144/68/132 180/68/132 137/68/132 +s 1 +f 139/71/133 132/70/134 131/69/135 +f 138/72/136 139/71/133 131/69/135 +f 139/71/133 133/73/137 132/70/134 +f 139/71/133 140/74/138 133/73/137 +f 141/76/139 134/75/140 133/73/137 +f 140/74/138 141/76/139 133/73/137 +f 141/76/139 135/77/141 134/75/140 +f 141/76/139 142/78/142 135/77/141 +f 143/80/143 136/79/144 135/77/141 +f 142/78/142 143/80/143 135/77/141 +f 143/80/143 137/68/145 136/79/144 +f 143/80/143 144/81/146 137/68/145 +s 2 +f 181/68/131 145/68/131 138/68/131 +f 151/68/132 180/68/132 144/68/132 +s 1 +f 145/82/147 139/71/133 138/72/136 +f 145/82/147 146/83/148 139/71/133 +f 147/84/149 140/74/138 139/71/133 +f 146/83/148 147/84/149 139/71/133 +f 147/84/149 141/76/139 140/74/138 +f 147/84/149 148/85/150 141/76/139 +f 149/86/151 142/78/142 141/76/139 +f 148/85/150 149/86/151 141/76/139 +f 149/86/151 143/80/143 142/78/142 +f 149/86/151 150/87/152 143/80/143 +f 151/88/153 144/81/146 143/80/143 +f 150/87/152 151/88/153 143/80/143 +s 2 +f 181/68/131 152/68/131 145/68/131 +f 158/68/132 180/68/132 151/68/132 +s 1 +f 153/89/154 146/83/148 145/82/147 +f 152/90/155 153/89/154 145/82/147 +f 153/89/154 147/84/149 146/83/148 +f 153/89/154 154/91/156 147/84/149 +f 155/92/157 148/85/150 147/84/149 +f 154/91/156 155/92/157 147/84/149 +f 155/92/157 149/86/151 148/85/150 +f 155/92/157 156/93/158 149/86/151 +f 157/94/159 150/87/152 149/86/151 +f 156/93/158 157/94/159 149/86/151 +f 157/94/159 151/88/153 150/87/152 +f 157/94/159 158/95/160 151/88/153 +s 2 +f 181/68/131 159/68/131 152/68/131 +f 165/68/132 180/68/132 158/68/132 +s 1 +f 159/96/161 153/89/154 152/90/155 +f 159/96/161 160/97/162 153/89/154 +f 161/98/163 154/91/156 153/89/154 +f 160/97/162 161/98/163 153/89/154 +f 161/98/163 155/92/157 154/91/156 +f 161/98/163 162/99/164 155/92/157 +f 163/100/165 156/93/158 155/92/157 +f 162/99/164 163/100/165 155/92/157 +f 163/100/165 157/94/159 156/93/158 +f 163/100/165 164/101/166 157/94/159 +f 165/102/167 158/95/160 157/94/159 +f 164/101/166 165/102/167 157/94/159 +s 2 +f 181/68/131 166/68/131 159/68/131 +f 172/68/132 180/68/132 165/68/132 +s 1 +f 167/103/168 160/97/162 159/96/161 +f 166/104/169 167/103/168 159/96/161 +f 167/103/168 161/98/163 160/97/162 +f 167/103/168 168/105/170 161/98/163 +f 169/106/171 162/99/164 161/98/163 +f 168/105/170 169/106/171 161/98/163 +f 169/106/171 163/100/165 162/99/164 +f 169/106/171 170/107/172 163/100/165 +f 171/108/173 164/101/166 163/100/165 +f 170/107/172 171/108/173 163/100/165 +f 171/108/173 165/102/167 164/101/166 +f 171/108/173 172/109/174 165/102/167 +s 2 +f 181/68/131 173/68/131 166/68/131 +f 179/68/132 180/68/132 172/68/132 +s 1 +f 173/110/175 167/103/168 166/104/169 +f 173/110/175 174/111/176 167/103/168 +f 175/112/177 168/105/170 167/103/168 +f 174/111/176 175/112/177 167/103/168 +f 175/112/177 169/106/171 168/105/170 +f 175/112/177 176/113/178 169/106/171 +f 177/114/179 170/107/172 169/106/171 +f 176/113/178 177/114/179 169/106/171 +f 177/114/179 171/108/173 170/107/172 +f 177/114/179 178/115/180 171/108/173 +f 179/116/181 172/109/174 171/108/173 +f 178/115/180 179/116/181 171/108/173 +s 2 +f 181/68/131 131/68/131 173/68/131 +f 137/68/132 180/68/132 179/68/132 +s 1 +f 132/117/134 174/111/176 173/110/175 +f 131/118/135 132/117/134 173/110/175 +f 132/117/134 175/112/177 174/111/176 +f 132/117/134 133/119/137 175/112/177 +f 134/120/140 176/113/178 175/112/177 +f 133/119/137 134/120/140 175/112/177 +f 134/120/140 177/114/179 176/113/178 +f 134/120/140 135/121/141 177/114/179 +f 136/122/144 178/115/180 177/114/179 +f 135/121/141 136/122/144 177/114/179 +f 136/122/144 179/116/181 178/115/180 +f 136/122/144 137/123/145 179/116/181 +# 98 triangles in group + +g Bein2Li +usemtl BeinTex +s 2 +f 182/68/182 189/68/182 232/68/182 +f 188/68/183 231/68/183 195/68/183 +s 1 +f 182/69/184 183/70/185 190/71/186 +f 182/69/184 190/71/186 189/72/187 +f 183/70/185 184/73/188 190/71/186 +f 184/73/188 191/74/189 190/71/186 +f 184/73/188 185/75/190 192/76/191 +f 184/73/188 192/76/191 191/74/189 +f 185/75/190 186/77/192 192/76/191 +f 186/77/192 193/78/193 192/76/191 +f 186/77/192 187/79/194 194/80/195 +f 186/77/192 194/80/195 193/78/193 +f 187/79/194 188/68/196 194/80/195 +f 188/68/196 195/81/197 194/80/195 +s 2 +f 189/68/182 196/68/182 232/68/182 +f 195/68/183 231/68/183 202/68/183 +s 1 +f 189/72/187 190/71/186 196/82/198 +f 190/71/186 197/83/199 196/82/198 +f 190/71/186 191/74/189 198/84/200 +f 190/71/186 198/84/200 197/83/199 +f 191/74/189 192/76/191 198/84/200 +f 192/76/191 199/85/201 198/84/200 +f 192/76/191 193/78/193 200/86/202 +f 192/76/191 200/86/202 199/85/201 +f 193/78/193 194/80/195 200/86/202 +f 194/80/195 201/87/203 200/86/202 +f 194/80/195 195/81/197 202/88/204 +f 194/80/195 202/88/204 201/87/203 +s 2 +f 196/68/182 203/68/182 232/68/182 +f 202/68/183 231/68/183 209/68/183 +s 1 +f 196/82/198 197/83/199 204/89/205 +f 196/82/198 204/89/205 203/90/206 +f 197/83/199 198/84/200 204/89/205 +f 198/84/200 205/91/207 204/89/205 +f 198/84/200 199/85/201 206/92/208 +f 198/84/200 206/92/208 205/91/207 +f 199/85/201 200/86/202 206/92/208 +f 200/86/202 207/93/209 206/92/208 +f 200/86/202 201/87/203 208/94/210 +f 200/86/202 208/94/210 207/93/209 +f 201/87/203 202/88/204 208/94/210 +f 202/88/204 209/95/211 208/94/210 +s 2 +f 203/68/182 210/68/182 232/68/182 +f 209/68/183 231/68/183 216/68/183 +s 1 +f 203/90/206 204/89/205 210/96/212 +f 204/89/205 211/97/213 210/96/212 +f 204/89/205 205/91/207 212/98/214 +f 204/89/205 212/98/214 211/97/213 +f 205/91/207 206/92/208 212/98/214 +f 206/92/208 213/99/215 212/98/214 +f 206/92/208 207/93/209 214/100/216 +f 206/92/208 214/100/216 213/99/215 +f 207/93/209 208/94/210 214/100/216 +f 208/94/210 215/101/217 214/100/216 +f 208/94/210 209/95/211 216/102/218 +f 208/94/210 216/102/218 215/101/217 +s 2 +f 210/68/182 217/68/182 232/68/182 +f 216/68/183 231/68/183 223/68/183 +s 1 +f 210/96/212 211/97/213 218/103/219 +f 210/96/212 218/103/219 217/104/220 +f 211/97/213 212/98/214 218/103/219 +f 212/98/214 219/105/221 218/103/219 +f 212/98/214 213/99/215 220/106/222 +f 212/98/214 220/106/222 219/105/221 +f 213/99/215 214/100/216 220/106/222 +f 214/100/216 221/107/223 220/106/222 +f 214/100/216 215/101/217 222/108/224 +f 214/100/216 222/108/224 221/107/223 +f 215/101/217 216/102/218 222/108/224 +f 216/102/218 223/109/225 222/108/224 +s 2 +f 217/68/182 224/68/182 232/68/182 +f 223/68/183 231/68/183 230/68/183 +s 1 +f 217/104/220 218/103/219 224/110/226 +f 218/103/219 225/111/227 224/110/226 +f 218/103/219 219/105/221 226/112/228 +f 218/103/219 226/112/228 225/111/227 +f 219/105/221 220/106/222 226/112/228 +f 220/106/222 227/113/229 226/112/228 +f 220/106/222 221/107/223 228/114/230 +f 220/106/222 228/114/230 227/113/229 +f 221/107/223 222/108/224 228/114/230 +f 222/108/224 229/115/231 228/114/230 +f 222/108/224 223/109/225 230/116/232 +f 222/108/224 230/116/232 229/115/231 +s 2 +f 224/68/182 182/68/182 232/68/182 +f 230/68/183 231/68/183 188/68/183 +s 1 +f 224/110/226 225/111/227 183/117/185 +f 224/110/226 183/117/185 182/118/184 +f 225/111/227 226/112/228 183/117/185 +f 226/112/228 184/119/188 183/117/185 +f 226/112/228 227/113/229 185/120/190 +f 226/112/228 185/120/190 184/119/188 +f 227/113/229 228/114/230 185/120/190 +f 228/114/230 186/121/192 185/120/190 +f 228/114/230 229/115/231 187/122/194 +f 228/114/230 187/122/194 186/121/192 +f 229/115/231 230/116/232 187/122/194 +f 230/116/232 188/123/196 187/122/194 +# 98 triangles in group + +g Bein2Re +usemtl BeinTex +s 2 +f 283/68/233 240/68/233 233/68/233 +f 246/68/234 282/68/234 239/68/234 +s 1 +f 241/71/235 234/70/236 233/69/237 +f 240/72/238 241/71/235 233/69/237 +f 241/71/235 235/73/239 234/70/236 +f 241/71/235 242/74/240 235/73/239 +f 243/76/241 236/75/242 235/73/239 +f 242/74/240 243/76/241 235/73/239 +f 243/76/241 237/77/243 236/75/242 +f 243/76/241 244/78/244 237/77/243 +f 245/80/245 238/79/246 237/77/243 +f 244/78/244 245/80/245 237/77/243 +f 245/80/245 239/68/247 238/79/246 +f 245/80/245 246/81/248 239/68/247 +s 2 +f 283/68/233 247/68/233 240/68/233 +f 253/68/234 282/68/234 246/68/234 +s 1 +f 247/82/249 241/71/235 240/72/238 +f 247/82/249 248/83/250 241/71/235 +f 249/84/251 242/74/240 241/71/235 +f 248/83/250 249/84/251 241/71/235 +f 249/84/251 243/76/241 242/74/240 +f 249/84/251 250/85/252 243/76/241 +f 251/86/253 244/78/244 243/76/241 +f 250/85/252 251/86/253 243/76/241 +f 251/86/253 245/80/245 244/78/244 +f 251/86/253 252/87/254 245/80/245 +f 253/88/255 246/81/248 245/80/245 +f 252/87/254 253/88/255 245/80/245 +s 2 +f 283/68/233 254/68/233 247/68/233 +f 260/68/234 282/68/234 253/68/234 +s 1 +f 255/89/256 248/83/250 247/82/249 +f 254/90/257 255/89/256 247/82/249 +f 255/89/256 249/84/251 248/83/250 +f 255/89/256 256/91/258 249/84/251 +f 257/92/259 250/85/252 249/84/251 +f 256/91/258 257/92/259 249/84/251 +f 257/92/259 251/86/253 250/85/252 +f 257/92/259 258/93/260 251/86/253 +f 259/94/261 252/87/254 251/86/253 +f 258/93/260 259/94/261 251/86/253 +f 259/94/261 253/88/255 252/87/254 +f 259/94/261 260/95/262 253/88/255 +s 2 +f 283/68/233 261/68/233 254/68/233 +f 267/68/234 282/68/234 260/68/234 +s 1 +f 261/96/263 255/89/256 254/90/257 +f 261/96/263 262/97/264 255/89/256 +f 263/98/265 256/91/258 255/89/256 +f 262/97/264 263/98/265 255/89/256 +f 263/98/265 257/92/259 256/91/258 +f 263/98/265 264/99/266 257/92/259 +f 265/100/267 258/93/260 257/92/259 +f 264/99/266 265/100/267 257/92/259 +f 265/100/267 259/94/261 258/93/260 +f 265/100/267 266/101/268 259/94/261 +f 267/102/269 260/95/262 259/94/261 +f 266/101/268 267/102/269 259/94/261 +s 2 +f 283/68/233 268/68/233 261/68/233 +f 274/68/234 282/68/234 267/68/234 +s 1 +f 269/103/270 262/97/264 261/96/263 +f 268/104/271 269/103/270 261/96/263 +f 269/103/270 263/98/265 262/97/264 +f 269/103/270 270/105/272 263/98/265 +f 271/106/273 264/99/266 263/98/265 +f 270/105/272 271/106/273 263/98/265 +f 271/106/273 265/100/267 264/99/266 +f 271/106/273 272/107/274 265/100/267 +f 273/108/275 266/101/268 265/100/267 +f 272/107/274 273/108/275 265/100/267 +f 273/108/275 267/102/269 266/101/268 +f 273/108/275 274/109/276 267/102/269 +s 2 +f 283/68/233 275/68/233 268/68/233 +f 281/68/234 282/68/234 274/68/234 +s 1 +f 275/110/277 269/103/270 268/104/271 +f 275/110/277 276/111/278 269/103/270 +f 277/112/279 270/105/272 269/103/270 +f 276/111/278 277/112/279 269/103/270 +f 277/112/279 271/106/273 270/105/272 +f 277/112/279 278/113/280 271/106/273 +f 279/114/281 272/107/274 271/106/273 +f 278/113/280 279/114/281 271/106/273 +f 279/114/281 273/108/275 272/107/274 +f 279/114/281 280/115/282 273/108/275 +f 281/116/283 274/109/276 273/108/275 +f 280/115/282 281/116/283 273/108/275 +s 2 +f 283/68/233 233/68/233 275/68/233 +f 239/68/234 282/68/234 281/68/234 +s 1 +f 234/117/236 276/111/278 275/110/277 +f 233/118/237 234/117/236 275/110/277 +f 234/117/236 277/112/279 276/111/278 +f 234/117/236 235/119/239 277/112/279 +f 236/120/242 278/113/280 277/112/279 +f 235/119/239 236/120/242 277/112/279 +f 236/120/242 279/114/281 278/113/280 +f 236/120/242 237/121/243 279/114/281 +f 238/122/246 280/115/282 279/114/281 +f 237/121/243 238/122/246 279/114/281 +f 238/122/246 281/116/283 280/115/282 +f 238/122/246 239/123/247 281/116/283 +# 98 triangles in group + +g Bein3Re +usemtl BeinTex +s 2 +f 334/68/284 291/68/284 284/68/284 +f 297/68/285 333/68/285 290/68/285 +s 1 +f 292/71/286 285/70/287 284/69/288 +f 291/72/289 292/71/286 284/69/288 +f 292/71/286 286/73/290 285/70/287 +f 292/71/286 293/74/291 286/73/290 +f 294/76/292 287/75/293 286/73/290 +f 293/74/291 294/76/292 286/73/290 +f 294/76/292 288/77/294 287/75/293 +f 294/76/292 295/78/295 288/77/294 +f 296/80/296 289/79/297 288/77/294 +f 295/78/295 296/80/296 288/77/294 +f 296/80/296 290/68/298 289/79/297 +f 296/80/296 297/81/299 290/68/298 +s 2 +f 334/68/284 298/68/284 291/68/284 +f 304/68/285 333/68/285 297/68/285 +s 1 +f 298/82/300 292/71/286 291/72/289 +f 298/82/300 299/83/301 292/71/286 +f 300/84/302 293/74/291 292/71/286 +f 299/83/301 300/84/302 292/71/286 +f 300/84/302 294/76/292 293/74/291 +f 300/84/302 301/85/303 294/76/292 +f 302/86/304 295/78/295 294/76/292 +f 301/85/303 302/86/304 294/76/292 +f 302/86/304 296/80/296 295/78/295 +f 302/86/304 303/87/305 296/80/296 +f 304/88/306 297/81/299 296/80/296 +f 303/87/305 304/88/306 296/80/296 +s 2 +f 334/68/284 305/68/284 298/68/284 +f 311/68/285 333/68/285 304/68/285 +s 1 +f 306/89/307 299/83/301 298/82/300 +f 305/90/308 306/89/307 298/82/300 +f 306/89/307 300/84/302 299/83/301 +f 306/89/307 307/91/309 300/84/302 +f 308/92/310 301/85/303 300/84/302 +f 307/91/309 308/92/310 300/84/302 +f 308/92/310 302/86/304 301/85/303 +f 308/92/310 309/93/311 302/86/304 +f 310/94/312 303/87/305 302/86/304 +f 309/93/311 310/94/312 302/86/304 +f 310/94/312 304/88/306 303/87/305 +f 310/94/312 311/95/313 304/88/306 +s 2 +f 334/68/284 312/68/284 305/68/284 +f 318/68/285 333/68/285 311/68/285 +s 1 +f 312/96/314 306/89/307 305/90/308 +f 312/96/314 313/97/315 306/89/307 +f 314/98/316 307/91/309 306/89/307 +f 313/97/315 314/98/316 306/89/307 +f 314/98/316 308/92/310 307/91/309 +f 314/98/316 315/99/317 308/92/310 +f 316/100/318 309/93/311 308/92/310 +f 315/99/317 316/100/318 308/92/310 +f 316/100/318 310/94/312 309/93/311 +f 316/100/318 317/101/319 310/94/312 +f 318/102/320 311/95/313 310/94/312 +f 317/101/319 318/102/320 310/94/312 +s 2 +f 334/68/284 319/68/284 312/68/284 +f 325/68/285 333/68/285 318/68/285 +s 1 +f 320/103/321 313/97/315 312/96/314 +f 319/104/322 320/103/321 312/96/314 +f 320/103/321 314/98/316 313/97/315 +f 320/103/321 321/105/323 314/98/316 +f 322/106/324 315/99/317 314/98/316 +f 321/105/323 322/106/324 314/98/316 +f 322/106/324 316/100/318 315/99/317 +f 322/106/324 323/107/325 316/100/318 +f 324/108/326 317/101/319 316/100/318 +f 323/107/325 324/108/326 316/100/318 +f 324/108/326 318/102/320 317/101/319 +f 324/108/326 325/109/327 318/102/320 +s 2 +f 334/68/284 326/68/284 319/68/284 +f 332/68/285 333/68/285 325/68/285 +s 1 +f 326/110/328 320/103/321 319/104/322 +f 326/110/328 327/111/329 320/103/321 +f 328/112/330 321/105/323 320/103/321 +f 327/111/329 328/112/330 320/103/321 +f 328/112/330 322/106/324 321/105/323 +f 328/112/330 329/113/331 322/106/324 +f 330/114/332 323/107/325 322/106/324 +f 329/113/331 330/114/332 322/106/324 +f 330/114/332 324/108/326 323/107/325 +f 330/114/332 331/115/333 324/108/326 +f 332/116/334 325/109/327 324/108/326 +f 331/115/333 332/116/334 324/108/326 +s 2 +f 334/68/284 284/68/284 326/68/284 +f 290/68/285 333/68/285 332/68/285 +s 1 +f 285/117/287 327/111/329 326/110/328 +f 284/118/288 285/117/287 326/110/328 +f 285/117/287 328/112/330 327/111/329 +f 285/117/287 286/119/290 328/112/330 +f 287/120/293 329/113/331 328/112/330 +f 286/119/290 287/120/293 328/112/330 +f 287/120/293 330/114/332 329/113/331 +f 287/120/293 288/121/294 330/114/332 +f 289/122/297 331/115/333 330/114/332 +f 288/121/294 289/122/297 330/114/332 +f 289/122/297 332/116/334 331/115/333 +f 289/122/297 290/123/298 332/116/334 +# 98 triangles in group + +g Bein3Li +usemtl BeinTex +s 2 +f 335/68/335 342/68/335 385/68/335 +f 341/68/336 384/68/336 348/68/336 +s 1 +f 335/69/337 336/70/338 343/71/339 +f 335/69/337 343/71/339 342/72/340 +f 336/70/338 337/73/341 343/71/339 +f 337/73/341 344/74/342 343/71/339 +f 337/73/341 338/75/343 345/76/344 +f 337/73/341 345/76/344 344/74/342 +f 338/75/343 339/77/345 345/76/344 +f 339/77/345 346/78/346 345/76/344 +f 339/77/345 340/79/347 347/80/348 +f 339/77/345 347/80/348 346/78/346 +f 340/79/347 341/68/349 347/80/348 +f 341/68/349 348/81/350 347/80/348 +s 2 +f 342/68/335 349/68/335 385/68/335 +f 348/68/336 384/68/336 355/68/336 +s 1 +f 342/72/340 343/71/339 349/82/351 +f 343/71/339 350/83/352 349/82/351 +f 343/71/339 344/74/342 351/84/353 +f 343/71/339 351/84/353 350/83/352 +f 344/74/342 345/76/344 351/84/353 +f 345/76/344 352/85/354 351/84/353 +f 345/76/344 346/78/346 353/86/355 +f 345/76/344 353/86/355 352/85/354 +f 346/78/346 347/80/348 353/86/355 +f 347/80/348 354/87/356 353/86/355 +f 347/80/348 348/81/350 355/88/357 +f 347/80/348 355/88/357 354/87/356 +s 2 +f 349/68/335 356/68/335 385/68/335 +f 355/68/336 384/68/336 362/68/336 +s 1 +f 349/82/351 350/83/352 357/89/358 +f 349/82/351 357/89/358 356/90/359 +f 350/83/352 351/84/353 357/89/358 +f 351/84/353 358/91/360 357/89/358 +f 351/84/353 352/85/354 359/92/361 +f 351/84/353 359/92/361 358/91/360 +f 352/85/354 353/86/355 359/92/361 +f 353/86/355 360/93/362 359/92/361 +f 353/86/355 354/87/356 361/94/363 +f 353/86/355 361/94/363 360/93/362 +f 354/87/356 355/88/357 361/94/363 +f 355/88/357 362/95/364 361/94/363 +s 2 +f 356/68/335 363/68/335 385/68/335 +f 362/68/336 384/68/336 369/68/336 +s 1 +f 356/90/359 357/89/358 363/96/365 +f 357/89/358 364/97/366 363/96/365 +f 357/89/358 358/91/360 365/98/367 +f 357/89/358 365/98/367 364/97/366 +f 358/91/360 359/92/361 365/98/367 +f 359/92/361 366/99/368 365/98/367 +f 359/92/361 360/93/362 367/100/369 +f 359/92/361 367/100/369 366/99/368 +f 360/93/362 361/94/363 367/100/369 +f 361/94/363 368/101/370 367/100/369 +f 361/94/363 362/95/364 369/102/371 +f 361/94/363 369/102/371 368/101/370 +s 2 +f 363/68/335 370/68/335 385/68/335 +f 369/68/336 384/68/336 376/68/336 +s 1 +f 363/96/365 364/97/366 371/103/372 +f 363/96/365 371/103/372 370/104/373 +f 364/97/366 365/98/367 371/103/372 +f 365/98/367 372/105/374 371/103/372 +f 365/98/367 366/99/368 373/106/375 +f 365/98/367 373/106/375 372/105/374 +f 366/99/368 367/100/369 373/106/375 +f 367/100/369 374/107/376 373/106/375 +f 367/100/369 368/101/370 375/108/377 +f 367/100/369 375/108/377 374/107/376 +f 368/101/370 369/102/371 375/108/377 +f 369/102/371 376/109/378 375/108/377 +s 2 +f 370/68/335 377/68/335 385/68/335 +f 376/68/336 384/68/336 383/68/336 +s 1 +f 370/104/373 371/103/372 377/110/379 +f 371/103/372 378/111/380 377/110/379 +f 371/103/372 372/105/374 379/112/381 +f 371/103/372 379/112/381 378/111/380 +f 372/105/374 373/106/375 379/112/381 +f 373/106/375 380/113/382 379/112/381 +f 373/106/375 374/107/376 381/114/383 +f 373/106/375 381/114/383 380/113/382 +f 374/107/376 375/108/377 381/114/383 +f 375/108/377 382/115/384 381/114/383 +f 375/108/377 376/109/378 383/116/385 +f 375/108/377 383/116/385 382/115/384 +s 2 +f 377/68/335 335/68/335 385/68/335 +f 383/68/336 384/68/336 341/68/336 +s 1 +f 377/110/379 378/111/380 336/117/338 +f 377/110/379 336/117/338 335/118/337 +f 378/111/380 379/112/381 336/117/338 +f 379/112/381 337/119/341 336/117/338 +f 379/112/381 380/113/382 338/120/343 +f 379/112/381 338/120/343 337/119/341 +f 380/113/382 381/114/383 338/120/343 +f 381/114/383 339/121/345 338/120/343 +f 381/114/383 382/115/384 340/122/347 +f 381/114/383 340/122/347 339/121/345 +f 382/115/384 383/116/385 340/122/347 +f 383/116/385 341/123/349 340/122/347 +# 98 triangles in group + +g Bein4Re +usemtl BeinTex +s 2 +f 436/68/386 393/68/386 386/68/386 +f 399/68/387 435/68/387 392/68/387 +s 1 +f 394/71/388 387/70/389 386/69/390 +f 393/72/391 394/71/388 386/69/390 +f 394/71/388 388/73/392 387/70/389 +f 394/71/388 395/74/393 388/73/392 +f 396/76/394 389/75/395 388/73/392 +f 395/74/393 396/76/394 388/73/392 +f 396/76/394 390/77/396 389/75/395 +f 396/76/394 397/78/397 390/77/396 +f 398/80/398 391/79/399 390/77/396 +f 397/78/397 398/80/398 390/77/396 +f 398/80/398 392/68/400 391/79/399 +f 398/80/398 399/81/401 392/68/400 +s 2 +f 436/68/386 400/68/386 393/68/386 +f 406/68/387 435/68/387 399/68/387 +s 1 +f 400/82/402 394/71/388 393/72/391 +f 400/82/402 401/83/403 394/71/388 +f 402/84/404 395/74/393 394/71/388 +f 401/83/403 402/84/404 394/71/388 +f 402/84/404 396/76/394 395/74/393 +f 402/84/404 403/85/405 396/76/394 +f 404/86/406 397/78/397 396/76/394 +f 403/85/405 404/86/406 396/76/394 +f 404/86/406 398/80/398 397/78/397 +f 404/86/406 405/87/407 398/80/398 +f 406/88/408 399/81/401 398/80/398 +f 405/87/407 406/88/408 398/80/398 +s 2 +f 436/68/386 407/68/386 400/68/386 +f 413/68/387 435/68/387 406/68/387 +s 1 +f 408/89/409 401/83/403 400/82/402 +f 407/90/410 408/89/409 400/82/402 +f 408/89/409 402/84/404 401/83/403 +f 408/89/409 409/91/411 402/84/404 +f 410/92/412 403/85/405 402/84/404 +f 409/91/411 410/92/412 402/84/404 +f 410/92/412 404/86/406 403/85/405 +f 410/92/412 411/93/413 404/86/406 +f 412/94/414 405/87/407 404/86/406 +f 411/93/413 412/94/414 404/86/406 +f 412/94/414 406/88/408 405/87/407 +f 412/94/414 413/95/415 406/88/408 +s 2 +f 436/68/386 414/68/386 407/68/386 +f 420/68/387 435/68/387 413/68/387 +s 1 +f 414/96/416 408/89/409 407/90/410 +f 414/96/416 415/97/417 408/89/409 +f 416/98/418 409/91/411 408/89/409 +f 415/97/417 416/98/418 408/89/409 +f 416/98/418 410/92/412 409/91/411 +f 416/98/418 417/99/419 410/92/412 +f 418/100/420 411/93/413 410/92/412 +f 417/99/419 418/100/420 410/92/412 +f 418/100/420 412/94/414 411/93/413 +f 418/100/420 419/101/421 412/94/414 +f 420/102/422 413/95/415 412/94/414 +f 419/101/421 420/102/422 412/94/414 +s 2 +f 436/68/386 421/68/386 414/68/386 +f 427/68/387 435/68/387 420/68/387 +s 1 +f 422/103/423 415/97/417 414/96/416 +f 421/104/424 422/103/423 414/96/416 +f 422/103/423 416/98/418 415/97/417 +f 422/103/423 423/105/425 416/98/418 +f 424/106/426 417/99/419 416/98/418 +f 423/105/425 424/106/426 416/98/418 +f 424/106/426 418/100/420 417/99/419 +f 424/106/426 425/107/427 418/100/420 +f 426/108/428 419/101/421 418/100/420 +f 425/107/427 426/108/428 418/100/420 +f 426/108/428 420/102/422 419/101/421 +f 426/108/428 427/109/429 420/102/422 +s 2 +f 436/68/386 428/68/386 421/68/386 +f 434/68/387 435/68/387 427/68/387 +s 1 +f 428/110/430 422/103/423 421/104/424 +f 428/110/430 429/111/431 422/103/423 +f 430/112/432 423/105/425 422/103/423 +f 429/111/431 430/112/432 422/103/423 +f 430/112/432 424/106/426 423/105/425 +f 430/112/432 431/113/433 424/106/426 +f 432/114/434 425/107/427 424/106/426 +f 431/113/433 432/114/434 424/106/426 +f 432/114/434 426/108/428 425/107/427 +f 432/114/434 433/115/435 426/108/428 +f 434/116/436 427/109/429 426/108/428 +f 433/115/435 434/116/436 426/108/428 +s 2 +f 436/68/386 386/68/386 428/68/386 +f 392/68/387 435/68/387 434/68/387 +s 1 +f 387/117/389 429/111/431 428/110/430 +f 386/118/390 387/117/389 428/110/430 +f 387/117/389 430/112/432 429/111/431 +f 387/117/389 388/119/392 430/112/432 +f 389/120/395 431/113/433 430/112/432 +f 388/119/392 389/120/395 430/112/432 +f 389/120/395 432/114/434 431/113/433 +f 389/120/395 390/121/396 432/114/434 +f 391/122/399 433/115/435 432/114/434 +f 390/121/396 391/122/399 432/114/434 +f 391/122/399 434/116/436 433/115/435 +f 391/122/399 392/123/400 434/116/436 +# 98 triangles in group + +g Bein4Li +usemtl BeinTex +s 2 +f 437/68/437 444/68/437 487/68/437 +f 443/68/438 486/68/438 450/68/438 +s 1 +f 437/69/439 438/70/440 445/71/441 +f 437/69/439 445/71/441 444/72/442 +f 438/70/440 439/73/443 445/71/441 +f 439/73/443 446/74/444 445/71/441 +f 439/73/443 440/75/445 447/76/446 +f 439/73/443 447/76/446 446/74/444 +f 440/75/445 441/77/447 447/76/446 +f 441/77/447 448/78/448 447/76/446 +f 441/77/447 442/79/449 449/80/450 +f 441/77/447 449/80/450 448/78/448 +f 442/79/449 443/68/451 449/80/450 +f 443/68/451 450/81/452 449/80/450 +s 2 +f 444/68/437 451/68/437 487/68/437 +f 450/68/438 486/68/438 457/68/438 +s 1 +f 444/72/442 445/71/441 451/82/453 +f 445/71/441 452/83/454 451/82/453 +f 445/71/441 446/74/444 453/84/455 +f 445/71/441 453/84/455 452/83/454 +f 446/74/444 447/76/446 453/84/455 +f 447/76/446 454/85/456 453/84/455 +f 447/76/446 448/78/448 455/86/457 +f 447/76/446 455/86/457 454/85/456 +f 448/78/448 449/80/450 455/86/457 +f 449/80/450 456/87/458 455/86/457 +f 449/80/450 450/81/452 457/88/459 +f 449/80/450 457/88/459 456/87/458 +s 2 +f 451/68/437 458/68/437 487/68/437 +f 457/68/438 486/68/438 464/68/438 +s 1 +f 451/82/453 452/83/454 459/89/460 +f 451/82/453 459/89/460 458/90/461 +f 452/83/454 453/84/455 459/89/460 +f 453/84/455 460/91/462 459/89/460 +f 453/84/455 454/85/456 461/92/463 +f 453/84/455 461/92/463 460/91/462 +f 454/85/456 455/86/457 461/92/463 +f 455/86/457 462/93/464 461/92/463 +f 455/86/457 456/87/458 463/94/465 +f 455/86/457 463/94/465 462/93/464 +f 456/87/458 457/88/459 463/94/465 +f 457/88/459 464/95/466 463/94/465 +s 2 +f 458/68/437 465/68/437 487/68/437 +f 464/68/438 486/68/438 471/68/438 +s 1 +f 458/90/461 459/89/460 465/96/467 +f 459/89/460 466/97/468 465/96/467 +f 459/89/460 460/91/462 467/98/469 +f 459/89/460 467/98/469 466/97/468 +f 460/91/462 461/92/463 467/98/469 +f 461/92/463 468/99/470 467/98/469 +f 461/92/463 462/93/464 469/100/471 +f 461/92/463 469/100/471 468/99/470 +f 462/93/464 463/94/465 469/100/471 +f 463/94/465 470/101/472 469/100/471 +f 463/94/465 464/95/466 471/102/473 +f 463/94/465 471/102/473 470/101/472 +s 2 +f 465/68/437 472/68/437 487/68/437 +f 471/68/438 486/68/438 478/68/438 +s 1 +f 465/96/467 466/97/468 473/103/474 +f 465/96/467 473/103/474 472/104/475 +f 466/97/468 467/98/469 473/103/474 +f 467/98/469 474/105/476 473/103/474 +f 467/98/469 468/99/470 475/106/477 +f 467/98/469 475/106/477 474/105/476 +f 468/99/470 469/100/471 475/106/477 +f 469/100/471 476/107/478 475/106/477 +f 469/100/471 470/101/472 477/108/479 +f 469/100/471 477/108/479 476/107/478 +f 470/101/472 471/102/473 477/108/479 +f 471/102/473 478/109/480 477/108/479 +s 2 +f 472/68/437 479/68/437 487/68/437 +f 478/68/438 486/68/438 485/68/438 +s 1 +f 472/104/475 473/103/474 479/110/481 +f 473/103/474 480/111/482 479/110/481 +f 473/103/474 474/105/476 481/112/483 +f 473/103/474 481/112/483 480/111/482 +f 474/105/476 475/106/477 481/112/483 +f 475/106/477 482/113/484 481/112/483 +f 475/106/477 476/107/478 483/114/485 +f 475/106/477 483/114/485 482/113/484 +f 476/107/478 477/108/479 483/114/485 +f 477/108/479 484/115/486 483/114/485 +f 477/108/479 478/109/480 485/116/487 +f 477/108/479 485/116/487 484/115/486 +s 2 +f 479/68/437 437/68/437 487/68/437 +f 485/68/438 486/68/438 443/68/438 +s 1 +f 479/110/481 480/111/482 438/117/440 +f 479/110/481 438/117/440 437/118/439 +f 480/111/482 481/112/483 438/117/440 +f 481/112/483 439/119/443 438/117/440 +f 481/112/483 482/113/484 440/120/445 +f 481/112/483 440/120/445 439/119/443 +f 482/113/484 483/114/485 440/120/445 +f 483/114/485 441/121/447 440/120/445 +f 483/114/485 484/115/486 442/122/449 +f 483/114/485 442/122/449 441/121/447 +f 484/115/486 485/116/487 442/122/449 +f 485/116/487 443/123/451 442/122/449 +# 98 triangles in group + +g Zahn +usemtl BeinTex +s 2 +f 488/124/488 491/124/488 510/124/488 +f 490/125/489 509/126/489 493/127/489 +s 1 +f 488/124/490 489/128/491 492/129/492 +f 488/124/490 492/129/492 491/124/488 +f 489/128/491 490/125/493 492/129/492 +f 490/125/493 493/127/494 492/129/492 +s 2 +f 491/124/488 494/124/488 510/124/488 +f 493/127/489 509/126/489 496/130/489 +s 1 +f 491/124/488 492/129/492 494/124/495 +f 492/129/492 495/131/496 494/124/495 +f 492/129/492 493/127/494 496/130/497 +f 492/129/492 496/130/497 495/131/496 +s 2 +f 494/124/488 497/124/488 510/124/488 +f 496/130/489 509/126/489 499/132/489 +s 1 +f 494/124/495 495/131/496 498/133/498 +f 494/124/495 498/133/498 497/124/488 +f 495/131/496 496/130/497 498/133/498 +f 496/130/497 499/132/499 498/133/498 +s 2 +f 497/124/488 500/124/488 510/124/488 +f 499/132/489 509/126/489 502/134/489 +s 1 +f 497/124/488 498/133/498 500/124/500 +f 498/133/498 501/135/501 500/124/500 +f 498/133/498 499/132/499 502/134/502 +f 498/133/498 502/134/502 501/135/501 +s 2 +f 500/124/488 503/124/488 510/124/488 +f 502/134/489 509/126/489 505/136/489 +s 1 +f 500/124/500 501/135/501 504/137/503 +f 500/124/500 504/137/503 503/124/488 +f 501/135/501 502/134/502 504/137/503 +f 502/134/502 505/136/504 504/137/503 +s 2 +f 503/124/488 506/124/488 510/124/488 +f 505/136/489 509/126/489 508/138/489 +s 1 +f 503/124/488 504/137/503 506/124/505 +f 504/137/503 507/139/506 506/124/505 +f 504/137/503 505/136/504 508/138/507 +f 504/137/503 508/138/507 507/139/506 +s 2 +f 506/124/488 488/124/488 510/124/488 +f 508/138/489 509/126/489 490/125/489 +s 1 +f 506/124/505 507/139/506 489/128/491 +f 506/124/505 489/128/491 488/124/490 +f 507/139/506 508/138/507 489/128/491 +f 508/138/507 490/125/493 489/128/491 +# 42 triangles in group + +g klZahn +usemtl BeinTex +s 2 +f 511/140/488 514/140/488 533/140/488 +f 513/141/508 532/142/508 516/143/508 +s 1 +f 511/140/509 512/144/510 515/145/511 +f 511/140/509 515/145/511 514/140/488 +f 512/144/510 513/141/512 515/145/511 +f 513/141/512 516/143/513 515/145/511 +s 2 +f 514/140/488 517/140/488 533/140/488 +f 516/143/508 532/142/508 519/146/508 +s 1 +f 514/140/488 515/145/511 517/140/514 +f 515/145/511 518/147/515 517/140/514 +f 515/145/511 516/143/513 519/146/516 +f 515/145/511 519/146/516 518/147/515 +s 2 +f 517/140/488 520/140/488 533/140/488 +f 519/146/508 532/142/508 522/148/508 +s 1 +f 517/140/514 518/147/515 521/149/517 +f 517/140/514 521/149/517 520/140/488 +f 518/147/515 519/146/516 521/149/517 +f 519/146/516 522/148/518 521/149/517 +s 2 +f 520/140/488 523/140/488 533/140/488 +f 522/148/508 532/142/508 525/150/508 +s 1 +f 520/140/488 521/149/517 523/140/519 +f 521/149/517 524/151/520 523/140/519 +f 521/149/517 522/148/518 525/150/521 +f 521/149/517 525/150/521 524/151/520 +s 2 +f 523/140/488 526/140/488 533/140/488 +f 525/150/508 532/142/508 528/152/508 +s 1 +f 523/140/519 524/151/520 527/153/522 +f 523/140/519 527/153/522 526/140/488 +f 524/151/520 525/150/521 527/153/522 +f 525/150/521 528/152/523 527/153/522 +s 2 +f 526/140/488 529/140/488 533/140/488 +f 528/152/508 532/142/508 531/154/508 +s 1 +f 526/140/488 527/153/522 529/140/524 +f 527/153/522 530/155/525 529/140/524 +f 527/153/522 528/152/523 531/154/526 +f 527/153/522 531/154/526 530/155/525 +s 2 +f 529/140/488 511/140/488 533/140/488 +f 531/154/508 532/142/508 513/141/508 +s 1 +f 529/140/524 530/155/525 512/144/510 +f 529/140/524 512/144/510 511/140/509 +f 530/155/525 531/154/526 512/144/510 +f 531/154/526 513/141/512 512/144/510 +# 42 triangles in group + +g Kopf +usemtl Skin +f 534/68/527 563/156/528 562/157/529 +f 534/68/527 564/158/530 563/156/528 +f 535/69/531 536/159/532 537/160/533 +f 534/68/527 565/161/534 564/158/530 +f 535/69/531 537/160/533 538/162/535 +f 534/68/527 566/163/536 565/161/534 +f 535/69/531 538/162/535 539/164/537 +f 534/68/527 567/165/538 566/163/536 +f 535/69/531 539/164/537 540/166/539 +f 534/68/527 568/167/540 567/165/538 +f 542/168/541 543/169/542 536/159/532 +f 536/159/532 543/169/542 544/170/543 +f 536/159/532 544/170/543 537/160/533 +f 537/160/533 544/170/543 538/162/535 +f 544/170/543 545/169/544 538/162/535 +f 538/162/535 545/169/544 546/171/545 +f 538/162/535 546/171/545 539/164/537 +f 539/164/537 546/171/545 540/166/539 +f 546/171/545 547/172/546 540/166/539 +f 541/173/547 548/174/548 542/168/541 +f 548/174/548 549/175/549 542/168/541 +f 542/168/541 549/175/549 550/176/550 +f 542/168/541 550/176/550 543/169/542 +f 543/169/542 550/176/550 544/170/543 +f 550/176/550 551/177/551 544/170/543 +f 544/170/543 551/177/551 552/178/552 +f 544/170/543 552/178/552 545/169/544 +f 545/169/544 552/178/552 546/171/545 +f 552/178/552 553/179/553 546/171/545 +f 546/171/545 553/179/553 554/180/554 +f 546/171/545 554/180/554 547/172/546 +f 548/174/548 555/181/555 556/182/556 +f 548/174/548 556/182/556 549/175/549 +f 549/175/549 556/182/556 550/176/550 +f 556/182/556 557/183/557 550/176/550 +f 550/176/550 557/183/557 558/184/558 +f 550/176/550 558/184/558 551/177/551 +f 551/177/551 558/184/558 552/178/552 +f 558/184/558 559/185/559 552/178/552 +f 553/179/553 560/186/560 554/180/554 +f 560/186/560 561/187/561 554/180/554 +f 555/181/555 562/157/529 556/182/556 +f 562/157/529 563/156/528 556/182/556 +f 556/182/556 563/156/528 564/158/530 +f 556/182/556 564/158/530 557/183/557 +f 557/183/557 564/158/530 558/184/558 +f 564/158/530 565/161/534 558/184/558 +f 558/184/558 565/161/534 566/163/536 +f 558/184/558 566/163/536 559/185/559 +f 559/185/559 566/163/536 560/186/560 +f 566/163/536 567/165/538 560/186/560 +f 560/186/560 567/165/538 568/167/540 +f 560/186/560 568/167/540 561/187/561 +f 575/188/562 585/189/563 586/190/564 +f 553/179/553 576/191/565 586/190/564 +f 586/190/564 575/188/562 553/179/553 +f 577/192/566 576/191/565 553/179/553 +f 576/191/565 577/192/566 587/193/567 +f 587/193/567 586/190/564 576/191/565 +f 588/194/568 587/193/567 577/192/566 +f 577/192/566 578/195/569 588/194/568 +f 589/196/570 588/194/568 579/197/571 +f 578/195/569 579/197/571 588/194/568 +f 590/198/572 589/196/570 569/199/573 +f 589/196/570 579/197/571 569/199/573 +f 569/199/573 580/200/574 590/198/572 +f 569/199/573 570/201/575 580/200/574 +f 570/201/575 571/202/576 580/200/574 +f 581/203/577 580/200/574 571/202/576 +f 571/202/576 572/204/578 581/203/577 +f 582/205/579 581/203/577 572/204/578 +f 583/206/580 582/205/579 572/204/578 +f 572/204/578 573/207/581 583/206/580 +f 584/208/582 583/206/580 573/207/581 +f 573/207/581 574/209/583 584/208/582 +f 585/189/563 584/208/582 574/209/583 +f 574/209/583 575/188/562 585/189/563 +f 575/188/562 560/186/560 553/179/553 +f 575/188/562 574/209/583 560/186/560 +f 574/209/583 573/207/581 560/186/560 +f 573/207/581 572/204/578 560/186/560 +f 572/204/578 571/202/576 560/186/560 +f 559/185/559 560/186/560 571/202/576 +f 571/202/576 570/201/575 559/185/559 +f 570/201/575 569/199/573 559/185/559 +f 577/192/566 553/179/553 552/178/552 +f 578/195/569 577/192/566 552/178/552 +f 579/197/571 578/195/569 552/178/552 +f 552/178/552 559/185/559 569/199/573 +f 579/197/571 569/199/573 552/178/552 +# 90 triangles in group + +g Brust +usemtl Skin +f 595/210/584 596/211/585 597/212/586 +f 591/120/587 597/212/586 593/213/588 +f 597/212/586 596/211/585 593/213/588 +f 595/210/584 597/212/586 598/214/589 +f 599/215/590 598/214/589 600/216/591 +f 591/120/587 600/216/591 597/212/586 +f 598/214/589 597/212/586 600/216/591 +f 595/210/584 598/214/589 601/217/592 +f 602/75/593 601/217/592 603/218/594 +f 599/215/590 603/218/594 598/214/589 +f 601/217/592 598/214/589 603/218/594 +f 602/75/593 603/218/594 604/219/595 +f 599/215/590 605/220/596 603/218/594 +f 604/219/595 603/218/594 605/220/596 +f 599/215/590 600/216/591 606/221/597 +f 591/120/587 592/222/598 600/216/591 +f 606/221/597 600/216/591 592/222/598 +f 595/210/584 601/217/592 594/223/599 +f 602/75/593 607/224/600 601/217/592 +f 594/223/599 601/217/592 607/224/600 +# 20 triangles in group + +g Kopf2 +usemtl Skin +f 636/225/601 637/226/602 608/123/603 +f 637/226/602 638/227/604 608/123/603 +f 611/228/605 610/229/606 609/118/607 +f 638/227/604 639/230/608 608/123/603 +f 612/231/609 611/228/605 609/118/607 +f 639/230/608 640/232/610 608/123/603 +f 613/233/611 612/231/609 609/118/607 +f 640/232/610 641/234/612 608/123/603 +f 614/235/613 613/233/611 609/118/607 +f 641/234/612 642/236/614 608/123/603 +f 610/229/606 617/237/615 616/238/616 +f 618/239/617 617/237/615 610/229/606 +f 611/228/605 618/239/617 610/229/606 +f 612/231/609 618/239/617 611/228/605 +f 612/231/609 619/237/618 618/239/617 +f 620/240/619 619/237/618 612/231/609 +f 613/233/611 620/240/619 612/231/609 +f 614/235/613 620/240/619 613/233/611 +f 614/235/613 621/241/620 620/240/619 +f 616/238/616 622/176/621 615/242/622 +f 616/238/616 623/243/623 622/176/621 +f 624/174/624 623/243/623 616/238/616 +f 617/237/615 624/174/624 616/238/616 +f 618/239/617 624/174/624 617/237/615 +f 618/239/617 625/244/625 624/174/624 +f 626/245/626 625/244/625 618/239/617 +f 619/237/618 626/245/626 618/239/617 +f 620/240/619 626/245/626 619/237/618 +f 620/240/619 627/246/627 626/245/626 +f 628/247/628 627/246/627 620/240/619 +f 621/241/620 628/247/628 620/240/619 +f 630/248/629 629/249/630 622/176/621 +f 623/243/623 630/248/629 622/176/621 +f 624/174/624 630/248/629 623/243/623 +f 624/174/624 631/250/631 630/248/629 +f 632/251/632 631/250/631 624/174/624 +f 625/244/625 632/251/632 624/174/624 +f 626/245/626 632/251/632 625/244/625 +f 626/245/626 633/252/633 632/251/632 +f 628/247/628 634/253/634 627/246/627 +f 628/247/628 635/254/635 634/253/634 +f 630/248/629 636/225/601 629/249/630 +f 630/248/629 637/226/602 636/225/601 +f 638/227/604 637/226/602 630/248/629 +f 631/250/631 638/227/604 630/248/629 +f 632/251/632 638/227/604 631/250/631 +f 632/251/632 639/230/608 638/227/604 +f 640/232/610 639/230/608 632/251/632 +f 633/252/633 640/232/610 632/251/632 +f 634/253/634 640/232/610 633/252/633 +f 634/253/634 641/234/612 640/232/610 +f 642/236/614 641/234/612 634/253/634 +f 635/254/635 642/236/614 634/253/634 +f 660/255/636 659/256/637 649/257/638 +f 660/255/636 650/258/639 627/246/627 +f 627/246/627 649/257/638 660/255/636 +f 627/246/627 650/258/639 651/259/640 +f 661/260/641 651/259/640 650/258/639 +f 650/258/639 660/255/636 661/260/641 +f 651/259/640 661/260/641 662/261/642 +f 662/261/642 652/262/643 651/259/640 +f 653/263/644 662/261/642 663/264/645 +f 662/261/642 653/263/644 652/262/643 +f 643/265/646 663/264/645 664/266/647 +f 643/265/646 653/263/644 663/264/645 +f 664/266/647 654/267/648 643/265/646 +f 654/267/648 644/268/649 643/265/646 +f 654/267/648 645/269/650 644/268/649 +f 645/269/650 654/267/648 655/270/651 +f 655/270/651 646/271/652 645/269/650 +f 646/271/652 655/270/651 656/272/653 +f 646/271/652 656/272/653 657/273/654 +f 657/273/654 647/274/655 646/271/652 +f 647/274/655 657/273/654 658/275/656 +f 658/275/656 648/276/657 647/274/655 +f 648/276/657 658/275/656 659/256/637 +f 659/256/637 649/257/638 648/276/657 +f 627/246/627 634/253/634 649/257/638 +f 634/253/634 648/276/657 649/257/638 +f 634/253/634 647/274/655 648/276/657 +f 634/253/634 646/271/652 647/274/655 +f 634/253/634 645/269/650 646/271/652 +f 645/269/650 634/253/634 633/252/633 +f 633/252/633 644/268/649 645/269/650 +f 633/252/633 643/265/646 644/268/649 +f 626/245/626 627/246/627 651/259/640 +f 626/245/626 651/259/640 652/262/643 +f 626/245/626 652/262/643 653/263/644 +f 643/265/646 633/252/633 626/245/626 +f 626/245/626 643/265/646 653/263/644 +# 90 triangles in group + +g Zahn2 +usemtl BeinTex +s 2 +f 687/124/488 668/124/488 665/124/488 +f 670/127/658 686/126/658 667/125/658 +s 1 +f 669/129/659 666/128/660 665/124/661 +f 668/124/488 669/129/659 665/124/661 +f 669/129/659 667/125/662 666/128/660 +f 669/129/659 670/127/663 667/125/662 +s 2 +f 687/124/488 671/124/488 668/124/488 +f 673/130/658 686/126/658 670/127/658 +s 1 +f 671/124/664 669/129/659 668/124/488 +f 671/124/664 672/131/665 669/129/659 +f 673/130/666 670/127/663 669/129/659 +f 672/131/665 673/130/666 669/129/659 +s 2 +f 687/124/488 674/124/488 671/124/488 +f 676/132/658 686/126/658 673/130/658 +s 1 +f 675/133/667 672/131/665 671/124/664 +f 674/124/488 675/133/667 671/124/664 +f 675/133/667 673/130/666 672/131/665 +f 675/133/667 676/132/668 673/130/666 +s 2 +f 687/124/488 677/124/488 674/124/488 +f 679/134/658 686/126/658 676/132/658 +s 1 +f 677/124/669 675/133/667 674/124/488 +f 677/124/669 678/135/670 675/133/667 +f 679/134/671 676/132/668 675/133/667 +f 678/135/670 679/134/671 675/133/667 +s 2 +f 687/124/488 680/124/488 677/124/488 +f 682/136/658 686/126/658 679/134/658 +s 1 +f 681/137/672 678/135/670 677/124/669 +f 680/124/488 681/137/672 677/124/669 +f 681/137/672 679/134/671 678/135/670 +f 681/137/672 682/136/673 679/134/671 +s 2 +f 687/124/488 683/124/488 680/124/488 +f 685/138/658 686/126/658 682/136/658 +s 1 +f 683/124/674 681/137/672 680/124/488 +f 683/124/674 684/139/675 681/137/672 +f 685/138/676 682/136/673 681/137/672 +f 684/139/675 685/138/676 681/137/672 +s 2 +f 687/124/488 665/124/488 683/124/488 +f 667/125/658 686/126/658 685/138/658 +s 1 +f 666/128/660 684/139/675 683/124/674 +f 665/124/661 666/128/660 683/124/674 +f 666/128/660 685/138/676 684/139/675 +f 666/128/660 667/125/662 685/138/676 +# 42 triangles in group + +g klZahn2 +usemtl BeinTex +s 2 +f 710/140/488 691/140/488 688/140/488 +f 693/143/677 709/142/677 690/141/677 +s 1 +f 692/145/678 689/144/679 688/140/680 +f 691/140/488 692/145/678 688/140/680 +f 692/145/678 690/141/681 689/144/679 +f 692/145/678 693/143/682 690/141/681 +s 2 +f 710/140/488 694/140/488 691/140/488 +f 696/146/677 709/142/677 693/143/677 +s 1 +f 694/140/683 692/145/678 691/140/488 +f 694/140/683 695/147/684 692/145/678 +f 696/146/685 693/143/682 692/145/678 +f 695/147/684 696/146/685 692/145/678 +s 2 +f 710/140/488 697/140/488 694/140/488 +f 699/148/677 709/142/677 696/146/677 +s 1 +f 698/149/686 695/147/684 694/140/683 +f 697/140/488 698/149/686 694/140/683 +f 698/149/686 696/146/685 695/147/684 +f 698/149/686 699/148/687 696/146/685 +s 2 +f 710/140/488 700/140/488 697/140/488 +f 702/150/677 709/142/677 699/148/677 +s 1 +f 700/140/688 698/149/686 697/140/488 +f 700/140/688 701/151/689 698/149/686 +f 702/150/690 699/148/687 698/149/686 +f 701/151/689 702/150/690 698/149/686 +s 2 +f 710/140/488 703/140/488 700/140/488 +f 705/152/677 709/142/677 702/150/677 +s 1 +f 704/153/691 701/151/689 700/140/688 +f 703/140/488 704/153/691 700/140/688 +f 704/153/691 702/150/690 701/151/689 +f 704/153/691 705/152/692 702/150/690 +s 2 +f 710/140/488 706/140/488 703/140/488 +f 708/154/677 709/142/677 705/152/677 +s 1 +f 706/140/693 704/153/691 703/140/488 +f 706/140/693 707/155/694 704/153/691 +f 708/154/695 705/152/692 704/153/691 +f 707/155/694 708/154/695 704/153/691 +s 2 +f 710/140/488 688/140/488 706/140/488 +f 690/141/677 709/142/677 708/154/677 +s 1 +f 689/144/679 707/155/694 706/140/693 +f 688/140/680 689/144/679 706/140/693 +f 689/144/679 708/154/695 707/155/694 +f 689/144/679 690/141/681 708/154/695 +# 42 triangles in group + +g Auge +usemtl Augentex +f 711/277/696 712/278/697 713/279/698 +f 711/277/696 713/279/698 714/280/699 +f 715/281/700 714/280/699 716/282/701 +f 714/280/699 713/279/698 716/282/701 +f 715/281/700 716/282/701 717/283/702 +f 718/284/703 720/285/704 721/286/705 +f 722/287/706 721/286/705 723/288/707 +f 719/289/708 723/288/707 720/285/704 +f 721/286/705 720/285/704 723/288/707 +f 722/287/706 723/288/707 724/290/709 +f 725/291/710 724/290/709 726/292/711 +f 719/289/708 726/292/711 723/288/707 +f 724/290/709 723/288/707 726/292/711 +f 725/291/710 727/293/712 729/294/713 +f 730/295/714 729/294/713 731/296/715 +f 728/297/716 731/296/715 727/293/712 +f 729/294/713 727/293/712 731/296/715 +f 730/295/714 731/296/715 732/298/717 +f 711/277/696 732/298/717 733/299/718 +f 728/297/716 733/299/718 731/296/715 +f 732/298/717 731/296/715 733/299/718 +f 711/277/696 733/299/718 712/278/697 +f 715/281/700 734/300/719 714/280/699 +f 711/277/696 714/280/699 732/298/717 +f 730/295/714 732/298/717 734/300/719 +f 714/280/699 734/300/719 732/298/717 +f 715/281/700 735/301/720 734/300/719 +f 730/295/714 734/300/719 736/302/721 +f 722/287/706 736/302/721 735/301/720 +f 734/300/719 735/301/720 736/302/721 +f 715/281/700 717/283/702 735/301/720 +f 722/287/706 735/301/720 721/286/705 +f 718/284/703 721/286/705 717/283/702 +f 735/301/720 717/283/702 721/286/705 +f 725/291/710 729/294/713 724/290/709 +f 722/287/706 724/290/709 736/302/721 +f 730/295/714 736/302/721 729/294/713 +f 724/290/709 729/294/713 736/302/721 +# 38 triangles in group + +g Duplicate05 +usemtl Augentex +f 739/279/722 738/278/723 737/277/724 +f 740/280/725 739/279/722 737/277/724 +f 742/282/726 740/280/725 741/281/727 +f 742/282/726 739/279/722 740/280/725 +f 743/283/728 742/282/726 741/281/727 +f 747/286/729 746/285/730 744/284/731 +f 749/288/732 747/286/729 748/287/733 +f 746/285/730 749/288/732 745/289/734 +f 749/288/732 746/285/730 747/286/729 +f 750/290/735 749/288/732 748/287/733 +f 752/292/736 750/290/735 751/291/737 +f 749/288/732 752/292/736 745/289/734 +f 752/292/736 749/288/732 750/290/735 +f 755/294/738 753/293/739 751/291/737 +f 757/296/740 755/294/738 756/295/741 +f 753/293/739 757/296/740 754/297/742 +f 757/296/740 753/293/739 755/294/738 +f 758/298/743 757/296/740 756/295/741 +f 759/299/744 758/298/743 737/277/724 +f 757/296/740 759/299/744 754/297/742 +f 759/299/744 757/296/740 758/298/743 +f 738/278/723 759/299/744 737/277/724 +f 740/280/725 760/300/745 741/281/727 +f 758/298/743 740/280/725 737/277/724 +f 760/300/745 758/298/743 756/295/741 +f 758/298/743 760/300/745 740/280/725 +f 760/300/745 761/301/746 741/281/727 +f 762/302/747 760/300/745 756/295/741 +f 761/301/746 762/302/747 748/287/733 +f 762/302/747 761/301/746 760/300/745 +f 761/301/746 743/283/728 741/281/727 +f 747/286/729 761/301/746 748/287/733 +f 743/283/728 747/286/729 744/284/731 +f 747/286/729 743/283/728 761/301/746 +f 750/290/735 755/294/738 751/291/737 +f 762/302/747 750/290/735 748/287/733 +f 755/294/738 762/302/747 756/295/741 +f 762/302/747 755/294/738 750/290/735 +# 38 triangles in group + +# 1368 triangles total + diff --git a/test/models/OpenGEX/light_issue1262.ogex b/test/models/OpenGEX/light_issue1262.ogex new file mode 100644 index 000000000..da4723411 --- /dev/null +++ b/test/models/OpenGEX/light_issue1262.ogex @@ -0,0 +1,21 @@ +LightObject (type = "infinite") { + Param (attrib = "intensity") { + float { 3.0 } + } + + Color (attrib = "light") { + float[3] { { 0.7, 1.0, 0.1 } } + } +} + +LightObject (type = "point") { + Param (attrib = "intensity") { + float { 0.5 } + } +} + +LightObject (type = "spot") { + Color (attrib = "light") { + float[4] { { 0.1, 0.0, 0.1, 1.0 } } + } +} \ No newline at end of file diff --git a/test/models/PLY/float-color.ply b/test/models/PLY/float-color.ply new file mode 100644 index 000000000..34353ad53 --- /dev/null +++ b/test/models/PLY/float-color.ply @@ -0,0 +1,18 @@ +ply +format ascii 1.0 +comment VCGLIB generated +element vertex 3 +property float x +property float y +property float z +property float red +property float green +property float blue +property float alpha +element face 1 +property list uchar int vertex_indices +end_header +0.0 0.0 0.0 0 0 1 1 +100.0 0.0 0.0 0 0 1 1 +200.0 200.0 0.0 0 0 1 1 +3 0 1 2 \ No newline at end of file diff --git a/test/models/X3D/ComputerKeyboard.x3d b/test/models/X3D/ComputerKeyboard.x3d new file mode 100644 index 000000000..2d6c0707f --- /dev/null +++ b/test/models/X3D/ComputerKeyboard.x3d @@ -0,0 +1,232 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/unit/AbstractImportExportBase.cpp b/test/unit/AbstractImportExportBase.cpp index 27748301f..f3d49b85d 100644 --- a/test/unit/AbstractImportExportBase.cpp +++ b/test/unit/AbstractImportExportBase.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/test/unit/AssimpAPITest.cpp b/test/unit/AssimpAPITest.cpp index fa78e76a0..a284d385e 100644 --- a/test/unit/AssimpAPITest.cpp +++ b/test/unit/AssimpAPITest.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/test/unit/SceneDiffer.cpp b/test/unit/SceneDiffer.cpp index 14edeaa5c..401a655cc 100644 --- a/test/unit/SceneDiffer.cpp +++ b/test/unit/SceneDiffer.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/test/unit/SceneDiffer.h b/test/unit/SceneDiffer.h index f0cc45907..90f0d367c 100644 --- a/test/unit/SceneDiffer.h +++ b/test/unit/SceneDiffer.h @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/test/unit/TestIOStream.h b/test/unit/TestIOStream.h index a979caec8..3dbfc45e3 100644 --- a/test/unit/TestIOStream.h +++ b/test/unit/TestIOStream.h @@ -39,7 +39,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #pragma once -#include "DefaultIOStream.h" +#include using namespace ::Assimp; diff --git a/test/unit/TestIOSystem.h b/test/unit/TestIOSystem.h index e7ed193b8..a821c29ec 100644 --- a/test/unit/TestIOSystem.h +++ b/test/unit/TestIOSystem.h @@ -3,7 +3,7 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team All rights reserved. @@ -45,12 +45,18 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include using namespace std; -using namespace Assimp; + +namespace Assimp { static const string Sep = "/"; + class TestIOSystem : public IOSystem { public: - TestIOSystem() : IOSystem() {} + TestIOSystem() + : IOSystem() { + // empty + } + virtual ~TestIOSystem() {} virtual bool Exists( const char* ) const { return true; @@ -60,10 +66,14 @@ public: } virtual IOStream* Open( const char* pFile, const char* pMode = "rb" ) { + EXPECT_NE( nullptr, pFile ); + EXPECT_NE( nullptr, pMode ); return NULL; } virtual void Close( IOStream* pFile ) { - // empty + EXPECT_NE( nullptr, pFile ); } }; + +} // Namespace Assimp diff --git a/test/unit/TestModelFactory.h b/test/unit/TestModelFactory.h index 94dd97036..6c47dcf91 100644 --- a/test/unit/TestModelFactory.h +++ b/test/unit/TestModelFactory.h @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/test/unit/ut3DImportExport.cpp b/test/unit/ut3DImportExport.cpp index 28f1eb433..b55bf9c4c 100644 --- a/test/unit/ut3DImportExport.cpp +++ b/test/unit/ut3DImportExport.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/test/unit/ut3DSImportExport.cpp b/test/unit/ut3DSImportExport.cpp index 9d1052af0..07e6fc0f1 100644 --- a/test/unit/ut3DSImportExport.cpp +++ b/test/unit/ut3DSImportExport.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/test/unit/utACImportExport.cpp b/test/unit/utACImportExport.cpp index 757d065f6..3c3dcaa7b 100644 --- a/test/unit/utACImportExport.cpp +++ b/test/unit/utACImportExport.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/test/unit/utAMFImportExport.cpp b/test/unit/utAMFImportExport.cpp index fda1df1c9..e4ee5605a 100644 --- a/test/unit/utAMFImportExport.cpp +++ b/test/unit/utAMFImportExport.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/test/unit/utASEImportExport.cpp b/test/unit/utASEImportExport.cpp index 4fdbe8e79..baf900067 100644 --- a/test/unit/utASEImportExport.cpp +++ b/test/unit/utASEImportExport.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/test/unit/utAnim.cpp b/test/unit/utAnim.cpp index 90d6d36b3..643730f1b 100644 --- a/test/unit/utAnim.cpp +++ b/test/unit/utAnim.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/test/unit/utB3DImportExport.cpp b/test/unit/utB3DImportExport.cpp index 916a2112d..0a800ccb6 100644 --- a/test/unit/utB3DImportExport.cpp +++ b/test/unit/utB3DImportExport.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/test/unit/utBVHImportExport.cpp b/test/unit/utBVHImportExport.cpp index b78d9c2a0..48281c667 100644 --- a/test/unit/utBVHImportExport.cpp +++ b/test/unit/utBVHImportExport.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/test/unit/utBatchLoader.cpp b/test/unit/utBatchLoader.cpp index b3d74a0aa..32ec8709e 100644 --- a/test/unit/utBatchLoader.cpp +++ b/test/unit/utBatchLoader.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/test/unit/utBlendImportAreaLight.cpp b/test/unit/utBlendImportAreaLight.cpp index 603a5e513..04cc8cbcf 100644 --- a/test/unit/utBlendImportAreaLight.cpp +++ b/test/unit/utBlendImportAreaLight.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/test/unit/utBlendImportMaterials.cpp b/test/unit/utBlendImportMaterials.cpp index f45c2a219..6e1033453 100644 --- a/test/unit/utBlendImportMaterials.cpp +++ b/test/unit/utBlendImportMaterials.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. @@ -69,7 +70,7 @@ TEST_F(BlendImportMaterials, testImportMaterial) ASSERT_TRUE(pTest != NULL); ASSERT_TRUE(pTest->HasMaterials()); - ASSERT_EQ(1, pTest->mNumMaterials); + ASSERT_EQ(1U, pTest->mNumMaterials); auto alpha = pTest->mMaterials[0]; diff --git a/test/unit/utBlenderImportExport.cpp b/test/unit/utBlenderImportExport.cpp index 2c2b712b1..a120fdcc5 100644 --- a/test/unit/utBlenderImportExport.cpp +++ b/test/unit/utBlenderImportExport.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/test/unit/utBlenderIntermediate.cpp b/test/unit/utBlenderIntermediate.cpp index 89b324324..9c9436574 100644 --- a/test/unit/utBlenderIntermediate.cpp +++ b/test/unit/utBlenderIntermediate.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/test/unit/utCSMImportExport.cpp b/test/unit/utCSMImportExport.cpp index 6fc27d597..eb6672a44 100644 --- a/test/unit/utCSMImportExport.cpp +++ b/test/unit/utCSMImportExport.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/test/unit/utColladaExportCamera.cpp b/test/unit/utColladaExportCamera.cpp index 1d03b62a1..4949efc83 100644 --- a/test/unit/utColladaExportCamera.cpp +++ b/test/unit/utColladaExportCamera.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/test/unit/utColladaExportLight.cpp b/test/unit/utColladaExportLight.cpp index 2c502b987..ccff1a31e 100644 --- a/test/unit/utColladaExportLight.cpp +++ b/test/unit/utColladaExportLight.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/test/unit/utColladaImportExport.cpp b/test/unit/utColladaImportExport.cpp index 23134d313..997fca188 100644 --- a/test/unit/utColladaImportExport.cpp +++ b/test/unit/utColladaImportExport.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/test/unit/utD3MFImportExport.cpp b/test/unit/utD3MFImportExport.cpp new file mode 100644 index 000000000..7b7e8fb11 --- /dev/null +++ b/test/unit/utD3MFImportExport.cpp @@ -0,0 +1,58 @@ +/* +--------------------------------------------------------------------------- +Open Asset Import Library (assimp) +--------------------------------------------------------------------------- + +Copyright (c) 2006-2017, assimp 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 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 "UnitTestPCH.h" +#include "AbstractImportExportBase.h" + +#include + +class utD3MFImporterExporter : public AbstractImportExportBase { +public: + virtual bool importerTest() { + Assimp::Importer importer; + const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/3MF/box.3mf", 0); + return nullptr != scene; + } +}; + +TEST_F(utD3MFImporterExporter, import3MFFromFileTest) { + EXPECT_TRUE(importerTest()); +} diff --git a/test/unit/utDXFImporterExporter.cpp b/test/unit/utDXFImporterExporter.cpp index 74912212c..389284608 100644 --- a/test/unit/utDXFImporterExporter.cpp +++ b/test/unit/utDXFImporterExporter.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/test/unit/utDefaultIOStream.cpp b/test/unit/utDefaultIOStream.cpp index 3f570665f..9c1beb193 100644 --- a/test/unit/utDefaultIOStream.cpp +++ b/test/unit/utDefaultIOStream.cpp @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/test/unit/utExport.cpp b/test/unit/utExport.cpp index f34429338..f810e3dce 100644 --- a/test/unit/utExport.cpp +++ b/test/unit/utExport.cpp @@ -77,7 +77,7 @@ TEST_F(ExporterTest, testCExportInterface) for(size_t i = 0; i < aiGetExportFormatCount(); ++i) { const aiExportFormatDesc* const desc = aiGetExportFormatDescription(i); EXPECT_TRUE(desc); - // rest has aleady been validated by testCppExportInterface + // rest has already been validated by testCppExportInterface } } diff --git a/test/unit/utFBXImporterExporter.cpp b/test/unit/utFBXImporterExporter.cpp index d02d06def..f335bc682 100644 --- a/test/unit/utFBXImporterExporter.cpp +++ b/test/unit/utFBXImporterExporter.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/test/unit/utFastAtof.cpp b/test/unit/utFastAtof.cpp index 2b58f6bd7..a9d6fdbd0 100644 --- a/test/unit/utFastAtof.cpp +++ b/test/unit/utFastAtof.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/test/unit/utFindDegenerates.cpp b/test/unit/utFindDegenerates.cpp index 8df160107..8040a83a1 100644 --- a/test/unit/utFindDegenerates.cpp +++ b/test/unit/utFindDegenerates.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/test/unit/utFindInvalidData.cpp b/test/unit/utFindInvalidData.cpp index 0fe291c80..adba32256 100644 --- a/test/unit/utFindInvalidData.cpp +++ b/test/unit/utFindInvalidData.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/test/unit/utFixInfacingNormals.cpp b/test/unit/utFixInfacingNormals.cpp index e55958cd5..66be19807 100644 --- a/test/unit/utFixInfacingNormals.cpp +++ b/test/unit/utFixInfacingNormals.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/test/unit/utGenNormals.cpp b/test/unit/utGenNormals.cpp index b108242da..ec3469f14 100644 --- a/test/unit/utGenNormals.cpp +++ b/test/unit/utGenNormals.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/test/unit/utHMPImportExport.cpp b/test/unit/utHMPImportExport.cpp index 3dcfc387e..2b71c7211 100644 --- a/test/unit/utHMPImportExport.cpp +++ b/test/unit/utHMPImportExport.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/test/unit/utIFCImportExport.cpp b/test/unit/utIFCImportExport.cpp index 4b825a36b..79edb8e01 100644 --- a/test/unit/utIFCImportExport.cpp +++ b/test/unit/utIFCImportExport.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/test/unit/utIOStreamBuffer.cpp b/test/unit/utIOStreamBuffer.cpp index aa70881a9..0bf69bf00 100644 --- a/test/unit/utIOStreamBuffer.cpp +++ b/test/unit/utIOStreamBuffer.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/test/unit/utIOSystem.cpp b/test/unit/utIOSystem.cpp index a2b333ab0..f33b22039 100644 --- a/test/unit/utIOSystem.cpp +++ b/test/unit/utIOSystem.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. @@ -62,12 +63,13 @@ protected: TEST_F( IOSystemTest, accessDirectoryStackTest ) { EXPECT_FALSE( pImp->PopDirectory() ); - EXPECT_EQ( 0, pImp->StackSize() ); + EXPECT_EQ( 0U, pImp->StackSize() ); EXPECT_FALSE( pImp->PushDirectory( "" ) ); std::string path = "test/"; EXPECT_TRUE( pImp->PushDirectory( path ) ); - EXPECT_EQ( 1, pImp->StackSize() ); + EXPECT_EQ( 1U, pImp->StackSize() ); EXPECT_EQ( path, pImp->CurrentDirectory() ); EXPECT_TRUE( pImp->PopDirectory() ); - EXPECT_EQ( 0, pImp->StackSize() ); + EXPECT_EQ( 0U, pImp->StackSize() ); } + diff --git a/test/unit/utImporter.cpp b/test/unit/utImporter.cpp index ac1f0194f..aaf0bd4ec 100644 --- a/test/unit/utImporter.cpp +++ b/test/unit/utImporter.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. @@ -45,7 +46,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include #include "TestIOSystem.h" -#include "DefaultIOSystem.h" +#include using namespace ::std; using namespace ::Assimp; @@ -53,12 +54,12 @@ using namespace ::Assimp; class ImporterTest : public ::testing::Test { public: - virtual void SetUp() { - pImp = new Importer(); + virtual void SetUp() { + pImp = new Importer(); } - - virtual void TearDown() { - delete pImp; + + virtual void TearDown() { + delete pImp; } protected: @@ -275,4 +276,4 @@ TEST_F(ImporterTest, testMultipleReads) TEST_F( ImporterTest, SearchFileHeaderForTokenTest ) { //DefaultIOSystem ioSystem; // BaseImporter::SearchFileHeaderForToken( &ioSystem, assetPath, Token, 2 ) -} \ No newline at end of file +} diff --git a/test/unit/utImproveCacheLocality.cpp b/test/unit/utImproveCacheLocality.cpp index 630526754..0f08d462c 100644 --- a/test/unit/utImproveCacheLocality.cpp +++ b/test/unit/utImproveCacheLocality.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/test/unit/utIssues.cpp b/test/unit/utIssues.cpp index cae5ee8cc..a3e68fe1a 100644 --- a/test/unit/utIssues.cpp +++ b/test/unit/utIssues.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/test/unit/utJoinVertices.cpp b/test/unit/utJoinVertices.cpp index f9ad2cc98..d2add2b90 100644 --- a/test/unit/utJoinVertices.cpp +++ b/test/unit/utJoinVertices.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/test/unit/utLWSImportExport.cpp b/test/unit/utLWSImportExport.cpp index 3a5dc3247..f0252e211 100644 --- a/test/unit/utLWSImportExport.cpp +++ b/test/unit/utLWSImportExport.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/test/unit/utLimitBoneWeights.cpp b/test/unit/utLimitBoneWeights.cpp index 9b38a2fa5..022e4bda1 100644 --- a/test/unit/utLimitBoneWeights.cpp +++ b/test/unit/utLimitBoneWeights.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/test/unit/utMaterialSystem.cpp b/test/unit/utMaterialSystem.cpp index af31d19c8..f6b534f4f 100644 --- a/test/unit/utMaterialSystem.cpp +++ b/test/unit/utMaterialSystem.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/test/unit/utMatrix3x3.cpp b/test/unit/utMatrix3x3.cpp index d013980d0..47c20acf6 100644 --- a/test/unit/utMatrix3x3.cpp +++ b/test/unit/utMatrix3x3.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. @@ -45,7 +46,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. using namespace ::Assimp; class utMatrix3x3Test : public ::testing::Test { - + // empty }; TEST_F( utMatrix3x3Test, FromToMatrixTest ) { diff --git a/test/unit/utMatrix4x4.cpp b/test/unit/utMatrix4x4.cpp index 64ab2e499..92d430c0f 100644 --- a/test/unit/utMatrix4x4.cpp +++ b/test/unit/utMatrix4x4.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/test/unit/utMetadata.cpp b/test/unit/utMetadata.cpp index 08255d716..b44de1eb2 100644 --- a/test/unit/utMetadata.cpp +++ b/test/unit/utMetadata.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. @@ -54,7 +55,7 @@ protected: } virtual void TearDown() { - delete m_data; + aiMetadata::Dealloc( m_data ); } }; diff --git a/test/unit/utObjImportExport.cpp b/test/unit/utObjImportExport.cpp index 73cc057b9..d4d4fbf9e 100644 --- a/test/unit/utObjImportExport.cpp +++ b/test/unit/utObjImportExport.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. @@ -91,6 +92,7 @@ static const std::string ObjModel = "\n" "# Point / Line / Face list\n" "\n" + "g Box01\n" "usemtl Default\n" "f 4 3 2 1\n" "f 2 6 5 1\n" @@ -201,7 +203,7 @@ protected: ::Assimp::Exporter exporter; const aiScene *scene = importer.ReadFile( ASSIMP_TEST_MODELS_DIR "/OBJ/spider.obj", 0 ); EXPECT_NE( nullptr, scene ); - EXPECT_EQ( aiReturn_SUCCESS, exporter.Export( scene, "obj", ASSIMP_TEST_MODELS_DIR "/OBJ/spider.obj" ) ); + EXPECT_EQ( aiReturn_SUCCESS, exporter.Export( scene, "obj", ASSIMP_TEST_MODELS_DIR "/OBJ/spider_test.obj" ) ); return true; } diff --git a/test/unit/utObjTools.cpp b/test/unit/utObjTools.cpp new file mode 100644 index 000000000..89bb19aa0 --- /dev/null +++ b/test/unit/utObjTools.cpp @@ -0,0 +1,117 @@ +/* +--------------------------------------------------------------------------- +Open Asset Import Library (assimp) +--------------------------------------------------------------------------- + +Copyright (c) 2006-2017, assimp 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 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 "UnitTestPCH.h" +#include "ObjTools.h" +#include "ObjFileParser.h" + +using namespace ::Assimp; + +class utObjTools : public ::testing::Test { + // empty +}; + +class TestObjFileParser : public ObjFileParser { +public: + TestObjFileParser() : ObjFileParser(){ + // empty + } + + ~TestObjFileParser() { + // empty + } + + void testCopyNextWord( char *pBuffer, size_t length ) { + copyNextWord( pBuffer, length ); + } + + size_t testGetNumComponentsInDataDefinition() { + return getNumComponentsInDataDefinition(); + } +}; + +TEST_F( utObjTools, skipDataLine_OneLine_Success ) { + std::vector buffer; + std::string data( "v -0.5 -0.5 0.5\nend" ); + buffer.resize( data.size() ); + ::memcpy( &buffer[ 0 ], &data[ 0 ], data.size() ); + std::vector::iterator itBegin( buffer.begin() ), itEnd( buffer.end() ); + unsigned int line = 0; + std::vector::iterator current = skipLine::iterator>( itBegin, itEnd, line ); + EXPECT_EQ( 'e', *current ); +} + +TEST_F( utObjTools, skipDataLine_TwoLines_Success ) { + TestObjFileParser test_parser; + std::string data( "vn -2.061493116917992e-15 -0.9009688496589661 \\\n-0.4338837265968323" ); + std::vector buffer; + buffer.resize( data.size() ); + ::memcpy( &buffer[ 0 ], &data[ 0 ], data.size() ); + test_parser.setBuffer( buffer ); + static const size_t Size = 4096UL; + char data_buffer[ Size ]; + + test_parser.testCopyNextWord( data_buffer, Size ); + EXPECT_EQ( 0, strncmp( data_buffer, "vn", 2 ) ); + + test_parser.testCopyNextWord( data_buffer, Size ); + EXPECT_EQ( data_buffer[0], '-' ); + + test_parser.testCopyNextWord( data_buffer, Size ); + EXPECT_EQ( data_buffer[0], '-' ); + + test_parser.testCopyNextWord( data_buffer, Size ); + EXPECT_EQ( data_buffer[ 0 ], '-' ); +} + +TEST_F( utObjTools, countComponents_TwoLines_Success ) { + TestObjFileParser test_parser; + std::string data( "-2.061493116917992e-15 -0.9009688496589661 \\\n-0.4338837265968323" ); + std::vector buffer; + buffer.resize( data.size() ); + ::memcpy( &buffer[ 0 ], &data[ 0 ], data.size() ); + test_parser.setBuffer( buffer ); + static const size_t Size = 4096UL; + char data_buffer[ Size ]; + + size_t numComps = test_parser.testGetNumComponentsInDataDefinition(); + EXPECT_EQ( 3U, numComps ); +} diff --git a/test/unit/utOpenGEXImportExport.cpp b/test/unit/utOpenGEXImportExport.cpp new file mode 100644 index 000000000..60e8ce3a2 --- /dev/null +++ b/test/unit/utOpenGEXImportExport.cpp @@ -0,0 +1,71 @@ +/* +--------------------------------------------------------------------------- +Open Asset Import Library (assimp) +--------------------------------------------------------------------------- + +Copyright (c) 2006-2017, assimp 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 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 "UnitTestPCH.h" +#include "AbstractImportExportBase.h" + +#include + +using namespace Assimp; + + +class utOpenGEXImportExport : public AbstractImportExportBase { +public: + virtual bool importerTest() { + Assimp::Importer importer; + const aiScene *scene = importer.ReadFile( ASSIMP_TEST_MODELS_DIR "/OpenGEX/Example.ogex", 0 ); + return nullptr != scene; + + return true; + } +}; + +TEST_F( utOpenGEXImportExport, importLWSFromFileTest ) { + EXPECT_TRUE( importerTest() ); +} + +TEST_F( utOpenGEXImportExport, Importissue1262_NoCrash ) { + Assimp::Importer importer; + const aiScene *scene = importer.ReadFile( ASSIMP_TEST_MODELS_DIR "/OpenGEX/light_issue1262.ogex", 0 ); + EXPECT_NE( nullptr, scene ); + +} diff --git a/test/unit/utPLYImportExport.cpp b/test/unit/utPLYImportExport.cpp new file mode 100644 index 000000000..7ac15edac --- /dev/null +++ b/test/unit/utPLYImportExport.cpp @@ -0,0 +1,65 @@ +/* +--------------------------------------------------------------------------- +Open Asset Import Library (assimp) +--------------------------------------------------------------------------- + +Copyright (c) 2006-2017, assimp 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 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 "UnitTestPCH.h" + +#include +#include "AbstractImportExportBase.h" + +using namespace ::Assimp; + +class utPLYImportExport : public AbstractImportExportBase { +public: + virtual bool importerTest() { + Assimp::Importer importer; + const aiScene *scene = importer.ReadFile( ASSIMP_TEST_MODELS_DIR "/PLY/cube.ply", 0 ); + return nullptr != scene; + } +}; + +TEST_F( utPLYImportExport, importTest ) { + EXPECT_TRUE( importerTest() ); +} + +TEST_F( utPLYImportExport, vertexColorTest ) { + Assimp::Importer importer; + const aiScene *scene = importer.ReadFile( ASSIMP_TEST_MODELS_DIR "/PLY/float-color.ply", 0 ); + EXPECT_NE( nullptr, scene ); +} diff --git a/test/unit/utPMXImporter.cpp b/test/unit/utPMXImporter.cpp new file mode 100644 index 000000000..72916b8ef --- /dev/null +++ b/test/unit/utPMXImporter.cpp @@ -0,0 +1,63 @@ +/* +--------------------------------------------------------------------------- +Open Asset Import Library (assimp) +--------------------------------------------------------------------------- + +Copyright (c) 2006-2016, assimp 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 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 "UnitTestPCH.h" +#include "SceneDiffer.h" +#include "AbstractImportExportBase.h" +#include "MMDImporter.h" + +#include + +using namespace ::Assimp; + +class utPMXImporter : public AbstractImportExportBase { +public: + virtual bool importerTest() { + Assimp::Importer importer; + /*const aiScene *scene = importer.ReadFile( ASSIMP_TEST_MODELS_DIR "/../models-nonbsd/MMD/Alicia_blade.pmx", 0 ); + return nullptr != scene;*/ + return true; + } +}; + +TEST_F( utPMXImporter, importTest ) { + EXPECT_TRUE( importerTest() ); +} diff --git a/test/unit/utPretransformVertices.cpp b/test/unit/utPretransformVertices.cpp index dd1062ad4..9f40f3ddc 100644 --- a/test/unit/utPretransformVertices.cpp +++ b/test/unit/utPretransformVertices.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/test/unit/utRemoveComments.cpp b/test/unit/utRemoveComments.cpp index 12ff158aa..5bce51126 100644 --- a/test/unit/utRemoveComments.cpp +++ b/test/unit/utRemoveComments.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/test/unit/utRemoveComponent.cpp b/test/unit/utRemoveComponent.cpp index fc3bbbd49..31e47b77c 100644 --- a/test/unit/utRemoveComponent.cpp +++ b/test/unit/utRemoveComponent.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/test/unit/utRemoveRedundantMaterials.cpp b/test/unit/utRemoveRedundantMaterials.cpp index c683d4643..072ca6060 100644 --- a/test/unit/utRemoveRedundantMaterials.cpp +++ b/test/unit/utRemoveRedundantMaterials.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/test/unit/utRemoveVCProcess.cpp b/test/unit/utRemoveVCProcess.cpp new file mode 100644 index 000000000..a42c3e858 --- /dev/null +++ b/test/unit/utRemoveVCProcess.cpp @@ -0,0 +1,75 @@ +/* +--------------------------------------------------------------------------- +Open Asset Import Library (assimp) +--------------------------------------------------------------------------- + +Copyright (c) 2006-2017, assimp 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 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 "UnitTestPCH.h" +#include "code/RemoveVCProcess.h" +#include +#include + +using namespace ::Assimp; + +class utRevmoveVCProcess : public ::testing::Test { + // empty +}; + +TEST_F( utRevmoveVCProcess, createTest ) { + bool ok = true; + try { + RemoveVCProcess *process = new RemoveVCProcess; + delete process; + } catch ( ... ) { + ok = false; + } + EXPECT_TRUE( ok ); +} + +TEST_F( utRevmoveVCProcess, issue1266_ProcessMeshTest_NoCrash ) { + aiScene *scene = new aiScene; + scene->mNumMeshes = 1; + scene->mMeshes = new aiMesh*[ 1 ]; + + aiMesh *mesh = new aiMesh; + mesh->mNumVertices = 1; + mesh->mColors[ 0 ] = new aiColor4D[ 2 ]; + scene->mMeshes[ 0 ] = mesh; + RemoveVCProcess *process = new RemoveVCProcess; + process->Execute( scene ); +} \ No newline at end of file diff --git a/test/unit/utSIBImporter.cpp b/test/unit/utSIBImporter.cpp index b201537ce..ecaa92f26 100644 --- a/test/unit/utSIBImporter.cpp +++ b/test/unit/utSIBImporter.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/test/unit/utSMDImportExport.cpp b/test/unit/utSMDImportExport.cpp index d26885e47..9139bb922 100644 --- a/test/unit/utSMDImportExport.cpp +++ b/test/unit/utSMDImportExport.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/test/unit/utScenePreprocessor.cpp b/test/unit/utScenePreprocessor.cpp index 732990f9a..ce3716baf 100644 --- a/test/unit/utScenePreprocessor.cpp +++ b/test/unit/utScenePreprocessor.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/test/unit/utSharedPPData.cpp b/test/unit/utSharedPPData.cpp index fe7841b3d..e075365b8 100644 --- a/test/unit/utSharedPPData.cpp +++ b/test/unit/utSharedPPData.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/test/unit/utSortByPType.cpp b/test/unit/utSortByPType.cpp index 4dd26f983..13c46bd42 100644 --- a/test/unit/utSortByPType.cpp +++ b/test/unit/utSortByPType.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/test/unit/utSplitLargeMeshes.cpp b/test/unit/utSplitLargeMeshes.cpp index 47876caea..af6ed14ef 100644 --- a/test/unit/utSplitLargeMeshes.cpp +++ b/test/unit/utSplitLargeMeshes.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/test/unit/utStringUtils.cpp b/test/unit/utStringUtils.cpp index e75ff8d4b..3b45075eb 100644 --- a/test/unit/utStringUtils.cpp +++ b/test/unit/utStringUtils.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/test/unit/utTargetAnimation.cpp b/test/unit/utTargetAnimation.cpp index 1c039aa90..6742543a6 100644 --- a/test/unit/utTargetAnimation.cpp +++ b/test/unit/utTargetAnimation.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/test/unit/utTextureTransform.cpp b/test/unit/utTextureTransform.cpp index 1c039aa90..6742543a6 100644 --- a/test/unit/utTextureTransform.cpp +++ b/test/unit/utTextureTransform.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/test/unit/utTriangulate.cpp b/test/unit/utTriangulate.cpp index e9677d3e4..8908b9703 100644 --- a/test/unit/utTriangulate.cpp +++ b/test/unit/utTriangulate.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/test/unit/utTypes.cpp b/test/unit/utTypes.cpp index 875f66240..70a734082 100644 --- a/test/unit/utTypes.cpp +++ b/test/unit/utTypes.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/test/unit/utVector3.cpp b/test/unit/utVector3.cpp new file mode 100644 index 000000000..1492281a1 --- /dev/null +++ b/test/unit/utVector3.cpp @@ -0,0 +1,69 @@ +/*------------------------------------------------------------------------- +Open Asset Import Library (assimp) +--------------------------------------------------------------------------- + +Copyright (c) 2006-2017, assimp 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 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 "UnitTestPCH.h" +#include + +using namespace ::Assimp; + +class utVector3 : public ::testing::Test { + // empty +}; + +TEST_F(utVector3, CreationTest) { + aiVector3D v0; + aiVector3D v1( 1.0f, 2.0f, 3.0f ); + EXPECT_FLOAT_EQ (1.0f, v1[ 0 ] ); + EXPECT_FLOAT_EQ( 2.0f, v1[ 1 ] ); + EXPECT_FLOAT_EQ( 3.0f, v1[ 2 ] ); + aiVector3D v2( 1 ); + EXPECT_FLOAT_EQ( 1.0f, v2[ 0 ] ); + EXPECT_FLOAT_EQ( 1.0f, v2[ 1 ] ); + EXPECT_FLOAT_EQ( 1.0f, v2[ 2 ] ); + aiVector3D v3( v1 ); + EXPECT_FLOAT_EQ( v1[ 0 ], v3[ 0 ] ); + EXPECT_FLOAT_EQ( v1[ 1 ], v3[ 1 ] ); + EXPECT_FLOAT_EQ( v1[ 2 ], v3[ 2 ] ); +} + +TEST_F( utVector3, BracketOpTest ) { + aiVector3D v(1.0f, 2.0f, 3.0f); + EXPECT_FLOAT_EQ( 1.0f, v[ 0 ] ); + EXPECT_FLOAT_EQ( 2.0f, v[ 1 ] ); + EXPECT_FLOAT_EQ( 3.0f, v[ 2 ] ); +} diff --git a/test/unit/utVersion.cpp b/test/unit/utVersion.cpp index 498a451e4..2fce13b61 100644 --- a/test/unit/utVersion.cpp +++ b/test/unit/utVersion.cpp @@ -2,7 +2,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. @@ -48,7 +49,7 @@ TEST_F( utVersion, aiGetLegalStringTest ) { EXPECT_NE( lv, nullptr ); std::string text( lv ); - size_t pos( text.find( std::string( "2016" ) ) ); + size_t pos( text.find( std::string( "2017" ) ) ); EXPECT_NE( pos, std::string::npos ); } diff --git a/test/unit/utVertexTriangleAdjacency.cpp b/test/unit/utVertexTriangleAdjacency.cpp index ec729bac5..29067fead 100644 --- a/test/unit/utVertexTriangleAdjacency.cpp +++ b/test/unit/utVertexTriangleAdjacency.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/test/unit/utXImporterExporter.cpp b/test/unit/utXImporterExporter.cpp index 9293e042e..042853d3d 100644 --- a/test/unit/utXImporterExporter.cpp +++ b/test/unit/utXImporterExporter.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/test/unit/utglTFImportExport.cpp b/test/unit/utglTFImportExport.cpp index 1ae365037..3dc110435 100644 --- a/test/unit/utglTFImportExport.cpp +++ b/test/unit/utglTFImportExport.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/tools/assimp_cmd/CMakeLists.txt b/tools/assimp_cmd/CMakeLists.txt index f8af93a10..cb78942d7 100644 --- a/tools/assimp_cmd/CMakeLists.txt +++ b/tools/assimp_cmd/CMakeLists.txt @@ -1,7 +1,8 @@ # Open Asset Import Library (assimp) # ---------------------------------------------------------------------- # -# Copyright (c) 2006-2016, assimp team +# Copyright (c) 2006-2017, assimp team + # All rights reserved. # # Redistribution and use of this software in source and binary forms, diff --git a/tools/assimp_cmd/CompareDump.cpp b/tools/assimp_cmd/CompareDump.cpp index 1821ff6ec..2db11ef25 100644 --- a/tools/assimp_cmd/CompareDump.cpp +++ b/tools/assimp_cmd/CompareDump.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/tools/assimp_cmd/Export.cpp b/tools/assimp_cmd/Export.cpp index d83f5272a..3752db5e5 100644 --- a/tools/assimp_cmd/Export.cpp +++ b/tools/assimp_cmd/Export.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/tools/assimp_cmd/ImageExtractor.cpp b/tools/assimp_cmd/ImageExtractor.cpp index 7e7b9b439..691f62929 100644 --- a/tools/assimp_cmd/ImageExtractor.cpp +++ b/tools/assimp_cmd/ImageExtractor.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/tools/assimp_cmd/Info.cpp b/tools/assimp_cmd/Info.cpp index 3eb0e9d10..d116f04d2 100644 --- a/tools/assimp_cmd/Info.cpp +++ b/tools/assimp_cmd/Info.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/tools/assimp_cmd/Main.cpp b/tools/assimp_cmd/Main.cpp index 9c5368bf5..5bf3b9f06 100644 --- a/tools/assimp_cmd/Main.cpp +++ b/tools/assimp_cmd/Main.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/tools/assimp_cmd/WriteDumb.cpp b/tools/assimp_cmd/WriteDumb.cpp index 44b0c6926..3fe8b2c77 100644 --- a/tools/assimp_cmd/WriteDumb.cpp +++ b/tools/assimp_cmd/WriteDumb.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/tools/assimp_qt_viewer/CMakeLists.txt b/tools/assimp_qt_viewer/CMakeLists.txt index 2985d6e30..42ef0fb34 100644 --- a/tools/assimp_qt_viewer/CMakeLists.txt +++ b/tools/assimp_qt_viewer/CMakeLists.txt @@ -1,5 +1,5 @@ -project(assimp_qt_viewer) set(PROJECT_VERSION "") +project(assimp_qt_viewer) cmake_minimum_required(VERSION 2.6) diff --git a/tools/assimp_qt_viewer/glview.cpp b/tools/assimp_qt_viewer/glview.cpp index 2d1e07a98..1de8199fa 100644 --- a/tools/assimp_qt_viewer/glview.cpp +++ b/tools/assimp_qt_viewer/glview.cpp @@ -715,7 +715,7 @@ void CGLView::SetScene(const aiScene *pScene, const QString& pScenePath) mHelper_Mesh_Quantity = mScene->mNumMeshes; mHelper_Mesh = new SHelper_Mesh*[mScene->mNumMeshes]; - // Walk thru the meshes and extract needed data and, also calculate BBox. + // Walk through the meshes and extract needed data and, also calculate BBox. for(size_t idx_mesh = 0; idx_mesh < mScene->mNumMeshes; idx_mesh++) { aiMesh& mesh_cur = *mScene->mMeshes[idx_mesh]; @@ -793,7 +793,7 @@ void CGLView::SetScene(const aiScene *pScene, const QString& pScenePath) // // Scene BBox // - // For calculating right BBox we must walk thru all nodes and apply transformation to meshes BBoxes + // For calculating right BBox we must walk through all nodes and apply transformation to meshes BBoxes if(mHelper_Mesh_Quantity > 0) { bool first_assign = true; diff --git a/tools/assimp_qt_viewer/mainwindow.cpp b/tools/assimp_qt_viewer/mainwindow.cpp index cb4c4a67e..9b6e231bd 100644 --- a/tools/assimp_qt_viewer/mainwindow.cpp +++ b/tools/assimp_qt_viewer/mainwindow.cpp @@ -295,7 +295,7 @@ aiReturn rv; // begin export time_begin = QTime::currentTime(); - rv = exporter.Export(mScene, format_id.toLocal8Bit(), filename.toLocal8Bit()); + rv = exporter.Export(mScene, format_id.toLocal8Bit(), filename.toLocal8Bit(), aiProcess_FlipUVs); ui->lblExportTime->setText(QString("%1").arg(time_begin.secsTo(QTime::currentTime()))); if(rv == aiReturn_SUCCESS) LogInfo("Export done: " + filename); diff --git a/tools/assimp_view/CMakeLists.txt b/tools/assimp_view/CMakeLists.txt index 23e648b5b..adf2ae877 100644 --- a/tools/assimp_view/CMakeLists.txt +++ b/tools/assimp_view/CMakeLists.txt @@ -1,7 +1,8 @@ # Open Asset Import Library (assimp) # ---------------------------------------------------------------------- # -# Copyright (c) 2006-2016, assimp team +# Copyright (c) 2006-2017, assimp team + # All rights reserved. # # Redistribution and use of this software in source and binary forms, diff --git a/tools/assimp_view/MaterialManager.h b/tools/assimp_view/MaterialManager.h index d1c9eb507..17e133821 100644 --- a/tools/assimp_view/MaterialManager.h +++ b/tools/assimp_view/MaterialManager.h @@ -178,7 +178,7 @@ namespace AssimpView // Convert a height map to a normal map if necessary // // The function tries to detect the type of a texture automatically. - // However, this wont work in every case. + // However, this won't work in every case. void HMtoNMIfNecessary( IDirect3DTexture9* piTexture, IDirect3DTexture9** piTextureOut, bool bWasOriginallyHM = true ); diff --git a/tools/assimp_view/assimp_view.cpp b/tools/assimp_view/assimp_view.cpp index df80e3038..283761e88 100644 --- a/tools/assimp_view/assimp_view.cpp +++ b/tools/assimp_view/assimp_view.cpp @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved. diff --git a/tools/assimp_view/assimp_view.h b/tools/assimp_view/assimp_view.h index 6300c1a87..73c7d7947 100644 --- a/tools/assimp_view/assimp_view.h +++ b/tools/assimp_view/assimp_view.h @@ -3,7 +3,8 @@ Open Asset Import Library (assimp) --------------------------------------------------------------------------- -Copyright (c) 2006-2016, assimp team +Copyright (c) 2006-2017, assimp team + All rights reserved.