Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Open sidebar
glitchheart
glitchheartengine
Commits
369cda02
Commit
369cda02
authored
Jul 08, 2019
by
stonecompass
Browse files
Assimp tests.
Former-commit-id:
2d685590
parent
6195269e
Changes
59
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
59 changed files
with
16551 additions
and
3 deletions
+16551
-3
build.bat
build.bat
+2
-2
libs/assimp/include/assimp/.editorconfig
libs/assimp/include/assimp/.editorconfig
+8
-0
libs/assimp/include/assimp/Compiler/poppack1.h
libs/assimp/include/assimp/Compiler/poppack1.h
+22
-0
libs/assimp/include/assimp/Compiler/pstdint.h
libs/assimp/include/assimp/Compiler/pstdint.h
+912
-0
libs/assimp/include/assimp/Compiler/pushpack1.h
libs/assimp/include/assimp/Compiler/pushpack1.h
+43
-0
libs/assimp/include/assimp/DefaultIOStream.h
libs/assimp/include/assimp/DefaultIOStream.h
+141
-0
libs/assimp/include/assimp/DefaultIOSystem.h
libs/assimp/include/assimp/DefaultIOSystem.h
+99
-0
libs/assimp/include/assimp/DefaultLogger.hpp
libs/assimp/include/assimp/DefaultLogger.hpp
+191
-0
libs/assimp/include/assimp/Defines.h
libs/assimp/include/assimp/Defines.h
+49
-0
libs/assimp/include/assimp/Exporter.hpp
libs/assimp/include/assimp/Exporter.hpp
+483
-0
libs/assimp/include/assimp/IOStream.hpp
libs/assimp/include/assimp/IOStream.hpp
+140
-0
libs/assimp/include/assimp/IOSystem.hpp
libs/assimp/include/assimp/IOSystem.hpp
+359
-0
libs/assimp/include/assimp/Importer.hpp
libs/assimp/include/assimp/Importer.hpp
+653
-0
libs/assimp/include/assimp/LogStream.hpp
libs/assimp/include/assimp/LogStream.hpp
+110
-0
libs/assimp/include/assimp/Logger.hpp
libs/assimp/include/assimp/Logger.hpp
+268
-0
libs/assimp/include/assimp/NullLogger.hpp
libs/assimp/include/assimp/NullLogger.hpp
+98
-0
libs/assimp/include/assimp/ProgressHandler.hpp
libs/assimp/include/assimp/ProgressHandler.hpp
+126
-0
libs/assimp/include/assimp/SceneCombiner.h
libs/assimp/include/assimp/SceneCombiner.h
+400
-0
libs/assimp/include/assimp/ai_assert.h
libs/assimp/include/assimp/ai_assert.h
+53
-0
libs/assimp/include/assimp/anim.h
libs/assimp/include/assimp/anim.h
+572
-0
libs/assimp/include/assimp/camera.h
libs/assimp/include/assimp/camera.h
+225
-0
libs/assimp/include/assimp/cexport.h
libs/assimp/include/assimp/cexport.h
+263
-0
libs/assimp/include/assimp/cfileio.h
libs/assimp/include/assimp/cfileio.h
+137
-0
libs/assimp/include/assimp/cimport.h
libs/assimp/include/assimp/cimport.h
+564
-0
libs/assimp/include/assimp/color4.h
libs/assimp/include/assimp/color4.h
+104
-0
libs/assimp/include/assimp/color4.inl
libs/assimp/include/assimp/color4.inl
+204
-0
libs/assimp/include/assimp/config.h
libs/assimp/include/assimp/config.h
+963
-0
libs/assimp/include/assimp/config.h.in
libs/assimp/include/assimp/config.h.in
+963
-0
libs/assimp/include/assimp/defs.h
libs/assimp/include/assimp/defs.h
+290
-0
libs/assimp/include/assimp/importerdesc.h
libs/assimp/include/assimp/importerdesc.h
+145
-0
libs/assimp/include/assimp/light.h
libs/assimp/include/assimp/light.h
+258
-0
libs/assimp/include/assimp/material.h
libs/assimp/include/assimp/material.h
+1564
-0
libs/assimp/include/assimp/material.inl
libs/assimp/include/assimp/material.inl
+389
-0
libs/assimp/include/assimp/matrix3x3.h
libs/assimp/include/assimp/matrix3x3.h
+182
-0
libs/assimp/include/assimp/matrix3x3.inl
libs/assimp/include/assimp/matrix3x3.inl
+356
-0
libs/assimp/include/assimp/matrix4x4.h
libs/assimp/include/assimp/matrix4x4.h
+279
-0
libs/assimp/include/assimp/matrix4x4.inl
libs/assimp/include/assimp/matrix4x4.inl
+681
-0
libs/assimp/include/assimp/mesh.h
libs/assimp/include/assimp/mesh.h
+773
-0
libs/assimp/include/assimp/metadata.h
libs/assimp/include/assimp/metadata.h
+314
-0
libs/assimp/include/assimp/port/AndroidJNI/AndroidJNIIOSystem.h
...ssimp/include/assimp/port/AndroidJNI/AndroidJNIIOSystem.h
+92
-0
libs/assimp/include/assimp/postprocess.h
libs/assimp/include/assimp/postprocess.h
+645
-0
libs/assimp/include/assimp/quaternion.h
libs/assimp/include/assimp/quaternion.h
+129
-0
libs/assimp/include/assimp/quaternion.inl
libs/assimp/include/assimp/quaternion.inl
+285
-0
libs/assimp/include/assimp/scene.h
libs/assimp/include/assimp/scene.h
+384
-0
libs/assimp/include/assimp/texture.h
libs/assimp/include/assimp/texture.h
+217
-0
libs/assimp/include/assimp/types.h
libs/assimp/include/assimp/types.h
+518
-0
libs/assimp/include/assimp/vector2.h
libs/assimp/include/assimp/vector2.h
+116
-0
libs/assimp/include/assimp/vector2.inl
libs/assimp/include/assimp/vector2.inl
+227
-0
libs/assimp/include/assimp/vector3.h
libs/assimp/include/assimp/vector3.h
+145
-0
libs/assimp/include/assimp/vector3.inl
libs/assimp/include/assimp/vector3.inl
+260
-0
libs/assimp/include/assimp/version.h
libs/assimp/include/assimp/version.h
+108
-0
libs/assimp/libs/IrrXML.lib
libs/assimp/libs/IrrXML.lib
+0
-0
libs/assimp/libs/assimp-vc140-mt.lib
libs/assimp/libs/assimp-vc140-mt.lib
+0
-0
libs/assimp/libs/assimp.lib
libs/assimp/libs/assimp.lib
+0
-0
libs/assimp/libs/zlibstatic.lib
libs/assimp/libs/zlibstatic.lib
+0
-0
src/assimp_loader.cpp
src/assimp_loader.cpp
+27
-0
src/main.cpp
src/main.cpp
+6
-0
src/render_pipeline.cpp
src/render_pipeline.cpp
+1
-1
src/render_pipeline.h
src/render_pipeline.h
+8
-0
No files found.
build.bat
View file @
369cda02
...
...
@@ -15,8 +15,8 @@ IF %ERRORLEVEL% NEQ 0 call %VCVARSALL% x64
pushd
%GLITCH_ENGINE%
echo
%cd%
set
CommonCompilerFlags
=
/MD -std
:c
+
+latest -fp
:fast
-fp
:except
-
-nologo
%OPT%
-Oi -W
4
-Gm
-
-GR
-
-EHa -FC -Z
7
-Fe
%EXECUTABLE_NAME%
%PRP%
%WIGNORED%
-DDEBUG
=
%DEBUG%
%GLM%
/I
..\libs
/I
..\libs\glfw\include
/I
..\libs\glad\include
/I
..\libs\fmod\include
/I
..\libs\vulkan\Include
set
CommonLinkerFlags
=
Comdlg32
.lib
Ole32
.lib
Shlwapi
.lib
kernel32
.lib
user32
.lib
gdi32
.lib
winmm
.lib
opengl32
.lib
shell32
.lib ..\libs\glfw\lib
-vc
2015
\glfw3.lib ..\libs\glad\glad.obj ..\libs\fmod\lib\fmod64_vc.lib
set
CommonCompilerFlags
=
/MD -std
:c
+
+latest -fp
:fast
-fp
:except
-
-nologo
%OPT%
-Oi -W
4
-Gm
-
-GR
-
-EHa -FC -Z
7
-Fe
%EXECUTABLE_NAME%
%PRP%
%WIGNORED%
-DDEBUG
=
%DEBUG%
%GLM%
/I
..\libs
/I
..\libs\glfw\include
/I
..\libs\assimp\include
/I
..\libs\glad\include
/I
..\libs\fmod\include
/I
..\libs\vulkan\Include
set
CommonLinkerFlags
=
Comdlg32
.lib
Ole32
.lib
Shlwapi
.lib
kernel32
.lib
user32
.lib
gdi32
.lib
winmm
.lib
opengl32
.lib
shell32
.lib ..\libs\glfw\lib
-vc
2015
\glfw3.lib
..\libs\assimp\libs\
*
..\libs\glad\glad.obj ..\libs\fmod\lib\fmod64_vc.lib
set
ExtraLinkerFlags
=
/NODEFAULTLIB
:
"LIBCMT"
-incremental
:no
-opt
:ref
/ignore
:4099
IF
%DEBUG%
NEQ
1
set
Console
=
/SUBSYSTEM
:windows
/ENTRY
:mainCRTStartup
...
...
libs/assimp/include/assimp/.editorconfig
0 → 100644
View file @
369cda02
# See <http://EditorConfig.org> for details
[*.{h,hpp,inl}]
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_size = 4
indent_style = space
libs/assimp/include/assimp/Compiler/poppack1.h
0 → 100644
View file @
369cda02
// ===============================================================================
// May be included multiple times - resets structure packing to the defaults
// for all supported compilers. Reverts the changes made by #include <pushpack1.h>
//
// Currently this works on the following compilers:
// MSVC 7,8,9
// GCC
// BORLAND (complains about 'pack state changed but not reverted', but works)
// ===============================================================================
#ifndef AI_PUSHPACK_IS_DEFINED
# error pushpack1.h must be included after poppack1.h
#endif
// reset packing to the original value
#if defined(_MSC_VER) || defined(__BORLANDC__) || defined (__BCPLUSPLUS__)
# pragma pack( pop )
#endif
#undef PACK_STRUCT
#undef AI_PUSHPACK_IS_DEFINED
libs/assimp/include/assimp/Compiler/pstdint.h
0 → 100644
View file @
369cda02
This diff is collapsed.
Click to expand it.
libs/assimp/include/assimp/Compiler/pushpack1.h
0 → 100644
View file @
369cda02
// ===============================================================================
// May be included multiple times - sets structure packing to 1
// for all supported compilers. #include <poppack1.h> reverts the changes.
//
// Currently this works on the following compilers:
// MSVC 7,8,9
// GCC
// BORLAND (complains about 'pack state changed but not reverted', but works)
// Clang
//
//
// USAGE:
//
// struct StructToBePacked {
// } PACK_STRUCT;
//
// ===============================================================================
#ifdef AI_PUSHPACK_IS_DEFINED
# error poppack1.h must be included after pushpack1.h
#endif
#if defined(_MSC_VER) || defined(__BORLANDC__) || defined (__BCPLUSPLUS__)
# pragma pack(push,1)
# define PACK_STRUCT
#elif defined( __GNUC__ )
# if !defined(HOST_MINGW)
# define PACK_STRUCT __attribute__((__packed__))
# else
# define PACK_STRUCT __attribute__((gcc_struct, __packed__))
# endif
#else
# error Compiler not supported
#endif
#if defined(_MSC_VER)
// C4103: Packing was changed after the inclusion of the header, probably missing #pragma pop
# pragma warning (disable : 4103)
#endif
#define AI_PUSHPACK_IS_DEFINED
libs/assimp/include/assimp/DefaultIOStream.h
0 → 100644
View file @
369cda02
/*
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.
----------------------------------------------------------------------
*/
/** @file Default file I/O using fXXX()-family of functions */
#ifndef AI_DEFAULTIOSTREAM_H_INC
#define AI_DEFAULTIOSTREAM_H_INC
#include <stdio.h>
#include <assimp/IOStream.hpp>
#include <assimp/importerdesc.h>
#include <assimp/Defines.h>
namespace
Assimp
{
// ----------------------------------------------------------------------------------
//! @class DefaultIOStream
//! @brief Default IO implementation, use standard IO operations
//! @note An instance of this class can exist without a valid file handle
//! attached to it. All calls fail, but the instance can nevertheless be
//! used with no restrictions.
class
ASSIMP_API
DefaultIOStream
:
public
IOStream
{
friend
class
DefaultIOSystem
;
#if __ANDROID__
# if __ANDROID_API__ > 9
# if defined(AI_CONFIG_ANDROID_JNI_ASSIMP_MANAGER_SUPPORT)
friend
class
AndroidJNIIOSystem
;
# endif // defined(AI_CONFIG_ANDROID_JNI_ASSIMP_MANAGER_SUPPORT)
# endif // __ANDROID_API__ > 9
#endif // __ANDROID__
protected:
DefaultIOStream
();
DefaultIOStream
(
FILE
*
pFile
,
const
std
::
string
&
strFilename
);
public:
/** Destructor public to allow simple deletion to close the file. */
~
DefaultIOStream
();
// -------------------------------------------------------------------
/// Read from stream
size_t
Read
(
void
*
pvBuffer
,
size_t
pSize
,
size_t
pCount
);
// -------------------------------------------------------------------
/// Write to stream
size_t
Write
(
const
void
*
pvBuffer
,
size_t
pSize
,
size_t
pCount
);
// -------------------------------------------------------------------
/// Seek specific position
aiReturn
Seek
(
size_t
pOffset
,
aiOrigin
pOrigin
);
// -------------------------------------------------------------------
/// Get current seek position
size_t
Tell
()
const
;
// -------------------------------------------------------------------
/// Get size of file
size_t
FileSize
()
const
;
// -------------------------------------------------------------------
/// Flush file contents
void
Flush
();
private:
// File data-structure, using clib
FILE
*
mFile
;
// Filename
std
::
string
mFilename
;
// Cached file size
mutable
size_t
mCachedSize
;
};
// ----------------------------------------------------------------------------------
inline
DefaultIOStream
::
DefaultIOStream
()
:
mFile
(
NULL
),
mFilename
(
""
),
mCachedSize
(
SIZE_MAX
)
{
// empty
}
// ----------------------------------------------------------------------------------
inline
DefaultIOStream
::
DefaultIOStream
(
FILE
*
pFile
,
const
std
::
string
&
strFilename
)
:
mFile
(
pFile
),
mFilename
(
strFilename
),
mCachedSize
(
SIZE_MAX
)
{
// empty
}
// ----------------------------------------------------------------------------------
}
// ns assimp
#endif //!!AI_DEFAULTIOSTREAM_H_INC
libs/assimp/include/assimp/DefaultIOSystem.h
0 → 100644
View file @
369cda02
/*
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.
----------------------------------------------------------------------
*/
/** @file Default implementation of IOSystem using the standard C file functions */
#ifndef AI_DEFAULTIOSYSTEM_H_INC
#define AI_DEFAULTIOSYSTEM_H_INC
#include <assimp/IOSystem.hpp>
namespace
Assimp
{
// ---------------------------------------------------------------------------
/** Default implementation of IOSystem using the standard C file functions */
class
ASSIMP_API
DefaultIOSystem
:
public
IOSystem
{
public:
/** Constructor. */
DefaultIOSystem
();
/** Destructor. */
~
DefaultIOSystem
();
// -------------------------------------------------------------------
/** Tests for the existence of a file at the given path. */
bool
Exists
(
const
char
*
pFile
)
const
;
// -------------------------------------------------------------------
/** Returns the directory separator. */
char
getOsSeparator
()
const
;
// -------------------------------------------------------------------
/** Open a new file with a given path. */
IOStream
*
Open
(
const
char
*
pFile
,
const
char
*
pMode
=
"rb"
);
// -------------------------------------------------------------------
/** Closes the given file and releases all resources associated with it. */
void
Close
(
IOStream
*
pFile
);
// -------------------------------------------------------------------
/** Compare two paths */
bool
ComparePaths
(
const
char
*
one
,
const
char
*
second
)
const
;
/** @brief get the file name of a full filepath
* example: /tmp/archive.tar.gz -> archive.tar.gz
*/
static
std
::
string
fileName
(
const
std
::
string
&
path
);
/** @brief get the complete base name of a full filepath
* example: /tmp/archive.tar.gz -> archive.tar
*/
static
std
::
string
completeBaseName
(
const
std
::
string
&
path
);
/** @brief get the path of a full filepath
* example: /tmp/archive.tar.gz -> /tmp/
*/
static
std
::
string
absolutePath
(
const
std
::
string
&
path
);
};
}
//!ns Assimp
#endif //AI_DEFAULTIOSYSTEM_H_INC
libs/assimp/include/assimp/DefaultLogger.hpp
0 → 100644
View file @
369cda02
/*
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.
----------------------------------------------------------------------
*/
/** @file DefaultLogger.hpp
*/
#ifndef INCLUDED_AI_DEFAULTLOGGER
#define INCLUDED_AI_DEFAULTLOGGER
#include "Logger.hpp"
#include "LogStream.hpp"
#include "NullLogger.hpp"
#include <vector>
namespace
Assimp
{
// ------------------------------------------------------------------------------------
class
IOStream
;
struct
LogStreamInfo
;
/** default name of logfile */
#define ASSIMP_DEFAULT_LOG_NAME "AssimpLog.txt"
// ------------------------------------------------------------------------------------
/** @brief CPP-API: Primary logging facility of Assimp.
*
* The library stores its primary #Logger as a static member of this class.
* #get() returns this primary logger. By default the underlying implementation is
* just a #NullLogger which rejects all log messages. By calling #create(), logging
* is turned on. To capture the log output multiple log streams (#LogStream) can be
* attach to the logger. Some default streams for common streaming locations (such as
* a file, std::cout, OutputDebugString()) are also provided.
*
* If you wish to customize the logging at an even deeper level supply your own
* implementation of #Logger to #set().
* @note The whole logging stuff causes a small extra overhead for all imports. */
class
ASSIMP_API
DefaultLogger
:
public
Logger
{
public:
// ----------------------------------------------------------------------
/** @brief Creates a logging instance.
* @param name Name for log file. Only valid in combination
* with the aiDefaultLogStream_FILE flag.
* @param severity Log severity, VERBOSE turns on debug messages
* @param defStreams Default log streams to be attached. Any bitwise
* combination of the aiDefaultLogStream enumerated values.
* If #aiDefaultLogStream_FILE is specified but an empty string is
* passed for 'name', no log file is created at all.
* @param io IOSystem to be used to open external files (such as the
* log file). Pass NULL to rely on the default implementation.
* This replaces the default #NullLogger with a #DefaultLogger instance. */
static
Logger
*
create
(
const
char
*
name
=
ASSIMP_DEFAULT_LOG_NAME
,
LogSeverity
severity
=
NORMAL
,
unsigned
int
defStreams
=
aiDefaultLogStream_DEBUGGER
|
aiDefaultLogStream_FILE
,
IOSystem
*
io
=
NULL
);
// ----------------------------------------------------------------------
/** @brief Setup a custom #Logger implementation.
*
* Use this if the provided #DefaultLogger class doesn't fit into
* your needs. If the provided message formatting is OK for you,
* it's much easier to use #create() and to attach your own custom
* output streams to it.
* @param logger Pass NULL to setup a default NullLogger*/
static
void
set
(
Logger
*
logger
);
// ----------------------------------------------------------------------
/** @brief Getter for singleton instance
* @return Only instance. This is never null, but it could be a
* NullLogger. Use isNullLogger to check this.*/
static
Logger
*
get
();
// ----------------------------------------------------------------------
/** @brief Return whether a #NullLogger is currently active
* @return true if the current logger is a #NullLogger.
* Use create() or set() to setup a logger that does actually do
* something else than just rejecting all log messages. */
static
bool
isNullLogger
();
// ----------------------------------------------------------------------
/** @brief Kills the current singleton logger and replaces it with a
* #NullLogger instance. */
static
void
kill
();
// ----------------------------------------------------------------------
/** @copydoc Logger::attachStream */
bool
attachStream
(
LogStream
*
pStream
,
unsigned
int
severity
);
// ----------------------------------------------------------------------
/** @copydoc Logger::detatchStream */
bool
detatchStream
(
LogStream
*
pStream
,
unsigned
int
severity
);
private:
// ----------------------------------------------------------------------
/** @briefPrivate construction for internal use by create().
* @param severity Logging granularity */
explicit
DefaultLogger
(
LogSeverity
severity
);
// ----------------------------------------------------------------------
/** @briefDestructor */
~
DefaultLogger
();
private:
/** @brief Logs debug infos, only been written when severity level VERBOSE is set */
void
OnDebug
(
const
char
*
message
);
/** @brief Logs an info message */
void
OnInfo
(
const
char
*
message
);
/** @brief Logs a warning message */
void
OnWarn
(
const
char
*
message
);
/** @brief Logs an error message */
void
OnError
(
const
char
*
message
);
// ----------------------------------------------------------------------
/** @brief Writes a message to all streams */
void
WriteToStreams
(
const
char
*
message
,
ErrorSeverity
ErrorSev
);
// ----------------------------------------------------------------------
/** @brief Returns the thread id.
* @note This is an OS specific feature, if not supported, a
* zero will be returned.
*/
unsigned
int
GetThreadID
();
private:
// Aliases for stream container
typedef
std
::
vector
<
LogStreamInfo
*>
StreamArray
;
typedef
std
::
vector
<
LogStreamInfo
*>::
iterator
StreamIt
;
typedef
std
::
vector
<
LogStreamInfo
*>::
const_iterator
ConstStreamIt
;
//! only logging instance
static
Logger
*
m_pLogger
;
static
NullLogger
s_pNullLogger
;
//! Attached streams
StreamArray
m_StreamArray
;
bool
noRepeatMsg
;
char
lastMsg
[
MAX_LOG_MESSAGE_LENGTH
*
2
];
size_t
lastLen
;
};
// ------------------------------------------------------------------------------------
}
// Namespace Assimp
#endif // !! INCLUDED_AI_DEFAULTLOGGER
libs/assimp/include/assimp/Defines.h
0 → 100644
View file @
369cda02
/*
Open Asset Import Library (assimp)
----------------------------------------------------------------------
Copyright (c) 2006-2012, 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.
----------------------------------------------------------------------
*/
// We need those constants, workaround for any platforms where nobody defined them yet
#if (!defined SIZE_MAX)
# define SIZE_MAX (~((size_t)0))
#endif
#if (!defined UINT_MAX)
# define UINT_MAX (~((unsigned int)0))
#endif
libs/assimp/include/assimp/Exporter.hpp
0 → 100644
View file @
369cda02
This diff is collapsed.
Click to expand it.
libs/assimp/include/assimp/IOStream.hpp
0 → 100644
View file @
369cda02
/*
---------------------------------------------------------------------------
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
Copyright (c) 2006-2017, assimp team
All rights reserved.