Merge branch 'cleanup_includes' of https://github.com/assimp/assimp into cleanup_includes
commit
b725d7dbf5
|
@ -185,9 +185,9 @@ if (ASSIMP_COVERALLS)
|
||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O0 -fprofile-arcs -ftest-coverage")
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O0 -fprofile-arcs -ftest-coverage")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
INCLUDE (FindPkgConfig)
|
|
||||||
INCLUDE_DIRECTORIES( include )
|
INCLUDE_DIRECTORIES( include )
|
||||||
|
|
||||||
|
INCLUDE (FindPkgMacros)
|
||||||
INCLUDE (PrecompiledHeader)
|
INCLUDE (PrecompiledHeader)
|
||||||
|
|
||||||
# If this is an in-source build (CMAKE_SOURCE_DIR == CMAKE_BINARY_DIR),
|
# If this is an in-source build (CMAKE_SOURCE_DIR == CMAKE_BINARY_DIR),
|
||||||
|
@ -255,9 +255,7 @@ ENDIF(NOT ZLIB_FOUND)
|
||||||
INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR})
|
INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR})
|
||||||
|
|
||||||
# Search for unzip
|
# Search for unzip
|
||||||
IF (PKG_CONFIG_FOUND)
|
use_pkgconfig(UNZIP minizip)
|
||||||
PKG_CHECK_MODULES(UNZIP minizip)
|
|
||||||
ENDIF (PKG_CONFIG_FOUND)
|
|
||||||
|
|
||||||
IF ( ASSIMP_NO_EXPORT )
|
IF ( ASSIMP_NO_EXPORT )
|
||||||
ADD_DEFINITIONS( -DASSIMP_BUILD_NO_EXPORT)
|
ADD_DEFINITIONS( -DASSIMP_BUILD_NO_EXPORT)
|
||||||
|
|
320
CREDITS
320
CREDITS
|
@ -1,160 +1,160 @@
|
||||||
===============================================================
|
===============================================================
|
||||||
Open Asset Import Library (Assimp)
|
Open Asset Import Library (Assimp)
|
||||||
Developers and Contributors
|
Developers and Contributors
|
||||||
===============================================================
|
===============================================================
|
||||||
|
|
||||||
The following is a non-exhaustive list of all constributors over the years.
|
The following is a non-exhaustive list of all constributors over the years.
|
||||||
If you think your name should be listed here, drop us a line and we'll add you.
|
If you think your name should be listed here, drop us a line and we'll add you.
|
||||||
|
|
||||||
- Alexander Gessler,
|
- Alexander Gessler,
|
||||||
3DS-, BLEND-, ASE-, DXF-, HMP-, MDL-, MD2-, MD3-, MD5-, MDC-, NFF-, PLY-, STL-, RAW-, OFF-, MS3D-, Q3D- and LWO-Loader, Assimp-Viewer, assimp-cmd, -noboost, Website (Design).
|
3DS-, BLEND-, ASE-, DXF-, HMP-, MDL-, MD2-, MD3-, MD5-, MDC-, NFF-, PLY-, STL-, RAW-, OFF-, MS3D-, Q3D- and LWO-Loader, Assimp-Viewer, assimp-cmd, -noboost, Website (Design).
|
||||||
|
|
||||||
- Thomas Schulze,
|
- Thomas Schulze,
|
||||||
X-, Collada-, BVH-Loader, Postprocessing framework. Data structure & Interface design, documentation.
|
X-, Collada-, BVH-Loader, Postprocessing framework. Data structure & Interface design, documentation.
|
||||||
|
|
||||||
- Kim Kulling,
|
- Kim Kulling,
|
||||||
Obj-, Q3BSD-, OpenGEX-Loader, Logging system, CMake-build-environment, Linux-build, Website ( Admin ), Coverity ( Admin ), Glitter ( Admin ).
|
Obj-, Q3BSD-, OpenGEX-Loader, Logging system, CMake-build-environment, Linux-build, Website ( Admin ), Coverity ( Admin ), Glitter ( Admin ).
|
||||||
|
|
||||||
- R.Schmidt,
|
- R.Schmidt,
|
||||||
Linux build, eclipse support.
|
Linux build, eclipse support.
|
||||||
|
|
||||||
- Matthias Gubisch,
|
- Matthias Gubisch,
|
||||||
Assimp.net
|
Assimp.net
|
||||||
Visual Studio 9 support, bugfixes.
|
Visual Studio 9 support, bugfixes.
|
||||||
|
|
||||||
- Mark Sibly
|
- Mark Sibly
|
||||||
B3D-Loader, Assimp testing
|
B3D-Loader, Assimp testing
|
||||||
|
|
||||||
- Jonathan Klein
|
- Jonathan Klein
|
||||||
Ogre Loader, VC2010 fixes and CMake fixes.
|
Ogre Loader, VC2010 fixes and CMake fixes.
|
||||||
|
|
||||||
- Sebastian Hempel,
|
- Sebastian Hempel,
|
||||||
PyAssimp (first version)
|
PyAssimp (first version)
|
||||||
Compile-Bugfixes for mingw, add environment for static library support in make.
|
Compile-Bugfixes for mingw, add environment for static library support in make.
|
||||||
|
|
||||||
- Jonathan Pokrass
|
- Jonathan Pokrass
|
||||||
Supplied a bugfix concerning the scaling in the md3 loader.
|
Supplied a bugfix concerning the scaling in the md3 loader.
|
||||||
|
|
||||||
- Andrew Galante,
|
- Andrew Galante,
|
||||||
Submitted patches to make Assimp compile with GCC-4, a makefile and the xcode3 workspace.
|
Submitted patches to make Assimp compile with GCC-4, a makefile and the xcode3 workspace.
|
||||||
|
|
||||||
- Andreas Nagel
|
- Andreas Nagel
|
||||||
First Assimp testing & verification under Windows Vista 64 Bit.
|
First Assimp testing & verification under Windows Vista 64 Bit.
|
||||||
|
|
||||||
- Marius Schr<68>der
|
- Marius Schr<68>der
|
||||||
Allowed us to use many of his models for screenshots and testing.
|
Allowed us to use many of his models for screenshots and testing.
|
||||||
|
|
||||||
- Christian Schubert
|
- Christian Schubert
|
||||||
Supplied various XFiles for testing purposes.
|
Supplied various XFiles for testing purposes.
|
||||||
|
|
||||||
- Tizian Wieland
|
- Tizian Wieland
|
||||||
Searched the web for hundreds of test models for internal use
|
Searched the web for hundreds of test models for internal use
|
||||||
|
|
||||||
- John Connors
|
- John Connors
|
||||||
Supplied patches for linux and SCons.
|
Supplied patches for linux and SCons.
|
||||||
|
|
||||||
- T. R.
|
- T. R.
|
||||||
The GUY who performed some of the CSM mocaps.
|
The GUY who performed some of the CSM mocaps.
|
||||||
|
|
||||||
- Andy Maloney
|
- Andy Maloney
|
||||||
Contributed fixes for the documentation and the doxygen markup
|
Contributed fixes for the documentation and the doxygen markup
|
||||||
|
|
||||||
- Zhao Lei
|
- Zhao Lei
|
||||||
Contributed several bugfixes fixing memory leaks and improving float parsing
|
Contributed several bugfixes fixing memory leaks and improving float parsing
|
||||||
|
|
||||||
- sueastside
|
- sueastside
|
||||||
Updated PyAssimp to the latest Assimp data structures and provided a script to keep the Python binding up-to-date.
|
Updated PyAssimp to the latest Assimp data structures and provided a script to keep the Python binding up-to-date.
|
||||||
|
|
||||||
- Tobias Rittig
|
- Tobias Rittig
|
||||||
Collada testing with Cinema 4D
|
Collada testing with Cinema 4D
|
||||||
|
|
||||||
- Brad Grantham
|
- Brad Grantham
|
||||||
Improvements in OpenGL-Sample.
|
Improvements in OpenGL-Sample.
|
||||||
|
|
||||||
- Robert Ramirez
|
- Robert Ramirez
|
||||||
Add group loading feature to Obj-Loader.
|
Add group loading feature to Obj-Loader.
|
||||||
|
|
||||||
- Chris Maiwald
|
- Chris Maiwald
|
||||||
Many bugreports, improving Assimp's portability, regular testing & feedback.
|
Many bugreports, improving Assimp's portability, regular testing & feedback.
|
||||||
|
|
||||||
- Stepan Hrbek
|
- Stepan Hrbek
|
||||||
Bugreport and fix for a obj-materialloader crash.
|
Bugreport and fix for a obj-materialloader crash.
|
||||||
|
|
||||||
- David Nadlinger
|
- David Nadlinger
|
||||||
D bindings, CMake install support.
|
D bindings, CMake install support.
|
||||||
|
|
||||||
- Dario Accornero
|
- Dario Accornero
|
||||||
Contributed several patches regarding Mac OS/XCode targets, bug reports.
|
Contributed several patches regarding Mac OS/XCode targets, bug reports.
|
||||||
|
|
||||||
- Martin Walser (Samhayne)
|
- Martin Walser (Samhayne)
|
||||||
Contributed the 'SimpleTexturedOpenGl' sample.
|
Contributed the 'SimpleTexturedOpenGl' sample.
|
||||||
|
|
||||||
- Matthias Fauconneau
|
- Matthias Fauconneau
|
||||||
Contributed a fix for the Q3-BSP loader.
|
Contributed a fix for the Q3-BSP loader.
|
||||||
|
|
||||||
- J<EFBFBD>rgen P. Tjern<72>
|
- Jørgen P. Tjernø
|
||||||
Contributed updated and improved xcode workspaces
|
Contributed updated and improved xcode workspaces
|
||||||
|
|
||||||
- drparallax
|
- drparallax
|
||||||
Contributed the /samples/SimpleAssimpViewX sample
|
Contributed the /samples/SimpleAssimpViewX sample
|
||||||
|
|
||||||
- Carsten Fuchs
|
- Carsten Fuchs
|
||||||
Contributed a fix for the Normalize method in aiQuaternion.
|
Contributed a fix for the Normalize method in aiQuaternion.
|
||||||
|
|
||||||
- dbburgess
|
- dbburgess
|
||||||
Contributes a Android-specific build issue: log the hardware architecture for ARM.
|
Contributes a Android-specific build issue: log the hardware architecture for ARM.
|
||||||
|
|
||||||
- alfiereinre7
|
- alfiereinre7
|
||||||
Contributes a obj-fileparser fix: missing tokens in the obj-token list.
|
Contributes a obj-fileparser fix: missing tokens in the obj-token list.
|
||||||
|
|
||||||
- Roman Kharitonov
|
- Roman Kharitonov
|
||||||
Contributes a fix for the configure script environment.
|
Contributes a fix for the configure script environment.
|
||||||
|
|
||||||
- Ed Diana
|
- Ed Diana
|
||||||
Contributed AssimpDelphi (/port/AssimpDelphi).
|
Contributed AssimpDelphi (/port/AssimpDelphi).
|
||||||
|
|
||||||
- rdb
|
- rdb
|
||||||
Contributes a bundle of fixes and improvements for the bsp-importer.
|
Contributes a bundle of fixes and improvements for the bsp-importer.
|
||||||
|
|
||||||
- Mick P
|
- Mick P
|
||||||
For contributing the De-bone postprocessing step and filing various bug reports.
|
For contributing the De-bone postprocessing step and filing various bug reports.
|
||||||
|
|
||||||
- Rosen Diankov
|
- Rosen Diankov
|
||||||
Contributed patches to build assimp debian packages using cmake.
|
Contributed patches to build assimp debian packages using cmake.
|
||||||
|
|
||||||
- Mark Page
|
- Mark Page
|
||||||
Contributed a patch to fix the VertexTriangleAdjacency postprocessing step.
|
Contributed a patch to fix the VertexTriangleAdjacency postprocessing step.
|
||||||
|
|
||||||
- IOhannes
|
- IOhannes
|
||||||
Contributed the Debian build fixes ( architecture macro ).
|
Contributed the Debian build fixes ( architecture macro ).
|
||||||
|
|
||||||
- gellule
|
- gellule
|
||||||
Several LWO and LWS fixes (pivoting).
|
Several LWO and LWS fixes (pivoting).
|
||||||
|
|
||||||
- Marcel Metz
|
- Marcel Metz
|
||||||
GCC/Linux fixes for the SimpleOpenGL sample.
|
GCC/Linux fixes for the SimpleOpenGL sample.
|
||||||
|
|
||||||
- Brian Miller
|
- Brian Miller
|
||||||
Bugfix for a compiler fix for iOS on arm.
|
Bugfix for a compiler fix for iOS on arm.
|
||||||
|
|
||||||
- S<EFBFBD>verin Lemaignan
|
- SĂ©verin Lemaignan
|
||||||
Rewrite of PyAssimp, distutils and Python3 support
|
Rewrite of PyAssimp, distutils and Python3 support
|
||||||
|
|
||||||
- albert-wang
|
- albert-wang
|
||||||
Bugfixes for the collada parser
|
Bugfixes for the collada parser
|
||||||
|
|
||||||
- Ya ping Jin
|
- Ya ping Jin
|
||||||
Bugfixes for uv-tanget calculation.
|
Bugfixes for uv-tanget calculation.
|
||||||
|
|
||||||
- Jonne Nauha
|
- Jonne Nauha
|
||||||
Ogre Binary format support
|
Ogre Binary format support
|
||||||
|
|
||||||
- Filip Wasil, Tieto Poland Sp. z o.o.
|
- Filip Wasil, Tieto Poland Sp. z o.o.
|
||||||
Android JNI asset extraction support
|
Android JNI asset extraction support
|
||||||
|
|
||||||
- Richard Steffen
|
- Richard Steffen
|
||||||
Contributed ExportProperties interface
|
Contributed ExportProperties interface
|
||||||
Contributed X File exporter
|
Contributed X File exporter
|
||||||
Contributed Step (stp) exporter
|
Contributed Step (stp) exporter
|
||||||
|
|
||||||
|
|
||||||
|
|
156
LICENSE
156
LICENSE
|
@ -1,78 +1,78 @@
|
||||||
Open Asset Import Library (assimp)
|
Open Asset Import Library (assimp)
|
||||||
|
|
||||||
Copyright (c) 2006-2016, assimp team
|
Copyright (c) 2006-2016, assimp team
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
|
|
||||||
Redistribution and use of this software in source and binary forms,
|
Redistribution and use of this software in source and binary forms,
|
||||||
with or without modification, are permitted provided that the
|
with or without modification, are permitted provided that the
|
||||||
following conditions are met:
|
following conditions are met:
|
||||||
|
|
||||||
* Redistributions of source code must retain the above
|
* Redistributions of source code must retain the above
|
||||||
copyright notice, this list of conditions and the
|
copyright notice, this list of conditions and the
|
||||||
following disclaimer.
|
following disclaimer.
|
||||||
|
|
||||||
* Redistributions in binary form must reproduce the above
|
* Redistributions in binary form must reproduce the above
|
||||||
copyright notice, this list of conditions and the
|
copyright notice, this list of conditions and the
|
||||||
following disclaimer in the documentation and/or other
|
following disclaimer in the documentation and/or other
|
||||||
materials provided with the distribution.
|
materials provided with the distribution.
|
||||||
|
|
||||||
* Neither the name of the assimp team, nor the names of its
|
* Neither the name of the assimp team, nor the names of its
|
||||||
contributors may be used to endorse or promote products
|
contributors may be used to endorse or promote products
|
||||||
derived from this software without specific prior
|
derived from this software without specific prior
|
||||||
written permission of the assimp team.
|
written permission of the assimp team.
|
||||||
|
|
||||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||||
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
|
|
||||||
AN EXCEPTION applies to all files in the ./test/models-nonbsd folder.
|
AN EXCEPTION applies to all files in the ./test/models-nonbsd folder.
|
||||||
These are 3d models for testing purposes, from various free sources
|
These are 3d models for testing purposes, from various free sources
|
||||||
on the internet. They are - unless otherwise stated - copyright of
|
on the internet. They are - unless otherwise stated - copyright of
|
||||||
their respective creators, which may impose additional requirements
|
their respective creators, which may impose additional requirements
|
||||||
on the use of their work. For any of these models, see
|
on the use of their work. For any of these models, see
|
||||||
<model-name>.source.txt for more legal information. Contact us if you
|
<model-name>.source.txt for more legal information. Contact us if you
|
||||||
are a copyright holder and believe that we credited you inproperly or
|
are a copyright holder and believe that we credited you inproperly or
|
||||||
if you don't want your files to appear in the repository.
|
if you don't want your files to appear in the repository.
|
||||||
|
|
||||||
|
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
|
|
||||||
Poly2Tri Copyright (c) 2009-2010, Poly2Tri Contributors
|
Poly2Tri Copyright (c) 2009-2010, Poly2Tri Contributors
|
||||||
http://code.google.com/p/poly2tri/
|
http://code.google.com/p/poly2tri/
|
||||||
|
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
Redistribution and use in source and binary forms, with or without modification,
|
Redistribution and use in source and binary forms, with or without modification,
|
||||||
are permitted provided that the following conditions are met:
|
are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
* Redistributions of source code must retain the above copyright notice,
|
* Redistributions of source code must retain the above copyright notice,
|
||||||
this list of conditions and the following disclaimer.
|
this list of conditions and the following disclaimer.
|
||||||
* Redistributions in binary form must reproduce the above copyright notice,
|
* Redistributions in binary form must reproduce the above copyright notice,
|
||||||
this list of conditions and the following disclaimer in the documentation
|
this list of conditions and the following disclaimer in the documentation
|
||||||
and/or other materials provided with the distribution.
|
and/or other materials provided with the distribution.
|
||||||
* Neither the name of Poly2Tri nor the names of its contributors may be
|
* Neither the name of Poly2Tri nor the names of its contributors may be
|
||||||
used to endorse or promote products derived from this software without specific
|
used to endorse or promote products derived from this software without specific
|
||||||
prior written permission.
|
prior written permission.
|
||||||
|
|
||||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||||
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||||
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
291
Readme.md
291
Readme.md
|
@ -1,143 +1,148 @@
|
||||||
Open Asset Import Library (assimp)
|
Open Asset Import Library (assimp)
|
||||||
==================================
|
==================================
|
||||||
|
|
||||||
[![Linux Build Status](https://travis-ci.org/assimp/assimp.svg)](https://travis-ci.org/assimp/assimp)
|
[![Linux Build Status](https://travis-ci.org/assimp/assimp.svg)](https://travis-ci.org/assimp/assimp)
|
||||||
[![Windows Build Status](https://ci.appveyor.com/api/projects/status/tmo433wax6u6cjp4?svg=true)](https://ci.appveyor.com/project/kimkulling/assimp)
|
[![Windows Build Status](https://ci.appveyor.com/api/projects/status/tmo433wax6u6cjp4?svg=true)](https://ci.appveyor.com/project/kimkulling/assimp)
|
||||||
<a href="https://scan.coverity.com/projects/5607">
|
<a href="https://scan.coverity.com/projects/5607">
|
||||||
<img alt="Coverity Scan Build Status"
|
<img alt="Coverity Scan Build Status"
|
||||||
src="https://scan.coverity.com/projects/5607/badge.svg"/>
|
src="https://scan.coverity.com/projects/5607/badge.svg"/>
|
||||||
</a>
|
</a>
|
||||||
[![Coverage Status](https://coveralls.io/repos/github/assimp/assimp/badge.svg?branch=master)](https://coveralls.io/github/assimp/assimp?branch=master)
|
[![Coverage Status](https://coveralls.io/repos/github/assimp/assimp/badge.svg?branch=master)](https://coveralls.io/github/assimp/assimp?branch=master)
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
APIs are provided for C and C++. There are various bindings to other languages (C#, Java, Python, Delphi, D). Assimp also runs on Android and iOS.
|
APIs are provided for C and C++. There are various bindings to other languages (C#, Java, Python, Delphi, D). Assimp also runs on Android and iOS.
|
||||||
|
|
||||||
Additionally, assimp features various __mesh post processing tools__: normals and tangent space generation, triangulation, vertex cache locality optimization, removal of degenerate primitives and duplicate vertices, sorting by primitive type, merging of redundant materials and many more.
|
Additionally, assimp features various __mesh post processing tools__: normals and tangent space generation, triangulation, vertex cache locality optimization, removal of degenerate primitives and duplicate vertices, sorting by primitive type, merging of redundant materials and many more.
|
||||||
|
|
||||||
This is the development trunk containing the latest features and bugfixes. For productive use though, we recommend one of the stable releases available from [assimp.sf.net](http://assimp.sf.net) or from *nix package repositories.
|
This is the development trunk containing the latest features and bugfixes. For productive use though, we recommend one of the stable releases available from [assimp.sf.net](http://assimp.sf.net) or from *nix package repositories.
|
||||||
The current build status is:
|
The current build status is:
|
||||||
|
|
||||||
Gitter chat: [![Join the chat at https://gitter.im/assimp/assimp](https://badges.gitter.im/assimp/assimp.svg)](https://gitter.im/assimp/assimp?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)<br>
|
Gitter chat: [![Join the chat at https://gitter.im/assimp/assimp](https://badges.gitter.im/assimp/assimp.svg)](https://gitter.im/assimp/assimp?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)<br>
|
||||||
__[open3mod](https://github.com/acgessler/open3mod) is a powerful 3D model viewer based on Assimp's import and export abilities.__
|
|
||||||
|
And we also have an IRC-channel at freenode: #assetimporterlib . You can easily join us via: [KiwiIRC/freenote](https://kiwiirc.com/client/irc.freenode.net), choose your nickname and type
|
||||||
Please check our Wiki as well: https://github.com/assimp/assimp/wiki
|
> /join #assetimporterlib
|
||||||
|
|
||||||
#### Supported file formats ####
|
<br>
|
||||||
|
__[open3mod](https://github.com/acgessler/open3mod) is a powerful 3D model viewer based on Assimp's import and export abilities.__
|
||||||
A full list [is here](http://assimp.org/main_features_formats.html).
|
|
||||||
__Importers__:
|
Please check our Wiki as well: https://github.com/assimp/assimp/wiki
|
||||||
|
|
||||||
- 3DS
|
#### Supported file formats ####
|
||||||
- BLEND (Blender)
|
|
||||||
- DAE/Collada
|
A full list [is here](http://assimp.org/main_features_formats.html).
|
||||||
- FBX
|
__Importers__:
|
||||||
- IFC-STEP
|
|
||||||
- ASE
|
- 3DS
|
||||||
- DXF
|
- BLEND (Blender)
|
||||||
- HMP
|
- DAE/Collada
|
||||||
- MD2
|
- FBX
|
||||||
- MD3
|
- IFC-STEP
|
||||||
- MD5
|
- ASE
|
||||||
- MDC
|
- DXF
|
||||||
- MDL
|
- HMP
|
||||||
- NFF
|
- MD2
|
||||||
- PLY
|
- MD3
|
||||||
- STL
|
- MD5
|
||||||
- X
|
- MDC
|
||||||
- OBJ
|
- MDL
|
||||||
- OpenGEX
|
- NFF
|
||||||
- SMD
|
- PLY
|
||||||
- LWO
|
- STL
|
||||||
- LXO
|
- X
|
||||||
- LWS
|
- OBJ
|
||||||
- TER
|
- OpenGEX
|
||||||
- AC3D
|
- SMD
|
||||||
- MS3D
|
- LWO
|
||||||
- COB
|
- LXO
|
||||||
- Q3BSP
|
- LWS
|
||||||
- XGL
|
- TER
|
||||||
- CSM
|
- AC3D
|
||||||
- BVH
|
- MS3D
|
||||||
- B3D
|
- COB
|
||||||
- NDO
|
- Q3BSP
|
||||||
- Ogre Binary
|
- XGL
|
||||||
- Ogre XML
|
- CSM
|
||||||
- Q3D
|
- BVH
|
||||||
- ASSBIN (Assimp custom format)
|
- B3D
|
||||||
- glTF (partial)
|
- NDO
|
||||||
- 3MF
|
- Ogre Binary
|
||||||
|
- Ogre XML
|
||||||
Additionally, some formats are supported by dependency on non-free code or external SDKs (not built by default):
|
- Q3D
|
||||||
|
- ASSBIN (Assimp custom format)
|
||||||
- C4D (https://github.com/acgessler/assimp-cinema4d)
|
- glTF (partial)
|
||||||
|
- 3MF
|
||||||
__Exporters__:
|
|
||||||
|
Additionally, some formats are supported by dependency on non-free code or external SDKs (not built by default):
|
||||||
- DAE (Collada)
|
|
||||||
- STL
|
- C4D (https://github.com/acgessler/assimp-cinema4d)
|
||||||
- OBJ
|
|
||||||
- PLY
|
__Exporters__:
|
||||||
- X
|
|
||||||
- 3DS
|
- DAE (Collada)
|
||||||
- JSON (for WebGl, via https://github.com/acgessler/assimp2json)
|
- STL
|
||||||
- ASSBIN
|
- OBJ
|
||||||
- STEP
|
- PLY
|
||||||
- glTF (partial)
|
- X
|
||||||
|
- 3DS
|
||||||
### Building ###
|
- JSON (for WebGl, via https://github.com/acgessler/assimp2json)
|
||||||
Take a look into the `INSTALL` file. Our build system is CMake, if you used CMake before there is a good chance you know what to do.
|
- ASSBIN
|
||||||
|
- STEP
|
||||||
### Ports ###
|
- glTF (partial)
|
||||||
* [Android](port/AndroidJNI/README.md)
|
|
||||||
* [Python](port/PyAssimp/README.md)
|
### Building ###
|
||||||
* [.NET](port/AssimpNET/Readme.md)
|
Take a look into the `INSTALL` file. Our build system is CMake, if you used CMake before there is a good chance you know what to do.
|
||||||
* [Pascal](port/AssimpPascal/Readme.md)
|
|
||||||
* [Javascript (Alpha)](https://github.com/makc/assimp2json)
|
### Ports ###
|
||||||
|
* [Android](port/AndroidJNI/README.md)
|
||||||
#### Repository structure ####
|
* [Python](port/PyAssimp/README.md)
|
||||||
Open Asset Import Library is implemented in C++. The directory structure is:
|
* [.NET](port/AssimpNET/Readme.md)
|
||||||
|
* [Pascal](port/AssimpPascal/Readme.md)
|
||||||
/code Source code
|
* [Javascript (Alpha)](https://github.com/makc/assimp2json)
|
||||||
/contrib Third-party libraries
|
|
||||||
/doc Documentation (doxysource and pre-compiled docs)
|
#### Repository structure ####
|
||||||
/include Public header C and C++ header files
|
Open Asset Import Library is implemented in C++. The directory structure is:
|
||||||
/scripts Scripts used to generate the loading code for some formats
|
|
||||||
/port Ports to other languages and scripts to maintain those.
|
/code Source code
|
||||||
/test Unit- and regression tests, test suite of models
|
/contrib Third-party libraries
|
||||||
/tools Tools (old assimp viewer, command line `assimp`)
|
/doc Documentation (doxysource and pre-compiled docs)
|
||||||
/samples A small number of samples to illustrate possible
|
/include Public header C and C++ header files
|
||||||
use cases for Assimp
|
/scripts Scripts used to generate the loading code for some formats
|
||||||
/workspaces Build environments for vc,xcode,... (deprecated,
|
/port Ports to other languages and scripts to maintain those.
|
||||||
CMake has superseeded all legacy build options!)
|
/test Unit- and regression tests, test suite of models
|
||||||
|
/tools Tools (old assimp viewer, command line `assimp`)
|
||||||
|
/samples A small number of samples to illustrate possible
|
||||||
### Where to get help ###
|
use cases for Assimp
|
||||||
For more information, visit [our website](http://assimp.org/). Or check out the `./doc`- folder, which contains the official documentation in HTML format.
|
/workspaces Build environments for vc,xcode,... (deprecated,
|
||||||
(CHMs for Windows are included in some release packages and should be located right here in the root folder).
|
CMake has superseeded all legacy build options!)
|
||||||
|
|
||||||
If the docs don't solve your problem, ask on [StackOverflow](http://stackoverflow.com/questions/tagged/assimp?sort=newest). If you think you found a bug, please open an issue on Github.
|
|
||||||
|
### Where to get help ###
|
||||||
For development discussions, there is also a (very low-volume) mailing list, _assimp-discussions_
|
For more information, visit [our website](http://assimp.org/). Or check out the `./doc`- folder, which contains the official documentation in HTML format.
|
||||||
[(subscribe here)]( https://lists.sourceforge.net/lists/listinfo/assimp-discussions)
|
(CHMs for Windows are included in some release packages and should be located right here in the root folder).
|
||||||
|
|
||||||
Open Asset Import Library is a library to load various 3d file formats into a shared, in-memory format. It supports more than __40 file formats__ for import and a growing selection of file formats for export.
|
If the docs don't solve your problem, ask on [StackOverflow](http://stackoverflow.com/questions/tagged/assimp?sort=newest). If you think you found a bug, please open an issue on Github.
|
||||||
|
|
||||||
And we also have a Gitter-channel:Gitter [![Join the chat at https://gitter.im/assimp/assimp](https://badges.gitter.im/assimp/assimp.svg)](https://gitter.im/assimp/assimp?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)<br>
|
For development discussions, there is also a (very low-volume) mailing list, _assimp-discussions_
|
||||||
|
[(subscribe here)]( https://lists.sourceforge.net/lists/listinfo/assimp-discussions)
|
||||||
### Contributing ###
|
|
||||||
Contributions to assimp are highly appreciated. The easiest way to get involved is to submit
|
Open Asset Import Library is a library to load various 3d file formats into a shared, in-memory format. It supports more than __40 file formats__ for import and a growing selection of file formats for export.
|
||||||
a pull request with your changes against the main repository's `master` branch.
|
|
||||||
|
And we also have a Gitter-channel:Gitter [![Join the chat at https://gitter.im/assimp/assimp](https://badges.gitter.im/assimp/assimp.svg)](https://gitter.im/assimp/assimp?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)<br>
|
||||||
### Donate ###
|
|
||||||
If you like assimp, consider buying us a beer (or two):
|
### Contributing ###
|
||||||
[Donate](http://sourceforge.net/donate/index.php?group_id=226462)
|
Contributions to assimp are highly appreciated. The easiest way to get involved is to submit
|
||||||
|
a pull request with your changes against the main repository's `master` branch.
|
||||||
### License ###
|
|
||||||
Our license is based on the modified, __3-clause BSD__-License.
|
### Donate ###
|
||||||
|
If you like assimp, consider buying us a beer (or two):
|
||||||
An _informal_ summary is: do whatever you want, but include Assimp's license text with your product -
|
[Donate](http://sourceforge.net/donate/index.php?group_id=226462)
|
||||||
and don't sue us if our code doesn't work. Note that, unlike LGPLed code, you may link statically to Assimp.
|
|
||||||
For the legal details, see the `LICENSE` file.
|
### License ###
|
||||||
|
Our license is based on the modified, __3-clause BSD__-License.
|
||||||
### Why this name ###
|
|
||||||
Sorry, we're germans :-), no english native speakers ...
|
An _informal_ summary is: do whatever you want, but include Assimp's license text with your product -
|
||||||
|
and don't sue us if our code doesn't work. Note that, unlike LGPLed code, you may link statically to Assimp.
|
||||||
|
For the legal details, see the `LICENSE` file.
|
||||||
|
|
||||||
|
### Why this name ###
|
||||||
|
Sorry, we're germans :-), no english native speakers ...
|
||||||
|
|
|
@ -59,10 +59,13 @@ endmacro(clear_if_changed)
|
||||||
|
|
||||||
# Try to get some hints from pkg-config, if available
|
# Try to get some hints from pkg-config, if available
|
||||||
macro(use_pkgconfig PREFIX PKGNAME)
|
macro(use_pkgconfig PREFIX PKGNAME)
|
||||||
find_package(PkgConfig)
|
# Android does not support PKG_CONFIG so we disable it
|
||||||
if (PKG_CONFIG_FOUND)
|
IF ( NOT ANDROID )
|
||||||
pkg_check_modules(${PREFIX} ${PKGNAME})
|
find_package(PkgConfig)
|
||||||
endif ()
|
if (PKG_CONFIG_FOUND)
|
||||||
|
pkg_check_modules(${PREFIX} ${PKGNAME})
|
||||||
|
endif ()
|
||||||
|
ENDIF ( NOT ANDROID )
|
||||||
endmacro (use_pkgconfig)
|
endmacro (use_pkgconfig)
|
||||||
|
|
||||||
# Couple a set of release AND debug libraries (or frameworks)
|
# Couple a set of release AND debug libraries (or frameworks)
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
# Once done, this will define
|
# Once done, this will define
|
||||||
#
|
#
|
||||||
# ZLIB_FOUND - system has ZLIB
|
# ZLIB_FOUND - system has ZLIB
|
||||||
# ZLIB_INCLUDE_DIRS - the ZLIB include directories
|
# ZLIB_INCLUDE_DIRS - the ZLIB include directories
|
||||||
# ZLIB_LIBRARIES - link these to use ZLIB
|
# ZLIB_LIBRARIES - link these to use ZLIB
|
||||||
|
|
||||||
include(FindPkgMacros)
|
include(FindPkgMacros)
|
||||||
|
|
|
@ -1857,7 +1857,7 @@ void Parser::ParseLV3MeshCFaceListBlock(unsigned int iNumFaces, ASE::Mesh& mesh)
|
||||||
++filePtr;
|
++filePtr;
|
||||||
|
|
||||||
// Face entry
|
// Face entry
|
||||||
if (TokenMatch(filePtr,"MESH_CFACE" ,11))
|
if (TokenMatch(filePtr,"MESH_CFACE" ,10))
|
||||||
{
|
{
|
||||||
unsigned int aiValues[3];
|
unsigned int aiValues[3];
|
||||||
unsigned int iIndex = 0;
|
unsigned int iIndex = 0;
|
||||||
|
|
|
@ -166,6 +166,7 @@ void BlenderImporter::InternReadFile( const std::string& pFile,
|
||||||
free_it free_it_really(dest);
|
free_it free_it_really(dest);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
FileDatabase file;
|
FileDatabase file;
|
||||||
std::shared_ptr<IOStream> stream(pIOHandler->Open(pFile,"rb"));
|
std::shared_ptr<IOStream> stream(pIOHandler->Open(pFile,"rb"));
|
||||||
if (!stream) {
|
if (!stream) {
|
||||||
|
|
|
@ -44,8 +44,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
#ifndef ASSIMP_BUILD_NO_BLEND_IMPORTER
|
#ifndef ASSIMP_BUILD_NO_BLEND_IMPORTER
|
||||||
|
|
||||||
#include "BlenderDNA.h"
|
|
||||||
#include "BlenderScene.h"
|
#include "BlenderScene.h"
|
||||||
|
#include "BlenderSceneGen.h"
|
||||||
|
#include "BlenderDNA.h"
|
||||||
|
|
||||||
using namespace Assimp;
|
using namespace Assimp;
|
||||||
using namespace Assimp::Blender;
|
using namespace Assimp::Blender;
|
||||||
|
|
|
@ -187,10 +187,16 @@ IF ( ASSIMP_BUILD_NONFREE_C4D_IMPORTER )
|
||||||
SOURCE_GROUP( C4D FILES ${C4D_SRCS})
|
SOURCE_GROUP( C4D FILES ${C4D_SRCS})
|
||||||
ENDIF ( ASSIMP_BUILD_NONFREE_C4D_IMPORTER )
|
ENDIF ( ASSIMP_BUILD_NONFREE_C4D_IMPORTER )
|
||||||
|
|
||||||
|
# if this variable is set to TRUE, the user can manually disable importers by setting
|
||||||
|
# ASSIMP_BUILD_XXX_IMPORTER to FALSE for each importer
|
||||||
|
# if this variable is set to FALSE, the user can manually enable importers by setting
|
||||||
|
# ASSIMP_BUILD_XXX_IMPORTER to TRUE for each importer
|
||||||
|
OPTION(ASSIMP_BUILD_ALL_IMPORTERS_BY_DEFAULT "default value of all ASSIMP_BUILD_XXX_IMPORTER value" TRUE)
|
||||||
|
|
||||||
# macro to add the CMake Option ADD_ASSIMP_IMPORTER_<name> which enables compile of loader
|
# macro to add the CMake Option ADD_ASSIMP_IMPORTER_<name> which enables compile of loader
|
||||||
# this way selective loaders can be compiled (reduces filesize + compile time)
|
# this way selective loaders can be compiled (reduces filesize + compile time)
|
||||||
MACRO(ADD_ASSIMP_IMPORTER name)
|
MACRO(ADD_ASSIMP_IMPORTER name)
|
||||||
OPTION(ASSIMP_BUILD_${name}_IMPORTER "build the ${name} importer" TRUE)
|
OPTION(ASSIMP_BUILD_${name}_IMPORTER "build the ${name} importer" ${ASSIMP_BUILD_ALL_IMPORTERS_BY_DEFAULT})
|
||||||
IF(ASSIMP_BUILD_${name}_IMPORTER)
|
IF(ASSIMP_BUILD_${name}_IMPORTER)
|
||||||
LIST(APPEND ASSIMP_LOADER_SRCS ${ARGN})
|
LIST(APPEND ASSIMP_LOADER_SRCS ${ARGN})
|
||||||
SET(ASSIMP_IMPORTERS_ENABLED "${ASSIMP_IMPORTERS_ENABLED} ${name}")
|
SET(ASSIMP_IMPORTERS_ENABLED "${ASSIMP_IMPORTERS_ENABLED} ${name}")
|
||||||
|
|
|
@ -49,7 +49,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#include "StringComparison.h"
|
#include "StringComparison.h"
|
||||||
#include "StringUtils.h"
|
#include "StringUtils.h"
|
||||||
|
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <map>
|
#include <map>
|
||||||
|
@ -63,7 +62,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
namespace Assimp {
|
namespace Assimp {
|
||||||
namespace D3MF {
|
namespace D3MF {
|
||||||
|
|
||||||
|
|
||||||
namespace XmlTag {
|
namespace XmlTag {
|
||||||
static const std::string model = "model";
|
static const std::string model = "model";
|
||||||
static const std::string metadata = "metadata";
|
static const std::string metadata = "metadata";
|
||||||
|
|
|
@ -125,7 +125,7 @@ size_t DefaultIOStream::FileSize() const
|
||||||
if (0 != err)
|
if (0 != err)
|
||||||
return 0;
|
return 0;
|
||||||
mCachedSize = (size_t) (fileStat.st_size);
|
mCachedSize = (size_t) (fileStat.st_size);
|
||||||
#elif defined __GNUC__ || defined __APPLE__ || defined __MACH__
|
#elif defined __GNUC__ || defined __APPLE__ || defined __MACH__ || defined __FreeBSD__
|
||||||
struct stat fileStat;
|
struct stat fileStat;
|
||||||
int err = stat(mFilename.c_str(), &fileStat );
|
int err = stat(mFilename.c_str(), &fileStat );
|
||||||
if (0 != err)
|
if (0 != err)
|
||||||
|
|
|
@ -44,6 +44,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#ifndef INCLUDED_AI_FBX_COMPILECONFIG_H
|
#ifndef INCLUDED_AI_FBX_COMPILECONFIG_H
|
||||||
#define INCLUDED_AI_FBX_COMPILECONFIG_H
|
#define INCLUDED_AI_FBX_COMPILECONFIG_H
|
||||||
|
|
||||||
|
#include <map>
|
||||||
|
|
||||||
//
|
//
|
||||||
#if _MSC_VER > 1500 || (defined __GNUC___)
|
#if _MSC_VER > 1500 || (defined __GNUC___)
|
||||||
# define ASSIMP_FBX_USE_UNORDERED_MULTIMAP
|
# define ASSIMP_FBX_USE_UNORDERED_MULTIMAP
|
||||||
|
|
|
@ -55,7 +55,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <functional>
|
#include <functional>
|
||||||
|
#include <map>
|
||||||
|
|
||||||
namespace Assimp {
|
namespace Assimp {
|
||||||
namespace FBX {
|
namespace FBX {
|
||||||
|
|
|
@ -51,7 +51,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
# include "../contrib/zlib/zlib.h"
|
# include "../contrib/zlib/zlib.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#include "FBXTokenizer.h"
|
#include "FBXTokenizer.h"
|
||||||
#include "FBXParser.h"
|
#include "FBXParser.h"
|
||||||
#include "FBXUtil.h"
|
#include "FBXUtil.h"
|
||||||
|
|
|
@ -46,11 +46,13 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
#include "FBXCompileConfig.h"
|
#include "FBXCompileConfig.h"
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
#include <string>
|
||||||
|
|
||||||
namespace Assimp {
|
namespace Assimp {
|
||||||
namespace FBX {
|
namespace FBX {
|
||||||
|
|
||||||
class Element;
|
// Forward declarations
|
||||||
|
class Element;
|
||||||
|
|
||||||
|
|
||||||
/** Represents a dynamic property. Type info added by deriving classes,
|
/** Represents a dynamic property. Type info added by deriving classes,
|
||||||
|
|
|
@ -47,6 +47,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#include "FBXCompileConfig.h"
|
#include "FBXCompileConfig.h"
|
||||||
#include <assimp/ai_assert.h>
|
#include <assimp/ai_assert.h>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
#include <string>
|
||||||
|
|
||||||
namespace Assimp {
|
namespace Assimp {
|
||||||
namespace FBX {
|
namespace FBX {
|
||||||
|
|
|
@ -46,6 +46,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#include "FBXTokenizer.h"
|
#include "FBXTokenizer.h"
|
||||||
|
|
||||||
#include "TinyFormatter.h"
|
#include "TinyFormatter.h"
|
||||||
|
#include <string>
|
||||||
|
|
||||||
#ifndef ASSIMP_BUILD_NO_FBX_IMPORTER
|
#ifndef ASSIMP_BUILD_NO_FBX_IMPORTER
|
||||||
|
|
||||||
|
|
|
@ -108,7 +108,7 @@ static const aiImporterDesc desc = {
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
"ifc ifczip"
|
"ifc ifczip stp"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -128,11 +128,9 @@ IFCImporter::~IFCImporter()
|
||||||
bool IFCImporter::CanRead( const std::string& pFile, IOSystem* pIOHandler, bool checkSig) const
|
bool IFCImporter::CanRead( const std::string& pFile, IOSystem* pIOHandler, bool checkSig) const
|
||||||
{
|
{
|
||||||
const std::string& extension = GetExtension(pFile);
|
const std::string& extension = GetExtension(pFile);
|
||||||
if (extension == "ifc" || extension == "ifczip") {
|
if (extension == "ifc" || extension == "ifczip" || extension == "stp" ) {
|
||||||
return true;
|
return true;
|
||||||
}
|
} else if ((!extension.length() || checkSig) && pIOHandler) {
|
||||||
|
|
||||||
else if ((!extension.length() || checkSig) && pIOHandler) {
|
|
||||||
// note: this is the common identification for STEP-encoded files, so
|
// note: this is the common identification for STEP-encoded files, so
|
||||||
// it is only unambiguous as long as we don't support any further
|
// it is only unambiguous as long as we don't support any further
|
||||||
// file formats with STEP as their encoding.
|
// file formats with STEP as their encoding.
|
||||||
|
|
|
@ -46,6 +46,9 @@ directly (unless you are adding new loaders), instead use the
|
||||||
corresponding preprocessor flag to selectively disable formats.
|
corresponding preprocessor flag to selectively disable formats.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <vector>
|
||||||
|
#include "BaseImporter.h"
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
// Importers
|
// Importers
|
||||||
// (include_new_importers_here)
|
// (include_new_importers_here)
|
||||||
|
|
|
@ -90,14 +90,16 @@ namespace
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
// Constructor to be privately used by Importer
|
// Constructor to be privately used by Importer
|
||||||
PLYImporter::PLYImporter()
|
PLYImporter::PLYImporter()
|
||||||
: mBuffer(),
|
: mBuffer()
|
||||||
pcDOM()
|
, pcDOM(){
|
||||||
{}
|
// empty
|
||||||
|
}
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
// Destructor, private as well
|
// Destructor, private as well
|
||||||
PLYImporter::~PLYImporter()
|
PLYImporter::~PLYImporter() {
|
||||||
{}
|
// empty
|
||||||
|
}
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
// Returns whether the class can handle the format of the given file.
|
// Returns whether the class can handle the format of the given file.
|
||||||
|
|
|
@ -206,29 +206,17 @@ PLY::ESemantic PLY::Property::ParseSemantic(const char* pCur,const char** pCurOu
|
||||||
else if (TokenMatch(pCur,"x",1))
|
else if (TokenMatch(pCur,"x",1))
|
||||||
{
|
{
|
||||||
eOut = PLY::EST_XCoord;
|
eOut = PLY::EST_XCoord;
|
||||||
}
|
} else if (TokenMatch(pCur,"y",1)) {
|
||||||
else if (TokenMatch(pCur,"y",1))
|
|
||||||
{
|
|
||||||
eOut = PLY::EST_YCoord;
|
eOut = PLY::EST_YCoord;
|
||||||
}
|
} else if (TokenMatch(pCur,"z",1)) {
|
||||||
else if (TokenMatch(pCur,"z",1))
|
|
||||||
{
|
|
||||||
eOut = PLY::EST_ZCoord;
|
eOut = PLY::EST_ZCoord;
|
||||||
}
|
} else if (TokenMatch(pCur,"nx",2)) {
|
||||||
else if (TokenMatch(pCur,"nx",2))
|
|
||||||
{
|
|
||||||
eOut = PLY::EST_XNormal;
|
eOut = PLY::EST_XNormal;
|
||||||
}
|
} else if (TokenMatch(pCur,"ny",2)) {
|
||||||
else if (TokenMatch(pCur,"ny",2))
|
|
||||||
{
|
|
||||||
eOut = PLY::EST_YNormal;
|
eOut = PLY::EST_YNormal;
|
||||||
}
|
} else if (TokenMatch(pCur,"nz",2)) {
|
||||||
else if (TokenMatch(pCur,"nz",2))
|
|
||||||
{
|
|
||||||
eOut = PLY::EST_ZNormal;
|
eOut = PLY::EST_ZNormal;
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
DefaultLogger::get()->info("Found unknown property semantic in file. This is ok");
|
DefaultLogger::get()->info("Found unknown property semantic in file. This is ok");
|
||||||
SkipLine(&pCur);
|
SkipLine(&pCur);
|
||||||
}
|
}
|
||||||
|
|
|
@ -290,12 +290,12 @@ private:
|
||||||
throw DeadlyImportError("End of file or stream limit was reached");
|
throw DeadlyImportError("End of file or stream limit was reached");
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __arm__
|
///*#ifdef __arm__
|
||||||
T f;
|
T f;
|
||||||
::memcpy (&f, current, sizeof(T));
|
::memcpy (&f, current, sizeof(T));
|
||||||
#else
|
//#else*/
|
||||||
T f = *((const T*)current);
|
// T f = *((const T*)current);
|
||||||
#endif
|
//#endif
|
||||||
Intern :: Getter<SwapEndianess,T,RuntimeSwitch>() (&f,le);
|
Intern :: Getter<SwapEndianess,T,RuntimeSwitch>() (&f,le);
|
||||||
|
|
||||||
current += sizeof(T);
|
current += sizeof(T);
|
||||||
|
|
|
@ -1,80 +1,80 @@
|
||||||
// Microsoft Visual C++ generated resource script.
|
// Microsoft Visual C++ generated resource script.
|
||||||
//
|
//
|
||||||
#include "resource.h"
|
#include "resource.h"
|
||||||
#include "..\..\revision.h"
|
#include "..\..\revision.h"
|
||||||
|
|
||||||
#define APSTUDIO_READONLY_SYMBOLS
|
#define APSTUDIO_READONLY_SYMBOLS
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
// Generated from the TEXTINCLUDE 2 resource.
|
// Generated from the TEXTINCLUDE 2 resource.
|
||||||
//
|
//
|
||||||
#define APSTUDIO_HIDDEN_SYMBOLS
|
#define APSTUDIO_HIDDEN_SYMBOLS
|
||||||
#include "windows.h"
|
#include "windows.h"
|
||||||
#undef APSTUDIO_HIDDEN_SYMBOLS
|
#undef APSTUDIO_HIDDEN_SYMBOLS
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
#undef APSTUDIO_READONLY_SYMBOLS
|
#undef APSTUDIO_READONLY_SYMBOLS
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Deutsch (Deutschland) resources
|
// Deutsch (Deutschland) resources
|
||||||
|
|
||||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_DEU)
|
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_DEU)
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
LANGUAGE LANG_GERMAN, SUBLANG_GERMAN
|
LANGUAGE LANG_GERMAN, SUBLANG_GERMAN
|
||||||
#pragma code_page(1252)
|
#pragma code_page(1252)
|
||||||
#endif //_WIN32
|
#endif //_WIN32
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
// Version
|
// Version
|
||||||
//
|
//
|
||||||
|
|
||||||
VS_VERSION_INFO VERSIONINFO
|
VS_VERSION_INFO VERSIONINFO
|
||||||
FILEVERSION 1,1,SVNRevision, 0
|
FILEVERSION 1,1,SVNRevision, 0
|
||||||
PRODUCTVERSION 1,1,SVNRevision,0
|
PRODUCTVERSION 1,1,SVNRevision,0
|
||||||
FILEFLAGSMASK 0x17L
|
FILEFLAGSMASK 0x17L
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
FILEFLAGS 0x1L
|
FILEFLAGS 0x1L
|
||||||
#else
|
#else
|
||||||
FILEFLAGS 0x0L
|
FILEFLAGS 0x0L
|
||||||
#endif
|
#endif
|
||||||
FILEOS 0x4L
|
FILEOS 0x4L
|
||||||
FILETYPE 0x7L
|
FILETYPE 0x7L
|
||||||
FILESUBTYPE 0x0L
|
FILESUBTYPE 0x0L
|
||||||
BEGIN
|
BEGIN
|
||||||
BLOCK "StringFileInfo"
|
BLOCK "StringFileInfo"
|
||||||
BEGIN
|
BEGIN
|
||||||
BLOCK "040704b0"
|
BLOCK "040704b0"
|
||||||
BEGIN
|
BEGIN
|
||||||
VALUE "Comments", "Licensed under a 3-clause BSD license"
|
VALUE "Comments", "Licensed under a 3-clause BSD license"
|
||||||
VALUE "CompanyName", "assimp team"
|
VALUE "CompanyName", "assimp team"
|
||||||
VALUE "FileDescription", "Open Asset Import Library"
|
VALUE "FileDescription", "Open Asset Import Library"
|
||||||
VALUE "FileVersion", 1,1,SVNRevision,0
|
VALUE "FileVersion", 1,1,SVNRevision,0
|
||||||
VALUE "InternalName", "assimp "
|
VALUE "InternalName", "assimp "
|
||||||
VALUE "LegalCopyright", "Copyright (C) 2006-2010"
|
VALUE "LegalCopyright", "Copyright (C) 2006-2010"
|
||||||
VALUE "OriginalFilename", "assimpNN.dll"
|
VALUE "OriginalFilename", "assimpNN.dll"
|
||||||
VALUE "ProductName", "Open Asset Import Library"
|
VALUE "ProductName", "Open Asset Import Library"
|
||||||
VALUE "ProductVersion", 1,1,SVNRevision,0
|
VALUE "ProductVersion", 1,1,SVNRevision,0
|
||||||
,0
|
,0
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
BLOCK "VarFileInfo"
|
BLOCK "VarFileInfo"
|
||||||
BEGIN
|
BEGIN
|
||||||
VALUE "Translation", 0x407, 1200
|
VALUE "Translation", 0x407, 1200
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
|
|
||||||
#endif // Deutsch (Deutschland) resources
|
#endif // Deutsch (Deutschland) resources
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
#ifndef APSTUDIO_INVOKED
|
#ifndef APSTUDIO_INVOKED
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
// Generated from the TEXTINCLUDE 3 resource.
|
// Generated from the TEXTINCLUDE 3 resource.
|
||||||
//
|
//
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
#endif // not APSTUDIO_INVOKED
|
#endif // not APSTUDIO_INVOKED
|
||||||
|
|
||||||
|
|
|
@ -1,72 +1,72 @@
|
||||||
/*
|
/*
|
||||||
* Poly2Tri Copyright (c) 2009-2010, Poly2Tri Contributors
|
* Poly2Tri Copyright (c) 2009-2010, Poly2Tri Contributors
|
||||||
* http://code.google.com/p/poly2tri/
|
* http://code.google.com/p/poly2tri/
|
||||||
*
|
*
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without modification,
|
* Redistribution and use in source and binary forms, with or without modification,
|
||||||
* are permitted provided that the following conditions are met:
|
* are permitted provided that the following conditions are met:
|
||||||
*
|
*
|
||||||
* * Redistributions of source code must retain the above copyright notice,
|
* * Redistributions of source code must retain the above copyright notice,
|
||||||
* this list of conditions and the following disclaimer.
|
* this list of conditions and the following disclaimer.
|
||||||
* * Redistributions in binary form must reproduce the above copyright notice,
|
* * Redistributions in binary form must reproduce the above copyright notice,
|
||||||
* this list of conditions and the following disclaimer in the documentation
|
* this list of conditions and the following disclaimer in the documentation
|
||||||
* and/or other materials provided with the distribution.
|
* and/or other materials provided with the distribution.
|
||||||
* * Neither the name of Poly2Tri nor the names of its contributors may be
|
* * Neither the name of Poly2Tri nor the names of its contributors may be
|
||||||
* used to endorse or promote products derived from this software without specific
|
* used to endorse or promote products derived from this software without specific
|
||||||
* prior written permission.
|
* prior written permission.
|
||||||
*
|
*
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||||
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||||
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||||
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
#include "cdt.h"
|
#include "cdt.h"
|
||||||
|
|
||||||
namespace p2t {
|
namespace p2t {
|
||||||
|
|
||||||
CDT::CDT(std::vector<Point*> polyline)
|
CDT::CDT(std::vector<Point*> polyline)
|
||||||
{
|
{
|
||||||
sweep_context_ = new SweepContext(polyline);
|
sweep_context_ = new SweepContext(polyline);
|
||||||
sweep_ = new Sweep;
|
sweep_ = new Sweep;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CDT::AddHole(std::vector<Point*> polyline)
|
void CDT::AddHole(std::vector<Point*> polyline)
|
||||||
{
|
{
|
||||||
sweep_context_->AddHole(polyline);
|
sweep_context_->AddHole(polyline);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CDT::AddPoint(Point* point) {
|
void CDT::AddPoint(Point* point) {
|
||||||
sweep_context_->AddPoint(point);
|
sweep_context_->AddPoint(point);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CDT::Triangulate()
|
void CDT::Triangulate()
|
||||||
{
|
{
|
||||||
sweep_->Triangulate(*sweep_context_);
|
sweep_->Triangulate(*sweep_context_);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<p2t::Triangle*> CDT::GetTriangles()
|
std::vector<p2t::Triangle*> CDT::GetTriangles()
|
||||||
{
|
{
|
||||||
return sweep_context_->GetTriangles();
|
return sweep_context_->GetTriangles();
|
||||||
}
|
}
|
||||||
|
|
||||||
std::list<p2t::Triangle*> CDT::GetMap()
|
std::list<p2t::Triangle*> CDT::GetMap()
|
||||||
{
|
{
|
||||||
return sweep_context_->GetMap();
|
return sweep_context_->GetMap();
|
||||||
}
|
}
|
||||||
|
|
||||||
CDT::~CDT()
|
CDT::~CDT()
|
||||||
{
|
{
|
||||||
delete sweep_context_;
|
delete sweep_context_;
|
||||||
delete sweep_;
|
delete sweep_;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -45,7 +45,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#ifndef AI_COLOR4D_H_INC
|
#ifndef AI_COLOR4D_H_INC
|
||||||
#define AI_COLOR4D_H_INC
|
#define AI_COLOR4D_H_INC
|
||||||
|
|
||||||
#include "./Compiler/pushpack1.h"
|
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
@ -89,7 +88,7 @@ public:
|
||||||
|
|
||||||
// Red, green, blue and alpha color values
|
// Red, green, blue and alpha color values
|
||||||
TReal r, g, b, a;
|
TReal r, g, b, a;
|
||||||
} PACK_STRUCT; // !struct aiColor4D
|
}; // !struct aiColor4D
|
||||||
|
|
||||||
typedef aiColor4t<ai_real> aiColor4D;
|
typedef aiColor4t<ai_real> aiColor4D;
|
||||||
|
|
||||||
|
@ -97,10 +96,8 @@ typedef aiColor4t<ai_real> aiColor4D;
|
||||||
|
|
||||||
struct aiColor4D {
|
struct aiColor4D {
|
||||||
ai_real r, g, b, a;
|
ai_real r, g, b, a;
|
||||||
} PACK_STRUCT;
|
};
|
||||||
|
|
||||||
#endif // __cplusplus
|
#endif // __cplusplus
|
||||||
|
|
||||||
#include "./Compiler/poppack1.h"
|
|
||||||
|
|
||||||
#endif // AI_COLOR4D_H_INC
|
#endif // AI_COLOR4D_H_INC
|
||||||
|
|
|
@ -76,12 +76,34 @@ AI_FORCE_INLINE const aiColor4t<TReal>& aiColor4t<TReal>::operator /= (TReal f)
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
template <typename TReal>
|
template <typename TReal>
|
||||||
AI_FORCE_INLINE TReal aiColor4t<TReal>::operator[](unsigned int i) const {
|
AI_FORCE_INLINE TReal aiColor4t<TReal>::operator[](unsigned int i) const {
|
||||||
return *(&r + i);
|
//return *(&r + i);
|
||||||
|
switch ( i ) {
|
||||||
|
case 0:
|
||||||
|
return r;
|
||||||
|
case 1:
|
||||||
|
return g;
|
||||||
|
case 2:
|
||||||
|
return b;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return r;
|
||||||
}
|
}
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
template <typename TReal>
|
template <typename TReal>
|
||||||
AI_FORCE_INLINE TReal& aiColor4t<TReal>::operator[](unsigned int i) {
|
AI_FORCE_INLINE TReal& aiColor4t<TReal>::operator[](unsigned int i) {
|
||||||
return *(&r + i);
|
// return *(&r + i);
|
||||||
|
switch ( i ) {
|
||||||
|
case 0:
|
||||||
|
return r;
|
||||||
|
case 1:
|
||||||
|
return g;
|
||||||
|
case 2:
|
||||||
|
return b;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return r;
|
||||||
}
|
}
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
template <typename TReal>
|
template <typename TReal>
|
||||||
|
|
|
@ -46,7 +46,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#ifndef AI_MATRIX3X3_H_INC
|
#ifndef AI_MATRIX3X3_H_INC
|
||||||
#define AI_MATRIX3X3_H_INC
|
#define AI_MATRIX3X3_H_INC
|
||||||
|
|
||||||
#include "./Compiler/pushpack1.h"
|
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
@ -153,7 +152,7 @@ public:
|
||||||
/** @brief A function for creating a rotation matrix that rotates a
|
/** @brief A function for creating a rotation matrix that rotates a
|
||||||
* vector called "from" into another vector called "to".
|
* vector called "from" into another vector called "to".
|
||||||
* Input : from[3], to[3] which both must be *normalized* non-zero vectors
|
* Input : from[3], to[3] which both must be *normalized* non-zero vectors
|
||||||
* Output: mtx[3][3] -- a 3x3 matrix in colum-major form
|
* Output: mtx[3][3] -- a 3x3 matrix in column-major form
|
||||||
* Authors: Tomas Möller, John Hughes
|
* Authors: Tomas Möller, John Hughes
|
||||||
* "Efficiently Building a Matrix to Rotate One Vector to Another"
|
* "Efficiently Building a Matrix to Rotate One Vector to Another"
|
||||||
* Journal of Graphics Tools, 4(4):1-4, 1999
|
* Journal of Graphics Tools, 4(4):1-4, 1999
|
||||||
|
@ -165,7 +164,7 @@ public:
|
||||||
TReal a1, a2, a3;
|
TReal a1, a2, a3;
|
||||||
TReal b1, b2, b3;
|
TReal b1, b2, b3;
|
||||||
TReal c1, c2, c3;
|
TReal c1, c2, c3;
|
||||||
} PACK_STRUCT;
|
};
|
||||||
|
|
||||||
typedef aiMatrix3x3t<ai_real> aiMatrix3x3;
|
typedef aiMatrix3x3t<ai_real> aiMatrix3x3;
|
||||||
|
|
||||||
|
@ -175,10 +174,8 @@ struct aiMatrix3x3 {
|
||||||
ai_real a1, a2, a3;
|
ai_real a1, a2, a3;
|
||||||
ai_real b1, b2, b3;
|
ai_real b1, b2, b3;
|
||||||
ai_real c1, c2, c3;
|
ai_real c1, c2, c3;
|
||||||
} PACK_STRUCT;
|
};
|
||||||
|
|
||||||
#endif // __cplusplus
|
#endif // __cplusplus
|
||||||
|
|
||||||
#include "./Compiler/poppack1.h"
|
|
||||||
|
|
||||||
#endif // AI_MATRIX3X3_H_INC
|
#endif // AI_MATRIX3X3_H_INC
|
||||||
|
|
|
@ -101,16 +101,34 @@ inline aiMatrix3x3t<TReal> aiMatrix3x3t<TReal>::operator* (const aiMatrix3x3t<TR
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
template <typename TReal>
|
template <typename TReal>
|
||||||
inline TReal* aiMatrix3x3t<TReal>::operator[] (unsigned int p_iIndex)
|
inline TReal* aiMatrix3x3t<TReal>::operator[] (unsigned int p_iIndex) {
|
||||||
{
|
switch ( p_iIndex ) {
|
||||||
return &this->a1 + p_iIndex * 3;
|
case 0:
|
||||||
|
return &a1;
|
||||||
|
case 1:
|
||||||
|
return &b1;
|
||||||
|
case 2:
|
||||||
|
return &c1;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return &a1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
template <typename TReal>
|
template <typename TReal>
|
||||||
inline const TReal* aiMatrix3x3t<TReal>::operator[] (unsigned int p_iIndex) const
|
inline const TReal* aiMatrix3x3t<TReal>::operator[] (unsigned int p_iIndex) const {
|
||||||
{
|
switch ( p_iIndex ) {
|
||||||
return &this->a1 + p_iIndex * 3;
|
case 0:
|
||||||
|
return &a1;
|
||||||
|
case 1:
|
||||||
|
return &b1;
|
||||||
|
case 2:
|
||||||
|
return &c1;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return &a1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -46,7 +46,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#define AI_MATRIX4X4_H_INC
|
#define AI_MATRIX4X4_H_INC
|
||||||
|
|
||||||
#include "vector3.h"
|
#include "vector3.h"
|
||||||
#include "./Compiler/pushpack1.h"
|
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
@ -257,7 +256,7 @@ public:
|
||||||
TReal b1, b2, b3, b4;
|
TReal b1, b2, b3, b4;
|
||||||
TReal c1, c2, c3, c4;
|
TReal c1, c2, c3, c4;
|
||||||
TReal d1, d2, d3, d4;
|
TReal d1, d2, d3, d4;
|
||||||
} PACK_STRUCT;
|
};
|
||||||
|
|
||||||
typedef aiMatrix4x4t<ai_real> aiMatrix4x4;
|
typedef aiMatrix4x4t<ai_real> aiMatrix4x4;
|
||||||
|
|
||||||
|
@ -268,11 +267,9 @@ struct aiMatrix4x4 {
|
||||||
ai_real b1, b2, b3, b4;
|
ai_real b1, b2, b3, b4;
|
||||||
ai_real c1, c2, c3, c4;
|
ai_real c1, c2, c3, c4;
|
||||||
ai_real d1, d2, d3, d4;
|
ai_real d1, d2, d3, d4;
|
||||||
} PACK_STRUCT;
|
};
|
||||||
|
|
||||||
|
|
||||||
#endif // __cplusplus
|
#endif // __cplusplus
|
||||||
|
|
||||||
#include "./Compiler/poppack1.h"
|
|
||||||
|
|
||||||
#endif // AI_MATRIX4X4_H_INC
|
#endif // AI_MATRIX4X4_H_INC
|
||||||
|
|
|
@ -243,9 +243,19 @@ inline TReal* aiMatrix4x4t<TReal>::operator[](unsigned int p_iIndex) {
|
||||||
if (p_iIndex > 3) {
|
if (p_iIndex > 3) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
switch ( p_iIndex ) {
|
||||||
// XXX this is UB. Has been for years. The fact that it works now does not make it better.
|
case 0:
|
||||||
return &this->a1 + p_iIndex * 4;
|
return &a1;
|
||||||
|
case 1:
|
||||||
|
return &b1;
|
||||||
|
case 2:
|
||||||
|
return &c1;
|
||||||
|
case 3:
|
||||||
|
return &d1;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return &a1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------------------
|
||||||
|
@ -255,8 +265,19 @@ inline const TReal* aiMatrix4x4t<TReal>::operator[](unsigned int p_iIndex) const
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
// XXX same
|
switch ( p_iIndex ) {
|
||||||
return &this->a1 + p_iIndex * 4;
|
case 0:
|
||||||
|
return &a1;
|
||||||
|
case 1:
|
||||||
|
return &b1;
|
||||||
|
case 2:
|
||||||
|
return &c1;
|
||||||
|
case 3:
|
||||||
|
return &d1;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return &a1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -51,7 +51,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
# include <math.h>
|
# include <math.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "./Compiler/pushpack1.h"
|
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
@ -126,7 +125,7 @@ public:
|
||||||
const aiVector3t SymMul(const aiVector3t& o);
|
const aiVector3t SymMul(const aiVector3t& o);
|
||||||
|
|
||||||
TReal x, y, z;
|
TReal x, y, z;
|
||||||
} PACK_STRUCT;
|
};
|
||||||
|
|
||||||
|
|
||||||
typedef aiVector3t<ai_real> aiVector3D;
|
typedef aiVector3t<ai_real> aiVector3D;
|
||||||
|
@ -135,16 +134,12 @@ typedef aiVector3t<ai_real> aiVector3D;
|
||||||
|
|
||||||
struct aiVector3D {
|
struct aiVector3D {
|
||||||
ai_real x, y, z;
|
ai_real x, y, z;
|
||||||
} PACK_STRUCT;
|
};
|
||||||
|
|
||||||
#endif // __cplusplus
|
#endif // __cplusplus
|
||||||
|
|
||||||
#include "./Compiler/poppack1.h"
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endif // __cplusplus
|
#endif // __cplusplus
|
||||||
|
|
||||||
#endif // AI_VECTOR3D_H_INC
|
#endif // AI_VECTOR3D_H_INC
|
||||||
|
|
|
@ -141,12 +141,34 @@ AI_FORCE_INLINE aiVector3t<TReal>& aiVector3t<TReal>::operator *= (const aiMatri
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
template <typename TReal>
|
template <typename TReal>
|
||||||
AI_FORCE_INLINE TReal aiVector3t<TReal>::operator[](unsigned int i) const {
|
AI_FORCE_INLINE TReal aiVector3t<TReal>::operator[](unsigned int i) const {
|
||||||
return *(&x + i);
|
// return *(&x + i);
|
||||||
|
switch (i) {
|
||||||
|
case 0:
|
||||||
|
return x;
|
||||||
|
case 1:
|
||||||
|
return y;
|
||||||
|
case 2:
|
||||||
|
return z;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return x;
|
||||||
}
|
}
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
template <typename TReal>
|
template <typename TReal>
|
||||||
AI_FORCE_INLINE TReal& aiVector3t<TReal>::operator[](unsigned int i) {
|
AI_FORCE_INLINE TReal& aiVector3t<TReal>::operator[](unsigned int i) {
|
||||||
return *(&x + i);
|
// return *(&x + i);
|
||||||
|
switch (i) {
|
||||||
|
case 0:
|
||||||
|
return x;
|
||||||
|
case 1:
|
||||||
|
return y;
|
||||||
|
case 2:
|
||||||
|
return z;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return x;
|
||||||
}
|
}
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
template <typename TReal>
|
template <typename TReal>
|
||||||
|
|
|
@ -46,7 +46,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#include <android/api-level.h>
|
#include <android/api-level.h>
|
||||||
#if __ANDROID__ and __ANDROID_API__ > 9 and defined(AI_CONFIG_ANDROID_JNI_ASSIMP_MANAGER_SUPPORT)
|
#if __ANDROID__ and __ANDROID_API__ > 9 and defined(AI_CONFIG_ANDROID_JNI_ASSIMP_MANAGER_SUPPORT)
|
||||||
|
|
||||||
|
#include <libgen.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include <sys/stat.h>
|
||||||
#include <android/log.h>
|
#include <android/log.h>
|
||||||
#include <android/asset_manager.h>
|
#include <android/asset_manager.h>
|
||||||
#include <android/asset_manager_jni.h>
|
#include <android/asset_manager_jni.h>
|
||||||
|
@ -100,6 +102,27 @@ void AndroidJNIIOSystem::AndroidActivityInit(ANativeActivity* activity)
|
||||||
mApkAssetManager = activity->assetManager;
|
mApkAssetManager = activity->assetManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ------------------------------------------------------------------------------------------------
|
||||||
|
// Create the directory for the extracted resource
|
||||||
|
static int mkpath(std::string path, mode_t mode)
|
||||||
|
{
|
||||||
|
if (mkdir(path.c_str(), mode) == -1) {
|
||||||
|
switch(errno) {
|
||||||
|
case ENOENT:
|
||||||
|
if (mkpath(path.substr(0, path.find_last_of('/')), mode) == -1)
|
||||||
|
return -1;
|
||||||
|
else
|
||||||
|
return mkdir(path.c_str(), mode);
|
||||||
|
case EEXIST:
|
||||||
|
return 0;
|
||||||
|
default:
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
// Extracts android asset
|
// Extracts android asset
|
||||||
bool AndroidJNIIOSystem::AndroidExtractAsset(std::string name)
|
bool AndroidJNIIOSystem::AndroidExtractAsset(std::string name)
|
||||||
|
@ -131,6 +154,15 @@ bool AndroidJNIIOSystem::AndroidExtractAsset(std::string name)
|
||||||
// Close
|
// Close
|
||||||
AAsset_close(asset);
|
AAsset_close(asset);
|
||||||
|
|
||||||
|
// Prepare directory for output buffer
|
||||||
|
std::string directoryNewPath = newPath;
|
||||||
|
directoryNewPath = dirname(&directoryNewPath[0]);
|
||||||
|
|
||||||
|
if (mkpath(directoryNewPath, S_IRUSR | S_IWUSR | S_IXUSR) == -1) {
|
||||||
|
__android_log_print(ANDROID_LOG_ERROR, "assimp",
|
||||||
|
"Can not create the directory for the output file");
|
||||||
|
}
|
||||||
|
|
||||||
// Prepare output buffer
|
// Prepare output buffer
|
||||||
std::ofstream assetExtracted(newPath.c_str(),
|
std::ofstream assetExtracted(newPath.c_str(),
|
||||||
std::ios::out | std::ios::binary);
|
std::ios::out | std::ios::binary);
|
||||||
|
|
|
@ -120,6 +120,7 @@ SET( TEST_SRCS
|
||||||
unit/utTypes.cpp
|
unit/utTypes.cpp
|
||||||
unit/utVertexTriangleAdjacency.cpp
|
unit/utVertexTriangleAdjacency.cpp
|
||||||
unit/utVersion.cpp
|
unit/utVersion.cpp
|
||||||
|
unit/utVector3.cpp
|
||||||
unit/utXImporterExporter.cpp
|
unit/utXImporterExporter.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# File produced by Open Asset Import Library (http://www.assimp.sf.net)
|
# File produced by Open Asset Import Library (http://www.assimp.sf.net)
|
||||||
# (assimp v3.3.721346005)
|
# (assimp v3.3.128220959)
|
||||||
|
|
||||||
mtllib spider.obj.mtl
|
mtllib spider.obj.mtl
|
||||||
|
|
||||||
|
@ -1780,8 +1780,8 @@ vn -0.7573840022087097 0.2233279943466187 -0.6135900020599365
|
||||||
vn -0.902417004108429 0.4006629884243011 -0.1584679931402206
|
vn -0.902417004108429 0.4006629884243011 -0.1584679931402206
|
||||||
vn -0.902417004108429 -0.2050659954547882 -0.3789339959621429
|
vn -0.902417004108429 -0.2050659954547882 -0.3789339959621429
|
||||||
|
|
||||||
# Mesh 'HLeib01_HLeib01_HLeib01_HLeib01_HLeib01_HLeib01_HLeib01_HLeib01_HLeib01_HLeib01_HLeib01_HLeib01_HLeib01_HLeib01_HLeib01_HLeib01' with 80 faces
|
# Mesh 'HLeib01' with 80 faces
|
||||||
g HLeib01_HLeib01_HLeib01_HLeib01_HLeib01_HLeib01_HLeib01_HLeib01_HLeib01_HLeib01_HLeib01_HLeib01_HLeib01_HLeib01_HLeib01_HLeib01
|
g HLeib01
|
||||||
usemtl HLeibTex
|
usemtl HLeibTex
|
||||||
f 1/1/1 2/2/2 3/3/3
|
f 1/1/1 2/2/2 3/3/3
|
||||||
f 4/4/4 3/3/3 5/5/5
|
f 4/4/4 3/3/3 5/5/5
|
||||||
|
@ -1864,8 +1864,8 @@ f 25/25/25 27/27/27 42/42/42
|
||||||
f 35/35/35 42/42/42 34/34/34
|
f 35/35/35 42/42/42 34/34/34
|
||||||
f 27/27/27 34/34/34 42/42/42
|
f 27/27/27 34/34/34 42/42/42
|
||||||
|
|
||||||
# Mesh 'OK_OK_OK_OK_OK_OK_OK_OK_OK_OK_OK_OK_OK_OK_OK_OK' with 60 faces
|
# Mesh 'OK' with 60 faces
|
||||||
g OK_OK_OK_OK_OK_OK_OK_OK_OK_OK_OK_OK_OK_OK_OK_OK
|
g OK
|
||||||
usemtl Skin
|
usemtl Skin
|
||||||
f 43/43/43 44/44/44 45/45/45
|
f 43/43/43 44/44/44 45/45/45
|
||||||
f 46/46/46 45/45/45 47/47/47
|
f 46/46/46 45/45/45 47/47/47
|
||||||
|
@ -1928,8 +1928,8 @@ f 53/53/53 66/63/66 52/52/52
|
||||||
f 78/67/78 52/52/52 66/63/66
|
f 78/67/78 52/52/52 66/63/66
|
||||||
f 67/64/67 69/63/69 79/67/79
|
f 67/64/67 69/63/69 79/67/79
|
||||||
|
|
||||||
# Mesh 'Bein1Li_Bein1Li_Bein1Li_Bein1Li_Bein1Li_Bein1Li_Bein1Li_Bein1Li_Bein1Li_Bein1Li_Bein1Li_Bein1Li_Bein1Li_Bein1Li_Bein1Li_Bein1Li' with 98 faces
|
# Mesh 'Bein1Li' with 98 faces
|
||||||
g Bein1Li_Bein1Li_Bein1Li_Bein1Li_Bein1Li_Bein1Li_Bein1Li_Bein1Li_Bein1Li_Bein1Li_Bein1Li_Bein1Li_Bein1Li_Bein1Li_Bein1Li_Bein1Li
|
g Bein1Li
|
||||||
usemtl BeinTex
|
usemtl BeinTex
|
||||||
f 80/68/80 81/68/80 82/68/80
|
f 80/68/80 81/68/80 82/68/80
|
||||||
f 83/68/81 84/68/81 85/68/81
|
f 83/68/81 84/68/81 85/68/81
|
||||||
|
@ -2030,8 +2030,8 @@ f 129/114/128 94/122/92 92/121/90
|
||||||
f 130/115/129 125/116/130 94/122/92
|
f 130/115/129 125/116/130 94/122/92
|
||||||
f 125/116/130 83/123/94 94/122/92
|
f 125/116/130 83/123/94 94/122/92
|
||||||
|
|
||||||
# Mesh 'Bein1Re_Bein1Re_Bein1Re_Bein1Re_Bein1Re_Bein1Re_Bein1Re_Bein1Re_Bein1Re_Bein1Re_Bein1Re_Bein1Re_Bein1Re_Bein1Re_Bein1Re_Bein1Re' with 98 faces
|
# Mesh 'Bein1Re' with 98 faces
|
||||||
g Bein1Re_Bein1Re_Bein1Re_Bein1Re_Bein1Re_Bein1Re_Bein1Re_Bein1Re_Bein1Re_Bein1Re_Bein1Re_Bein1Re_Bein1Re_Bein1Re_Bein1Re_Bein1Re
|
g Bein1Re
|
||||||
usemtl BeinTex
|
usemtl BeinTex
|
||||||
f 131/68/131 132/68/131 133/68/131
|
f 131/68/131 132/68/131 133/68/131
|
||||||
f 134/68/132 135/68/132 136/68/132
|
f 134/68/132 135/68/132 136/68/132
|
||||||
|
@ -2132,8 +2132,8 @@ f 143/121/141 146/122/144 180/114/179
|
||||||
f 146/122/144 176/116/181 181/115/180
|
f 146/122/144 176/116/181 181/115/180
|
||||||
f 146/122/144 136/123/145 176/116/181
|
f 146/122/144 136/123/145 176/116/181
|
||||||
|
|
||||||
# Mesh 'Bein2Li_Bein2Li_Bein2Li_Bein2Li_Bein2Li_Bein2Li_Bein2Li_Bein2Li_Bein2Li_Bein2Li_Bein2Li_Bein2Li_Bein2Li_Bein2Li_Bein2Li_Bein2Li' with 98 faces
|
# Mesh 'Bein2Li' with 98 faces
|
||||||
g Bein2Li_Bein2Li_Bein2Li_Bein2Li_Bein2Li_Bein2Li_Bein2Li_Bein2Li_Bein2Li_Bein2Li_Bein2Li_Bein2Li_Bein2Li_Bein2Li_Bein2Li_Bein2Li
|
g Bein2Li
|
||||||
usemtl BeinTex
|
usemtl BeinTex
|
||||||
f 182/68/182 183/68/182 184/68/182
|
f 182/68/182 183/68/182 184/68/182
|
||||||
f 185/68/183 186/68/183 187/68/183
|
f 185/68/183 186/68/183 187/68/183
|
||||||
|
@ -2234,8 +2234,8 @@ f 231/114/230 196/122/194 194/121/192
|
||||||
f 232/115/231 227/116/232 196/122/194
|
f 232/115/231 227/116/232 196/122/194
|
||||||
f 227/116/232 185/123/196 196/122/194
|
f 227/116/232 185/123/196 196/122/194
|
||||||
|
|
||||||
# Mesh 'Bein2Re_Bein2Re_Bein2Re_Bein2Re_Bein2Re_Bein2Re_Bein2Re_Bein2Re_Bein2Re_Bein2Re_Bein2Re_Bein2Re_Bein2Re_Bein2Re_Bein2Re_Bein2Re' with 98 faces
|
# Mesh 'Bein2Re' with 98 faces
|
||||||
g Bein2Re_Bein2Re_Bein2Re_Bein2Re_Bein2Re_Bein2Re_Bein2Re_Bein2Re_Bein2Re_Bein2Re_Bein2Re_Bein2Re_Bein2Re_Bein2Re_Bein2Re_Bein2Re
|
g Bein2Re
|
||||||
usemtl BeinTex
|
usemtl BeinTex
|
||||||
f 233/68/233 234/68/233 235/68/233
|
f 233/68/233 234/68/233 235/68/233
|
||||||
f 236/68/234 237/68/234 238/68/234
|
f 236/68/234 237/68/234 238/68/234
|
||||||
|
@ -2336,8 +2336,8 @@ f 245/121/243 248/122/246 282/114/281
|
||||||
f 248/122/246 278/116/283 283/115/282
|
f 248/122/246 278/116/283 283/115/282
|
||||||
f 248/122/246 238/123/247 278/116/283
|
f 248/122/246 238/123/247 278/116/283
|
||||||
|
|
||||||
# Mesh 'Bein3Re_Bein3Re_Bein3Re_Bein3Re_Bein3Re_Bein3Re_Bein3Re_Bein3Re_Bein3Re_Bein3Re_Bein3Re_Bein3Re_Bein3Re_Bein3Re_Bein3Re_Bein3Re' with 98 faces
|
# Mesh 'Bein3Re' with 98 faces
|
||||||
g Bein3Re_Bein3Re_Bein3Re_Bein3Re_Bein3Re_Bein3Re_Bein3Re_Bein3Re_Bein3Re_Bein3Re_Bein3Re_Bein3Re_Bein3Re_Bein3Re_Bein3Re_Bein3Re
|
g Bein3Re
|
||||||
usemtl BeinTex
|
usemtl BeinTex
|
||||||
f 284/68/284 285/68/284 286/68/284
|
f 284/68/284 285/68/284 286/68/284
|
||||||
f 287/68/285 288/68/285 289/68/285
|
f 287/68/285 288/68/285 289/68/285
|
||||||
|
@ -2438,8 +2438,8 @@ f 296/121/294 299/122/297 333/114/332
|
||||||
f 299/122/297 329/116/334 334/115/333
|
f 299/122/297 329/116/334 334/115/333
|
||||||
f 299/122/297 289/123/298 329/116/334
|
f 299/122/297 289/123/298 329/116/334
|
||||||
|
|
||||||
# Mesh 'Bein3Li_Bein3Li_Bein3Li_Bein3Li_Bein3Li_Bein3Li_Bein3Li_Bein3Li_Bein3Li_Bein3Li_Bein3Li_Bein3Li_Bein3Li_Bein3Li_Bein3Li_Bein3Li' with 98 faces
|
# Mesh 'Bein3Li' with 98 faces
|
||||||
g Bein3Li_Bein3Li_Bein3Li_Bein3Li_Bein3Li_Bein3Li_Bein3Li_Bein3Li_Bein3Li_Bein3Li_Bein3Li_Bein3Li_Bein3Li_Bein3Li_Bein3Li_Bein3Li
|
g Bein3Li
|
||||||
usemtl BeinTex
|
usemtl BeinTex
|
||||||
f 335/68/335 336/68/335 337/68/335
|
f 335/68/335 336/68/335 337/68/335
|
||||||
f 338/68/336 339/68/336 340/68/336
|
f 338/68/336 339/68/336 340/68/336
|
||||||
|
@ -2540,8 +2540,8 @@ f 384/114/383 349/122/347 347/121/345
|
||||||
f 385/115/384 380/116/385 349/122/347
|
f 385/115/384 380/116/385 349/122/347
|
||||||
f 380/116/385 338/123/349 349/122/347
|
f 380/116/385 338/123/349 349/122/347
|
||||||
|
|
||||||
# Mesh 'Bein4Re_Bein4Re_Bein4Re_Bein4Re_Bein4Re_Bein4Re_Bein4Re_Bein4Re_Bein4Re_Bein4Re_Bein4Re_Bein4Re_Bein4Re_Bein4Re_Bein4Re_Bein4Re' with 98 faces
|
# Mesh 'Bein4Re' with 98 faces
|
||||||
g Bein4Re_Bein4Re_Bein4Re_Bein4Re_Bein4Re_Bein4Re_Bein4Re_Bein4Re_Bein4Re_Bein4Re_Bein4Re_Bein4Re_Bein4Re_Bein4Re_Bein4Re_Bein4Re
|
g Bein4Re
|
||||||
usemtl BeinTex
|
usemtl BeinTex
|
||||||
f 386/68/386 387/68/386 388/68/386
|
f 386/68/386 387/68/386 388/68/386
|
||||||
f 389/68/387 390/68/387 391/68/387
|
f 389/68/387 390/68/387 391/68/387
|
||||||
|
@ -2642,8 +2642,8 @@ f 398/121/396 401/122/399 435/114/434
|
||||||
f 401/122/399 431/116/436 436/115/435
|
f 401/122/399 431/116/436 436/115/435
|
||||||
f 401/122/399 391/123/400 431/116/436
|
f 401/122/399 391/123/400 431/116/436
|
||||||
|
|
||||||
# Mesh 'Bein4Li_Bein4Li_Bein4Li_Bein4Li_Bein4Li_Bein4Li_Bein4Li_Bein4Li_Bein4Li_Bein4Li_Bein4Li_Bein4Li_Bein4Li_Bein4Li_Bein4Li_Bein4Li' with 98 faces
|
# Mesh 'Bein4Li' with 98 faces
|
||||||
g Bein4Li_Bein4Li_Bein4Li_Bein4Li_Bein4Li_Bein4Li_Bein4Li_Bein4Li_Bein4Li_Bein4Li_Bein4Li_Bein4Li_Bein4Li_Bein4Li_Bein4Li_Bein4Li
|
g Bein4Li
|
||||||
usemtl BeinTex
|
usemtl BeinTex
|
||||||
f 437/68/437 438/68/437 439/68/437
|
f 437/68/437 438/68/437 439/68/437
|
||||||
f 440/68/438 441/68/438 442/68/438
|
f 440/68/438 441/68/438 442/68/438
|
||||||
|
@ -2744,8 +2744,8 @@ f 486/114/485 451/122/449 449/121/447
|
||||||
f 487/115/486 482/116/487 451/122/449
|
f 487/115/486 482/116/487 451/122/449
|
||||||
f 482/116/487 440/123/451 451/122/449
|
f 482/116/487 440/123/451 451/122/449
|
||||||
|
|
||||||
# Mesh 'Zahn_Zahn_Zahn_Zahn_Zahn_Zahn_Zahn_Zahn_Zahn_Zahn_Zahn_Zahn_Zahn_Zahn_Zahn_Zahn' with 42 faces
|
# Mesh 'Zahn' with 42 faces
|
||||||
g Zahn_Zahn_Zahn_Zahn_Zahn_Zahn_Zahn_Zahn_Zahn_Zahn_Zahn_Zahn_Zahn_Zahn_Zahn_Zahn
|
g Zahn
|
||||||
usemtl BeinTex
|
usemtl BeinTex
|
||||||
f 488/124/488 488/124/488 488/124/488
|
f 488/124/488 488/124/488 488/124/488
|
||||||
f 489/125/489 490/126/489 491/127/489
|
f 489/125/489 490/126/489 491/127/489
|
||||||
|
@ -2790,8 +2790,8 @@ f 488/124/505 492/128/491 488/124/490
|
||||||
f 503/139/506 502/138/507 492/128/491
|
f 503/139/506 502/138/507 492/128/491
|
||||||
f 502/138/507 489/125/493 492/128/491
|
f 502/138/507 489/125/493 492/128/491
|
||||||
|
|
||||||
# Mesh 'klZahn_klZahn_klZahn_klZahn_klZahn_klZahn_klZahn_klZahn_klZahn_klZahn_klZahn_klZahn_klZahn_klZahn_klZahn_klZahn' with 42 faces
|
# Mesh 'klZahn' with 42 faces
|
||||||
g klZahn_klZahn_klZahn_klZahn_klZahn_klZahn_klZahn_klZahn_klZahn_klZahn_klZahn_klZahn_klZahn_klZahn_klZahn_klZahn
|
g klZahn
|
||||||
usemtl BeinTex
|
usemtl BeinTex
|
||||||
f 504/140/488 504/140/488 504/140/488
|
f 504/140/488 504/140/488 504/140/488
|
||||||
f 505/141/508 506/142/508 507/143/508
|
f 505/141/508 506/142/508 507/143/508
|
||||||
|
@ -2836,8 +2836,8 @@ f 504/140/524 508/144/510 504/140/509
|
||||||
f 519/155/525 518/154/526 508/144/510
|
f 519/155/525 518/154/526 508/144/510
|
||||||
f 518/154/526 505/141/512 508/144/510
|
f 518/154/526 505/141/512 508/144/510
|
||||||
|
|
||||||
# Mesh 'Kopf_Kopf_Kopf_Kopf_Kopf_Kopf_Kopf_Kopf_Kopf_Kopf_Kopf_Kopf_Kopf_Kopf_Kopf_Kopf' with 90 faces
|
# Mesh 'Kopf' with 90 faces
|
||||||
g Kopf_Kopf_Kopf_Kopf_Kopf_Kopf_Kopf_Kopf_Kopf_Kopf_Kopf_Kopf_Kopf_Kopf_Kopf_Kopf
|
g Kopf
|
||||||
usemtl Skin
|
usemtl Skin
|
||||||
f 520/68/527 521/156/528 522/157/529
|
f 520/68/527 521/156/528 522/157/529
|
||||||
f 520/68/527 523/158/530 521/156/528
|
f 520/68/527 523/158/530 521/156/528
|
||||||
|
@ -2930,8 +2930,8 @@ f 564/197/571 562/195/569 545/178/552
|
||||||
f 545/178/552 552/185/559 566/199/573
|
f 545/178/552 552/185/559 566/199/573
|
||||||
f 564/197/571 566/199/573 545/178/552
|
f 564/197/571 566/199/573 545/178/552
|
||||||
|
|
||||||
# Mesh 'Brust_Brust_Brust_Brust_Brust_Brust_Brust_Brust_Brust_Brust_Brust_Brust_Brust_Brust_Brust_Brust' with 20 faces
|
# Mesh 'Brust' with 20 faces
|
||||||
g Brust_Brust_Brust_Brust_Brust_Brust_Brust_Brust_Brust_Brust_Brust_Brust_Brust_Brust_Brust_Brust
|
g Brust
|
||||||
usemtl Skin
|
usemtl Skin
|
||||||
f 70/210/584 71/211/585 577/212/586
|
f 70/210/584 71/211/585 577/212/586
|
||||||
f 60/120/587 577/212/586 64/213/588
|
f 60/120/587 577/212/586 64/213/588
|
||||||
|
@ -2954,8 +2954,8 @@ f 70/210/584 580/217/592 69/223/599
|
||||||
f 77/75/593 79/224/600 580/217/592
|
f 77/75/593 79/224/600 580/217/592
|
||||||
f 69/223/599 580/217/592 79/224/600
|
f 69/223/599 580/217/592 79/224/600
|
||||||
|
|
||||||
# Mesh 'Kopf2_Kopf2_Kopf2_Kopf2_Kopf2_Kopf2_Kopf2_Kopf2_Kopf2_Kopf2_Kopf2_Kopf2_Kopf2_Kopf2_Kopf2_Kopf2' with 90 faces
|
# Mesh 'Kopf2' with 90 faces
|
||||||
g Kopf2_Kopf2_Kopf2_Kopf2_Kopf2_Kopf2_Kopf2_Kopf2_Kopf2_Kopf2_Kopf2_Kopf2_Kopf2_Kopf2_Kopf2_Kopf2
|
g Kopf2
|
||||||
usemtl Skin
|
usemtl Skin
|
||||||
f 582/225/601 583/226/602 584/123/603
|
f 582/225/601 583/226/602 584/123/603
|
||||||
f 583/226/602 585/227/604 584/123/603
|
f 583/226/602 585/227/604 584/123/603
|
||||||
|
@ -3048,8 +3048,8 @@ f 607/245/626 624/262/643 625/263/644
|
||||||
f 627/265/646 614/252/633 607/245/626
|
f 627/265/646 614/252/633 607/245/626
|
||||||
f 607/245/626 627/265/646 625/263/644
|
f 607/245/626 627/265/646 625/263/644
|
||||||
|
|
||||||
# Mesh 'Zahn2_Zahn2_Zahn2_Zahn2_Zahn2_Zahn2_Zahn2_Zahn2_Zahn2_Zahn2_Zahn2_Zahn2_Zahn2_Zahn2_Zahn2_Zahn2' with 42 faces
|
# Mesh 'Zahn2' with 42 faces
|
||||||
g Zahn2_Zahn2_Zahn2_Zahn2_Zahn2_Zahn2_Zahn2_Zahn2_Zahn2_Zahn2_Zahn2_Zahn2_Zahn2_Zahn2_Zahn2_Zahn2
|
g Zahn2
|
||||||
usemtl BeinTex
|
usemtl BeinTex
|
||||||
f 639/124/488 639/124/488 639/124/488
|
f 639/124/488 639/124/488 639/124/488
|
||||||
f 640/127/658 641/126/658 642/125/658
|
f 640/127/658 641/126/658 642/125/658
|
||||||
|
@ -3094,8 +3094,8 @@ f 639/124/661 644/128/660 639/124/674
|
||||||
f 644/128/660 653/138/676 654/139/675
|
f 644/128/660 653/138/676 654/139/675
|
||||||
f 644/128/660 642/125/662 653/138/676
|
f 644/128/660 642/125/662 653/138/676
|
||||||
|
|
||||||
# Mesh 'klZahn2_klZahn2_klZahn2_klZahn2_klZahn2_klZahn2_klZahn2_klZahn2_klZahn2_klZahn2_klZahn2_klZahn2_klZahn2_klZahn2_klZahn2_klZahn2' with 42 faces
|
# Mesh 'klZahn2' with 42 faces
|
||||||
g klZahn2_klZahn2_klZahn2_klZahn2_klZahn2_klZahn2_klZahn2_klZahn2_klZahn2_klZahn2_klZahn2_klZahn2_klZahn2_klZahn2_klZahn2_klZahn2
|
g klZahn2
|
||||||
usemtl BeinTex
|
usemtl BeinTex
|
||||||
f 655/140/488 655/140/488 655/140/488
|
f 655/140/488 655/140/488 655/140/488
|
||||||
f 656/143/677 657/142/677 658/141/677
|
f 656/143/677 657/142/677 658/141/677
|
||||||
|
@ -3140,8 +3140,8 @@ f 655/140/680 660/144/679 655/140/693
|
||||||
f 660/144/679 669/154/695 670/155/694
|
f 660/144/679 669/154/695 670/155/694
|
||||||
f 660/144/679 658/141/681 669/154/695
|
f 660/144/679 658/141/681 669/154/695
|
||||||
|
|
||||||
# Mesh 'Auge_Auge_Auge_Auge_Auge_Auge_Auge_Auge_Auge_Auge_Auge_Auge_Auge_Auge_Auge_Auge' with 38 faces
|
# Mesh 'Auge' with 38 faces
|
||||||
g Auge_Auge_Auge_Auge_Auge_Auge_Auge_Auge_Auge_Auge_Auge_Auge_Auge_Auge_Auge_Auge
|
g Auge
|
||||||
usemtl Augentex
|
usemtl Augentex
|
||||||
f 671/277/696 672/278/697 673/279/698
|
f 671/277/696 672/278/697 673/279/698
|
||||||
f 671/277/696 673/279/698 674/280/699
|
f 671/277/696 673/279/698 674/280/699
|
||||||
|
@ -3182,8 +3182,8 @@ f 681/287/706 684/290/709 696/302/721
|
||||||
f 689/295/714 696/302/721 688/294/713
|
f 689/295/714 696/302/721 688/294/713
|
||||||
f 684/290/709 688/294/713 696/302/721
|
f 684/290/709 688/294/713 696/302/721
|
||||||
|
|
||||||
# Mesh 'Duplicate05_Duplicate05_Duplicate05_Duplicate05_Duplicate05_Duplicate05_Duplicate05_Duplicate05_Duplicate05_Duplicate05_Duplicate05_Duplicate05_Duplicate05_Duplicate05_Duplicate05_Duplicate05' with 38 faces
|
# Mesh 'Duplicate05' with 38 faces
|
||||||
g Duplicate05_Duplicate05_Duplicate05_Duplicate05_Duplicate05_Duplicate05_Duplicate05_Duplicate05_Duplicate05_Duplicate05_Duplicate05_Duplicate05_Duplicate05_Duplicate05_Duplicate05_Duplicate05
|
g Duplicate05
|
||||||
usemtl Augentex
|
usemtl Augentex
|
||||||
f 697/279/722 698/278/723 699/277/724
|
f 697/279/722 698/278/723 699/277/724
|
||||||
f 700/280/725 697/279/722 699/277/724
|
f 700/280/725 697/279/722 699/277/724
|
||||||
|
@ -3223,4 +3223,3 @@ f 710/290/735 713/294/738 712/291/737
|
||||||
f 722/302/747 710/290/735 708/287/733
|
f 722/302/747 710/290/735 708/287/733
|
||||||
f 713/294/738 722/302/747 716/295/741
|
f 713/294/738 722/302/747 716/295/741
|
||||||
f 722/302/747 713/294/738 710/290/735
|
f 722/302/747 713/294/738 710/290/735
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
using namespace ::Assimp;
|
using namespace ::Assimp;
|
||||||
|
|
||||||
class utMatrix3x3Test : public ::testing::Test {
|
class utMatrix3x3Test : public ::testing::Test {
|
||||||
|
// empty
|
||||||
};
|
};
|
||||||
|
|
||||||
TEST_F( utMatrix3x3Test, FromToMatrixTest ) {
|
TEST_F( utMatrix3x3Test, FromToMatrixTest ) {
|
||||||
|
|
|
@ -57,3 +57,8 @@ public:
|
||||||
TEST_F( utPLYImportExport, importTest ) {
|
TEST_F( utPLYImportExport, importTest ) {
|
||||||
EXPECT_TRUE( importerTest() );
|
EXPECT_TRUE( importerTest() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TEST_F( utPLYImportExport, vertexColorTest ) {
|
||||||
|
Assimp::Importer importer;
|
||||||
|
const aiScene *scene = importer.ReadFile( ASSIMP_TEST_MODELS_DIR "/PLY/float-color.ply", 0 );
|
||||||
|
}
|
|
@ -0,0 +1,69 @@
|
||||||
|
/*-------------------------------------------------------------------------
|
||||||
|
Open Asset Import Library (assimp)
|
||||||
|
---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Copyright (c) 2006-2017, assimp team
|
||||||
|
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use of this software in source and binary forms,
|
||||||
|
with or without modification, are permitted provided that the following
|
||||||
|
conditions are met:
|
||||||
|
|
||||||
|
* Redistributions of source code must retain the above
|
||||||
|
copyright notice, this list of conditions and the
|
||||||
|
following disclaimer.
|
||||||
|
|
||||||
|
* Redistributions in binary form must reproduce the above
|
||||||
|
copyright notice, this list of conditions and the
|
||||||
|
following disclaimer in the documentation and/or other
|
||||||
|
materials provided with the distribution.
|
||||||
|
|
||||||
|
* Neither the name of the assimp team, nor the names of its
|
||||||
|
contributors may be used to endorse or promote products
|
||||||
|
derived from this software without specific prior
|
||||||
|
written permission of the assimp team.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
|
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
|
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||||
|
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||||
|
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||||
|
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||||
|
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||||
|
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||||
|
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
-------------------------------------------------------------------------*/
|
||||||
|
#include "UnitTestPCH.h"
|
||||||
|
#include <assimp/vector3.h>
|
||||||
|
|
||||||
|
using namespace ::Assimp;
|
||||||
|
|
||||||
|
class utVector3 : public ::testing::Test {
|
||||||
|
// empty
|
||||||
|
};
|
||||||
|
|
||||||
|
TEST_F(utVector3, CreationTest) {
|
||||||
|
aiVector3D v0;
|
||||||
|
aiVector3D v1( 1.0f, 2.0f, 3.0f );
|
||||||
|
EXPECT_FLOAT_EQ (1.0f, v1[ 0 ] );
|
||||||
|
EXPECT_FLOAT_EQ( 2.0f, v1[ 1 ] );
|
||||||
|
EXPECT_FLOAT_EQ( 3.0f, v1[ 2 ] );
|
||||||
|
aiVector3D v2( 1 );
|
||||||
|
EXPECT_FLOAT_EQ( 1.0f, v2[ 0 ] );
|
||||||
|
EXPECT_FLOAT_EQ( 1.0f, v2[ 1 ] );
|
||||||
|
EXPECT_FLOAT_EQ( 1.0f, v2[ 2 ] );
|
||||||
|
aiVector3D v3( v1 );
|
||||||
|
EXPECT_FLOAT_EQ( v1[ 0 ], v3[ 0 ] );
|
||||||
|
EXPECT_FLOAT_EQ( v1[ 1 ], v3[ 1 ] );
|
||||||
|
EXPECT_FLOAT_EQ( v1[ 2 ], v3[ 2 ] );
|
||||||
|
}
|
||||||
|
|
||||||
|
TEST_F( utVector3, BracketOpTest ) {
|
||||||
|
aiVector3D v(1.0f, 2.0f, 3.0f);
|
||||||
|
EXPECT_FLOAT_EQ( 1.0f, v[ 0 ] );
|
||||||
|
EXPECT_FLOAT_EQ( 2.0f, v[ 1 ] );
|
||||||
|
EXPECT_FLOAT_EQ( 3.0f, v[ 2 ] );
|
||||||
|
}
|
Loading…
Reference in New Issue