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")
|
||||
endif()
|
||||
|
||||
INCLUDE (FindPkgConfig)
|
||||
INCLUDE_DIRECTORIES( include )
|
||||
|
||||
INCLUDE (FindPkgMacros)
|
||||
INCLUDE (PrecompiledHeader)
|
||||
|
||||
# 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})
|
||||
|
||||
# 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)
|
||||
|
|
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.
|
||||
|
|
291
Readme.md
291
Readme.md
|
@ -1,143 +1,148 @@
|
|||
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>
|
||||
[![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.
|
||||
|
||||
### 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 ...
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -1857,7 +1857,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;
|
||||
|
|
|
@ -166,6 +166,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) {
|
||||
|
|
|
@ -44,8 +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;
|
||||
|
|
|
@ -187,10 +187,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}")
|
||||
|
|
|
@ -49,7 +49,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#include "StringComparison.h"
|
||||
#include "StringUtils.h"
|
||||
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
@ -63,7 +62,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";
|
||||
|
|
|
@ -125,7 +125,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)
|
||||
|
|
|
@ -44,6 +44,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#ifndef INCLUDED_AI_FBX_COMPILECONFIG_H
|
||||
#define INCLUDED_AI_FBX_COMPILECONFIG_H
|
||||
|
||||
#include <map>
|
||||
|
||||
//
|
||||
#if _MSC_VER > 1500 || (defined __GNUC___)
|
||||
# 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 <functional>
|
||||
|
||||
#include <map>
|
||||
|
||||
namespace Assimp {
|
||||
namespace FBX {
|
||||
|
|
|
@ -51,7 +51,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
# include "../contrib/zlib/zlib.h"
|
||||
#endif
|
||||
|
||||
|
||||
#include "FBXTokenizer.h"
|
||||
#include "FBXParser.h"
|
||||
#include "FBXUtil.h"
|
||||
|
|
|
@ -46,11 +46,13 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
|
||||
#include "FBXCompileConfig.h"
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
namespace Assimp {
|
||||
namespace FBX {
|
||||
|
||||
class Element;
|
||||
// Forward declarations
|
||||
class Element;
|
||||
|
||||
|
||||
/** 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 <assimp/ai_assert.h>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
|
||||
namespace Assimp {
|
||||
namespace FBX {
|
||||
|
|
|
@ -46,6 +46,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#include "FBXTokenizer.h"
|
||||
|
||||
#include "TinyFormatter.h"
|
||||
#include <string>
|
||||
|
||||
#ifndef ASSIMP_BUILD_NO_FBX_IMPORTER
|
||||
|
||||
|
|
|
@ -108,7 +108,7 @@ static const aiImporterDesc desc = {
|
|||
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
|
||||
{
|
||||
const std::string& extension = GetExtension(pFile);
|
||||
if (extension == "ifc" || extension == "ifczip") {
|
||||
if (extension == "ifc" || extension == "ifczip" || extension == "stp" ) {
|
||||
return true;
|
||||
}
|
||||
|
||||
else if ((!extension.length() || checkSig) && pIOHandler) {
|
||||
} else if ((!extension.length() || checkSig) && pIOHandler) {
|
||||
// note: this is the common identification for STEP-encoded files, so
|
||||
// it is only unambiguous as long as we don't support any further
|
||||
// file formats with STEP as their encoding.
|
||||
|
|
|
@ -46,6 +46,9 @@ directly (unless you are adding new loaders), instead use the
|
|||
corresponding preprocessor flag to selectively disable formats.
|
||||
*/
|
||||
|
||||
#include <vector>
|
||||
#include "BaseImporter.h"
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
// Importers
|
||||
// (include_new_importers_here)
|
||||
|
|
|
@ -90,14 +90,16 @@ namespace
|
|||
// ------------------------------------------------------------------------------------------------
|
||||
// Constructor to be privately used by Importer
|
||||
PLYImporter::PLYImporter()
|
||||
: mBuffer(),
|
||||
pcDOM()
|
||||
{}
|
||||
: mBuffer()
|
||||
, pcDOM(){
|
||||
// empty
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
// Destructor, private as well
|
||||
PLYImporter::~PLYImporter()
|
||||
{}
|
||||
PLYImporter::~PLYImporter() {
|
||||
// empty
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
// Returns whether the class can handle the format of the given file.
|
||||
|
|
|
@ -206,29 +206,17 @@ PLY::ESemantic PLY::Property::ParseSemantic(const char* pCur,const char** pCurOu
|
|||
else if (TokenMatch(pCur,"x",1))
|
||||
{
|
||||
eOut = PLY::EST_XCoord;
|
||||
}
|
||||
else if (TokenMatch(pCur,"y",1))
|
||||
{
|
||||
} else if (TokenMatch(pCur,"y",1)) {
|
||||
eOut = PLY::EST_YCoord;
|
||||
}
|
||||
else if (TokenMatch(pCur,"z",1))
|
||||
{
|
||||
} else if (TokenMatch(pCur,"z",1)) {
|
||||
eOut = PLY::EST_ZCoord;
|
||||
}
|
||||
else if (TokenMatch(pCur,"nx",2))
|
||||
{
|
||||
} else if (TokenMatch(pCur,"nx",2)) {
|
||||
eOut = PLY::EST_XNormal;
|
||||
}
|
||||
else if (TokenMatch(pCur,"ny",2))
|
||||
{
|
||||
} else if (TokenMatch(pCur,"ny",2)) {
|
||||
eOut = PLY::EST_YNormal;
|
||||
}
|
||||
else if (TokenMatch(pCur,"nz",2))
|
||||
{
|
||||
} else if (TokenMatch(pCur,"nz",2)) {
|
||||
eOut = PLY::EST_ZNormal;
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
DefaultLogger::get()->info("Found unknown property semantic in file. This is ok");
|
||||
SkipLine(&pCur);
|
||||
}
|
||||
|
|
|
@ -290,12 +290,12 @@ private:
|
|||
throw DeadlyImportError("End of file or stream limit was reached");
|
||||
}
|
||||
|
||||
#ifdef __arm__
|
||||
///*#ifdef __arm__
|
||||
T f;
|
||||
::memcpy (&f, current, sizeof(T));
|
||||
#else
|
||||
T f = *((const T*)current);
|
||||
#endif
|
||||
//#else*/
|
||||
// T f = *((const T*)current);
|
||||
//#endif
|
||||
Intern :: Getter<SwapEndianess,T,RuntimeSwitch>() (&f,le);
|
||||
|
||||
current += sizeof(T);
|
||||
|
|
|
@ -1,80 +1,80 @@
|
|||
// Microsoft Visual C++ generated resource script.
|
||||
//
|
||||
#include "resource.h"
|
||||
#include "..\..\revision.h"
|
||||
|
||||
#define APSTUDIO_READONLY_SYMBOLS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 2 resource.
|
||||
//
|
||||
#define APSTUDIO_HIDDEN_SYMBOLS
|
||||
#include "windows.h"
|
||||
#undef APSTUDIO_HIDDEN_SYMBOLS
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#undef APSTUDIO_READONLY_SYMBOLS
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Deutsch (Deutschland) resources
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_DEU)
|
||||
#ifdef _WIN32
|
||||
LANGUAGE LANG_GERMAN, SUBLANG_GERMAN
|
||||
#pragma code_page(1252)
|
||||
#endif //_WIN32
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Version
|
||||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 1,1,SVNRevision, 0
|
||||
PRODUCTVERSION 1,1,SVNRevision,0
|
||||
FILEFLAGSMASK 0x17L
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
#else
|
||||
FILEFLAGS 0x0L
|
||||
#endif
|
||||
FILEOS 0x4L
|
||||
FILETYPE 0x7L
|
||||
FILESUBTYPE 0x0L
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "040704b0"
|
||||
BEGIN
|
||||
VALUE "Comments", "Licensed under a 3-clause BSD license"
|
||||
VALUE "CompanyName", "assimp team"
|
||||
VALUE "FileDescription", "Open Asset Import Library"
|
||||
VALUE "FileVersion", 1,1,SVNRevision,0
|
||||
VALUE "InternalName", "assimp "
|
||||
VALUE "LegalCopyright", "Copyright (C) 2006-2010"
|
||||
VALUE "OriginalFilename", "assimpNN.dll"
|
||||
VALUE "ProductName", "Open Asset Import Library"
|
||||
VALUE "ProductVersion", 1,1,SVNRevision,0
|
||||
,0
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x407, 1200
|
||||
END
|
||||
END
|
||||
|
||||
#endif // Deutsch (Deutschland) resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#ifndef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 3 resource.
|
||||
//
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#endif // not APSTUDIO_INVOKED
|
||||
|
||||
// Microsoft Visual C++ generated resource script.
|
||||
//
|
||||
#include "resource.h"
|
||||
#include "..\..\revision.h"
|
||||
|
||||
#define APSTUDIO_READONLY_SYMBOLS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 2 resource.
|
||||
//
|
||||
#define APSTUDIO_HIDDEN_SYMBOLS
|
||||
#include "windows.h"
|
||||
#undef APSTUDIO_HIDDEN_SYMBOLS
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#undef APSTUDIO_READONLY_SYMBOLS
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Deutsch (Deutschland) resources
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_DEU)
|
||||
#ifdef _WIN32
|
||||
LANGUAGE LANG_GERMAN, SUBLANG_GERMAN
|
||||
#pragma code_page(1252)
|
||||
#endif //_WIN32
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Version
|
||||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 1,1,SVNRevision, 0
|
||||
PRODUCTVERSION 1,1,SVNRevision,0
|
||||
FILEFLAGSMASK 0x17L
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
#else
|
||||
FILEFLAGS 0x0L
|
||||
#endif
|
||||
FILEOS 0x4L
|
||||
FILETYPE 0x7L
|
||||
FILESUBTYPE 0x0L
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "040704b0"
|
||||
BEGIN
|
||||
VALUE "Comments", "Licensed under a 3-clause BSD license"
|
||||
VALUE "CompanyName", "assimp team"
|
||||
VALUE "FileDescription", "Open Asset Import Library"
|
||||
VALUE "FileVersion", 1,1,SVNRevision,0
|
||||
VALUE "InternalName", "assimp "
|
||||
VALUE "LegalCopyright", "Copyright (C) 2006-2010"
|
||||
VALUE "OriginalFilename", "assimpNN.dll"
|
||||
VALUE "ProductName", "Open Asset Import Library"
|
||||
VALUE "ProductVersion", 1,1,SVNRevision,0
|
||||
,0
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x407, 1200
|
||||
END
|
||||
END
|
||||
|
||||
#endif // Deutsch (Deutschland) resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#ifndef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 3 resource.
|
||||
//
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#endif // not APSTUDIO_INVOKED
|
||||
|
||||
|
|
|
@ -1,72 +1,72 @@
|
|||
/*
|
||||
* Poly2Tri Copyright (c) 2009-2010, Poly2Tri Contributors
|
||||
* http://code.google.com/p/poly2tri/
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
* * Neither the name of Poly2Tri nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software without specific
|
||||
* prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#include "cdt.h"
|
||||
|
||||
namespace p2t {
|
||||
|
||||
CDT::CDT(std::vector<Point*> polyline)
|
||||
{
|
||||
sweep_context_ = new SweepContext(polyline);
|
||||
sweep_ = new Sweep;
|
||||
}
|
||||
|
||||
void CDT::AddHole(std::vector<Point*> polyline)
|
||||
{
|
||||
sweep_context_->AddHole(polyline);
|
||||
}
|
||||
|
||||
void CDT::AddPoint(Point* point) {
|
||||
sweep_context_->AddPoint(point);
|
||||
}
|
||||
|
||||
void CDT::Triangulate()
|
||||
{
|
||||
sweep_->Triangulate(*sweep_context_);
|
||||
}
|
||||
|
||||
std::vector<p2t::Triangle*> CDT::GetTriangles()
|
||||
{
|
||||
return sweep_context_->GetTriangles();
|
||||
}
|
||||
|
||||
std::list<p2t::Triangle*> CDT::GetMap()
|
||||
{
|
||||
return sweep_context_->GetMap();
|
||||
}
|
||||
|
||||
CDT::~CDT()
|
||||
{
|
||||
delete sweep_context_;
|
||||
delete sweep_;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* Poly2Tri Copyright (c) 2009-2010, Poly2Tri Contributors
|
||||
* http://code.google.com/p/poly2tri/
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
* * Neither the name of Poly2Tri nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software without specific
|
||||
* prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#include "cdt.h"
|
||||
|
||||
namespace p2t {
|
||||
|
||||
CDT::CDT(std::vector<Point*> polyline)
|
||||
{
|
||||
sweep_context_ = new SweepContext(polyline);
|
||||
sweep_ = new Sweep;
|
||||
}
|
||||
|
||||
void CDT::AddHole(std::vector<Point*> polyline)
|
||||
{
|
||||
sweep_context_->AddHole(polyline);
|
||||
}
|
||||
|
||||
void CDT::AddPoint(Point* point) {
|
||||
sweep_context_->AddPoint(point);
|
||||
}
|
||||
|
||||
void CDT::Triangulate()
|
||||
{
|
||||
sweep_->Triangulate(*sweep_context_);
|
||||
}
|
||||
|
||||
std::vector<p2t::Triangle*> CDT::GetTriangles()
|
||||
{
|
||||
return sweep_context_->GetTriangles();
|
||||
}
|
||||
|
||||
std::list<p2t::Triangle*> CDT::GetMap()
|
||||
{
|
||||
return sweep_context_->GetMap();
|
||||
}
|
||||
|
||||
CDT::~CDT()
|
||||
{
|
||||
delete sweep_context_;
|
||||
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
|
||||
#define AI_COLOR4D_H_INC
|
||||
|
||||
#include "./Compiler/pushpack1.h"
|
||||
#include "defs.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -89,7 +88,7 @@ public:
|
|||
|
||||
// Red, green, blue and alpha color values
|
||||
TReal r, g, b, a;
|
||||
} PACK_STRUCT; // !struct aiColor4D
|
||||
}; // !struct aiColor4D
|
||||
|
||||
typedef aiColor4t<ai_real> aiColor4D;
|
||||
|
||||
|
@ -97,10 +96,8 @@ typedef aiColor4t<ai_real> aiColor4D;
|
|||
|
||||
struct aiColor4D {
|
||||
ai_real r, g, b, a;
|
||||
} PACK_STRUCT;
|
||||
};
|
||||
|
||||
#endif // __cplusplus
|
||||
|
||||
#include "./Compiler/poppack1.h"
|
||||
|
||||
#endif // AI_COLOR4D_H_INC
|
||||
|
|
|
@ -76,12 +76,34 @@ AI_FORCE_INLINE const aiColor4t<TReal>& aiColor4t<TReal>::operator /= (TReal f)
|
|||
// ------------------------------------------------------------------------------------------------
|
||||
template <typename TReal>
|
||||
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>
|
||||
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>
|
||||
|
|
|
@ -46,7 +46,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#ifndef AI_MATRIX3X3_H_INC
|
||||
#define AI_MATRIX3X3_H_INC
|
||||
|
||||
#include "./Compiler/pushpack1.h"
|
||||
#include "defs.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -153,7 +152,7 @@ public:
|
|||
/** @brief A function for creating a rotation matrix that rotates a
|
||||
* vector called "from" into another vector called "to".
|
||||
* Input : from[3], to[3] which both must be *normalized* non-zero vectors
|
||||
* Output: mtx[3][3] -- a 3x3 matrix in colum-major form
|
||||
* Output: mtx[3][3] -- a 3x3 matrix in column-major form
|
||||
* Authors: Tomas Möller, John Hughes
|
||||
* "Efficiently Building a Matrix to Rotate One Vector to Another"
|
||||
* Journal of Graphics Tools, 4(4):1-4, 1999
|
||||
|
@ -165,7 +164,7 @@ public:
|
|||
TReal a1, a2, a3;
|
||||
TReal b1, b2, b3;
|
||||
TReal c1, c2, c3;
|
||||
} PACK_STRUCT;
|
||||
};
|
||||
|
||||
typedef aiMatrix3x3t<ai_real> aiMatrix3x3;
|
||||
|
||||
|
@ -175,10 +174,8 @@ struct aiMatrix3x3 {
|
|||
ai_real a1, a2, a3;
|
||||
ai_real b1, b2, b3;
|
||||
ai_real c1, c2, c3;
|
||||
} PACK_STRUCT;
|
||||
};
|
||||
|
||||
#endif // __cplusplus
|
||||
|
||||
#include "./Compiler/poppack1.h"
|
||||
|
||||
#endif // AI_MATRIX3X3_H_INC
|
||||
|
|
|
@ -101,16 +101,34 @@ inline aiMatrix3x3t<TReal> aiMatrix3x3t<TReal>::operator* (const aiMatrix3x3t<TR
|
|||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
template <typename TReal>
|
||||
inline TReal* aiMatrix3x3t<TReal>::operator[] (unsigned int p_iIndex)
|
||||
{
|
||||
return &this->a1 + p_iIndex * 3;
|
||||
inline TReal* aiMatrix3x3t<TReal>::operator[] (unsigned int p_iIndex) {
|
||||
switch ( p_iIndex ) {
|
||||
case 0:
|
||||
return &a1;
|
||||
case 1:
|
||||
return &b1;
|
||||
case 2:
|
||||
return &c1;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return &a1;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
template <typename TReal>
|
||||
inline const TReal* aiMatrix3x3t<TReal>::operator[] (unsigned int p_iIndex) const
|
||||
{
|
||||
return &this->a1 + p_iIndex * 3;
|
||||
inline const TReal* aiMatrix3x3t<TReal>::operator[] (unsigned int p_iIndex) const {
|
||||
switch ( p_iIndex ) {
|
||||
case 0:
|
||||
return &a1;
|
||||
case 1:
|
||||
return &b1;
|
||||
case 2:
|
||||
return &c1;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return &a1;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -46,7 +46,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#define AI_MATRIX4X4_H_INC
|
||||
|
||||
#include "vector3.h"
|
||||
#include "./Compiler/pushpack1.h"
|
||||
#include "defs.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -257,7 +256,7 @@ public:
|
|||
TReal b1, b2, b3, b4;
|
||||
TReal c1, c2, c3, c4;
|
||||
TReal d1, d2, d3, d4;
|
||||
} PACK_STRUCT;
|
||||
};
|
||||
|
||||
typedef aiMatrix4x4t<ai_real> aiMatrix4x4;
|
||||
|
||||
|
@ -268,11 +267,9 @@ struct aiMatrix4x4 {
|
|||
ai_real b1, b2, b3, b4;
|
||||
ai_real c1, c2, c3, c4;
|
||||
ai_real d1, d2, d3, d4;
|
||||
} PACK_STRUCT;
|
||||
};
|
||||
|
||||
|
||||
#endif // __cplusplus
|
||||
|
||||
#include "./Compiler/poppack1.h"
|
||||
|
||||
#endif // AI_MATRIX4X4_H_INC
|
||||
|
|
|
@ -243,9 +243,19 @@ inline TReal* aiMatrix4x4t<TReal>::operator[](unsigned int p_iIndex) {
|
|||
if (p_iIndex > 3) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// XXX this is UB. Has been for years. The fact that it works now does not make it better.
|
||||
return &this->a1 + p_iIndex * 4;
|
||||
switch ( p_iIndex ) {
|
||||
case 0:
|
||||
return &a1;
|
||||
case 1:
|
||||
return &b1;
|
||||
case 2:
|
||||
return &c1;
|
||||
case 3:
|
||||
return &d1;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return &a1;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------------------
|
||||
|
@ -255,8 +265,19 @@ inline const TReal* aiMatrix4x4t<TReal>::operator[](unsigned int p_iIndex) const
|
|||
return NULL;
|
||||
}
|
||||
|
||||
// XXX same
|
||||
return &this->a1 + p_iIndex * 4;
|
||||
switch ( p_iIndex ) {
|
||||
case 0:
|
||||
return &a1;
|
||||
case 1:
|
||||
return &b1;
|
||||
case 2:
|
||||
return &c1;
|
||||
case 3:
|
||||
return &d1;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return &a1;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------------------
|
||||
|
|
|
@ -51,7 +51,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
# include <math.h>
|
||||
#endif
|
||||
|
||||
#include "./Compiler/pushpack1.h"
|
||||
#include "defs.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -126,7 +125,7 @@ public:
|
|||
const aiVector3t SymMul(const aiVector3t& o);
|
||||
|
||||
TReal x, y, z;
|
||||
} PACK_STRUCT;
|
||||
};
|
||||
|
||||
|
||||
typedef aiVector3t<ai_real> aiVector3D;
|
||||
|
@ -135,16 +134,12 @@ typedef aiVector3t<ai_real> aiVector3D;
|
|||
|
||||
struct aiVector3D {
|
||||
ai_real x, y, z;
|
||||
} PACK_STRUCT;
|
||||
};
|
||||
|
||||
#endif // __cplusplus
|
||||
|
||||
#include "./Compiler/poppack1.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
|
||||
|
||||
#endif // __cplusplus
|
||||
|
||||
#endif // AI_VECTOR3D_H_INC
|
||||
|
|
|
@ -141,12 +141,34 @@ AI_FORCE_INLINE aiVector3t<TReal>& aiVector3t<TReal>::operator *= (const aiMatri
|
|||
// ------------------------------------------------------------------------------------------------
|
||||
template <typename TReal>
|
||||
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>
|
||||
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>
|
||||
|
|
|
@ -46,7 +46,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#include <android/api-level.h>
|
||||
#if __ANDROID__ and __ANDROID_API__ > 9 and defined(AI_CONFIG_ANDROID_JNI_ASSIMP_MANAGER_SUPPORT)
|
||||
|
||||
#include <libgen.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/stat.h>
|
||||
#include <android/log.h>
|
||||
#include <android/asset_manager.h>
|
||||
#include <android/asset_manager_jni.h>
|
||||
|
@ -100,6 +102,27 @@ void AndroidJNIIOSystem::AndroidActivityInit(ANativeActivity* activity)
|
|||
mApkAssetManager = activity->assetManager;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
// Create the directory for the extracted resource
|
||||
static int mkpath(std::string path, mode_t mode)
|
||||
{
|
||||
if (mkdir(path.c_str(), mode) == -1) {
|
||||
switch(errno) {
|
||||
case ENOENT:
|
||||
if (mkpath(path.substr(0, path.find_last_of('/')), mode) == -1)
|
||||
return -1;
|
||||
else
|
||||
return mkdir(path.c_str(), mode);
|
||||
case EEXIST:
|
||||
return 0;
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
// Extracts android asset
|
||||
bool AndroidJNIIOSystem::AndroidExtractAsset(std::string name)
|
||||
|
@ -131,6 +154,15 @@ bool AndroidJNIIOSystem::AndroidExtractAsset(std::string name)
|
|||
// Close
|
||||
AAsset_close(asset);
|
||||
|
||||
// Prepare directory for output buffer
|
||||
std::string directoryNewPath = newPath;
|
||||
directoryNewPath = dirname(&directoryNewPath[0]);
|
||||
|
||||
if (mkpath(directoryNewPath, S_IRUSR | S_IWUSR | S_IXUSR) == -1) {
|
||||
__android_log_print(ANDROID_LOG_ERROR, "assimp",
|
||||
"Can not create the directory for the output file");
|
||||
}
|
||||
|
||||
// Prepare output buffer
|
||||
std::ofstream assetExtracted(newPath.c_str(),
|
||||
std::ios::out | std::ios::binary);
|
||||
|
|
|
@ -120,6 +120,7 @@ SET( TEST_SRCS
|
|||
unit/utTypes.cpp
|
||||
unit/utVertexTriangleAdjacency.cpp
|
||||
unit/utVersion.cpp
|
||||
unit/utVector3.cpp
|
||||
unit/utXImporterExporter.cpp
|
||||
)
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# File produced by Open Asset Import Library (http://www.assimp.sf.net)
|
||||
# (assimp v3.3.721346005)
|
||||
# (assimp v3.3.128220959)
|
||||
|
||||
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.2050659954547882 -0.3789339959621429
|
||||
|
||||
# Mesh 'HLeib01_HLeib01_HLeib01_HLeib01_HLeib01_HLeib01_HLeib01_HLeib01_HLeib01_HLeib01_HLeib01_HLeib01_HLeib01_HLeib01_HLeib01_HLeib01' with 80 faces
|
||||
g HLeib01_HLeib01_HLeib01_HLeib01_HLeib01_HLeib01_HLeib01_HLeib01_HLeib01_HLeib01_HLeib01_HLeib01_HLeib01_HLeib01_HLeib01_HLeib01
|
||||
# Mesh 'HLeib01' with 80 faces
|
||||
g HLeib01
|
||||
usemtl HLeibTex
|
||||
f 1/1/1 2/2/2 3/3/3
|
||||
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 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
|
||||
g OK_OK_OK_OK_OK_OK_OK_OK_OK_OK_OK_OK_OK_OK_OK_OK
|
||||
# Mesh 'OK' with 60 faces
|
||||
g OK
|
||||
usemtl Skin
|
||||
f 43/43/43 44/44/44 45/45/45
|
||||
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 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
|
||||
g Bein1Li_Bein1Li_Bein1Li_Bein1Li_Bein1Li_Bein1Li_Bein1Li_Bein1Li_Bein1Li_Bein1Li_Bein1Li_Bein1Li_Bein1Li_Bein1Li_Bein1Li_Bein1Li
|
||||
# Mesh 'Bein1Li' with 98 faces
|
||||
g Bein1Li
|
||||
usemtl BeinTex
|
||||
f 80/68/80 81/68/80 82/68/80
|
||||
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 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
|
||||
g Bein1Re_Bein1Re_Bein1Re_Bein1Re_Bein1Re_Bein1Re_Bein1Re_Bein1Re_Bein1Re_Bein1Re_Bein1Re_Bein1Re_Bein1Re_Bein1Re_Bein1Re_Bein1Re
|
||||
# Mesh 'Bein1Re' with 98 faces
|
||||
g Bein1Re
|
||||
usemtl BeinTex
|
||||
f 131/68/131 132/68/131 133/68/131
|
||||
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 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
|
||||
g Bein2Li_Bein2Li_Bein2Li_Bein2Li_Bein2Li_Bein2Li_Bein2Li_Bein2Li_Bein2Li_Bein2Li_Bein2Li_Bein2Li_Bein2Li_Bein2Li_Bein2Li_Bein2Li
|
||||
# Mesh 'Bein2Li' with 98 faces
|
||||
g Bein2Li
|
||||
usemtl BeinTex
|
||||
f 182/68/182 183/68/182 184/68/182
|
||||
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 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
|
||||
g Bein2Re_Bein2Re_Bein2Re_Bein2Re_Bein2Re_Bein2Re_Bein2Re_Bein2Re_Bein2Re_Bein2Re_Bein2Re_Bein2Re_Bein2Re_Bein2Re_Bein2Re_Bein2Re
|
||||
# Mesh 'Bein2Re' with 98 faces
|
||||
g Bein2Re
|
||||
usemtl BeinTex
|
||||
f 233/68/233 234/68/233 235/68/233
|
||||
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 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
|
||||
g Bein3Re_Bein3Re_Bein3Re_Bein3Re_Bein3Re_Bein3Re_Bein3Re_Bein3Re_Bein3Re_Bein3Re_Bein3Re_Bein3Re_Bein3Re_Bein3Re_Bein3Re_Bein3Re
|
||||
# Mesh 'Bein3Re' with 98 faces
|
||||
g Bein3Re
|
||||
usemtl BeinTex
|
||||
f 284/68/284 285/68/284 286/68/284
|
||||
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 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
|
||||
g Bein3Li_Bein3Li_Bein3Li_Bein3Li_Bein3Li_Bein3Li_Bein3Li_Bein3Li_Bein3Li_Bein3Li_Bein3Li_Bein3Li_Bein3Li_Bein3Li_Bein3Li_Bein3Li
|
||||
# Mesh 'Bein3Li' with 98 faces
|
||||
g Bein3Li
|
||||
usemtl BeinTex
|
||||
f 335/68/335 336/68/335 337/68/335
|
||||
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 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
|
||||
g Bein4Re_Bein4Re_Bein4Re_Bein4Re_Bein4Re_Bein4Re_Bein4Re_Bein4Re_Bein4Re_Bein4Re_Bein4Re_Bein4Re_Bein4Re_Bein4Re_Bein4Re_Bein4Re
|
||||
# Mesh 'Bein4Re' with 98 faces
|
||||
g Bein4Re
|
||||
usemtl BeinTex
|
||||
f 386/68/386 387/68/386 388/68/386
|
||||
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 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
|
||||
g Bein4Li_Bein4Li_Bein4Li_Bein4Li_Bein4Li_Bein4Li_Bein4Li_Bein4Li_Bein4Li_Bein4Li_Bein4Li_Bein4Li_Bein4Li_Bein4Li_Bein4Li_Bein4Li
|
||||
# Mesh 'Bein4Li' with 98 faces
|
||||
g Bein4Li
|
||||
usemtl BeinTex
|
||||
f 437/68/437 438/68/437 439/68/437
|
||||
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 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
|
||||
g Zahn_Zahn_Zahn_Zahn_Zahn_Zahn_Zahn_Zahn_Zahn_Zahn_Zahn_Zahn_Zahn_Zahn_Zahn_Zahn
|
||||
# Mesh 'Zahn' with 42 faces
|
||||
g Zahn
|
||||
usemtl BeinTex
|
||||
f 488/124/488 488/124/488 488/124/488
|
||||
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 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
|
||||
g klZahn_klZahn_klZahn_klZahn_klZahn_klZahn_klZahn_klZahn_klZahn_klZahn_klZahn_klZahn_klZahn_klZahn_klZahn_klZahn
|
||||
# Mesh 'klZahn' with 42 faces
|
||||
g klZahn
|
||||
usemtl BeinTex
|
||||
f 504/140/488 504/140/488 504/140/488
|
||||
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 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
|
||||
g Kopf_Kopf_Kopf_Kopf_Kopf_Kopf_Kopf_Kopf_Kopf_Kopf_Kopf_Kopf_Kopf_Kopf_Kopf_Kopf
|
||||
# Mesh 'Kopf' with 90 faces
|
||||
g Kopf
|
||||
usemtl Skin
|
||||
f 520/68/527 521/156/528 522/157/529
|
||||
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 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
|
||||
g Brust_Brust_Brust_Brust_Brust_Brust_Brust_Brust_Brust_Brust_Brust_Brust_Brust_Brust_Brust_Brust
|
||||
# Mesh 'Brust' with 20 faces
|
||||
g Brust
|
||||
usemtl Skin
|
||||
f 70/210/584 71/211/585 577/212/586
|
||||
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 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
|
||||
g Kopf2_Kopf2_Kopf2_Kopf2_Kopf2_Kopf2_Kopf2_Kopf2_Kopf2_Kopf2_Kopf2_Kopf2_Kopf2_Kopf2_Kopf2_Kopf2
|
||||
# Mesh 'Kopf2' with 90 faces
|
||||
g Kopf2
|
||||
usemtl Skin
|
||||
f 582/225/601 583/226/602 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 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
|
||||
g Zahn2_Zahn2_Zahn2_Zahn2_Zahn2_Zahn2_Zahn2_Zahn2_Zahn2_Zahn2_Zahn2_Zahn2_Zahn2_Zahn2_Zahn2_Zahn2
|
||||
# Mesh 'Zahn2' with 42 faces
|
||||
g Zahn2
|
||||
usemtl BeinTex
|
||||
f 639/124/488 639/124/488 639/124/488
|
||||
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 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
|
||||
g klZahn2_klZahn2_klZahn2_klZahn2_klZahn2_klZahn2_klZahn2_klZahn2_klZahn2_klZahn2_klZahn2_klZahn2_klZahn2_klZahn2_klZahn2_klZahn2
|
||||
# Mesh 'klZahn2' with 42 faces
|
||||
g klZahn2
|
||||
usemtl BeinTex
|
||||
f 655/140/488 655/140/488 655/140/488
|
||||
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 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
|
||||
g Auge_Auge_Auge_Auge_Auge_Auge_Auge_Auge_Auge_Auge_Auge_Auge_Auge_Auge_Auge_Auge
|
||||
# Mesh 'Auge' with 38 faces
|
||||
g Auge
|
||||
usemtl Augentex
|
||||
f 671/277/696 672/278/697 673/279/698
|
||||
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 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
|
||||
g Duplicate05_Duplicate05_Duplicate05_Duplicate05_Duplicate05_Duplicate05_Duplicate05_Duplicate05_Duplicate05_Duplicate05_Duplicate05_Duplicate05_Duplicate05_Duplicate05_Duplicate05_Duplicate05
|
||||
# Mesh 'Duplicate05' with 38 faces
|
||||
g Duplicate05
|
||||
usemtl Augentex
|
||||
f 697/279/722 698/278/723 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 713/294/738 722/302/747 716/295/741
|
||||
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;
|
||||
|
||||
class utMatrix3x3Test : public ::testing::Test {
|
||||
|
||||
// empty
|
||||
};
|
||||
|
||||
TEST_F( utMatrix3x3Test, FromToMatrixTest ) {
|
||||
|
|
|
@ -57,3 +57,8 @@ public:
|
|||
TEST_F( utPLYImportExport, importTest ) {
|
||||
EXPECT_TRUE( importerTest() );
|
||||
}
|
||||
|
||||
TEST_F( utPLYImportExport, vertexColorTest ) {
|
||||
Assimp::Importer importer;
|
||||
const aiScene *scene = importer.ReadFile( ASSIMP_TEST_MODELS_DIR "/PLY/float-color.ply", 0 );
|
||||
}
|
|
@ -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