diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8b7bd86e9..dc7cc452c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,7 +1,6 @@
# Open Asset Import Library (assimp)
# ----------------------------------------------------------------------
-#
-# Copyright (c) 2006-2016, assimp team
+# Copyright (c) 2006-2017, assimp team
# All rights reserved.
#
# Redistribution and use of this software in source and binary forms,
@@ -33,7 +32,6 @@
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
#----------------------------------------------------------------------
SET(CMAKE_LEGACY_CYGWIN_WIN32 0) # Remove when CMake >= 2.8.4 is required
cmake_minimum_required( VERSION 2.8 )
@@ -81,6 +79,11 @@ OPTION ( ASSIMP_COVERALLS
OFF
)
+OPTION ( BUILD_DOCS
+ "Build documentation using Doxygen."
+ OFF
+)
+
IF(MSVC)
set (CMAKE_PREFIX_PATH "D:\\libs\\devil")
OPTION( ASSIMP_INSTALL_PDB
@@ -155,12 +158,16 @@ SET(LIBASSIMP-DEV_COMPONENT "libassimp${ASSIMP_VERSION_MAJOR}.${ASSIMP_VERSION_M
SET(CPACK_COMPONENTS_ALL assimp-bin ${LIBASSIMP_COMPONENT} ${LIBASSIMP-DEV_COMPONENT} assimp-dev)
SET(ASSIMP_LIBRARY_SUFFIX "" CACHE STRING "Suffix to append to library names")
-# Ensure that we do not run into issues like http://www.tcm.phy.cam.ac.uk/sw/inodes64.html on 32 bit linux
IF( UNIX )
+ # Ensure that we do not run into issues like http://www.tcm.phy.cam.ac.uk/sw/inodes64.html on 32 bit linux
IF ( CMAKE_SIZEOF_VOID_P EQUAL 4) # only necessary for 32-bit linux
ADD_DEFINITIONS(-D_FILE_OFFSET_BITS=64 )
ENDIF()
-ENDIF()
+
+ # Use GNUInstallDirs for Unix predefined directories
+ include(GNUInstallDirs)
+ENDIF( UNIX )
+
IF((CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX) AND NOT CMAKE_COMPILER_IS_MINGW)
IF (BUILD_SHARED_LIBS AND CMAKE_SIZEOF_VOID_P EQUAL 8) # -fPIC is only required for shared libs on 64 bit
@@ -232,6 +239,10 @@ IF( CMAKE_COMPILER_IS_GNUCXX )
SET(LIBSTDC++_LIBRARIES -lstdc++)
ENDIF( CMAKE_COMPILER_IS_GNUCXX )
+IF( BUILD_DOCS )
+ add_subdirectory(doc)
+ENDIF( BUILD_DOCS )
+
# Search for external dependencies, and build them from source if not found
# Search for zlib
IF ( NOT ASSIMP_BUILD_ZLIB )
@@ -429,29 +440,29 @@ IF(CMAKE_CPACK_COMMAND AND UNIX AND ASSIMP_OPT_BUILD_PACKAGES)
ENDIF()
if(WIN32)
- if (CMAKE_SIZEOF_VOID_P EQUAL 8)
- SET(BIN_DIR "${PROJECT_SOURCE_DIR}/bin64/")
- SET(LIB_DIR "${PROJECT_SOURCE_DIR}/lib64/")
- elseif()
- SET(BIN_DIR "${PROJECT_SOURCE_DIR}/bin32/")
- SET(LIB_DIR "${PROJECT_SOURCE_DIR}/lib32/")
- ENDIF()
+ if (CMAKE_SIZEOF_VOID_P EQUAL 8)
+ SET(BIN_DIR "${PROJECT_SOURCE_DIR}/bin64/")
+ SET(LIB_DIR "${PROJECT_SOURCE_DIR}/lib64/")
+ elseif()
+ SET(BIN_DIR "${PROJECT_SOURCE_DIR}/bin32/")
+ SET(LIB_DIR "${PROJECT_SOURCE_DIR}/lib32/")
+ ENDIF()
- if(MSVC12)
- SET(ASSIMP_MSVC_VERSION "vc120")
- elseif(MSVC14)
- SET(ASSIMP_MSVC_VERSION "vc140")
- ENDIF(MSVC12)
+ if(MSVC12)
+ SET(ASSIMP_MSVC_VERSION "vc120")
+ elseif(MSVC14)
+ SET(ASSIMP_MSVC_VERSION "vc140")
+ ENDIF(MSVC12)
- if(MSVC12 OR MSVC14)
- add_custom_target(UpdateAssimpLibsDebugSymbolsAndDLLs COMMENT "Copying Assimp Libraries ..." VERBATIM)
- add_custom_command(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Release/assimp-${ASSIMP_MSVC_VERSION}-mt.dll ${BIN_DIR}assimp-${ASSIMP_MSVC_VERSION}-mt.dll VERBATIM)
- add_custom_command(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Release/assimp-${ASSIMP_MSVC_VERSION}-mt.exp ${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mt.exp VERBATIM)
- add_custom_command(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Release/assimp-${ASSIMP_MSVC_VERSION}-mt.lib ${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mt.lib VERBATIM)
- add_custom_command(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Debug/assimp-${ASSIMP_MSVC_VERSION}-mtd.dll ${BIN_DIR}assimp-${ASSIMP_MSVC_VERSION}-mtd.dll VERBATIM)
- add_custom_command(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Debug/assimp-${ASSIMP_MSVC_VERSION}-mtd.exp ${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mtd.exp VERBATIM)
- add_custom_command(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Debug/assimp-${ASSIMP_MSVC_VERSION}-mtd.ilk ${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mtd.ilk VERBATIM)
- add_custom_command(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Debug/assimp-${ASSIMP_MSVC_VERSION}-mtd.lib ${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mtd.lib VERBATIM)
- add_custom_command(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Debug/assimp-${ASSIMP_MSVC_VERSION}-mtd.pdb ${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mtd.pdb VERBATIM)
- ENDIF(MSVC12 OR MSVC14)
+ if(MSVC12 OR MSVC14)
+ add_custom_target(UpdateAssimpLibsDebugSymbolsAndDLLs COMMENT "Copying Assimp Libraries ..." VERBATIM)
+ add_custom_command(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Release/assimp-${ASSIMP_MSVC_VERSION}-mt.dll ${BIN_DIR}assimp-${ASSIMP_MSVC_VERSION}-mt.dll VERBATIM)
+ add_custom_command(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Release/assimp-${ASSIMP_MSVC_VERSION}-mt.exp ${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mt.exp VERBATIM)
+ add_custom_command(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Release/assimp-${ASSIMP_MSVC_VERSION}-mt.lib ${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mt.lib VERBATIM)
+ add_custom_command(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Debug/assimp-${ASSIMP_MSVC_VERSION}-mtd.dll ${BIN_DIR}assimp-${ASSIMP_MSVC_VERSION}-mtd.dll VERBATIM)
+ add_custom_command(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Debug/assimp-${ASSIMP_MSVC_VERSION}-mtd.exp ${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mtd.exp VERBATIM)
+ add_custom_command(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Debug/assimp-${ASSIMP_MSVC_VERSION}-mtd.ilk ${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mtd.ilk VERBATIM)
+ add_custom_command(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Debug/assimp-${ASSIMP_MSVC_VERSION}-mtd.lib ${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mtd.lib VERBATIM)
+ add_custom_command(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Debug/assimp-${ASSIMP_MSVC_VERSION}-mtd.pdb ${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mtd.pdb VERBATIM)
+ ENDIF(MSVC12 OR MSVC14)
ENDIF (WIN32)
diff --git a/Readme.md b/Readme.md
index 8ba8bbf54..2dc024a52 100644
--- a/Readme.md
+++ b/Readme.md
@@ -7,6 +7,7 @@ Open Asset Import Library (assimp)
+
[](https://coveralls.io/github/assimp/assimp?branch=master)
@@ -133,10 +134,6 @@ And we also have a Gitter-channel:Gitter [![Join the chat at https://gitter.im/a
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 ###
-You can get a patron of Asset-Importer-Lib:
-Become a Patron!
-
### License ###
Our license is based on the modified, __3-clause BSD__-License.
diff --git a/assimp-config-version.cmake.in b/assimp-config-version.cmake.in
index ff48b4822..923a38798 100644
--- a/assimp-config-version.cmake.in
+++ b/assimp-config-version.cmake.in
@@ -1,8 +1,43 @@
+# Open Asset Import Library (assimp)
+# ----------------------------------------------------------------------
+# Copyright (c) 2006-2017, assimp team
+# All rights reserved.
+#
+# Redistribution and use of this software in source and binary forms,
+# with or without modification, are permitted provided that the
+# following conditions are met:
+#
+# * Redistributions of source code must retain the above
+# copyright notice, this list of conditions and the
+# following disclaimer.
+#
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the
+# following disclaimer in the documentation and/or other
+# materials provided with the distribution.
+#
+# * Neither the name of the assimp team, nor the names of its
+# contributors may be used to endorse or promote products
+# derived from this software without specific prior
+# written permission of the assimp team.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#----------------------------------------------------------------------
set( PACKAGE_VERSION "@ASSIMP_VERSION@" )
if( "${PACKAGE_FIND_VERSION}" VERSION_EQUAL "@ASSIMP_VERSION@")
set(PACKAGE_VERSION_EXACT 1)
endif()
-if( "${PACKAGE_FIND_VERSION_MAJOR}.${PACKAGE_FIND_VERSION_MINOR}" EQUAL "@ASSIMP_SOVERSION@" )
+if( "${PACKAGE_FIND_VERSION_MAJOR}.${PACKAGE_FIND_VERSION_MINOR}" EQUAL "@ASSIMP_VERSION@" )
set(PACKAGE_VERSION_COMPATIBLE 1)
elseif( "${PACKAGE_FIND_VERSION_MAJOR}" EQUAL "@ASSIMP_VERSION_MAJOR@" )
# for now backward compatible if minor version is less
diff --git a/code/CMakeLists.txt b/code/CMakeLists.txt
index 60d0ef23e..24930b0ff 100644
--- a/code/CMakeLists.txt
+++ b/code/CMakeLists.txt
@@ -936,7 +936,7 @@ if(MSVC AND ASSIMP_INSTALL_PDB)
DESTINATION ${ASSIMP_LIB_INSTALL_DIR}
CONFIGURATIONS Debug
)
- install(FILES ${Assimp_BINARY_DIR}/code/RelWithDebInfo/assimp.pdb
+ install(FILES ${Assimp_BINARY_DIR}/code/RelWithDebInfo/assimp${LIBRARY_SUFFIX}.pdb
DESTINATION ${ASSIMP_LIB_INSTALL_DIR}
CONFIGURATIONS RelWithDebInfo
)
diff --git a/code/ObjFileImporter.cpp b/code/ObjFileImporter.cpp
index 1b9b92f62..e9b0f8227 100644
--- a/code/ObjFileImporter.cpp
+++ b/code/ObjFileImporter.cpp
@@ -614,9 +614,12 @@ void ObjFileImporter::createMaterials(const ObjFile::Model* pModel, aiScene* pSc
mat->AddProperty( &pCurrentMaterial->ior, 1, AI_MATKEY_REFRACTI );
// Adding textures
+ const int uvwIndex = 0;
+
if ( 0 != pCurrentMaterial->texture.length )
{
mat->AddProperty( &pCurrentMaterial->texture, AI_MATKEY_TEXTURE_DIFFUSE(0));
+ mat->AddProperty( &uvwIndex, 1, AI_MATKEY_UVWSRC_DIFFUSE(0) );
if (pCurrentMaterial->clamp[ObjFile::Material::TextureDiffuseType])
{
addTextureMappingModeProperty(mat, aiTextureType_DIFFUSE);
@@ -626,6 +629,7 @@ void ObjFileImporter::createMaterials(const ObjFile::Model* pModel, aiScene* pSc
if ( 0 != pCurrentMaterial->textureAmbient.length )
{
mat->AddProperty( &pCurrentMaterial->textureAmbient, AI_MATKEY_TEXTURE_AMBIENT(0));
+ mat->AddProperty( &uvwIndex, 1, AI_MATKEY_UVWSRC_AMBIENT(0) );
if (pCurrentMaterial->clamp[ObjFile::Material::TextureAmbientType])
{
addTextureMappingModeProperty(mat, aiTextureType_AMBIENT);
@@ -633,11 +637,15 @@ void ObjFileImporter::createMaterials(const ObjFile::Model* pModel, aiScene* pSc
}
if ( 0 != pCurrentMaterial->textureEmissive.length )
+ {
mat->AddProperty( &pCurrentMaterial->textureEmissive, AI_MATKEY_TEXTURE_EMISSIVE(0));
+ mat->AddProperty( &uvwIndex, 1, AI_MATKEY_UVWSRC_EMISSIVE(0) );
+ }
if ( 0 != pCurrentMaterial->textureSpecular.length )
{
mat->AddProperty( &pCurrentMaterial->textureSpecular, AI_MATKEY_TEXTURE_SPECULAR(0));
+ mat->AddProperty( &uvwIndex, 1, AI_MATKEY_UVWSRC_SPECULAR(0) );
if (pCurrentMaterial->clamp[ObjFile::Material::TextureSpecularType])
{
addTextureMappingModeProperty(mat, aiTextureType_SPECULAR);
@@ -647,6 +655,7 @@ void ObjFileImporter::createMaterials(const ObjFile::Model* pModel, aiScene* pSc
if ( 0 != pCurrentMaterial->textureBump.length )
{
mat->AddProperty( &pCurrentMaterial->textureBump, AI_MATKEY_TEXTURE_HEIGHT(0));
+ mat->AddProperty( &uvwIndex, 1, AI_MATKEY_UVWSRC_HEIGHT(0) );
if (pCurrentMaterial->clamp[ObjFile::Material::TextureBumpType])
{
addTextureMappingModeProperty(mat, aiTextureType_HEIGHT);
@@ -656,6 +665,7 @@ void ObjFileImporter::createMaterials(const ObjFile::Model* pModel, aiScene* pSc
if ( 0 != pCurrentMaterial->textureNormal.length )
{
mat->AddProperty( &pCurrentMaterial->textureNormal, AI_MATKEY_TEXTURE_NORMALS(0));
+ mat->AddProperty( &uvwIndex, 1, AI_MATKEY_UVWSRC_NORMALS(0) );
if (pCurrentMaterial->clamp[ObjFile::Material::TextureNormalType])
{
addTextureMappingModeProperty(mat, aiTextureType_NORMALS);
@@ -672,6 +682,7 @@ void ObjFileImporter::createMaterials(const ObjFile::Model* pModel, aiScene* pSc
for( unsigned i = 0; i < count; i++ )
{
mat->AddProperty(&pCurrentMaterial->textureReflection[i], AI_MATKEY_TEXTURE_REFLECTION(i));
+ mat->AddProperty( &uvwIndex, 1, AI_MATKEY_UVWSRC_REFLECTION(i) );
if(pCurrentMaterial->clamp[type])
addTextureMappingModeProperty(mat, aiTextureType_REFLECTION, 1, i);
@@ -681,6 +692,7 @@ void ObjFileImporter::createMaterials(const ObjFile::Model* pModel, aiScene* pSc
if ( 0 != pCurrentMaterial->textureDisp.length )
{
mat->AddProperty( &pCurrentMaterial->textureDisp, AI_MATKEY_TEXTURE_DISPLACEMENT(0) );
+ mat->AddProperty( &uvwIndex, 1, AI_MATKEY_UVWSRC_DISPLACEMENT(0) );
if (pCurrentMaterial->clamp[ObjFile::Material::TextureDispType])
{
addTextureMappingModeProperty(mat, aiTextureType_DISPLACEMENT);
@@ -690,6 +702,7 @@ void ObjFileImporter::createMaterials(const ObjFile::Model* pModel, aiScene* pSc
if ( 0 != pCurrentMaterial->textureOpacity.length )
{
mat->AddProperty( &pCurrentMaterial->textureOpacity, AI_MATKEY_TEXTURE_OPACITY(0));
+ mat->AddProperty( &uvwIndex, 1, AI_MATKEY_UVWSRC_OPACITY(0) );
if (pCurrentMaterial->clamp[ObjFile::Material::TextureOpacityType])
{
addTextureMappingModeProperty(mat, aiTextureType_OPACITY);
@@ -699,6 +712,7 @@ void ObjFileImporter::createMaterials(const ObjFile::Model* pModel, aiScene* pSc
if ( 0 != pCurrentMaterial->textureSpecularity.length )
{
mat->AddProperty( &pCurrentMaterial->textureSpecularity, AI_MATKEY_TEXTURE_SHININESS(0));
+ mat->AddProperty( &uvwIndex, 1, AI_MATKEY_UVWSRC_SHININESS(0) );
if (pCurrentMaterial->clamp[ObjFile::Material::TextureSpecularityType])
{
addTextureMappingModeProperty(mat, aiTextureType_SHININESS);
diff --git a/code/ObjFileParser.cpp b/code/ObjFileParser.cpp
index 41ae447ba..3b058f677 100644
--- a/code/ObjFileParser.cpp
+++ b/code/ObjFileParser.cpp
@@ -97,7 +97,30 @@ ObjFileParser::~ObjFileParser() {
ObjFile::Model *ObjFileParser::GetModel() const {
return m_pModel;
}
-
+void ignoreNewLines(IOStreamBuffer &streamBuffer, std::vector &buffer)
+{
+ std::vector buf(buffer);
+ auto copyPosition = buffer.begin();
+ auto curPosition = buf.cbegin();
+ do
+ {
+ while (*curPosition != '\n'&&*curPosition != '\\')
+ {
+ ++curPosition;
+ }
+ if (*curPosition == '\\')
+ {
+ copyPosition = std::copy(buf.cbegin(), curPosition, copyPosition);
+ *(copyPosition++) = ' ';
+ do
+ {
+ streamBuffer.getNextLine(buf);
+ } while (buf[0] == '\n');
+ curPosition = buf.cbegin();
+ }
+ } while (*curPosition != '\n');
+ std::copy(buf.cbegin(), curPosition, copyPosition);
+}
// -------------------------------------------------------------------
// File parsing method.
void ObjFileParser::parseFile( IOStreamBuffer &streamBuffer ) {
@@ -123,7 +146,7 @@ void ObjFileParser::parseFile( IOStreamBuffer &streamBuffer ) {
progressCounter++;
m_progress->UpdateFileRead( progressOffset + processed * 2, progressTotal );
}
-
+ ignoreNewLines(streamBuffer, buffer);
// parse line
switch (*m_DataIt) {
case 'v': // Parse a vertex texture coordinate
diff --git a/code/X3DImporter_Postprocess.cpp b/code/X3DImporter_Postprocess.cpp
index 6ae47b736..eb297e654 100644
--- a/code/X3DImporter_Postprocess.cpp
+++ b/code/X3DImporter_Postprocess.cpp
@@ -627,10 +627,10 @@ void X3DImporter::Postprocess_BuildNode(const CX3DImporter_NodeElement& pNodeEle
}
else
{
- for(size_t i = 0; i < (size_t)tne_group.Choice; i++) chit_begin++;// forward iterator to choosen node.
+ for(size_t i = 0; i < (size_t)tne_group.Choice; i++) chit_begin++;// forward iterator to chosen node.
chit_end = chit_begin;
- chit_end++;// point end iterator to next element after choosen.
+ chit_end++;// point end iterator to next element after chosen node.
}
}// if(tne_group.UseChoice)
}// if(pNodeElement.Type == CX3DImporter_NodeElement::ENET_Group)
diff --git a/code/glTFExporter.cpp b/code/glTFExporter.cpp
index 203a46040..36cca86ee 100644
--- a/code/glTFExporter.cpp
+++ b/code/glTFExporter.cpp
@@ -582,7 +582,7 @@ void glTFExporter::ExportMeshes()
if (v) p.attributes.position.push_back(v);
/******************** Normals ********************/
- if(comp_allow && (aim->mNormals > 0)) idx_srcdata_normal = b->byteLength;// Store index of normals array.
+ if(comp_allow && (aim->mNormals != 0)) idx_srcdata_normal = b->byteLength;// Store index of normals array.
Ref n = ExportData(*mAsset, meshId, b, aim->mNumVertices, aim->mNormals, AttribType::VEC3, AttribType::VEC3, ComponentType_FLOAT);
if (n) p.attributes.normal.push_back(n);
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
new file mode 100644
index 000000000..f7ce7b726
--- /dev/null
+++ b/doc/CMakeLists.txt
@@ -0,0 +1,42 @@
+find_package( Doxygen REQUIRED )
+
+set( HTML_OUTPUT "AssimpDoc_Html" CACHE STRING "Output directory for generated HTML documentation. Defaults to AssimpDoc_Html." )
+
+# Enable Microsoft CHM help style only on Windows
+set( MICROSOFT_HELP_WORKSHOP "NO")
+if( MSVC )
+ set( MICROSOFT_HELP_WORKSHOP "YES" )
+endif( MSVC )
+
+configure_file(
+ ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in
+ ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
+ @ONLY
+)
+
+add_custom_target(
+ docs ALL
+ DEPENDS docs.done
+)
+
+add_custom_command(
+ OUTPUT docs.done
+ COMMAND ${DOXYGEN_EXECUTABLE}
+ COMMAND ${CMAKE_COMMAND} -E touch docs.done
+ COMMENT "Generating assimp documentation"
+ VERBATIM
+ )
+
+if( DEFINED CMAKE_INSTALL_DOCDIR )
+ install(
+ DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${HTML_OUTPUT}
+ DESTINATION ${CMAKE_INSTALL_DOCDIR}
+ )
+ install(FILES
+ ${CMAKE_CURRENT_SOURCE_DIR}/AssimpDoc_Html/AnimationOverview.png
+ ${CMAKE_CURRENT_SOURCE_DIR}/AssimpDoc_Html/AnimationOverview.svg
+ ${CMAKE_CURRENT_SOURCE_DIR}/AssimpDoc_Html/dragonsplash.png
+ DESTINATION ${CMAKE_INSTALL_DOCDIR}/${HTML_OUTPUT}
+ )
+endif( DEFINED CMAKE_INSTALL_DOCDIR )
+
diff --git a/doc/Doxyfile b/doc/Doxyfile.in
similarity index 98%
rename from doc/Doxyfile
rename to doc/Doxyfile.in
index 64dd5d2cc..ebb6b72b8 100644
--- a/doc/Doxyfile
+++ b/doc/Doxyfile.in
@@ -140,7 +140,8 @@ FULL_PATH_NAMES = NO
# relative paths, which will be relative from the directory where doxygen is
# started.
-STRIP_FROM_PATH =
+STRIP_FROM_PATH = @PROJECT_SOURCE_DIR@ \
+ @PROJECT_BINARY_DIR@
# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of
# the path mentioned in the documentation of a class, which tells
@@ -339,22 +340,6 @@ INLINE_SIMPLE_STRUCTS = NO
TYPEDEF_HIDES_STRUCT = YES
-# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to
-# determine which symbols to keep in memory and which to flush to disk.
-# When the cache is full, less often used symbols will be written to disk.
-# For small to medium size projects (<1000 input files) the default value is
-# probably good enough. For larger projects a too small cache size can cause
-# doxygen to be busy swapping symbols to and from disk most of the time
-# causing a significant performance penalty.
-# If the system has enough physical memory increasing the cache will improve the
-# performance by keeping more symbols in memory. Note that the value works on
-# a logarithmic scale so increasing the size by one will roughly double the
-# memory usage. The cache size is given by this formula:
-# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0,
-# corresponding to a cache size of 2^16 = 65536 symbols.
-
-SYMBOL_CACHE_SIZE = 0
-
# Similar to the SYMBOL_CACHE_SIZE the size of the symbol lookup cache can be
# set using LOOKUP_CACHE_SIZE. This cache is used to resolve symbols given
# their name and scope. Since this can be an expensive process and often the
@@ -677,9 +662,12 @@ WARN_LOGFILE =
# directories like "/usr/src/myproject". Separate the files or directories
# with spaces.
-INPUT = ../include/ \
- ../doc/dox.h \
- ../code/BaseImporter.h
+INPUT = @doxy_main_page@ \
+ @PROJECT_SOURCE_DIR@ \
+ @PROJECT_BINARY_DIR@ \
+ @PROJECT_SOURCE_DIR@/include/ \
+ @PROJECT_SOURCE_DIR@/doc/dox.h \
+ @PROJECT_SOURCE_DIR@/code/BaseImporter.h
# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
@@ -919,7 +907,7 @@ GENERATE_HTML = YES
# If a relative path is entered the value of OUTPUT_DIRECTORY will be
# put in front of it. If left blank `html' will be used as the default path.
-HTML_OUTPUT = AssimpDoc_Html
+HTML_OUTPUT = @HTML_OUTPUT@
# The HTML_FILE_EXTENSION tag can be used to specify the file extension for
# each generated HTML page (for example: .htm,.php,.asp). If it is left blank
@@ -953,7 +941,7 @@ HTML_FOOTER =
# HTML_EXTRA_STYLESHEET instead of this one, as it is more robust and this
# tag will in the future become obsolete.
-HTML_STYLESHEET = style.css
+# HTML_STYLESHEET = @CMAKE_CURRENT_SOURCE_DIR@/style.css
# The HTML_EXTRA_STYLESHEET tag can be used to specify an additional
# user-defined cascading style sheet that is included after the standard
@@ -1064,7 +1052,7 @@ DOCSET_PUBLISHER_NAME = Publisher
# Microsoft HTML help workshop to generate a compiled HTML help file (.chm)
# of the generated HTML documentation.
-GENERATE_HTMLHELP = YES
+GENERATE_HTMLHELP = @MICROSOFT_HELP_WORKSHOP@
# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can
# be used to specify the file name of the resulting .chm file. You
@@ -1504,18 +1492,6 @@ GENERATE_XML = NO
XML_OUTPUT = xml
-# The XML_SCHEMA tag can be used to specify an XML schema,
-# which can be used by a validating XML parser to check the
-# syntax of the XML files.
-
-XML_SCHEMA =
-
-# The XML_DTD tag can be used to specify an XML DTD,
-# which can be used by a validating XML parser to check the
-# syntax of the XML files.
-
-XML_DTD =
-
# If the XML_PROGRAMLISTING tag is set to YES Doxygen will
# dump the program listings (including syntax highlighting
# and cross-referencing information) to the XML output. Note that
diff --git a/doc/architecture/Assimp_Arch_Import.class.violet.html b/doc/architecture/Assimp_Arch_Import.class.violet.html
index a7ed8c6ce..264468f98 100644
--- a/doc/architecture/Assimp_Arch_Import.class.violet.html
+++ b/doc/architecture/Assimp_Arch_Import.class.violet.html
@@ -20,8 +20,8 @@
-
-
+
+
1
255
@@ -37,620 +37,318 @@
- Assimpo::Exporter
+ Importer
- aiScene* mScene;
-IOSystem* mIOHandler;
-struct ExportFormatEntry {
- aiExportFormatDesc mDescription;
- fpExportFunc mExportFunction;
-};
-
+
- const aiExportDataBlob* ExportToBlob( const aiScene* pScene, ... );
-const aiExportDataBlob* ExportToBlob( const aiScene* pScene, ...);
-aiReturn Export( const aiScene* pScene, ... );
-aiReturn Export( const aiScene* pScene, ...);
-
-
+ RegisterLoader()
+UnregisterLoader()
+ReadFile()
-
-
- 1
-
- 255
- 255
- 255
- 255
-
-
- 0
- 0
- 0
- 255
-
-
-
- IOSystem
-
-
-
-
-
- bool Exists( const std::string& pFile) const;
-bool Exists( const char* pFile) const;
-virtual char getOsSeparator() const;
-
-virtual IOStream* Open(const char* pFile,
- const char* pMode = "rb");
-IOStream* Open(const std::string& pFile, const std::string& pMode = std::string("rb"));
-void Close( IOStream* pFile);
-
-
-
-
-
-
-
-
+
+
1
-
- ObjExporter
+
+ IOSystem
-
- File contains function pointer:
-ExportSceneObj
+
+
-
+
+
+
+
+
+ 1
+
+
+
+
+ BaseImporter
+
+
+
+
+
+ CanRead()
+InternRead()
+
+
+
+
+
+
+ 1
+
+
+
+
+ ObjImporter
+
+
+
+
+
+ CanRead()
+InternRead()
+
+
+
+
+
+
+ 1
+
+
+
+
+ glTFImporter
+
+
+
+
+
+ CanRead()
+InternRead()
+
+
-
-
-
-
-
-
-
-
- 1
-
-
-
-
-
-
-
-
- 1
-
-
-
-
-
-
-
-
- 1
-
-
-
-
-
-
+
+
+
+
+
+
-
+
1
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
1
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
+
1
-
-
-
-
-
-
-
+
+
+
+
+
+
+
1
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
1
-
-
-
-
-
-
-
-
- 1
-
+
+
+
+
+
]]>
-
+