Merge branch 'master' of https://github.com/assimp/assimp
commit
9d69a12532
|
@ -2,7 +2,14 @@
|
|||
*.cpp text eol=lf
|
||||
*.h text eol=lf
|
||||
*.c text eol=lf
|
||||
*.cc text eol=lf
|
||||
*.cpp text eol=lf
|
||||
*.rc text eol=lf
|
||||
*.hpp text eol=lf
|
||||
*.txt text eol=lf
|
||||
*.cmake text eol=lf
|
||||
*.sh text eol=lf
|
||||
CHANGES text eol=lf
|
||||
CREDITS text eol=lf
|
||||
LICENSE text eol=lf
|
||||
Readme.md text eol=lf
|
||||
|
|
378
CHANGES
378
CHANGES
|
@ -1,173 +1,205 @@
|
|||
----------------------------------------------------------------------
|
||||
CHANGELOG
|
||||
----------------------------------------------------------------------
|
||||
|
||||
3.2.1 (2016-10-01)
|
||||
|
||||
FEATURES:
|
||||
- Updated glTF exporter to meet 1.0 specification.
|
||||
|
||||
FIXES/HOUSEKEEPING:
|
||||
- Fixed glTF Validator errors for exported glTF format.
|
||||
|
||||
ISSUES:
|
||||
- Hard coded sampler setting for
|
||||
- magFilter
|
||||
- minFilter
|
||||
- void* in ExportData for accessor max and min.
|
||||
|
||||
|
||||
|
||||
3.2.0 (2015-11-03)
|
||||
|
||||
FEATURES:
|
||||
- OpenDDL-Parser is part of contrib-source.
|
||||
- Experimental OpenGEX-support
|
||||
- CI-check for linux and windows
|
||||
- Coverity check added
|
||||
- New regression testsuite.
|
||||
|
||||
FIXES/HOUSEKEEPING:
|
||||
- Hundreds of bugfixes in all parts of the library
|
||||
- Unified line endings
|
||||
|
||||
|
||||
API COMPATIBILITY:
|
||||
- Removed precompiled header to increase build speed for linux
|
||||
|
||||
|
||||
3.1.1 (2014-06-15)
|
||||
|
||||
FEATURES:
|
||||
- Support for FBX 2013 and newer, binary and ASCII (this is partly
|
||||
work from Google Summer of Code 2012)
|
||||
- Support for OGRE binary mesh and skeleton format
|
||||
- Updated BLEND support for newer Blender versions
|
||||
- Support for arbitrary meta data, used to hold FBX and DAE metadata
|
||||
- OBJ Export now produces smaller files
|
||||
- Meshes can now have names, this is supported by the major importers
|
||||
- Improved IFC geometry generation
|
||||
- M3 support has been removed
|
||||
|
||||
FIXES/HOUSEKEEPING:
|
||||
- Hundreds of bugfixes in all parts of the library
|
||||
- CMake is now the primary build system
|
||||
|
||||
API COMPATIBILITY:
|
||||
- 3.1.1 is not binary compatible to 3.0 due to aiNode::mMetaData
|
||||
and aiMesh::mName
|
||||
- Export interface has been cleaned up and unified
|
||||
- Other than that no relevant changes
|
||||
|
||||
|
||||
3.0 (2012-07-07)
|
||||
|
||||
FEATURES:
|
||||
- new export interface similar to the import API.
|
||||
- Supported export formats: Collada, OBJ, PLY and STL
|
||||
- added new import formats: XGL/ZGL, M3 (experimental)
|
||||
- new postprocessing steps: Debone
|
||||
- vastly improved IFC (Industry Foundation Classes) support
|
||||
- introduced API to query importer meta information (such as supported
|
||||
format versions, full name, maintainer info).
|
||||
- reworked Ogre XML import
|
||||
- C-API now supports per-import properties
|
||||
|
||||
FIXES/HOUSEKEEPING:
|
||||
|
||||
- hundreds of bugfixes in all parts of the library
|
||||
- unified naming and cleanup of public headers
|
||||
- improved CMake build system
|
||||
- templatized math library
|
||||
- reduce dependency on boost.thread, only remaining spot
|
||||
is synchronization for the C logging API
|
||||
|
||||
API COMPATIBILITY:
|
||||
- renamed headers, export interface, C API properties and meta data
|
||||
prevent compatibility with code written for 2.0, but in
|
||||
most cases these can be easily resolved
|
||||
- Note: 3.0 is not binary compatible with 2.0
|
||||
|
||||
|
||||
|
||||
|
||||
2.0 (2010-11-21)
|
||||
|
||||
FEATURES:
|
||||
- Add support for static Blender (*.blend) scenes
|
||||
- Add support for Q3BSP scenes
|
||||
- Add a windows-based OpenGL sample featuring texturing & basic materials
|
||||
- Add an experimental progress feedback interface.
|
||||
- Vastly improved performance (up to 500%, depending on mesh size and
|
||||
spatial structure) in some expensive postprocessing steps
|
||||
- AssimpView now uses a reworked layout which leaves more space
|
||||
to the scene hierarchy window
|
||||
|
||||
- Add C# bindings ('Assimp.NET')
|
||||
- Keep BSD-licensed and otherwise free test files in separate
|
||||
folders (./test/models and ./test/models-nonbsd).
|
||||
|
||||
FIXES:
|
||||
- Many Collada bugfixes, improve fault tolerance
|
||||
- Fix possible crashes in the Obj loader
|
||||
- Improve the Ogre XML loader
|
||||
- OpenGL-sample now works with MinGW
|
||||
- Fix Importer::FindLoader failing on uppercase file extensions
|
||||
- Fix flawed path handling when locating external files
|
||||
- Limit the maximum number of vertices, faces, face indices and
|
||||
weights that Assimp is able to handle. This is to avoid
|
||||
crashes due to overflowing counters.
|
||||
|
||||
- Updated XCode project files
|
||||
- Further CMAKE build improvements
|
||||
|
||||
|
||||
API CHANGES:
|
||||
- Add data structures for vertex-based animations (These are not
|
||||
currently used, however ...)
|
||||
- Some Assimp::Importer methods are const now.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
1.1 (2010-04-17)
|
||||
This is the list of relevant changes from the 1.0 (r412) release to 1.1 (r700).
|
||||
|
||||
FEATURES:
|
||||
- Vastly improved Collada support
|
||||
- Add MS3D (Milkshape 3D) support
|
||||
- Add support for Ogre XML static meshes
|
||||
- Add experimental COB (TrueSpace) support
|
||||
- Automatic test suite to quickly locate regressions
|
||||
- D bindings (`dAssimp`)
|
||||
- Python 2.n bindings (`PyAssimp`)
|
||||
- Add basic support for Unicode input files (utf8, utf16 and utf32)
|
||||
- Add further utilities to the `assimp` tool (xml/binary dumps, quick file stats)
|
||||
- Switch to a CMAKE-based build system including an install target for unix'es
|
||||
- Automatic evaluation of subdivision surfaces for some formats.
|
||||
- Add `Importer::ReadFileFromMemory` and the corresponding C-API `aiReadFileFromMemory`
|
||||
- Expose further math utilities via the C-API (i.e. `aiMultiplyMatrix4`)
|
||||
|
||||
- Move noboost files away from the public include directory
|
||||
- Many, many bugfixes and improvements in existing loaders and postprocessing steps
|
||||
- Documentation improved and clarified in many places.
|
||||
- Add a sample on using Assimp in conjunction with OpenGL
|
||||
|
||||
- Distribution/packaging: comfortable SDK installer for Windows
|
||||
- Distribution/packaging: improved release packages for other architectures
|
||||
|
||||
CRITICAL FIXES:
|
||||
- Resolve problems with clashing heap managers, STL ABIs and runtime libraries (win32)
|
||||
- Fix automatic detection of file type if no file extension is given
|
||||
- Improved exception safety and robustness, prevent leaking of exceptions through the C interface
|
||||
- Fix possible heap corruption due to material properties pulled in incorrectly
|
||||
- Avoid leaking in certain error scenarios
|
||||
- Fix 64 bit compatibility problems in some loaders (i.e. MDL)
|
||||
|
||||
BREAKING API CHANGES:
|
||||
- None -
|
||||
|
||||
MINOR API BEHAVIOUR CHANGES:
|
||||
- Change quaternion orientation to suit to the more common convention (-w).
|
||||
- aiString is utf8 now. Not yet consistent, however.
|
||||
----------------------------------------------------------------------
|
||||
CHANGELOG
|
||||
----------------------------------------------------------------------
|
||||
|
||||
3.3.1 (2016-07-08)
|
||||
|
||||
FIXES/HOUSEKEEPING:
|
||||
- Setup of default precision for 17 exporters
|
||||
- Fix xcode project files
|
||||
- Fix BlenderTesselator: offsetof operator
|
||||
- Invalid version in cmake file
|
||||
- Update pstdint.h to latest greatest
|
||||
|
||||
|
||||
3.3.0 (2016-07-05)
|
||||
|
||||
FEATURES:
|
||||
- C++11 support enabled
|
||||
- New regression-test-UI
|
||||
- Experimental glTF-importer support
|
||||
- OpenGEX: add support for cameras and lights
|
||||
- C4D: update to latest Melange-SDK
|
||||
- Add a gitter channel
|
||||
- Coverity check enabled
|
||||
- Switch to <...> include brackets for public headers
|
||||
- Enable export by pyAssimp
|
||||
- CI: check windows build
|
||||
- Add functionality to perform a singlepost-processing step
|
||||
- many more, just check the history
|
||||
|
||||
FIXES/HOUSEKEEPING:
|
||||
- Fix of many resource leaks in unittests and main lib
|
||||
- Fix iOS-buildfor X64
|
||||
- Choosing zlib manually for cmake
|
||||
- many more, just check the history
|
||||
|
||||
|
||||
3.2.1 (2016-010-10)
|
||||
|
||||
FEATURES:
|
||||
- Updated glTF exporter to meet 1.0 specification.
|
||||
|
||||
FIXES/HOUSEKEEPING:
|
||||
- Fixed glTF Validator errors for exported glTF format.
|
||||
|
||||
ISSUES:
|
||||
- Hard coded sampler setting for
|
||||
- magFilter
|
||||
- minFilter
|
||||
- void* in ExportData for accessor max and min.
|
||||
|
||||
|
||||
3.2.0 (2015-11-03)
|
||||
|
||||
FEATURES:
|
||||
- OpenDDL-Parser is part of contrib-source.
|
||||
- Experimental OpenGEX-support
|
||||
- CI-check for linux and windows
|
||||
- Coverity check added
|
||||
- New regression testsuite.
|
||||
|
||||
FIXES/HOUSEKEEPING:
|
||||
- Hundreds of bugfixes in all parts of the library
|
||||
- Unified line endings
|
||||
|
||||
|
||||
API COMPATIBILITY:
|
||||
- Removed precompiled header to increase build speed for linux
|
||||
|
||||
|
||||
3.1.1 (2014-06-15)
|
||||
|
||||
FEATURES:
|
||||
- Support for FBX 2013 and newer, binary and ASCII (this is partly
|
||||
work from Google Summer of Code 2012)
|
||||
- Support for OGRE binary mesh and skeleton format
|
||||
- Updated BLEND support for newer Blender versions
|
||||
- Support for arbitrary meta data, used to hold FBX and DAE metadata
|
||||
- OBJ Export now produces smaller files
|
||||
- Meshes can now have names, this is supported by the major importers
|
||||
- Improved IFC geometry generation
|
||||
- M3 support has been removed
|
||||
|
||||
FIXES/HOUSEKEEPING:
|
||||
- Hundreds of bugfixes in all parts of the library
|
||||
- CMake is now the primary build system
|
||||
|
||||
API COMPATIBILITY:
|
||||
- 3.1.1 is not binary compatible to 3.0 due to aiNode::mMetaData
|
||||
and aiMesh::mName
|
||||
- Export interface has been cleaned up and unified
|
||||
- Other than that no relevant changes
|
||||
|
||||
|
||||
3.0 (2012-07-07)
|
||||
|
||||
FEATURES:
|
||||
- new export interface similar to the import API.
|
||||
- Supported export formats: Collada, OBJ, PLY and STL
|
||||
- added new import formats: XGL/ZGL, M3 (experimental)
|
||||
- new postprocessing steps: Debone
|
||||
- vastly improved IFC (Industry Foundation Classes) support
|
||||
- introduced API to query importer meta information (such as supported
|
||||
format versions, full name, maintainer info).
|
||||
- reworked Ogre XML import
|
||||
- C-API now supports per-import properties
|
||||
|
||||
FIXES/HOUSEKEEPING:
|
||||
|
||||
- hundreds of bugfixes in all parts of the library
|
||||
- unified naming and cleanup of public headers
|
||||
- improved CMake build system
|
||||
- templatized math library
|
||||
- reduce dependency on boost.thread, only remaining spot
|
||||
is synchronization for the C logging API
|
||||
|
||||
API COMPATIBILITY:
|
||||
- renamed headers, export interface, C API properties and meta data
|
||||
prevent compatibility with code written for 2.0, but in
|
||||
most cases these can be easily resolved
|
||||
- Note: 3.0 is not binary compatible with 2.0
|
||||
|
||||
|
||||
|
||||
|
||||
2.0 (2010-11-21)
|
||||
|
||||
FEATURES:
|
||||
- Add support for static Blender (*.blend) scenes
|
||||
- Add support for Q3BSP scenes
|
||||
- Add a windows-based OpenGL sample featuring texturing & basic materials
|
||||
- Add an experimental progress feedback interface.
|
||||
- Vastly improved performance (up to 500%, depending on mesh size and
|
||||
spatial structure) in some expensive postprocessing steps
|
||||
- AssimpView now uses a reworked layout which leaves more space
|
||||
to the scene hierarchy window
|
||||
|
||||
- Add C# bindings ('Assimp.NET')
|
||||
- Keep BSD-licensed and otherwise free test files in separate
|
||||
folders (./test/models and ./test/models-nonbsd).
|
||||
|
||||
FIXES:
|
||||
- Many Collada bugfixes, improve fault tolerance
|
||||
- Fix possible crashes in the Obj loader
|
||||
- Improve the Ogre XML loader
|
||||
- OpenGL-sample now works with MinGW
|
||||
- Fix Importer::FindLoader failing on uppercase file extensions
|
||||
- Fix flawed path handling when locating external files
|
||||
- Limit the maximum number of vertices, faces, face indices and
|
||||
weights that Assimp is able to handle. This is to avoid
|
||||
crashes due to overflowing counters.
|
||||
|
||||
- Updated XCode project files
|
||||
- Further CMAKE build improvements
|
||||
|
||||
|
||||
API CHANGES:
|
||||
- Add data structures for vertex-based animations (These are not
|
||||
currently used, however ...)
|
||||
- Some Assimp::Importer methods are const now.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
1.1 (2010-04-17)
|
||||
This is the list of relevant changes from the 1.0 (r412) release to 1.1 (r700).
|
||||
|
||||
FEATURES:
|
||||
- Vastly improved Collada support
|
||||
- Add MS3D (Milkshape 3D) support
|
||||
- Add support for Ogre XML static meshes
|
||||
- Add experimental COB (TrueSpace) support
|
||||
- Automatic test suite to quickly locate regressions
|
||||
- D bindings (`dAssimp`)
|
||||
- Python 2.n bindings (`PyAssimp`)
|
||||
- Add basic support for Unicode input files (utf8, utf16 and utf32)
|
||||
- Add further utilities to the `assimp` tool (xml/binary dumps, quick file stats)
|
||||
- Switch to a CMAKE-based build system including an install target for unix'es
|
||||
- Automatic evaluation of subdivision surfaces for some formats.
|
||||
- Add `Importer::ReadFileFromMemory` and the corresponding C-API `aiReadFileFromMemory`
|
||||
- Expose further math utilities via the C-API (i.e. `aiMultiplyMatrix4`)
|
||||
|
||||
- Move noboost files away from the public include directory
|
||||
- Many, many bugfixes and improvements in existing loaders and postprocessing steps
|
||||
- Documentation improved and clarified in many places.
|
||||
- Add a sample on using Assimp in conjunction with OpenGL
|
||||
|
||||
- Distribution/packaging: comfortable SDK installer for Windows
|
||||
- Distribution/packaging: improved release packages for other architectures
|
||||
|
||||
CRITICAL FIXES:
|
||||
- Resolve problems with clashing heap managers, STL ABIs and runtime libraries (win32)
|
||||
- Fix automatic detection of file type if no file extension is given
|
||||
- Improved exception safety and robustness, prevent leaking of exceptions through the C interface
|
||||
- Fix possible heap corruption due to material properties pulled in incorrectly
|
||||
- Avoid leaking in certain error scenarios
|
||||
- Fix 64 bit compatibility problems in some loaders (i.e. MDL)
|
||||
|
||||
BREAKING API CHANGES:
|
||||
- None -
|
||||
|
||||
MINOR API BEHAVIOUR CHANGES:
|
||||
- Change quaternion orientation to suit to the more common convention (-w).
|
||||
- aiString is utf8 now. Not yet consistent, however.
|
||||
|
|
108
CMakeLists.txt
108
CMakeLists.txt
|
@ -1,7 +1,6 @@
|
|||
# Open Asset Import Library (assimp)
|
||||
# ----------------------------------------------------------------------
|
||||
#
|
||||
# Copyright (c) 2006-2016, assimp team
|
||||
# Copyright (c) 2006-2017, assimp team
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use of this software in source and binary forms,
|
||||
|
@ -33,7 +32,6 @@
|
|||
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
#----------------------------------------------------------------------
|
||||
SET(CMAKE_LEGACY_CYGWIN_WIN32 0) # Remove when CMake >= 2.8.4 is required
|
||||
cmake_minimum_required( VERSION 2.8 )
|
||||
|
@ -81,6 +79,20 @@ OPTION ( ASSIMP_COVERALLS
|
|||
OFF
|
||||
)
|
||||
|
||||
option ( SYSTEM_IRRXML
|
||||
"Use system installed Irrlicht/IrrXML library."
|
||||
OFF
|
||||
)
|
||||
|
||||
OPTION ( BUILD_DOCS
|
||||
"Build documentation using Doxygen."
|
||||
OFF
|
||||
)
|
||||
|
||||
if (WIN32)
|
||||
add_definitions( -DWIN32_LEAN_AND_MEAN )
|
||||
endif()
|
||||
|
||||
IF(MSVC)
|
||||
set (CMAKE_PREFIX_PATH "D:\\libs\\devil")
|
||||
OPTION( ASSIMP_INSTALL_PDB
|
||||
|
@ -140,7 +152,7 @@ configure_file(
|
|||
|
||||
configure_file(
|
||||
${CMAKE_CURRENT_LIST_DIR}/include/assimp/config.h.in
|
||||
${CMAKE_CURRENT_LIST_DIR}/include/assimp/config.h
|
||||
${CMAKE_CURRENT_BINARY_DIR}/include/assimp/config.h
|
||||
)
|
||||
|
||||
include_directories(
|
||||
|
@ -155,25 +167,28 @@ SET(LIBASSIMP-DEV_COMPONENT "libassimp${ASSIMP_VERSION_MAJOR}.${ASSIMP_VERSION_M
|
|||
SET(CPACK_COMPONENTS_ALL assimp-bin ${LIBASSIMP_COMPONENT} ${LIBASSIMP-DEV_COMPONENT} assimp-dev)
|
||||
SET(ASSIMP_LIBRARY_SUFFIX "" CACHE STRING "Suffix to append to library names")
|
||||
|
||||
# Ensure that we do not run into issues like http://www.tcm.phy.cam.ac.uk/sw/inodes64.html on 32 bit linux
|
||||
IF( UNIX )
|
||||
# Ensure that we do not run into issues like http://www.tcm.phy.cam.ac.uk/sw/inodes64.html on 32 bit linux
|
||||
IF ( CMAKE_SIZEOF_VOID_P EQUAL 4) # only necessary for 32-bit linux
|
||||
ADD_DEFINITIONS(-D_FILE_OFFSET_BITS=64 )
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
IF((CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX) AND NOT CMAKE_COMPILER_IS_MINGW)
|
||||
IF (BUILD_SHARED_LIBS AND CMAKE_SIZEOF_VOID_P EQUAL 8) # -fPIC is only required for shared libs on 64 bit
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
|
||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
|
||||
ENDIF()
|
||||
# Use GNUInstallDirs for Unix predefined directories
|
||||
include(GNUInstallDirs)
|
||||
ENDIF( UNIX )
|
||||
|
||||
|
||||
# Grouped compiler settings
|
||||
IF ((CMAKE_C_COMPILER_ID MATCHES "GNU") AND NOT CMAKE_COMPILER_IS_MINGW)
|
||||
# hide all not-exported symbols
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -fvisibility=hidden -Wall -std=c++0x" )
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -fvisibility=hidden -fPIC -Wall -std=c++0x")
|
||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
|
||||
SET(LIBSTDC++_LIBRARIES -lstdc++)
|
||||
ELSEIF(MSVC)
|
||||
# enable multi-core compilation with MSVC
|
||||
add_compile_options(/MP)
|
||||
ELSEIF ( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" )
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -fvisibility=hidden -Wall -Wno-long-long -pedantic -std=c++11" )
|
||||
ELSEIF ( "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" )
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -fvisibility=hidden -fPIC -Wall -Wno-long-long -pedantic -std=c++11" )
|
||||
ELSEIF( CMAKE_COMPILER_IS_MINGW )
|
||||
SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden -Wall -Wno-long-long -pedantic -std=c++11" )
|
||||
add_definitions( -U__STRICT_ANSI__ )
|
||||
|
@ -185,9 +200,9 @@ if (ASSIMP_COVERALLS)
|
|||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O0 -fprofile-arcs -ftest-coverage")
|
||||
endif()
|
||||
|
||||
INCLUDE (FindPkgConfig)
|
||||
INCLUDE_DIRECTORIES( include )
|
||||
|
||||
INCLUDE (FindPkgMacros)
|
||||
INCLUDE (PrecompiledHeader)
|
||||
|
||||
# If this is an in-source build (CMAKE_SOURCE_DIR == CMAKE_BINARY_DIR),
|
||||
|
@ -228,9 +243,14 @@ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/assimp-config.cmake" "${C
|
|||
|
||||
FIND_PACKAGE( DirectX )
|
||||
|
||||
IF( CMAKE_COMPILER_IS_GNUCXX )
|
||||
SET(LIBSTDC++_LIBRARIES -lstdc++)
|
||||
ENDIF( CMAKE_COMPILER_IS_GNUCXX )
|
||||
IF( BUILD_DOCS )
|
||||
add_subdirectory(doc)
|
||||
ENDIF( BUILD_DOCS )
|
||||
|
||||
# Look for system installed irrXML
|
||||
IF ( SYSTEM_IRRXML )
|
||||
find_package( IrrXML REQUIRED )
|
||||
ENDIF( SYSTEM_IRRXML )
|
||||
|
||||
# Search for external dependencies, and build them from source if not found
|
||||
# Search for zlib
|
||||
|
@ -255,9 +275,7 @@ ENDIF(NOT ZLIB_FOUND)
|
|||
INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR})
|
||||
|
||||
# Search for unzip
|
||||
IF (PKG_CONFIG_FOUND)
|
||||
PKG_CHECK_MODULES(UNZIP minizip)
|
||||
ENDIF (PKG_CONFIG_FOUND)
|
||||
use_pkgconfig(UNZIP minizip)
|
||||
|
||||
IF ( ASSIMP_NO_EXPORT )
|
||||
ADD_DEFINITIONS( -DASSIMP_BUILD_NO_EXPORT)
|
||||
|
@ -328,6 +346,8 @@ ELSE (ASSIMP_BUILD_NONFREE_C4D_IMPORTER)
|
|||
ADD_DEFINITIONS( -DASSIMP_BUILD_NO_C4D_IMPORTER )
|
||||
ENDIF (ASSIMP_BUILD_NONFREE_C4D_IMPORTER)
|
||||
|
||||
ADD_SUBDIRECTORY(contrib)
|
||||
|
||||
ADD_SUBDIRECTORY( code/ )
|
||||
IF ( ASSIMP_BUILD_ASSIMP_TOOLS )
|
||||
IF ( WIN32 AND DirectX_D3DX9_LIBRARY )
|
||||
|
@ -431,29 +451,29 @@ IF(CMAKE_CPACK_COMMAND AND UNIX AND ASSIMP_OPT_BUILD_PACKAGES)
|
|||
ENDIF()
|
||||
|
||||
if(WIN32)
|
||||
if (CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
SET(BIN_DIR "${PROJECT_SOURCE_DIR}/bin64/")
|
||||
SET(LIB_DIR "${PROJECT_SOURCE_DIR}/lib64/")
|
||||
elseif()
|
||||
SET(BIN_DIR "${PROJECT_SOURCE_DIR}/bin32/")
|
||||
SET(LIB_DIR "${PROJECT_SOURCE_DIR}/lib32/")
|
||||
ENDIF()
|
||||
if (CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
SET(BIN_DIR "${PROJECT_SOURCE_DIR}/bin64/")
|
||||
SET(LIB_DIR "${PROJECT_SOURCE_DIR}/lib64/")
|
||||
elseif()
|
||||
SET(BIN_DIR "${PROJECT_SOURCE_DIR}/bin32/")
|
||||
SET(LIB_DIR "${PROJECT_SOURCE_DIR}/lib32/")
|
||||
ENDIF()
|
||||
|
||||
if(MSVC12)
|
||||
SET(ASSIMP_MSVC_VERSION "vc120")
|
||||
elseif(MSVC14)
|
||||
SET(ASSIMP_MSVC_VERSION "vc140")
|
||||
ENDIF(MSVC12)
|
||||
if(MSVC12)
|
||||
SET(ASSIMP_MSVC_VERSION "vc120")
|
||||
elseif(MSVC14)
|
||||
SET(ASSIMP_MSVC_VERSION "vc140")
|
||||
ENDIF(MSVC12)
|
||||
|
||||
if(MSVC12 OR MSVC14)
|
||||
add_custom_target(UpdateAssimpLibsDebugSymbolsAndDLLs COMMENT "Copying Assimp Libraries ..." VERBATIM)
|
||||
add_custom_command(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Release/assimp-${ASSIMP_MSVC_VERSION}-mt.dll ${BIN_DIR}assimp-${ASSIMP_MSVC_VERSION}-mt.dll VERBATIM)
|
||||
add_custom_command(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Release/assimp-${ASSIMP_MSVC_VERSION}-mt.exp ${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mt.exp VERBATIM)
|
||||
add_custom_command(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Release/assimp-${ASSIMP_MSVC_VERSION}-mt.lib ${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mt.lib VERBATIM)
|
||||
add_custom_command(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Debug/assimp-${ASSIMP_MSVC_VERSION}-mtd.dll ${BIN_DIR}assimp-${ASSIMP_MSVC_VERSION}-mtd.dll VERBATIM)
|
||||
add_custom_command(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Debug/assimp-${ASSIMP_MSVC_VERSION}-mtd.exp ${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mtd.exp VERBATIM)
|
||||
add_custom_command(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Debug/assimp-${ASSIMP_MSVC_VERSION}-mtd.ilk ${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mtd.ilk VERBATIM)
|
||||
add_custom_command(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Debug/assimp-${ASSIMP_MSVC_VERSION}-mtd.lib ${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mtd.lib VERBATIM)
|
||||
add_custom_command(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Debug/assimp-${ASSIMP_MSVC_VERSION}-mtd.pdb ${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mtd.pdb VERBATIM)
|
||||
ENDIF(MSVC12 OR MSVC14)
|
||||
if(MSVC12 OR MSVC14)
|
||||
add_custom_target(UpdateAssimpLibsDebugSymbolsAndDLLs COMMENT "Copying Assimp Libraries ..." VERBATIM)
|
||||
add_custom_command(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Release/assimp-${ASSIMP_MSVC_VERSION}-mt.dll ${BIN_DIR}assimp-${ASSIMP_MSVC_VERSION}-mt.dll VERBATIM)
|
||||
add_custom_command(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Release/assimp-${ASSIMP_MSVC_VERSION}-mt.exp ${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mt.exp VERBATIM)
|
||||
add_custom_command(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Release/assimp-${ASSIMP_MSVC_VERSION}-mt.lib ${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mt.lib VERBATIM)
|
||||
add_custom_command(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Debug/assimp-${ASSIMP_MSVC_VERSION}-mtd.dll ${BIN_DIR}assimp-${ASSIMP_MSVC_VERSION}-mtd.dll VERBATIM)
|
||||
add_custom_command(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Debug/assimp-${ASSIMP_MSVC_VERSION}-mtd.exp ${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mtd.exp VERBATIM)
|
||||
add_custom_command(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Debug/assimp-${ASSIMP_MSVC_VERSION}-mtd.ilk ${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mtd.ilk VERBATIM)
|
||||
add_custom_command(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Debug/assimp-${ASSIMP_MSVC_VERSION}-mtd.lib ${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mtd.lib VERBATIM)
|
||||
add_custom_command(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Debug/assimp-${ASSIMP_MSVC_VERSION}-mtd.pdb ${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mtd.pdb VERBATIM)
|
||||
ENDIF(MSVC12 OR MSVC14)
|
||||
ENDIF (WIN32)
|
||||
|
|
320
CREDITS
320
CREDITS
|
@ -1,160 +1,160 @@
|
|||
===============================================================
|
||||
Open Asset Import Library (Assimp)
|
||||
Developers and Contributors
|
||||
===============================================================
|
||||
|
||||
The following is a non-exhaustive list of all constributors over the years.
|
||||
If you think your name should be listed here, drop us a line and we'll add you.
|
||||
|
||||
- Alexander Gessler,
|
||||
3DS-, BLEND-, ASE-, DXF-, HMP-, MDL-, MD2-, MD3-, MD5-, MDC-, NFF-, PLY-, STL-, RAW-, OFF-, MS3D-, Q3D- and LWO-Loader, Assimp-Viewer, assimp-cmd, -noboost, Website (Design).
|
||||
|
||||
- Thomas Schulze,
|
||||
X-, Collada-, BVH-Loader, Postprocessing framework. Data structure & Interface design, documentation.
|
||||
|
||||
- Kim Kulling,
|
||||
Obj-, Q3BSD-, OpenGEX-Loader, Logging system, CMake-build-environment, Linux-build, Website ( Admin ), Coverity ( Admin ), Glitter ( Admin ).
|
||||
|
||||
- R.Schmidt,
|
||||
Linux build, eclipse support.
|
||||
|
||||
- Matthias Gubisch,
|
||||
Assimp.net
|
||||
Visual Studio 9 support, bugfixes.
|
||||
|
||||
- Mark Sibly
|
||||
B3D-Loader, Assimp testing
|
||||
|
||||
- Jonathan Klein
|
||||
Ogre Loader, VC2010 fixes and CMake fixes.
|
||||
|
||||
- Sebastian Hempel,
|
||||
PyAssimp (first version)
|
||||
Compile-Bugfixes for mingw, add environment for static library support in make.
|
||||
|
||||
- Jonathan Pokrass
|
||||
Supplied a bugfix concerning the scaling in the md3 loader.
|
||||
|
||||
- Andrew Galante,
|
||||
Submitted patches to make Assimp compile with GCC-4, a makefile and the xcode3 workspace.
|
||||
|
||||
- Andreas Nagel
|
||||
First Assimp testing & verification under Windows Vista 64 Bit.
|
||||
|
||||
- Marius Schr<68>der
|
||||
Allowed us to use many of his models for screenshots and testing.
|
||||
|
||||
- Christian Schubert
|
||||
Supplied various XFiles for testing purposes.
|
||||
|
||||
- Tizian Wieland
|
||||
Searched the web for hundreds of test models for internal use
|
||||
|
||||
- John Connors
|
||||
Supplied patches for linux and SCons.
|
||||
|
||||
- T. R.
|
||||
The GUY who performed some of the CSM mocaps.
|
||||
|
||||
- Andy Maloney
|
||||
Contributed fixes for the documentation and the doxygen markup
|
||||
|
||||
- Zhao Lei
|
||||
Contributed several bugfixes fixing memory leaks and improving float parsing
|
||||
|
||||
- sueastside
|
||||
Updated PyAssimp to the latest Assimp data structures and provided a script to keep the Python binding up-to-date.
|
||||
|
||||
- Tobias Rittig
|
||||
Collada testing with Cinema 4D
|
||||
|
||||
- Brad Grantham
|
||||
Improvements in OpenGL-Sample.
|
||||
|
||||
- Robert Ramirez
|
||||
Add group loading feature to Obj-Loader.
|
||||
|
||||
- Chris Maiwald
|
||||
Many bugreports, improving Assimp's portability, regular testing & feedback.
|
||||
|
||||
- Stepan Hrbek
|
||||
Bugreport and fix for a obj-materialloader crash.
|
||||
|
||||
- David Nadlinger
|
||||
D bindings, CMake install support.
|
||||
|
||||
- Dario Accornero
|
||||
Contributed several patches regarding Mac OS/XCode targets, bug reports.
|
||||
|
||||
- Martin Walser (Samhayne)
|
||||
Contributed the 'SimpleTexturedOpenGl' sample.
|
||||
|
||||
- Matthias Fauconneau
|
||||
Contributed a fix for the Q3-BSP loader.
|
||||
|
||||
- J<EFBFBD>rgen P. Tjern<72>
|
||||
Contributed updated and improved xcode workspaces
|
||||
|
||||
- drparallax
|
||||
Contributed the /samples/SimpleAssimpViewX sample
|
||||
|
||||
- Carsten Fuchs
|
||||
Contributed a fix for the Normalize method in aiQuaternion.
|
||||
|
||||
- dbburgess
|
||||
Contributes a Android-specific build issue: log the hardware architecture for ARM.
|
||||
|
||||
- alfiereinre7
|
||||
Contributes a obj-fileparser fix: missing tokens in the obj-token list.
|
||||
|
||||
- Roman Kharitonov
|
||||
Contributes a fix for the configure script environment.
|
||||
|
||||
- Ed Diana
|
||||
Contributed AssimpDelphi (/port/AssimpDelphi).
|
||||
|
||||
- rdb
|
||||
Contributes a bundle of fixes and improvements for the bsp-importer.
|
||||
|
||||
- Mick P
|
||||
For contributing the De-bone postprocessing step and filing various bug reports.
|
||||
|
||||
- Rosen Diankov
|
||||
Contributed patches to build assimp debian packages using cmake.
|
||||
|
||||
- Mark Page
|
||||
Contributed a patch to fix the VertexTriangleAdjacency postprocessing step.
|
||||
|
||||
- IOhannes
|
||||
Contributed the Debian build fixes ( architecture macro ).
|
||||
|
||||
- gellule
|
||||
Several LWO and LWS fixes (pivoting).
|
||||
|
||||
- Marcel Metz
|
||||
GCC/Linux fixes for the SimpleOpenGL sample.
|
||||
|
||||
- Brian Miller
|
||||
Bugfix for a compiler fix for iOS on arm.
|
||||
|
||||
- S<EFBFBD>verin Lemaignan
|
||||
Rewrite of PyAssimp, distutils and Python3 support
|
||||
|
||||
- albert-wang
|
||||
Bugfixes for the collada parser
|
||||
|
||||
- Ya ping Jin
|
||||
Bugfixes for uv-tanget calculation.
|
||||
|
||||
- Jonne Nauha
|
||||
Ogre Binary format support
|
||||
|
||||
- Filip Wasil, Tieto Poland Sp. z o.o.
|
||||
Android JNI asset extraction support
|
||||
|
||||
- Richard Steffen
|
||||
Contributed ExportProperties interface
|
||||
Contributed X File exporter
|
||||
Contributed Step (stp) exporter
|
||||
|
||||
|
||||
===============================================================
|
||||
Open Asset Import Library (Assimp)
|
||||
Developers and Contributors
|
||||
===============================================================
|
||||
|
||||
The following is a non-exhaustive list of all constributors over the years.
|
||||
If you think your name should be listed here, drop us a line and we'll add you.
|
||||
|
||||
- Alexander Gessler,
|
||||
3DS-, BLEND-, ASE-, DXF-, HMP-, MDL-, MD2-, MD3-, MD5-, MDC-, NFF-, PLY-, STL-, RAW-, OFF-, MS3D-, Q3D- and LWO-Loader, Assimp-Viewer, assimp-cmd, -noboost, Website (Design).
|
||||
|
||||
- Thomas Schulze,
|
||||
X-, Collada-, BVH-Loader, Postprocessing framework. Data structure & Interface design, documentation.
|
||||
|
||||
- Kim Kulling,
|
||||
Obj-, Q3BSD-, OpenGEX-Loader, Logging system, CMake-build-environment, Linux-build, Website ( Admin ), Coverity ( Admin ), Glitter ( Admin ).
|
||||
|
||||
- R.Schmidt,
|
||||
Linux build, eclipse support.
|
||||
|
||||
- Matthias Gubisch,
|
||||
Assimp.net
|
||||
Visual Studio 9 support, bugfixes.
|
||||
|
||||
- Mark Sibly
|
||||
B3D-Loader, Assimp testing
|
||||
|
||||
- Jonathan Klein
|
||||
Ogre Loader, VC2010 fixes and CMake fixes.
|
||||
|
||||
- Sebastian Hempel,
|
||||
PyAssimp (first version)
|
||||
Compile-Bugfixes for mingw, add environment for static library support in make.
|
||||
|
||||
- Jonathan Pokrass
|
||||
Supplied a bugfix concerning the scaling in the md3 loader.
|
||||
|
||||
- Andrew Galante,
|
||||
Submitted patches to make Assimp compile with GCC-4, a makefile and the xcode3 workspace.
|
||||
|
||||
- Andreas Nagel
|
||||
First Assimp testing & verification under Windows Vista 64 Bit.
|
||||
|
||||
- Marius Schr<68>der
|
||||
Allowed us to use many of his models for screenshots and testing.
|
||||
|
||||
- Christian Schubert
|
||||
Supplied various XFiles for testing purposes.
|
||||
|
||||
- Tizian Wieland
|
||||
Searched the web for hundreds of test models for internal use
|
||||
|
||||
- John Connors
|
||||
Supplied patches for linux and SCons.
|
||||
|
||||
- T. R.
|
||||
The GUY who performed some of the CSM mocaps.
|
||||
|
||||
- Andy Maloney
|
||||
Contributed fixes for the documentation and the doxygen markup
|
||||
|
||||
- Zhao Lei
|
||||
Contributed several bugfixes fixing memory leaks and improving float parsing
|
||||
|
||||
- sueastside
|
||||
Updated PyAssimp to the latest Assimp data structures and provided a script to keep the Python binding up-to-date.
|
||||
|
||||
- Tobias Rittig
|
||||
Collada testing with Cinema 4D
|
||||
|
||||
- Brad Grantham
|
||||
Improvements in OpenGL-Sample.
|
||||
|
||||
- Robert Ramirez
|
||||
Add group loading feature to Obj-Loader.
|
||||
|
||||
- Chris Maiwald
|
||||
Many bugreports, improving Assimp's portability, regular testing & feedback.
|
||||
|
||||
- Stepan Hrbek
|
||||
Bugreport and fix for a obj-materialloader crash.
|
||||
|
||||
- David Nadlinger
|
||||
D bindings, CMake install support.
|
||||
|
||||
- Dario Accornero
|
||||
Contributed several patches regarding Mac OS/XCode targets, bug reports.
|
||||
|
||||
- Martin Walser (Samhayne)
|
||||
Contributed the 'SimpleTexturedOpenGl' sample.
|
||||
|
||||
- Matthias Fauconneau
|
||||
Contributed a fix for the Q3-BSP loader.
|
||||
|
||||
- Jørgen P. Tjernø
|
||||
Contributed updated and improved xcode workspaces
|
||||
|
||||
- drparallax
|
||||
Contributed the /samples/SimpleAssimpViewX sample
|
||||
|
||||
- Carsten Fuchs
|
||||
Contributed a fix for the Normalize method in aiQuaternion.
|
||||
|
||||
- dbburgess
|
||||
Contributes a Android-specific build issue: log the hardware architecture for ARM.
|
||||
|
||||
- alfiereinre7
|
||||
Contributes a obj-fileparser fix: missing tokens in the obj-token list.
|
||||
|
||||
- Roman Kharitonov
|
||||
Contributes a fix for the configure script environment.
|
||||
|
||||
- Ed Diana
|
||||
Contributed AssimpDelphi (/port/AssimpDelphi).
|
||||
|
||||
- rdb
|
||||
Contributes a bundle of fixes and improvements for the bsp-importer.
|
||||
|
||||
- Mick P
|
||||
For contributing the De-bone postprocessing step and filing various bug reports.
|
||||
|
||||
- Rosen Diankov
|
||||
Contributed patches to build assimp debian packages using cmake.
|
||||
|
||||
- Mark Page
|
||||
Contributed a patch to fix the VertexTriangleAdjacency postprocessing step.
|
||||
|
||||
- IOhannes
|
||||
Contributed the Debian build fixes ( architecture macro ).
|
||||
|
||||
- gellule
|
||||
Several LWO and LWS fixes (pivoting).
|
||||
|
||||
- Marcel Metz
|
||||
GCC/Linux fixes for the SimpleOpenGL sample.
|
||||
|
||||
- Brian Miller
|
||||
Bugfix for a compiler fix for iOS on arm.
|
||||
|
||||
- SĂ©verin Lemaignan
|
||||
Rewrite of PyAssimp, distutils and Python3 support
|
||||
|
||||
- albert-wang
|
||||
Bugfixes for the collada parser
|
||||
|
||||
- Ya ping Jin
|
||||
Bugfixes for uv-tanget calculation.
|
||||
|
||||
- Jonne Nauha
|
||||
Ogre Binary format support
|
||||
|
||||
- Filip Wasil, Tieto Poland Sp. z o.o.
|
||||
Android JNI asset extraction support
|
||||
|
||||
- Richard Steffen
|
||||
Contributed ExportProperties interface
|
||||
Contributed X File exporter
|
||||
Contributed Step (stp) exporter
|
||||
|
||||
|
||||
|
|
156
LICENSE
156
LICENSE
|
@ -1,78 +1,78 @@
|
|||
Open Asset Import Library (assimp)
|
||||
|
||||
Copyright (c) 2006-2016, assimp team
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
with or without modification, are permitted provided that the
|
||||
following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above
|
||||
copyright notice, this list of conditions and the
|
||||
following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above
|
||||
copyright notice, this list of conditions and the
|
||||
following disclaimer in the documentation and/or other
|
||||
materials provided with the distribution.
|
||||
|
||||
* Neither the name of the assimp team, nor the names of its
|
||||
contributors may be used to endorse or promote products
|
||||
derived from this software without specific prior
|
||||
written permission of the assimp team.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
|
||||
|
||||
******************************************************************************
|
||||
|
||||
AN EXCEPTION applies to all files in the ./test/models-nonbsd folder.
|
||||
These are 3d models for testing purposes, from various free sources
|
||||
on the internet. They are - unless otherwise stated - copyright of
|
||||
their respective creators, which may impose additional requirements
|
||||
on the use of their work. For any of these models, see
|
||||
<model-name>.source.txt for more legal information. Contact us if you
|
||||
are a copyright holder and believe that we credited you inproperly or
|
||||
if you don't want your files to appear in the repository.
|
||||
|
||||
|
||||
******************************************************************************
|
||||
|
||||
Poly2Tri Copyright (c) 2009-2010, Poly2Tri Contributors
|
||||
http://code.google.com/p/poly2tri/
|
||||
|
||||
All rights reserved.
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
* Neither the name of Poly2Tri nor the names of its contributors may be
|
||||
used to endorse or promote products derived from this software without specific
|
||||
prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
Open Asset Import Library (assimp)
|
||||
|
||||
Copyright (c) 2006-2016, assimp team
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
with or without modification, are permitted provided that the
|
||||
following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above
|
||||
copyright notice, this list of conditions and the
|
||||
following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above
|
||||
copyright notice, this list of conditions and the
|
||||
following disclaimer in the documentation and/or other
|
||||
materials provided with the distribution.
|
||||
|
||||
* Neither the name of the assimp team, nor the names of its
|
||||
contributors may be used to endorse or promote products
|
||||
derived from this software without specific prior
|
||||
written permission of the assimp team.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
|
||||
|
||||
******************************************************************************
|
||||
|
||||
AN EXCEPTION applies to all files in the ./test/models-nonbsd folder.
|
||||
These are 3d models for testing purposes, from various free sources
|
||||
on the internet. They are - unless otherwise stated - copyright of
|
||||
their respective creators, which may impose additional requirements
|
||||
on the use of their work. For any of these models, see
|
||||
<model-name>.source.txt for more legal information. Contact us if you
|
||||
are a copyright holder and believe that we credited you inproperly or
|
||||
if you don't want your files to appear in the repository.
|
||||
|
||||
|
||||
******************************************************************************
|
||||
|
||||
Poly2Tri Copyright (c) 2009-2010, Poly2Tri Contributors
|
||||
http://code.google.com/p/poly2tri/
|
||||
|
||||
All rights reserved.
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
* Neither the name of Poly2Tri nor the names of its contributors may be
|
||||
used to endorse or promote products derived from this software without specific
|
||||
prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
|
288
Readme.md
288
Readme.md
|
@ -1,143 +1,145 @@
|
|||
Open Asset Import Library (assimp)
|
||||
==================================
|
||||
|
||||
[![Linux Build Status](https://travis-ci.org/assimp/assimp.svg)](https://travis-ci.org/assimp/assimp)
|
||||
[![Windows Build Status](https://ci.appveyor.com/api/projects/status/tmo433wax6u6cjp4?svg=true)](https://ci.appveyor.com/project/kimkulling/assimp)
|
||||
<a href="https://scan.coverity.com/projects/5607">
|
||||
<img alt="Coverity Scan Build Status"
|
||||
src="https://scan.coverity.com/projects/5607/badge.svg"/>
|
||||
</a>
|
||||
[![Coverage Status](https://coveralls.io/repos/github/assimp/assimp/badge.svg?branch=master)](https://coveralls.io/github/assimp/assimp?branch=master)
|
||||
<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.
|
||||
|
||||
Additionally, assimp features various __mesh post processing tools__: normals and tangent space generation, triangulation, vertex cache locality optimization, removal of degenerate primitives and duplicate vertices, sorting by primitive type, merging of redundant materials and many more.
|
||||
|
||||
This is the development trunk containing the latest features and bugfixes. For productive use though, we recommend one of the stable releases available from [assimp.sf.net](http://assimp.sf.net) or from *nix package repositories.
|
||||
The current build status is:
|
||||
|
||||
Gitter chat: [![Join the chat at https://gitter.im/assimp/assimp](https://badges.gitter.im/assimp/assimp.svg)](https://gitter.im/assimp/assimp?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)<br>
|
||||
__[open3mod](https://github.com/acgessler/open3mod) is a powerful 3D model viewer based on Assimp's import and export abilities.__
|
||||
|
||||
Please check our Wiki as well: https://github.com/assimp/assimp/wiki
|
||||
|
||||
#### Supported file formats ####
|
||||
|
||||
A full list [is here](http://assimp.org/main_features_formats.html).
|
||||
__Importers__:
|
||||
|
||||
- 3DS
|
||||
- BLEND (Blender)
|
||||
- DAE/Collada
|
||||
- FBX
|
||||
- IFC-STEP
|
||||
- ASE
|
||||
- DXF
|
||||
- HMP
|
||||
- MD2
|
||||
- MD3
|
||||
- MD5
|
||||
- MDC
|
||||
- MDL
|
||||
- NFF
|
||||
- PLY
|
||||
- STL
|
||||
- X
|
||||
- OBJ
|
||||
- OpenGEX
|
||||
- SMD
|
||||
- LWO
|
||||
- LXO
|
||||
- LWS
|
||||
- TER
|
||||
- AC3D
|
||||
- MS3D
|
||||
- COB
|
||||
- Q3BSP
|
||||
- XGL
|
||||
- CSM
|
||||
- BVH
|
||||
- B3D
|
||||
- NDO
|
||||
- Ogre Binary
|
||||
- Ogre XML
|
||||
- Q3D
|
||||
- ASSBIN (Assimp custom format)
|
||||
- glTF (partial)
|
||||
- 3MF
|
||||
|
||||
Additionally, some formats are supported by dependency on non-free code or external SDKs (not built by default):
|
||||
|
||||
- C4D (https://github.com/acgessler/assimp-cinema4d)
|
||||
|
||||
__Exporters__:
|
||||
|
||||
- DAE (Collada)
|
||||
- STL
|
||||
- OBJ
|
||||
- PLY
|
||||
- X
|
||||
- 3DS
|
||||
- JSON (for WebGl, via https://github.com/acgessler/assimp2json)
|
||||
- ASSBIN
|
||||
- STEP
|
||||
- glTF (partial)
|
||||
|
||||
### Building ###
|
||||
Take a look into the `INSTALL` file. Our build system is CMake, if you used CMake before there is a good chance you know what to do.
|
||||
|
||||
### Ports ###
|
||||
* [Android](port/AndroidJNI/README.md)
|
||||
* [Python](port/PyAssimp/README.md)
|
||||
* [.NET](port/AssimpNET/Readme.md)
|
||||
* [Pascal](port/AssimpPascal/Readme.md)
|
||||
* [Javascript (Alpha)](https://github.com/makc/assimp2json)
|
||||
|
||||
#### Repository structure ####
|
||||
Open Asset Import Library is implemented in C++. The directory structure is:
|
||||
|
||||
/code Source code
|
||||
/contrib Third-party libraries
|
||||
/doc Documentation (doxysource and pre-compiled docs)
|
||||
/include Public header C and C++ header files
|
||||
/scripts Scripts used to generate the loading code for some formats
|
||||
/port Ports to other languages and scripts to maintain those.
|
||||
/test Unit- and regression tests, test suite of models
|
||||
/tools Tools (old assimp viewer, command line `assimp`)
|
||||
/samples A small number of samples to illustrate possible
|
||||
use cases for Assimp
|
||||
/workspaces Build environments for vc,xcode,... (deprecated,
|
||||
CMake has superseeded all legacy build options!)
|
||||
|
||||
|
||||
### Where to get help ###
|
||||
For more information, visit [our website](http://assimp.org/). Or check out the `./doc`- folder, which contains the official documentation in HTML format.
|
||||
(CHMs for Windows are included in some release packages and should be located right here in the root folder).
|
||||
|
||||
If the docs don't solve your problem, ask on [StackOverflow](http://stackoverflow.com/questions/tagged/assimp?sort=newest). If you think you found a bug, please open an issue on Github.
|
||||
|
||||
For development discussions, there is also a (very low-volume) mailing list, _assimp-discussions_
|
||||
[(subscribe here)]( https://lists.sourceforge.net/lists/listinfo/assimp-discussions)
|
||||
|
||||
Open Asset Import Library is a library to load various 3d file formats into a shared, in-memory format. It supports more than __40 file formats__ for import and a growing selection of file formats for export.
|
||||
|
||||
And we also have a Gitter-channel:Gitter [![Join the chat at https://gitter.im/assimp/assimp](https://badges.gitter.im/assimp/assimp.svg)](https://gitter.im/assimp/assimp?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)<br>
|
||||
|
||||
### Contributing ###
|
||||
Contributions to assimp are highly appreciated. The easiest way to get involved is to submit
|
||||
a pull request with your changes against the main repository's `master` branch.
|
||||
|
||||
### Donate ###
|
||||
If you like assimp, consider buying us a beer (or two):
|
||||
[Donate](http://sourceforge.net/donate/index.php?group_id=226462)
|
||||
|
||||
### License ###
|
||||
Our license is based on the modified, __3-clause BSD__-License.
|
||||
|
||||
An _informal_ summary is: do whatever you want, but include Assimp's license text with your product -
|
||||
and don't sue us if our code doesn't work. Note that, unlike LGPLed code, you may link statically to Assimp.
|
||||
For the legal details, see the `LICENSE` file.
|
||||
|
||||
### Why this name ###
|
||||
Sorry, we're germans :-), no english native speakers ...
|
||||
Open Asset Import Library (assimp)
|
||||
==================================
|
||||
|
||||
[![Linux Build Status](https://travis-ci.org/assimp/assimp.svg)](https://travis-ci.org/assimp/assimp)
|
||||
[![Windows Build Status](https://ci.appveyor.com/api/projects/status/tmo433wax6u6cjp4?svg=true)](https://ci.appveyor.com/project/kimkulling/assimp)
|
||||
<a href="https://scan.coverity.com/projects/5607">
|
||||
<img alt="Coverity Scan Build Status"
|
||||
src="https://scan.coverity.com/projects/5607/badge.svg"/>
|
||||
</a>
|
||||
<span class="badge-patreon"><a href="https://www.patreon.com/assimp" title="Donate to this project using Patreon"><img src="https://img.shields.io/badge/patreon-donate-yellow.svg" alt="Patreon donate button" /></a></span>
|
||||
[![Coverage Status](https://coveralls.io/repos/github/assimp/assimp/badge.svg?branch=master)](https://coveralls.io/github/assimp/assimp?branch=master)
|
||||
<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.
|
||||
|
||||
Additionally, assimp features various __mesh post processing tools__: normals and tangent space generation, triangulation, vertex cache locality optimization, removal of degenerate primitives and duplicate vertices, sorting by primitive type, merging of redundant materials and many more.
|
||||
|
||||
This is the development trunk containing the latest features and bugfixes. For productive use though, we recommend one of the stable releases available from [assimp.sf.net](http://assimp.sf.net) or from *nix package repositories.
|
||||
The current build status is:
|
||||
|
||||
Gitter chat: [![Join the chat at https://gitter.im/assimp/assimp](https://badges.gitter.im/assimp/assimp.svg)](https://gitter.im/assimp/assimp?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)<br>
|
||||
|
||||
And we also have an IRC-channel at freenode: #assetimporterlib . You can easily join us via: [KiwiIRC/freenote](https://kiwiirc.com/client/irc.freenode.net), choose your nickname and type
|
||||
> /join #assetimporterlib
|
||||
|
||||
<br>
|
||||
__[open3mod](https://github.com/acgessler/open3mod) is a powerful 3D model viewer based on Assimp's import and export abilities.__
|
||||
|
||||
Please check our Wiki as well: https://github.com/assimp/assimp/wiki
|
||||
|
||||
#### Supported file formats ####
|
||||
|
||||
A full list [is here](http://assimp.org/main_features_formats.html).
|
||||
__Importers__:
|
||||
|
||||
- 3DS
|
||||
- BLEND (Blender)
|
||||
- DAE/Collada
|
||||
- FBX
|
||||
- IFC-STEP
|
||||
- ASE
|
||||
- DXF
|
||||
- HMP
|
||||
- MD2
|
||||
- MD3
|
||||
- MD5
|
||||
- MDC
|
||||
- MDL
|
||||
- NFF
|
||||
- PLY
|
||||
- STL
|
||||
- X
|
||||
- OBJ
|
||||
- OpenGEX
|
||||
- SMD
|
||||
- LWO
|
||||
- LXO
|
||||
- LWS
|
||||
- TER
|
||||
- AC3D
|
||||
- MS3D
|
||||
- COB
|
||||
- Q3BSP
|
||||
- XGL
|
||||
- CSM
|
||||
- BVH
|
||||
- B3D
|
||||
- NDO
|
||||
- Ogre Binary
|
||||
- Ogre XML
|
||||
- Q3D
|
||||
- ASSBIN (Assimp custom format)
|
||||
- glTF (partial)
|
||||
- 3MF
|
||||
|
||||
Additionally, some formats are supported by dependency on non-free code or external SDKs (not built by default):
|
||||
|
||||
- C4D (https://github.com/acgessler/assimp-cinema4d)
|
||||
|
||||
__Exporters__:
|
||||
|
||||
- DAE (Collada)
|
||||
- STL
|
||||
- OBJ
|
||||
- PLY
|
||||
- X
|
||||
- 3DS
|
||||
- JSON (for WebGl, via https://github.com/acgessler/assimp2json)
|
||||
- ASSBIN
|
||||
- STEP
|
||||
- glTF (partial)
|
||||
|
||||
### Building ###
|
||||
Take a look into the `INSTALL` file. Our build system is CMake, if you used CMake before there is a good chance you know what to do.
|
||||
|
||||
### Ports ###
|
||||
* [Android](port/AndroidJNI/README.md)
|
||||
* [Python](port/PyAssimp/README.md)
|
||||
* [.NET](port/AssimpNET/Readme.md)
|
||||
* [Pascal](port/AssimpPascal/Readme.md)
|
||||
* [Javascript (Alpha)](https://github.com/makc/assimp2json)
|
||||
|
||||
#### Repository structure ####
|
||||
Open Asset Import Library is implemented in C++. The directory structure is:
|
||||
|
||||
/code Source code
|
||||
/contrib Third-party libraries
|
||||
/doc Documentation (doxysource and pre-compiled docs)
|
||||
/include Public header C and C++ header files
|
||||
/scripts Scripts used to generate the loading code for some formats
|
||||
/port Ports to other languages and scripts to maintain those.
|
||||
/test Unit- and regression tests, test suite of models
|
||||
/tools Tools (old assimp viewer, command line `assimp`)
|
||||
/samples A small number of samples to illustrate possible
|
||||
use cases for Assimp
|
||||
/workspaces Build environments for vc,xcode,... (deprecated,
|
||||
CMake has superseeded all legacy build options!)
|
||||
|
||||
|
||||
### Where to get help ###
|
||||
For more information, visit [our website](http://assimp.org/). Or check out the `./doc`- folder, which contains the official documentation in HTML format.
|
||||
(CHMs for Windows are included in some release packages and should be located right here in the root folder).
|
||||
|
||||
If the docs don't solve your problem, ask on [StackOverflow](http://stackoverflow.com/questions/tagged/assimp?sort=newest). If you think you found a bug, please open an issue on Github.
|
||||
|
||||
For development discussions, there is also a (very low-volume) mailing list, _assimp-discussions_
|
||||
[(subscribe here)]( https://lists.sourceforge.net/lists/listinfo/assimp-discussions)
|
||||
|
||||
Open Asset Import Library is a library to load various 3d file formats into a shared, in-memory format. It supports more than __40 file formats__ for import and a growing selection of file formats for export.
|
||||
|
||||
And we also have a Gitter-channel:Gitter [![Join the chat at https://gitter.im/assimp/assimp](https://badges.gitter.im/assimp/assimp.svg)](https://gitter.im/assimp/assimp?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)<br>
|
||||
|
||||
### Contributing ###
|
||||
Contributions to assimp are highly appreciated. The easiest way to get involved is to submit
|
||||
a pull request with your changes against the main repository's `master` branch.
|
||||
|
||||
### License ###
|
||||
Our license is based on the modified, __3-clause BSD__-License.
|
||||
|
||||
An _informal_ summary is: do whatever you want, but include Assimp's license text with your product -
|
||||
and don't sue us if our code doesn't work. Note that, unlike LGPLed code, you may link statically to Assimp.
|
||||
For the legal details, see the `LICENSE` file.
|
||||
|
||||
### Why this name ###
|
||||
Sorry, we're germans :-), no english native speakers ...
|
||||
|
|
|
@ -1,8 +1,43 @@
|
|||
# Open Asset Import Library (assimp)
|
||||
# ----------------------------------------------------------------------
|
||||
# Copyright (c) 2006-2017, assimp team
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use of this software in source and binary forms,
|
||||
# with or without modification, are permitted provided that the
|
||||
# following conditions are met:
|
||||
#
|
||||
# * Redistributions of source code must retain the above
|
||||
# copyright notice, this list of conditions and the
|
||||
# following disclaimer.
|
||||
#
|
||||
# * Redistributions in binary form must reproduce the above
|
||||
# copyright notice, this list of conditions and the
|
||||
# following disclaimer in the documentation and/or other
|
||||
# materials provided with the distribution.
|
||||
#
|
||||
# * Neither the name of the assimp team, nor the names of its
|
||||
# contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior
|
||||
# written permission of the assimp team.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#----------------------------------------------------------------------
|
||||
set( PACKAGE_VERSION "@ASSIMP_VERSION@" )
|
||||
if( "${PACKAGE_FIND_VERSION}" VERSION_EQUAL "@ASSIMP_VERSION@")
|
||||
set(PACKAGE_VERSION_EXACT 1)
|
||||
endif()
|
||||
if( "${PACKAGE_FIND_VERSION_MAJOR}.${PACKAGE_FIND_VERSION_MINOR}" EQUAL "@ASSIMP_SOVERSION@" )
|
||||
if( "${PACKAGE_FIND_VERSION_MAJOR}.${PACKAGE_FIND_VERSION_MINOR}" EQUAL "@ASSIMP_VERSION@" )
|
||||
set(PACKAGE_VERSION_COMPATIBLE 1)
|
||||
elseif( "${PACKAGE_FIND_VERSION_MAJOR}" EQUAL "@ASSIMP_VERSION_MAJOR@" )
|
||||
# for now backward compatible if minor version is less
|
||||
|
|
|
@ -0,0 +1,72 @@
|
|||
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
||||
# file Copyright.txt or https://cmake.org/licensing for details.
|
||||
|
||||
#.rst:
|
||||
# FindDevIL
|
||||
# ---------
|
||||
#
|
||||
#
|
||||
#
|
||||
# This module locates the developer's image library.
|
||||
# http://openil.sourceforge.net/
|
||||
#
|
||||
# This module sets:
|
||||
#
|
||||
# ::
|
||||
#
|
||||
# IL_LIBRARIES - the name of the IL library. These include the full path to
|
||||
# the core DevIL library. This one has to be linked into the
|
||||
# application.
|
||||
# ILU_LIBRARIES - the name of the ILU library. Again, the full path. This
|
||||
# library is for filters and effects, not actual loading. It
|
||||
# doesn't have to be linked if the functionality it provides
|
||||
# is not used.
|
||||
# ILUT_LIBRARIES - the name of the ILUT library. Full path. This part of the
|
||||
# library interfaces with OpenGL. It is not strictly needed
|
||||
# in applications.
|
||||
# IL_INCLUDE_DIR - where to find the il.h, ilu.h and ilut.h files.
|
||||
# IL_FOUND - this is set to TRUE if all the above variables were set.
|
||||
# This will be set to false if ILU or ILUT are not found,
|
||||
# even if they are not needed. In most systems, if one
|
||||
# library is found all the others are as well. That's the
|
||||
# way the DevIL developers release it.
|
||||
|
||||
# TODO: Add version support.
|
||||
# Tested under Linux and Windows (MSVC)
|
||||
|
||||
#include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
find_path(IL_INCLUDE_DIR il.h
|
||||
PATH_SUFFIXES include IL
|
||||
DOC "The path to the directory that contains il.h"
|
||||
)
|
||||
|
||||
#message("IL_INCLUDE_DIR is ${IL_INCLUDE_DIR}")
|
||||
|
||||
find_library(IL_LIBRARIES
|
||||
NAMES IL DEVIL
|
||||
PATH_SUFFIXES lib64 lib lib32
|
||||
DOC "The file that corresponds to the base il library."
|
||||
)
|
||||
|
||||
#message("IL_LIBRARIES is ${IL_LIBRARIES}")
|
||||
|
||||
find_library(ILUT_LIBRARIES
|
||||
NAMES ILUT
|
||||
PATH_SUFFIXES lib64 lib lib32
|
||||
DOC "The file that corresponds to the il (system?) utility library."
|
||||
)
|
||||
|
||||
#message("ILUT_LIBRARIES is ${ILUT_LIBRARIES}")
|
||||
|
||||
find_library(ILU_LIBRARIES
|
||||
NAMES ILU
|
||||
PATH_SUFFIXES lib64 lib lib32
|
||||
DOC "The file that corresponds to the il utility library."
|
||||
)
|
||||
|
||||
#message("ILU_LIBRARIES is ${ILU_LIBRARIES}")
|
||||
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(IL DEFAULT_MSG
|
||||
IL_LIBRARIES IL_INCLUDE_DIR)
|
|
@ -0,0 +1,17 @@
|
|||
# Find IrrXMl from irrlicht project
|
||||
#
|
||||
# Find LibIrrXML headers and library
|
||||
#
|
||||
# IRRXML_FOUND - IrrXML found
|
||||
# IRRXML_INCLUDE_DIR - Headers location
|
||||
# IRRXML_LIBRARY - IrrXML main library
|
||||
|
||||
find_path(IRRXML_INCLUDE_DIR irrXML.h
|
||||
PATH_SUFFIXES include/irrlicht include/irrxml)
|
||||
find_library(IRRXML_LIBRARY IrrXML)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(IrrXML REQUIRED_VARS IRRXML_INCLUDE_DIR IRRXML_LIBRARY)
|
||||
|
||||
|
||||
mark_as_advanced(IRRXML_INCLUDE_DIR IRRXML_LIBRARY)
|
|
@ -59,10 +59,13 @@ endmacro(clear_if_changed)
|
|||
|
||||
# Try to get some hints from pkg-config, if available
|
||||
macro(use_pkgconfig PREFIX PKGNAME)
|
||||
find_package(PkgConfig)
|
||||
if (PKG_CONFIG_FOUND)
|
||||
pkg_check_modules(${PREFIX} ${PKGNAME})
|
||||
endif ()
|
||||
# Android does not support PKG_CONFIG so we disable it
|
||||
IF ( NOT ANDROID )
|
||||
find_package(PkgConfig)
|
||||
if (PKG_CONFIG_FOUND)
|
||||
pkg_check_modules(${PREFIX} ${PKGNAME})
|
||||
endif ()
|
||||
ENDIF ( NOT ANDROID )
|
||||
endmacro (use_pkgconfig)
|
||||
|
||||
# Couple a set of release AND debug libraries (or frameworks)
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
# Once done, this will define
|
||||
#
|
||||
# ZLIB_FOUND - system has ZLIB
|
||||
# ZLIB_INCLUDE_DIRS - the ZLIB include directories
|
||||
# ZLIB_INCLUDE_DIRS - the ZLIB include directories
|
||||
# ZLIB_LIBRARIES - link these to use ZLIB
|
||||
|
||||
include(FindPkgMacros)
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
Open Asset Import Library (assimp)
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2016, assimp team
|
||||
Copyright (c) 2006-2017, assimp team
|
||||
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2016, assimp team
|
||||
Copyright (c) 2006-2017, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2016, assimp team
|
||||
Copyright (c) 2006-2017, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
@ -48,7 +49,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#include <memory>
|
||||
|
||||
#include "StreamWriter.h"
|
||||
#include "./../include/assimp/material.h"
|
||||
#include <assimp/material.h>
|
||||
|
||||
struct aiScene;
|
||||
struct aiNode;
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2016, assimp team
|
||||
Copyright (c) 2006-2017, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
@ -48,10 +49,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#include "SmoothingGroups.h"
|
||||
#include "StringUtils.h"
|
||||
#include "qnan.h"
|
||||
#include "./../include/assimp/material.h"
|
||||
#include "./../include/assimp/camera.h"
|
||||
#include "./../include/assimp/light.h"
|
||||
#include "./../include/assimp/anim.h"
|
||||
#include <assimp/material.h>
|
||||
#include <assimp/camera.h>
|
||||
#include <assimp/light.h>
|
||||
#include <assimp/anim.h>
|
||||
#include <stdio.h> //sprintf
|
||||
|
||||
namespace Assimp {
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
Open Asset Import Library (assimp)
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2016, assimp team
|
||||
Copyright (c) 2006-2017, assimp team
|
||||
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
@ -54,6 +55,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#include <assimp/IOSystem.hpp>
|
||||
#include <assimp/scene.h>
|
||||
#include <assimp/DefaultLogger.hpp>
|
||||
#include <assimp/importerdesc.h>
|
||||
#include "StringComparison.h"
|
||||
|
||||
using namespace Assimp;
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2016, assimp team
|
||||
Copyright (c) 2006-2017, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
|
|
@ -4,7 +4,8 @@
|
|||
Open Asset Import Library (assimp)
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2016, assimp team
|
||||
Copyright (c) 2006-2017, assimp team
|
||||
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
@ -60,6 +61,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#include <assimp/scene.h>
|
||||
#include <assimp/config.h>
|
||||
#include <assimp/IOSystem.hpp>
|
||||
#include <assimp/importerdesc.h>
|
||||
#include <memory>
|
||||
|
||||
using namespace Assimp;
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2016, assimp team
|
||||
Copyright (c) 2006-2017, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
Open Asset Import Library (assimp)
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2016, assimp team
|
||||
Copyright (c) 2006-2017, assimp team
|
||||
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
@ -51,11 +52,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#include "AMFImporter_Macro.hpp"
|
||||
|
||||
#include "fast_atof.h"
|
||||
#include "DefaultIOSystem.h"
|
||||
#include <assimp/DefaultIOSystem.h>
|
||||
|
||||
// Header files, stdlib.
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
namespace Assimp
|
||||
{
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
Open Asset Import Library (assimp)
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2016, assimp team
|
||||
Copyright (c) 2006-2017, assimp team
|
||||
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
@ -52,9 +53,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#include "AMFImporter_Node.hpp"
|
||||
|
||||
// Header files, Assimp.
|
||||
#include "assimp/DefaultLogger.hpp"
|
||||
#include "assimp/importerdesc.h"
|
||||
#include "assimp/ProgressHandler.hpp"
|
||||
#include <assimp/DefaultLogger.hpp>
|
||||
#include <assimp/importerdesc.h>
|
||||
#include "assimp/types.h"
|
||||
#include "BaseImporter.h"
|
||||
#include "irrXMLWrapper.h"
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
Open Asset Import Library (assimp)
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2016, assimp team
|
||||
Copyright (c) 2006-2017, assimp team
|
||||
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
Open Asset Import Library (assimp)
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2016, assimp team
|
||||
Copyright (c) 2006-2017, assimp team
|
||||
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
Open Asset Import Library (assimp)
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2016, assimp team
|
||||
Copyright (c) 2006-2017, assimp team
|
||||
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
Open Asset Import Library (assimp)
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2016, assimp team
|
||||
Copyright (c) 2006-2017, assimp team
|
||||
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
@ -59,18 +60,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
|
||||
/// \class CAMFImporter_NodeElement
|
||||
/// Base class for elements of nodes.
|
||||
class CAMFImporter_NodeElement
|
||||
{
|
||||
/***********************************************/
|
||||
/******************** Types ********************/
|
||||
/***********************************************/
|
||||
class CAMFImporter_NodeElement {
|
||||
|
||||
public:
|
||||
|
||||
/// \enum EType
|
||||
/// Define what data type contain node element.
|
||||
enum EType
|
||||
{
|
||||
enum EType {
|
||||
ENET_Color, ///< Color element: <color>.
|
||||
ENET_Constellation,///< Grouping element: <constellation>.
|
||||
ENET_Coordinates, ///< Coordinates element: <coordinates>.
|
||||
|
@ -91,52 +85,37 @@ public:
|
|||
ENET_Invalid ///< Element has invalid type and possible contain invalid data.
|
||||
};
|
||||
|
||||
/***********************************************/
|
||||
/****************** Constants ******************/
|
||||
/***********************************************/
|
||||
|
||||
public:
|
||||
|
||||
const EType Type;///< Type of element.
|
||||
|
||||
/***********************************************/
|
||||
/****************** Variables ******************/
|
||||
/***********************************************/
|
||||
|
||||
public:
|
||||
|
||||
std::string ID;///< ID of element.
|
||||
CAMFImporter_NodeElement* Parent;///< Parrent element. If nullptr then this node is root.
|
||||
CAMFImporter_NodeElement* Parent;///< Parent element. If nullptr then this node is root.
|
||||
std::list<CAMFImporter_NodeElement*> Child;///< Child elements.
|
||||
|
||||
/***********************************************/
|
||||
/****************** Functions ******************/
|
||||
/***********************************************/
|
||||
public: /// Destructor, virtual..
|
||||
virtual ~CAMFImporter_NodeElement() {
|
||||
// empty
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
/// \fn CAMFImporter_NodeElement(const CAMFImporter_NodeElement& pNodeElement)
|
||||
/// Disabled copy constructor.
|
||||
CAMFImporter_NodeElement(const CAMFImporter_NodeElement& pNodeElement);
|
||||
|
||||
/// \fn CAMFImporter_NodeElement& operator=(const CAMFImporter_NodeElement& pNodeElement)
|
||||
/// Disabled assign operator.
|
||||
CAMFImporter_NodeElement& operator=(const CAMFImporter_NodeElement& pNodeElement);
|
||||
|
||||
/// \fn CAMFImporter_NodeElement()
|
||||
/// Disabled default constructor.
|
||||
CAMFImporter_NodeElement();
|
||||
|
||||
protected:
|
||||
|
||||
/// \fn CAMFImporter_NodeElement(const EType pType, CAMFImporter_NodeElement* pParent)
|
||||
/// In constructor inheritor must set element type.
|
||||
/// \param [in] pType - element type.
|
||||
/// \param [in] pParent - parent element.
|
||||
CAMFImporter_NodeElement(const EType pType, CAMFImporter_NodeElement* pParent)
|
||||
: Type(pType), Parent(pParent)
|
||||
{}
|
||||
|
||||
: Type(pType)
|
||||
, ID()
|
||||
, Parent(pParent)
|
||||
, Child() {
|
||||
// empty
|
||||
}
|
||||
};// class IAMFImporter_NodeElement
|
||||
|
||||
/// \struct CAMFImporter_NodeElement_Constellation
|
||||
|
@ -399,25 +378,23 @@ struct CAMFImporter_NodeElement_Triangle : public CAMFImporter_NodeElement
|
|||
|
||||
};// struct CAMFImporter_NodeElement_Triangle
|
||||
|
||||
/// \struct CAMFImporter_NodeElement_Texture
|
||||
/// Structure that define texture node.
|
||||
struct CAMFImporter_NodeElement_Texture : public CAMFImporter_NodeElement
|
||||
{
|
||||
/****************** Variables ******************/
|
||||
|
||||
struct CAMFImporter_NodeElement_Texture : public CAMFImporter_NodeElement {
|
||||
size_t Width, Height, Depth;///< Size of the texture.
|
||||
std::vector<uint8_t> Data;///< Data of the texture.
|
||||
bool Tiled;
|
||||
|
||||
/****************** Functions ******************/
|
||||
|
||||
/// \fn CAMFImporter_NodeElement_Texture(CAMFImporter_NodeElement* pParent)
|
||||
/// Constructor.
|
||||
/// \param [in] pParent - pointer to parent node.
|
||||
CAMFImporter_NodeElement_Texture(CAMFImporter_NodeElement* pParent)
|
||||
: CAMFImporter_NodeElement(ENET_Texture, pParent)
|
||||
{}
|
||||
|
||||
: CAMFImporter_NodeElement(ENET_Texture, pParent)
|
||||
, Width( 0 )
|
||||
, Height( 0 )
|
||||
, Depth( 0 )
|
||||
, Data()
|
||||
, Tiled( false ){
|
||||
// empty
|
||||
}
|
||||
};// struct CAMFImporter_NodeElement_Texture
|
||||
|
||||
#endif // INCLUDED_AI_AMF_IMPORTER_NODE_H
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
Open Asset Import Library (assimp)
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2016, assimp team
|
||||
Copyright (c) 2006-2017, assimp team
|
||||
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
@ -54,7 +55,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#include "StringUtils.h"
|
||||
|
||||
// Header files, stdlib.
|
||||
#include <algorithm>
|
||||
#include <iterator>
|
||||
|
||||
namespace Assimp
|
||||
|
@ -62,7 +62,7 @@ namespace Assimp
|
|||
|
||||
aiColor4D AMFImporter::SPP_Material::GetColor(const float pX, const float pY, const float pZ) const
|
||||
{
|
||||
aiColor4D tcol;
|
||||
aiColor4D tcol;
|
||||
|
||||
// Check if stored data are supported.
|
||||
if(Composition.size() != 0)
|
||||
|
@ -93,8 +93,8 @@ aiColor4D tcol;
|
|||
void AMFImporter::PostprocessHelper_CreateMeshDataArray(const CAMFImporter_NodeElement_Mesh& pNodeElement, std::vector<aiVector3D>& pVertexCoordinateArray,
|
||||
std::vector<CAMFImporter_NodeElement_Color*>& pVertexColorArray) const
|
||||
{
|
||||
CAMFImporter_NodeElement_Vertices* vn = nullptr;
|
||||
size_t col_idx;
|
||||
CAMFImporter_NodeElement_Vertices* vn = nullptr;
|
||||
size_t col_idx;
|
||||
|
||||
// All data stored in "vertices", search for it.
|
||||
for(CAMFImporter_NodeElement* ne_child: pNodeElement.Child)
|
||||
|
@ -142,8 +142,8 @@ size_t col_idx;
|
|||
size_t AMFImporter::PostprocessHelper_GetTextureID_Or_Create(const std::string& pID_R, const std::string& pID_G, const std::string& pID_B,
|
||||
const std::string& pID_A)
|
||||
{
|
||||
size_t TextureConverted_Index;
|
||||
std::string TextureConverted_ID;
|
||||
size_t TextureConverted_Index;
|
||||
std::string TextureConverted_ID;
|
||||
|
||||
// check input data
|
||||
if(pID_R.empty() && pID_G.empty() && pID_B.empty() && pID_A.empty())
|
||||
|
@ -261,21 +261,20 @@ std::string TextureConverted_ID;
|
|||
size_t off_b = 0;
|
||||
|
||||
// Calculate size of the target array and rule how data will be copied.
|
||||
if ( nullptr != src_texture ) {
|
||||
if(!pID_R.empty()) {
|
||||
tex_size += src_texture[0]->Data.size(); step++, off_g++, off_b++;
|
||||
}
|
||||
if(!pID_G.empty()) {
|
||||
tex_size += src_texture[1]->Data.size(); step++, off_b++;
|
||||
}
|
||||
if(!pID_B.empty()) {
|
||||
tex_size += src_texture[2]->Data.size(); step++;
|
||||
}
|
||||
if(!pID_A.empty()) {
|
||||
tex_size += src_texture[3]->Data.size(); step++;
|
||||
}
|
||||
if(!pID_R.empty() && nullptr != src_texture[ 0 ] ) {
|
||||
tex_size += src_texture[0]->Data.size(); step++, off_g++, off_b++;
|
||||
}
|
||||
// Create target array.
|
||||
if(!pID_G.empty() && nullptr != src_texture[ 1 ] ) {
|
||||
tex_size += src_texture[1]->Data.size(); step++, off_b++;
|
||||
}
|
||||
if(!pID_B.empty() && nullptr != src_texture[ 2 ] ) {
|
||||
tex_size += src_texture[2]->Data.size(); step++;
|
||||
}
|
||||
if(!pID_A.empty() && nullptr != src_texture[ 3 ] ) {
|
||||
tex_size += src_texture[3]->Data.size(); step++;
|
||||
}
|
||||
|
||||
// Create target array.
|
||||
converted_texture.Data = new uint8_t[tex_size];
|
||||
// And copy data
|
||||
auto CopyTextureData = [&](const std::string& pID, const size_t pOffset, const size_t pStep, const uint8_t pSrcTexNum) -> void
|
||||
|
@ -302,19 +301,19 @@ std::string TextureConverted_ID;
|
|||
|
||||
void AMFImporter::PostprocessHelper_SplitFacesByTextureID(std::list<SComplexFace>& pInputList, std::list<std::list<SComplexFace> >& pOutputList_Separated)
|
||||
{
|
||||
auto texmap_is_equal = [](const CAMFImporter_NodeElement_TexMap* pTexMap1, const CAMFImporter_NodeElement_TexMap* pTexMap2) -> bool
|
||||
{
|
||||
if((pTexMap1 == nullptr) && (pTexMap2 == nullptr)) return true;
|
||||
if(pTexMap1 == nullptr) return false;
|
||||
if(pTexMap2 == nullptr) return false;
|
||||
auto texmap_is_equal = [](const CAMFImporter_NodeElement_TexMap* pTexMap1, const CAMFImporter_NodeElement_TexMap* pTexMap2) -> bool
|
||||
{
|
||||
if((pTexMap1 == nullptr) && (pTexMap2 == nullptr)) return true;
|
||||
if(pTexMap1 == nullptr) return false;
|
||||
if(pTexMap2 == nullptr) return false;
|
||||
|
||||
if(pTexMap1->TextureID_R != pTexMap2->TextureID_R) return false;
|
||||
if(pTexMap1->TextureID_G != pTexMap2->TextureID_G) return false;
|
||||
if(pTexMap1->TextureID_B != pTexMap2->TextureID_B) return false;
|
||||
if(pTexMap1->TextureID_A != pTexMap2->TextureID_A) return false;
|
||||
if(pTexMap1->TextureID_R != pTexMap2->TextureID_R) return false;
|
||||
if(pTexMap1->TextureID_G != pTexMap2->TextureID_G) return false;
|
||||
if(pTexMap1->TextureID_B != pTexMap2->TextureID_B) return false;
|
||||
if(pTexMap1->TextureID_A != pTexMap2->TextureID_A) return false;
|
||||
|
||||
return true;
|
||||
};
|
||||
return true;
|
||||
};
|
||||
|
||||
pOutputList_Separated.clear();
|
||||
if(pInputList.size() == 0) return;
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
Open Asset Import Library (assimp)
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2016, assimp team
|
||||
Copyright (c) 2006-2017, assimp team
|
||||
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
@ -54,6 +55,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#include <assimp/IOSystem.hpp>
|
||||
#include <assimp/DefaultLogger.hpp>
|
||||
#include <assimp/scene.h>
|
||||
#include <assimp/importerdesc.h>
|
||||
|
||||
#include <memory>
|
||||
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2016, assimp team
|
||||
Copyright (c) 2006-2017, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
@ -46,9 +47,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
|
||||
#include "BaseImporter.h"
|
||||
#include <assimp/types.h>
|
||||
#include "ASEParser.h"
|
||||
|
||||
struct aiNode;
|
||||
#include "ASEParser.h"
|
||||
|
||||
namespace Assimp {
|
||||
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
Open Asset Import Library (assimp)
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2016, assimp team
|
||||
Copyright (c) 2006-2017, assimp team
|
||||
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
@ -49,7 +50,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
// internal headers
|
||||
#include "TextureTransform.h"
|
||||
#include "ASELoader.h"
|
||||
#include "MaterialSystem.h"
|
||||
#include "fast_atof.h"
|
||||
#include <assimp/DefaultLogger.hpp>
|
||||
|
||||
|
@ -1858,7 +1858,7 @@ void Parser::ParseLV3MeshCFaceListBlock(unsigned int iNumFaces, ASE::Mesh& mesh)
|
|||
++filePtr;
|
||||
|
||||
// Face entry
|
||||
if (TokenMatch(filePtr,"MESH_CFACE" ,11))
|
||||
if (TokenMatch(filePtr,"MESH_CFACE" ,10))
|
||||
{
|
||||
unsigned int aiValues[3];
|
||||
unsigned int iIndex = 0;
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2016, assimp team
|
||||
Copyright (c) 2006-2017, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2016, assimp team
|
||||
Copyright (c) 2006-2017, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2016, assimp team
|
||||
Copyright (c) 2006-2017, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
Open Asset Import Library (assimp)
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2016, assimp team
|
||||
Copyright (c) 2006-2017, assimp team
|
||||
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
@ -54,6 +55,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#include <assimp/mesh.h>
|
||||
#include <assimp/anim.h>
|
||||
#include <assimp/scene.h>
|
||||
#include <assimp/importerdesc.h>
|
||||
|
||||
#ifdef ASSIMP_BUILD_NO_OWN_ZLIB
|
||||
# include <zlib.h>
|
||||
|
@ -196,7 +198,7 @@ template <typename T> void ReadBounds( IOStream * stream, T* /*p*/, unsigned int
|
|||
stream->Seek( sizeof(T) * n, aiOrigin_CUR );
|
||||
}
|
||||
|
||||
void AssbinImporter::ReadBinaryNode( IOStream * stream, aiNode** node )
|
||||
void AssbinImporter::ReadBinaryNode( IOStream * stream, aiNode** node, aiNode* parent )
|
||||
{
|
||||
uint32_t chunkID = Read<uint32_t>(stream);
|
||||
ai_assert(chunkID == ASSBIN_CHUNK_AINODE);
|
||||
|
@ -208,6 +210,10 @@ void AssbinImporter::ReadBinaryNode( IOStream * stream, aiNode** node )
|
|||
(*node)->mTransformation = Read<aiMatrix4x4>(stream);
|
||||
(*node)->mNumChildren = Read<unsigned int>(stream);
|
||||
(*node)->mNumMeshes = Read<unsigned int>(stream);
|
||||
if(parent)
|
||||
{
|
||||
(*node)->mParent = parent;
|
||||
}
|
||||
|
||||
if ((*node)->mNumMeshes)
|
||||
{
|
||||
|
@ -221,7 +227,7 @@ void AssbinImporter::ReadBinaryNode( IOStream * stream, aiNode** node )
|
|||
{
|
||||
(*node)->mChildren = new aiNode*[(*node)->mNumChildren];
|
||||
for (unsigned int i = 0; i < (*node)->mNumChildren; ++i) {
|
||||
ReadBinaryNode( stream, &(*node)->mChildren[i] );
|
||||
ReadBinaryNode( stream, &(*node)->mChildren[i], *node );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -569,7 +575,7 @@ void AssbinImporter::ReadBinaryScene( IOStream * stream, aiScene* scene )
|
|||
|
||||
// Read node graph
|
||||
scene->mRootNode = new aiNode[1];
|
||||
ReadBinaryNode( stream, &scene->mRootNode );
|
||||
ReadBinaryNode( stream, &scene->mRootNode, (aiNode*)NULL );
|
||||
|
||||
// Read all meshes
|
||||
if (scene->mNumMeshes)
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2016, assimp team
|
||||
Copyright (c) 2006-2017, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
@ -46,7 +47,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#define AI_ASSBINIMPORTER_H_INC
|
||||
|
||||
#include "BaseImporter.h"
|
||||
#include <assimp/types.h>
|
||||
|
||||
struct aiMesh;
|
||||
struct aiNode;
|
||||
|
@ -86,7 +86,7 @@ public:
|
|||
IOSystem* pIOHandler
|
||||
);
|
||||
void ReadBinaryScene( IOStream * stream, aiScene* pScene );
|
||||
void ReadBinaryNode( IOStream * stream, aiNode** mRootNode );
|
||||
void ReadBinaryNode( IOStream * stream, aiNode** mRootNode, aiNode* parent );
|
||||
void ReadBinaryMesh( IOStream * stream, aiMesh* mesh );
|
||||
void ReadBinaryBone( IOStream * stream, aiBone* bone );
|
||||
void ReadBinaryMaterial(IOStream * stream, aiMaterial* mat);
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
Open Asset Import Library (assimp)
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2016, assimp team
|
||||
Copyright (c) 2006-2017, assimp team
|
||||
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
@ -65,8 +66,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
// ------------------------------------------------------------------------------------------------
|
||||
using namespace Assimp;
|
||||
|
||||
namespace Assimp
|
||||
{
|
||||
namespace Assimp {
|
||||
// underlying structure for aiPropertyStore
|
||||
typedef BatchLoader::PropertyMap PropertyMap;
|
||||
|
||||
|
@ -109,12 +109,11 @@ static std::mutex gLogStreamMutex;
|
|||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
// Custom LogStream implementation for the C-API
|
||||
class LogToCallbackRedirector : public LogStream
|
||||
{
|
||||
class LogToCallbackRedirector : public LogStream {
|
||||
public:
|
||||
explicit LogToCallbackRedirector(const aiLogStream& s)
|
||||
: stream (s) {
|
||||
ai_assert(NULL != s.callback);
|
||||
: stream (s) {
|
||||
ai_assert(NULL != s.callback);
|
||||
}
|
||||
|
||||
~LogToCallbackRedirector() {
|
||||
|
@ -145,8 +144,7 @@ private:
|
|||
};
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
void ReportSceneNotFoundError()
|
||||
{
|
||||
void ReportSceneNotFoundError() {
|
||||
DefaultLogger::get()->error("Unable to find the Assimp::Importer for this aiScene. "
|
||||
"The C-API does not accept scenes produced by the C++ API and vice versa");
|
||||
|
||||
|
@ -155,22 +153,18 @@ void ReportSceneNotFoundError()
|
|||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
// Reads the given file and returns its content.
|
||||
const aiScene* aiImportFile( const char* pFile, unsigned int pFlags)
|
||||
{
|
||||
const aiScene* aiImportFile( const char* pFile, unsigned int pFlags) {
|
||||
return aiImportFileEx(pFile,pFlags,NULL);
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
const aiScene* aiImportFileEx( const char* pFile, unsigned int pFlags, aiFileIO* pFS)
|
||||
{
|
||||
const aiScene* aiImportFileEx( const char* pFile, unsigned int pFlags, aiFileIO* pFS) {
|
||||
return aiImportFileExWithProperties(pFile, pFlags, pFS, NULL);
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
const aiScene* aiImportFileExWithProperties( const char* pFile, unsigned int pFlags,
|
||||
aiFileIO* pFS,
|
||||
const aiPropertyStore* props)
|
||||
{
|
||||
const aiScene* aiImportFileExWithProperties( const char* pFile, unsigned int pFlags,
|
||||
aiFileIO* pFS, const aiPropertyStore* props) {
|
||||
ai_assert(NULL != pFile);
|
||||
|
||||
const aiScene* scene = NULL;
|
||||
|
@ -189,7 +183,7 @@ const aiScene* aiImportFileExWithProperties( const char* pFile, unsigned int pFl
|
|||
pimpl->mMatrixProperties = pp->matrices;
|
||||
}
|
||||
// setup a custom IO system if necessary
|
||||
if (pFS) {
|
||||
if (pFS) {
|
||||
imp->SetIOHandler( new CIOSystemWrapper (pFS) );
|
||||
}
|
||||
|
||||
|
@ -200,8 +194,7 @@ const aiScene* aiImportFileExWithProperties( const char* pFile, unsigned int pFl
|
|||
if( scene) {
|
||||
ScenePrivateData* priv = const_cast<ScenePrivateData*>( ScenePriv(scene) );
|
||||
priv->mOrigImporter = imp;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
// if failed, extract error code and destroy the import
|
||||
gLastErrorString = imp->GetErrorString();
|
||||
delete imp;
|
||||
|
@ -209,6 +202,7 @@ const aiScene* aiImportFileExWithProperties( const char* pFile, unsigned int pFl
|
|||
|
||||
// return imported data. If the import failed the pointer is NULL anyways
|
||||
ASSIMP_END_EXCEPTION_REGION(const aiScene*);
|
||||
|
||||
return scene;
|
||||
}
|
||||
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
Open Asset Import Library (assimp)
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2016, assimp team
|
||||
Copyright (c) 2006-2017, assimp team
|
||||
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2016, assimp team
|
||||
Copyright (c) 2006-2017, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
@ -41,7 +42,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
* ASSXML exporter main code
|
||||
*/
|
||||
#include <stdarg.h>
|
||||
#include "./../include/assimp/version.h"
|
||||
#include <assimp/version.h>
|
||||
#include "ProcessHelper.h"
|
||||
#include <assimp/IOStream.hpp>
|
||||
#include <assimp/IOSystem.hpp>
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2016, assimp team
|
||||
Copyright (c) 2006-2017, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
Open Asset Import Library (assimp)
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2016, assimp team
|
||||
Copyright (c) 2006-2017, assimp team
|
||||
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
@ -56,7 +57,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#include <assimp/anim.h>
|
||||
#include <assimp/scene.h>
|
||||
#include <assimp/DefaultLogger.hpp>
|
||||
|
||||
#include <assimp/importerdesc.h>
|
||||
|
||||
using namespace Assimp;
|
||||
using namespace std;
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2016, assimp team
|
||||
Copyright (c) 2006-2017, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
@ -48,7 +49,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#include <assimp/material.h>
|
||||
#include "BaseImporter.h"
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
struct aiNodeAnim;
|
||||
|
|
|
@ -4,7 +4,8 @@
|
|||
Open Asset Import Library (assimp)
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2016, assimp team
|
||||
Copyright (c) 2006-2017, assimp team
|
||||
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
@ -51,6 +52,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#include "TinyFormatter.h"
|
||||
#include <assimp/IOSystem.hpp>
|
||||
#include <assimp/scene.h>
|
||||
#include <assimp/importerdesc.h>
|
||||
|
||||
using namespace Assimp;
|
||||
using namespace Assimp::Formatter;
|
||||
|
|
|
@ -4,7 +4,8 @@
|
|||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2016, assimp team
|
||||
Copyright (c) 2006-2017, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
Open Asset Import Library (assimp)
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2016, assimp team
|
||||
Copyright (c) 2006-2017, assimp team
|
||||
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
@ -50,6 +51,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#include <assimp/scene.h>
|
||||
#include <assimp/Importer.hpp>
|
||||
#include <assimp/postprocess.h>
|
||||
#include <assimp/importerdesc.h>
|
||||
#include <ios>
|
||||
#include <list>
|
||||
#include <memory>
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2016, assimp team
|
||||
Copyright (c) 2006-2017, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
@ -44,14 +45,13 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
|
||||
#include "Exceptional.h"
|
||||
|
||||
#include <string>
|
||||
#include <map>
|
||||
#include <vector>
|
||||
#include <set>
|
||||
#include <assimp/types.h>
|
||||
#include <assimp/ProgressHandler.hpp>
|
||||
|
||||
struct aiScene;
|
||||
struct aiImporterDesc;
|
||||
|
||||
namespace Assimp {
|
||||
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
Open Asset Import Library (assimp)
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2016, assimp team
|
||||
Copyright (c) 2006-2017, assimp team
|
||||
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2016, assimp team
|
||||
Copyright (c) 2006-2017, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
@ -43,8 +44,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#define INCLUDED_AI_BASEPROCESS_H
|
||||
|
||||
#include <map>
|
||||
|
||||
#include <assimp/types.h>
|
||||
#include "GenericProperty.h"
|
||||
|
||||
struct aiScene;
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
Open Asset Import Library (assimp)
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2016, assimp team
|
||||
Copyright (c) 2006-2017, assimp team
|
||||
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
|
129
code/Bitmap.h
129
code/Bitmap.h
|
@ -3,7 +3,8 @@
|
|||
Open Asset Import Library (assimp)
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2016, assimp team
|
||||
Copyright (c) 2006-2017, assimp team
|
||||
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
@ -50,93 +51,71 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
|
||||
#include <stdint.h>
|
||||
#include <cstddef>
|
||||
|
||||
struct aiTexture;
|
||||
|
||||
namespace Assimp {
|
||||
|
||||
class IOStream;
|
||||
|
||||
class Bitmap {
|
||||
protected:
|
||||
|
||||
protected:
|
||||
struct Header {
|
||||
uint16_t type;
|
||||
uint32_t size;
|
||||
uint16_t reserved1;
|
||||
uint16_t reserved2;
|
||||
uint32_t offset;
|
||||
|
||||
struct Header {
|
||||
// We define the struct size because sizeof(Header) might return a wrong result because of structure padding.
|
||||
// Moreover, we must use this ugly and error prone syntax because Visual Studio neither support constexpr or sizeof(name_of_field).
|
||||
static const std::size_t header_size =
|
||||
sizeof(uint16_t) + // type
|
||||
sizeof(uint32_t) + // size
|
||||
sizeof(uint16_t) + // reserved1
|
||||
sizeof(uint16_t) + // reserved2
|
||||
sizeof(uint32_t); // offset
|
||||
};
|
||||
|
||||
uint16_t type;
|
||||
struct DIB {
|
||||
uint32_t size;
|
||||
int32_t width;
|
||||
int32_t height;
|
||||
uint16_t planes;
|
||||
uint16_t bits_per_pixel;
|
||||
uint32_t compression;
|
||||
uint32_t image_size;
|
||||
int32_t x_resolution;
|
||||
int32_t y_resolution;
|
||||
uint32_t nb_colors;
|
||||
uint32_t nb_important_colors;
|
||||
|
||||
uint32_t size;
|
||||
// We define the struct size because sizeof(DIB) might return a wrong result because of structure padding.
|
||||
// Moreover, we must use this ugly and error prone syntax because Visual Studio neither support constexpr or sizeof(name_of_field).
|
||||
static const std::size_t dib_size =
|
||||
sizeof(uint32_t) + // size
|
||||
sizeof(int32_t) + // width
|
||||
sizeof(int32_t) + // height
|
||||
sizeof(uint16_t) + // planes
|
||||
sizeof(uint16_t) + // bits_per_pixel
|
||||
sizeof(uint32_t) + // compression
|
||||
sizeof(uint32_t) + // image_size
|
||||
sizeof(int32_t) + // x_resolution
|
||||
sizeof(int32_t) + // y_resolution
|
||||
sizeof(uint32_t) + // nb_colors
|
||||
sizeof(uint32_t); // nb_important_colors
|
||||
};
|
||||
|
||||
uint16_t reserved1;
|
||||
static const std::size_t mBytesPerPixel = 4;
|
||||
|
||||
uint16_t reserved2;
|
||||
|
||||
uint32_t offset;
|
||||
|
||||
// We define the struct size because sizeof(Header) might return a wrong result because of structure padding.
|
||||
// Moreover, we must use this ugly and error prone syntax because Visual Studio neither support constexpr or sizeof(name_of_field).
|
||||
static const std::size_t header_size =
|
||||
sizeof(uint16_t) + // type
|
||||
sizeof(uint32_t) + // size
|
||||
sizeof(uint16_t) + // reserved1
|
||||
sizeof(uint16_t) + // reserved2
|
||||
sizeof(uint32_t); // offset
|
||||
|
||||
};
|
||||
|
||||
struct DIB {
|
||||
|
||||
uint32_t size;
|
||||
|
||||
int32_t width;
|
||||
|
||||
int32_t height;
|
||||
|
||||
uint16_t planes;
|
||||
|
||||
uint16_t bits_per_pixel;
|
||||
|
||||
uint32_t compression;
|
||||
|
||||
uint32_t image_size;
|
||||
|
||||
int32_t x_resolution;
|
||||
|
||||
int32_t y_resolution;
|
||||
|
||||
uint32_t nb_colors;
|
||||
|
||||
uint32_t nb_important_colors;
|
||||
|
||||
// We define the struct size because sizeof(DIB) might return a wrong result because of structure padding.
|
||||
// Moreover, we must use this ugly and error prone syntax because Visual Studio neither support constexpr or sizeof(name_of_field).
|
||||
static const std::size_t dib_size =
|
||||
sizeof(uint32_t) + // size
|
||||
sizeof(int32_t) + // width
|
||||
sizeof(int32_t) + // height
|
||||
sizeof(uint16_t) + // planes
|
||||
sizeof(uint16_t) + // bits_per_pixel
|
||||
sizeof(uint32_t) + // compression
|
||||
sizeof(uint32_t) + // image_size
|
||||
sizeof(int32_t) + // x_resolution
|
||||
sizeof(int32_t) + // y_resolution
|
||||
sizeof(uint32_t) + // nb_colors
|
||||
sizeof(uint32_t); // nb_important_colors
|
||||
|
||||
};
|
||||
|
||||
static const std::size_t mBytesPerPixel = 4;
|
||||
|
||||
public:
|
||||
|
||||
static void Save(aiTexture* texture, IOStream* file);
|
||||
|
||||
protected:
|
||||
|
||||
static void WriteHeader(Header& header, IOStream* file);
|
||||
|
||||
static void WriteDIB(DIB& dib, IOStream* file);
|
||||
|
||||
static void WriteData(aiTexture* texture, IOStream* file);
|
||||
public:
|
||||
static void Save(aiTexture* texture, IOStream* file);
|
||||
|
||||
protected:
|
||||
static void WriteHeader(Header& header, IOStream* file);
|
||||
static void WriteDIB(DIB& dib, IOStream* file);
|
||||
static void WriteData(aiTexture* texture, IOStream* file);
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2016, assimp team
|
||||
Copyright (c) 2006-2017, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
@ -48,6 +49,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#include "BlenderDNA.h"
|
||||
#include "StreamReader.h"
|
||||
#include "fast_atof.h"
|
||||
#include "TinyFormatter.h"
|
||||
|
||||
using namespace Assimp;
|
||||
using namespace Assimp::Blender;
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2016, assimp team
|
||||
Copyright (c) 2006-2017, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
@ -46,12 +47,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#define INCLUDED_AI_BLEND_DNA_H
|
||||
|
||||
#include "BaseImporter.h"
|
||||
#include "TinyFormatter.h"
|
||||
#include "StreamReader.h"
|
||||
#include <assimp/DefaultLogger.hpp>
|
||||
#include <stdint.h>
|
||||
#include <memory>
|
||||
|
||||
#include <map>
|
||||
|
||||
// enable verbose log output. really verbose, so be careful.
|
||||
#ifdef ASSIMP_BUILD_DEBUG
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2016, assimp team
|
||||
Copyright (c) 2006-2017, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
@ -46,9 +47,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#define INCLUDED_AI_BLEND_DNA_INL
|
||||
|
||||
#include <memory>
|
||||
#include "TinyFormatter.h"
|
||||
|
||||
namespace Assimp {
|
||||
namespace Blender {
|
||||
namespace Blender {
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
const Field& Structure :: operator [] (const std::string& ss) const
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2016, assimp team
|
||||
Copyright (c) 2006-2017, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
@ -48,9 +49,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#include "BlenderLoader.h"
|
||||
#include "BlenderDNA.h"
|
||||
#include "BlenderScene.h"
|
||||
#include "BlenderSceneGen.h"
|
||||
#include <deque>
|
||||
#include "./../include/assimp/material.h"
|
||||
#include <assimp/material.h>
|
||||
|
||||
struct aiTexture;
|
||||
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2016, assimp team
|
||||
Copyright (c) 2006-2017, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
@ -54,12 +55,13 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#include "BlenderBMesh.h"
|
||||
#include "StringUtils.h"
|
||||
#include <assimp/scene.h>
|
||||
#include "StringComparison.h"
|
||||
#include <assimp/importerdesc.h>
|
||||
|
||||
#include "StringComparison.h"
|
||||
#include "StreamReader.h"
|
||||
#include "MemoryIOWrapper.h"
|
||||
|
||||
#include <cctype>
|
||||
#include <cstdint>
|
||||
|
||||
|
||||
// zlib is needed for compressed blend files
|
||||
|
@ -108,6 +110,7 @@ BlenderImporter::~BlenderImporter()
|
|||
}
|
||||
|
||||
static const char* Tokens[] = { "BLENDER" };
|
||||
static const char* TokensForSearch[] = { "blender" };
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
// Returns whether the class can handle the format of the given file.
|
||||
|
@ -120,7 +123,7 @@ bool BlenderImporter::CanRead( const std::string& pFile, IOSystem* pIOHandler, b
|
|||
|
||||
else if ((!extension.length() || checkSig) && pIOHandler) {
|
||||
// note: this won't catch compressed files
|
||||
return SearchFileHeaderForToken(pIOHandler,pFile, Tokens,1);
|
||||
return SearchFileHeaderForToken(pIOHandler,pFile, TokensForSearch,1);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
@ -165,6 +168,7 @@ void BlenderImporter::InternReadFile( const std::string& pFile,
|
|||
free_it free_it_really(dest);
|
||||
#endif
|
||||
|
||||
|
||||
FileDatabase file;
|
||||
std::shared_ptr<IOStream> stream(pIOHandler->Open(pFile,"rb"));
|
||||
if (!stream) {
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2016, assimp team
|
||||
Copyright (c) 2006-2017, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2016, assimp team
|
||||
Copyright (c) 2006-2017, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2016, assimp team
|
||||
Copyright (c) 2006-2017, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
|
|
@ -44,9 +44,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
|
||||
#ifndef ASSIMP_BUILD_NO_BLEND_IMPORTER
|
||||
|
||||
#include "BlenderDNA.h"
|
||||
#include "BlenderScene.h"
|
||||
#include "BlenderSceneGen.h"
|
||||
#include "BlenderDNA.h"
|
||||
|
||||
using namespace Assimp;
|
||||
using namespace Assimp::Blender;
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2016, assimp team
|
||||
Copyright (c) 2006-2017, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
@ -638,6 +639,7 @@ struct Base : ElemBase {
|
|||
|
||||
Base()
|
||||
: ElemBase()
|
||||
, prev( nullptr )
|
||||
, next()
|
||||
, object() {
|
||||
// empty
|
||||
|
@ -784,10 +786,12 @@ struct Tex : ElemBase {
|
|||
//char use_nodes;
|
||||
|
||||
Tex()
|
||||
: ElemBase() {
|
||||
: ElemBase()
|
||||
, imaflag( ImageFlags_INTERPOL )
|
||||
, type( Type_CLOUDS )
|
||||
, ima() {
|
||||
// empty
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
// -------------------------------------------------------------------------------
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2016, assimp team
|
||||
Copyright (c) 2006-2017, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2016, assimp team
|
||||
Copyright (c) 2006-2017, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
Open Asset Import Library (assimp)
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2016, assimp team
|
||||
Copyright (c) 2006-2017, assimp team
|
||||
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
@ -45,10 +46,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#ifndef AI_BLOBIOSYSTEM_H_INCLUDED
|
||||
#define AI_BLOBIOSYSTEM_H_INCLUDED
|
||||
|
||||
#include "./../include/assimp/IOStream.hpp"
|
||||
#include "./../include/assimp/cexport.h"
|
||||
#include "./../include/assimp/IOSystem.hpp"
|
||||
#include "./../include/assimp/DefaultLogger.hpp"
|
||||
#include <assimp/IOStream.hpp>
|
||||
#include <assimp/cexport.h>
|
||||
#include <assimp/IOSystem.hpp>
|
||||
#include <assimp/DefaultLogger.hpp>
|
||||
#include <stdint.h>
|
||||
#include <set>
|
||||
#include <vector>
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2016, assimp team
|
||||
Copyright (c) 2006-2017, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
Open Asset Import Library (assimp)
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2016, assimp team
|
||||
Copyright (c) 2006-2017, assimp team
|
||||
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
Open Asset Import Library (assimp)
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2016, assimp team
|
||||
Copyright (c) 2006-2017, assimp team
|
||||
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
# Open Asset Import Library (assimp)
|
||||
# ----------------------------------------------------------------------
|
||||
#
|
||||
# Copyright (c) 2006-2016, assimp team
|
||||
# Copyright (c) 2006-2017, assimp team
|
||||
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use of this software in source and binary forms,
|
||||
|
@ -58,7 +59,7 @@ SET( PUBLIC_HEADERS
|
|||
${HEADER_PATH}/camera.h
|
||||
${HEADER_PATH}/color4.h
|
||||
${HEADER_PATH}/color4.inl
|
||||
${HEADER_PATH}/config.h
|
||||
${CMAKE_CURRENT_BINARY_DIR}/../include/assimp/config.h
|
||||
${HEADER_PATH}/defs.h
|
||||
${HEADER_PATH}/cfileio.h
|
||||
${HEADER_PATH}/light.h
|
||||
|
@ -93,6 +94,8 @@ SET( PUBLIC_HEADERS
|
|||
${HEADER_PATH}/NullLogger.hpp
|
||||
${HEADER_PATH}/cexport.h
|
||||
${HEADER_PATH}/Exporter.hpp
|
||||
${HEADER_PATH}/DefaultIOStream.h
|
||||
${HEADER_PATH}/DefaultIOSystem.h
|
||||
)
|
||||
|
||||
SET( Core_SRCS
|
||||
|
@ -125,9 +128,7 @@ SET( Common_SRCS
|
|||
ByteSwapper.h
|
||||
DefaultProgressHandler.h
|
||||
DefaultIOStream.cpp
|
||||
DefaultIOStream.h
|
||||
DefaultIOSystem.cpp
|
||||
DefaultIOSystem.h
|
||||
CInterfaceIOWrapper.cpp
|
||||
CInterfaceIOWrapper.h
|
||||
Hash.h
|
||||
|
@ -187,10 +188,16 @@ IF ( ASSIMP_BUILD_NONFREE_C4D_IMPORTER )
|
|||
SOURCE_GROUP( C4D FILES ${C4D_SRCS})
|
||||
ENDIF ( ASSIMP_BUILD_NONFREE_C4D_IMPORTER )
|
||||
|
||||
# if this variable is set to TRUE, the user can manually disable importers by setting
|
||||
# ASSIMP_BUILD_XXX_IMPORTER to FALSE for each importer
|
||||
# if this variable is set to FALSE, the user can manually enable importers by setting
|
||||
# ASSIMP_BUILD_XXX_IMPORTER to TRUE for each importer
|
||||
OPTION(ASSIMP_BUILD_ALL_IMPORTERS_BY_DEFAULT "default value of all ASSIMP_BUILD_XXX_IMPORTER value" TRUE)
|
||||
|
||||
# macro to add the CMake Option ADD_ASSIMP_IMPORTER_<name> which enables compile of loader
|
||||
# this way selective loaders can be compiled (reduces filesize + compile time)
|
||||
MACRO(ADD_ASSIMP_IMPORTER name)
|
||||
OPTION(ASSIMP_BUILD_${name}_IMPORTER "build the ${name} importer" TRUE)
|
||||
OPTION(ASSIMP_BUILD_${name}_IMPORTER "build the ${name} importer" ${ASSIMP_BUILD_ALL_IMPORTERS_BY_DEFAULT})
|
||||
IF(ASSIMP_BUILD_${name}_IMPORTER)
|
||||
LIST(APPEND ASSIMP_LOADER_SRCS ${ARGN})
|
||||
SET(ASSIMP_IMPORTERS_ENABLED "${ASSIMP_IMPORTERS_ENABLED} ${name}")
|
||||
|
@ -563,6 +570,9 @@ SET( PostProcessing_SRCS
|
|||
)
|
||||
SOURCE_GROUP( PostProcessing FILES ${PostProcessing_SRCS})
|
||||
|
||||
SET( IrrXML_SRCS irrXMLWrapper.h )
|
||||
SOURCE_GROUP( IrrXML FILES ${IrrXML_SRCS})
|
||||
|
||||
ADD_ASSIMP_IMPORTER( Q3D
|
||||
Q3DLoader.cpp
|
||||
Q3DLoader.h
|
||||
|
@ -657,6 +667,16 @@ ADD_ASSIMP_IMPORTER( 3MF
|
|||
D3MFOpcPackage.cpp
|
||||
)
|
||||
|
||||
ADD_ASSIMP_IMPORTER( MMD
|
||||
MMDCpp14.h
|
||||
MMDImporter.cpp
|
||||
MMDImporter.h
|
||||
MMDPmdParser.h
|
||||
MMDPmxParser.h
|
||||
MMDPmxParser.cpp
|
||||
MMDVmdParser.h
|
||||
)
|
||||
|
||||
SET( Step_SRCS
|
||||
StepExporter.h
|
||||
StepExporter.cpp
|
||||
|
@ -675,18 +695,6 @@ SET( Extra_SRCS
|
|||
)
|
||||
SOURCE_GROUP( Extra FILES ${Extra_SRCS})
|
||||
|
||||
SET( IrrXML_SRCS
|
||||
irrXMLWrapper.h
|
||||
../contrib/irrXML/CXMLReaderImpl.h
|
||||
../contrib/irrXML/heapsort.h
|
||||
../contrib/irrXML/irrArray.h
|
||||
../contrib/irrXML/irrString.h
|
||||
../contrib/irrXML/irrTypes.h
|
||||
../contrib/irrXML/irrXML.cpp
|
||||
../contrib/irrXML/irrXML.h
|
||||
)
|
||||
SOURCE_GROUP( IrrXML FILES ${IrrXML_SRCS})
|
||||
|
||||
SET( ConvertUTF_SRCS
|
||||
../contrib/ConvertUTF/ConvertUTF.h
|
||||
../contrib/ConvertUTF/ConvertUTF.c
|
||||
|
@ -842,7 +850,8 @@ SET( assimp_src
|
|||
ADD_DEFINITIONS( -DOPENDDLPARSER_BUILD )
|
||||
|
||||
INCLUDE_DIRECTORIES(
|
||||
../contrib/openddlparser/include
|
||||
${IRRXML_INCLUDE_DIR}
|
||||
../contrib/openddlparser/include
|
||||
)
|
||||
|
||||
IF (ASSIMP_BUILD_NONFREE_C4D_IMPORTER)
|
||||
|
@ -852,7 +861,7 @@ ENDIF (ASSIMP_BUILD_NONFREE_C4D_IMPORTER)
|
|||
|
||||
ADD_LIBRARY( assimp ${assimp_src} )
|
||||
|
||||
TARGET_LINK_LIBRARIES(assimp ${ZLIB_LIBRARIES} ${OPENDDL_PARSER_LIBRARIES} )
|
||||
TARGET_LINK_LIBRARIES(assimp ${ZLIB_LIBRARIES} ${OPENDDL_PARSER_LIBRARIES} ${IRRXML_LIBRARY} )
|
||||
|
||||
if(ANDROID AND ASSIMP_ANDROID_JNIIOSYSTEM)
|
||||
set(ASSIMP_ANDROID_JNIIOSYSTEM_PATH port/AndroidJNI)
|
||||
|
@ -930,7 +939,7 @@ if(MSVC AND ASSIMP_INSTALL_PDB)
|
|||
DESTINATION ${ASSIMP_LIB_INSTALL_DIR}
|
||||
CONFIGURATIONS Debug
|
||||
)
|
||||
install(FILES ${Assimp_BINARY_DIR}/code/RelWithDebInfo/assimp.pdb
|
||||
install(FILES ${Assimp_BINARY_DIR}/code/RelWithDebInfo/assimp${LIBRARY_SUFFIX}.pdb
|
||||
DESTINATION ${ASSIMP_LIB_INSTALL_DIR}
|
||||
CONFIGURATIONS RelWithDebInfo
|
||||
)
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2016, assimp team
|
||||
Copyright (c) 2006-2017, assimp team
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
@ -57,7 +57,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#include <assimp/IOSystem.hpp>
|
||||
#include <assimp/DefaultLogger.hpp>
|
||||
#include <assimp/scene.h>
|
||||
|
||||
#include <assimp/importerdesc.h>
|
||||
|
||||
using namespace Assimp;
|
||||
using namespace Assimp::COB;
|
||||
|
@ -941,20 +941,22 @@ void COBImporter::UnsupportedChunk_Binary( StreamReaderLE& reader, const ChunkIn
|
|||
// ------------------------------------------------------------------------------------------------
|
||||
// tiny utility guard to aid me at staying within chunk boundaries.
|
||||
class chunk_guard {
|
||||
|
||||
public:
|
||||
|
||||
chunk_guard(const COB::ChunkInfo& nfo, StreamReaderLE& reader)
|
||||
: nfo(nfo)
|
||||
, reader(reader)
|
||||
, cur(reader.GetCurrentPos())
|
||||
{
|
||||
: nfo(nfo)
|
||||
, reader(reader)
|
||||
, cur(reader.GetCurrentPos()) {
|
||||
}
|
||||
|
||||
~chunk_guard() {
|
||||
// don't do anything if the size is not given
|
||||
if(nfo.size != static_cast<unsigned int>(-1)) {
|
||||
reader.IncPtr(static_cast<int>(nfo.size)-reader.GetCurrentPos()+cur);
|
||||
try {
|
||||
reader.IncPtr( static_cast< int >( nfo.size ) - reader.GetCurrentPos() + cur );
|
||||
} catch ( DeadlyImportError e ) {
|
||||
// out of limit so correct the value
|
||||
reader.IncPtr( reader.GetReadLimit() );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2016, assimp team
|
||||
Copyright (c) 2006-2017, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2016, assimp team
|
||||
Copyright (c) 2006-2017, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
@ -46,12 +47,13 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
|
||||
#include <memory>
|
||||
#include <deque>
|
||||
#include <map>
|
||||
|
||||
#include "BaseImporter.h"
|
||||
#include "./../include/assimp/material.h"
|
||||
#include <assimp/material.h>
|
||||
|
||||
namespace Assimp {
|
||||
namespace COB {
|
||||
namespace Assimp {
|
||||
namespace COB {
|
||||
|
||||
// ------------------
|
||||
/** Represents a single vertex index in a face */
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
Open Asset Import Library (assimp)
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2016, assimp team
|
||||
Copyright (c) 2006-2017, assimp team
|
||||
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
@ -57,7 +58,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#include <assimp/anim.h>
|
||||
#include <assimp/DefaultLogger.hpp>
|
||||
#include <assimp/scene.h>
|
||||
|
||||
#include <assimp/importerdesc.h>
|
||||
|
||||
using namespace Assimp;
|
||||
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2016, assimp team
|
||||
Copyright (c) 2006-2017, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
Open Asset Import Library (assimp)
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2016, assimp team
|
||||
Copyright (c) 2006-2017, assimp team
|
||||
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2016, assimp team
|
||||
Copyright (c) 2006-2017, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2016, assimp team
|
||||
Copyright (c) 2006-2017, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
@ -38,18 +39,16 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#ifndef ASSIMP_BUILD_NO_EXPORT
|
||||
#ifndef ASSIMP_BUILD_NO_COLLADA_EXPORTER
|
||||
#include "ColladaExporter.h"
|
||||
|
||||
#include "ColladaExporter.h"
|
||||
#include "Bitmap.h"
|
||||
#include "fast_atof.h"
|
||||
#include "SceneCombiner.h"
|
||||
#include "DefaultIOSystem.h"
|
||||
#include "StringUtils.h"
|
||||
#include "XMLTools.h"
|
||||
#include <assimp/DefaultIOSystem.h>
|
||||
#include <assimp/IOSystem.hpp>
|
||||
#include <assimp/Exporter.hpp>
|
||||
#include <assimp/scene.h>
|
||||
|
@ -59,6 +58,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#include <memory>
|
||||
#include <ctime>
|
||||
#include <set>
|
||||
#include <vector>
|
||||
#include <iostream>
|
||||
|
||||
using namespace Assimp;
|
||||
|
||||
|
@ -133,6 +134,7 @@ void ColladaExporter::WriteFile()
|
|||
WriteLightsLibrary();
|
||||
WriteMaterials();
|
||||
WriteGeometryLibrary();
|
||||
WriteControllerLibrary();
|
||||
|
||||
WriteSceneLibrary();
|
||||
|
||||
|
@ -692,7 +694,6 @@ void ColladaExporter::WriteMaterials()
|
|||
|
||||
materials[a].shininess.exist = mat->Get( AI_MATKEY_SHININESS, materials[a].shininess.value) == aiReturn_SUCCESS;
|
||||
materials[a].transparency.exist = mat->Get( AI_MATKEY_OPACITY, materials[a].transparency.value) == aiReturn_SUCCESS;
|
||||
materials[a].transparency.value = materials[a].transparency.value;
|
||||
materials[a].index_refraction.exist = mat->Get( AI_MATKEY_REFRACTI, materials[a].index_refraction.value) == aiReturn_SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -787,6 +788,177 @@ void ColladaExporter::WriteMaterials()
|
|||
}
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
// Writes the controller library
|
||||
void ColladaExporter::WriteControllerLibrary()
|
||||
{
|
||||
mOutput << startstr << "<library_controllers>" << endstr;
|
||||
PushTag();
|
||||
|
||||
for( size_t a = 0; a < mScene->mNumMeshes; ++a)
|
||||
WriteController( a);
|
||||
|
||||
PopTag();
|
||||
mOutput << startstr << "</library_controllers>" << endstr;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
// Writes a skin controller of the given mesh
|
||||
void ColladaExporter::WriteController( size_t pIndex)
|
||||
{
|
||||
const aiMesh* mesh = mScene->mMeshes[pIndex];
|
||||
const std::string idstr = GetMeshId( pIndex);
|
||||
const std::string idstrEscaped = XMLEscape(idstr);
|
||||
|
||||
if ( mesh->mNumFaces == 0 || mesh->mNumVertices == 0 )
|
||||
return;
|
||||
|
||||
if ( mesh->mNumBones == 0 )
|
||||
return;
|
||||
|
||||
mOutput << startstr << "<controller id=\"" << idstrEscaped << "-skin\" ";
|
||||
mOutput << "name=\"skinCluster" << pIndex << "\">"<< endstr;
|
||||
PushTag();
|
||||
|
||||
mOutput << startstr << "<skin source=\"#" << idstrEscaped << "\">" << endstr;
|
||||
PushTag();
|
||||
|
||||
// bind pose matrix
|
||||
mOutput << startstr << "<bind_shape_matrix>" << endstr;
|
||||
PushTag();
|
||||
|
||||
// I think it is identity in general cases.
|
||||
aiMatrix4x4 mat;
|
||||
mOutput << startstr << mat.a1 << " " << mat.a2 << " " << mat.a3 << " " << mat.a4 << endstr;
|
||||
mOutput << startstr << mat.b1 << " " << mat.b2 << " " << mat.b3 << " " << mat.b4 << endstr;
|
||||
mOutput << startstr << mat.c1 << " " << mat.c2 << " " << mat.c3 << " " << mat.c4 << endstr;
|
||||
mOutput << startstr << mat.d1 << " " << mat.d2 << " " << mat.d3 << " " << mat.d4 << endstr;
|
||||
|
||||
PopTag();
|
||||
mOutput << startstr << "</bind_shape_matrix>" << endstr;
|
||||
|
||||
mOutput << startstr << "<source id=\"" << idstrEscaped << "-skin-joints\" name=\"" << idstrEscaped << "-skin-joints\">" << endstr;
|
||||
PushTag();
|
||||
|
||||
mOutput << startstr << "<Name_array id=\"" << idstrEscaped << "-skin-joints-array\" count=\"" << mesh->mNumBones << "\">";
|
||||
|
||||
for( size_t i = 0; i < mesh->mNumBones; ++i )
|
||||
mOutput << XMLEscape(mesh->mBones[i]->mName.C_Str()) << " ";
|
||||
|
||||
mOutput << "</Name_array>" << endstr;
|
||||
|
||||
mOutput << startstr << "<technique_common>" << endstr;
|
||||
PushTag();
|
||||
|
||||
mOutput << startstr << "<accessor source=\"#" << idstrEscaped << "-skin-joints-array\" count=\"" << mesh->mNumBones << "\" stride=\"" << 1 << "\">" << endstr;
|
||||
PushTag();
|
||||
|
||||
mOutput << startstr << "<param name=\"JOINT\" type=\"Name\"></param>" << endstr;
|
||||
|
||||
PopTag();
|
||||
mOutput << startstr << "</accessor>" << endstr;
|
||||
|
||||
PopTag();
|
||||
mOutput << startstr << "</technique_common>" << endstr;
|
||||
|
||||
PopTag();
|
||||
mOutput << startstr << "</source>" << endstr;
|
||||
|
||||
std::vector<ai_real> bind_poses;
|
||||
bind_poses.reserve(mesh->mNumBones * 16);
|
||||
for( size_t i = 0; i < mesh->mNumBones; ++i)
|
||||
for( size_t j = 0; j < 4; ++j)
|
||||
bind_poses.insert(bind_poses.end(), mesh->mBones[i]->mOffsetMatrix[j], mesh->mBones[i]->mOffsetMatrix[j] + 4);
|
||||
|
||||
WriteFloatArray( idstr + "-skin-bind_poses", FloatType_Mat4x4, (const ai_real*) bind_poses.data(), bind_poses.size() / 16);
|
||||
|
||||
bind_poses.clear();
|
||||
|
||||
std::vector<ai_real> skin_weights;
|
||||
skin_weights.reserve(mesh->mNumVertices * mesh->mNumBones);
|
||||
for( size_t i = 0; i < mesh->mNumBones; ++i)
|
||||
for( size_t j = 0; j < mesh->mBones[i]->mNumWeights; ++j)
|
||||
skin_weights.push_back(mesh->mBones[i]->mWeights[j].mWeight);
|
||||
|
||||
WriteFloatArray( idstr + "-skin-weights", FloatType_Weight, (const ai_real*) skin_weights.data(), skin_weights.size());
|
||||
|
||||
skin_weights.clear();
|
||||
|
||||
mOutput << startstr << "<joints>" << endstr;
|
||||
PushTag();
|
||||
|
||||
mOutput << startstr << "<input semantic=\"JOINT\" source=\"#" << idstrEscaped << "-skin-joints\"></input>" << endstr;
|
||||
mOutput << startstr << "<input semantic=\"INV_BIND_MATRIX\" source=\"#" << idstrEscaped << "-skin-bind_poses\"></input>" << endstr;
|
||||
|
||||
PopTag();
|
||||
mOutput << startstr << "</joints>" << endstr;
|
||||
|
||||
mOutput << startstr << "<vertex_weights count=\"" << mesh->mNumVertices << "\">" << endstr;
|
||||
PushTag();
|
||||
|
||||
mOutput << startstr << "<input semantic=\"JOINT\" source=\"#" << idstrEscaped << "-skin-joints\" offset=\"0\"></input>" << endstr;
|
||||
mOutput << startstr << "<input semantic=\"WEIGHT\" source=\"#" << idstrEscaped << "-skin-weights\" offset=\"1\"></input>" << endstr;
|
||||
|
||||
mOutput << startstr << "<vcount>";
|
||||
|
||||
std::vector<ai_uint> num_influences(mesh->mNumVertices, (ai_uint)0);
|
||||
for( size_t i = 0; i < mesh->mNumBones; ++i)
|
||||
for( size_t j = 0; j < mesh->mBones[i]->mNumWeights; ++j)
|
||||
++num_influences[mesh->mBones[i]->mWeights[j].mVertexId];
|
||||
|
||||
for( size_t i = 0; i < mesh->mNumVertices; ++i)
|
||||
mOutput << num_influences[i] << " ";
|
||||
|
||||
mOutput << "</vcount>" << endstr;
|
||||
|
||||
mOutput << startstr << "<v>";
|
||||
|
||||
ai_uint joint_weight_indices_length = 0;
|
||||
std::vector<ai_uint> accum_influences;
|
||||
accum_influences.reserve(num_influences.size());
|
||||
for( size_t i = 0; i < num_influences.size(); ++i)
|
||||
{
|
||||
accum_influences.push_back(joint_weight_indices_length);
|
||||
joint_weight_indices_length += num_influences[i];
|
||||
}
|
||||
|
||||
ai_uint weight_index = 0;
|
||||
std::vector<ai_int> joint_weight_indices(2 * joint_weight_indices_length, (ai_int)-1);
|
||||
for( size_t i = 0; i < mesh->mNumBones; ++i)
|
||||
for( size_t j = 0; j < mesh->mBones[i]->mNumWeights; ++j)
|
||||
{
|
||||
unsigned int vId = mesh->mBones[i]->mWeights[j].mVertexId;
|
||||
for( size_t k = 0; k < num_influences[vId]; ++k)
|
||||
{
|
||||
if (joint_weight_indices[2 * (accum_influences[vId] + k)] == -1)
|
||||
{
|
||||
joint_weight_indices[2 * (accum_influences[vId] + k)] = i;
|
||||
joint_weight_indices[2 * (accum_influences[vId] + k) + 1] = weight_index;
|
||||
break;
|
||||
}
|
||||
}
|
||||
++weight_index;
|
||||
}
|
||||
|
||||
for( size_t i = 0; i < joint_weight_indices.size(); ++i)
|
||||
mOutput << joint_weight_indices[i] << " ";
|
||||
|
||||
num_influences.clear();
|
||||
accum_influences.clear();
|
||||
joint_weight_indices.clear();
|
||||
|
||||
mOutput << "</v>" << endstr;
|
||||
|
||||
PopTag();
|
||||
mOutput << startstr << "</vertex_weights>" << endstr;
|
||||
|
||||
PopTag();
|
||||
mOutput << startstr << "</skin>" << endstr;
|
||||
|
||||
PopTag();
|
||||
mOutput << startstr << "</controller>" << endstr;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
// Writes the geometry library
|
||||
void ColladaExporter::WriteGeometryLibrary()
|
||||
|
@ -951,6 +1123,8 @@ void ColladaExporter::WriteFloatArray( const std::string& pIdString, FloatDataTy
|
|||
case FloatType_TexCoord2: floatsPerElement = 2; break;
|
||||
case FloatType_TexCoord3: floatsPerElement = 3; break;
|
||||
case FloatType_Color: floatsPerElement = 3; break;
|
||||
case FloatType_Mat4x4: floatsPerElement = 16; break;
|
||||
case FloatType_Weight: floatsPerElement = 1; break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
@ -1019,6 +1193,14 @@ void ColladaExporter::WriteFloatArray( const std::string& pIdString, FloatDataTy
|
|||
mOutput << startstr << "<param name=\"G\" type=\"float\" />" << endstr;
|
||||
mOutput << startstr << "<param name=\"B\" type=\"float\" />" << endstr;
|
||||
break;
|
||||
|
||||
case FloatType_Mat4x4:
|
||||
mOutput << startstr << "<param name=\"TRANSFORM\" type=\"float4x4\" />" << endstr;
|
||||
break;
|
||||
|
||||
case FloatType_Weight:
|
||||
mOutput << startstr << "<param name=\"WEIGHT\" type=\"float\" />" << endstr;
|
||||
break;
|
||||
}
|
||||
|
||||
PopTag();
|
||||
|
@ -1080,16 +1262,24 @@ void ColladaExporter::WriteNode( const aiScene* pScene, aiNode* pNode)
|
|||
// If the node is associated with a bone, it is a joint node (JOINT)
|
||||
// otherwise it is a normal node (NODE)
|
||||
const char * node_type;
|
||||
bool is_joint, is_skeleton_root = false;
|
||||
if (NULL == findBone(pScene, pNode->mName.C_Str())) {
|
||||
node_type = "NODE";
|
||||
is_joint = false;
|
||||
} else {
|
||||
node_type = "JOINT";
|
||||
is_joint = true;
|
||||
if(!pNode->mParent || NULL == findBone(pScene, pNode->mParent->mName.C_Str()))
|
||||
is_skeleton_root = true;
|
||||
}
|
||||
|
||||
const std::string node_name_escaped = XMLEscape(pNode->mName.data);
|
||||
mOutput << startstr
|
||||
<< "<node id=\"" << node_name_escaped
|
||||
<< "\" name=\"" << node_name_escaped
|
||||
<< "<node ";
|
||||
if(is_skeleton_root)
|
||||
mOutput << "id=\"" << "skeleton_root" << "\" "; // For now, only support one skeleton in a scene.
|
||||
mOutput << (is_joint ? "s" : "") << "id=\"" << node_name_escaped;
|
||||
mOutput << "\" name=\"" << node_name_escaped
|
||||
<< "\" type=\"" << node_type
|
||||
<< "\">" << endstr;
|
||||
PushTag();
|
||||
|
@ -1097,7 +1287,7 @@ void ColladaExporter::WriteNode( const aiScene* pScene, aiNode* pNode)
|
|||
// write transformation - we can directly put the matrix there
|
||||
// TODO: (thom) decompose into scale - rot - quad to allow addressing it by animations afterwards
|
||||
const aiMatrix4x4& mat = pNode->mTransformation;
|
||||
mOutput << startstr << "<matrix>";
|
||||
mOutput << startstr << "<matrix sid=\"transform\">";
|
||||
mOutput << mat.a1 << " " << mat.a2 << " " << mat.a3 << " " << mat.a4 << " ";
|
||||
mOutput << mat.b1 << " " << mat.b2 << " " << mat.b3 << " " << mat.b4 << " ";
|
||||
mOutput << mat.c1 << " " << mat.c2 << " " << mat.c3 << " " << mat.c4 << " ";
|
||||
|
@ -1125,33 +1315,50 @@ void ColladaExporter::WriteNode( const aiScene* pScene, aiNode* pNode)
|
|||
for( size_t a = 0; a < pNode->mNumMeshes; ++a )
|
||||
{
|
||||
const aiMesh* mesh = mScene->mMeshes[pNode->mMeshes[a]];
|
||||
// do not instanciate mesh if empty. I wonder how this could happen
|
||||
if( mesh->mNumFaces == 0 || mesh->mNumVertices == 0 )
|
||||
continue;
|
||||
mOutput << startstr << "<instance_geometry url=\"#" << XMLEscape(GetMeshId( pNode->mMeshes[a])) << "\">" << endstr;
|
||||
PushTag();
|
||||
mOutput << startstr << "<bind_material>" << endstr;
|
||||
PushTag();
|
||||
mOutput << startstr << "<technique_common>" << endstr;
|
||||
PushTag();
|
||||
mOutput << startstr << "<instance_material symbol=\"defaultMaterial\" target=\"#" << XMLEscape(materials[mesh->mMaterialIndex].name) << "\">" << endstr;
|
||||
PushTag();
|
||||
for( size_t a = 0; a < AI_MAX_NUMBER_OF_TEXTURECOORDS; ++a )
|
||||
{
|
||||
if( mesh->HasTextureCoords( static_cast<unsigned int>(a) ) )
|
||||
// semantic as in <texture texcoord=...>
|
||||
// input_semantic as in <input semantic=...>
|
||||
// input_set as in <input set=...>
|
||||
mOutput << startstr << "<bind_vertex_input semantic=\"CHANNEL" << a << "\" input_semantic=\"TEXCOORD\" input_set=\"" << a << "\"/>" << endstr;
|
||||
}
|
||||
PopTag();
|
||||
mOutput << startstr << "</instance_material>" << endstr;
|
||||
PopTag();
|
||||
mOutput << startstr << "</technique_common>" << endstr;
|
||||
PopTag();
|
||||
mOutput << startstr << "</bind_material>" << endstr;
|
||||
PopTag();
|
||||
mOutput << startstr << "</instance_geometry>" << endstr;
|
||||
// do not instanciate mesh if empty. I wonder how this could happen
|
||||
if( mesh->mNumFaces == 0 || mesh->mNumVertices == 0 )
|
||||
continue;
|
||||
|
||||
if( mesh->mNumBones == 0 )
|
||||
{
|
||||
mOutput << startstr << "<instance_geometry url=\"#" << XMLEscape(GetMeshId( pNode->mMeshes[a])) << "\">" << endstr;
|
||||
PushTag();
|
||||
}
|
||||
else
|
||||
{
|
||||
mOutput << startstr
|
||||
<< "<instance_controller url=\"#" << XMLEscape(GetMeshId( pNode->mMeshes[a])) << "-skin\">"
|
||||
<< endstr;
|
||||
PushTag();
|
||||
|
||||
mOutput << startstr << "<skeleton>#skeleton_root</skeleton>" << endstr;
|
||||
}
|
||||
mOutput << startstr << "<bind_material>" << endstr;
|
||||
PushTag();
|
||||
mOutput << startstr << "<technique_common>" << endstr;
|
||||
PushTag();
|
||||
mOutput << startstr << "<instance_material symbol=\"defaultMaterial\" target=\"#" << XMLEscape(materials[mesh->mMaterialIndex].name) << "\">" << endstr;
|
||||
PushTag();
|
||||
for( size_t a = 0; a < AI_MAX_NUMBER_OF_TEXTURECOORDS; ++a )
|
||||
{
|
||||
if( mesh->HasTextureCoords( static_cast<unsigned int>(a) ) )
|
||||
// semantic as in <texture texcoord=...>
|
||||
// input_semantic as in <input semantic=...>
|
||||
// input_set as in <input set=...>
|
||||
mOutput << startstr << "<bind_vertex_input semantic=\"CHANNEL" << a << "\" input_semantic=\"TEXCOORD\" input_set=\"" << a << "\"/>" << endstr;
|
||||
}
|
||||
PopTag();
|
||||
mOutput << startstr << "</instance_material>" << endstr;
|
||||
PopTag();
|
||||
mOutput << startstr << "</technique_common>" << endstr;
|
||||
PopTag();
|
||||
mOutput << startstr << "</bind_material>" << endstr;
|
||||
|
||||
PopTag();
|
||||
if( mesh->mNumBones == 0)
|
||||
mOutput << startstr << "</instance_geometry>" << endstr;
|
||||
else
|
||||
mOutput << startstr << "</instance_controller>" << endstr;
|
||||
}
|
||||
|
||||
// recurse into subnodes
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2016, assimp team
|
||||
Copyright (c) 2006-2017, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
@ -101,13 +102,19 @@ protected:
|
|||
void WriteSpotLight(const aiLight *const light);
|
||||
void WriteAmbienttLight(const aiLight *const light);
|
||||
|
||||
/// Writes the controller library
|
||||
void WriteControllerLibrary();
|
||||
|
||||
/// Writes a skin controller of the given mesh
|
||||
void WriteController( size_t pIndex);
|
||||
|
||||
/// Writes the geometry library
|
||||
void WriteGeometryLibrary();
|
||||
|
||||
/// Writes the given mesh
|
||||
void WriteGeometry( size_t pIndex);
|
||||
|
||||
enum FloatDataType { FloatType_Vector, FloatType_TexCoord2, FloatType_TexCoord3, FloatType_Color };
|
||||
enum FloatDataType { FloatType_Vector, FloatType_TexCoord2, FloatType_TexCoord3, FloatType_Color, FloatType_Mat4x4, FloatType_Weight };
|
||||
|
||||
/// Writes a float array of the given type
|
||||
void WriteFloatArray( const std::string& pIdString, FloatDataType pType, const ai_real* pData, size_t pElementCount);
|
||||
|
|
|
@ -4,7 +4,8 @@
|
|||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2016, assimp team
|
||||
Copyright (c) 2006-2017, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
@ -43,7 +44,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#ifndef AI_COLLADAHELPER_H_INC
|
||||
#define AI_COLLADAHELPER_H_INC
|
||||
|
||||
#include <string>
|
||||
#include <map>
|
||||
#include <vector>
|
||||
#include <stdint.h>
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
Open Asset Import Library (assimp)
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2016, assimp team
|
||||
Copyright (c) 2006-2017, assimp team
|
||||
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
@ -49,21 +50,19 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#include <assimp/scene.h>
|
||||
#include <assimp/DefaultLogger.hpp>
|
||||
#include <assimp/Importer.hpp>
|
||||
#include "ColladaParser.h"
|
||||
#include <assimp/importerdesc.h>
|
||||
|
||||
#include "ColladaParser.h"
|
||||
#include "fast_atof.h"
|
||||
#include "ParsingUtils.h"
|
||||
#include "SkeletonMeshBuilder.h"
|
||||
#include "Defines.h"
|
||||
#include "CreateAnimMesh.h"
|
||||
|
||||
#include "time.h"
|
||||
#include "math.h"
|
||||
#include <algorithm>
|
||||
#include <cstdint>
|
||||
#include <numeric>
|
||||
#include "Defines.h"
|
||||
|
||||
#include <assimp/Defines.h>
|
||||
|
||||
using namespace Assimp;
|
||||
using namespace Assimp::Formatter;
|
||||
|
|
|
@ -4,7 +4,8 @@
|
|||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2016, assimp team
|
||||
Copyright (c) 2006-2017, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
Open Asset Import Library (assimp)
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2016, assimp team
|
||||
Copyright (c) 2006-2017, assimp team
|
||||
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2016, assimp team
|
||||
Copyright (c) 2006-2017, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
@ -49,7 +50,6 @@
|
|||
#include "ColladaHelper.h"
|
||||
#include <assimp/ai_assert.h>
|
||||
#include "TinyFormatter.h"
|
||||
#include <memory>
|
||||
|
||||
namespace Assimp
|
||||
{
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2016, assimp team
|
||||
Copyright (c) 2006-2017, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2016, assimp team
|
||||
Copyright (c) 2006-2017, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
Open Asset Import Library (assimp)
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2016, assimp team
|
||||
Copyright (c) 2006-2017, assimp team
|
||||
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2016, assimp team
|
||||
Copyright (c) 2006-2017, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2016, assimp team
|
||||
Copyright (c) 2006-2017, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2016, assimp team
|
||||
Copyright (c) 2006-2017, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
@ -43,24 +44,18 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#include "D3MFImporter.h"
|
||||
|
||||
#include <assimp/scene.h>
|
||||
#include <assimp/IOStream.hpp>
|
||||
#include <assimp/IOSystem.hpp>
|
||||
#include <assimp/DefaultLogger.hpp>
|
||||
#include <assimp/importerdesc.h>
|
||||
#include "StringComparison.h"
|
||||
#include "StringUtils.h"
|
||||
|
||||
|
||||
#include <string>
|
||||
#include <sstream>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#include <cstdlib>
|
||||
#include <memory>
|
||||
|
||||
#include <assimp/ai_assert.h>
|
||||
|
||||
#include "D3MFOpcPackage.h"
|
||||
#include <contrib/unzip/unzip.h>
|
||||
#include "irrXMLWrapper.h"
|
||||
|
@ -68,7 +63,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
namespace Assimp {
|
||||
namespace D3MF {
|
||||
|
||||
|
||||
namespace XmlTag {
|
||||
static const std::string model = "model";
|
||||
static const std::string metadata = "metadata";
|
||||
|
@ -254,9 +248,7 @@ private:
|
|||
mesh->mFaces = new aiFace[mesh->mNumFaces];
|
||||
mesh->mPrimitiveTypes = aiPrimitiveType_TRIANGLE;
|
||||
|
||||
|
||||
std::copy(faces.begin(), faces.end(), mesh->mFaces);
|
||||
|
||||
}
|
||||
|
||||
aiFace ReadTriangle()
|
||||
|
@ -313,8 +305,6 @@ private:
|
|||
private:
|
||||
std::vector<aiMesh*> meshes;
|
||||
XmlReader* xmlReader;
|
||||
|
||||
|
||||
};
|
||||
|
||||
} //namespace D3MF
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2016, assimp team
|
||||
Copyright (c) 2006-2017, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
@ -41,9 +42,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#ifndef AI_D3MFLOADER_H_INCLUDED
|
||||
#define AI_D3MFLOADER_H_INCLUDED
|
||||
|
||||
#include <vector>
|
||||
#include <cstdint>
|
||||
|
||||
#include "BaseImporter.h"
|
||||
|
||||
namespace Assimp {
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2016, assimp team
|
||||
Copyright (c) 2006-2017, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
@ -53,7 +54,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#include <map>
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#include <cstdlib>
|
||||
|
||||
#include <contrib/unzip/unzip.h>
|
||||
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2016, assimp team
|
||||
Copyright (c) 2006-2017, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
@ -41,7 +42,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#ifndef D3MFOPCPACKAGE_H
|
||||
#define D3MFOPCPACKAGE_H
|
||||
|
||||
#include <string>
|
||||
#include <memory>
|
||||
|
||||
#include <assimp/IOSystem.hpp>
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2016, assimp team
|
||||
Copyright (c) 2006-2017, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
Open Asset Import Library (assimp)
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2016, assimp team
|
||||
Copyright (c) 2006-2017, assimp team
|
||||
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
@ -54,6 +55,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#include "DXFHelper.h"
|
||||
#include <assimp/IOSystem.hpp>
|
||||
#include <assimp/scene.h>
|
||||
#include <assimp/importerdesc.h>
|
||||
|
||||
#include <numeric>
|
||||
|
||||
using namespace Assimp;
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2016, assimp team
|
||||
Copyright (c) 2006-2017, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
@ -45,6 +46,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#define AI_DXFLOADER_H_INCLUDED
|
||||
|
||||
#include "BaseImporter.h"
|
||||
#include <map>
|
||||
|
||||
namespace Assimp {
|
||||
namespace DXF {
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2016, assimp team
|
||||
Copyright (c) 2006-2017, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2016, assimp team
|
||||
Copyright (c) 2006-2017, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
Open Asset Import Library (assimp)
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2016, assimp team
|
||||
Copyright (c) 2006-2017, assimp team
|
||||
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
@ -44,7 +45,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
|
||||
|
||||
#include <assimp/ai_assert.h>
|
||||
#include "DefaultIOStream.h"
|
||||
#include <assimp/DefaultIOStream.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
|
@ -126,7 +127,7 @@ size_t DefaultIOStream::FileSize() const
|
|||
if (0 != err)
|
||||
return 0;
|
||||
mCachedSize = (size_t) (fileStat.st_size);
|
||||
#elif defined __GNUC__ || defined __APPLE__ || defined __MACH__
|
||||
#elif defined __GNUC__ || defined __APPLE__ || defined __MACH__ || defined __FreeBSD__
|
||||
struct stat fileStat;
|
||||
int err = stat(mFilename.c_str(), &fileStat );
|
||||
if (0 != err)
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
Open Asset Import Library (assimp)
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2016, assimp team
|
||||
Copyright (c) 2006-2017, assimp team
|
||||
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
@ -40,10 +41,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
*/
|
||||
/** @file Default implementation of IOSystem using the standard C file functions */
|
||||
|
||||
#include "DefaultIOSystem.h"
|
||||
#include "DefaultIOStream.h"
|
||||
#include "StringComparison.h"
|
||||
|
||||
#include <assimp/DefaultIOSystem.h>
|
||||
#include <assimp/DefaultIOStream.h>
|
||||
#include <assimp/DefaultLogger.hpp>
|
||||
#include <assimp/ai_assert.h>
|
||||
#include <stdlib.h>
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
Open Asset Import Library (assimp)
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2016, assimp team
|
||||
Copyright (c) 2006-2017, assimp team
|
||||
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
@ -43,13 +44,14 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
* @brief Implementation of DefaultLogger (and Logger)
|
||||
*/
|
||||
|
||||
#include "DefaultIOSystem.h"
|
||||
|
||||
// Default log streams
|
||||
#include "Win32DebugLogStream.h"
|
||||
#include "StdOStreamLogStream.h"
|
||||
#include "FileLogStream.h"
|
||||
#include "StringUtils.h"
|
||||
|
||||
#include <assimp/DefaultIOSystem.h>
|
||||
#include <assimp/NullLogger.hpp>
|
||||
#include <assimp/DefaultLogger.hpp>
|
||||
#include <assimp/ai_assert.h>
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2016, assimp team
|
||||
Copyright (c) 2006-2017, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
|
|
@ -42,7 +42,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#define INCLUDED_EXCEPTIONAL_H
|
||||
|
||||
#include <stdexcept>
|
||||
#include "DefaultIOStream.h"
|
||||
#include <assimp/DefaultIOStream.h>
|
||||
using std::runtime_error;
|
||||
|
||||
#ifdef _MSC_VER
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
Open Asset Import Library (assimp)
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2016, assimp team
|
||||
Copyright (c) 2006-2017, assimp team
|
||||
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
@ -52,7 +53,6 @@ Here we implement only the C++ interface (Assimp::Exporter).
|
|||
|
||||
#ifndef ASSIMP_BUILD_NO_EXPORT
|
||||
|
||||
#include "DefaultIOSystem.h"
|
||||
#include "BlobIOSystem.h"
|
||||
#include "SceneCombiner.h"
|
||||
#include "BaseProcess.h"
|
||||
|
@ -64,11 +64,12 @@ Here we implement only the C++ interface (Assimp::Exporter).
|
|||
#include "Exceptional.h"
|
||||
#include "ScenePrivate.h"
|
||||
#include <memory>
|
||||
|
||||
#include <assimp/DefaultIOSystem.h>
|
||||
#include <assimp/Exporter.hpp>
|
||||
#include <assimp/mesh.h>
|
||||
#include <assimp/postprocess.h>
|
||||
#include <assimp/scene.h>
|
||||
#include <memory>
|
||||
|
||||
namespace Assimp {
|
||||
|
||||
|
@ -235,7 +236,7 @@ bool Exporter::IsDefaultIOHandler() const {
|
|||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
const aiExportDataBlob* Exporter::ExportToBlob( const aiScene* pScene, const char* pFormatId,
|
||||
const aiExportDataBlob* Exporter::ExportToBlob( const aiScene* pScene, const char* pFormatId,
|
||||
unsigned int, const ExportProperties* pProperties ) {
|
||||
if (pimpl->blob) {
|
||||
delete pimpl->blob;
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2016, assimp team
|
||||
Copyright (c) 2006-2017, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
@ -48,7 +49,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#include "FBXParser.h"
|
||||
#include "FBXDocument.h"
|
||||
#include "FBXImporter.h"
|
||||
#include "FBXImportSettings.h"
|
||||
#include "FBXDocumentUtil.h"
|
||||
#include "FBXProperties.h"
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue