Merge branch 'master' of https://github.com/assimp/assimp
commit
f60f1544f7
|
@ -2,7 +2,14 @@
|
||||||
*.cpp text eol=lf
|
*.cpp text eol=lf
|
||||||
*.h text eol=lf
|
*.h text eol=lf
|
||||||
*.c text eol=lf
|
*.c text eol=lf
|
||||||
|
*.cc text eol=lf
|
||||||
|
*.cpp text eol=lf
|
||||||
|
*.rc text eol=lf
|
||||||
*.hpp text eol=lf
|
*.hpp text eol=lf
|
||||||
*.txt text eol=lf
|
*.txt text eol=lf
|
||||||
*.cmake text eol=lf
|
*.cmake text eol=lf
|
||||||
*.sh text eol=lf
|
*.sh text eol=lf
|
||||||
|
CHANGES text eol=lf
|
||||||
|
CREDITS text eol=lf
|
||||||
|
LICENSE text eol=lf
|
||||||
|
Readme.md text eol=lf
|
||||||
|
|
378
CHANGES
378
CHANGES
|
@ -1,173 +1,205 @@
|
||||||
----------------------------------------------------------------------
|
----------------------------------------------------------------------
|
||||||
CHANGELOG
|
CHANGELOG
|
||||||
----------------------------------------------------------------------
|
----------------------------------------------------------------------
|
||||||
|
|
||||||
3.2.1 (2016-10-01)
|
3.3.1 (2016-07-08)
|
||||||
|
|
||||||
FEATURES:
|
FIXES/HOUSEKEEPING:
|
||||||
- Updated glTF exporter to meet 1.0 specification.
|
- Setup of default precision for 17 exporters
|
||||||
|
- Fix xcode project files
|
||||||
FIXES/HOUSEKEEPING:
|
- Fix BlenderTesselator: offsetof operator
|
||||||
- Fixed glTF Validator errors for exported glTF format.
|
- Invalid version in cmake file
|
||||||
|
- Update pstdint.h to latest greatest
|
||||||
ISSUES:
|
|
||||||
- Hard coded sampler setting for
|
|
||||||
- magFilter
|
3.3.0 (2016-07-05)
|
||||||
- minFilter
|
|
||||||
- void* in ExportData for accessor max and min.
|
FEATURES:
|
||||||
|
- C++11 support enabled
|
||||||
|
- New regression-test-UI
|
||||||
|
- Experimental glTF-importer support
|
||||||
3.2.0 (2015-11-03)
|
- OpenGEX: add support for cameras and lights
|
||||||
|
- C4D: update to latest Melange-SDK
|
||||||
FEATURES:
|
- Add a gitter channel
|
||||||
- OpenDDL-Parser is part of contrib-source.
|
- Coverity check enabled
|
||||||
- Experimental OpenGEX-support
|
- Switch to <...> include brackets for public headers
|
||||||
- CI-check for linux and windows
|
- Enable export by pyAssimp
|
||||||
- Coverity check added
|
- CI: check windows build
|
||||||
- New regression testsuite.
|
- Add functionality to perform a singlepost-processing step
|
||||||
|
- many more, just check the history
|
||||||
FIXES/HOUSEKEEPING:
|
|
||||||
- Hundreds of bugfixes in all parts of the library
|
FIXES/HOUSEKEEPING:
|
||||||
- Unified line endings
|
- Fix of many resource leaks in unittests and main lib
|
||||||
|
- Fix iOS-buildfor X64
|
||||||
|
- Choosing zlib manually for cmake
|
||||||
API COMPATIBILITY:
|
- many more, just check the history
|
||||||
- Removed precompiled header to increase build speed for linux
|
|
||||||
|
|
||||||
|
3.2.1 (2016-010-10)
|
||||||
3.1.1 (2014-06-15)
|
|
||||||
|
FEATURES:
|
||||||
FEATURES:
|
- Updated glTF exporter to meet 1.0 specification.
|
||||||
- Support for FBX 2013 and newer, binary and ASCII (this is partly
|
|
||||||
work from Google Summer of Code 2012)
|
FIXES/HOUSEKEEPING:
|
||||||
- Support for OGRE binary mesh and skeleton format
|
- Fixed glTF Validator errors for exported glTF format.
|
||||||
- Updated BLEND support for newer Blender versions
|
|
||||||
- Support for arbitrary meta data, used to hold FBX and DAE metadata
|
ISSUES:
|
||||||
- OBJ Export now produces smaller files
|
- Hard coded sampler setting for
|
||||||
- Meshes can now have names, this is supported by the major importers
|
- magFilter
|
||||||
- Improved IFC geometry generation
|
- minFilter
|
||||||
- M3 support has been removed
|
- void* in ExportData for accessor max and min.
|
||||||
|
|
||||||
FIXES/HOUSEKEEPING:
|
|
||||||
- Hundreds of bugfixes in all parts of the library
|
3.2.0 (2015-11-03)
|
||||||
- CMake is now the primary build system
|
|
||||||
|
FEATURES:
|
||||||
API COMPATIBILITY:
|
- OpenDDL-Parser is part of contrib-source.
|
||||||
- 3.1.1 is not binary compatible to 3.0 due to aiNode::mMetaData
|
- Experimental OpenGEX-support
|
||||||
and aiMesh::mName
|
- CI-check for linux and windows
|
||||||
- Export interface has been cleaned up and unified
|
- Coverity check added
|
||||||
- Other than that no relevant changes
|
- New regression testsuite.
|
||||||
|
|
||||||
|
FIXES/HOUSEKEEPING:
|
||||||
3.0 (2012-07-07)
|
- Hundreds of bugfixes in all parts of the library
|
||||||
|
- Unified line endings
|
||||||
FEATURES:
|
|
||||||
- new export interface similar to the import API.
|
|
||||||
- Supported export formats: Collada, OBJ, PLY and STL
|
API COMPATIBILITY:
|
||||||
- added new import formats: XGL/ZGL, M3 (experimental)
|
- Removed precompiled header to increase build speed for linux
|
||||||
- new postprocessing steps: Debone
|
|
||||||
- vastly improved IFC (Industry Foundation Classes) support
|
|
||||||
- introduced API to query importer meta information (such as supported
|
3.1.1 (2014-06-15)
|
||||||
format versions, full name, maintainer info).
|
|
||||||
- reworked Ogre XML import
|
FEATURES:
|
||||||
- C-API now supports per-import properties
|
- Support for FBX 2013 and newer, binary and ASCII (this is partly
|
||||||
|
work from Google Summer of Code 2012)
|
||||||
FIXES/HOUSEKEEPING:
|
- Support for OGRE binary mesh and skeleton format
|
||||||
|
- Updated BLEND support for newer Blender versions
|
||||||
- hundreds of bugfixes in all parts of the library
|
- Support for arbitrary meta data, used to hold FBX and DAE metadata
|
||||||
- unified naming and cleanup of public headers
|
- OBJ Export now produces smaller files
|
||||||
- improved CMake build system
|
- Meshes can now have names, this is supported by the major importers
|
||||||
- templatized math library
|
- Improved IFC geometry generation
|
||||||
- reduce dependency on boost.thread, only remaining spot
|
- M3 support has been removed
|
||||||
is synchronization for the C logging API
|
|
||||||
|
FIXES/HOUSEKEEPING:
|
||||||
API COMPATIBILITY:
|
- Hundreds of bugfixes in all parts of the library
|
||||||
- renamed headers, export interface, C API properties and meta data
|
- CMake is now the primary build system
|
||||||
prevent compatibility with code written for 2.0, but in
|
|
||||||
most cases these can be easily resolved
|
API COMPATIBILITY:
|
||||||
- Note: 3.0 is not binary compatible with 2.0
|
- 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
|
||||||
|
|
||||||
2.0 (2010-11-21)
|
|
||||||
|
3.0 (2012-07-07)
|
||||||
FEATURES:
|
|
||||||
- Add support for static Blender (*.blend) scenes
|
FEATURES:
|
||||||
- Add support for Q3BSP scenes
|
- new export interface similar to the import API.
|
||||||
- Add a windows-based OpenGL sample featuring texturing & basic materials
|
- Supported export formats: Collada, OBJ, PLY and STL
|
||||||
- Add an experimental progress feedback interface.
|
- added new import formats: XGL/ZGL, M3 (experimental)
|
||||||
- Vastly improved performance (up to 500%, depending on mesh size and
|
- new postprocessing steps: Debone
|
||||||
spatial structure) in some expensive postprocessing steps
|
- vastly improved IFC (Industry Foundation Classes) support
|
||||||
- AssimpView now uses a reworked layout which leaves more space
|
- introduced API to query importer meta information (such as supported
|
||||||
to the scene hierarchy window
|
format versions, full name, maintainer info).
|
||||||
|
- reworked Ogre XML import
|
||||||
- Add C# bindings ('Assimp.NET')
|
- C-API now supports per-import properties
|
||||||
- Keep BSD-licensed and otherwise free test files in separate
|
|
||||||
folders (./test/models and ./test/models-nonbsd).
|
FIXES/HOUSEKEEPING:
|
||||||
|
|
||||||
FIXES:
|
- hundreds of bugfixes in all parts of the library
|
||||||
- Many Collada bugfixes, improve fault tolerance
|
- unified naming and cleanup of public headers
|
||||||
- Fix possible crashes in the Obj loader
|
- improved CMake build system
|
||||||
- Improve the Ogre XML loader
|
- templatized math library
|
||||||
- OpenGL-sample now works with MinGW
|
- reduce dependency on boost.thread, only remaining spot
|
||||||
- Fix Importer::FindLoader failing on uppercase file extensions
|
is synchronization for the C logging API
|
||||||
- Fix flawed path handling when locating external files
|
|
||||||
- Limit the maximum number of vertices, faces, face indices and
|
API COMPATIBILITY:
|
||||||
weights that Assimp is able to handle. This is to avoid
|
- renamed headers, export interface, C API properties and meta data
|
||||||
crashes due to overflowing counters.
|
prevent compatibility with code written for 2.0, but in
|
||||||
|
most cases these can be easily resolved
|
||||||
- Updated XCode project files
|
- Note: 3.0 is not binary compatible with 2.0
|
||||||
- Further CMAKE build improvements
|
|
||||||
|
|
||||||
|
|
||||||
API CHANGES:
|
|
||||||
- Add data structures for vertex-based animations (These are not
|
2.0 (2010-11-21)
|
||||||
currently used, however ...)
|
|
||||||
- Some Assimp::Importer methods are const now.
|
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
|
||||||
1.1 (2010-04-17)
|
spatial structure) in some expensive postprocessing steps
|
||||||
This is the list of relevant changes from the 1.0 (r412) release to 1.1 (r700).
|
- AssimpView now uses a reworked layout which leaves more space
|
||||||
|
to the scene hierarchy window
|
||||||
FEATURES:
|
|
||||||
- Vastly improved Collada support
|
- Add C# bindings ('Assimp.NET')
|
||||||
- Add MS3D (Milkshape 3D) support
|
- Keep BSD-licensed and otherwise free test files in separate
|
||||||
- Add support for Ogre XML static meshes
|
folders (./test/models and ./test/models-nonbsd).
|
||||||
- Add experimental COB (TrueSpace) support
|
|
||||||
- Automatic test suite to quickly locate regressions
|
FIXES:
|
||||||
- D bindings (`dAssimp`)
|
- Many Collada bugfixes, improve fault tolerance
|
||||||
- Python 2.n bindings (`PyAssimp`)
|
- Fix possible crashes in the Obj loader
|
||||||
- Add basic support for Unicode input files (utf8, utf16 and utf32)
|
- Improve the Ogre XML loader
|
||||||
- Add further utilities to the `assimp` tool (xml/binary dumps, quick file stats)
|
- OpenGL-sample now works with MinGW
|
||||||
- Switch to a CMAKE-based build system including an install target for unix'es
|
- Fix Importer::FindLoader failing on uppercase file extensions
|
||||||
- Automatic evaluation of subdivision surfaces for some formats.
|
- Fix flawed path handling when locating external files
|
||||||
- Add `Importer::ReadFileFromMemory` and the corresponding C-API `aiReadFileFromMemory`
|
- Limit the maximum number of vertices, faces, face indices and
|
||||||
- Expose further math utilities via the C-API (i.e. `aiMultiplyMatrix4`)
|
weights that Assimp is able to handle. This is to avoid
|
||||||
|
crashes due to overflowing counters.
|
||||||
- Move noboost files away from the public include directory
|
|
||||||
- Many, many bugfixes and improvements in existing loaders and postprocessing steps
|
- Updated XCode project files
|
||||||
- Documentation improved and clarified in many places.
|
- Further CMAKE build improvements
|
||||||
- Add a sample on using Assimp in conjunction with OpenGL
|
|
||||||
|
|
||||||
- Distribution/packaging: comfortable SDK installer for Windows
|
API CHANGES:
|
||||||
- Distribution/packaging: improved release packages for other architectures
|
- Add data structures for vertex-based animations (These are not
|
||||||
|
currently used, however ...)
|
||||||
CRITICAL FIXES:
|
- Some Assimp::Importer methods are const now.
|
||||||
- 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)
|
1.1 (2010-04-17)
|
||||||
|
This is the list of relevant changes from the 1.0 (r412) release to 1.1 (r700).
|
||||||
BREAKING API CHANGES:
|
|
||||||
- None -
|
FEATURES:
|
||||||
|
- Vastly improved Collada support
|
||||||
MINOR API BEHAVIOUR CHANGES:
|
- Add MS3D (Milkshape 3D) support
|
||||||
- Change quaternion orientation to suit to the more common convention (-w).
|
- Add support for Ogre XML static meshes
|
||||||
- aiString is utf8 now. Not yet consistent, however.
|
- 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.
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
# Open Asset Import Library (assimp)
|
# Open Asset Import Library (assimp)
|
||||||
# ----------------------------------------------------------------------
|
# ----------------------------------------------------------------------
|
||||||
#
|
# Copyright (c) 2006-2017, assimp team
|
||||||
# Copyright (c) 2006-2016, assimp team
|
|
||||||
# All rights reserved.
|
# All rights reserved.
|
||||||
#
|
#
|
||||||
# Redistribution and use of this software in source and binary forms,
|
# 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
|
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#
|
|
||||||
#----------------------------------------------------------------------
|
#----------------------------------------------------------------------
|
||||||
SET(CMAKE_LEGACY_CYGWIN_WIN32 0) # Remove when CMake >= 2.8.4 is required
|
SET(CMAKE_LEGACY_CYGWIN_WIN32 0) # Remove when CMake >= 2.8.4 is required
|
||||||
cmake_minimum_required( VERSION 2.8 )
|
cmake_minimum_required( VERSION 2.8 )
|
||||||
|
@ -81,6 +79,12 @@ OPTION ( ASSIMP_COVERALLS
|
||||||
OFF
|
OFF
|
||||||
)
|
)
|
||||||
|
|
||||||
|
OPTION ( BUILD_DOCS
|
||||||
|
"Build documentation using Doxygen."
|
||||||
|
OFF
|
||||||
|
)
|
||||||
|
add_subdirectory(doc)
|
||||||
|
|
||||||
IF(MSVC)
|
IF(MSVC)
|
||||||
set (CMAKE_PREFIX_PATH "D:\\libs\\devil")
|
set (CMAKE_PREFIX_PATH "D:\\libs\\devil")
|
||||||
OPTION( ASSIMP_INSTALL_PDB
|
OPTION( ASSIMP_INSTALL_PDB
|
||||||
|
@ -162,6 +166,10 @@ IF( UNIX )
|
||||||
ENDIF()
|
ENDIF()
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
|
IF( UNIX )
|
||||||
|
include(GNUInstallDirs)
|
||||||
|
ENDIF( UNIX )
|
||||||
|
|
||||||
IF((CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX) AND NOT CMAKE_COMPILER_IS_MINGW)
|
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
|
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_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
|
||||||
|
@ -185,9 +193,9 @@ if (ASSIMP_COVERALLS)
|
||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O0 -fprofile-arcs -ftest-coverage")
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O0 -fprofile-arcs -ftest-coverage")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
INCLUDE (FindPkgConfig)
|
|
||||||
INCLUDE_DIRECTORIES( include )
|
INCLUDE_DIRECTORIES( include )
|
||||||
|
|
||||||
|
INCLUDE (FindPkgMacros)
|
||||||
INCLUDE (PrecompiledHeader)
|
INCLUDE (PrecompiledHeader)
|
||||||
|
|
||||||
# If this is an in-source build (CMAKE_SOURCE_DIR == CMAKE_BINARY_DIR),
|
# If this is an in-source build (CMAKE_SOURCE_DIR == CMAKE_BINARY_DIR),
|
||||||
|
@ -255,9 +263,7 @@ ENDIF(NOT ZLIB_FOUND)
|
||||||
INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR})
|
INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR})
|
||||||
|
|
||||||
# Search for unzip
|
# Search for unzip
|
||||||
IF (PKG_CONFIG_FOUND)
|
use_pkgconfig(UNZIP minizip)
|
||||||
PKG_CHECK_MODULES(UNZIP minizip)
|
|
||||||
ENDIF (PKG_CONFIG_FOUND)
|
|
||||||
|
|
||||||
IF ( ASSIMP_NO_EXPORT )
|
IF ( ASSIMP_NO_EXPORT )
|
||||||
ADD_DEFINITIONS( -DASSIMP_BUILD_NO_EXPORT)
|
ADD_DEFINITIONS( -DASSIMP_BUILD_NO_EXPORT)
|
||||||
|
@ -431,29 +437,29 @@ IF(CMAKE_CPACK_COMMAND AND UNIX AND ASSIMP_OPT_BUILD_PACKAGES)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
if (CMAKE_SIZEOF_VOID_P EQUAL 8)
|
if (CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||||
SET(BIN_DIR "${PROJECT_SOURCE_DIR}/bin64/")
|
SET(BIN_DIR "${PROJECT_SOURCE_DIR}/bin64/")
|
||||||
SET(LIB_DIR "${PROJECT_SOURCE_DIR}/lib64/")
|
SET(LIB_DIR "${PROJECT_SOURCE_DIR}/lib64/")
|
||||||
elseif()
|
elseif()
|
||||||
SET(BIN_DIR "${PROJECT_SOURCE_DIR}/bin32/")
|
SET(BIN_DIR "${PROJECT_SOURCE_DIR}/bin32/")
|
||||||
SET(LIB_DIR "${PROJECT_SOURCE_DIR}/lib32/")
|
SET(LIB_DIR "${PROJECT_SOURCE_DIR}/lib32/")
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
if(MSVC12)
|
if(MSVC12)
|
||||||
SET(ASSIMP_MSVC_VERSION "vc120")
|
SET(ASSIMP_MSVC_VERSION "vc120")
|
||||||
elseif(MSVC14)
|
elseif(MSVC14)
|
||||||
SET(ASSIMP_MSVC_VERSION "vc140")
|
SET(ASSIMP_MSVC_VERSION "vc140")
|
||||||
ENDIF(MSVC12)
|
ENDIF(MSVC12)
|
||||||
|
|
||||||
if(MSVC12 OR MSVC14)
|
if(MSVC12 OR MSVC14)
|
||||||
add_custom_target(UpdateAssimpLibsDebugSymbolsAndDLLs COMMENT "Copying Assimp Libraries ..." VERBATIM)
|
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.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.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/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.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.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.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.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)
|
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(MSVC12 OR MSVC14)
|
||||||
ENDIF (WIN32)
|
ENDIF (WIN32)
|
||||||
|
|
320
CREDITS
320
CREDITS
|
@ -1,160 +1,160 @@
|
||||||
===============================================================
|
===============================================================
|
||||||
Open Asset Import Library (Assimp)
|
Open Asset Import Library (Assimp)
|
||||||
Developers and Contributors
|
Developers and Contributors
|
||||||
===============================================================
|
===============================================================
|
||||||
|
|
||||||
The following is a non-exhaustive list of all constributors over the years.
|
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.
|
If you think your name should be listed here, drop us a line and we'll add you.
|
||||||
|
|
||||||
- Alexander Gessler,
|
- 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).
|
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,
|
- Thomas Schulze,
|
||||||
X-, Collada-, BVH-Loader, Postprocessing framework. Data structure & Interface design, documentation.
|
X-, Collada-, BVH-Loader, Postprocessing framework. Data structure & Interface design, documentation.
|
||||||
|
|
||||||
- Kim Kulling,
|
- Kim Kulling,
|
||||||
Obj-, Q3BSD-, OpenGEX-Loader, Logging system, CMake-build-environment, Linux-build, Website ( Admin ), Coverity ( Admin ), Glitter ( Admin ).
|
Obj-, Q3BSD-, OpenGEX-Loader, Logging system, CMake-build-environment, Linux-build, Website ( Admin ), Coverity ( Admin ), Glitter ( Admin ).
|
||||||
|
|
||||||
- R.Schmidt,
|
- R.Schmidt,
|
||||||
Linux build, eclipse support.
|
Linux build, eclipse support.
|
||||||
|
|
||||||
- Matthias Gubisch,
|
- Matthias Gubisch,
|
||||||
Assimp.net
|
Assimp.net
|
||||||
Visual Studio 9 support, bugfixes.
|
Visual Studio 9 support, bugfixes.
|
||||||
|
|
||||||
- Mark Sibly
|
- Mark Sibly
|
||||||
B3D-Loader, Assimp testing
|
B3D-Loader, Assimp testing
|
||||||
|
|
||||||
- Jonathan Klein
|
- Jonathan Klein
|
||||||
Ogre Loader, VC2010 fixes and CMake fixes.
|
Ogre Loader, VC2010 fixes and CMake fixes.
|
||||||
|
|
||||||
- Sebastian Hempel,
|
- Sebastian Hempel,
|
||||||
PyAssimp (first version)
|
PyAssimp (first version)
|
||||||
Compile-Bugfixes for mingw, add environment for static library support in make.
|
Compile-Bugfixes for mingw, add environment for static library support in make.
|
||||||
|
|
||||||
- Jonathan Pokrass
|
- Jonathan Pokrass
|
||||||
Supplied a bugfix concerning the scaling in the md3 loader.
|
Supplied a bugfix concerning the scaling in the md3 loader.
|
||||||
|
|
||||||
- Andrew Galante,
|
- Andrew Galante,
|
||||||
Submitted patches to make Assimp compile with GCC-4, a makefile and the xcode3 workspace.
|
Submitted patches to make Assimp compile with GCC-4, a makefile and the xcode3 workspace.
|
||||||
|
|
||||||
- Andreas Nagel
|
- Andreas Nagel
|
||||||
First Assimp testing & verification under Windows Vista 64 Bit.
|
First Assimp testing & verification under Windows Vista 64 Bit.
|
||||||
|
|
||||||
- Marius Schr<68>der
|
- Marius Schr<68>der
|
||||||
Allowed us to use many of his models for screenshots and testing.
|
Allowed us to use many of his models for screenshots and testing.
|
||||||
|
|
||||||
- Christian Schubert
|
- Christian Schubert
|
||||||
Supplied various XFiles for testing purposes.
|
Supplied various XFiles for testing purposes.
|
||||||
|
|
||||||
- Tizian Wieland
|
- Tizian Wieland
|
||||||
Searched the web for hundreds of test models for internal use
|
Searched the web for hundreds of test models for internal use
|
||||||
|
|
||||||
- John Connors
|
- John Connors
|
||||||
Supplied patches for linux and SCons.
|
Supplied patches for linux and SCons.
|
||||||
|
|
||||||
- T. R.
|
- T. R.
|
||||||
The GUY who performed some of the CSM mocaps.
|
The GUY who performed some of the CSM mocaps.
|
||||||
|
|
||||||
- Andy Maloney
|
- Andy Maloney
|
||||||
Contributed fixes for the documentation and the doxygen markup
|
Contributed fixes for the documentation and the doxygen markup
|
||||||
|
|
||||||
- Zhao Lei
|
- Zhao Lei
|
||||||
Contributed several bugfixes fixing memory leaks and improving float parsing
|
Contributed several bugfixes fixing memory leaks and improving float parsing
|
||||||
|
|
||||||
- sueastside
|
- sueastside
|
||||||
Updated PyAssimp to the latest Assimp data structures and provided a script to keep the Python binding up-to-date.
|
Updated PyAssimp to the latest Assimp data structures and provided a script to keep the Python binding up-to-date.
|
||||||
|
|
||||||
- Tobias Rittig
|
- Tobias Rittig
|
||||||
Collada testing with Cinema 4D
|
Collada testing with Cinema 4D
|
||||||
|
|
||||||
- Brad Grantham
|
- Brad Grantham
|
||||||
Improvements in OpenGL-Sample.
|
Improvements in OpenGL-Sample.
|
||||||
|
|
||||||
- Robert Ramirez
|
- Robert Ramirez
|
||||||
Add group loading feature to Obj-Loader.
|
Add group loading feature to Obj-Loader.
|
||||||
|
|
||||||
- Chris Maiwald
|
- Chris Maiwald
|
||||||
Many bugreports, improving Assimp's portability, regular testing & feedback.
|
Many bugreports, improving Assimp's portability, regular testing & feedback.
|
||||||
|
|
||||||
- Stepan Hrbek
|
- Stepan Hrbek
|
||||||
Bugreport and fix for a obj-materialloader crash.
|
Bugreport and fix for a obj-materialloader crash.
|
||||||
|
|
||||||
- David Nadlinger
|
- David Nadlinger
|
||||||
D bindings, CMake install support.
|
D bindings, CMake install support.
|
||||||
|
|
||||||
- Dario Accornero
|
- Dario Accornero
|
||||||
Contributed several patches regarding Mac OS/XCode targets, bug reports.
|
Contributed several patches regarding Mac OS/XCode targets, bug reports.
|
||||||
|
|
||||||
- Martin Walser (Samhayne)
|
- Martin Walser (Samhayne)
|
||||||
Contributed the 'SimpleTexturedOpenGl' sample.
|
Contributed the 'SimpleTexturedOpenGl' sample.
|
||||||
|
|
||||||
- Matthias Fauconneau
|
- Matthias Fauconneau
|
||||||
Contributed a fix for the Q3-BSP loader.
|
Contributed a fix for the Q3-BSP loader.
|
||||||
|
|
||||||
- J<EFBFBD>rgen P. Tjern<72>
|
- Jørgen P. Tjernø
|
||||||
Contributed updated and improved xcode workspaces
|
Contributed updated and improved xcode workspaces
|
||||||
|
|
||||||
- drparallax
|
- drparallax
|
||||||
Contributed the /samples/SimpleAssimpViewX sample
|
Contributed the /samples/SimpleAssimpViewX sample
|
||||||
|
|
||||||
- Carsten Fuchs
|
- Carsten Fuchs
|
||||||
Contributed a fix for the Normalize method in aiQuaternion.
|
Contributed a fix for the Normalize method in aiQuaternion.
|
||||||
|
|
||||||
- dbburgess
|
- dbburgess
|
||||||
Contributes a Android-specific build issue: log the hardware architecture for ARM.
|
Contributes a Android-specific build issue: log the hardware architecture for ARM.
|
||||||
|
|
||||||
- alfiereinre7
|
- alfiereinre7
|
||||||
Contributes a obj-fileparser fix: missing tokens in the obj-token list.
|
Contributes a obj-fileparser fix: missing tokens in the obj-token list.
|
||||||
|
|
||||||
- Roman Kharitonov
|
- Roman Kharitonov
|
||||||
Contributes a fix for the configure script environment.
|
Contributes a fix for the configure script environment.
|
||||||
|
|
||||||
- Ed Diana
|
- Ed Diana
|
||||||
Contributed AssimpDelphi (/port/AssimpDelphi).
|
Contributed AssimpDelphi (/port/AssimpDelphi).
|
||||||
|
|
||||||
- rdb
|
- rdb
|
||||||
Contributes a bundle of fixes and improvements for the bsp-importer.
|
Contributes a bundle of fixes and improvements for the bsp-importer.
|
||||||
|
|
||||||
- Mick P
|
- Mick P
|
||||||
For contributing the De-bone postprocessing step and filing various bug reports.
|
For contributing the De-bone postprocessing step and filing various bug reports.
|
||||||
|
|
||||||
- Rosen Diankov
|
- Rosen Diankov
|
||||||
Contributed patches to build assimp debian packages using cmake.
|
Contributed patches to build assimp debian packages using cmake.
|
||||||
|
|
||||||
- Mark Page
|
- Mark Page
|
||||||
Contributed a patch to fix the VertexTriangleAdjacency postprocessing step.
|
Contributed a patch to fix the VertexTriangleAdjacency postprocessing step.
|
||||||
|
|
||||||
- IOhannes
|
- IOhannes
|
||||||
Contributed the Debian build fixes ( architecture macro ).
|
Contributed the Debian build fixes ( architecture macro ).
|
||||||
|
|
||||||
- gellule
|
- gellule
|
||||||
Several LWO and LWS fixes (pivoting).
|
Several LWO and LWS fixes (pivoting).
|
||||||
|
|
||||||
- Marcel Metz
|
- Marcel Metz
|
||||||
GCC/Linux fixes for the SimpleOpenGL sample.
|
GCC/Linux fixes for the SimpleOpenGL sample.
|
||||||
|
|
||||||
- Brian Miller
|
- Brian Miller
|
||||||
Bugfix for a compiler fix for iOS on arm.
|
Bugfix for a compiler fix for iOS on arm.
|
||||||
|
|
||||||
- S<EFBFBD>verin Lemaignan
|
- SĂ©verin Lemaignan
|
||||||
Rewrite of PyAssimp, distutils and Python3 support
|
Rewrite of PyAssimp, distutils and Python3 support
|
||||||
|
|
||||||
- albert-wang
|
- albert-wang
|
||||||
Bugfixes for the collada parser
|
Bugfixes for the collada parser
|
||||||
|
|
||||||
- Ya ping Jin
|
- Ya ping Jin
|
||||||
Bugfixes for uv-tanget calculation.
|
Bugfixes for uv-tanget calculation.
|
||||||
|
|
||||||
- Jonne Nauha
|
- Jonne Nauha
|
||||||
Ogre Binary format support
|
Ogre Binary format support
|
||||||
|
|
||||||
- Filip Wasil, Tieto Poland Sp. z o.o.
|
- Filip Wasil, Tieto Poland Sp. z o.o.
|
||||||
Android JNI asset extraction support
|
Android JNI asset extraction support
|
||||||
|
|
||||||
- Richard Steffen
|
- Richard Steffen
|
||||||
Contributed ExportProperties interface
|
Contributed ExportProperties interface
|
||||||
Contributed X File exporter
|
Contributed X File exporter
|
||||||
Contributed Step (stp) exporter
|
Contributed Step (stp) exporter
|
||||||
|
|
||||||
|
|
||||||
|
|
156
LICENSE
156
LICENSE
|
@ -1,78 +1,78 @@
|
||||||
Open Asset Import Library (assimp)
|
Open Asset Import Library (assimp)
|
||||||
|
|
||||||
Copyright (c) 2006-2016, assimp team
|
Copyright (c) 2006-2016, assimp team
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
|
|
||||||
Redistribution and use of this software in source and binary forms,
|
Redistribution and use of this software in source and binary forms,
|
||||||
with or without modification, are permitted provided that the
|
with or without modification, are permitted provided that the
|
||||||
following conditions are met:
|
following conditions are met:
|
||||||
|
|
||||||
* Redistributions of source code must retain the above
|
* Redistributions of source code must retain the above
|
||||||
copyright notice, this list of conditions and the
|
copyright notice, this list of conditions and the
|
||||||
following disclaimer.
|
following disclaimer.
|
||||||
|
|
||||||
* Redistributions in binary form must reproduce the above
|
* Redistributions in binary form must reproduce the above
|
||||||
copyright notice, this list of conditions and the
|
copyright notice, this list of conditions and the
|
||||||
following disclaimer in the documentation and/or other
|
following disclaimer in the documentation and/or other
|
||||||
materials provided with the distribution.
|
materials provided with the distribution.
|
||||||
|
|
||||||
* Neither the name of the assimp team, nor the names of its
|
* Neither the name of the assimp team, nor the names of its
|
||||||
contributors may be used to endorse or promote products
|
contributors may be used to endorse or promote products
|
||||||
derived from this software without specific prior
|
derived from this software without specific prior
|
||||||
written permission of the assimp team.
|
written permission of the assimp team.
|
||||||
|
|
||||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||||
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
|
|
||||||
AN EXCEPTION applies to all files in the ./test/models-nonbsd folder.
|
AN EXCEPTION applies to all files in the ./test/models-nonbsd folder.
|
||||||
These are 3d models for testing purposes, from various free sources
|
These are 3d models for testing purposes, from various free sources
|
||||||
on the internet. They are - unless otherwise stated - copyright of
|
on the internet. They are - unless otherwise stated - copyright of
|
||||||
their respective creators, which may impose additional requirements
|
their respective creators, which may impose additional requirements
|
||||||
on the use of their work. For any of these models, see
|
on the use of their work. For any of these models, see
|
||||||
<model-name>.source.txt for more legal information. Contact us if you
|
<model-name>.source.txt for more legal information. Contact us if you
|
||||||
are a copyright holder and believe that we credited you inproperly or
|
are a copyright holder and believe that we credited you inproperly or
|
||||||
if you don't want your files to appear in the repository.
|
if you don't want your files to appear in the repository.
|
||||||
|
|
||||||
|
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
|
|
||||||
Poly2Tri Copyright (c) 2009-2010, Poly2Tri Contributors
|
Poly2Tri Copyright (c) 2009-2010, Poly2Tri Contributors
|
||||||
http://code.google.com/p/poly2tri/
|
http://code.google.com/p/poly2tri/
|
||||||
|
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
Redistribution and use in source and binary forms, with or without modification,
|
Redistribution and use in source and binary forms, with or without modification,
|
||||||
are permitted provided that the following conditions are met:
|
are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
* Redistributions of source code must retain the above copyright notice,
|
* Redistributions of source code must retain the above copyright notice,
|
||||||
this list of conditions and the following disclaimer.
|
this list of conditions and the following disclaimer.
|
||||||
* Redistributions in binary form must reproduce the above copyright notice,
|
* Redistributions in binary form must reproduce the above copyright notice,
|
||||||
this list of conditions and the following disclaimer in the documentation
|
this list of conditions and the following disclaimer in the documentation
|
||||||
and/or other materials provided with the distribution.
|
and/or other materials provided with the distribution.
|
||||||
* Neither the name of Poly2Tri nor the names of its contributors may be
|
* 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
|
used to endorse or promote products derived from this software without specific
|
||||||
prior written permission.
|
prior written permission.
|
||||||
|
|
||||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||||
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||||
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
291
Readme.md
291
Readme.md
|
@ -1,143 +1,148 @@
|
||||||
Open Asset Import Library (assimp)
|
Open Asset Import Library (assimp)
|
||||||
==================================
|
==================================
|
||||||
|
|
||||||
[![Linux Build Status](https://travis-ci.org/assimp/assimp.svg)](https://travis-ci.org/assimp/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)
|
[![Windows Build Status](https://ci.appveyor.com/api/projects/status/tmo433wax6u6cjp4?svg=true)](https://ci.appveyor.com/project/kimkulling/assimp)
|
||||||
<a href="https://scan.coverity.com/projects/5607">
|
<a href="https://scan.coverity.com/projects/5607">
|
||||||
<img alt="Coverity Scan Build Status"
|
<img alt="Coverity Scan Build Status"
|
||||||
src="https://scan.coverity.com/projects/5607/badge.svg"/>
|
src="https://scan.coverity.com/projects/5607/badge.svg"/>
|
||||||
</a>
|
</a>
|
||||||
[![Coverage Status](https://coveralls.io/repos/github/assimp/assimp/badge.svg?branch=master)](https://coveralls.io/github/assimp/assimp?branch=master)
|
[![Coverage Status](https://coveralls.io/repos/github/assimp/assimp/badge.svg?branch=master)](https://coveralls.io/github/assimp/assimp?branch=master)
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
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.
|
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.
|
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.
|
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:
|
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)<br>
|
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)<br>
|
||||||
__[open3mod](https://github.com/acgessler/open3mod) is a powerful 3D model viewer based on Assimp's import and export abilities.__
|
|
||||||
|
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
|
||||||
Please check our Wiki as well: https://github.com/assimp/assimp/wiki
|
> /join #assetimporterlib
|
||||||
|
|
||||||
#### Supported file formats ####
|
<br>
|
||||||
|
__[open3mod](https://github.com/acgessler/open3mod) is a powerful 3D model viewer based on Assimp's import and export abilities.__
|
||||||
A full list [is here](http://assimp.org/main_features_formats.html).
|
|
||||||
__Importers__:
|
Please check our Wiki as well: https://github.com/assimp/assimp/wiki
|
||||||
|
|
||||||
- 3DS
|
#### Supported file formats ####
|
||||||
- BLEND (Blender)
|
|
||||||
- DAE/Collada
|
A full list [is here](http://assimp.org/main_features_formats.html).
|
||||||
- FBX
|
__Importers__:
|
||||||
- IFC-STEP
|
|
||||||
- ASE
|
- 3DS
|
||||||
- DXF
|
- BLEND (Blender)
|
||||||
- HMP
|
- DAE/Collada
|
||||||
- MD2
|
- FBX
|
||||||
- MD3
|
- IFC-STEP
|
||||||
- MD5
|
- ASE
|
||||||
- MDC
|
- DXF
|
||||||
- MDL
|
- HMP
|
||||||
- NFF
|
- MD2
|
||||||
- PLY
|
- MD3
|
||||||
- STL
|
- MD5
|
||||||
- X
|
- MDC
|
||||||
- OBJ
|
- MDL
|
||||||
- OpenGEX
|
- NFF
|
||||||
- SMD
|
- PLY
|
||||||
- LWO
|
- STL
|
||||||
- LXO
|
- X
|
||||||
- LWS
|
- OBJ
|
||||||
- TER
|
- OpenGEX
|
||||||
- AC3D
|
- SMD
|
||||||
- MS3D
|
- LWO
|
||||||
- COB
|
- LXO
|
||||||
- Q3BSP
|
- LWS
|
||||||
- XGL
|
- TER
|
||||||
- CSM
|
- AC3D
|
||||||
- BVH
|
- MS3D
|
||||||
- B3D
|
- COB
|
||||||
- NDO
|
- Q3BSP
|
||||||
- Ogre Binary
|
- XGL
|
||||||
- Ogre XML
|
- CSM
|
||||||
- Q3D
|
- BVH
|
||||||
- ASSBIN (Assimp custom format)
|
- B3D
|
||||||
- glTF (partial)
|
- NDO
|
||||||
- 3MF
|
- Ogre Binary
|
||||||
|
- Ogre XML
|
||||||
Additionally, some formats are supported by dependency on non-free code or external SDKs (not built by default):
|
- Q3D
|
||||||
|
- ASSBIN (Assimp custom format)
|
||||||
- C4D (https://github.com/acgessler/assimp-cinema4d)
|
- glTF (partial)
|
||||||
|
- 3MF
|
||||||
__Exporters__:
|
|
||||||
|
Additionally, some formats are supported by dependency on non-free code or external SDKs (not built by default):
|
||||||
- DAE (Collada)
|
|
||||||
- STL
|
- C4D (https://github.com/acgessler/assimp-cinema4d)
|
||||||
- OBJ
|
|
||||||
- PLY
|
__Exporters__:
|
||||||
- X
|
|
||||||
- 3DS
|
- DAE (Collada)
|
||||||
- JSON (for WebGl, via https://github.com/acgessler/assimp2json)
|
- STL
|
||||||
- ASSBIN
|
- OBJ
|
||||||
- STEP
|
- PLY
|
||||||
- glTF (partial)
|
- X
|
||||||
|
- 3DS
|
||||||
### Building ###
|
- JSON (for WebGl, via https://github.com/acgessler/assimp2json)
|
||||||
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.
|
- ASSBIN
|
||||||
|
- STEP
|
||||||
### Ports ###
|
- glTF (partial)
|
||||||
* [Android](port/AndroidJNI/README.md)
|
|
||||||
* [Python](port/PyAssimp/README.md)
|
### Building ###
|
||||||
* [.NET](port/AssimpNET/Readme.md)
|
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.
|
||||||
* [Pascal](port/AssimpPascal/Readme.md)
|
|
||||||
* [Javascript (Alpha)](https://github.com/makc/assimp2json)
|
### Ports ###
|
||||||
|
* [Android](port/AndroidJNI/README.md)
|
||||||
#### Repository structure ####
|
* [Python](port/PyAssimp/README.md)
|
||||||
Open Asset Import Library is implemented in C++. The directory structure is:
|
* [.NET](port/AssimpNET/Readme.md)
|
||||||
|
* [Pascal](port/AssimpPascal/Readme.md)
|
||||||
/code Source code
|
* [Javascript (Alpha)](https://github.com/makc/assimp2json)
|
||||||
/contrib Third-party libraries
|
|
||||||
/doc Documentation (doxysource and pre-compiled docs)
|
#### Repository structure ####
|
||||||
/include Public header C and C++ header files
|
Open Asset Import Library is implemented in C++. The directory structure is:
|
||||||
/scripts Scripts used to generate the loading code for some formats
|
|
||||||
/port Ports to other languages and scripts to maintain those.
|
/code Source code
|
||||||
/test Unit- and regression tests, test suite of models
|
/contrib Third-party libraries
|
||||||
/tools Tools (old assimp viewer, command line `assimp`)
|
/doc Documentation (doxysource and pre-compiled docs)
|
||||||
/samples A small number of samples to illustrate possible
|
/include Public header C and C++ header files
|
||||||
use cases for Assimp
|
/scripts Scripts used to generate the loading code for some formats
|
||||||
/workspaces Build environments for vc,xcode,... (deprecated,
|
/port Ports to other languages and scripts to maintain those.
|
||||||
CMake has superseeded all legacy build options!)
|
/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
|
||||||
### Where to get help ###
|
use cases for Assimp
|
||||||
For more information, visit [our website](http://assimp.org/). Or check out the `./doc`- folder, which contains the official documentation in HTML format.
|
/workspaces Build environments for vc,xcode,... (deprecated,
|
||||||
(CHMs for Windows are included in some release packages and should be located right here in the root folder).
|
CMake has superseeded all legacy build options!)
|
||||||
|
|
||||||
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.
|
|
||||||
|
### Where to get help ###
|
||||||
For development discussions, there is also a (very low-volume) mailing list, _assimp-discussions_
|
For more information, visit [our website](http://assimp.org/). Or check out the `./doc`- folder, which contains the official documentation in HTML format.
|
||||||
[(subscribe here)]( https://lists.sourceforge.net/lists/listinfo/assimp-discussions)
|
(CHMs for Windows are included in some release packages and should be located right here in the root folder).
|
||||||
|
|
||||||
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.
|
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.
|
||||||
|
|
||||||
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)<br>
|
For development discussions, there is also a (very low-volume) mailing list, _assimp-discussions_
|
||||||
|
[(subscribe here)]( https://lists.sourceforge.net/lists/listinfo/assimp-discussions)
|
||||||
### Contributing ###
|
|
||||||
Contributions to assimp are highly appreciated. The easiest way to get involved is to submit
|
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.
|
||||||
a pull request with your changes against the main repository's `master` branch.
|
|
||||||
|
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)<br>
|
||||||
### Donate ###
|
|
||||||
If you like assimp, consider buying us a beer (or two):
|
### Contributing ###
|
||||||
[Donate](http://sourceforge.net/donate/index.php?group_id=226462)
|
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.
|
### Donate ###
|
||||||
|
You can get a patron of Asset-Importer-Lib:
|
||||||
An _informal_ summary is: do whatever you want, but include Assimp's license text with your product -
|
<a href="https://www.patreon.com/bePatron?u=2790590" data-patreon-widget-type="become-patron-button">Become a Patron!</a><script async src="https://cdn6.patreon.com/becomePatronButton.bundle.js"></script>
|
||||||
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.
|
### License ###
|
||||||
|
Our license is based on the modified, __3-clause BSD__-License.
|
||||||
### Why this name ###
|
|
||||||
Sorry, we're germans :-), no english native speakers ...
|
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 ...
|
||||||
|
|
|
@ -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@" )
|
set( PACKAGE_VERSION "@ASSIMP_VERSION@" )
|
||||||
if( "${PACKAGE_FIND_VERSION}" VERSION_EQUAL "@ASSIMP_VERSION@")
|
if( "${PACKAGE_FIND_VERSION}" VERSION_EQUAL "@ASSIMP_VERSION@")
|
||||||
set(PACKAGE_VERSION_EXACT 1)
|
set(PACKAGE_VERSION_EXACT 1)
|
||||||
endif()
|
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)
|
set(PACKAGE_VERSION_COMPATIBLE 1)
|
||||||
elseif( "${PACKAGE_FIND_VERSION_MAJOR}" EQUAL "@ASSIMP_VERSION_MAJOR@" )
|
elseif( "${PACKAGE_FIND_VERSION_MAJOR}" EQUAL "@ASSIMP_VERSION_MAJOR@" )
|
||||||
# for now backward compatible if minor version is less
|
# for now backward compatible if minor version is less
|
||||||
|
|
|
@ -59,10 +59,13 @@ endmacro(clear_if_changed)
|
||||||
|
|
||||||
# Try to get some hints from pkg-config, if available
|
# Try to get some hints from pkg-config, if available
|
||||||
macro(use_pkgconfig PREFIX PKGNAME)
|
macro(use_pkgconfig PREFIX PKGNAME)
|
||||||
find_package(PkgConfig)
|
# Android does not support PKG_CONFIG so we disable it
|
||||||
if (PKG_CONFIG_FOUND)
|
IF ( NOT ANDROID )
|
||||||
pkg_check_modules(${PREFIX} ${PKGNAME})
|
find_package(PkgConfig)
|
||||||
endif ()
|
if (PKG_CONFIG_FOUND)
|
||||||
|
pkg_check_modules(${PREFIX} ${PKGNAME})
|
||||||
|
endif ()
|
||||||
|
ENDIF ( NOT ANDROID )
|
||||||
endmacro (use_pkgconfig)
|
endmacro (use_pkgconfig)
|
||||||
|
|
||||||
# Couple a set of release AND debug libraries (or frameworks)
|
# Couple a set of release AND debug libraries (or frameworks)
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
# Once done, this will define
|
# Once done, this will define
|
||||||
#
|
#
|
||||||
# ZLIB_FOUND - system has ZLIB
|
# 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
|
# ZLIB_LIBRARIES - link these to use ZLIB
|
||||||
|
|
||||||
include(FindPkgMacros)
|
include(FindPkgMacros)
|
||||||
|
|
|
@ -48,7 +48,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
#include "StreamWriter.h"
|
#include "StreamWriter.h"
|
||||||
#include "./../include/assimp/material.h"
|
#include <assimp/material.h>
|
||||||
|
|
||||||
struct aiScene;
|
struct aiScene;
|
||||||
struct aiNode;
|
struct aiNode;
|
||||||
|
|
|
@ -48,10 +48,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#include "SmoothingGroups.h"
|
#include "SmoothingGroups.h"
|
||||||
#include "StringUtils.h"
|
#include "StringUtils.h"
|
||||||
#include "qnan.h"
|
#include "qnan.h"
|
||||||
#include "./../include/assimp/material.h"
|
#include <assimp/material.h>
|
||||||
#include "./../include/assimp/camera.h"
|
#include <assimp/camera.h>
|
||||||
#include "./../include/assimp/light.h"
|
#include <assimp/light.h>
|
||||||
#include "./../include/assimp/anim.h"
|
#include <assimp/anim.h>
|
||||||
#include <stdio.h> //sprintf
|
#include <stdio.h> //sprintf
|
||||||
|
|
||||||
namespace Assimp {
|
namespace Assimp {
|
||||||
|
|
|
@ -54,6 +54,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#include <assimp/IOSystem.hpp>
|
#include <assimp/IOSystem.hpp>
|
||||||
#include <assimp/scene.h>
|
#include <assimp/scene.h>
|
||||||
#include <assimp/DefaultLogger.hpp>
|
#include <assimp/DefaultLogger.hpp>
|
||||||
|
#include <assimp/importerdesc.h>
|
||||||
#include "StringComparison.h"
|
#include "StringComparison.h"
|
||||||
|
|
||||||
using namespace Assimp;
|
using namespace Assimp;
|
||||||
|
|
|
@ -60,6 +60,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#include <assimp/scene.h>
|
#include <assimp/scene.h>
|
||||||
#include <assimp/config.h>
|
#include <assimp/config.h>
|
||||||
#include <assimp/IOSystem.hpp>
|
#include <assimp/IOSystem.hpp>
|
||||||
|
#include <assimp/importerdesc.h>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
using namespace Assimp;
|
using namespace Assimp;
|
||||||
|
|
|
@ -51,11 +51,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#include "AMFImporter_Macro.hpp"
|
#include "AMFImporter_Macro.hpp"
|
||||||
|
|
||||||
#include "fast_atof.h"
|
#include "fast_atof.h"
|
||||||
#include "DefaultIOSystem.h"
|
#include <assimp/DefaultIOSystem.h>
|
||||||
|
|
||||||
// Header files, stdlib.
|
// Header files, stdlib.
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <string>
|
|
||||||
|
|
||||||
namespace Assimp
|
namespace Assimp
|
||||||
{
|
{
|
||||||
|
|
|
@ -52,9 +52,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#include "AMFImporter_Node.hpp"
|
#include "AMFImporter_Node.hpp"
|
||||||
|
|
||||||
// Header files, Assimp.
|
// Header files, Assimp.
|
||||||
#include "assimp/DefaultLogger.hpp"
|
#include <assimp/DefaultLogger.hpp>
|
||||||
#include "assimp/importerdesc.h"
|
#include <assimp/importerdesc.h>
|
||||||
#include "assimp/ProgressHandler.hpp"
|
|
||||||
#include "assimp/types.h"
|
#include "assimp/types.h"
|
||||||
#include "BaseImporter.h"
|
#include "BaseImporter.h"
|
||||||
#include "irrXMLWrapper.h"
|
#include "irrXMLWrapper.h"
|
||||||
|
|
|
@ -54,7 +54,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#include "StringUtils.h"
|
#include "StringUtils.h"
|
||||||
|
|
||||||
// Header files, stdlib.
|
// Header files, stdlib.
|
||||||
#include <algorithm>
|
|
||||||
#include <iterator>
|
#include <iterator>
|
||||||
|
|
||||||
namespace Assimp
|
namespace Assimp
|
||||||
|
@ -62,7 +61,7 @@ namespace Assimp
|
||||||
|
|
||||||
aiColor4D AMFImporter::SPP_Material::GetColor(const float pX, const float pY, const float pZ) const
|
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.
|
// Check if stored data are supported.
|
||||||
if(Composition.size() != 0)
|
if(Composition.size() != 0)
|
||||||
|
@ -93,8 +92,8 @@ aiColor4D tcol;
|
||||||
void AMFImporter::PostprocessHelper_CreateMeshDataArray(const CAMFImporter_NodeElement_Mesh& pNodeElement, std::vector<aiVector3D>& pVertexCoordinateArray,
|
void AMFImporter::PostprocessHelper_CreateMeshDataArray(const CAMFImporter_NodeElement_Mesh& pNodeElement, std::vector<aiVector3D>& pVertexCoordinateArray,
|
||||||
std::vector<CAMFImporter_NodeElement_Color*>& pVertexColorArray) const
|
std::vector<CAMFImporter_NodeElement_Color*>& pVertexColorArray) const
|
||||||
{
|
{
|
||||||
CAMFImporter_NodeElement_Vertices* vn = nullptr;
|
CAMFImporter_NodeElement_Vertices* vn = nullptr;
|
||||||
size_t col_idx;
|
size_t col_idx;
|
||||||
|
|
||||||
// All data stored in "vertices", search for it.
|
// All data stored in "vertices", search for it.
|
||||||
for(CAMFImporter_NodeElement* ne_child: pNodeElement.Child)
|
for(CAMFImporter_NodeElement* ne_child: pNodeElement.Child)
|
||||||
|
@ -142,8 +141,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,
|
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)
|
const std::string& pID_A)
|
||||||
{
|
{
|
||||||
size_t TextureConverted_Index;
|
size_t TextureConverted_Index;
|
||||||
std::string TextureConverted_ID;
|
std::string TextureConverted_ID;
|
||||||
|
|
||||||
// check input data
|
// check input data
|
||||||
if(pID_R.empty() && pID_G.empty() && pID_B.empty() && pID_A.empty())
|
if(pID_R.empty() && pID_G.empty() && pID_B.empty() && pID_A.empty())
|
||||||
|
@ -261,11 +260,20 @@ std::string TextureConverted_ID;
|
||||||
size_t off_b = 0;
|
size_t off_b = 0;
|
||||||
|
|
||||||
// Calculate size of the target array and rule how data will be copied.
|
// Calculate size of the target array and rule how data will be copied.
|
||||||
if(!pID_R.empty()) { tex_size += src_texture[0]->Data.size(); step++, off_g++, off_b++; }
|
if ( nullptr != src_texture ) {
|
||||||
if(!pID_G.empty()) { tex_size += src_texture[1]->Data.size(); step++, off_b++; }
|
if(!pID_R.empty()) {
|
||||||
if(!pID_B.empty()) { tex_size += src_texture[2]->Data.size(); step++; }
|
tex_size += src_texture[0]->Data.size(); step++, off_g++, off_b++;
|
||||||
if(!pID_A.empty()) { tex_size += src_texture[3]->Data.size(); step++; }
|
}
|
||||||
|
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++;
|
||||||
|
}
|
||||||
|
}
|
||||||
// Create target array.
|
// Create target array.
|
||||||
converted_texture.Data = new uint8_t[tex_size];
|
converted_texture.Data = new uint8_t[tex_size];
|
||||||
// And copy data
|
// And copy data
|
||||||
|
@ -293,19 +301,19 @@ std::string TextureConverted_ID;
|
||||||
|
|
||||||
void AMFImporter::PostprocessHelper_SplitFacesByTextureID(std::list<SComplexFace>& pInputList, std::list<std::list<SComplexFace> >& pOutputList_Separated)
|
void AMFImporter::PostprocessHelper_SplitFacesByTextureID(std::list<SComplexFace>& pInputList, std::list<std::list<SComplexFace> >& pOutputList_Separated)
|
||||||
{
|
{
|
||||||
auto texmap_is_equal = [](const CAMFImporter_NodeElement_TexMap* pTexMap1, const CAMFImporter_NodeElement_TexMap* pTexMap2) -> bool
|
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) && (pTexMap2 == nullptr)) return true;
|
||||||
if(pTexMap1 == nullptr) return false;
|
if(pTexMap1 == nullptr) return false;
|
||||||
if(pTexMap2 == nullptr) return false;
|
if(pTexMap2 == nullptr) return false;
|
||||||
|
|
||||||
if(pTexMap1->TextureID_R != pTexMap2->TextureID_R) return false;
|
if(pTexMap1->TextureID_R != pTexMap2->TextureID_R) return false;
|
||||||
if(pTexMap1->TextureID_G != pTexMap2->TextureID_G) return false;
|
if(pTexMap1->TextureID_G != pTexMap2->TextureID_G) return false;
|
||||||
if(pTexMap1->TextureID_B != pTexMap2->TextureID_B) return false;
|
if(pTexMap1->TextureID_B != pTexMap2->TextureID_B) return false;
|
||||||
if(pTexMap1->TextureID_A != pTexMap2->TextureID_A) return false;
|
if(pTexMap1->TextureID_A != pTexMap2->TextureID_A) return false;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
|
|
||||||
pOutputList_Separated.clear();
|
pOutputList_Separated.clear();
|
||||||
if(pInputList.size() == 0) return;
|
if(pInputList.size() == 0) return;
|
||||||
|
|
|
@ -54,6 +54,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#include <assimp/IOSystem.hpp>
|
#include <assimp/IOSystem.hpp>
|
||||||
#include <assimp/DefaultLogger.hpp>
|
#include <assimp/DefaultLogger.hpp>
|
||||||
#include <assimp/scene.h>
|
#include <assimp/scene.h>
|
||||||
|
#include <assimp/importerdesc.h>
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
|
|
|
@ -46,9 +46,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
#include "BaseImporter.h"
|
#include "BaseImporter.h"
|
||||||
#include <assimp/types.h>
|
#include <assimp/types.h>
|
||||||
|
#include "ASEParser.h"
|
||||||
|
|
||||||
struct aiNode;
|
struct aiNode;
|
||||||
#include "ASEParser.h"
|
|
||||||
|
|
||||||
namespace Assimp {
|
namespace Assimp {
|
||||||
|
|
||||||
|
|
|
@ -49,7 +49,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
// internal headers
|
// internal headers
|
||||||
#include "TextureTransform.h"
|
#include "TextureTransform.h"
|
||||||
#include "ASELoader.h"
|
#include "ASELoader.h"
|
||||||
#include "MaterialSystem.h"
|
|
||||||
#include "fast_atof.h"
|
#include "fast_atof.h"
|
||||||
#include <assimp/DefaultLogger.hpp>
|
#include <assimp/DefaultLogger.hpp>
|
||||||
|
|
||||||
|
@ -1858,7 +1857,7 @@ void Parser::ParseLV3MeshCFaceListBlock(unsigned int iNumFaces, ASE::Mesh& mesh)
|
||||||
++filePtr;
|
++filePtr;
|
||||||
|
|
||||||
// Face entry
|
// Face entry
|
||||||
if (TokenMatch(filePtr,"MESH_CFACE" ,11))
|
if (TokenMatch(filePtr,"MESH_CFACE" ,10))
|
||||||
{
|
{
|
||||||
unsigned int aiValues[3];
|
unsigned int aiValues[3];
|
||||||
unsigned int iIndex = 0;
|
unsigned int iIndex = 0;
|
||||||
|
|
|
@ -54,6 +54,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#include <assimp/mesh.h>
|
#include <assimp/mesh.h>
|
||||||
#include <assimp/anim.h>
|
#include <assimp/anim.h>
|
||||||
#include <assimp/scene.h>
|
#include <assimp/scene.h>
|
||||||
|
#include <assimp/importerdesc.h>
|
||||||
|
|
||||||
#ifdef ASSIMP_BUILD_NO_OWN_ZLIB
|
#ifdef ASSIMP_BUILD_NO_OWN_ZLIB
|
||||||
# include <zlib.h>
|
# include <zlib.h>
|
||||||
|
|
|
@ -46,7 +46,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#define AI_ASSBINIMPORTER_H_INC
|
#define AI_ASSBINIMPORTER_H_INC
|
||||||
|
|
||||||
#include "BaseImporter.h"
|
#include "BaseImporter.h"
|
||||||
#include <assimp/types.h>
|
|
||||||
|
|
||||||
struct aiMesh;
|
struct aiMesh;
|
||||||
struct aiNode;
|
struct aiNode;
|
||||||
|
|
|
@ -41,7 +41,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
* ASSXML exporter main code
|
* ASSXML exporter main code
|
||||||
*/
|
*/
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include "./../include/assimp/version.h"
|
#include <assimp/version.h>
|
||||||
#include "ProcessHelper.h"
|
#include "ProcessHelper.h"
|
||||||
#include <assimp/IOStream.hpp>
|
#include <assimp/IOStream.hpp>
|
||||||
#include <assimp/IOSystem.hpp>
|
#include <assimp/IOSystem.hpp>
|
||||||
|
|
|
@ -56,7 +56,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#include <assimp/anim.h>
|
#include <assimp/anim.h>
|
||||||
#include <assimp/scene.h>
|
#include <assimp/scene.h>
|
||||||
#include <assimp/DefaultLogger.hpp>
|
#include <assimp/DefaultLogger.hpp>
|
||||||
|
#include <assimp/importerdesc.h>
|
||||||
|
|
||||||
using namespace Assimp;
|
using namespace Assimp;
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
|
@ -48,7 +48,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#include <assimp/material.h>
|
#include <assimp/material.h>
|
||||||
#include "BaseImporter.h"
|
#include "BaseImporter.h"
|
||||||
|
|
||||||
#include <string>
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
struct aiNodeAnim;
|
struct aiNodeAnim;
|
||||||
|
|
|
@ -51,6 +51,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#include "TinyFormatter.h"
|
#include "TinyFormatter.h"
|
||||||
#include <assimp/IOSystem.hpp>
|
#include <assimp/IOSystem.hpp>
|
||||||
#include <assimp/scene.h>
|
#include <assimp/scene.h>
|
||||||
|
#include <assimp/importerdesc.h>
|
||||||
|
|
||||||
using namespace Assimp;
|
using namespace Assimp;
|
||||||
using namespace Assimp::Formatter;
|
using namespace Assimp::Formatter;
|
||||||
|
|
|
@ -50,6 +50,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#include <assimp/scene.h>
|
#include <assimp/scene.h>
|
||||||
#include <assimp/Importer.hpp>
|
#include <assimp/Importer.hpp>
|
||||||
#include <assimp/postprocess.h>
|
#include <assimp/postprocess.h>
|
||||||
|
#include <assimp/importerdesc.h>
|
||||||
#include <ios>
|
#include <ios>
|
||||||
#include <list>
|
#include <list>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
|
@ -44,14 +44,13 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
#include "Exceptional.h"
|
#include "Exceptional.h"
|
||||||
|
|
||||||
#include <string>
|
|
||||||
#include <map>
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <set>
|
#include <set>
|
||||||
#include <assimp/types.h>
|
#include <assimp/types.h>
|
||||||
#include <assimp/ProgressHandler.hpp>
|
#include <assimp/ProgressHandler.hpp>
|
||||||
|
|
||||||
struct aiScene;
|
struct aiScene;
|
||||||
|
struct aiImporterDesc;
|
||||||
|
|
||||||
namespace Assimp {
|
namespace Assimp {
|
||||||
|
|
||||||
|
|
|
@ -43,8 +43,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#define INCLUDED_AI_BASEPROCESS_H
|
#define INCLUDED_AI_BASEPROCESS_H
|
||||||
|
|
||||||
#include <map>
|
#include <map>
|
||||||
|
|
||||||
#include <assimp/types.h>
|
|
||||||
#include "GenericProperty.h"
|
#include "GenericProperty.h"
|
||||||
|
|
||||||
struct aiScene;
|
struct aiScene;
|
||||||
|
|
126
code/Bitmap.h
126
code/Bitmap.h
|
@ -50,93 +50,71 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
|
|
||||||
struct aiTexture;
|
struct aiTexture;
|
||||||
|
|
||||||
namespace Assimp {
|
namespace Assimp {
|
||||||
|
|
||||||
class IOStream;
|
class IOStream;
|
||||||
|
|
||||||
class Bitmap {
|
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;
|
public:
|
||||||
|
static void Save(aiTexture* texture, IOStream* file);
|
||||||
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);
|
|
||||||
|
|
||||||
|
protected:
|
||||||
|
static void WriteHeader(Header& header, IOStream* file);
|
||||||
|
static void WriteDIB(DIB& dib, IOStream* file);
|
||||||
|
static void WriteData(aiTexture* texture, IOStream* file);
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,6 +48,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#include "BlenderDNA.h"
|
#include "BlenderDNA.h"
|
||||||
#include "StreamReader.h"
|
#include "StreamReader.h"
|
||||||
#include "fast_atof.h"
|
#include "fast_atof.h"
|
||||||
|
#include "TinyFormatter.h"
|
||||||
|
|
||||||
using namespace Assimp;
|
using namespace Assimp;
|
||||||
using namespace Assimp::Blender;
|
using namespace Assimp::Blender;
|
||||||
|
|
|
@ -46,12 +46,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#define INCLUDED_AI_BLEND_DNA_H
|
#define INCLUDED_AI_BLEND_DNA_H
|
||||||
|
|
||||||
#include "BaseImporter.h"
|
#include "BaseImporter.h"
|
||||||
#include "TinyFormatter.h"
|
|
||||||
#include "StreamReader.h"
|
#include "StreamReader.h"
|
||||||
#include <assimp/DefaultLogger.hpp>
|
#include <assimp/DefaultLogger.hpp>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
#include <map>
|
||||||
|
|
||||||
// enable verbose log output. really verbose, so be careful.
|
// enable verbose log output. really verbose, so be careful.
|
||||||
#ifdef ASSIMP_BUILD_DEBUG
|
#ifdef ASSIMP_BUILD_DEBUG
|
||||||
|
|
|
@ -46,9 +46,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#define INCLUDED_AI_BLEND_DNA_INL
|
#define INCLUDED_AI_BLEND_DNA_INL
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
#include "TinyFormatter.h"
|
||||||
|
|
||||||
namespace Assimp {
|
namespace Assimp {
|
||||||
namespace Blender {
|
namespace Blender {
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------
|
||||||
const Field& Structure :: operator [] (const std::string& ss) const
|
const Field& Structure :: operator [] (const std::string& ss) const
|
||||||
|
|
|
@ -48,9 +48,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#include "BlenderLoader.h"
|
#include "BlenderLoader.h"
|
||||||
#include "BlenderDNA.h"
|
#include "BlenderDNA.h"
|
||||||
#include "BlenderScene.h"
|
#include "BlenderScene.h"
|
||||||
#include "BlenderSceneGen.h"
|
|
||||||
#include <deque>
|
#include <deque>
|
||||||
#include "./../include/assimp/material.h"
|
#include <assimp/material.h>
|
||||||
|
|
||||||
struct aiTexture;
|
struct aiTexture;
|
||||||
|
|
||||||
|
|
|
@ -54,12 +54,13 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#include "BlenderBMesh.h"
|
#include "BlenderBMesh.h"
|
||||||
#include "StringUtils.h"
|
#include "StringUtils.h"
|
||||||
#include <assimp/scene.h>
|
#include <assimp/scene.h>
|
||||||
#include "StringComparison.h"
|
#include <assimp/importerdesc.h>
|
||||||
|
|
||||||
|
#include "StringComparison.h"
|
||||||
#include "StreamReader.h"
|
#include "StreamReader.h"
|
||||||
#include "MemoryIOWrapper.h"
|
#include "MemoryIOWrapper.h"
|
||||||
|
|
||||||
#include <cctype>
|
#include <cctype>
|
||||||
#include <cstdint>
|
|
||||||
|
|
||||||
|
|
||||||
// zlib is needed for compressed blend files
|
// zlib is needed for compressed blend files
|
||||||
|
@ -96,8 +97,9 @@ static const aiImporterDesc blenderDesc = {
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
// Constructor to be privately used by Importer
|
// Constructor to be privately used by Importer
|
||||||
BlenderImporter::BlenderImporter()
|
BlenderImporter::BlenderImporter()
|
||||||
: modifier_cache(new BlenderModifierShowcase())
|
: modifier_cache(new BlenderModifierShowcase()) {
|
||||||
{}
|
// empty
|
||||||
|
}
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
// Destructor, private as well
|
// Destructor, private as well
|
||||||
|
@ -145,8 +147,7 @@ void BlenderImporter::SetupProperties(const Importer* /*pImp*/)
|
||||||
// nothing to be done for the moment
|
// nothing to be done for the moment
|
||||||
}
|
}
|
||||||
|
|
||||||
struct free_it
|
struct free_it {
|
||||||
{
|
|
||||||
free_it(void* free) : free(free) {}
|
free_it(void* free) : free(free) {}
|
||||||
~free_it() {
|
~free_it() {
|
||||||
::free(this->free);
|
::free(this->free);
|
||||||
|
@ -165,6 +166,7 @@ void BlenderImporter::InternReadFile( const std::string& pFile,
|
||||||
free_it free_it_really(dest);
|
free_it free_it_really(dest);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
FileDatabase file;
|
FileDatabase file;
|
||||||
std::shared_ptr<IOStream> stream(pIOHandler->Open(pFile,"rb"));
|
std::shared_ptr<IOStream> stream(pIOHandler->Open(pFile,"rb"));
|
||||||
if (!stream) {
|
if (!stream) {
|
||||||
|
|
|
@ -44,9 +44,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
#ifndef ASSIMP_BUILD_NO_BLEND_IMPORTER
|
#ifndef ASSIMP_BUILD_NO_BLEND_IMPORTER
|
||||||
|
|
||||||
#include "BlenderDNA.h"
|
|
||||||
#include "BlenderScene.h"
|
#include "BlenderScene.h"
|
||||||
#include "BlenderSceneGen.h"
|
#include "BlenderSceneGen.h"
|
||||||
|
#include "BlenderDNA.h"
|
||||||
|
|
||||||
using namespace Assimp;
|
using namespace Assimp;
|
||||||
using namespace Assimp::Blender;
|
using namespace Assimp::Blender;
|
||||||
|
@ -522,7 +522,7 @@ template <> void Structure :: Convert<MVert> (
|
||||||
ReadFieldArray<ErrorPolicy_Fail>(dest.co,"co",db);
|
ReadFieldArray<ErrorPolicy_Fail>(dest.co,"co",db);
|
||||||
ReadFieldArray<ErrorPolicy_Fail>(dest.no,"no",db);
|
ReadFieldArray<ErrorPolicy_Fail>(dest.no,"no",db);
|
||||||
ReadField<ErrorPolicy_Igno>(dest.flag,"flag",db);
|
ReadField<ErrorPolicy_Igno>(dest.flag,"flag",db);
|
||||||
ReadField<ErrorPolicy_Warn>(dest.mat_nr,"mat_nr",db);
|
//ReadField<ErrorPolicy_Warn>(dest.mat_nr,"mat_nr",db);
|
||||||
ReadField<ErrorPolicy_Igno>(dest.bweight,"bweight",db);
|
ReadField<ErrorPolicy_Igno>(dest.bweight,"bweight",db);
|
||||||
|
|
||||||
db.reader->IncPtr(size);
|
db.reader->IncPtr(size);
|
||||||
|
|
|
@ -45,10 +45,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#ifndef AI_BLOBIOSYSTEM_H_INCLUDED
|
#ifndef AI_BLOBIOSYSTEM_H_INCLUDED
|
||||||
#define AI_BLOBIOSYSTEM_H_INCLUDED
|
#define AI_BLOBIOSYSTEM_H_INCLUDED
|
||||||
|
|
||||||
#include "./../include/assimp/IOStream.hpp"
|
#include <assimp/IOStream.hpp>
|
||||||
#include "./../include/assimp/cexport.h"
|
#include <assimp/cexport.h>
|
||||||
#include "./../include/assimp/IOSystem.hpp"
|
#include <assimp/IOSystem.hpp>
|
||||||
#include "./../include/assimp/DefaultLogger.hpp"
|
#include <assimp/DefaultLogger.hpp>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <set>
|
#include <set>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
|
@ -93,6 +93,8 @@ SET( PUBLIC_HEADERS
|
||||||
${HEADER_PATH}/NullLogger.hpp
|
${HEADER_PATH}/NullLogger.hpp
|
||||||
${HEADER_PATH}/cexport.h
|
${HEADER_PATH}/cexport.h
|
||||||
${HEADER_PATH}/Exporter.hpp
|
${HEADER_PATH}/Exporter.hpp
|
||||||
|
${HEADER_PATH}/DefaultIOStream.h
|
||||||
|
${HEADER_PATH}/DefaultIOSystem.h
|
||||||
)
|
)
|
||||||
|
|
||||||
SET( Core_SRCS
|
SET( Core_SRCS
|
||||||
|
@ -125,9 +127,7 @@ SET( Common_SRCS
|
||||||
ByteSwapper.h
|
ByteSwapper.h
|
||||||
DefaultProgressHandler.h
|
DefaultProgressHandler.h
|
||||||
DefaultIOStream.cpp
|
DefaultIOStream.cpp
|
||||||
DefaultIOStream.h
|
|
||||||
DefaultIOSystem.cpp
|
DefaultIOSystem.cpp
|
||||||
DefaultIOSystem.h
|
|
||||||
CInterfaceIOWrapper.cpp
|
CInterfaceIOWrapper.cpp
|
||||||
CInterfaceIOWrapper.h
|
CInterfaceIOWrapper.h
|
||||||
Hash.h
|
Hash.h
|
||||||
|
@ -187,10 +187,16 @@ IF ( ASSIMP_BUILD_NONFREE_C4D_IMPORTER )
|
||||||
SOURCE_GROUP( C4D FILES ${C4D_SRCS})
|
SOURCE_GROUP( C4D FILES ${C4D_SRCS})
|
||||||
ENDIF ( ASSIMP_BUILD_NONFREE_C4D_IMPORTER )
|
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_<name> which enables compile of loader
|
# macro to add the CMake Option ADD_ASSIMP_IMPORTER_<name> which enables compile of loader
|
||||||
# this way selective loaders can be compiled (reduces filesize + compile time)
|
# this way selective loaders can be compiled (reduces filesize + compile time)
|
||||||
MACRO(ADD_ASSIMP_IMPORTER name)
|
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)
|
IF(ASSIMP_BUILD_${name}_IMPORTER)
|
||||||
LIST(APPEND ASSIMP_LOADER_SRCS ${ARGN})
|
LIST(APPEND ASSIMP_LOADER_SRCS ${ARGN})
|
||||||
SET(ASSIMP_IMPORTERS_ENABLED "${ASSIMP_IMPORTERS_ENABLED} ${name}")
|
SET(ASSIMP_IMPORTERS_ENABLED "${ASSIMP_IMPORTERS_ENABLED} ${name}")
|
||||||
|
@ -930,7 +936,7 @@ if(MSVC AND ASSIMP_INSTALL_PDB)
|
||||||
DESTINATION ${ASSIMP_LIB_INSTALL_DIR}
|
DESTINATION ${ASSIMP_LIB_INSTALL_DIR}
|
||||||
CONFIGURATIONS Debug
|
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}
|
DESTINATION ${ASSIMP_LIB_INSTALL_DIR}
|
||||||
CONFIGURATIONS RelWithDebInfo
|
CONFIGURATIONS RelWithDebInfo
|
||||||
)
|
)
|
||||||
|
|
|
@ -57,7 +57,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#include <assimp/IOSystem.hpp>
|
#include <assimp/IOSystem.hpp>
|
||||||
#include <assimp/DefaultLogger.hpp>
|
#include <assimp/DefaultLogger.hpp>
|
||||||
#include <assimp/scene.h>
|
#include <assimp/scene.h>
|
||||||
|
#include <assimp/importerdesc.h>
|
||||||
|
|
||||||
using namespace Assimp;
|
using namespace Assimp;
|
||||||
using namespace Assimp::COB;
|
using namespace Assimp::COB;
|
||||||
|
|
|
@ -46,12 +46,13 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <deque>
|
#include <deque>
|
||||||
|
#include <map>
|
||||||
|
|
||||||
#include "BaseImporter.h"
|
#include "BaseImporter.h"
|
||||||
#include "./../include/assimp/material.h"
|
#include <assimp/material.h>
|
||||||
|
|
||||||
namespace Assimp {
|
namespace Assimp {
|
||||||
namespace COB {
|
namespace COB {
|
||||||
|
|
||||||
// ------------------
|
// ------------------
|
||||||
/** Represents a single vertex index in a face */
|
/** Represents a single vertex index in a face */
|
||||||
|
|
|
@ -57,7 +57,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#include <assimp/anim.h>
|
#include <assimp/anim.h>
|
||||||
#include <assimp/DefaultLogger.hpp>
|
#include <assimp/DefaultLogger.hpp>
|
||||||
#include <assimp/scene.h>
|
#include <assimp/scene.h>
|
||||||
|
#include <assimp/importerdesc.h>
|
||||||
|
|
||||||
using namespace Assimp;
|
using namespace Assimp;
|
||||||
|
|
||||||
|
|
|
@ -38,18 +38,16 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
----------------------------------------------------------------------
|
----------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef ASSIMP_BUILD_NO_EXPORT
|
#ifndef ASSIMP_BUILD_NO_EXPORT
|
||||||
#ifndef ASSIMP_BUILD_NO_COLLADA_EXPORTER
|
#ifndef ASSIMP_BUILD_NO_COLLADA_EXPORTER
|
||||||
#include "ColladaExporter.h"
|
|
||||||
|
|
||||||
|
#include "ColladaExporter.h"
|
||||||
#include "Bitmap.h"
|
#include "Bitmap.h"
|
||||||
#include "fast_atof.h"
|
#include "fast_atof.h"
|
||||||
#include "SceneCombiner.h"
|
#include "SceneCombiner.h"
|
||||||
#include "DefaultIOSystem.h"
|
|
||||||
#include "StringUtils.h"
|
#include "StringUtils.h"
|
||||||
#include "XMLTools.h"
|
#include "XMLTools.h"
|
||||||
|
#include <assimp/DefaultIOSystem.h>
|
||||||
#include <assimp/IOSystem.hpp>
|
#include <assimp/IOSystem.hpp>
|
||||||
#include <assimp/Exporter.hpp>
|
#include <assimp/Exporter.hpp>
|
||||||
#include <assimp/scene.h>
|
#include <assimp/scene.h>
|
||||||
|
@ -652,7 +650,7 @@ void ColladaExporter::WriteMaterials()
|
||||||
if( materialCountWithThisName == 0 ) {
|
if( materialCountWithThisName == 0 ) {
|
||||||
materials[a].name = name.C_Str();
|
materials[a].name = name.C_Str();
|
||||||
} else {
|
} else {
|
||||||
materials[a].name = std::string(name.C_Str()) + to_string(materialCountWithThisName);
|
materials[a].name = std::string(name.C_Str()) + to_string(materialCountWithThisName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for( std::string::iterator it = materials[a].name.begin(); it != materials[a].name.end(); ++it ) {
|
for( std::string::iterator it = materials[a].name.begin(); it != materials[a].name.end(); ++it ) {
|
||||||
|
@ -809,8 +807,8 @@ void ColladaExporter::WriteGeometry( size_t pIndex)
|
||||||
const std::string idstr = GetMeshId( pIndex);
|
const std::string idstr = GetMeshId( pIndex);
|
||||||
const std::string idstrEscaped = XMLEscape(idstr);
|
const std::string idstrEscaped = XMLEscape(idstr);
|
||||||
|
|
||||||
if( mesh->mNumFaces == 0 || mesh->mNumVertices == 0 )
|
if ( mesh->mNumFaces == 0 || mesh->mNumVertices == 0 )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// opening tag
|
// opening tag
|
||||||
mOutput << startstr << "<geometry id=\"" << idstrEscaped << "\" name=\"" << idstrEscaped << "_name\" >" << endstr;
|
mOutput << startstr << "<geometry id=\"" << idstrEscaped << "\" name=\"" << idstrEscaped << "_name\" >" << endstr;
|
||||||
|
@ -843,22 +841,10 @@ void ColladaExporter::WriteGeometry( size_t pIndex)
|
||||||
}
|
}
|
||||||
|
|
||||||
// assemble vertex structure
|
// assemble vertex structure
|
||||||
|
// Only write input for POSITION since we will write other as shared inputs in polygon definition
|
||||||
mOutput << startstr << "<vertices id=\"" << idstrEscaped << "-vertices" << "\">" << endstr;
|
mOutput << startstr << "<vertices id=\"" << idstrEscaped << "-vertices" << "\">" << endstr;
|
||||||
PushTag();
|
PushTag();
|
||||||
mOutput << startstr << "<input semantic=\"POSITION\" source=\"#" << idstrEscaped << "-positions\" />" << endstr;
|
mOutput << startstr << "<input semantic=\"POSITION\" source=\"#" << idstrEscaped << "-positions\" />" << endstr;
|
||||||
if( mesh->HasNormals() )
|
|
||||||
mOutput << startstr << "<input semantic=\"NORMAL\" source=\"#" << idstrEscaped << "-normals\" />" << endstr;
|
|
||||||
for( size_t a = 0; a < AI_MAX_NUMBER_OF_TEXTURECOORDS; ++a )
|
|
||||||
{
|
|
||||||
if( mesh->HasTextureCoords(static_cast<unsigned int>(a)) )
|
|
||||||
mOutput << startstr << "<input semantic=\"TEXCOORD\" source=\"#" << idstrEscaped << "-tex" << a << "\" " /*<< "set=\"" << a << "\"" */ << " />" << endstr;
|
|
||||||
}
|
|
||||||
for( size_t a = 0; a < AI_MAX_NUMBER_OF_COLOR_SETS; ++a )
|
|
||||||
{
|
|
||||||
if( mesh->HasVertexColors(static_cast<unsigned int>(a) ) )
|
|
||||||
mOutput << startstr << "<input semantic=\"COLOR\" source=\"#" << idstrEscaped << "-color" << a << "\" " /*<< set=\"" << a << "\"" */ << " />" << endstr;
|
|
||||||
}
|
|
||||||
|
|
||||||
PopTag();
|
PopTag();
|
||||||
mOutput << startstr << "</vertices>" << endstr;
|
mOutput << startstr << "</vertices>" << endstr;
|
||||||
|
|
||||||
|
@ -877,6 +863,19 @@ void ColladaExporter::WriteGeometry( size_t pIndex)
|
||||||
mOutput << startstr << "<lines count=\"" << countLines << "\" material=\"defaultMaterial\">" << endstr;
|
mOutput << startstr << "<lines count=\"" << countLines << "\" material=\"defaultMaterial\">" << endstr;
|
||||||
PushTag();
|
PushTag();
|
||||||
mOutput << startstr << "<input offset=\"0\" semantic=\"VERTEX\" source=\"#" << idstrEscaped << "-vertices\" />" << endstr;
|
mOutput << startstr << "<input offset=\"0\" semantic=\"VERTEX\" source=\"#" << idstrEscaped << "-vertices\" />" << endstr;
|
||||||
|
if( mesh->HasNormals() )
|
||||||
|
mOutput << startstr << "<input semantic=\"NORMAL\" source=\"#" << idstrEscaped << "-normals\" />" << endstr;
|
||||||
|
for( size_t a = 0; a < AI_MAX_NUMBER_OF_TEXTURECOORDS; ++a )
|
||||||
|
{
|
||||||
|
if( mesh->HasTextureCoords(static_cast<unsigned int>(a)) )
|
||||||
|
mOutput << startstr << "<input semantic=\"TEXCOORD\" source=\"#" << idstrEscaped << "-tex" << a << "\" " << "set=\"" << a << "\"" << " />" << endstr;
|
||||||
|
}
|
||||||
|
for( size_t a = 0; a < AI_MAX_NUMBER_OF_COLOR_SETS; ++a )
|
||||||
|
{
|
||||||
|
if( mesh->HasVertexColors(static_cast<unsigned int>(a) ) )
|
||||||
|
mOutput << startstr << "<input semantic=\"COLOR\" source=\"#" << idstrEscaped << "-color" << a << "\" " << "set=\"" << a << "\"" << " />" << endstr;
|
||||||
|
}
|
||||||
|
|
||||||
mOutput << startstr << "<p>";
|
mOutput << startstr << "<p>";
|
||||||
for( size_t a = 0; a < mesh->mNumFaces; ++a )
|
for( size_t a = 0; a < mesh->mNumFaces; ++a )
|
||||||
{
|
{
|
||||||
|
@ -898,10 +897,17 @@ void ColladaExporter::WriteGeometry( size_t pIndex)
|
||||||
mOutput << startstr << "<polylist count=\"" << countPoly << "\" material=\"defaultMaterial\">" << endstr;
|
mOutput << startstr << "<polylist count=\"" << countPoly << "\" material=\"defaultMaterial\">" << endstr;
|
||||||
PushTag();
|
PushTag();
|
||||||
mOutput << startstr << "<input offset=\"0\" semantic=\"VERTEX\" source=\"#" << idstrEscaped << "-vertices\" />" << endstr;
|
mOutput << startstr << "<input offset=\"0\" semantic=\"VERTEX\" source=\"#" << idstrEscaped << "-vertices\" />" << endstr;
|
||||||
|
if( mesh->HasNormals() )
|
||||||
|
mOutput << startstr << "<input offset=\"0\" semantic=\"NORMAL\" source=\"#" << idstrEscaped << "-normals\" />" << endstr;
|
||||||
for( size_t a = 0; a < AI_MAX_NUMBER_OF_TEXTURECOORDS; ++a )
|
for( size_t a = 0; a < AI_MAX_NUMBER_OF_TEXTURECOORDS; ++a )
|
||||||
{
|
{
|
||||||
if( mesh->HasTextureCoords(static_cast<unsigned int>(a) ) )
|
if( mesh->HasTextureCoords(static_cast<unsigned int>(a)) )
|
||||||
mOutput << startstr << "<input offset=\"0\" semantic=\"TEXCOORD\" source=\"#" << idstrEscaped << "-tex" << a << "\" set=\"" << a << "\" />" << endstr;
|
mOutput << startstr << "<input offset=\"0\" semantic=\"TEXCOORD\" source=\"#" << idstrEscaped << "-tex" << a << "\" " << "set=\"" << a << "\"" << " />" << endstr;
|
||||||
|
}
|
||||||
|
for( size_t a = 0; a < AI_MAX_NUMBER_OF_COLOR_SETS; ++a )
|
||||||
|
{
|
||||||
|
if( mesh->HasVertexColors(static_cast<unsigned int>(a) ) )
|
||||||
|
mOutput << startstr << "<input offset=\"0\" semantic=\"COLOR\" source=\"#" << idstrEscaped << "-color" << a << "\" " << "set=\"" << a << "\"" << " />" << endstr;
|
||||||
}
|
}
|
||||||
|
|
||||||
mOutput << startstr << "<vcount>";
|
mOutput << startstr << "<vcount>";
|
||||||
|
|
|
@ -43,7 +43,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#ifndef AI_COLLADAHELPER_H_INC
|
#ifndef AI_COLLADAHELPER_H_INC
|
||||||
#define AI_COLLADAHELPER_H_INC
|
#define AI_COLLADAHELPER_H_INC
|
||||||
|
|
||||||
#include <string>
|
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
|
@ -49,21 +49,19 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#include <assimp/scene.h>
|
#include <assimp/scene.h>
|
||||||
#include <assimp/DefaultLogger.hpp>
|
#include <assimp/DefaultLogger.hpp>
|
||||||
#include <assimp/Importer.hpp>
|
#include <assimp/Importer.hpp>
|
||||||
#include "ColladaParser.h"
|
#include <assimp/importerdesc.h>
|
||||||
|
|
||||||
|
#include "ColladaParser.h"
|
||||||
#include "fast_atof.h"
|
#include "fast_atof.h"
|
||||||
#include "ParsingUtils.h"
|
#include "ParsingUtils.h"
|
||||||
#include "SkeletonMeshBuilder.h"
|
#include "SkeletonMeshBuilder.h"
|
||||||
#include "Defines.h"
|
|
||||||
#include "CreateAnimMesh.h"
|
#include "CreateAnimMesh.h"
|
||||||
|
|
||||||
#include "time.h"
|
#include "time.h"
|
||||||
#include "math.h"
|
#include "math.h"
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <cstdint>
|
|
||||||
#include <numeric>
|
#include <numeric>
|
||||||
#include "Defines.h"
|
#include <assimp/Defines.h>
|
||||||
|
|
||||||
|
|
||||||
using namespace Assimp;
|
using namespace Assimp;
|
||||||
using namespace Assimp::Formatter;
|
using namespace Assimp::Formatter;
|
||||||
|
|
|
@ -1634,7 +1634,7 @@ void ColladaParser::ReadEffectColor( aiColor4D& pColor, Sampler& pSampler)
|
||||||
}
|
}
|
||||||
else if( IsElement( "texture"))
|
else if( IsElement( "texture"))
|
||||||
{
|
{
|
||||||
// get name of source textur/sampler
|
// get name of source texture/sampler
|
||||||
int attrTex = GetAttribute( "texture");
|
int attrTex = GetAttribute( "texture");
|
||||||
pSampler.mName = mReader->getAttributeValue( attrTex);
|
pSampler.mName = mReader->getAttributeValue( attrTex);
|
||||||
|
|
||||||
|
@ -2353,9 +2353,9 @@ size_t ColladaParser::ReadPrimitives( Mesh* pMesh, std::vector<InputChannel>& pP
|
||||||
ThrowException( "Expected different index count in <p> element.");
|
ThrowException( "Expected different index count in <p> element.");
|
||||||
|
|
||||||
// find the data for all sources
|
// find the data for all sources
|
||||||
for( std::vector<InputChannel>::iterator it = pMesh->mPerVertexData.begin(); it != pMesh->mPerVertexData.end(); ++it)
|
for( std::vector<InputChannel>::iterator it = pMesh->mPerVertexData.begin(); it != pMesh->mPerVertexData.end(); ++it)
|
||||||
{
|
{
|
||||||
InputChannel& input = *it;
|
InputChannel& input = *it;
|
||||||
if( input.mResolved)
|
if( input.mResolved)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
@ -2367,9 +2367,9 @@ size_t ColladaParser::ReadPrimitives( Mesh* pMesh, std::vector<InputChannel>& pP
|
||||||
acc->mData = &ResolveLibraryReference( mDataLibrary, acc->mSource);
|
acc->mData = &ResolveLibraryReference( mDataLibrary, acc->mSource);
|
||||||
}
|
}
|
||||||
// and the same for the per-index channels
|
// and the same for the per-index channels
|
||||||
for( std::vector<InputChannel>::iterator it = pPerIndexChannels.begin(); it != pPerIndexChannels.end(); ++it)
|
for( std::vector<InputChannel>::iterator it = pPerIndexChannels.begin(); it != pPerIndexChannels.end(); ++it)
|
||||||
{
|
{
|
||||||
InputChannel& input = *it;
|
InputChannel& input = *it;
|
||||||
if( input.mResolved)
|
if( input.mResolved)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
@ -2451,6 +2451,9 @@ size_t ColladaParser::ReadPrimitives( Mesh* pMesh, std::vector<InputChannel>& pP
|
||||||
return numPrimitives;
|
return numPrimitives;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///@note This function willn't work correctly if both PerIndex and PerVertex channels have same channels.
|
||||||
|
///For example if TEXCOORD present in both <vertices> and <polylist> tags this function will create wrong uv coordinates.
|
||||||
|
///It's not clear from COLLADA documentation is this allowed or not. For now only exporter fixed to avoid such behavior
|
||||||
void ColladaParser::CopyVertex(size_t currentVertex, size_t numOffsets, size_t numPoints, size_t perVertexOffset, Mesh* pMesh, std::vector<InputChannel>& pPerIndexChannels, size_t currentPrimitive, const std::vector<size_t>& indices){
|
void ColladaParser::CopyVertex(size_t currentVertex, size_t numOffsets, size_t numPoints, size_t perVertexOffset, Mesh* pMesh, std::vector<InputChannel>& pPerIndexChannels, size_t currentPrimitive, const std::vector<size_t>& indices){
|
||||||
// calculate the base offset of the vertex whose attributes we ant to copy
|
// calculate the base offset of the vertex whose attributes we ant to copy
|
||||||
size_t baseOffset = currentPrimitive * numOffsets * numPoints + currentVertex * numOffsets;
|
size_t baseOffset = currentPrimitive * numOffsets * numPoints + currentVertex * numOffsets;
|
||||||
|
|
|
@ -49,7 +49,6 @@
|
||||||
#include "ColladaHelper.h"
|
#include "ColladaHelper.h"
|
||||||
#include <assimp/ai_assert.h>
|
#include <assimp/ai_assert.h>
|
||||||
#include "TinyFormatter.h"
|
#include "TinyFormatter.h"
|
||||||
#include <memory>
|
|
||||||
|
|
||||||
namespace Assimp
|
namespace Assimp
|
||||||
{
|
{
|
||||||
|
|
|
@ -43,24 +43,18 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#include "D3MFImporter.h"
|
#include "D3MFImporter.h"
|
||||||
|
|
||||||
#include <assimp/scene.h>
|
#include <assimp/scene.h>
|
||||||
#include <assimp/IOStream.hpp>
|
|
||||||
#include <assimp/IOSystem.hpp>
|
#include <assimp/IOSystem.hpp>
|
||||||
#include <assimp/DefaultLogger.hpp>
|
#include <assimp/DefaultLogger.hpp>
|
||||||
|
#include <assimp/importerdesc.h>
|
||||||
#include "StringComparison.h"
|
#include "StringComparison.h"
|
||||||
#include "StringUtils.h"
|
#include "StringUtils.h"
|
||||||
|
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <sstream>
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <algorithm>
|
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <cstdlib>
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
#include <assimp/ai_assert.h>
|
|
||||||
|
|
||||||
#include "D3MFOpcPackage.h"
|
#include "D3MFOpcPackage.h"
|
||||||
#include <contrib/unzip/unzip.h>
|
#include <contrib/unzip/unzip.h>
|
||||||
#include "irrXMLWrapper.h"
|
#include "irrXMLWrapper.h"
|
||||||
|
@ -68,7 +62,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
namespace Assimp {
|
namespace Assimp {
|
||||||
namespace D3MF {
|
namespace D3MF {
|
||||||
|
|
||||||
|
|
||||||
namespace XmlTag {
|
namespace XmlTag {
|
||||||
static const std::string model = "model";
|
static const std::string model = "model";
|
||||||
static const std::string metadata = "metadata";
|
static const std::string metadata = "metadata";
|
||||||
|
@ -94,40 +87,28 @@ namespace XmlTag {
|
||||||
static const std::string transform = "transform";
|
static const std::string transform = "transform";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class XmlSerializer {
|
||||||
class XmlSerializer
|
|
||||||
{
|
|
||||||
public:
|
public:
|
||||||
XmlSerializer(XmlReader* xmlReader)
|
XmlSerializer(XmlReader* xmlReader)
|
||||||
: xmlReader(xmlReader)
|
: xmlReader(xmlReader) {
|
||||||
{
|
// empty
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ImportXml(aiScene* scene)
|
void ImportXml(aiScene* scene) {
|
||||||
{
|
|
||||||
|
|
||||||
scene->mFlags |= AI_SCENE_FLAGS_NON_VERBOSE_FORMAT;
|
|
||||||
|
|
||||||
scene->mRootNode = new aiNode();
|
scene->mRootNode = new aiNode();
|
||||||
std::vector<aiNode*> children;
|
std::vector<aiNode*> children;
|
||||||
|
|
||||||
while(ReadToEndElement(D3MF::XmlTag::model))
|
while(ReadToEndElement(D3MF::XmlTag::model)) {
|
||||||
{
|
if(xmlReader->getNodeName() == D3MF::XmlTag::object) {
|
||||||
|
|
||||||
if(xmlReader->getNodeName() == D3MF::XmlTag::object)
|
|
||||||
{
|
|
||||||
children.push_back(ReadObject(scene));
|
children.push_back(ReadObject(scene));
|
||||||
}
|
} else if(xmlReader->getNodeName() == D3MF::XmlTag::build) {
|
||||||
else if(xmlReader->getNodeName() == D3MF::XmlTag::build)
|
// ???
|
||||||
{
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(scene->mRootNode->mName.length == 0)
|
if ( scene->mRootNode->mName.length == 0 ) {
|
||||||
scene->mRootNode->mName.Set("3MF");
|
scene->mRootNode->mName.Set( "3MF" );
|
||||||
|
}
|
||||||
|
|
||||||
scene->mNumMeshes = static_cast<unsigned int>(meshes.size());
|
scene->mNumMeshes = static_cast<unsigned int>(meshes.size());
|
||||||
scene->mMeshes = new aiMesh*[scene->mNumMeshes]();
|
scene->mMeshes = new aiMesh*[scene->mNumMeshes]();
|
||||||
|
@ -138,12 +119,10 @@ public:
|
||||||
scene->mRootNode->mChildren = new aiNode*[scene->mRootNode->mNumChildren]();
|
scene->mRootNode->mChildren = new aiNode*[scene->mRootNode->mNumChildren]();
|
||||||
|
|
||||||
std::copy(children.begin(), children.end(), scene->mRootNode->mChildren);
|
std::copy(children.begin(), children.end(), scene->mRootNode->mChildren);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
aiNode* ReadObject(aiScene* scene)
|
aiNode* ReadObject(aiScene* scene) {
|
||||||
{
|
|
||||||
ScopeGuard<aiNode> node(new aiNode());
|
ScopeGuard<aiNode> node(new aiNode());
|
||||||
|
|
||||||
std::vector<unsigned long> meshIds;
|
std::vector<unsigned long> meshIds;
|
||||||
|
@ -164,17 +143,14 @@ private:
|
||||||
|
|
||||||
size_t meshIdx = meshes.size();
|
size_t meshIdx = meshes.size();
|
||||||
|
|
||||||
while(ReadToEndElement(D3MF::XmlTag::object))
|
while(ReadToEndElement(D3MF::XmlTag::object)) {
|
||||||
{
|
if(xmlReader->getNodeName() == D3MF::XmlTag::mesh) {
|
||||||
if(xmlReader->getNodeName() == D3MF::XmlTag::mesh)
|
|
||||||
{
|
|
||||||
auto mesh = ReadMesh();
|
auto mesh = ReadMesh();
|
||||||
|
|
||||||
mesh->mName.Set(name);
|
mesh->mName.Set(name);
|
||||||
meshes.push_back(mesh);
|
meshes.push_back(mesh);
|
||||||
meshIds.push_back(static_cast<unsigned long>(meshIdx));
|
meshIds.push_back(static_cast<unsigned long>(meshIdx));
|
||||||
meshIdx++;
|
meshIdx++;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -185,49 +161,35 @@ private:
|
||||||
std::copy(meshIds.begin(), meshIds.end(), node->mMeshes);
|
std::copy(meshIds.begin(), meshIds.end(), node->mMeshes);
|
||||||
|
|
||||||
return node.dismiss();
|
return node.dismiss();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
aiMesh* ReadMesh()
|
aiMesh* ReadMesh() {
|
||||||
{
|
|
||||||
aiMesh* mesh = new aiMesh();
|
aiMesh* mesh = new aiMesh();
|
||||||
|
while(ReadToEndElement(D3MF::XmlTag::mesh)) {
|
||||||
while(ReadToEndElement(D3MF::XmlTag::mesh))
|
if(xmlReader->getNodeName() == D3MF::XmlTag::vertices) {
|
||||||
{
|
|
||||||
if(xmlReader->getNodeName() == D3MF::XmlTag::vertices)
|
|
||||||
{
|
|
||||||
ImportVertices(mesh);
|
ImportVertices(mesh);
|
||||||
}
|
} else if(xmlReader->getNodeName() == D3MF::XmlTag::triangles) {
|
||||||
else if(xmlReader->getNodeName() == D3MF::XmlTag::triangles)
|
|
||||||
{
|
|
||||||
ImportTriangles(mesh);
|
ImportTriangles(mesh);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return mesh;
|
return mesh;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ImportVertices(aiMesh* mesh)
|
void ImportVertices(aiMesh* mesh) {
|
||||||
{
|
|
||||||
std::vector<aiVector3D> vertices;
|
std::vector<aiVector3D> vertices;
|
||||||
|
|
||||||
while(ReadToEndElement(D3MF::XmlTag::vertices))
|
while ( ReadToEndElement(D3MF::XmlTag::vertices) ) {
|
||||||
{
|
if(xmlReader->getNodeName() == D3MF::XmlTag::vertex) {
|
||||||
if(xmlReader->getNodeName() == D3MF::XmlTag::vertex)
|
|
||||||
{
|
|
||||||
vertices.push_back(ReadVertex());
|
vertices.push_back(ReadVertex());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
mesh->mNumVertices = static_cast<unsigned int>(vertices.size());
|
mesh->mNumVertices = static_cast<unsigned int>(vertices.size());
|
||||||
mesh->mVertices = new aiVector3D[mesh->mNumVertices];
|
mesh->mVertices = new aiVector3D[mesh->mNumVertices];
|
||||||
|
|
||||||
std::copy(vertices.begin(), vertices.end(), mesh->mVertices);
|
std::copy(vertices.begin(), vertices.end(), mesh->mVertices);
|
||||||
|
|
||||||
}
|
}
|
||||||
aiVector3D ReadVertex()
|
|
||||||
{
|
aiVector3D ReadVertex() {
|
||||||
aiVector3D vertex;
|
aiVector3D vertex;
|
||||||
|
|
||||||
vertex.x = ai_strtof(xmlReader->getAttributeValue(D3MF::XmlTag::x.c_str()), nullptr);
|
vertex.x = ai_strtof(xmlReader->getAttributeValue(D3MF::XmlTag::x.c_str()), nullptr);
|
||||||
|
@ -237,15 +199,11 @@ private:
|
||||||
return vertex;
|
return vertex;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ImportTriangles(aiMesh* mesh)
|
void ImportTriangles(aiMesh* mesh) {
|
||||||
{
|
|
||||||
std::vector<aiFace> faces;
|
std::vector<aiFace> faces;
|
||||||
|
|
||||||
|
while(ReadToEndElement(D3MF::XmlTag::triangles)) {
|
||||||
while(ReadToEndElement(D3MF::XmlTag::triangles))
|
if(xmlReader->getNodeName() == D3MF::XmlTag::triangle) {
|
||||||
{
|
|
||||||
if(xmlReader->getNodeName() == D3MF::XmlTag::triangle)
|
|
||||||
{
|
|
||||||
faces.push_back(ReadTriangle());
|
faces.push_back(ReadTriangle());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -256,13 +214,10 @@ private:
|
||||||
|
|
||||||
|
|
||||||
std::copy(faces.begin(), faces.end(), mesh->mFaces);
|
std::copy(faces.begin(), faces.end(), mesh->mFaces);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
aiFace ReadTriangle()
|
aiFace ReadTriangle() {
|
||||||
{
|
|
||||||
aiFace face;
|
aiFace face;
|
||||||
|
|
||||||
face.mNumIndices = 3;
|
face.mNumIndices = 3;
|
||||||
face.mIndices = new unsigned int[face.mNumIndices];
|
face.mIndices = new unsigned int[face.mNumIndices];
|
||||||
face.mIndices[0] = static_cast<unsigned int>(std::atoi(xmlReader->getAttributeValue(D3MF::XmlTag::v1.c_str())));
|
face.mIndices[0] = static_cast<unsigned int>(std::atoi(xmlReader->getAttributeValue(D3MF::XmlTag::v1.c_str())));
|
||||||
|
@ -273,35 +228,25 @@ private:
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
bool ReadToStartElement(const std::string& startTag) {
|
||||||
bool ReadToStartElement(const std::string& startTag)
|
while(xmlReader->read()) {
|
||||||
{
|
if (xmlReader->getNodeType() == irr::io::EXN_ELEMENT && xmlReader->getNodeName() == startTag) {
|
||||||
while(xmlReader->read())
|
|
||||||
{
|
|
||||||
if (xmlReader->getNodeType() == irr::io::EXN_ELEMENT && xmlReader->getNodeName() == startTag)
|
|
||||||
{
|
|
||||||
return true;
|
return true;
|
||||||
}
|
} else if (xmlReader->getNodeType() == irr::io::EXN_ELEMENT_END &&
|
||||||
else if (xmlReader->getNodeType() == irr::io::EXN_ELEMENT_END &&
|
xmlReader->getNodeName() == startTag) {
|
||||||
xmlReader->getNodeName() == startTag)
|
|
||||||
{
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//DefaultLogger::get()->error("unexpected EOF, expected closing <" + closeTag + "> tag");
|
// DefaultLogger::get()->error("unexpected EOF, expected closing <" + closeTag + "> tag");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ReadToEndElement(const std::string& closeTag)
|
bool ReadToEndElement(const std::string& closeTag) {
|
||||||
{
|
while(xmlReader->read()) {
|
||||||
while(xmlReader->read())
|
|
||||||
{
|
|
||||||
if (xmlReader->getNodeType() == irr::io::EXN_ELEMENT) {
|
if (xmlReader->getNodeType() == irr::io::EXN_ELEMENT) {
|
||||||
return true;
|
return true;
|
||||||
}
|
} else if (xmlReader->getNodeType() == irr::io::EXN_ELEMENT_END
|
||||||
else if (xmlReader->getNodeType() == irr::io::EXN_ELEMENT_END
|
&& xmlReader->getNodeName() == closeTag) {
|
||||||
&& xmlReader->getNodeName() == closeTag)
|
|
||||||
{
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -309,17 +254,13 @@ private:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::vector<aiMesh*> meshes;
|
std::vector<aiMesh*> meshes;
|
||||||
XmlReader* xmlReader;
|
XmlReader* xmlReader;
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} //namespace D3MF
|
} //namespace D3MF
|
||||||
|
|
||||||
|
|
||||||
static const aiImporterDesc desc = {
|
static const aiImporterDesc desc = {
|
||||||
"3mf Importer",
|
"3mf Importer",
|
||||||
"",
|
"",
|
||||||
|
@ -333,19 +274,15 @@ static const aiImporterDesc desc = {
|
||||||
"3mf"
|
"3mf"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
D3MFImporter::D3MFImporter() {
|
||||||
D3MFImporter::D3MFImporter()
|
// empty
|
||||||
{
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
D3MFImporter::~D3MFImporter()
|
D3MFImporter::~D3MFImporter() {
|
||||||
{
|
// empty
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool D3MFImporter::CanRead(const std::string &pFile, IOSystem *pIOHandler, bool checkSig) const
|
bool D3MFImporter::CanRead(const std::string &pFile, IOSystem *pIOHandler, bool checkSig) const {
|
||||||
{
|
|
||||||
const std::string extension = GetExtension(pFile);
|
const std::string extension = GetExtension(pFile);
|
||||||
if(extension == "3mf") {
|
if(extension == "3mf") {
|
||||||
return true;
|
return true;
|
||||||
|
@ -358,18 +295,15 @@ bool D3MFImporter::CanRead(const std::string &pFile, IOSystem *pIOHandler, bool
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void D3MFImporter::SetupProperties(const Importer *pImp)
|
void D3MFImporter::SetupProperties(const Importer *pImp) {
|
||||||
{
|
// empty
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const aiImporterDesc *D3MFImporter::GetInfo() const
|
const aiImporterDesc *D3MFImporter::GetInfo() const {
|
||||||
{
|
|
||||||
return &desc;
|
return &desc;
|
||||||
}
|
}
|
||||||
|
|
||||||
void D3MFImporter::InternReadFile(const std::string &pFile, aiScene *pScene, IOSystem *pIOHandler)
|
void D3MFImporter::InternReadFile(const std::string &pFile, aiScene *pScene, IOSystem *pIOHandler) {
|
||||||
{
|
|
||||||
D3MF::D3MFOpcPackage opcPackage(pIOHandler, pFile);
|
D3MF::D3MFOpcPackage opcPackage(pIOHandler, pFile);
|
||||||
|
|
||||||
std::unique_ptr<CIrrXML_IOStreamReader> xmlStream(new CIrrXML_IOStreamReader(opcPackage.RootStream()));
|
std::unique_ptr<CIrrXML_IOStreamReader> xmlStream(new CIrrXML_IOStreamReader(opcPackage.RootStream()));
|
||||||
|
|
|
@ -41,9 +41,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#ifndef AI_D3MFLOADER_H_INCLUDED
|
#ifndef AI_D3MFLOADER_H_INCLUDED
|
||||||
#define AI_D3MFLOADER_H_INCLUDED
|
#define AI_D3MFLOADER_H_INCLUDED
|
||||||
|
|
||||||
#include <vector>
|
|
||||||
#include <cstdint>
|
|
||||||
|
|
||||||
#include "BaseImporter.h"
|
#include "BaseImporter.h"
|
||||||
|
|
||||||
namespace Assimp {
|
namespace Assimp {
|
||||||
|
|
|
@ -53,7 +53,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <cstdlib>
|
|
||||||
|
|
||||||
#include <contrib/unzip/unzip.h>
|
#include <contrib/unzip/unzip.h>
|
||||||
|
|
||||||
|
|
|
@ -41,7 +41,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#ifndef D3MFOPCPACKAGE_H
|
#ifndef D3MFOPCPACKAGE_H
|
||||||
#define D3MFOPCPACKAGE_H
|
#define D3MFOPCPACKAGE_H
|
||||||
|
|
||||||
#include <string>
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
#include <assimp/IOSystem.hpp>
|
#include <assimp/IOSystem.hpp>
|
||||||
|
|
|
@ -54,6 +54,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#include "DXFHelper.h"
|
#include "DXFHelper.h"
|
||||||
#include <assimp/IOSystem.hpp>
|
#include <assimp/IOSystem.hpp>
|
||||||
#include <assimp/scene.h>
|
#include <assimp/scene.h>
|
||||||
|
#include <assimp/importerdesc.h>
|
||||||
|
|
||||||
#include <numeric>
|
#include <numeric>
|
||||||
|
|
||||||
using namespace Assimp;
|
using namespace Assimp;
|
||||||
|
|
|
@ -45,6 +45,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#define AI_DXFLOADER_H_INCLUDED
|
#define AI_DXFLOADER_H_INCLUDED
|
||||||
|
|
||||||
#include "BaseImporter.h"
|
#include "BaseImporter.h"
|
||||||
|
#include <map>
|
||||||
|
|
||||||
namespace Assimp {
|
namespace Assimp {
|
||||||
namespace DXF {
|
namespace DXF {
|
||||||
|
|
|
@ -44,7 +44,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
|
|
||||||
#include <assimp/ai_assert.h>
|
#include <assimp/ai_assert.h>
|
||||||
#include "DefaultIOStream.h"
|
#include <assimp/DefaultIOStream.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
|
||||||
|
@ -126,7 +126,7 @@ size_t DefaultIOStream::FileSize() const
|
||||||
if (0 != err)
|
if (0 != err)
|
||||||
return 0;
|
return 0;
|
||||||
mCachedSize = (size_t) (fileStat.st_size);
|
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;
|
struct stat fileStat;
|
||||||
int err = stat(mFilename.c_str(), &fileStat );
|
int err = stat(mFilename.c_str(), &fileStat );
|
||||||
if (0 != err)
|
if (0 != err)
|
||||||
|
|
|
@ -40,10 +40,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
/** @file Default implementation of IOSystem using the standard C file functions */
|
/** @file Default implementation of IOSystem using the standard C file functions */
|
||||||
|
|
||||||
#include "DefaultIOSystem.h"
|
|
||||||
#include "DefaultIOStream.h"
|
|
||||||
#include "StringComparison.h"
|
#include "StringComparison.h"
|
||||||
|
|
||||||
|
#include <assimp/DefaultIOSystem.h>
|
||||||
|
#include <assimp/DefaultIOStream.h>
|
||||||
#include <assimp/DefaultLogger.hpp>
|
#include <assimp/DefaultLogger.hpp>
|
||||||
#include <assimp/ai_assert.h>
|
#include <assimp/ai_assert.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
|
@ -43,13 +43,14 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
* @brief Implementation of DefaultLogger (and Logger)
|
* @brief Implementation of DefaultLogger (and Logger)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "DefaultIOSystem.h"
|
|
||||||
|
|
||||||
// Default log streams
|
// Default log streams
|
||||||
#include "Win32DebugLogStream.h"
|
#include "Win32DebugLogStream.h"
|
||||||
#include "StdOStreamLogStream.h"
|
#include "StdOStreamLogStream.h"
|
||||||
#include "FileLogStream.h"
|
#include "FileLogStream.h"
|
||||||
#include "StringUtils.h"
|
#include "StringUtils.h"
|
||||||
|
|
||||||
|
#include <assimp/DefaultIOSystem.h>
|
||||||
#include <assimp/NullLogger.hpp>
|
#include <assimp/NullLogger.hpp>
|
||||||
#include <assimp/DefaultLogger.hpp>
|
#include <assimp/DefaultLogger.hpp>
|
||||||
#include <assimp/ai_assert.h>
|
#include <assimp/ai_assert.h>
|
||||||
|
|
|
@ -42,7 +42,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#define INCLUDED_EXCEPTIONAL_H
|
#define INCLUDED_EXCEPTIONAL_H
|
||||||
|
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
#include "DefaultIOStream.h"
|
#include <assimp/DefaultIOStream.h>
|
||||||
using std::runtime_error;
|
using std::runtime_error;
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
|
|
|
@ -52,7 +52,6 @@ Here we implement only the C++ interface (Assimp::Exporter).
|
||||||
|
|
||||||
#ifndef ASSIMP_BUILD_NO_EXPORT
|
#ifndef ASSIMP_BUILD_NO_EXPORT
|
||||||
|
|
||||||
#include "DefaultIOSystem.h"
|
|
||||||
#include "BlobIOSystem.h"
|
#include "BlobIOSystem.h"
|
||||||
#include "SceneCombiner.h"
|
#include "SceneCombiner.h"
|
||||||
#include "BaseProcess.h"
|
#include "BaseProcess.h"
|
||||||
|
@ -64,11 +63,12 @@ Here we implement only the C++ interface (Assimp::Exporter).
|
||||||
#include "Exceptional.h"
|
#include "Exceptional.h"
|
||||||
#include "ScenePrivate.h"
|
#include "ScenePrivate.h"
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
|
#include <assimp/DefaultIOSystem.h>
|
||||||
#include <assimp/Exporter.hpp>
|
#include <assimp/Exporter.hpp>
|
||||||
#include <assimp/mesh.h>
|
#include <assimp/mesh.h>
|
||||||
#include <assimp/postprocess.h>
|
#include <assimp/postprocess.h>
|
||||||
#include <assimp/scene.h>
|
#include <assimp/scene.h>
|
||||||
#include <memory>
|
|
||||||
|
|
||||||
namespace Assimp {
|
namespace Assimp {
|
||||||
|
|
||||||
|
@ -201,65 +201,48 @@ public:
|
||||||
std::vector<Exporter::ExportFormatEntry> mExporters;
|
std::vector<Exporter::ExportFormatEntry> mExporters;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
} // end of namespace Assimp
|
} // end of namespace Assimp
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
using namespace Assimp;
|
using namespace Assimp;
|
||||||
|
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
Exporter :: Exporter()
|
Exporter :: Exporter()
|
||||||
: pimpl(new ExporterPimpl())
|
: pimpl(new ExporterPimpl()) {
|
||||||
{
|
// empty
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
Exporter :: ~Exporter()
|
Exporter::~Exporter() {
|
||||||
{
|
|
||||||
FreeBlob();
|
FreeBlob();
|
||||||
|
|
||||||
delete pimpl;
|
delete pimpl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
void Exporter :: SetIOHandler( IOSystem* pIOHandler)
|
void Exporter::SetIOHandler( IOSystem* pIOHandler) {
|
||||||
{
|
|
||||||
pimpl->mIsDefaultIOHandler = !pIOHandler;
|
pimpl->mIsDefaultIOHandler = !pIOHandler;
|
||||||
pimpl->mIOSystem.reset(pIOHandler);
|
pimpl->mIOSystem.reset(pIOHandler);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
IOSystem* Exporter :: GetIOHandler() const
|
IOSystem* Exporter::GetIOHandler() const {
|
||||||
{
|
|
||||||
return pimpl->mIOSystem.get();
|
return pimpl->mIOSystem.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
bool Exporter :: IsDefaultIOHandler() const
|
bool Exporter::IsDefaultIOHandler() const {
|
||||||
{
|
|
||||||
return pimpl->mIsDefaultIOHandler;
|
return pimpl->mIsDefaultIOHandler;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
const aiExportDataBlob* Exporter :: ExportToBlob( const aiScene* pScene, const char* pFormatId, unsigned int, const ExportProperties* pProperties)
|
const aiExportDataBlob* Exporter::ExportToBlob( const aiScene* pScene, const char* pFormatId,
|
||||||
{
|
unsigned int, const ExportProperties* pProperties ) {
|
||||||
if (pimpl->blob) {
|
if (pimpl->blob) {
|
||||||
delete pimpl->blob;
|
delete pimpl->blob;
|
||||||
pimpl->blob = NULL;
|
pimpl->blob = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
std::shared_ptr<IOSystem> old = pimpl->mIOSystem;
|
std::shared_ptr<IOSystem> old = pimpl->mIOSystem;
|
||||||
|
|
||||||
BlobIOSystem* blobio = new BlobIOSystem();
|
BlobIOSystem* blobio = new BlobIOSystem();
|
||||||
pimpl->mIOSystem = std::shared_ptr<IOSystem>( blobio );
|
pimpl->mIOSystem = std::shared_ptr<IOSystem>( blobio );
|
||||||
|
|
||||||
|
@ -274,10 +257,8 @@ const aiExportDataBlob* Exporter :: ExportToBlob( const aiScene* pScene, const
|
||||||
return pimpl->blob;
|
return pimpl->blob;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
bool IsVerboseFormat(const aiMesh* mesh)
|
bool IsVerboseFormat(const aiMesh* mesh) {
|
||||||
{
|
|
||||||
// avoid slow vector<bool> specialization
|
// avoid slow vector<bool> specialization
|
||||||
std::vector<unsigned int> seen(mesh->mNumVertices,0);
|
std::vector<unsigned int> seen(mesh->mNumVertices,0);
|
||||||
for(unsigned int i = 0; i < mesh->mNumFaces; ++i) {
|
for(unsigned int i = 0; i < mesh->mNumFaces; ++i) {
|
||||||
|
@ -292,10 +273,8 @@ bool IsVerboseFormat(const aiMesh* mesh)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
bool IsVerboseFormat(const aiScene* pScene)
|
bool IsVerboseFormat(const aiScene* pScene) {
|
||||||
{
|
|
||||||
for(unsigned int i = 0; i < pScene->mNumMeshes; ++i) {
|
for(unsigned int i = 0; i < pScene->mNumMeshes; ++i) {
|
||||||
if(!IsVerboseFormat(pScene->mMeshes[i])) {
|
if(!IsVerboseFormat(pScene->mMeshes[i])) {
|
||||||
return false;
|
return false;
|
||||||
|
@ -304,10 +283,8 @@ bool IsVerboseFormat(const aiScene* pScene)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
aiReturn Exporter :: Export( const aiScene* pScene, const char* pFormatId, const char* pPath, unsigned int pPreprocessing, const ExportProperties* pProperties)
|
aiReturn Exporter::Export( const aiScene* pScene, const char* pFormatId, const char* pPath, unsigned int pPreprocessing, const ExportProperties* pProperties) {
|
||||||
{
|
|
||||||
ASSIMP_BEGIN_EXCEPTION_REGION();
|
ASSIMP_BEGIN_EXCEPTION_REGION();
|
||||||
|
|
||||||
// when they create scenes from scratch, users will likely create them not in verbose
|
// when they create scenes from scratch, users will likely create them not in verbose
|
||||||
|
@ -320,9 +297,7 @@ aiReturn Exporter :: Export( const aiScene* pScene, const char* pFormatId, const
|
||||||
for (size_t i = 0; i < pimpl->mExporters.size(); ++i) {
|
for (size_t i = 0; i < pimpl->mExporters.size(); ++i) {
|
||||||
const Exporter::ExportFormatEntry& exp = pimpl->mExporters[i];
|
const Exporter::ExportFormatEntry& exp = pimpl->mExporters[i];
|
||||||
if (!strcmp(exp.mDescription.id,pFormatId)) {
|
if (!strcmp(exp.mDescription.id,pFormatId)) {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
// Always create a full copy of the scene. We might optimize this one day,
|
// Always create a full copy of the scene. We might optimize this one day,
|
||||||
// but for now it is the most pragmatic way.
|
// but for now it is the most pragmatic way.
|
||||||
aiScene* scenecopy_tmp = NULL;
|
aiScene* scenecopy_tmp = NULL;
|
||||||
|
@ -341,18 +316,17 @@ aiReturn Exporter :: Export( const aiScene* pScene, const char* pFormatId, const
|
||||||
? (priv->mPPStepsApplied & ~nonIdempotentSteps)
|
? (priv->mPPStepsApplied & ~nonIdempotentSteps)
|
||||||
: 0u);
|
: 0u);
|
||||||
|
|
||||||
// If no extra postprocessing was specified, and we obtained this scene from an
|
// If no extra post-processing was specified, and we obtained this scene from an
|
||||||
// Assimp importer, apply the reverse steps automatically.
|
// Assimp importer, apply the reverse steps automatically.
|
||||||
// TODO: either drop this, or document it. Otherwise it is just a bad surprise.
|
// TODO: either drop this, or document it. Otherwise it is just a bad surprise.
|
||||||
//if (!pPreprocessing && priv) {
|
//if (!pPreprocessing && priv) {
|
||||||
// pp |= (nonIdempotentSteps & priv->mPPStepsApplied);
|
// pp |= (nonIdempotentSteps & priv->mPPStepsApplied);
|
||||||
//}
|
//}
|
||||||
|
|
||||||
// If the input scene is not in verbose format, but there is at least postprocessing step that relies on it,
|
// If the input scene is not in verbose format, but there is at least post-processing step that relies on it,
|
||||||
// we need to run the MakeVerboseFormat step first.
|
// we need to run the MakeVerboseFormat step first.
|
||||||
bool must_join_again = false;
|
bool must_join_again = false;
|
||||||
if (!is_verbose_format) {
|
if (!is_verbose_format) {
|
||||||
|
|
||||||
bool verbosify = false;
|
bool verbosify = false;
|
||||||
for( unsigned int a = 0; a < pimpl->mPostProcessingSteps.size(); a++) {
|
for( unsigned int a = 0; a < pimpl->mPostProcessingSteps.size(); a++) {
|
||||||
BaseProcess* const p = pimpl->mPostProcessingSteps[a];
|
BaseProcess* const p = pimpl->mPostProcessingSteps[a];
|
||||||
|
@ -423,8 +397,7 @@ aiReturn Exporter :: Export( const aiScene* pScene, const char* pFormatId, const
|
||||||
|
|
||||||
ExportProperties emptyProperties; // Never pass NULL ExportProperties so Exporters don't have to worry.
|
ExportProperties emptyProperties; // Never pass NULL ExportProperties so Exporters don't have to worry.
|
||||||
exp.mExportFunction(pPath,pimpl->mIOSystem.get(),scenecopy.get(), pProperties ? pProperties : &emptyProperties);
|
exp.mExportFunction(pPath,pimpl->mIOSystem.get(),scenecopy.get(), pProperties ? pProperties : &emptyProperties);
|
||||||
}
|
} catch (DeadlyExportError& err) {
|
||||||
catch (DeadlyExportError& err) {
|
|
||||||
pimpl->mError = err.what();
|
pimpl->mError = err.what();
|
||||||
return AI_FAILURE;
|
return AI_FAILURE;
|
||||||
}
|
}
|
||||||
|
@ -437,64 +410,53 @@ aiReturn Exporter :: Export( const aiScene* pScene, const char* pFormatId, const
|
||||||
return AI_FAILURE;
|
return AI_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
const char* Exporter :: GetErrorString() const
|
const char* Exporter::GetErrorString() const {
|
||||||
{
|
|
||||||
return pimpl->mError.c_str();
|
return pimpl->mError.c_str();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
void Exporter :: FreeBlob( )
|
void Exporter::FreeBlob() {
|
||||||
{
|
|
||||||
delete pimpl->blob;
|
delete pimpl->blob;
|
||||||
pimpl->blob = NULL;
|
pimpl->blob = NULL;
|
||||||
|
|
||||||
pimpl->mError = "";
|
pimpl->mError = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
const aiExportDataBlob* Exporter :: GetBlob() const
|
const aiExportDataBlob* Exporter::GetBlob() const {
|
||||||
{
|
|
||||||
return pimpl->blob;
|
return pimpl->blob;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
const aiExportDataBlob* Exporter :: GetOrphanedBlob() const
|
const aiExportDataBlob* Exporter::GetOrphanedBlob() const {
|
||||||
{
|
|
||||||
const aiExportDataBlob* tmp = pimpl->blob;
|
const aiExportDataBlob* tmp = pimpl->blob;
|
||||||
pimpl->blob = NULL;
|
pimpl->blob = NULL;
|
||||||
return tmp;
|
return tmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
size_t Exporter :: GetExportFormatCount() const
|
size_t Exporter::GetExportFormatCount() const {
|
||||||
{
|
|
||||||
return pimpl->mExporters.size();
|
return pimpl->mExporters.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
const aiExportFormatDesc* Exporter :: GetExportFormatDescription( size_t pIndex ) const
|
const aiExportFormatDesc* Exporter::GetExportFormatDescription( size_t index ) const {
|
||||||
{
|
if (index >= GetExportFormatCount()) {
|
||||||
if (pIndex >= GetExportFormatCount()) {
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Return from static storage if the requested index is built-in.
|
// Return from static storage if the requested index is built-in.
|
||||||
if (pIndex < sizeof(gExporters) / sizeof(gExporters[0])) {
|
if (index < sizeof(gExporters) / sizeof(gExporters[0])) {
|
||||||
return &gExporters[pIndex].mDescription;
|
return &gExporters[index].mDescription;
|
||||||
}
|
}
|
||||||
|
|
||||||
return &pimpl->mExporters[pIndex].mDescription;
|
return &pimpl->mExporters[index].mDescription;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
aiReturn Exporter :: RegisterExporter(const ExportFormatEntry& desc)
|
aiReturn Exporter::RegisterExporter(const ExportFormatEntry& desc) {
|
||||||
{
|
|
||||||
for(const ExportFormatEntry& e : pimpl->mExporters) {
|
for(const ExportFormatEntry& e : pimpl->mExporters) {
|
||||||
if (!strcmp(e.mDescription.id,desc.mDescription.id)) {
|
if (!strcmp(e.mDescription.id,desc.mDescription.id)) {
|
||||||
return aiReturn_FAILURE;
|
return aiReturn_FAILURE;
|
||||||
|
@ -505,10 +467,8 @@ aiReturn Exporter :: RegisterExporter(const ExportFormatEntry& desc)
|
||||||
return aiReturn_SUCCESS;
|
return aiReturn_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
void Exporter :: UnregisterExporter(const char* id)
|
void Exporter::UnregisterExporter(const char* id) {
|
||||||
{
|
|
||||||
for(std::vector<ExportFormatEntry>::iterator it = pimpl->mExporters.begin(); it != pimpl->mExporters.end(); ++it) {
|
for(std::vector<ExportFormatEntry>::iterator it = pimpl->mExporters.begin(); it != pimpl->mExporters.end(); ++it) {
|
||||||
if (!strcmp((*it).mDescription.id,id)) {
|
if (!strcmp((*it).mDescription.id,id)) {
|
||||||
pimpl->mExporters.erase(it);
|
pimpl->mExporters.erase(it);
|
||||||
|
@ -517,29 +477,30 @@ void Exporter :: UnregisterExporter(const char* id)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ExportProperties :: ExportProperties() {}
|
// ------------------------------------------------------------------------------------------------
|
||||||
|
ExportProperties::ExportProperties() {
|
||||||
|
// empty
|
||||||
|
}
|
||||||
|
|
||||||
|
// ------------------------------------------------------------------------------------------------
|
||||||
ExportProperties::ExportProperties(const ExportProperties &other)
|
ExportProperties::ExportProperties(const ExportProperties &other)
|
||||||
: mIntProperties(other.mIntProperties),
|
: mIntProperties(other.mIntProperties)
|
||||||
mFloatProperties(other.mFloatProperties),
|
, mFloatProperties(other.mFloatProperties)
|
||||||
mStringProperties(other.mStringProperties),
|
, mStringProperties(other.mStringProperties)
|
||||||
mMatrixProperties(other.mMatrixProperties)
|
, mMatrixProperties(other.mMatrixProperties) {
|
||||||
{
|
// empty
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
// Set a configuration property
|
// Set a configuration property
|
||||||
bool ExportProperties :: SetPropertyInteger(const char* szName, int iValue)
|
bool ExportProperties::SetPropertyInteger(const char* szName, int iValue) {
|
||||||
{
|
|
||||||
return SetGenericProperty<int>(mIntProperties, szName,iValue);
|
return SetGenericProperty<int>(mIntProperties, szName,iValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
// Set a configuration property
|
// Set a configuration property
|
||||||
bool ExportProperties :: SetPropertyFloat(const char* szName, ai_real iValue)
|
bool ExportProperties::SetPropertyFloat(const char* szName, ai_real iValue) {
|
||||||
{
|
|
||||||
return SetGenericProperty<ai_real>(mFloatProperties, szName,iValue);
|
return SetGenericProperty<ai_real>(mFloatProperties, szName,iValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -48,7 +48,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#include "FBXParser.h"
|
#include "FBXParser.h"
|
||||||
#include "FBXDocument.h"
|
#include "FBXDocument.h"
|
||||||
#include "FBXImporter.h"
|
#include "FBXImporter.h"
|
||||||
#include "FBXImportSettings.h"
|
|
||||||
#include "FBXDocumentUtil.h"
|
#include "FBXDocumentUtil.h"
|
||||||
#include "FBXProperties.h"
|
#include "FBXProperties.h"
|
||||||
|
|
||||||
|
|
|
@ -44,6 +44,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#ifndef INCLUDED_AI_FBX_COMPILECONFIG_H
|
#ifndef INCLUDED_AI_FBX_COMPILECONFIG_H
|
||||||
#define INCLUDED_AI_FBX_COMPILECONFIG_H
|
#define INCLUDED_AI_FBX_COMPILECONFIG_H
|
||||||
|
|
||||||
|
#include <map>
|
||||||
|
|
||||||
//
|
//
|
||||||
#if _MSC_VER > 1500 || (defined __GNUC___)
|
#if _MSC_VER > 1500 || (defined __GNUC___)
|
||||||
# define ASSIMP_FBX_USE_UNORDERED_MULTIMAP
|
# define ASSIMP_FBX_USE_UNORDERED_MULTIMAP
|
||||||
|
|
|
@ -58,7 +58,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
#include <iterator>
|
#include <iterator>
|
||||||
#include <sstream>
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
namespace Assimp {
|
namespace Assimp {
|
||||||
|
|
|
@ -47,9 +47,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#include "FBXParser.h"
|
#include "FBXParser.h"
|
||||||
#include "FBXDocument.h"
|
#include "FBXDocument.h"
|
||||||
#include "FBXImporter.h"
|
#include "FBXImporter.h"
|
||||||
#include "FBXImportSettings.h"
|
|
||||||
#include "FBXDocumentUtil.h"
|
#include "FBXDocumentUtil.h"
|
||||||
#include "FBXProperties.h"
|
|
||||||
|
|
||||||
namespace Assimp {
|
namespace Assimp {
|
||||||
namespace FBX {
|
namespace FBX {
|
||||||
|
|
|
@ -55,7 +55,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <functional>
|
#include <functional>
|
||||||
|
#include <map>
|
||||||
|
|
||||||
namespace Assimp {
|
namespace Assimp {
|
||||||
namespace FBX {
|
namespace FBX {
|
||||||
|
|
|
@ -55,9 +55,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#include "StreamReader.h"
|
#include "StreamReader.h"
|
||||||
#include "MemoryIOWrapper.h"
|
#include "MemoryIOWrapper.h"
|
||||||
#include <assimp/Importer.hpp>
|
#include <assimp/Importer.hpp>
|
||||||
|
#include <assimp/importerdesc.h>
|
||||||
#include <exception>
|
|
||||||
#include <iterator>
|
|
||||||
|
|
||||||
namespace Assimp {
|
namespace Assimp {
|
||||||
template<> const std::string LogFunctions<FBXImporter>::log_prefix = "FBX: ";
|
template<> const std::string LogFunctions<FBXImporter>::log_prefix = "FBX: ";
|
||||||
|
|
|
@ -48,9 +48,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#include "FBXMeshGeometry.h"
|
#include "FBXMeshGeometry.h"
|
||||||
#include "FBXDocument.h"
|
#include "FBXDocument.h"
|
||||||
#include "FBXImporter.h"
|
#include "FBXImporter.h"
|
||||||
#include "FBXImportSettings.h"
|
|
||||||
#include "FBXDocumentUtil.h"
|
#include "FBXDocumentUtil.h"
|
||||||
#include "FBXProperties.h"
|
|
||||||
|
|
||||||
namespace Assimp {
|
namespace Assimp {
|
||||||
namespace FBX {
|
namespace FBX {
|
||||||
|
|
|
@ -47,9 +47,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#include "FBXParser.h"
|
#include "FBXParser.h"
|
||||||
#include "FBXDocument.h"
|
#include "FBXDocument.h"
|
||||||
#include "FBXImporter.h"
|
#include "FBXImporter.h"
|
||||||
#include "FBXImportSettings.h"
|
|
||||||
#include "FBXDocumentUtil.h"
|
#include "FBXDocumentUtil.h"
|
||||||
#include "FBXProperties.h"
|
|
||||||
|
|
||||||
namespace Assimp {
|
namespace Assimp {
|
||||||
namespace FBX {
|
namespace FBX {
|
||||||
|
|
|
@ -51,7 +51,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
# include "../contrib/zlib/zlib.h"
|
# include "../contrib/zlib/zlib.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#include "FBXTokenizer.h"
|
#include "FBXTokenizer.h"
|
||||||
#include "FBXParser.h"
|
#include "FBXParser.h"
|
||||||
#include "FBXUtil.h"
|
#include "FBXUtil.h"
|
||||||
|
|
|
@ -44,14 +44,15 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#ifndef INCLUDED_AI_FBX_PROPERTIES_H
|
#ifndef INCLUDED_AI_FBX_PROPERTIES_H
|
||||||
#define INCLUDED_AI_FBX_PROPERTIES_H
|
#define INCLUDED_AI_FBX_PROPERTIES_H
|
||||||
|
|
||||||
#include <map>
|
|
||||||
#include "FBXCompileConfig.h"
|
#include "FBXCompileConfig.h"
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
#include <string>
|
||||||
|
|
||||||
namespace Assimp {
|
namespace Assimp {
|
||||||
namespace FBX {
|
namespace FBX {
|
||||||
|
|
||||||
class Element;
|
// Forward declarations
|
||||||
|
class Element;
|
||||||
|
|
||||||
|
|
||||||
/** Represents a dynamic property. Type info added by deriving classes,
|
/** Represents a dynamic property. Type info added by deriving classes,
|
||||||
|
|
|
@ -44,7 +44,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#ifndef INCLUDED_AI_FBX_TOKENIZER_H
|
#ifndef INCLUDED_AI_FBX_TOKENIZER_H
|
||||||
#define INCLUDED_AI_FBX_TOKENIZER_H
|
#define INCLUDED_AI_FBX_TOKENIZER_H
|
||||||
|
|
||||||
#include <memory>
|
|
||||||
#include "FBXCompileConfig.h"
|
#include "FBXCompileConfig.h"
|
||||||
#include <assimp/ai_assert.h>
|
#include <assimp/ai_assert.h>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
|
@ -46,6 +46,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#include "FBXTokenizer.h"
|
#include "FBXTokenizer.h"
|
||||||
|
|
||||||
#include "TinyFormatter.h"
|
#include "TinyFormatter.h"
|
||||||
|
#include <string>
|
||||||
|
|
||||||
#ifndef ASSIMP_BUILD_NO_FBX_IMPORTER
|
#ifndef ASSIMP_BUILD_NO_FBX_IMPORTER
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#ifndef INCLUDED_AI_FBX_UTIL_H
|
#ifndef INCLUDED_AI_FBX_UTIL_H
|
||||||
#define INCLUDED_AI_FBX_UTIL_H
|
#define INCLUDED_AI_FBX_UTIL_H
|
||||||
|
|
||||||
#include <string>
|
|
||||||
#include "FBXCompileConfig.h"
|
#include "FBXCompileConfig.h"
|
||||||
#include "FBXTokenizer.h"
|
#include "FBXTokenizer.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
|
#ifndef ASSIMP_FILELOGSTREAM_H_INC
|
||||||
#define ASSIMP_FILELOGSTREAM_H_INC
|
#define ASSIMP_FILELOGSTREAM_H_INC
|
||||||
|
|
||||||
#include <assimp/LogStream.hpp>
|
#include <assimp/LogStream.hpp>
|
||||||
#include <assimp/IOStream.hpp>
|
#include <assimp/IOStream.hpp>
|
||||||
#include "DefaultIOSystem.h"
|
#include <assimp/DefaultIOSystem.h>
|
||||||
|
|
||||||
namespace Assimp {
|
namespace Assimp {
|
||||||
|
|
||||||
|
|
|
@ -51,6 +51,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#include <assimp/IOSystem.hpp>
|
#include <assimp/IOSystem.hpp>
|
||||||
#include <assimp/DefaultLogger.hpp>
|
#include <assimp/DefaultLogger.hpp>
|
||||||
#include <assimp/scene.h>
|
#include <assimp/scene.h>
|
||||||
|
#include <assimp/importerdesc.h>
|
||||||
|
|
||||||
using namespace Assimp;
|
using namespace Assimp;
|
||||||
|
|
||||||
|
|
|
@ -44,11 +44,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#ifndef AI_HMPLOADER_H_INCLUDED
|
#ifndef AI_HMPLOADER_H_INCLUDED
|
||||||
#define AI_HMPLOADER_H_INCLUDED
|
#define AI_HMPLOADER_H_INCLUDED
|
||||||
|
|
||||||
// public ASSIMP headers
|
|
||||||
#include <assimp/types.h>
|
|
||||||
#include <assimp/texture.h>
|
|
||||||
#include <assimp/material.h>
|
|
||||||
|
|
||||||
// internal headers
|
// internal headers
|
||||||
#include "BaseImporter.h"
|
#include "BaseImporter.h"
|
||||||
#include "MDLLoader.h"
|
#include "MDLLoader.h"
|
||||||
|
|
|
@ -49,7 +49,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#ifndef AI_MDLFILEHELPER2_H_INC
|
#ifndef AI_MDLFILEHELPER2_H_INC
|
||||||
#define AI_MDLFILEHELPER2_H_INC
|
#define AI_MDLFILEHELPER2_H_INC
|
||||||
|
|
||||||
#include "MDLFileData.h"
|
|
||||||
#include "./../include/assimp/Compiler/pushpack1.h"
|
#include "./../include/assimp/Compiler/pushpack1.h"
|
||||||
|
|
||||||
namespace Assimp {
|
namespace Assimp {
|
||||||
|
|
|
@ -47,7 +47,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#include "IFCUtil.h"
|
#include "IFCUtil.h"
|
||||||
#include "PolyTools.h"
|
#include "PolyTools.h"
|
||||||
#include "ProcessHelper.h"
|
#include "ProcessHelper.h"
|
||||||
#include "Defines.h"
|
#include <assimp/Defines.h>
|
||||||
|
|
||||||
#include <iterator>
|
#include <iterator>
|
||||||
#include <tuple>
|
#include <tuple>
|
||||||
|
|
|
@ -258,7 +258,7 @@ void ProcessRevolvedAreaSolid(const IfcRevolvedAreaSolid& solid, TempMesh& resul
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const unsigned int cnt_segments = std::max(2u,static_cast<unsigned int>(16 * std::fabs(max_angle)/AI_MATH_HALF_PI_F));
|
const unsigned int cnt_segments = std::max(2u,static_cast<unsigned int>(conv.settings.cylindricalTessellation * std::fabs(max_angle)/AI_MATH_HALF_PI_F));
|
||||||
const IfcFloat delta = max_angle/cnt_segments;
|
const IfcFloat delta = max_angle/cnt_segments;
|
||||||
|
|
||||||
has_area = has_area && std::fabs(max_angle) < AI_MATH_TWO_PI_F*0.99;
|
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;
|
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 IfcFloat deltaAngle = AI_MATH_TWO_PI/cnt_segments;
|
||||||
|
|
||||||
const size_t samples = curve->EstimateSampleCount(solid.StartParam,solid.EndParam);
|
const size_t samples = curve->EstimateSampleCount(solid.StartParam,solid.EndParam);
|
||||||
|
|
|
@ -58,10 +58,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
#include "IFCUtil.h"
|
#include "IFCUtil.h"
|
||||||
|
|
||||||
#include "StreamReader.h"
|
|
||||||
#include "MemoryIOWrapper.h"
|
#include "MemoryIOWrapper.h"
|
||||||
#include <assimp/scene.h>
|
#include <assimp/scene.h>
|
||||||
#include <assimp/Importer.hpp>
|
#include <assimp/Importer.hpp>
|
||||||
|
#include <assimp/importerdesc.h>
|
||||||
|
|
||||||
|
|
||||||
namespace Assimp {
|
namespace Assimp {
|
||||||
|
@ -108,7 +108,7 @@ static const aiImporterDesc desc = {
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
"ifc ifczip"
|
"ifc ifczip stp"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -128,11 +128,9 @@ IFCImporter::~IFCImporter()
|
||||||
bool IFCImporter::CanRead( const std::string& pFile, IOSystem* pIOHandler, bool checkSig) const
|
bool IFCImporter::CanRead( const std::string& pFile, IOSystem* pIOHandler, bool checkSig) const
|
||||||
{
|
{
|
||||||
const std::string& extension = GetExtension(pFile);
|
const std::string& extension = GetExtension(pFile);
|
||||||
if (extension == "ifc" || extension == "ifczip") {
|
if (extension == "ifc" || extension == "ifczip" || extension == "stp" ) {
|
||||||
return true;
|
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
|
// note: this is the common identification for STEP-encoded files, so
|
||||||
// it is only unambiguous as long as we don't support any further
|
// it is only unambiguous as long as we don't support any further
|
||||||
// file formats with STEP as their encoding.
|
// file formats with STEP as their encoding.
|
||||||
|
@ -155,11 +153,10 @@ const aiImporterDesc* IFCImporter::GetInfo () const
|
||||||
void IFCImporter::SetupProperties(const Importer* pImp)
|
void IFCImporter::SetupProperties(const Importer* pImp)
|
||||||
{
|
{
|
||||||
settings.skipSpaceRepresentations = pImp->GetPropertyBool(AI_CONFIG_IMPORT_IFC_SKIP_SPACE_REPRESENTATIONS,true);
|
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.useCustomTriangulation = pImp->GetPropertyBool(AI_CONFIG_IMPORT_IFC_CUSTOM_TRIANGULATION,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.conicSamplingAngle = 10.f;
|
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;
|
settings.skipAnnotations = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -107,18 +107,18 @@ public:
|
||||||
{
|
{
|
||||||
Settings()
|
Settings()
|
||||||
: skipSpaceRepresentations()
|
: skipSpaceRepresentations()
|
||||||
, skipCurveRepresentations()
|
|
||||||
, useCustomTriangulation()
|
, useCustomTriangulation()
|
||||||
, skipAnnotations()
|
, skipAnnotations()
|
||||||
, conicSamplingAngle(10.f)
|
, conicSamplingAngle(10.f)
|
||||||
|
, cylindricalTessellation(32)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
bool skipSpaceRepresentations;
|
bool skipSpaceRepresentations;
|
||||||
bool skipCurveRepresentations;
|
|
||||||
bool useCustomTriangulation;
|
bool useCustomTriangulation;
|
||||||
bool skipAnnotations;
|
bool skipAnnotations;
|
||||||
float conicSamplingAngle;
|
float conicSamplingAngle;
|
||||||
|
int cylindricalTessellation;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -901,13 +901,21 @@ size_t CloseWindows(ContourVector& contours,
|
||||||
curmesh.verts.reserve(curmesh.verts.size() + (*it).contour.size() * 4);
|
curmesh.verts.reserve(curmesh.verts.size() + (*it).contour.size() * 4);
|
||||||
curmesh.vertcnt.reserve(curmesh.vertcnt.size() + (*it).contour.size());
|
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
|
// 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());
|
if(curmesh.vertcnt.size() > 0) {
|
||||||
std::vector<IfcVector3> worldSpaceContourVtx( it->contour.size());
|
IfcVector3 basePolyNormal = TempMesh::ComputePolygonNormal(curmesh.verts.data(), curmesh.vertcnt.front());
|
||||||
for( size_t a = 0; a < it->contour.size(); ++a )
|
|
||||||
worldSpaceContourVtx[a] = minv * IfcVector3( it->contour[a].x, it->contour[a].y, 0.0);
|
std::vector<IfcVector3> worldSpaceContourVtx(it->contour.size());
|
||||||
IfcVector3 contourNormal = TempMesh::ComputePolygonNormal( worldSpaceContourVtx.data(), worldSpaceContourVtx.size());
|
|
||||||
bool reverseCountourFaces = (contourNormal * basePolyNormal) > 0.0;
|
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
|
// XXX this algorithm is really a bit inefficient - both in terms
|
||||||
// of constant factor and of asymptotic runtime.
|
// of constant factor and of asymptotic runtime.
|
||||||
|
|
|
@ -101,7 +101,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<IfcRectangleProfileDef>()) {
|
if(const IfcRectangleProfileDef* const cprofile = def.ToPtr<IfcRectangleProfileDef>()) {
|
||||||
const IfcFloat x = cprofile->XDim*0.5f, y = cprofile->YDim*0.5f;
|
const IfcFloat x = cprofile->XDim*0.5f, y = cprofile->YDim*0.5f;
|
||||||
|
@ -117,7 +117,7 @@ void ProcessParametrizedProfile(const IfcParameterizedProfileDef& def, TempMesh&
|
||||||
if(def.ToPtr<IfcCircleHollowProfileDef>()) {
|
if(def.ToPtr<IfcCircleHollowProfileDef>()) {
|
||||||
// TODO
|
// 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;
|
const IfcFloat delta = AI_MATH_TWO_PI_F/segments, radius = circle->Radius;
|
||||||
|
|
||||||
meshout.verts.reserve(segments);
|
meshout.verts.reserve(segments);
|
||||||
|
|
|
@ -49,7 +49,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#include "IFCUtil.h"
|
#include "IFCUtil.h"
|
||||||
#include "PolyTools.h"
|
#include "PolyTools.h"
|
||||||
#include "ProcessHelper.h"
|
#include "ProcessHelper.h"
|
||||||
#include "Defines.h"
|
#include <assimp/Defines.h>
|
||||||
|
|
||||||
namespace Assimp {
|
namespace Assimp {
|
||||||
namespace IFC {
|
namespace IFC {
|
||||||
|
|
|
@ -44,8 +44,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#include <assimp/IOStream.hpp>
|
#include <assimp/IOStream.hpp>
|
||||||
#include "ParsingUtils.h"
|
#include "ParsingUtils.h"
|
||||||
|
|
||||||
#include <iostream>
|
|
||||||
|
|
||||||
namespace Assimp {
|
namespace Assimp {
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
|
|
|
@ -65,7 +65,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#include <assimp/scene.h>
|
#include <assimp/scene.h>
|
||||||
#include <assimp/IOSystem.hpp>
|
#include <assimp/IOSystem.hpp>
|
||||||
#include <assimp/postprocess.h>
|
#include <assimp/postprocess.h>
|
||||||
|
#include <assimp/importerdesc.h>
|
||||||
|
|
||||||
using namespace Assimp;
|
using namespace Assimp;
|
||||||
using namespace irr;
|
using namespace irr;
|
||||||
|
|
|
@ -54,9 +54,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#include <assimp/DefaultLogger.hpp>
|
#include <assimp/DefaultLogger.hpp>
|
||||||
#include <assimp/material.h>
|
#include <assimp/material.h>
|
||||||
#include <assimp/scene.h>
|
#include <assimp/scene.h>
|
||||||
|
#include <assimp/importerdesc.h>
|
||||||
#include "Macros.h"
|
#include "Macros.h"
|
||||||
|
|
||||||
|
|
||||||
using namespace Assimp;
|
using namespace Assimp;
|
||||||
using namespace irr;
|
using namespace irr;
|
||||||
using namespace irr::io;
|
using namespace irr::io;
|
||||||
|
|
|
@ -45,6 +45,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
#include <assimp/version.h>
|
#include <assimp/version.h>
|
||||||
#include <assimp/config.h>
|
#include <assimp/config.h>
|
||||||
|
#include <assimp/importerdesc.h>
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
/* Uncomment this line to prevent Assimp from catching unknown exceptions.
|
/* Uncomment this line to prevent Assimp from catching unknown exceptions.
|
||||||
|
@ -65,8 +66,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#include "BaseImporter.h"
|
#include "BaseImporter.h"
|
||||||
#include "BaseProcess.h"
|
#include "BaseProcess.h"
|
||||||
|
|
||||||
#include "DefaultIOStream.h"
|
|
||||||
#include "DefaultIOSystem.h"
|
|
||||||
#include "DefaultProgressHandler.h"
|
#include "DefaultProgressHandler.h"
|
||||||
#include "GenericProperty.h"
|
#include "GenericProperty.h"
|
||||||
#include "ProcessHelper.h"
|
#include "ProcessHelper.h"
|
||||||
|
@ -81,6 +80,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <cctype>
|
#include <cctype>
|
||||||
|
|
||||||
|
#include <assimp/DefaultIOStream.h>
|
||||||
|
#include <assimp/DefaultIOSystem.h>
|
||||||
|
|
||||||
#ifndef ASSIMP_BUILD_NO_VALIDATEDS_PROCESS
|
#ifndef ASSIMP_BUILD_NO_VALIDATEDS_PROCESS
|
||||||
# include "ValidateDataStructure.h"
|
# include "ValidateDataStructure.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -44,8 +44,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#define INCLUDED_AI_IMPORTER_H
|
#define INCLUDED_AI_IMPORTER_H
|
||||||
|
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <string>
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
#include <string>
|
||||||
#include <assimp/matrix4x4.h>
|
#include <assimp/matrix4x4.h>
|
||||||
|
|
||||||
struct aiScene;
|
struct aiScene;
|
||||||
|
|
|
@ -46,6 +46,9 @@ directly (unless you are adding new loaders), instead use the
|
||||||
corresponding preprocessor flag to selectively disable formats.
|
corresponding preprocessor flag to selectively disable formats.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <vector>
|
||||||
|
#include "BaseImporter.h"
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
// Importers
|
// Importers
|
||||||
// (include_new_importers_here)
|
// (include_new_importers_here)
|
||||||
|
|
|
@ -54,10 +54,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#include "ProcessHelper.h"
|
#include "ProcessHelper.h"
|
||||||
#include "ConvertToLHProcess.h"
|
#include "ConvertToLHProcess.h"
|
||||||
#include <assimp/IOSystem.hpp>
|
#include <assimp/IOSystem.hpp>
|
||||||
|
#include <assimp/importerdesc.h>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
|
#include <map>
|
||||||
|
|
||||||
using namespace Assimp;
|
using namespace Assimp;
|
||||||
|
|
||||||
|
|
|
@ -49,6 +49,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#include "LWOFileData.h"
|
#include "LWOFileData.h"
|
||||||
#include "BaseImporter.h"
|
#include "BaseImporter.h"
|
||||||
|
|
||||||
|
#include <map>
|
||||||
|
|
||||||
struct aiTexture;
|
struct aiTexture;
|
||||||
struct aiNode;
|
struct aiNode;
|
||||||
struct aiMaterial;
|
struct aiMaterial;
|
||||||
|
|
|
@ -58,9 +58,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#include <assimp/DefaultLogger.hpp>
|
#include <assimp/DefaultLogger.hpp>
|
||||||
#include <assimp/scene.h>
|
#include <assimp/scene.h>
|
||||||
#include <assimp/IOSystem.hpp>
|
#include <assimp/IOSystem.hpp>
|
||||||
|
#include <assimp/importerdesc.h>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
|
|
||||||
using namespace Assimp;
|
using namespace Assimp;
|
||||||
|
|
||||||
static const aiImporterDesc desc = {
|
static const aiImporterDesc desc = {
|
||||||
|
|
|
@ -46,8 +46,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#define AI_MD2FILEHELPER_H_INC
|
#define AI_MD2FILEHELPER_H_INC
|
||||||
|
|
||||||
#include <assimp/types.h>
|
#include <assimp/types.h>
|
||||||
#include <assimp/mesh.h>
|
|
||||||
#include <assimp/anim.h>
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
#include <assimp/Compiler/pushpack1.h>
|
#include <assimp/Compiler/pushpack1.h>
|
||||||
|
|
|
@ -50,6 +50,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#include <assimp/Importer.hpp>
|
#include <assimp/Importer.hpp>
|
||||||
#include <assimp/IOSystem.hpp>
|
#include <assimp/IOSystem.hpp>
|
||||||
#include <assimp/scene.h>
|
#include <assimp/scene.h>
|
||||||
|
#include <assimp/importerdesc.h>
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
using namespace Assimp;
|
using namespace Assimp;
|
||||||
|
|
|
@ -62,10 +62,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#include <assimp/IOSystem.hpp>
|
#include <assimp/IOSystem.hpp>
|
||||||
#include <assimp/material.h>
|
#include <assimp/material.h>
|
||||||
#include <assimp/scene.h>
|
#include <assimp/scene.h>
|
||||||
|
#include <assimp/importerdesc.h>
|
||||||
#include <cctype>
|
#include <cctype>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
using namespace Assimp;
|
using namespace Assimp;
|
||||||
|
|
||||||
static const aiImporterDesc desc = {
|
static const aiImporterDesc desc = {
|
||||||
|
|
|
@ -56,6 +56,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#include <assimp/scene.h>
|
#include <assimp/scene.h>
|
||||||
#include <assimp/IOSystem.hpp>
|
#include <assimp/IOSystem.hpp>
|
||||||
#include <assimp/DefaultLogger.hpp>
|
#include <assimp/DefaultLogger.hpp>
|
||||||
|
#include <assimp/importerdesc.h>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
using namespace Assimp;
|
using namespace Assimp;
|
||||||
|
|
|
@ -52,6 +52,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#include <assimp/Importer.hpp>
|
#include <assimp/Importer.hpp>
|
||||||
#include <assimp/IOSystem.hpp>
|
#include <assimp/IOSystem.hpp>
|
||||||
#include <assimp/scene.h>
|
#include <assimp/scene.h>
|
||||||
|
#include <assimp/importerdesc.h>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -58,10 +58,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#include <assimp/IOSystem.hpp>
|
#include <assimp/IOSystem.hpp>
|
||||||
#include <assimp/scene.h>
|
#include <assimp/scene.h>
|
||||||
#include <assimp/DefaultLogger.hpp>
|
#include <assimp/DefaultLogger.hpp>
|
||||||
|
#include <assimp/importerdesc.h>
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
|
|
||||||
using namespace Assimp;
|
using namespace Assimp;
|
||||||
|
|
||||||
static const aiImporterDesc desc = {
|
static const aiImporterDesc desc = {
|
||||||
|
|
|
@ -52,8 +52,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#include <assimp/IOSystem.hpp>
|
#include <assimp/IOSystem.hpp>
|
||||||
#include <assimp/DefaultLogger.hpp>
|
#include <assimp/DefaultLogger.hpp>
|
||||||
#include <assimp/scene.h>
|
#include <assimp/scene.h>
|
||||||
|
#include <assimp/Defines.h>
|
||||||
#include "qnan.h"
|
#include "qnan.h"
|
||||||
#include "Defines.h"
|
|
||||||
|
|
||||||
|
|
||||||
using namespace Assimp;
|
using namespace Assimp;
|
||||||
|
|
|
@ -53,7 +53,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#include <assimp/DefaultLogger.hpp>
|
#include <assimp/DefaultLogger.hpp>
|
||||||
#include <assimp/scene.h>
|
#include <assimp/scene.h>
|
||||||
#include <assimp/IOSystem.hpp>
|
#include <assimp/IOSystem.hpp>
|
||||||
|
#include <assimp/importerdesc.h>
|
||||||
|
#include <map>
|
||||||
|
|
||||||
using namespace Assimp;
|
using namespace Assimp;
|
||||||
|
|
||||||
|
|
|
@ -49,7 +49,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#include <assimp/DefaultLogger.hpp>
|
#include <assimp/DefaultLogger.hpp>
|
||||||
#include <assimp/IOSystem.hpp>
|
#include <assimp/IOSystem.hpp>
|
||||||
#include <assimp/scene.h>
|
#include <assimp/scene.h>
|
||||||
|
#include <assimp/importerdesc.h>
|
||||||
#include "StreamReader.h"
|
#include "StreamReader.h"
|
||||||
|
#include <map>
|
||||||
|
|
||||||
using namespace Assimp;
|
using namespace Assimp;
|
||||||
|
|
||||||
|
|
|
@ -54,6 +54,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#include <assimp/IOSystem.hpp>
|
#include <assimp/IOSystem.hpp>
|
||||||
#include <assimp/DefaultLogger.hpp>
|
#include <assimp/DefaultLogger.hpp>
|
||||||
#include <assimp/scene.h>
|
#include <assimp/scene.h>
|
||||||
|
#include <assimp/importerdesc.h>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -54,7 +54,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#include <assimp/IOSystem.hpp>
|
#include <assimp/IOSystem.hpp>
|
||||||
#include <assimp/scene.h>
|
#include <assimp/scene.h>
|
||||||
#include <assimp/DefaultLogger.hpp>
|
#include <assimp/DefaultLogger.hpp>
|
||||||
|
#include <assimp/importerdesc.h>
|
||||||
|
|
||||||
using namespace Assimp;
|
using namespace Assimp;
|
||||||
|
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue