Skip to content

Commit

Permalink
Merge pull request #1 from assimp/master
Browse files Browse the repository at this point in the history
Fast forward to upstream
  • Loading branch information
RichardTea committed Mar 5, 2019
2 parents 3db78e1 + e00d92e commit 762c099
Show file tree
Hide file tree
Showing 595 changed files with 2,137 additions and 6,749 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Open Asset Import Library (assimp)
# ----------------------------------------------------------------------
# Copyright (c) 2006-2018, assimp team
# Copyright (c) 2006-2019, assimp team

# All rights reserved.
#
Expand Down Expand Up @@ -198,7 +198,7 @@ CONFIGURE_FILE(
${CMAKE_CURRENT_BINARY_DIR}/include/assimp/config.h
)

INCLUDE_DIRECTORIES(
INCLUDE_DIRECTORIES( BEFORE
./
include
${CMAKE_CURRENT_BINARY_DIR}
Expand Down
3 changes: 2 additions & 1 deletion Readme.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Open Asset Import Library (assimp)
==================================
A library to import and export various 3d-model-formats including scene-post-processing to generate missing render data.
### Current build status ###
### Current project status ###
[![Linux Build Status](https://travis-ci.org/assimp/assimp.svg)](https://travis-ci.org/assimp/assimp)
[![Windows Build Status](https://ci.appveyor.com/api/projects/status/tmo433wax6u6cjp4?svg=true)](https://ci.appveyor.com/project/kimkulling/assimp)
<a href="https://scan.coverity.com/projects/5607">
Expand All @@ -12,6 +12,7 @@ A library to import and export various 3d-model-formats including scene-post-pro
[![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)
[![Average time to resolve an issue](http://isitmaintained.com/badge/resolution/assimp/assimp.svg)](http://isitmaintained.com/project/assimp/assimp "Average time to resolve an issue")
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/5be56faac64f46fc941ac890fb4febef)](https://www.codacy.com/app/kimkulling/assimp?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=assimp/assimp&amp;utm_campaign=Badge_Grade)
[![Total alerts](https://img.shields.io/lgtm/alerts/g/assimp/assimp.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/assimp/assimp/alerts/)
<br>

APIs are provided for C and C++. There are various bindings to other languages (C#, Java, Python, Delphi, D). Assimp also runs on Android and iOS.
Expand Down
4 changes: 2 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ matrix:

image:
- Visual Studio 2013
- Visual Studio 2015
- Visual Studio 2017
# - Visual Studio 2015
# - Visual Studio 2017

platform:
- Win32
Expand Down
2 changes: 1 addition & 1 deletion code/3DSConverter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
Copyright (c) 2006-2018, assimp team
Copyright (c) 2006-2019, assimp team
Expand Down
2 changes: 1 addition & 1 deletion code/3DSExporter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
Copyright (c) 2006-2018, assimp team
Copyright (c) 2006-2019, assimp team
All rights reserved.
Expand Down
2 changes: 1 addition & 1 deletion code/3DSExporter.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
Copyright (c) 2006-2018, assimp team
Copyright (c) 2006-2019, assimp team
All rights reserved.
Expand Down
2 changes: 1 addition & 1 deletion code/3DSHelper.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
Copyright (c) 2006-2018, assimp team
Copyright (c) 2006-2019, assimp team
All rights reserved.
Expand Down
18 changes: 10 additions & 8 deletions code/3DSLoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
Copyright (c) 2006-2018, assimp team
Copyright (c) 2006-2019, assimp team
Expand Down Expand Up @@ -249,13 +249,14 @@ void Discreet3DSImporter::ApplyMasterScale(aiScene* pScene)
// Reads a new chunk from the file
void Discreet3DSImporter::ReadChunk(Discreet3DS::Chunk* pcOut)
{
ai_assert(pcOut != NULL);
ai_assert(pcOut != nullptr);

pcOut->Flag = stream->GetI2();
pcOut->Size = stream->GetI4();

if (pcOut->Size - sizeof(Discreet3DS::Chunk) > stream->GetRemainingSize())
if (pcOut->Size - sizeof(Discreet3DS::Chunk) > stream->GetRemainingSize()) {
throw DeadlyImportError("Chunk is too large");
}

if (pcOut->Size - sizeof(Discreet3DS::Chunk) > stream->GetRemainingSizeToLimit()) {
ASSIMP_LOG_ERROR("3DS: Chunk overflow");
Expand Down Expand Up @@ -1343,15 +1344,16 @@ void Discreet3DSImporter::ParseTextureChunk(D3DS::Texture* pcOut)

// ------------------------------------------------------------------------------------------------
// Read a percentage chunk
ai_real Discreet3DSImporter::ParsePercentageChunk()
{
ai_real Discreet3DSImporter::ParsePercentageChunk() {
Discreet3DS::Chunk chunk;
ReadChunk(&chunk);

if (Discreet3DS::CHUNK_PERCENTF == chunk.Flag)
return stream->GetF4();
else if (Discreet3DS::CHUNK_PERCENTW == chunk.Flag)
if (Discreet3DS::CHUNK_PERCENTF == chunk.Flag) {
return stream->GetF4() * ai_real(100) / ai_real(0xFFFF);
} else if (Discreet3DS::CHUNK_PERCENTW == chunk.Flag) {
return (ai_real)((uint16_t)stream->GetI2()) / (ai_real)0xFFFF;
}

return get_qnan();
}

Expand Down
2 changes: 1 addition & 1 deletion code/3DSLoader.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
Copyright (c) 2006-2018, assimp team
Copyright (c) 2006-2019, assimp team
All rights reserved.
Expand Down
2 changes: 1 addition & 1 deletion code/3MFXmlTags.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
Copyright (c) 2006-2018, assimp team
Copyright (c) 2006-2019, assimp team
All rights reserved.
Expand Down
2 changes: 1 addition & 1 deletion code/ACLoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
Copyright (c) 2006-2018, assimp team
Copyright (c) 2006-2019, assimp team
Expand Down
2 changes: 1 addition & 1 deletion code/ACLoader.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
Copyright (c) 2006-2018, assimp team
Copyright (c) 2006-2019, assimp team
All rights reserved.
Expand Down
2 changes: 1 addition & 1 deletion code/AMFImporter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
Copyright (c) 2006-2018, assimp team
Copyright (c) 2006-2019, assimp team
Expand Down
2 changes: 1 addition & 1 deletion code/AMFImporter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
Copyright (c) 2006-2018, assimp team
Copyright (c) 2006-2019, assimp team
Expand Down
2 changes: 1 addition & 1 deletion code/AMFImporter_Geometry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
Copyright (c) 2006-2018, assimp team
Copyright (c) 2006-2019, assimp team
Expand Down
2 changes: 1 addition & 1 deletion code/AMFImporter_Macro.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
Copyright (c) 2006-2018, assimp team
Copyright (c) 2006-2019, assimp team
Expand Down
2 changes: 1 addition & 1 deletion code/AMFImporter_Material.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
Copyright (c) 2006-2018, assimp team
Copyright (c) 2006-2019, assimp team
Expand Down
2 changes: 1 addition & 1 deletion code/AMFImporter_Node.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
Copyright (c) 2006-2018, assimp team
Copyright (c) 2006-2019, assimp team
Expand Down
2 changes: 1 addition & 1 deletion code/AMFImporter_Postprocess.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
Copyright (c) 2006-2018, assimp team
Copyright (c) 2006-2019, assimp team
Expand Down
2 changes: 1 addition & 1 deletion code/ASELoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
Copyright (c) 2006-2018, assimp team
Copyright (c) 2006-2019, assimp team
Expand Down
2 changes: 1 addition & 1 deletion code/ASELoader.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
Copyright (c) 2006-2018, assimp team
Copyright (c) 2006-2019, assimp team
All rights reserved.
Expand Down
2 changes: 1 addition & 1 deletion code/ASEParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
Copyright (c) 2006-2018, assimp team
Copyright (c) 2006-2019, assimp team
Expand Down
2 changes: 1 addition & 1 deletion code/ASEParser.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
Copyright (c) 2006-2018, assimp team
Copyright (c) 2006-2019, assimp team
All rights reserved.
Expand Down
7 changes: 6 additions & 1 deletion code/AssbinExporter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
Copyright (c) 2006-2018, assimp team
Copyright (c) 2006-2019, assimp team
All rights reserved.
Expand Down Expand Up @@ -760,7 +760,12 @@ class AssbinExport
if (!out) return;

time_t tt = time(NULL);
#if _WIN32
tm* p = gmtime(&tt);
#else
struct tm now;
tm* p = gmtime_r(&tt, &now);
#endif

// header
char s[64];
Expand Down
2 changes: 1 addition & 1 deletion code/AssbinExporter.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
Copyright (c) 2006-2018, assimp team
Copyright (c) 2006-2019, assimp team
All rights reserved.
Expand Down
2 changes: 1 addition & 1 deletion code/AssbinLoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
Copyright (c) 2006-2018, assimp team
Copyright (c) 2006-2019, assimp team
Expand Down
2 changes: 1 addition & 1 deletion code/AssbinLoader.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
Copyright (c) 2006-2018, assimp team
Copyright (c) 2006-2019, assimp team
All rights reserved.
Expand Down
2 changes: 1 addition & 1 deletion code/Assimp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
Copyright (c) 2006-2018, assimp team
Copyright (c) 2006-2019, assimp team
Expand Down
3 changes: 1 addition & 2 deletions code/AssimpCExport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
Copyright (c) 2006-2018, assimp team
Copyright (c) 2006-2019, assimp team
Expand Down Expand Up @@ -60,7 +60,6 @@ ASSIMP_API size_t aiGetExportFormatCount(void)
return Exporter().GetExportFormatCount();
}


// ------------------------------------------------------------------------------------------------
ASSIMP_API const aiExportFormatDesc* aiGetExportFormatDescription( size_t index)
{
Expand Down
11 changes: 8 additions & 3 deletions code/AssxmlExporter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
Copyright (c) 2006-2018, assimp team
Copyright (c) 2006-2019, assimp team
All rights reserved.
Expand Down Expand Up @@ -184,8 +184,13 @@ static std::string encodeXML(const std::string& data) {
static
void WriteDump(const aiScene* scene, IOStream* io, bool shortened) {
time_t tt = ::time( NULL );
tm* p = ::gmtime( &tt );
ai_assert( nullptr != p );
#if _WIN32
tm* p = gmtime(&tt);
#else
struct tm now;
tm* p = gmtime_r(&tt, &now);
#endif
ai_assert(nullptr != p);

// write header
std::string header(
Expand Down
2 changes: 1 addition & 1 deletion code/AssxmlExporter.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
Copyright (c) 2006-2018, assimp team
Copyright (c) 2006-2019, assimp team
All rights reserved.
Expand Down
2 changes: 1 addition & 1 deletion code/B3DImporter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
Copyright (c) 2006-2018, assimp team
Copyright (c) 2006-2019, assimp team
Expand Down
2 changes: 1 addition & 1 deletion code/B3DImporter.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
Copyright (c) 2006-2018, assimp team
Copyright (c) 2006-2019, assimp team
All rights reserved.
Expand Down
2 changes: 1 addition & 1 deletion code/BVHLoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
Copyright (c) 2006-2018, assimp team
Copyright (c) 2006-2019, assimp team
Expand Down
Loading

0 comments on commit 762c099

Please sign in to comment.