Merge branch 'master' into coverity_scan
Conflicts: test/regression/db.zippull/1007/head
commit
5dc4a126b5
|
@ -11,6 +11,6 @@ else
|
|||
&& sudo make install \
|
||||
&& sudo ldconfig \
|
||||
&& (cd test/unit; ../../bin/unit) \
|
||||
&& (cd test/regression; chmod 755 run.py; ./run.py ../../bin/assimp; \
|
||||
chmod 755 result_checker.py; ./result_checker.py)
|
||||
#&& (cd test/regression; chmod 755 run.py; ./run.py ../../bin/assimp; \
|
||||
# chmod 755 result_checker.py; ./result_checker.py)
|
||||
fi
|
||||
|
|
|
@ -81,11 +81,15 @@ IF(NOT GIT_COMMIT_HASH)
|
|||
ENDIF(NOT GIT_COMMIT_HASH)
|
||||
|
||||
configure_file(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/revision.h.in
|
||||
${CMAKE_CURRENT_LIST_DIR}/revision.h.in
|
||||
# ${CMAKE_CURRENT_SOURCE_DIR}/revision.h.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/revision.h
|
||||
)
|
||||
|
||||
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
||||
include_directories(
|
||||
./
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
)
|
||||
|
||||
OPTION(ASSIMP_OPT_BUILD_PACKAGES "Set to ON to generate CPack configuration files and packaging targets" OFF)
|
||||
SET(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake-modules" )
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
Open Asset Import Library (assimp)
|
||||
==================================
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
|
@ -15,7 +14,8 @@ Coverity<a href="https://scan.coverity.com/projects/5607">
|
|||
<img alt="Coverity Scan Build Status"
|
||||
src="https://scan.coverity.com/projects/5607/badge.svg"/>
|
||||
</a>
|
||||
|
||||
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>
|
||||
__[open3mod](https://github.com/acgessler/open3mod) is a powerful 3D model viewer based on Assimp's import and export abilities.__
|
||||
|
||||
#### Supported file formats ####
|
||||
|
@ -115,6 +115,8 @@ If the docs don't solve your problem, ask on [StackOverflow](http://stackoverflo
|
|||
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 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
|
||||
|
||||
|
|
|
@ -47,8 +47,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
// internal headers
|
||||
#include "3DSLoader.h"
|
||||
#include "TargetAnimation.h"
|
||||
#include "../include/assimp/scene.h"
|
||||
#include "../include/assimp/DefaultLogger.hpp"
|
||||
#include <assimp/scene.h>
|
||||
#include <assimp/DefaultLogger.hpp>
|
||||
#include "StringComparison.h"
|
||||
#include <memory>
|
||||
#include <cctype>
|
||||
|
|
|
@ -47,9 +47,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#include "SceneCombiner.h"
|
||||
#include "SplitLargeMeshes.h"
|
||||
#include "StringComparison.h"
|
||||
#include "../include/assimp/IOSystem.hpp"
|
||||
#include "../include/assimp/DefaultLogger.hpp"
|
||||
#include "../include/assimp/Exporter.hpp"
|
||||
#include <assimp/IOSystem.hpp>
|
||||
#include <assimp/DefaultLogger.hpp>
|
||||
#include <assimp/Exporter.hpp>
|
||||
#include <memory>
|
||||
|
||||
using namespace Assimp;
|
||||
|
|
|
@ -51,9 +51,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
// internal headers
|
||||
#include "3DSLoader.h"
|
||||
#include "Macros.h"
|
||||
#include "../include/assimp/IOSystem.hpp"
|
||||
#include "../include/assimp/scene.h"
|
||||
#include "../include/assimp/DefaultLogger.hpp"
|
||||
#include <assimp/IOSystem.hpp>
|
||||
#include <assimp/scene.h>
|
||||
#include <assimp/DefaultLogger.hpp>
|
||||
#include "StringComparison.h"
|
||||
|
||||
using namespace Assimp;
|
||||
|
@ -186,15 +186,14 @@ void Discreet3DSImporter::InternReadFile( const std::string& pFile,
|
|||
// internal verbose representation. Finally compute normal
|
||||
// vectors from the smoothing groups we read from the
|
||||
// file.
|
||||
for (std::vector<D3DS::Mesh>::iterator i = mScene->mMeshes.begin(),
|
||||
end = mScene->mMeshes.end(); i != end;++i) {
|
||||
if ((*i).mFaces.size() > 0 && (*i).mPositions.size() == 0) {
|
||||
for (auto &mesh : mScene->mMeshes) {
|
||||
if (mesh.mFaces.size() > 0 && mesh.mPositions.size() == 0) {
|
||||
delete mScene;
|
||||
throw DeadlyImportError("3DS file contains faces but no vertices: " + pFile);
|
||||
}
|
||||
CheckIndices(*i);
|
||||
MakeUnique (*i);
|
||||
ComputeNormalsWithSmoothingsGroups<D3DS::Face>(*i);
|
||||
CheckIndices(mesh);
|
||||
MakeUnique (mesh);
|
||||
ComputeNormalsWithSmoothingsGroups<D3DS::Face>(mesh);
|
||||
}
|
||||
|
||||
// Replace all occurrences of the default material with a
|
||||
|
|
|
@ -46,7 +46,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#define AI_3DSIMPORTER_H_INC
|
||||
|
||||
#include "BaseImporter.h"
|
||||
#include "../include/assimp/types.h"
|
||||
#include <assimp/types.h>
|
||||
|
||||
#ifndef ASSIMP_BUILD_NO_3DS_IMPORTER
|
||||
|
||||
|
|
|
@ -53,13 +53,13 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#include "Subdivision.h"
|
||||
#include "Importer.h"
|
||||
#include "BaseImporter.h"
|
||||
#include "../include/assimp/Importer.hpp"
|
||||
#include "../include/assimp/light.h"
|
||||
#include "../include/assimp/DefaultLogger.hpp"
|
||||
#include "../include/assimp/material.h"
|
||||
#include "../include/assimp/scene.h"
|
||||
#include "../include/assimp/config.h"
|
||||
#include "../include/assimp/IOSystem.hpp"
|
||||
#include <assimp/Importer.hpp>
|
||||
#include <assimp/light.h>
|
||||
#include <assimp/DefaultLogger.hpp>
|
||||
#include <assimp/material.h>
|
||||
#include <assimp/scene.h>
|
||||
#include <assimp/config.h>
|
||||
#include <assimp/IOSystem.hpp>
|
||||
#include <memory>
|
||||
|
||||
using namespace Assimp;
|
||||
|
|
|
@ -47,7 +47,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#include <vector>
|
||||
|
||||
#include "BaseImporter.h"
|
||||
#include "../include/assimp/types.h"
|
||||
#include <assimp/types.h>
|
||||
|
||||
struct aiNode;
|
||||
struct aiMesh;
|
||||
|
|
|
@ -50,12 +50,12 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#include "StringComparison.h"
|
||||
#include "SkeletonMeshBuilder.h"
|
||||
#include "TargetAnimation.h"
|
||||
#include "../include/assimp/Importer.hpp"
|
||||
#include <memory>
|
||||
#include "../include/assimp/IOSystem.hpp"
|
||||
#include "../include/assimp/DefaultLogger.hpp"
|
||||
#include "../include/assimp/scene.h"
|
||||
#include <assimp/Importer.hpp>
|
||||
#include <assimp/IOSystem.hpp>
|
||||
#include <assimp/DefaultLogger.hpp>
|
||||
#include <assimp/scene.h>
|
||||
|
||||
#include <memory>
|
||||
|
||||
// utilities
|
||||
#include "fast_atof.h"
|
||||
|
@ -225,17 +225,13 @@ void ASEImporter::InternReadFile( const std::string& pFile,
|
|||
+ mParser->m_vCameras.size() + mParser->m_vDummies.size());
|
||||
|
||||
// Lights
|
||||
for (std::vector<ASE::Light>::iterator it = mParser->m_vLights.begin(),
|
||||
end = mParser->m_vLights.end();it != end; ++it)nodes.push_back(&(*it));
|
||||
for (auto &light : mParser->m_vLights)nodes.push_back(&light);
|
||||
// Cameras
|
||||
for (std::vector<ASE::Camera>::iterator it = mParser->m_vCameras.begin(),
|
||||
end = mParser->m_vCameras.end();it != end; ++it)nodes.push_back(&(*it));
|
||||
for (auto &camera : mParser->m_vCameras)nodes.push_back(&camera);
|
||||
// Meshes
|
||||
for (std::vector<ASE::Mesh>::iterator it = mParser->m_vMeshes.begin(),
|
||||
end = mParser->m_vMeshes.end();it != end; ++it)nodes.push_back(&(*it));
|
||||
for (auto &mesh : mParser->m_vMeshes)nodes.push_back(&mesh);
|
||||
// Dummies
|
||||
for (std::vector<ASE::Dummy>::iterator it = mParser->m_vDummies.begin(),
|
||||
end = mParser->m_vDummies.end();it != end; ++it)nodes.push_back(&(*it));
|
||||
for (auto &dummy : mParser->m_vDummies)nodes.push_back(&dummy);
|
||||
|
||||
// build the final node graph
|
||||
BuildNodes(nodes);
|
||||
|
@ -657,8 +653,8 @@ void ASEImporter::BuildNodes(std::vector<BaseNode*>& nodes) {
|
|||
ch->mParent = root;
|
||||
|
||||
// Change the transformation matrix of all nodes
|
||||
for (std::vector<BaseNode*>::iterator it = nodes.begin(), end = nodes.end();it != end; ++it) {
|
||||
aiMatrix4x4& m = (*it)->mTransform;
|
||||
for (BaseNode *node : nodes) {
|
||||
aiMatrix4x4& m = node->mTransform;
|
||||
m.Transpose(); // row-order vs column-order
|
||||
}
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#define AI_ASELOADER_H_INCLUDED
|
||||
|
||||
#include "BaseImporter.h"
|
||||
#include "../include/assimp/types.h"
|
||||
#include <assimp/types.h>
|
||||
|
||||
struct aiNode;
|
||||
#include "ASEParser.h"
|
||||
|
|
|
@ -51,7 +51,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#include "ASELoader.h"
|
||||
#include "MaterialSystem.h"
|
||||
#include "fast_atof.h"
|
||||
#include "../include/assimp/DefaultLogger.hpp"
|
||||
#include <assimp/DefaultLogger.hpp>
|
||||
|
||||
using namespace Assimp;
|
||||
using namespace Assimp::ASE;
|
||||
|
|
|
@ -44,9 +44,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#define AI_ASEFILEHELPER_H_INC
|
||||
|
||||
// public ASSIMP headers
|
||||
#include "../include/assimp/types.h"
|
||||
#include "../include/assimp/mesh.h"
|
||||
#include "../include/assimp/anim.h"
|
||||
#include <assimp/types.h>
|
||||
#include <assimp/mesh.h>
|
||||
#include <assimp/anim.h>
|
||||
|
||||
// for some helper routines like IsSpace()
|
||||
#include "ParsingUtils.h"
|
||||
|
|
|
@ -41,10 +41,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
* ASSBIN exporter main code
|
||||
*/
|
||||
#include "assbin_chunks.h"
|
||||
#include "../include/assimp/version.h"
|
||||
#include "../include/assimp/IOStream.hpp"
|
||||
#include "../include/assimp/IOSystem.hpp"
|
||||
#include "../include/assimp/Exporter.hpp"
|
||||
#include <assimp/version.h>
|
||||
#include <assimp/IOStream.hpp>
|
||||
#include <assimp/IOSystem.hpp>
|
||||
#include <assimp/Exporter.hpp>
|
||||
#include "ProcessHelper.h"
|
||||
#include "Exceptional.h"
|
||||
|
||||
|
|
|
@ -51,14 +51,14 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#include "AssbinLoader.h"
|
||||
#include "assbin_chunks.h"
|
||||
#include "MemoryIOWrapper.h"
|
||||
#include "../include/assimp/mesh.h"
|
||||
#include "../include/assimp/anim.h"
|
||||
#include "../include/assimp/scene.h"
|
||||
#include <assimp/mesh.h>
|
||||
#include <assimp/anim.h>
|
||||
#include <assimp/scene.h>
|
||||
|
||||
#ifdef ASSIMP_BUILD_NO_OWN_ZLIB
|
||||
# include <zlib.h>
|
||||
#else
|
||||
# include "../contrib/zlib/zlib.h"
|
||||
# include <contrib/zlib/zlib.h>
|
||||
#endif
|
||||
|
||||
using namespace Assimp;
|
||||
|
|
|
@ -46,7 +46,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#define AI_ASSBINIMPORTER_H_INC
|
||||
|
||||
#include "BaseImporter.h"
|
||||
#include "../include/assimp/types.h"
|
||||
#include <assimp/types.h>
|
||||
|
||||
struct aiMesh;
|
||||
struct aiNode;
|
||||
|
|
|
@ -47,7 +47,7 @@ Assimp C export interface. See Exporter.cpp for some notes.
|
|||
#include "CInterfaceIOWrapper.h"
|
||||
#include "SceneCombiner.h"
|
||||
#include "ScenePrivate.h"
|
||||
#include "../include/assimp/Exporter.hpp"
|
||||
#include <assimp/Exporter.hpp>
|
||||
|
||||
using namespace Assimp;
|
||||
|
||||
|
|
|
@ -43,14 +43,14 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#include <stdarg.h>
|
||||
#include "./../include/assimp/version.h"
|
||||
#include "ProcessHelper.h"
|
||||
#include "../include/assimp/IOStream.hpp"
|
||||
#include "../include/assimp/IOSystem.hpp"
|
||||
#include "../include/assimp/Exporter.hpp"
|
||||
#include <assimp/IOStream.hpp>
|
||||
#include <assimp/IOSystem.hpp>
|
||||
#include <assimp/Exporter.hpp>
|
||||
|
||||
#ifdef ASSIMP_BUILD_NO_OWN_ZLIB
|
||||
# include <zlib.h>
|
||||
#else
|
||||
# include "../contrib/zlib/zlib.h"
|
||||
# include <contrib/zlib/zlib.h>
|
||||
#endif
|
||||
|
||||
#include <time.h>
|
||||
|
|
|
@ -52,10 +52,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#include "ConvertToLHProcess.h"
|
||||
#include "StringUtils.h"
|
||||
#include <memory>
|
||||
#include "../include/assimp/IOSystem.hpp"
|
||||
#include "../include/assimp/anim.h"
|
||||
#include "../include/assimp/scene.h"
|
||||
#include "../include/assimp/DefaultLogger.hpp"
|
||||
#include <assimp/IOSystem.hpp>
|
||||
#include <assimp/anim.h>
|
||||
#include <assimp/scene.h>
|
||||
#include <assimp/DefaultLogger.hpp>
|
||||
|
||||
|
||||
using namespace Assimp;
|
||||
|
|
|
@ -43,9 +43,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#ifndef AI_B3DIMPORTER_H_INC
|
||||
#define AI_B3DIMPORTER_H_INC
|
||||
|
||||
#include "../include/assimp/types.h"
|
||||
#include "../include/assimp/mesh.h"
|
||||
#include "../include/assimp/material.h"
|
||||
#include <assimp/types.h>
|
||||
#include <assimp/mesh.h>
|
||||
#include <assimp/material.h>
|
||||
#include "BaseImporter.h"
|
||||
|
||||
#include <string>
|
||||
|
|
|
@ -46,11 +46,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#include "BVHLoader.h"
|
||||
#include "fast_atof.h"
|
||||
#include "SkeletonMeshBuilder.h"
|
||||
#include "../include/assimp/Importer.hpp"
|
||||
#include <assimp/Importer.hpp>
|
||||
#include <memory>
|
||||
#include "TinyFormatter.h"
|
||||
#include "../include/assimp/IOSystem.hpp"
|
||||
#include "../include/assimp/scene.h"
|
||||
#include <assimp/IOSystem.hpp>
|
||||
#include <assimp/scene.h>
|
||||
|
||||
using namespace Assimp;
|
||||
using namespace Assimp::Formatter;
|
||||
|
|
|
@ -47,9 +47,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#include "FileSystemFilter.h"
|
||||
#include "Importer.h"
|
||||
#include "ByteSwapper.h"
|
||||
#include "../include/assimp/scene.h"
|
||||
#include "../include/assimp/Importer.hpp"
|
||||
#include "../include/assimp/postprocess.h"
|
||||
#include <assimp/scene.h>
|
||||
#include <assimp/Importer.hpp>
|
||||
#include <assimp/postprocess.h>
|
||||
#include <ios>
|
||||
#include <list>
|
||||
#include <memory>
|
||||
|
|
|
@ -48,8 +48,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#include <map>
|
||||
#include <vector>
|
||||
#include <set>
|
||||
#include "../include/assimp/types.h"
|
||||
#include "../include/assimp/ProgressHandler.hpp"
|
||||
#include <assimp/types.h>
|
||||
#include <assimp/ProgressHandler.hpp>
|
||||
|
||||
struct aiScene;
|
||||
|
||||
|
|
|
@ -43,8 +43,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
|
||||
#include "BaseImporter.h"
|
||||
#include "BaseProcess.h"
|
||||
#include "../include/assimp/DefaultLogger.hpp"
|
||||
#include "../include/assimp/scene.h"
|
||||
#include <assimp/DefaultLogger.hpp>
|
||||
#include <assimp/scene.h>
|
||||
#include "Importer.h"
|
||||
|
||||
using namespace Assimp;
|
||||
|
|
|
@ -44,7 +44,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
|
||||
#include <map>
|
||||
|
||||
#include "../include/assimp/types.h"
|
||||
#include <assimp/types.h>
|
||||
#include "GenericProperty.h"
|
||||
|
||||
struct aiScene;
|
||||
|
|
|
@ -47,8 +47,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
|
||||
|
||||
#include "Bitmap.h"
|
||||
#include "../include/assimp/texture.h"
|
||||
#include "../include/assimp/IOStream.hpp"
|
||||
#include <assimp/texture.h>
|
||||
#include <assimp/IOStream.hpp>
|
||||
#include "ByteSwapper.h"
|
||||
|
||||
namespace Assimp {
|
||||
|
|
|
@ -48,7 +48,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#include "BaseImporter.h"
|
||||
#include "TinyFormatter.h"
|
||||
#include "StreamReader.h"
|
||||
#include "../include/assimp/DefaultLogger.hpp"
|
||||
#include <assimp/DefaultLogger.hpp>
|
||||
#include <stdint.h>
|
||||
#include <memory>
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#include "BlenderModifier.h"
|
||||
#include "BlenderBMesh.h"
|
||||
#include "StringUtils.h"
|
||||
#include "../include/assimp/scene.h"
|
||||
#include <assimp/scene.h>
|
||||
#include "StringComparison.h"
|
||||
|
||||
#include "StreamReader.h"
|
||||
|
@ -554,10 +554,8 @@ void BlenderImporter::ResolveTexture(aiMaterial* out, const Material* mat, const
|
|||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
void BlenderImporter::BuildMaterials(ConversionData& conv_data)
|
||||
void BlenderImporter::BuildDefaultMaterial(Blender::ConversionData& conv_data)
|
||||
{
|
||||
conv_data.materials->reserve(conv_data.materials_raw.size());
|
||||
|
||||
// add a default material if necessary
|
||||
unsigned int index = static_cast<unsigned int>( -1 );
|
||||
for( aiMesh* mesh : conv_data.meshes.get() ) {
|
||||
|
@ -588,6 +586,124 @@ void BlenderImporter::BuildMaterials(ConversionData& conv_data)
|
|||
mesh->mMaterialIndex = index;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void BlenderImporter::AddBlendParams(aiMaterial* result, const Material* source)
|
||||
{
|
||||
aiColor3D diffuseColor(source->r, source->g, source->b);
|
||||
result->AddProperty(&diffuseColor, 1, "$mat.blend.diffuse.color", 0, 0);
|
||||
|
||||
float diffuseIntensity = source->ref;
|
||||
result->AddProperty(&diffuseIntensity, 1, "$mat.blend.diffuse.intensity", 0, 0);
|
||||
|
||||
int diffuseShader = source->diff_shader;
|
||||
result->AddProperty(&diffuseShader, 1, "$mat.blend.diffuse.shader", 0, 0);
|
||||
|
||||
int diffuseRamp = 0;
|
||||
result->AddProperty(&diffuseRamp, 1, "$mat.blend.diffuse.ramp", 0, 0);
|
||||
|
||||
|
||||
aiColor3D specularColor(source->specr, source->specg, source->specb);
|
||||
result->AddProperty(&specularColor, 1, "$mat.blend.specular.color", 0, 0);
|
||||
|
||||
float specularIntensity = source->spec;
|
||||
result->AddProperty(&specularIntensity, 1, "$mat.blend.specular.intensity", 0, 0);
|
||||
|
||||
int specularShader = source->spec_shader;
|
||||
result->AddProperty(&specularShader, 1, "$mat.blend.specular.shader", 0, 0);
|
||||
|
||||
int specularRamp = 0;
|
||||
result->AddProperty(&specularRamp, 1, "$mat.blend.specular.ramp", 0, 0);
|
||||
|
||||
int specularHardness = source->har;
|
||||
result->AddProperty(&specularHardness, 1, "$mat.blend.specular.hardness", 0, 0);
|
||||
|
||||
|
||||
int transparencyUse = source->mode & MA_TRANSPARENCY ? 1 : 0;
|
||||
result->AddProperty(&transparencyUse, 1, "$mat.blend.transparency.use", 0, 0);
|
||||
|
||||
int transparencyMethod = source->mode & MA_RAYTRANSP ? 2 : (source->mode & MA_ZTRANSP ? 1 : 0);
|
||||
result->AddProperty(&transparencyMethod, 1, "$mat.blend.transparency.method", 0, 0);
|
||||
|
||||
float transparencyAlpha = source->alpha;
|
||||
result->AddProperty(&transparencyAlpha, 1, "$mat.blend.transparency.alpha", 0, 0);
|
||||
|
||||
float transparencySpecular = source->spectra;
|
||||
result->AddProperty(&transparencySpecular, 1, "$mat.blend.transparency.specular", 0, 0);
|
||||
|
||||
float transparencyFresnel = source->fresnel_tra;
|
||||
result->AddProperty(&transparencyFresnel, 1, "$mat.blend.transparency.fresnel", 0, 0);
|
||||
|
||||
float transparencyBlend = source->fresnel_tra_i;
|
||||
result->AddProperty(&transparencyBlend, 1, "$mat.blend.transparency.blend", 0, 0);
|
||||
|
||||
float transparencyIor = source->ang;
|
||||
result->AddProperty(&transparencyIor, 1, "$mat.blend.transparency.ior", 0, 0);
|
||||
|
||||
float transparencyFilter = source->filter;
|
||||
result->AddProperty(&transparencyFilter, 1, "$mat.blend.transparency.filter", 0, 0);
|
||||
|
||||
float transparencyFalloff = source->tx_falloff;
|
||||
result->AddProperty(&transparencyFalloff, 1, "$mat.blend.transparency.falloff", 0, 0);
|
||||
|
||||
float transparencyLimit = source->tx_limit;
|
||||
result->AddProperty(&transparencyLimit, 1, "$mat.blend.transparency.limit", 0, 0);
|
||||
|
||||
int transparencyDepth = source->ray_depth_tra;
|
||||
result->AddProperty(&transparencyDepth, 1, "$mat.blend.transparency.depth", 0, 0);
|
||||
|
||||
float transparencyGlossAmount = source->gloss_tra;
|
||||
result->AddProperty(&transparencyGlossAmount, 1, "$mat.blend.transparency.glossAmount", 0, 0);
|
||||
|
||||
float transparencyGlossThreshold = source->adapt_thresh_tra;
|
||||
result->AddProperty(&transparencyGlossThreshold, 1, "$mat.blend.transparency.glossThreshold", 0, 0);
|
||||
|
||||
int transparencyGlossSamples = source->samp_gloss_tra;
|
||||
result->AddProperty(&transparencyGlossSamples, 1, "$mat.blend.transparency.glossSamples", 0, 0);
|
||||
|
||||
|
||||
int mirrorUse = source->mode & MA_RAYMIRROR ? 1 : 0;
|
||||
result->AddProperty(&mirrorUse, 1, "$mat.blend.mirror.use", 0, 0);
|
||||
|
||||
float mirrorReflectivity = source->ray_mirror;
|
||||
result->AddProperty(&mirrorReflectivity, 1, "$mat.blend.mirror.reflectivity", 0, 0);
|
||||
|
||||
aiColor3D mirrorColor(source->mirr, source->mirg, source->mirb);
|
||||
result->AddProperty(&mirrorColor, 1, "$mat.blend.mirror.color", 0, 0);
|
||||
|
||||
float mirrorFresnel = source->fresnel_mir;
|
||||
result->AddProperty(&mirrorFresnel, 1, "$mat.blend.mirror.fresnel", 0, 0);
|
||||
|
||||
float mirrorBlend = source->fresnel_mir_i;
|
||||
result->AddProperty(&mirrorBlend, 1, "$mat.blend.mirror.blend", 0, 0);
|
||||
|
||||
int mirrorDepth = source->ray_depth;
|
||||
result->AddProperty(&mirrorDepth, 1, "$mat.blend.mirror.depth", 0, 0);
|
||||
|
||||
float mirrorMaxDist = source->dist_mir;
|
||||
result->AddProperty(&mirrorMaxDist, 1, "$mat.blend.mirror.maxDist", 0, 0);
|
||||
|
||||
int mirrorFadeTo = source->fadeto_mir;
|
||||
result->AddProperty(&mirrorFadeTo, 1, "$mat.blend.mirror.fadeTo", 0, 0);
|
||||
|
||||
float mirrorGlossAmount = source->gloss_mir;
|
||||
result->AddProperty(&mirrorGlossAmount, 1, "$mat.blend.mirror.glossAmount", 0, 0);
|
||||
|
||||
float mirrorGlossThreshold = source->adapt_thresh_mir;
|
||||
result->AddProperty(&mirrorGlossThreshold, 1, "$mat.blend.mirror.glossThreshold", 0, 0);
|
||||
|
||||
int mirrorGlossSamples = source->samp_gloss_mir;
|
||||
result->AddProperty(&mirrorGlossSamples, 1, "$mat.blend.mirror.glossSamples", 0, 0);
|
||||
|
||||
float mirrorGlossAnisotropic = source->aniso_gloss_mir;
|
||||
result->AddProperty(&mirrorGlossAnisotropic, 1, "$mat.blend.mirror.glossAnisotropic", 0, 0);
|
||||
}
|
||||
|
||||
void BlenderImporter::BuildMaterials(ConversionData& conv_data)
|
||||
{
|
||||
conv_data.materials->reserve(conv_data.materials_raw.size());
|
||||
|
||||
BuildDefaultMaterial(conv_data);
|
||||
|
||||
for(std::shared_ptr<Material> mat : conv_data.materials_raw) {
|
||||
|
||||
|
@ -604,7 +720,6 @@ void BlenderImporter::BuildMaterials(ConversionData& conv_data)
|
|||
aiString name = aiString(mat->id.name+2); // skip over the name prefix 'MA'
|
||||
mout->AddProperty(&name,AI_MATKEY_NAME);
|
||||
|
||||
|
||||
// basic material colors
|
||||
aiColor3D col(mat->r,mat->g,mat->b);
|
||||
if (mat->r || mat->g || mat->b ) {
|
||||
|
@ -647,6 +762,8 @@ void BlenderImporter::BuildMaterials(ConversionData& conv_data)
|
|||
|
||||
ResolveTexture(mout,mat.get(),mat->mtex[i].get(),conv_data);
|
||||
}
|
||||
|
||||
AddBlendParams(mout, mat.get());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1049,7 +1166,24 @@ aiLight* BlenderImporter::ConvertLight(const Scene& /*in*/, const Object* obj, c
|
|||
|
||||
// blender orients directional lights as facing toward -z
|
||||
out->mDirection = aiVector3D(0.f, 0.f, -1.f);
|
||||
out->mUp = aiVector3D(0.f, 1.f, 0.f);
|
||||
break;
|
||||
|
||||
case Lamp::Type_Area:
|
||||
out->mType = aiLightSource_AREA;
|
||||
|
||||
if (lamp->area_shape == 0) {
|
||||
out->mSize = aiVector2D(lamp->area_size, lamp->area_size);
|
||||
}
|
||||
else {
|
||||
out->mSize = aiVector2D(lamp->area_size, lamp->area_sizey);
|
||||
}
|
||||
|
||||
// blender orients directional lights as facing toward -z
|
||||
out->mDirection = aiVector3D(0.f, 0.f, -1.f);
|
||||
out->mUp = aiVector3D(0.f, 1.f, 0.f);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -179,6 +179,15 @@ private:
|
|||
);
|
||||
|
||||
// --------------------
|
||||
void BuildDefaultMaterial(
|
||||
Blender::ConversionData& conv_data
|
||||
);
|
||||
|
||||
void AddBlendParams(
|
||||
aiMaterial* result,
|
||||
const Blender::Material* source
|
||||
);
|
||||
|
||||
void BuildMaterials(
|
||||
Blender::ConversionData& conv_data
|
||||
);
|
||||
|
|
|
@ -47,7 +47,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#include "BlenderModifier.h"
|
||||
#include "SceneCombiner.h"
|
||||
#include "Subdivision.h"
|
||||
#include "../include/assimp/scene.h"
|
||||
#include <assimp/scene.h>
|
||||
#include <memory>
|
||||
|
||||
#include <functional>
|
||||
|
|
|
@ -206,6 +206,10 @@ template <> void Structure :: Convert<Lamp> (
|
|||
ReadField<ErrorPolicy_Igno>(dest.att2,"att2",db);
|
||||
ReadField<ErrorPolicy_Igno>((int&)dest.falloff_type,"falloff_type",db);
|
||||
ReadField<ErrorPolicy_Igno>(dest.sun_brightness,"sun_brightness",db);
|
||||
ReadField<ErrorPolicy_Igno>(dest.area_size,"area_size",db);
|
||||
ReadField<ErrorPolicy_Igno>(dest.area_sizey,"area_sizey",db);
|
||||
ReadField<ErrorPolicy_Igno>(dest.area_sizez,"area_sizez",db);
|
||||
ReadField<ErrorPolicy_Igno>(dest.area_shape,"area_shape",db);
|
||||
|
||||
db.reader->IncPtr(size);
|
||||
}
|
||||
|
@ -297,7 +301,6 @@ template <> void Structure :: Convert<Material> (
|
|||
const FileDatabase& db
|
||||
) const
|
||||
{
|
||||
|
||||
ReadField<ErrorPolicy_Fail>(dest.id,"id",db);
|
||||
ReadField<ErrorPolicy_Warn>(dest.r,"r",db);
|
||||
ReadField<ErrorPolicy_Warn>(dest.g,"g",db);
|
||||
|
@ -326,6 +329,91 @@ template <> void Structure :: Convert<Material> (
|
|||
ReadField<ErrorPolicy_Warn>(dest.spec_shader,"spec_shader",db);
|
||||
ReadFieldPtr<ErrorPolicy_Igno>(dest.mtex,"*mtex",db);
|
||||
|
||||
|
||||
ReadField<ErrorPolicy_Igno>(dest.amb, "amb", db);
|
||||
ReadField<ErrorPolicy_Igno>(dest.ang, "ang", db);
|
||||
ReadField<ErrorPolicy_Igno>(dest.spectra, "spectra", db);
|
||||
ReadField<ErrorPolicy_Igno>(dest.spec, "spec", db);
|
||||
ReadField<ErrorPolicy_Igno>(dest.zoffs, "zoffs", db);
|
||||
ReadField<ErrorPolicy_Igno>(dest.add, "add", db);
|
||||
ReadField<ErrorPolicy_Igno>(dest.fresnel_mir, "fresnel_mir", db);
|
||||
ReadField<ErrorPolicy_Igno>(dest.fresnel_mir_i, "fresnel_mir_i", db);
|
||||
ReadField<ErrorPolicy_Igno>(dest.fresnel_tra, "fresnel_tra", db);
|
||||
ReadField<ErrorPolicy_Igno>(dest.fresnel_tra_i, "fresnel_tra_i", db);
|
||||
ReadField<ErrorPolicy_Igno>(dest.filter, "filter", db);
|
||||
ReadField<ErrorPolicy_Igno>(dest.tx_limit, "tx_limit", db);
|
||||
ReadField<ErrorPolicy_Igno>(dest.tx_falloff, "tx_falloff", db);
|
||||
ReadField<ErrorPolicy_Igno>(dest.gloss_mir, "gloss_mir", db);
|
||||
ReadField<ErrorPolicy_Igno>(dest.gloss_tra, "gloss_tra", db);
|
||||
ReadField<ErrorPolicy_Igno>(dest.adapt_thresh_mir, "adapt_thresh_mir", db);
|
||||
ReadField<ErrorPolicy_Igno>(dest.adapt_thresh_tra, "adapt_thresh_tra", db);
|
||||
ReadField<ErrorPolicy_Igno>(dest.aniso_gloss_mir, "aniso_gloss_mir", db);
|
||||
ReadField<ErrorPolicy_Igno>(dest.dist_mir, "dist_mir", db);
|
||||
ReadField<ErrorPolicy_Igno>(dest.hasize, "hasize", db);
|
||||
ReadField<ErrorPolicy_Igno>(dest.flaresize, "flaresize", db);
|
||||
ReadField<ErrorPolicy_Igno>(dest.subsize, "subsize", db);
|
||||
ReadField<ErrorPolicy_Igno>(dest.flareboost, "flareboost", db);
|
||||
ReadField<ErrorPolicy_Igno>(dest.strand_sta, "strand_sta", db);
|
||||
ReadField<ErrorPolicy_Igno>(dest.strand_end, "strand_end", db);
|
||||
ReadField<ErrorPolicy_Igno>(dest.strand_ease, "strand_ease", db);
|
||||
ReadField<ErrorPolicy_Igno>(dest.strand_surfnor, "strand_surfnor", db);
|
||||
ReadField<ErrorPolicy_Igno>(dest.strand_min, "strand_min", db);
|
||||
ReadField<ErrorPolicy_Igno>(dest.strand_widthfade, "strand_widthfade", db);
|
||||
ReadField<ErrorPolicy_Igno>(dest.sbias, "sbias", db);
|
||||
ReadField<ErrorPolicy_Igno>(dest.lbias, "lbias", db);
|
||||
ReadField<ErrorPolicy_Igno>(dest.shad_alpha, "shad_alpha", db);
|
||||
ReadField<ErrorPolicy_Igno>(dest.param, "param", db);
|
||||
ReadField<ErrorPolicy_Igno>(dest.rms, "rms", db);
|
||||
ReadField<ErrorPolicy_Igno>(dest.rampfac_col, "rampfac_col", db);
|
||||
ReadField<ErrorPolicy_Igno>(dest.rampfac_spec, "rampfac_spec", db);
|
||||
ReadField<ErrorPolicy_Igno>(dest.friction, "friction", db);
|
||||
ReadField<ErrorPolicy_Igno>(dest.fh, "fh", db);
|
||||
ReadField<ErrorPolicy_Igno>(dest.reflect, "reflect", db);
|
||||
ReadField<ErrorPolicy_Igno>(dest.fhdist, "fhdist", db);
|
||||
ReadField<ErrorPolicy_Igno>(dest.xyfrict, "xyfrict", db);
|
||||
ReadField<ErrorPolicy_Igno>(dest.sss_radius, "sss_radius", db);
|
||||
ReadField<ErrorPolicy_Igno>(dest.sss_col, "sss_col", db);
|
||||
ReadField<ErrorPolicy_Igno>(dest.sss_error, "sss_error", db);
|
||||
ReadField<ErrorPolicy_Igno>(dest.sss_scale, "sss_scale", db);
|
||||
ReadField<ErrorPolicy_Igno>(dest.sss_ior, "sss_ior", db);
|
||||
ReadField<ErrorPolicy_Igno>(dest.sss_colfac, "sss_colfac", db);
|
||||
ReadField<ErrorPolicy_Igno>(dest.sss_texfac, "sss_texfac", db);
|
||||
ReadField<ErrorPolicy_Igno>(dest.sss_front, "sss_front", db);
|
||||
ReadField<ErrorPolicy_Igno>(dest.sss_back, "sss_back", db);
|
||||
|
||||
ReadField<ErrorPolicy_Igno>(dest.material_type, "material_type", db);
|
||||
ReadField<ErrorPolicy_Igno>(dest.flag, "flag", db);
|
||||
ReadField<ErrorPolicy_Igno>(dest.ray_depth, "ray_depth", db);
|
||||
ReadField<ErrorPolicy_Igno>(dest.ray_depth_tra, "ray_depth_tra", db);
|
||||
ReadField<ErrorPolicy_Igno>(dest.samp_gloss_mir, "samp_gloss_mir", db);
|
||||
ReadField<ErrorPolicy_Igno>(dest.samp_gloss_tra, "samp_gloss_tra", db);
|
||||
ReadField<ErrorPolicy_Igno>(dest.fadeto_mir, "fadeto_mir", db);
|
||||
ReadField<ErrorPolicy_Igno>(dest.shade_flag, "shade_flag", db);
|
||||
ReadField<ErrorPolicy_Igno>(dest.flarec, "flarec", db);
|
||||
ReadField<ErrorPolicy_Igno>(dest.starc, "starc", db);
|
||||
ReadField<ErrorPolicy_Igno>(dest.linec, "linec", db);
|
||||
ReadField<ErrorPolicy_Igno>(dest.ringc, "ringc", db);
|
||||
ReadField<ErrorPolicy_Igno>(dest.pr_lamp, "pr_lamp", db);
|
||||
ReadField<ErrorPolicy_Igno>(dest.pr_texture, "pr_texture", db);
|
||||
ReadField<ErrorPolicy_Igno>(dest.ml_flag, "ml_flag", db);
|
||||
ReadField<ErrorPolicy_Igno>(dest.diff_shader, "diff_shader", db);
|
||||
ReadField<ErrorPolicy_Igno>(dest.spec_shader, "spec_shader", db);
|
||||
ReadField<ErrorPolicy_Igno>(dest.texco, "texco", db);
|
||||
ReadField<ErrorPolicy_Igno>(dest.mapto, "mapto", db);
|
||||
ReadField<ErrorPolicy_Igno>(dest.ramp_show, "ramp_show", db);
|
||||
ReadField<ErrorPolicy_Igno>(dest.pad3, "pad3", db);
|
||||
ReadField<ErrorPolicy_Igno>(dest.dynamode, "dynamode", db);
|
||||
ReadField<ErrorPolicy_Igno>(dest.pad2, "pad2", db);
|
||||
ReadField<ErrorPolicy_Igno>(dest.sss_flag, "sss_flag", db);
|
||||
ReadField<ErrorPolicy_Igno>(dest.sss_preset, "sss_preset", db);
|
||||
ReadField<ErrorPolicy_Igno>(dest.shadowonly_flag, "shadowonly_flag", db);
|
||||
ReadField<ErrorPolicy_Igno>(dest.index, "index", db);
|
||||
ReadField<ErrorPolicy_Igno>(dest.vcol_alpha, "vcol_alpha", db);
|
||||
ReadField<ErrorPolicy_Igno>(dest.pad4, "pad4", db);
|
||||
|
||||
ReadField<ErrorPolicy_Igno>(dest.seed1, "seed1", db);
|
||||
ReadField<ErrorPolicy_Igno>(dest.seed2, "seed2", db);
|
||||
|
||||
db.reader->IncPtr(size);
|
||||
}
|
||||
|
||||
|
|
|
@ -242,6 +242,9 @@ struct MDeformVert : ElemBase {
|
|||
|
||||
// -------------------------------------------------------------------------------
|
||||
#define MA_RAYMIRROR 0x40000
|
||||
#define MA_TRANSPARENCY 0x10000
|
||||
#define MA_RAYTRANSP 0x20000
|
||||
#define MA_ZTRANSP 0x00040
|
||||
|
||||
struct Material : ElemBase {
|
||||
ID id FAIL;
|
||||
|
@ -261,6 +264,89 @@ struct Material : ElemBase {
|
|||
float darkness;
|
||||
float refrac;
|
||||
|
||||
|
||||
float amb;
|
||||
float ang;
|
||||
float spectra;
|
||||
float spec;
|
||||
float zoffs;
|
||||
float add;
|
||||
float fresnel_mir;
|
||||
float fresnel_mir_i;
|
||||
float fresnel_tra;
|
||||
float fresnel_tra_i;
|
||||
float filter;
|
||||
float tx_limit;
|
||||
float tx_falloff;
|
||||
float gloss_mir;
|
||||
float gloss_tra;
|
||||
float adapt_thresh_mir;
|
||||
float adapt_thresh_tra;
|
||||
float aniso_gloss_mir;
|
||||
float dist_mir;
|
||||
float hasize;
|
||||
float flaresize;
|
||||
float subsize;
|
||||
float flareboost;
|
||||
float strand_sta;
|
||||
float strand_end;
|
||||
float strand_ease;
|
||||
float strand_surfnor;
|
||||
float strand_min;
|
||||
float strand_widthfade;
|
||||
float sbias;
|
||||
float lbias;
|
||||
float shad_alpha;
|
||||
float param;
|
||||
float rms;
|
||||
float rampfac_col;
|
||||
float rampfac_spec;
|
||||
float friction;
|
||||
float fh;
|
||||
float reflect;
|
||||
float fhdist;
|
||||
float xyfrict;
|
||||
float sss_radius;
|
||||
float sss_col;
|
||||
float sss_error;
|
||||
float sss_scale;
|
||||
float sss_ior;
|
||||
float sss_colfac;
|
||||
float sss_texfac;
|
||||
float sss_front;
|
||||
float sss_back;
|
||||
|
||||
short material_type;
|
||||
short flag;
|
||||
short ray_depth;
|
||||
short ray_depth_tra;
|
||||
short samp_gloss_mir;
|
||||
short samp_gloss_tra;
|
||||
short fadeto_mir;
|
||||
short shade_flag;
|
||||
short flarec;
|
||||
short starc;
|
||||
short linec;
|
||||
short ringc;
|
||||
short pr_lamp;
|
||||
short pr_texture;
|
||||
short ml_flag;
|
||||
short texco;
|
||||
short mapto;
|
||||
short ramp_show;
|
||||
short pad3;
|
||||
short dynamode;
|
||||
short pad2;
|
||||
short sss_flag;
|
||||
short sss_preset;
|
||||
short shadowonly_flag;
|
||||
short index;
|
||||
short vcol_alpha;
|
||||
short pad4;
|
||||
|
||||
char seed1;
|
||||
char seed2;
|
||||
|
||||
std::shared_ptr<Group> group;
|
||||
|
||||
short diff_shader WARN;
|
||||
|
@ -371,8 +457,8 @@ struct Lamp : ElemBase {
|
|||
|
||||
//short ray_samp, ray_sampy, ray_sampz;
|
||||
//short ray_samp_type;
|
||||
//short area_shape;
|
||||
//float area_size, area_sizey, area_sizez;
|
||||
short area_shape;
|
||||
float area_size, area_sizey, area_sizez;
|
||||
//float adapt_thresh;
|
||||
//short ray_samp_method;
|
||||
|
||||
|
|
|
@ -43,8 +43,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#ifndef AI_BYTESWAPPER_H_INC
|
||||
#define AI_BYTESWAPPER_H_INC
|
||||
|
||||
#include "../include/assimp/ai_assert.h"
|
||||
#include "../include/assimp/types.h"
|
||||
#include <assimp/ai_assert.h>
|
||||
#include <assimp/types.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#if _MSC_VER >= 1400
|
||||
|
|
|
@ -44,9 +44,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#ifndef AI_CIOSYSTEM_H_INCLUDED
|
||||
#define AI_CIOSYSTEM_H_INCLUDED
|
||||
|
||||
#include "../include/assimp/cfileio.h"
|
||||
#include "../include/assimp/IOStream.hpp"
|
||||
#include "../include/assimp/IOSystem.hpp"
|
||||
#include <assimp/cfileio.h>
|
||||
#include <assimp/IOStream.hpp>
|
||||
#include <assimp/IOSystem.hpp>
|
||||
|
||||
namespace Assimp {
|
||||
|
||||
|
|
|
@ -273,12 +273,16 @@ ADD_ASSIMP_IMPORTER(HMP
|
|||
HalfLifeFileData.h
|
||||
)
|
||||
|
||||
#FIXME: allow to set IRRMESH by option
|
||||
ADD_ASSIMP_IMPORTER( IRRMESH
|
||||
IRRMeshLoader.cpp
|
||||
IRRMeshLoader.h
|
||||
IRRShared.cpp
|
||||
IRRShared.h
|
||||
)
|
||||
|
||||
ADD_ASSIMP_IMPORTER( IRR
|
||||
IRRLoader.cpp
|
||||
IRRLoader.h
|
||||
IRRMeshLoader.cpp
|
||||
IRRMeshLoader.h
|
||||
IRRShared.cpp
|
||||
IRRShared.h
|
||||
)
|
||||
|
@ -363,7 +367,6 @@ ADD_ASSIMP_IMPORTER(OBJ
|
|||
ObjFileParser.cpp
|
||||
ObjFileParser.h
|
||||
ObjTools.h
|
||||
|
||||
ObjExporter.h
|
||||
ObjExporter.cpp
|
||||
)
|
||||
|
@ -601,10 +604,8 @@ ADD_ASSIMP_IMPORTER(GLTF
|
|||
glTFAsset.inl
|
||||
glTFAssetWriter.h
|
||||
glTFAssetWriter.inl
|
||||
|
||||
glTFImporter.cpp
|
||||
glTFImporter.h
|
||||
|
||||
glTFExporter.h
|
||||
glTFExporter.cpp
|
||||
)
|
||||
|
@ -615,7 +616,6 @@ ADD_ASSIMP_IMPORTER(3MF
|
|||
D3MFImporter.cpp
|
||||
D3MFOpcPackage.h
|
||||
D3MFOpcPackage.cpp
|
||||
|
||||
)
|
||||
|
||||
|
||||
|
@ -809,7 +809,7 @@ SET_TARGET_PROPERTIES( assimp PROPERTIES
|
|||
)
|
||||
|
||||
if (APPLE)
|
||||
SET_TARGET_PROPERTIES( assimp PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR}")
|
||||
SET_TARGET_PROPERTIES( assimp PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/${ASSIMP_LIB_INSTALL_DIR}")
|
||||
endif()
|
||||
|
||||
# Build against external unzip, or add ../contrib/unzip so
|
||||
|
@ -818,7 +818,7 @@ if (UNZIP_FOUND)
|
|||
INCLUDE_DIRECTORIES(${UNZIP_INCLUDE_DIRS})
|
||||
TARGET_LINK_LIBRARIES(assimp ${UNZIP_LIBRARIES})
|
||||
else (UNZIP_FOUND)
|
||||
INCLUDE_DIRECTORIES("../contrib/unzip")
|
||||
INCLUDE_DIRECTORIES("../")
|
||||
endif (UNZIP_FOUND)
|
||||
|
||||
INSTALL( TARGETS assimp
|
||||
|
|
|
@ -54,9 +54,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#include "LineSplitter.h"
|
||||
#include "TinyFormatter.h"
|
||||
#include <memory>
|
||||
#include "../include/assimp/IOSystem.hpp"
|
||||
#include "../include/assimp/DefaultLogger.hpp"
|
||||
#include "../include/assimp/scene.h"
|
||||
#include <assimp/IOSystem.hpp>
|
||||
#include <assimp/DefaultLogger.hpp>
|
||||
#include <assimp/scene.h>
|
||||
|
||||
|
||||
using namespace Assimp;
|
||||
|
|
|
@ -51,12 +51,12 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#include "SkeletonMeshBuilder.h"
|
||||
#include "ParsingUtils.h"
|
||||
#include "fast_atof.h"
|
||||
#include "../include/assimp/Importer.hpp"
|
||||
#include <assimp/Importer.hpp>
|
||||
#include <memory>
|
||||
#include "../include/assimp/IOSystem.hpp"
|
||||
#include "../include/assimp/anim.h"
|
||||
#include "../include/assimp/DefaultLogger.hpp"
|
||||
#include "../include/assimp/scene.h"
|
||||
#include <assimp/IOSystem.hpp>
|
||||
#include <assimp/anim.h>
|
||||
#include <assimp/DefaultLogger.hpp>
|
||||
#include <assimp/scene.h>
|
||||
|
||||
|
||||
using namespace Assimp;
|
||||
|
|
|
@ -49,9 +49,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#include "SceneCombiner.h"
|
||||
#include "DefaultIOSystem.h"
|
||||
#include "XMLTools.h"
|
||||
#include "../include/assimp/IOSystem.hpp"
|
||||
#include "../include/assimp/Exporter.hpp"
|
||||
#include "../include/assimp/scene.h"
|
||||
#include <assimp/IOSystem.hpp>
|
||||
#include <assimp/Exporter.hpp>
|
||||
#include <assimp/scene.h>
|
||||
|
||||
#include "Exceptional.h"
|
||||
|
||||
|
@ -530,7 +530,7 @@ void ColladaExporter::ReadMaterialSurface( Surface& poSurface, const aiMaterial*
|
|||
// Reimplementation of isalnum(,C locale), because AppVeyor does not see standard version.
|
||||
static bool isalnum_C(char c)
|
||||
{
|
||||
return strchr("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",c);
|
||||
return ( nullptr != strchr("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",c) );
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
|
@ -1016,7 +1016,7 @@ void ColladaExporter::WriteSceneLibrary()
|
|||
|
||||
// start recursive write at the root node
|
||||
for( size_t a = 0; a < mScene->mRootNode->mNumChildren; ++a )
|
||||
WriteNode( mScene->mRootNode->mChildren[a]);
|
||||
WriteNode( mScene, mScene->mRootNode->mChildren[a]);
|
||||
|
||||
PopTag();
|
||||
mOutput << startstr << "</visual_scene>" << endstr;
|
||||
|
@ -1024,11 +1024,26 @@ void ColladaExporter::WriteSceneLibrary()
|
|||
mOutput << startstr << "</library_visual_scenes>" << endstr;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
// Helper to find a bone by name in the scene
|
||||
aiBone* findBone( const aiScene* scene, const char * name) {
|
||||
for (size_t m=0; m<scene->mNumMeshes; m++) {
|
||||
aiMesh * mesh = scene->mMeshes[m];
|
||||
for (size_t b=0; b<mesh->mNumBones; b++) {
|
||||
aiBone * bone = mesh->mBones[b];
|
||||
if (0 == strcmp(name, bone->mName.C_Str())) {
|
||||
return bone;
|
||||
}
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
// Recursively writes the given node
|
||||
void ColladaExporter::WriteNode(aiNode* pNode)
|
||||
void ColladaExporter::WriteNode( const aiScene* pScene, aiNode* pNode)
|
||||
{
|
||||
// the must have a name
|
||||
// the node must have a name
|
||||
if (pNode->mName.length == 0)
|
||||
{
|
||||
std::stringstream ss;
|
||||
|
@ -1036,8 +1051,21 @@ void ColladaExporter::WriteNode(aiNode* pNode)
|
|||
pNode->mName.Set(ss.str());
|
||||
}
|
||||
|
||||
// If the node is associated with a bone, it is a joint node (JOINT)
|
||||
// otherwise it is a normal node (NODE)
|
||||
const char * node_type;
|
||||
if (NULL == findBone(pScene, pNode->mName.C_Str())) {
|
||||
node_type = "NODE";
|
||||
} else {
|
||||
node_type = "JOINT";
|
||||
}
|
||||
|
||||
const std::string node_name_escaped = XMLEscape(pNode->mName.data);
|
||||
mOutput << startstr << "<node id=\"" << node_name_escaped << "\" name=\"" << node_name_escaped << "\">" << endstr;
|
||||
mOutput << startstr
|
||||
<< "<node id=\"" << node_name_escaped
|
||||
<< "\" name=\"" << node_name_escaped
|
||||
<< "\" type=\"" << node_type
|
||||
<< "\">" << endstr;
|
||||
PushTag();
|
||||
|
||||
// write transformation - we can directly put the matrix there
|
||||
|
@ -1102,7 +1130,7 @@ void ColladaExporter::WriteNode(aiNode* pNode)
|
|||
|
||||
// recurse into subnodes
|
||||
for( size_t a = 0; a < pNode->mNumChildren; ++a )
|
||||
WriteNode( pNode->mChildren[a]);
|
||||
WriteNode( pScene, pNode->mChildren[a]);
|
||||
|
||||
PopTag();
|
||||
mOutput << startstr << "</node>" << endstr;
|
||||
|
|
|
@ -44,11 +44,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#ifndef AI_COLLADAEXPORTER_H_INC
|
||||
#define AI_COLLADAEXPORTER_H_INC
|
||||
|
||||
#include "../include/assimp/ai_assert.h"
|
||||
#include "../include/assimp/material.h"
|
||||
#include "../include/assimp/mesh.h"
|
||||
#include "../include/assimp/light.h"
|
||||
#include "../include/assimp/Exporter.hpp"
|
||||
#include <assimp/ai_assert.h>
|
||||
#include <assimp/material.h>
|
||||
#include <assimp/mesh.h>
|
||||
#include <assimp/light.h>
|
||||
#include <assimp/Exporter.hpp>
|
||||
#include <sstream>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
@ -114,7 +114,7 @@ protected:
|
|||
void WriteSceneLibrary();
|
||||
|
||||
/// Recursively writes the given node
|
||||
void WriteNode( aiNode* pNode);
|
||||
void WriteNode( const aiScene* scene, aiNode* pNode);
|
||||
|
||||
/// Enters a new xml element, which increases the indentation
|
||||
void PushTag() { startstr.append( " "); }
|
||||
|
|
|
@ -47,9 +47,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#include <map>
|
||||
#include <vector>
|
||||
#include <stdint.h>
|
||||
#include "../include/assimp/light.h"
|
||||
#include "../include/assimp/mesh.h"
|
||||
#include "../include/assimp/material.h"
|
||||
#include <assimp/light.h>
|
||||
#include <assimp/mesh.h>
|
||||
#include <assimp/material.h>
|
||||
|
||||
struct aiMaterial;
|
||||
|
||||
|
|
|
@ -44,9 +44,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
|
||||
#ifndef ASSIMP_BUILD_NO_COLLADA_IMPORTER
|
||||
|
||||
#include "../include/assimp/anim.h"
|
||||
#include "../include/assimp/scene.h"
|
||||
#include "ColladaLoader.h"
|
||||
#include <assimp/anim.h>
|
||||
#include <assimp/scene.h>
|
||||
#include <assimp/DefaultLogger.hpp>
|
||||
#include <assimp/Importer.hpp>
|
||||
#include "ColladaParser.h"
|
||||
|
||||
#include "fast_atof.h"
|
||||
|
@ -56,8 +58,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
|
||||
#include "time.h"
|
||||
#include "math.h"
|
||||
#include "../include/assimp/DefaultLogger.hpp"
|
||||
#include "../include/assimp/Importer.hpp"
|
||||
#include <numeric>
|
||||
#include "Defines.h"
|
||||
|
||||
|
@ -276,21 +276,20 @@ void ColladaLoader::ResolveNodeInstances( const ColladaParser& pParser, const Co
|
|||
resolved.reserve(pNode->mNodeInstances.size());
|
||||
|
||||
// ... and iterate through all nodes to be instanced as children of pNode
|
||||
for (std::vector<Collada::NodeInstance>::const_iterator it = pNode->mNodeInstances.begin(),
|
||||
end = pNode->mNodeInstances.end(); it != end; ++it)
|
||||
for (const auto &nodeInst: pNode->mNodeInstances)
|
||||
{
|
||||
// find the corresponding node in the library
|
||||
const ColladaParser::NodeLibrary::const_iterator itt = pParser.mNodeLibrary.find((*it).mNode);
|
||||
const ColladaParser::NodeLibrary::const_iterator itt = pParser.mNodeLibrary.find(nodeInst.mNode);
|
||||
const Collada::Node* nd = itt == pParser.mNodeLibrary.end() ? NULL : (*itt).second;
|
||||
|
||||
// FIX for http://sourceforge.net/tracker/?func=detail&aid=3054873&group_id=226462&atid=1067632
|
||||
// need to check for both name and ID to catch all. To avoid breaking valid files,
|
||||
// the workaround is only enabled when the first attempt to resolve the node has failed.
|
||||
if (!nd) {
|
||||
nd = FindNode(pParser.mRootNode,(*it).mNode);
|
||||
nd = FindNode(pParser.mRootNode, nodeInst.mNode);
|
||||
}
|
||||
if (!nd)
|
||||
DefaultLogger::get()->error("Collada: Unable to resolve reference to instanced node " + (*it).mNode);
|
||||
DefaultLogger::get()->error("Collada: Unable to resolve reference to instanced node " + nodeInst.mNode);
|
||||
|
||||
else {
|
||||
// attach this node to the list of children
|
||||
|
@ -1320,11 +1319,10 @@ void ColladaLoader::AddTexture ( aiMaterial& mat, const ColladaParser& pParser,
|
|||
// Fills materials from the collada material definitions
|
||||
void ColladaLoader::FillMaterials( const ColladaParser& pParser, aiScene* /*pScene*/)
|
||||
{
|
||||
for (std::vector<std::pair<Collada::Effect*, aiMaterial*> >::iterator it = newMats.begin(),
|
||||
end = newMats.end(); it != end; ++it)
|
||||
for (auto &elem : newMats)
|
||||
{
|
||||
aiMaterial& mat = (aiMaterial&)*it->second;
|
||||
Collada::Effect& effect = *it->first;
|
||||
aiMaterial& mat = (aiMaterial&)*elem.second;
|
||||
Collada::Effect& effect = *elem.first;
|
||||
|
||||
// resolve shading mode
|
||||
int shadeMode;
|
||||
|
|
|
@ -51,12 +51,14 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#include "ColladaParser.h"
|
||||
#include "fast_atof.h"
|
||||
#include "ParsingUtils.h"
|
||||
#include <memory>
|
||||
#include "../include/assimp/DefaultLogger.hpp"
|
||||
#include "../include/assimp/IOSystem.hpp"
|
||||
#include "../include/assimp/light.h"
|
||||
#include "StringUtils.h"
|
||||
#include <assimp/DefaultLogger.hpp>
|
||||
#include <assimp/IOSystem.hpp>
|
||||
#include <assimp/light.h>
|
||||
#include "TinyFormatter.h"
|
||||
|
||||
#include <memory>
|
||||
|
||||
|
||||
using namespace Assimp;
|
||||
using namespace Assimp::Collada;
|
||||
|
@ -3115,24 +3117,29 @@ aiMatrix4x4 ColladaParser::CalculateResultTransform( const std::vector<Transform
|
|||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
// Determines the input data type for the given semantic string
|
||||
Collada::InputType ColladaParser::GetTypeForSemantic( const std::string& pSemantic)
|
||||
Collada::InputType ColladaParser::GetTypeForSemantic( const std::string& semantic)
|
||||
{
|
||||
if( pSemantic == "POSITION")
|
||||
if ( semantic.empty() ) {
|
||||
DefaultLogger::get()->warn( format() << "Vertex input type is empty." );
|
||||
return IT_Invalid;
|
||||
}
|
||||
|
||||
if( semantic == "POSITION")
|
||||
return IT_Position;
|
||||
else if( pSemantic == "TEXCOORD")
|
||||
else if( semantic == "TEXCOORD")
|
||||
return IT_Texcoord;
|
||||
else if( pSemantic == "NORMAL")
|
||||
else if( semantic == "NORMAL")
|
||||
return IT_Normal;
|
||||
else if( pSemantic == "COLOR")
|
||||
else if( semantic == "COLOR")
|
||||
return IT_Color;
|
||||
else if( pSemantic == "VERTEX")
|
||||
else if( semantic == "VERTEX")
|
||||
return IT_Vertex;
|
||||
else if( pSemantic == "BINORMAL" || pSemantic == "TEXBINORMAL")
|
||||
else if( semantic == "BINORMAL" || semantic == "TEXBINORMAL")
|
||||
return IT_Bitangent;
|
||||
else if( pSemantic == "TANGENT" || pSemantic == "TEXTANGENT")
|
||||
else if( semantic == "TANGENT" || semantic == "TEXTANGENT")
|
||||
return IT_Tangent;
|
||||
|
||||
DefaultLogger::get()->warn( format() << "Unknown vertex input type \"" << pSemantic << "\". Ignoring." );
|
||||
DefaultLogger::get()->warn( format() << "Unknown vertex input type \"" << semantic << "\". Ignoring." );
|
||||
return IT_Invalid;
|
||||
}
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
|
||||
#include "irrXMLWrapper.h"
|
||||
#include "ColladaHelper.h"
|
||||
#include "../include/assimp/ai_assert.h"
|
||||
#include <assimp/ai_assert.h>
|
||||
#include "TinyFormatter.h"
|
||||
#include <memory>
|
||||
|
||||
|
|
|
@ -44,14 +44,13 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#define AI_COMPUTEUVMAPPING_H_INC
|
||||
|
||||
#include "BaseProcess.h"
|
||||
#include "../include/assimp/mesh.h"
|
||||
#include "../include/assimp/material.h"
|
||||
#include "../include/assimp/types.h"
|
||||
#include <assimp/mesh.h>
|
||||
#include <assimp/material.h>
|
||||
#include <assimp/types.h>
|
||||
|
||||
class ComputeUVMappingTest;
|
||||
|
||||
namespace Assimp
|
||||
{
|
||||
namespace Assimp {
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
/** ComputeUVMappingProcess - converts special mappings, such as spherical,
|
||||
|
|
|
@ -49,9 +49,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
|
||||
|
||||
#include "ConvertToLHProcess.h"
|
||||
#include "../include/assimp/scene.h"
|
||||
#include "../include/assimp/postprocess.h"
|
||||
#include "../include/assimp/DefaultLogger.hpp"
|
||||
#include <assimp/scene.h>
|
||||
#include <assimp/postprocess.h>
|
||||
#include <assimp/DefaultLogger.hpp>
|
||||
|
||||
using namespace Assimp;
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#ifndef AI_CONVERTTOLHPROCESS_H_INC
|
||||
#define AI_CONVERTTOLHPROCESS_H_INC
|
||||
|
||||
#include "../include/assimp/types.h"
|
||||
#include <assimp/types.h>
|
||||
#include "BaseProcess.h"
|
||||
|
||||
struct aiMesh;
|
||||
|
|
|
@ -40,13 +40,14 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
|
||||
#include "D3MFImporter.h"
|
||||
|
||||
#include "../include/assimp/scene.h"
|
||||
#include "../contrib/unzip/unzip.h"
|
||||
#include "../include/assimp/IOStream.hpp"
|
||||
#include "../include/assimp/IOSystem.hpp"
|
||||
#include "../include/assimp/DefaultLogger.hpp"
|
||||
#include <assimp/scene.h>
|
||||
#include <assimp/IOStream.hpp>
|
||||
#include <assimp/IOSystem.hpp>
|
||||
#include <assimp/DefaultLogger.hpp>
|
||||
#include <contrib/unzip/unzip.h>
|
||||
#include "irrXMLWrapper.h"
|
||||
#include "StringComparison.h"
|
||||
#include "StringUtils.h"
|
||||
|
||||
|
||||
#include <string>
|
||||
|
@ -58,7 +59,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#include <cstdlib>
|
||||
#include <memory>
|
||||
|
||||
#include "../include/assimp/ai_assert.h"
|
||||
#include <assimp/ai_assert.h>
|
||||
|
||||
#include "D3MFOpcPackage.h"
|
||||
|
||||
|
@ -224,9 +225,9 @@ private:
|
|||
aiVector3D ReadVertex()
|
||||
{
|
||||
aiVector3D vertex;
|
||||
vertex.x = std::strtof(xmlReader->getAttributeValue(D3MF::XmlTag::x.c_str()), nullptr);
|
||||
vertex.y = std::strtof(xmlReader->getAttributeValue(D3MF::XmlTag::y.c_str()), nullptr);
|
||||
vertex.z = std::strtof(xmlReader->getAttributeValue(D3MF::XmlTag::z.c_str()), nullptr);
|
||||
vertex.x = ai_strtof(xmlReader->getAttributeValue(D3MF::XmlTag::x.c_str()), nullptr);
|
||||
vertex.y = ai_strtof(xmlReader->getAttributeValue(D3MF::XmlTag::y.c_str()), nullptr);
|
||||
vertex.z = ai_strtof>(xmlReader->getAttributeValue(D3MF::XmlTag::z.c_str()), nullptr);
|
||||
|
||||
return vertex;
|
||||
}
|
||||
|
|
|
@ -40,6 +40,13 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
|
||||
|
||||
#include "D3MFOpcPackage.h"
|
||||
#include "Exceptional.h"
|
||||
|
||||
#include <contrib/unzip/unzip.h>
|
||||
#include <assimp/IOStream.hpp>
|
||||
#include <assimp/IOSystem.hpp>
|
||||
#include <assimp/DefaultLogger.hpp>
|
||||
#include <assimp/ai_assert.h>
|
||||
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
@ -48,19 +55,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#include <cassert>
|
||||
#include <cstdlib>
|
||||
|
||||
|
||||
#include "../contrib/unzip/unzip.h"
|
||||
#include "../include/assimp/IOStream.hpp"
|
||||
#include "../include/assimp/IOSystem.hpp"
|
||||
#include "../include/assimp/DefaultLogger.hpp"
|
||||
|
||||
|
||||
#include "../include/assimp/ai_assert.h"
|
||||
|
||||
#include "Exceptional.h"
|
||||
|
||||
|
||||
|
||||
#ifndef ASSIMP_BUILD_NO_3MF_IMPORTER
|
||||
|
||||
namespace Assimp {
|
||||
|
@ -324,8 +318,8 @@ D3MFZipArchive::D3MFZipArchive(IOSystem* pIOHandler, const std::string& rFile)
|
|||
// ------------------------------------------------------------------------------------------------
|
||||
// Destructor.
|
||||
D3MFZipArchive::~D3MFZipArchive() {
|
||||
for( std::map<std::string, ZipFile*>::iterator it(m_ArchiveMap.begin()), end(m_ArchiveMap.end()); it != end; ++it ) {
|
||||
delete it->second;
|
||||
for(auto &file : m_ArchiveMap) {
|
||||
delete file.second;
|
||||
}
|
||||
m_ArchiveMap.clear();
|
||||
|
||||
|
@ -398,8 +392,8 @@ void D3MFZipArchive::Close(IOStream *pFile) {
|
|||
void D3MFZipArchive::getFileList(std::vector<std::string> &rFileList) {
|
||||
rFileList.clear();
|
||||
|
||||
for(std::map<std::string, ZipFile*>::iterator it(m_ArchiveMap.begin()), end(m_ArchiveMap.end()); it != end; ++it) {
|
||||
rFileList.push_back(it->first);
|
||||
for(const auto &file : m_ArchiveMap) {
|
||||
rFileList.push_back(file.first);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#include <string>
|
||||
#include <memory>
|
||||
|
||||
#include "../include/assimp/IOSystem.hpp"
|
||||
#include <assimp/IOSystem.hpp>
|
||||
#include "irrXMLWrapper.h"
|
||||
|
||||
namespace Assimp {
|
||||
|
|
|
@ -50,7 +50,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#include "StreamReader.h"
|
||||
#include "fast_atof.h"
|
||||
#include <vector>
|
||||
#include "../include/assimp/DefaultLogger.hpp"
|
||||
#include <assimp/DefaultLogger.hpp>
|
||||
|
||||
namespace Assimp {
|
||||
namespace DXF {
|
||||
|
|
|
@ -52,8 +52,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#include "fast_atof.h"
|
||||
|
||||
#include "DXFHelper.h"
|
||||
#include "../include/assimp/IOSystem.hpp"
|
||||
#include "../include/assimp/scene.h"
|
||||
#include <assimp/IOSystem.hpp>
|
||||
#include <assimp/scene.h>
|
||||
#include <numeric>
|
||||
|
||||
using namespace Assimp;
|
||||
|
|
|
@ -46,8 +46,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#include <utility>
|
||||
#include "BaseProcess.h"
|
||||
|
||||
#include "../include/assimp/mesh.h"
|
||||
#include "../include/assimp/scene.h"
|
||||
#include <assimp/mesh.h>
|
||||
#include <assimp/scene.h>
|
||||
|
||||
class DeboneTest;
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
*/
|
||||
|
||||
|
||||
#include "../include/assimp/ai_assert.h"
|
||||
#include <assimp/ai_assert.h>
|
||||
#include "DefaultIOStream.h"
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
|
|
@ -43,8 +43,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#define AI_DEFAULTIOSTREAM_H_INC
|
||||
|
||||
#include <stdio.h>
|
||||
#include "../include/assimp/IOStream.hpp"
|
||||
#include "../include/assimp/importerdesc.h"
|
||||
#include <assimp/IOStream.hpp>
|
||||
#include <assimp/importerdesc.h>
|
||||
#include "Defines.h"
|
||||
|
||||
namespace Assimp {
|
||||
|
|
|
@ -44,8 +44,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#include "DefaultIOStream.h"
|
||||
#include "StringComparison.h"
|
||||
|
||||
#include "../include/assimp/DefaultLogger.hpp"
|
||||
#include "../include/assimp/ai_assert.h"
|
||||
#include <assimp/DefaultLogger.hpp>
|
||||
#include <assimp/ai_assert.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#ifndef AI_DEFAULTIOSYSTEM_H_INC
|
||||
#define AI_DEFAULTIOSYSTEM_H_INC
|
||||
|
||||
#include "../include/assimp/IOSystem.hpp"
|
||||
#include <assimp/IOSystem.hpp>
|
||||
|
||||
namespace Assimp {
|
||||
|
||||
|
|
|
@ -50,9 +50,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#include "StdOStreamLogStream.h"
|
||||
#include "FileLogStream.h"
|
||||
#include "StringUtils.h"
|
||||
#include "../include/assimp/NullLogger.hpp"
|
||||
#include "../include/assimp/DefaultLogger.hpp"
|
||||
#include "../include/assimp/ai_assert.h"
|
||||
#include <assimp/NullLogger.hpp>
|
||||
#include <assimp/DefaultLogger.hpp>
|
||||
#include <assimp/ai_assert.h>
|
||||
#include <iostream>
|
||||
#include <stdio.h>
|
||||
|
||||
|
|
|
@ -44,7 +44,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#ifndef INCLUDED_AI_DEFAULTPROGRESSHANDLER_H
|
||||
#define INCLUDED_AI_DEFAULTPROGRESSHANDLER_H
|
||||
|
||||
#include "../include/assimp/ProgressHandler.hpp"
|
||||
#include <assimp/ProgressHandler.hpp>
|
||||
|
||||
namespace Assimp {
|
||||
|
||||
// ------------------------------------------------------------------------------------
|
||||
|
|
|
@ -64,10 +64,10 @@ Here we implement only the C++ interface (Assimp::Exporter).
|
|||
#include "Exceptional.h"
|
||||
#include "ScenePrivate.h"
|
||||
#include <memory>
|
||||
#include "../include/assimp/Exporter.hpp"
|
||||
#include "../include/assimp/mesh.h"
|
||||
#include "../include/assimp/postprocess.h"
|
||||
#include "../include/assimp/scene.h"
|
||||
#include <assimp/Exporter.hpp>
|
||||
#include <assimp/mesh.h>
|
||||
#include <assimp/postprocess.h>
|
||||
#include <assimp/scene.h>
|
||||
#include <memory>
|
||||
|
||||
namespace Assimp {
|
||||
|
|
|
@ -47,7 +47,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
|
||||
#include "FBXTokenizer.h"
|
||||
#include "FBXUtil.h"
|
||||
#include "../include/assimp/defs.h"
|
||||
#include <assimp/defs.h>
|
||||
#include <stdint.h>
|
||||
#include "Exceptional.h"
|
||||
#include "ByteSwapper.h"
|
||||
|
|
|
@ -53,7 +53,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#include "FBXImporter.h"
|
||||
#include "StringComparison.h"
|
||||
|
||||
#include "../include/assimp/scene.h"
|
||||
#include <assimp/scene.h>
|
||||
#include <tuple>
|
||||
#include <memory>
|
||||
|
||||
|
@ -1062,8 +1062,8 @@ void Converter::GenerateTransformationNodeChain( const Model& model,
|
|||
|
||||
nd->mName.Set( name );
|
||||
|
||||
for ( size_t i = 0; i < TransformationComp_MAXIMUM; ++i ) {
|
||||
nd->mTransformation = nd->mTransformation * chain[ i ];
|
||||
for (const auto &transform : chain) {
|
||||
nd->mTransformation = nd->mTransformation * transform;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -269,8 +269,8 @@ Document::Document(const Parser& parser, const ImportSettings& settings)
|
|||
, parser(parser)
|
||||
{
|
||||
// Cannot use array default initialization syntax because vc8 fails on it
|
||||
for (unsigned int i = 0; i < sizeof(creationTimeStamp) / sizeof(creationTimeStamp[0]); ++i) {
|
||||
creationTimeStamp[i] = 0;
|
||||
for (auto &timeStamp : creationTimeStamp) {
|
||||
timeStamp = 0;
|
||||
}
|
||||
|
||||
ReadHeader();
|
||||
|
|
|
@ -46,7 +46,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
|
||||
#include <numeric>
|
||||
#include <stdint.h>
|
||||
#include "../include/assimp/mesh.h"
|
||||
#include <assimp/mesh.h>
|
||||
#include "FBXProperties.h"
|
||||
#include "FBXParser.h"
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
|
||||
#include "StreamReader.h"
|
||||
#include "MemoryIOWrapper.h"
|
||||
#include "../include/assimp/Importer.hpp"
|
||||
#include <assimp/Importer.hpp>
|
||||
|
||||
namespace Assimp {
|
||||
template<> const std::string LogFunctions<FBXImporter>::log_prefix = "FBX: ";
|
||||
|
|
|
@ -46,7 +46,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
|
||||
#include <memory>
|
||||
#include "FBXCompileConfig.h"
|
||||
#include "../include/assimp/ai_assert.h"
|
||||
#include <assimp/ai_assert.h>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
#ifndef ASSIMP_FILELOGSTREAM_H_INC
|
||||
#define ASSIMP_FILELOGSTREAM_H_INC
|
||||
|
||||
#include "../include/assimp/LogStream.hpp"
|
||||
#include "../include/assimp/IOStream.hpp"
|
||||
#include <assimp/LogStream.hpp>
|
||||
#include <assimp/IOStream.hpp>
|
||||
#include "DefaultIOSystem.h"
|
||||
|
||||
namespace Assimp {
|
||||
|
|
|
@ -44,7 +44,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#define AI_FINDDEGENERATESPROCESS_H_INC
|
||||
|
||||
#include "BaseProcess.h"
|
||||
#include "../include/assimp/mesh.h"
|
||||
#include <assimp/mesh.h>
|
||||
|
||||
class FindDegeneratesProcessTest;
|
||||
namespace Assimp {
|
||||
|
|
|
@ -44,8 +44,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#define AI_FINDINVALIDDATA_H_INC
|
||||
|
||||
#include "BaseProcess.h"
|
||||
#include "../include/assimp/types.h"
|
||||
#include "../include/assimp/anim.h"
|
||||
#include <assimp/types.h>
|
||||
#include <assimp/anim.h>
|
||||
|
||||
struct aiMesh;
|
||||
class FindInvalidDataProcessTest;
|
||||
|
|
|
@ -46,9 +46,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
// internal headers
|
||||
#include "FixNormalsStep.h"
|
||||
#include "StringUtils.h"
|
||||
#include "../include/assimp/DefaultLogger.hpp"
|
||||
#include "../include/assimp/postprocess.h"
|
||||
#include "../include/assimp/scene.h"
|
||||
#include <assimp/DefaultLogger.hpp>
|
||||
#include <assimp/postprocess.h>
|
||||
#include <assimp/scene.h>
|
||||
#include <stdio.h>
|
||||
|
||||
|
||||
|
|
|
@ -45,9 +45,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
|
||||
|
||||
#include "GenFaceNormalsProcess.h"
|
||||
#include "../include/assimp/postprocess.h"
|
||||
#include "../include/assimp/scene.h"
|
||||
#include "../include/assimp/DefaultLogger.hpp"
|
||||
#include <assimp/postprocess.h>
|
||||
#include <assimp/scene.h>
|
||||
#include <assimp/DefaultLogger.hpp>
|
||||
#include "Exceptional.h"
|
||||
#include "qnan.h"
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#define AI_GENFACENORMALPROCESS_H_INC
|
||||
|
||||
#include "BaseProcess.h"
|
||||
#include "../include/assimp/mesh.h"
|
||||
#include <assimp/mesh.h>
|
||||
|
||||
namespace Assimp
|
||||
{
|
||||
|
|
|
@ -44,7 +44,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#define AI_GENVERTEXNORMALPROCESS_H_INC
|
||||
|
||||
#include "BaseProcess.h"
|
||||
#include "../include/assimp/mesh.h"
|
||||
#include <assimp/mesh.h>
|
||||
|
||||
class GenNormalsTest;
|
||||
|
||||
|
|
|
@ -41,8 +41,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#ifndef AI_GENERIC_PROPERTY_H_INCLUDED
|
||||
#define AI_GENERIC_PROPERTY_H_INCLUDED
|
||||
|
||||
#include "./../include/assimp/Importer.hpp"
|
||||
#include "./../include/assimp/ai_assert.h"
|
||||
#include <assimp/Importer.hpp>
|
||||
#include <assimp/ai_assert.h>
|
||||
#include "Hash.h"
|
||||
#include <map>
|
||||
|
||||
|
|
|
@ -48,9 +48,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#include "HMPLoader.h"
|
||||
#include "MD2FileData.h"
|
||||
#include <memory>
|
||||
#include "../include/assimp/IOSystem.hpp"
|
||||
#include "../include/assimp/DefaultLogger.hpp"
|
||||
#include "../include/assimp/scene.h"
|
||||
#include <assimp/IOSystem.hpp>
|
||||
#include <assimp/DefaultLogger.hpp>
|
||||
#include <assimp/scene.h>
|
||||
|
||||
using namespace Assimp;
|
||||
|
||||
|
|
|
@ -45,9 +45,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#define AI_HMPLOADER_H_INCLUDED
|
||||
|
||||
// public ASSIMP headers
|
||||
#include "../include/assimp/types.h"
|
||||
#include "../include/assimp/texture.h"
|
||||
#include "../include/assimp/material.h"
|
||||
#include <assimp/types.h>
|
||||
#include <assimp/texture.h>
|
||||
#include <assimp/material.h>
|
||||
|
||||
// internal headers
|
||||
#include "BaseImporter.h"
|
||||
|
|
|
@ -50,7 +50,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#include <tuple>
|
||||
|
||||
#ifndef ASSIMP_BUILD_NO_COMPRESSED_IFC
|
||||
# include "../contrib/unzip/unzip.h"
|
||||
# include <contrib/unzip/unzip.h>
|
||||
#endif
|
||||
|
||||
#include "IFCLoader.h"
|
||||
|
@ -60,8 +60,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
|
||||
#include "StreamReader.h"
|
||||
#include "MemoryIOWrapper.h"
|
||||
#include "../include/assimp/scene.h"
|
||||
#include "../include/assimp/Importer.hpp"
|
||||
#include <assimp/scene.h>
|
||||
#include <assimp/Importer.hpp>
|
||||
|
||||
|
||||
namespace Assimp {
|
||||
|
|
|
@ -47,7 +47,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#ifndef ASSIMP_BUILD_NO_IFC_IMPORTER
|
||||
#include "IFCUtil.h"
|
||||
#include <limits>
|
||||
#include "../include/assimp/material.h"
|
||||
#include <assimp/material.h>
|
||||
|
||||
namespace Assimp {
|
||||
namespace IFC {
|
||||
|
|
|
@ -48,9 +48,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#include "IFCReaderGen.h"
|
||||
#include "IFCLoader.h"
|
||||
#include "STEPFile.h"
|
||||
#include "../include/assimp/mesh.h"
|
||||
#include "../include/assimp/material.h"
|
||||
|
||||
#include <assimp/mesh.h>
|
||||
#include <assimp/material.h>
|
||||
|
||||
struct aiNode;
|
||||
|
||||
|
|
|
@ -59,12 +59,12 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
// We need MathFunctions.h to compute the lcm/gcd of a number
|
||||
#include "MathFunctions.h"
|
||||
#include <memory>
|
||||
#include "../include/assimp/DefaultLogger.hpp"
|
||||
#include "../include/assimp/mesh.h"
|
||||
#include "../include/assimp/material.h"
|
||||
#include "../include/assimp/scene.h"
|
||||
#include "../include/assimp/IOSystem.hpp"
|
||||
#include "../include/assimp/postprocess.h"
|
||||
#include <assimp/DefaultLogger.hpp>
|
||||
#include <assimp/mesh.h>
|
||||
#include <assimp/material.h>
|
||||
#include <assimp/scene.h>
|
||||
#include <assimp/IOSystem.hpp>
|
||||
#include <assimp/postprocess.h>
|
||||
|
||||
|
||||
using namespace Assimp;
|
||||
|
@ -1372,8 +1372,7 @@ void IRRImporter::InternReadFile( const std::string& pFile,
|
|||
|
||||
/* Now iterate through all cameras and compute their final (horizontal) FOV
|
||||
*/
|
||||
for (std::vector<aiCamera*>::iterator it = cameras.begin(), end = cameras.end();it != end; ++it) {
|
||||
aiCamera* cam = *it;
|
||||
for (aiCamera *cam : cameras) {
|
||||
|
||||
// screen aspect could be missing
|
||||
if (cam->mAspect) {
|
||||
|
|
|
@ -50,7 +50,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#include "SceneCombiner.h"
|
||||
#include "Importer.h"
|
||||
#include "StringUtils.h"
|
||||
#include "../include/assimp/anim.h"
|
||||
#include <assimp/anim.h>
|
||||
|
||||
namespace Assimp {
|
||||
|
||||
|
|
|
@ -49,11 +49,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#include "ParsingUtils.h"
|
||||
#include "fast_atof.h"
|
||||
#include <memory>
|
||||
#include "../include/assimp/IOSystem.hpp"
|
||||
#include "../include/assimp/mesh.h"
|
||||
#include "../include/assimp/DefaultLogger.hpp"
|
||||
#include "../include/assimp/material.h"
|
||||
#include "../include/assimp/scene.h"
|
||||
#include <assimp/IOSystem.hpp>
|
||||
#include <assimp/mesh.h>
|
||||
#include <assimp/DefaultLogger.hpp>
|
||||
#include <assimp/material.h>
|
||||
#include <assimp/scene.h>
|
||||
#include "Macros.h"
|
||||
|
||||
|
||||
|
|
|
@ -48,6 +48,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#include "BaseImporter.h"
|
||||
#include "IRRShared.h"
|
||||
|
||||
#ifndef ASSIMP_BUILD_NO_IRRMESH_IMPORTER
|
||||
|
||||
namespace Assimp {
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
@ -92,4 +94,6 @@ protected:
|
|||
|
||||
} // end of namespace Assimp
|
||||
|
||||
#endif // ASSIMP_BUILD_NO_IRRMESH_IMPORTER
|
||||
|
||||
#endif // AI_IRRMESHIMPORTER_H_INC
|
||||
|
|
|
@ -51,8 +51,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#include "IRRShared.h"
|
||||
#include "ParsingUtils.h"
|
||||
#include "fast_atof.h"
|
||||
#include "../include/assimp/DefaultLogger.hpp"
|
||||
#include "../include/assimp/material.h"
|
||||
#include <assimp/DefaultLogger.hpp>
|
||||
#include <assimp/material.h>
|
||||
|
||||
|
||||
using namespace Assimp;
|
||||
|
|
|
@ -43,7 +43,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
* @brief Implementation of the CPP-API class #Importer
|
||||
*/
|
||||
|
||||
#include "../include/assimp/version.h"
|
||||
#include <assimp/version.h>
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
/* Uncomment this line to prevent Assimp from catching unknown exceptions.
|
||||
|
|
|
@ -45,7 +45,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#include <map>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include "../include/assimp/matrix4x4.h"
|
||||
#include <assimp/matrix4x4.h>
|
||||
|
||||
struct aiScene;
|
||||
|
||||
|
|
|
@ -52,9 +52,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#include "ImproveCacheLocality.h"
|
||||
#include "VertexTriangleAdjacency.h"
|
||||
#include "StringUtils.h"
|
||||
#include "../include/assimp/postprocess.h"
|
||||
#include "../include/assimp/scene.h"
|
||||
#include "../include/assimp/DefaultLogger.hpp"
|
||||
#include <assimp/postprocess.h>
|
||||
#include <assimp/scene.h>
|
||||
#include <assimp/DefaultLogger.hpp>
|
||||
#include <stdio.h>
|
||||
#include <stack>
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#define AI_IMPROVECACHELOCALITY_H_INC
|
||||
|
||||
#include "BaseProcess.h"
|
||||
#include "../include/assimp/types.h"
|
||||
#include <assimp/types.h>
|
||||
|
||||
struct aiMesh;
|
||||
|
||||
|
|
|
@ -44,7 +44,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#define AI_JOINVERTICESPROCESS_H_INC
|
||||
|
||||
#include "BaseProcess.h"
|
||||
#include "../include/assimp/types.h"
|
||||
#include <assimp/types.h>
|
||||
|
||||
struct aiMesh;
|
||||
|
||||
namespace Assimp
|
||||
|
|
|
@ -47,7 +47,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#ifndef AI_LWO_ANIMATION_INCLUDED
|
||||
#define AI_LWO_ANIMATION_INCLUDED
|
||||
|
||||
#include "../include/assimp/anim.h"
|
||||
#include <assimp/anim.h>
|
||||
#include <vector>
|
||||
#include <list>
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ The chunks are taken from the official LightWave SDK headers.
|
|||
#include <list>
|
||||
|
||||
// public ASSIMP headers
|
||||
#include "../include/assimp/mesh.h"
|
||||
#include <assimp/mesh.h>
|
||||
|
||||
// internal headers
|
||||
#include "IFF.h"
|
||||
|
|
|
@ -53,8 +53,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#include "ByteSwapper.h"
|
||||
#include "ProcessHelper.h"
|
||||
#include "ConvertToLHProcess.h"
|
||||
#include <assimp/IOSystem.hpp>
|
||||
#include <memory>
|
||||
#include "../include/assimp/IOSystem.hpp"
|
||||
#include <sstream>
|
||||
#include <iomanip>
|
||||
|
||||
|
@ -246,8 +246,7 @@ void LWOImporter::InternReadFile( const std::string& pFile,
|
|||
apcMeshes.reserve(mLayers->size()*std::min(((unsigned int)mSurfaces->size()/2u), 1u));
|
||||
|
||||
unsigned int iDefaultSurface = UINT_MAX; // index of the default surface
|
||||
for (LayerList::iterator lit = mLayers->begin(), lend = mLayers->end();lit != lend;++lit) {
|
||||
LWO::Layer& layer = *lit;
|
||||
for (LWO::Layer &layer : *mLayers) {
|
||||
if (layer.skip)
|
||||
continue;
|
||||
|
||||
|
@ -909,12 +908,12 @@ void LWOImporter::LoadLWO2PolygonTags(unsigned int length)
|
|||
template <class T>
|
||||
VMapEntry* FindEntry(std::vector< T >& list,const std::string& name, bool perPoly)
|
||||
{
|
||||
for (typename std::vector< T >::iterator it = list.begin(), end = list.end();it != end; ++it) {
|
||||
if ((*it).name == name) {
|
||||
for (auto & elem : list) {
|
||||
if (elem.name == name) {
|
||||
if (!perPoly) {
|
||||
DefaultLogger::get()->warn("LWO2: Found two VMAP sections with equal names");
|
||||
}
|
||||
return &(*it);
|
||||
return &elem;
|
||||
}
|
||||
}
|
||||
list.push_back( T() );
|
||||
|
@ -941,8 +940,8 @@ inline void CreateNewEntry(T& chan, unsigned int srcIdx)
|
|||
template <class T>
|
||||
inline void CreateNewEntry(std::vector< T >& list, unsigned int srcIdx)
|
||||
{
|
||||
for (typename std::vector< T >::iterator it = list.begin(), end = list.end();it != end;++it) {
|
||||
CreateNewEntry( *it, srcIdx );
|
||||
for (auto &elem : list) {
|
||||
CreateNewEntry( elem, srcIdx );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -42,9 +42,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#ifndef AI_LWOLOADER_H_INCLUDED
|
||||
#define AI_LWOLOADER_H_INCLUDED
|
||||
|
||||
#include "../include/assimp/types.h"
|
||||
#include "../include/assimp/material.h"
|
||||
#include "../include/assimp/DefaultLogger.hpp"
|
||||
#include <assimp/types.h>
|
||||
#include <assimp/material.h>
|
||||
#include <assimp/DefaultLogger.hpp>
|
||||
|
||||
#include "LWOFileData.h"
|
||||
#include "BaseImporter.h"
|
||||
|
|
|
@ -90,8 +90,8 @@ bool LWOImporter::HandleTextures(aiMaterial* pcMat, const TextureList& in, aiTex
|
|||
aiString s;
|
||||
bool ret = false;
|
||||
|
||||
for (TextureList::const_iterator it = in.begin(), end = in.end();it != end;++it) {
|
||||
if (!(*it).enabled || !(*it).bCanUse)
|
||||
for (const auto &texture : in) {
|
||||
if (!texture.enabled || !texture.bCanUse)
|
||||
continue;
|
||||
ret = true;
|
||||
|
||||
|
@ -100,7 +100,7 @@ bool LWOImporter::HandleTextures(aiMaterial* pcMat, const TextureList& in, aiTex
|
|||
// channels if they're not there.
|
||||
|
||||
aiTextureMapping mapping;
|
||||
switch ((*it).mapMode)
|
||||
switch (texture.mapMode)
|
||||
{
|
||||
case LWO::Texture::Planar:
|
||||
mapping = aiTextureMapping_PLANE;
|
||||
|
@ -120,13 +120,13 @@ bool LWOImporter::HandleTextures(aiMaterial* pcMat, const TextureList& in, aiTex
|
|||
break;
|
||||
case LWO::Texture::UV:
|
||||
{
|
||||
if( UINT_MAX == (*it).mRealUVIndex ) {
|
||||
if( UINT_MAX == texture.mRealUVIndex ) {
|
||||
// We have no UV index for this texture, so we can't display it
|
||||
continue;
|
||||
}
|
||||
|
||||
// add the UV source index
|
||||
temp = (*it).mRealUVIndex;
|
||||
temp = texture.mRealUVIndex;
|
||||
pcMat->AddProperty<int>((int*)&temp,1,AI_MATKEY_UVWSRC(type,cur));
|
||||
|
||||
mapping = aiTextureMapping_UV;
|
||||
|
@ -139,7 +139,7 @@ bool LWOImporter::HandleTextures(aiMaterial* pcMat, const TextureList& in, aiTex
|
|||
if (mapping != aiTextureMapping_UV) {
|
||||
// Setup the main axis
|
||||
aiVector3D v;
|
||||
switch ((*it).majorAxis) {
|
||||
switch (texture.majorAxis) {
|
||||
case Texture::AXIS_X:
|
||||
v = aiVector3D(1.f,0.f,0.f);
|
||||
break;
|
||||
|
@ -156,8 +156,8 @@ bool LWOImporter::HandleTextures(aiMaterial* pcMat, const TextureList& in, aiTex
|
|||
// Setup UV scalings for cylindric and spherical projections
|
||||
if (mapping == aiTextureMapping_CYLINDER || mapping == aiTextureMapping_SPHERE) {
|
||||
aiUVTransform trafo;
|
||||
trafo.mScaling.x = (*it).wrapAmountW;
|
||||
trafo.mScaling.y = (*it).wrapAmountH;
|
||||
trafo.mScaling.x = texture.wrapAmountW;
|
||||
trafo.mScaling.y = texture.wrapAmountH;
|
||||
|
||||
static_assert(sizeof(aiUVTransform)/sizeof(float) == 5, "sizeof(aiUVTransform)/sizeof(float) == 5");
|
||||
pcMat->AddProperty(&trafo,1,AI_MATKEY_UVTRANSFORM(type,cur));
|
||||
|
@ -171,7 +171,7 @@ bool LWOImporter::HandleTextures(aiMaterial* pcMat, const TextureList& in, aiTex
|
|||
// find the corresponding clip (take the last one if multiple
|
||||
// share the same index)
|
||||
ClipList::iterator end = mClips.end(), candidate = end;
|
||||
temp = (*it).mClipIdx;
|
||||
temp = texture.mClipIdx;
|
||||
for (ClipList::iterator clip = mClips.begin(); clip != end; ++clip) {
|
||||
if ((*clip).idx == temp) {
|
||||
candidate = clip;
|
||||
|
@ -208,7 +208,7 @@ bool LWOImporter::HandleTextures(aiMaterial* pcMat, const TextureList& in, aiTex
|
|||
}
|
||||
else
|
||||
{
|
||||
std::string ss = (*it).mFileName;
|
||||
std::string ss = texture.mFileName;
|
||||
if (!ss.length()) {
|
||||
DefaultLogger::get()->error("LWOB: Empty file name");
|
||||
continue;
|
||||
|
@ -219,10 +219,10 @@ bool LWOImporter::HandleTextures(aiMaterial* pcMat, const TextureList& in, aiTex
|
|||
pcMat->AddProperty(&s,AI_MATKEY_TEXTURE(type,cur));
|
||||
|
||||
// add the blend factor
|
||||
pcMat->AddProperty<float>(&(*it).mStrength,1,AI_MATKEY_TEXBLEND(type,cur));
|
||||
pcMat->AddProperty<float>(&texture.mStrength,1,AI_MATKEY_TEXBLEND(type,cur));
|
||||
|
||||
// add the blend operation
|
||||
switch ((*it).blendType)
|
||||
switch (texture.blendType)
|
||||
{
|
||||
case LWO::Texture::Normal:
|
||||
case LWO::Texture::Multiply:
|
||||
|
@ -254,11 +254,11 @@ bool LWOImporter::HandleTextures(aiMaterial* pcMat, const TextureList& in, aiTex
|
|||
pcMat->AddProperty<int>((int*)&mapping,1,AI_MATKEY_MAPPING(type,cur));
|
||||
|
||||
// add the u-wrapping
|
||||
temp = (unsigned int)GetMapMode((*it).wrapModeWidth);
|
||||
temp = (unsigned int)GetMapMode(texture.wrapModeWidth);
|
||||
pcMat->AddProperty<int>((int*)&temp,1,AI_MATKEY_MAPPINGMODE_U(type,cur));
|
||||
|
||||
// add the v-wrapping
|
||||
temp = (unsigned int)GetMapMode((*it).wrapModeHeight);
|
||||
temp = (unsigned int)GetMapMode(texture.wrapModeHeight);
|
||||
pcMat->AddProperty<int>((int*)&temp,1,AI_MATKEY_MAPPINGMODE_V(type,cur));
|
||||
|
||||
++cur;
|
||||
|
@ -343,16 +343,14 @@ void LWOImporter::ConvertMaterial(const LWO::Surface& surf,aiMaterial* pcMat)
|
|||
|
||||
// Now we need to know which shader to use .. iterate through the shader list of
|
||||
// the surface and search for a name which we know ...
|
||||
for (ShaderList::const_iterator it = surf.mShaders.begin(), end = surf.mShaders.end();it != end;++it) {
|
||||
//if (!(*it).enabled)continue;
|
||||
|
||||
if ((*it).functionName == "LW_SuperCelShader" || (*it).functionName == "AH_CelShader") {
|
||||
for (const auto &shader : surf.mShaders) {
|
||||
if (shader.functionName == "LW_SuperCelShader" || shader.functionName == "AH_CelShader") {
|
||||
DefaultLogger::get()->info("LWO2: Mapping LW_SuperCelShader/AH_CelShader to aiShadingMode_Toon");
|
||||
|
||||
m = aiShadingMode_Toon;
|
||||
break;
|
||||
}
|
||||
else if ((*it).functionName == "LW_RealFresnel" || (*it).functionName == "LW_FastFresnel") {
|
||||
else if (shader.functionName == "LW_RealFresnel" || shader.functionName == "LW_FastFresnel") {
|
||||
DefaultLogger::get()->info("LWO2: Mapping LW_RealFresnel/LW_FastFresnel to aiShadingMode_Fresnel");
|
||||
|
||||
m = aiShadingMode_Fresnel;
|
||||
|
@ -360,7 +358,7 @@ void LWOImporter::ConvertMaterial(const LWO::Surface& surf,aiMaterial* pcMat)
|
|||
}
|
||||
else
|
||||
{
|
||||
DefaultLogger::get()->warn("LWO2: Unknown surface shader: " + (*it).functionName);
|
||||
DefaultLogger::get()->warn("LWO2: Unknown surface shader: " + shader.functionName);
|
||||
}
|
||||
}
|
||||
if (surf.mMaximumSmoothAngle <= 0.0f)
|
||||
|
@ -381,20 +379,20 @@ char LWOImporter::FindUVChannels(LWO::TextureList& list,
|
|||
LWO::Layer& /*layer*/,LWO::UVChannel& uv, unsigned int next)
|
||||
{
|
||||
char ret = 0;
|
||||
for (TextureList::iterator it = list.begin(), end = list.end();it != end;++it) {
|
||||
for (auto &texture : list) {
|
||||
|
||||
// Ignore textures with non-UV mappings for the moment.
|
||||
if (!(*it).enabled || !(*it).bCanUse || (*it).mapMode != LWO::Texture::UV) {
|
||||
if (!texture.enabled || !texture.bCanUse || texture.mapMode != LWO::Texture::UV) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if ((*it).mUVChannelIndex == uv.name) {
|
||||
if (texture.mUVChannelIndex == uv.name) {
|
||||
ret = 1;
|
||||
|
||||
// got it.
|
||||
if ((*it).mRealUVIndex == UINT_MAX || (*it).mRealUVIndex == next)
|
||||
if (texture.mRealUVIndex == UINT_MAX || texture.mRealUVIndex == next)
|
||||
{
|
||||
(*it).mRealUVIndex = next;
|
||||
texture.mRealUVIndex = next;
|
||||
}
|
||||
else {
|
||||
// channel mismatch. need to duplicate the material.
|
||||
|
|
|
@ -55,9 +55,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#include "SkeletonMeshBuilder.h"
|
||||
#include "ConvertToLHProcess.h"
|
||||
#include "Importer.h"
|
||||
#include "../include/assimp/DefaultLogger.hpp"
|
||||
#include "../include/assimp/scene.h"
|
||||
#include "../include/assimp/IOSystem.hpp"
|
||||
#include <assimp/DefaultLogger.hpp>
|
||||
#include <assimp/scene.h>
|
||||
#include <assimp/IOSystem.hpp>
|
||||
#include <memory>
|
||||
|
||||
|
||||
|
|
|
@ -43,9 +43,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
|
||||
#include "LimitBoneWeightsProcess.h"
|
||||
#include "StringUtils.h"
|
||||
#include "../include/assimp/postprocess.h"
|
||||
#include "../include/assimp/DefaultLogger.hpp"
|
||||
#include "../include/assimp/scene.h"
|
||||
#include <assimp/postprocess.h>
|
||||
#include <assimp/DefaultLogger.hpp>
|
||||
#include <assimp/scene.h>
|
||||
#include <stdio.h>
|
||||
|
||||
using namespace Assimp;
|
||||
|
|
|
@ -46,7 +46,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
|
||||
#include "TinyFormatter.h"
|
||||
#include "Exceptional.h"
|
||||
#include "../include/assimp/DefaultLogger.hpp"
|
||||
#include <assimp/DefaultLogger.hpp>
|
||||
|
||||
namespace Assimp {
|
||||
|
||||
|
|
|
@ -45,12 +45,12 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#ifndef AI_MD2FILEHELPER_H_INC
|
||||
#define AI_MD2FILEHELPER_H_INC
|
||||
|
||||
#include "../include/assimp/types.h"
|
||||
#include "../include/assimp/mesh.h"
|
||||
#include "../include/assimp/anim.h"
|
||||
#include <assimp/types.h>
|
||||
#include <assimp/mesh.h>
|
||||
#include <assimp/anim.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "./../include/assimp/Compiler/pushpack1.h"
|
||||
#include <assimp/Compiler/pushpack1.h>
|
||||
|
||||
namespace Assimp {
|
||||
namespace MD2 {
|
||||
|
@ -147,7 +147,7 @@ struct Skin
|
|||
char name[AI_MD2_MAXQPATH]; /* texture file name */
|
||||
} PACK_STRUCT;
|
||||
|
||||
#include "./../include/assimp/Compiler/poppack1.h"
|
||||
#include <assimp/Compiler/poppack1.h>
|
||||
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
|
|
@ -46,18 +46,15 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#include "MD2Loader.h"
|
||||
#include "ByteSwapper.h"
|
||||
#include "MD2NormalTable.h" // shouldn't be included by other units
|
||||
#include "../include/assimp/DefaultLogger.hpp"
|
||||
#include "../include/assimp/Importer.hpp"
|
||||
#include <assimp/DefaultLogger.hpp>
|
||||
#include <assimp/Importer.hpp>
|
||||
#include <assimp/IOSystem.hpp>
|
||||
#include <assimp/scene.h>
|
||||
#include <memory>
|
||||
#include "../include/assimp/IOSystem.hpp"
|
||||
#include "../include/assimp/scene.h"
|
||||
|
||||
|
||||
|
||||
using namespace Assimp;
|
||||
using namespace Assimp::MD2;
|
||||
|
||||
|
||||
// helper macro to determine the size of an array
|
||||
#if (!defined ARRAYSIZE)
|
||||
# define ARRAYSIZE(_array) (int(sizeof(_array) / sizeof(_array[0])))
|
||||
|
|
|
@ -45,15 +45,14 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#define AI_MD2LOADER_H_INCLUDED
|
||||
|
||||
#include "BaseImporter.h"
|
||||
#include "../include/assimp/types.h"
|
||||
#include <assimp/types.h>
|
||||
#include "ByteSwapper.h"
|
||||
|
||||
#include "MD2FileData.h"
|
||||
|
||||
struct aiNode;
|
||||
|
||||
namespace Assimp {
|
||||
|
||||
|
||||
using namespace MD2;
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
|
|
@ -51,11 +51,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#include <sstream>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "../include/assimp/types.h"
|
||||
#include "../include/assimp/mesh.h"
|
||||
#include "../include/assimp/anim.h"
|
||||
#include <assimp/types.h>
|
||||
#include <assimp/mesh.h>
|
||||
#include <assimp/anim.h>
|
||||
|
||||
#include "./../include/assimp/Compiler/pushpack1.h"
|
||||
#include <assimp/Compiler/pushpack1.h>
|
||||
|
||||
namespace Assimp {
|
||||
namespace MD3 {
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue