Major API cleanup. Unified formatting & doxygen tags in the public API.

Added factory provider for default log streams.
Added default log streams to std::out and std::cerr.
Updated VC8 project config, boost workarounds is now working for the viewer.
Updated unit test suite.
Fixed some minor issues in the postprocessing-framework.

BROKEN: DebugDLL build.




git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@292 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
pull/1/head
aramis_acg 2009-01-12 22:06:54 +00:00
parent bba8dee77d
commit 58eb786d62
102 changed files with 5278 additions and 1657 deletions

View File

@ -2,5 +2,5 @@ cd code
mingw32-make -f makefile.mingw clean
cd ..
del /Q /S obj bin
del /Q /S obj bin lib

View File

@ -264,7 +264,7 @@ void Discreet3DSImporter::ParseEditorChunk()
{
// print the version number
char buff[10];
itoa10(buff,stream->GetI2());
ASSIMP_itoa10(buff,stream->GetI2());
DefaultLogger::get()->info(std::string("3DS file format version: ") + buff);
}
break;

View File

@ -734,7 +734,7 @@ void AC3DImporter::InternReadFile( const std::string& pFile,
// print the file format version to the console
unsigned int version = HexDigitToDecimal( buffer[4] );
char msg[3];
itoa10(msg,3,version);
ASSIMP_itoa10(msg,3,version);
DefaultLogger::get()->info(std::string("AC3D file format version: ") + msg);
std::vector<Material> materials;

View File

@ -50,7 +50,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "GenericProperty.h"
#if (defined AI_C_THREADSAFE)
# include <boost/thread/thread.hpp>
# include <boost/thread/mutex.hpp>
@ -92,7 +91,7 @@ public:
{}
// -------------------------------------------------------------------
size_t Read(void* pvBuffer,
size_t Read(void* pvBuffer,
size_t pSize,
size_t pCount)
{
@ -100,16 +99,14 @@ public:
return mFile->ReadProc(mFile,(char*)pvBuffer,pSize,pCount);
}
// -------------------------------------------------------------------
size_t Write(const void* pvBuffer,
size_t Write(const void* pvBuffer,
size_t pSize,
size_t pCount)
{
// need to typecast here as C has no void*
return mFile->WriteProc(mFile,(const char*)pvBuffer,pSize,pCount);
}
{
// need to typecast here as C has no void*
return mFile->WriteProc(mFile,(const char*)pvBuffer,pSize,pCount);
}
// -------------------------------------------------------------------
aiReturn Seek(size_t pOffset,
@ -118,20 +115,24 @@ public:
return mFile->SeekProc(mFile,pOffset,pOrigin);
}
// -------------------------------------------------------------------
size_t Tell(void) const
size_t Tell(void) const
{
return mFile->TellProc(mFile);
}
// -------------------------------------------------------------------
size_t FileSize() const
{
return mFile->FileSizeProc(mFile);
}
// -------------------------------------------------------------------
void Flush ()
{
return mFile->FlushProc(mFile);
}
private:
aiFile* mFile;
};
@ -152,13 +153,17 @@ public:
{
CIOSystemWrapper* pip = const_cast<CIOSystemWrapper*>(this);
IOStream* p = pip->Open(pFile);
if (p){pip->Close(p);return true;}
if (p){
pip->Close(p);
return true;
}
return false;
}
// -------------------------------------------------------------------
std::string getOsSeparator() const
{
// FIXME
return "/";
}
@ -179,6 +184,7 @@ public:
delete pFile;
}
private:
aiFileIO* mFileSystem;

View File

@ -44,17 +44,12 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define ASSIMP_INTERNAL_BUILD
// *******************************************************************
// If we have at least VC8 some C string manipulation functions
// are mapped to their safe _s counterparts (e.g. _itoa_s).
// *******************************************************************
#if _MSC_VER >= 1400 && !(defined _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES)
# define _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES 1
#endif
// Compile config
#include "../include/aiDefines.h"
// *******************************************************************
// STL headers - we need quite a lot of them
// *******************************************************************
// ===================================================================
// Runtime/STL headers
// ===================================================================
#include <vector>
#include <list>
#include <map>
@ -67,10 +62,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <iostream>
#include <algorithm>
#include <numeric>
#include <new>
// *******************************************************************
// public ASSIMP headers
// *******************************************************************
// ===================================================================
// Public ASSIMP headers
// ===================================================================
#include "../include/DefaultLogger.h"
#include "../include/IOStream.h"
#include "../include/IOSystem.h"
@ -78,18 +74,18 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "../include/aiPostProcess.h"
#include "../include/assimp.hpp"
// *******************************************************************
// internal headers that are nearly always required
// *******************************************************************
// ===================================================================
// Internal utility headers
// ===================================================================
#include "BaseImporter.h"
#include "MaterialSystem.h"
#include "StringComparison.h"
#include "StreamReader.h"
#include "qnan.h"
// *******************************************************************
// ===================================================================
// boost headers - take them from the workaround dir if possible
// *******************************************************************
// ===================================================================
#ifdef ASSIMP_BUILD_BOOST_WORKAROUND
# include "../include/BoostWorkaround/boost/scoped_ptr.hpp"
@ -104,8 +100,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# include <boost/format.hpp>
# include <boost/foreach.hpp>
#endif
#endif // ! ASSIMP_BUILD_BOOST_WORKAROUND
#endif // !! ASSIMP_PCH_INCLUDED

View File

@ -169,7 +169,7 @@ struct LoadRequest
// ------------------------------------------------------------------------------------------------
// BatchLoader::pimpl data structure
struct BatchData
struct Assimp::BatchData
{
// IO system to be used for all imports
IOSystem* pIOSystem;
@ -189,8 +189,7 @@ BatchLoader::BatchLoader(IOSystem* pIO)
{
ai_assert(NULL != pIO);
pimpl = new BatchData();
BatchData* data = ( BatchData* )pimpl;
data = new BatchData();
data->pIOSystem = pIO;
data->pImporter = new Importer();
}
@ -199,7 +198,6 @@ BatchLoader::BatchLoader(IOSystem* pIO)
BatchLoader::~BatchLoader()
{
// delete all scenes wthat have not been polled by the user
BatchData* data = ( BatchData* )pimpl;
for (std::list<LoadRequest>::iterator it = data->requests.begin();
it != data->requests.end(); ++it)
{
@ -212,7 +210,6 @@ BatchLoader::~BatchLoader()
// ------------------------------------------------------------------------------------------------
void BatchLoader::SetBasePath (const std::string& pBase)
{
BatchData* data = ( BatchData* )pimpl;
data->pathBase = pBase;
// file name? we just need the directory
@ -241,8 +238,6 @@ void BatchLoader::AddLoadRequest (const std::string& file,
ai_assert(!file.empty());
// no threaded implementation for the moment
BatchData* data = ( BatchData* )pimpl;
std::string real;
// build a full path if this is a relative path and
@ -273,7 +268,6 @@ void BatchLoader::AddLoadRequest (const std::string& file,
aiScene* BatchLoader::GetImport (const std::string& file)
{
// no threaded implementation for the moment
BatchData* data = ( BatchData* )pimpl;
std::string real;
// build a full path if this is a relative path and
@ -302,8 +296,6 @@ aiScene* BatchLoader::GetImport (const std::string& file)
// ------------------------------------------------------------------------------------------------
void BatchLoader::LoadAll()
{
BatchData* data = ( BatchData* )pimpl;
// no threaded implementation for the moment
for (std::list<LoadRequest>::iterator it = data->requests.begin();
it != data->requests.end(); ++it)

View File

@ -39,8 +39,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/** @file Definition of the base class for all importer worker classes. */
#ifndef AI_BASEIMPORTER_H_INC
#define AI_BASEIMPORTER_H_INC
#ifndef INCLUDED_AI_BASEIMPORTER_H
#define INCLUDED_AI_BASEIMPORTER_H
#include <string>
#include "./../include/aiTypes.h"
@ -203,7 +203,7 @@ protected:
*
* The function searches the header of a file for a specific token
* and returns true if this token is found. This works for text
* files only. There is a rudimentary handling if UNICODE files.
* files only. There is a rudimentary handling of UNICODE files.
* The comparison is case independent.
*
* @param pIOSystem IO System to work with
@ -239,6 +239,8 @@ protected:
std::string mErrorText;
};
struct BatchData;
// ---------------------------------------------------------------------------
/** A helper class that can be used by importers which need to load many
* extern meshes recursively.
@ -316,7 +318,7 @@ public:
private:
// No need to have that in the public API ...
void* pimpl;
BatchData* data;
};

View File

@ -39,8 +39,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/** @file Base class of all import post processing steps */
#ifndef AI_BASEPROCESS_H_INC
#define AI_BASEPROCESS_H_INC
#ifndef INCLUDED_AI_BASEPROCESS_H
#define INCLUDED_AI_BASEPROCESS_H
#include <map>
@ -155,20 +155,17 @@ public:
return true;
}
inline void RemoveProperty( const char* name)
{
inline void RemoveProperty( const char* name) {
SetGenericPropertyPtr<Base>(pmap,name,NULL);
}
private:
inline void AddProperty( const char* name, Base* data)
{
inline void AddProperty( const char* name, Base* data) {
SetGenericPropertyPtr<Base>(pmap,name,data);
}
inline void GetProperty( const char* name, Base*& data) const
{
inline void GetProperty( const char* name, Base*& data) const {
data = GetGenericProperty<Base*>(pmap,name,NULL);
}
@ -239,16 +236,14 @@ public:
* allows multiple postprocess steps to share data.
* @param sh May be NULL
*/
inline void SetSharedData(SharedPostProcessInfo* sh)
{
inline void SetSharedData(SharedPostProcessInfo* sh) {
shared = sh;
}
// -------------------------------------------------------------------
/** Get the shared data that is assigned to the step.
*/
inline SharedPostProcessInfo* GetSharedData()
{
inline SharedPostProcessInfo* GetSharedData() {
return shared;
}

View File

@ -43,70 +43,71 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "AssimpPCH.h"
#include "DefaultIOStream.h"
#include "../include/aiAssert.h"
#include <sys/types.h>
#include <sys/stat.h>
using namespace Assimp;
// ---------------------------------------------------------------------------
// ----------------------------------------------------------------------------------
DefaultIOStream::~DefaultIOStream()
{
if (this->mFile)
{
::fclose(this->mFile);
}
if (mFile)
::fclose(mFile);
}
// ---------------------------------------------------------------------------
// ----------------------------------------------------------------------------------
size_t DefaultIOStream::Read(void* pvBuffer,
size_t pSize,
size_t pCount)
size_t pSize,
size_t pCount)
{
ai_assert(NULL != pvBuffer && 0 != pSize && 0 != pCount);
if (!this->mFile)
return 0;
return ::fread(pvBuffer, pSize, pCount, this->mFile);
return (mFile ? ::fread(pvBuffer, pSize, pCount, mFile) : 0);
}
// ---------------------------------------------------------------------------
// ----------------------------------------------------------------------------------
size_t DefaultIOStream::Write(const void* pvBuffer,
size_t pSize,
size_t pCount)
size_t pSize,
size_t pCount)
{
ai_assert(NULL != pvBuffer && 0 != pSize && 0 != pCount);
if (!this->mFile)return 0;
::fseek(mFile, 0, SEEK_SET);
return ::fwrite(pvBuffer, pSize, pCount, this->mFile);
return (mFile ? ::fwrite(pvBuffer, pSize, pCount, mFile) : 0);
}
// ---------------------------------------------------------------------------
// ----------------------------------------------------------------------------------
aiReturn DefaultIOStream::Seek(size_t pOffset,
aiOrigin pOrigin)
aiOrigin pOrigin)
{
if (!this->mFile)return AI_FAILURE;
if (!mFile)return AI_FAILURE;
return (0 == ::fseek(this->mFile, (long)pOffset,
(aiOrigin_CUR == pOrigin ? SEEK_CUR :
(aiOrigin_END == pOrigin ? SEEK_END : SEEK_SET)))
? AI_SUCCESS : AI_FAILURE);
// Just to check whether our enum maps one to one with the CRT constants
ai_assert(aiOrigin_CUR == SEEK_CUR && aiOrigin_END == SEEK_END
&& aiOrigin_SET == SEEK_SET);
// do the seek
return (0 == ::fseek(mFile, (long)pOffset,(int)pOrigin) ? AI_SUCCESS : AI_FAILURE);
}
// ---------------------------------------------------------------------------
// ----------------------------------------------------------------------------------
size_t DefaultIOStream::Tell() const
{
if (!this->mFile)return 0;
return ::ftell(this->mFile);
if (!mFile)return 0;
return ::ftell(mFile);
}
// ---------------------------------------------------------------------------
// ----------------------------------------------------------------------------------
size_t DefaultIOStream::FileSize() const
{
ai_assert (!mFilename.empty());
if (NULL == mFile)
if (! mFile)
return 0;
// TODO: Is that really faster if we have already opened the file?
#if defined _WIN32 && !defined __GNUC__
struct __stat64 fileStat;
int err = _stat64( mFilename.c_str(), &fileStat );
@ -121,4 +122,12 @@ size_t DefaultIOStream::FileSize() const
return (size_t) (fileStat.st_size);
#endif
}
// ---------------------------------------------------------------------------
// ----------------------------------------------------------------------------------
void DefaultIOStream::Flush()
{
if (mFile)
::fflush(mFile);
}
// ----------------------------------------------------------------------------------

View File

@ -42,17 +42,14 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef AI_DEFAULTIOSTREAM_H_INC
#define AI_DEFAULTIOSTREAM_H_INC
#include <string>
#include <stdio.h>
#include "../include/IOStream.h"
namespace Assimp
{
namespace Assimp {
// ---------------------------------------------------------------------------
//! \class DefaultIOStream
//! \brief Default IO implementation, use standard IO operations
// ---------------------------------------------------------------------------
// ----------------------------------------------------------------------------------
//! @class DefaultIOStream
//! @brief Default IO implementation, use standard IO operations
class DefaultIOStream : public IOStream
{
friend class DefaultIOSystem;
@ -66,39 +63,39 @@ public:
~DefaultIOStream ();
// -------------------------------------------------------------------
// -------------------------------------------------------------------
size_t Read(void* pvBuffer,
size_t pSize,
size_t pCount);
// -------------------------------------------------------------------
// -------------------------------------------------------------------
size_t Write(const void* pvBuffer,
size_t pSize,
size_t pCount);
// -------------------------------------------------------------------
// -------------------------------------------------------------------
aiReturn Seek(size_t pOffset,
aiOrigin pOrigin);
// -------------------------------------------------------------------
// -------------------------------------------------------------------
size_t Tell() const;
//! Returns filesize
// -------------------------------------------------------------------
size_t FileSize() const;
// -------------------------------------------------------------------
void Flush();
private:
//! File datastructure, using clib
FILE* mFile;
//! Filename
std::string mFilename;
};
// ---------------------------------------------------------------------------
// ----------------------------------------------------------------------------------
inline DefaultIOStream::DefaultIOStream () :
mFile(NULL),
mFilename("")
@ -106,7 +103,8 @@ inline DefaultIOStream::DefaultIOStream () :
// empty
}
// ---------------------------------------------------------------------------
// ----------------------------------------------------------------------------------
inline DefaultIOStream::DefaultIOStream (FILE* pFile,
const std::string &strFilename) :
mFile(pFile),
@ -114,8 +112,7 @@ inline DefaultIOStream::DefaultIOStream (FILE* pFile,
{
// empty
}
// ---------------------------------------------------------------------------
// ----------------------------------------------------------------------------------
} // ns assimp

View File

@ -40,18 +40,20 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "AssimpPCH.h"
#include "DefaultIOSystem.h"
// Default log streams
#include "Win32DebugLogStream.h"
#include "StdOStreamLogStream.h"
#include "FileLogStream.h"
namespace Assimp
{
// ---------------------------------------------------------------------------
namespace Assimp {
// ----------------------------------------------------------------------------------
NullLogger DefaultLogger::s_pNullLogger;
Logger *DefaultLogger::m_pLogger = &DefaultLogger::s_pNullLogger;
// ---------------------------------------------------------------------------
// ----------------------------------------------------------------------------------
//
struct LogStreamInfo
{
@ -72,17 +74,73 @@ struct LogStreamInfo
// empty
}
};
// ---------------------------------------------------------------------------
// ----------------------------------------------------------------------------------
// Construct a default log stream
LogStream* LogStream::createDefaultStream(DefaultLogStreams streams,
const std::string& name /*= "AssimpLog.txt"*/,
IOSystem* io /*= NULL*/)
{
switch (streams)
{
// This is a platform-specific feature
case DLS_DEBUGGER:
#ifdef WIN32
return new Win32DebugLogStream();
#else
return NULL;
#endif
// Platform-independent default streams
case DLS_CERR:
return new StdOStreamLogStream(std::cerr);
case DLS_COUT:
return new StdOStreamLogStream(std::cout);
case DLS_FILE:
return (name.size() ? new FileLogStream(name,io) : NULL);
default:
// We don't know this default log stream, so raise an assertion
ai_assert(false);
};
// For compilers without dead code path detection
return NULL;
}
// ----------------------------------------------------------------------------------
// Creates the only singleton instance
Logger *DefaultLogger::create(const std::string &name, LogSeverity severity)
Logger *DefaultLogger::create(const std::string &name /*= "AssimpLog.txt"*/,
LogSeverity severity /*= NORMAL*/,
unsigned int defStreams /*= DLS_DEBUGGER | DLS_FILE*/,
IOSystem* io /*= NULL*/)
{
if (m_pLogger && !isNullLogger() )
delete m_pLogger;
m_pLogger = new DefaultLogger( name, severity );
m_pLogger = new DefaultLogger( severity );
// Attach default log streams
// Stream the log to the MSVC debugger?
if (defStreams & DLS_DEBUGGER)
m_pLogger->attachStream( LogStream::createDefaultStream(DLS_DEBUGGER));
// Stream the log to COUT?
if (defStreams & DLS_COUT)
m_pLogger->attachStream( LogStream::createDefaultStream(DLS_COUT));
// Stream the log to CERR?
if (defStreams & DLS_CERR)
m_pLogger->attachStream( LogStream::createDefaultStream(DLS_CERR));
// Stream the log to a file
if (defStreams & DLS_FILE && !name.empty())
m_pLogger->attachStream( LogStream::createDefaultStream(DLS_FILE,name,io));
return m_pLogger;
}
// ---------------------------------------------------------------------------
// ----------------------------------------------------------------------------------
void DefaultLogger::set( Logger *logger )
{
if (!logger)logger = &s_pNullLogger;
@ -91,19 +149,21 @@ void DefaultLogger::set( Logger *logger )
DefaultLogger::m_pLogger = logger;
}
// ---------------------------------------------------------------------------
// ----------------------------------------------------------------------------------
bool DefaultLogger::isNullLogger()
{
return m_pLogger == &s_pNullLogger;
}
// ---------------------------------------------------------------------------
// ----------------------------------------------------------------------------------
// Singleton getter
Logger *DefaultLogger::get()
{
return m_pLogger;
}
// ---------------------------------------------------------------------------
// ----------------------------------------------------------------------------------
// Kills the only instance
void DefaultLogger::kill()
{
@ -112,7 +172,7 @@ void DefaultLogger::kill()
m_pLogger = &s_pNullLogger;
}
// ---------------------------------------------------------------------------
// ----------------------------------------------------------------------------------
// Debug message
void DefaultLogger::debug( const std::string &message )
{
@ -123,7 +183,7 @@ void DefaultLogger::debug( const std::string &message )
writeToStreams( msg, Logger::DEBUGGING );
}
// ---------------------------------------------------------------------------
// ----------------------------------------------------------------------------------
// Logs an info
void DefaultLogger::info( const std::string &message )
{
@ -131,7 +191,7 @@ void DefaultLogger::info( const std::string &message )
writeToStreams( msg , Logger::INFO );
}
// ---------------------------------------------------------------------------
// ----------------------------------------------------------------------------------
// Logs a warning
void DefaultLogger::warn( const std::string &message )
{
@ -139,7 +199,7 @@ void DefaultLogger::warn( const std::string &message )
writeToStreams( msg, Logger::WARN );
}
// ---------------------------------------------------------------------------
// ----------------------------------------------------------------------------------
// Logs an error
void DefaultLogger::error( const std::string &message )
{
@ -147,18 +207,19 @@ void DefaultLogger::error( const std::string &message )
writeToStreams( msg, Logger::ERR );
}
// ---------------------------------------------------------------------------
// ----------------------------------------------------------------------------------
// Severity setter
void DefaultLogger::setLogSeverity( LogSeverity log_severity )
{
m_Severity = log_severity;
}
// ---------------------------------------------------------------------------
// ----------------------------------------------------------------------------------
// Attachs a new stream
void DefaultLogger::attachStream( LogStream *pStream, unsigned int severity )
{
ai_assert ( NULL != pStream );
if (!pStream)
return;
// fix (Aramis)
if (0 == severity)
@ -181,11 +242,12 @@ void DefaultLogger::attachStream( LogStream *pStream, unsigned int severity )
m_StreamArray.push_back( pInfo );
}
// ---------------------------------------------------------------------------
// ----------------------------------------------------------------------------------
// Detatch a stream
void DefaultLogger::detatchStream( LogStream *pStream, unsigned int severity )
{
ai_assert ( NULL != pStream );
if (!pStream)
return;
// fix (Aramis)
if (0 == severity)
@ -199,79 +261,49 @@ void DefaultLogger::detatchStream( LogStream *pStream, unsigned int severity )
{
if ( (*it)->m_pStream == pStream )
{
unsigned int uiSev = (*it)->m_uiErrorSeverity;
if ( severity & Logger::INFO )
uiSev &= ( ~Logger::INFO );
if ( severity & Logger::WARN )
uiSev &= ( ~Logger::WARN );
if ( severity & Logger::ERR )
uiSev &= ( ~Logger::ERR );
// fix (Aramis)
if ( severity & Logger::DEBUGGING )
uiSev &= ( ~Logger::DEBUGGING );
(*it)->m_uiErrorSeverity = uiSev;
(*it)->m_uiErrorSeverity &= ~severity;
if ( (*it)->m_uiErrorSeverity == 0 )
{
it = m_StreamArray.erase( it );
m_StreamArray.erase( it );
break;
}
}
}
}
// ---------------------------------------------------------------------------
// ----------------------------------------------------------------------------------
// Constructor
DefaultLogger::DefaultLogger( const std::string &name, LogSeverity severity ) :
m_Severity( severity )
{
#ifdef WIN32
m_Streams.push_back( new Win32DebugLogStream() );
#endif
if (name.empty())
return;
m_Streams.push_back( new FileLogStream( name ) );
DefaultLogger::DefaultLogger(LogSeverity severity)
noRepeatMsg = false;
}
: m_Severity ( severity )
, noRepeatMsg (false)
{}
// ---------------------------------------------------------------------------
// ----------------------------------------------------------------------------------
// Destructor
DefaultLogger::~DefaultLogger()
{
for ( StreamIt it = m_StreamArray.begin();
it != m_StreamArray.end();
++it )
{
for ( StreamIt it = m_StreamArray.begin(); it != m_StreamArray.end(); ++it )
delete *it;
}
for (std::vector<LogStream*>::iterator it = m_Streams.begin();
it != m_Streams.end();
++it)
{
delete *it;
}
m_Streams.clear();
}
// ---------------------------------------------------------------------------
// ----------------------------------------------------------------------------------
// Writes message to stream
void DefaultLogger::writeToStreams(const std::string &message,
ErrorSeverity ErrorSev )
ErrorSeverity ErrorSev )
{
if ( message.empty() )
return;
std::string s;
// Check whether this is a repeated message
if (message == lastMsg)
{
if (!noRepeatMsg)
{
noRepeatMsg = true;
s = "Skipping one or more lines with the same contents";
s = "Skipping one or more lines with the same contents\n";
}
else return;
}
@ -279,32 +311,25 @@ void DefaultLogger::writeToStreams(const std::string &message,
{
lastMsg = s = message;
noRepeatMsg = false;
}
s.append("\n");
}
for ( ConstStreamIt it = m_StreamArray.begin();
it != m_StreamArray.end();
++it)
{
if ( ErrorSev & (*it)->m_uiErrorSeverity )
{
(*it)->m_pStream->write( s);
}
}
for (std::vector<LogStream*>::iterator it = m_Streams.begin();
it != m_Streams.end();
++it)
{
(*it)->write( s + std::string("\n"));
}
}
// ---------------------------------------------------------------------------
// ----------------------------------------------------------------------------------
// Returns thread id, if not supported only a zero will be returned.
std::string DefaultLogger::getThreadID()
{
std::string thread_id( "0" );
#ifdef WIN32
HANDLE hThread = GetCurrentThread();
HANDLE hThread = ::GetCurrentThread();
if ( hThread )
{
std::stringstream thread_msg;
@ -318,6 +343,6 @@ std::string DefaultLogger::getThreadID()
#endif
}
// ---------------------------------------------------------------------------
// ----------------------------------------------------------------------------------
} // Namespace Assimp
} // !namespace Assimp

View File

@ -4,10 +4,10 @@
#include "../include/LogStream.h"
#include "../include/IOStream.h"
namespace Assimp
{
namespace Assimp {
// ---------------------------------------------------------------------------
// ----------------------------------------------------------------------------------
/** @class FileLogStream
* @brief Logstream to write into a file.
*/
@ -15,52 +15,57 @@ class FileLogStream :
public LogStream
{
public:
FileLogStream( const std::string &strFileName );
FileLogStream( const std::string &strFileName, IOSystem* io = NULL );
~FileLogStream();
void write( const std::string &message );
private:
IOStream *m_pStream;
};
// ---------------------------------------------------------------------------
// ----------------------------------------------------------------------------------
// Constructor
inline FileLogStream::FileLogStream( const std::string &strFileName ) :
inline FileLogStream::FileLogStream( const std::string &strFileName, IOSystem* io ) :
m_pStream(NULL)
{
if ( strFileName.empty() )
return;
DefaultIOSystem FileSystem;
const std::string mode = "w";
m_pStream = FileSystem.Open( strFileName, mode );
const static std::string mode = "wt";
// If no IOSystem is specified: take a default one
if (!io)
{
DefaultIOSystem FileSystem;
m_pStream = FileSystem.Open( strFileName, mode );
}
else m_pStream = io->Open( strFileName, mode );
}
// ---------------------------------------------------------------------------
// ----------------------------------------------------------------------------------
// Destructor
inline FileLogStream::~FileLogStream()
{
if (NULL != m_pStream)
{
DefaultIOSystem FileSystem;
FileSystem.Close( m_pStream );
}
// The virtual d'tor should destroy the underlying file
delete m_pStream;
}
// ---------------------------------------------------------------------------
// ----------------------------------------------------------------------------------
// Write method
inline void FileLogStream::write( const std::string &message )
{
if (m_pStream != NULL)
{
m_pStream->Write(message.c_str(), sizeof(char),
message.size());
/*int i=0;
i++;*/
m_pStream->Write(message.c_str(), sizeof(char), message.size());
m_pStream->Flush();
}
}
// ---------------------------------------------------------------------------
} // Namespace Assimp
// ----------------------------------------------------------------------------------
#endif
} // !Namespace Assimp
#endif // !! ASSIMP_FILELOGSTREAM_H_INC

View File

@ -145,7 +145,7 @@ void FindDegeneratesProcess::Execute( aiScene* pScene)
if (deg && !DefaultLogger::isNullLogger())
{
char s[64];
itoa10(s,deg);
ASSIMP_itoa10(s,deg);
DefaultLogger::get()->warn(std::string("Found ") + s + " degenerated primitives");
}
}

View File

@ -171,9 +171,11 @@ inline const char* ValidateArrayContents<aiVector3D>(const aiVector3D* arr, unsi
const std::vector<bool>& dirtyMask, bool mayBeIdentical , bool mayBeZero )
{
bool b = false;
unsigned int cnt = 0;
for (unsigned int i = 0; i < size;++i)
{
if (dirtyMask.size() && dirtyMask[i])continue;
++cnt;
const aiVector3D& v = arr[i];
if (is_special_float(v.x) || is_special_float(v.y) || is_special_float(v.z))
@ -186,7 +188,7 @@ inline const char* ValidateArrayContents<aiVector3D>(const aiVector3D* arr, unsi
}
if (i && v != arr[i-1])b = true;
}
if (!b && !mayBeIdentical)
if (cnt > 1 && !b && !mayBeIdentical)
return "All vectors are identical";
return NULL;
}
@ -284,7 +286,7 @@ void FindInvalidDataProcess::ProcessAnimationChannel (aiNodeAnim* anim)
int FindInvalidDataProcess::ProcessMesh (aiMesh* pMesh)
{
bool ret = false;
std::vector<bool> dirtyMask(pMesh->mNumVertices,true);
std::vector<bool> dirtyMask(pMesh->mNumVertices,(pMesh->mNumFaces ? true : false));
// Ignore elements that are not referenced by vertices.
// (they are, for example, caused by the FindDegenerates step)
@ -295,7 +297,7 @@ int FindInvalidDataProcess::ProcessMesh (aiMesh* pMesh)
dirtyMask[f.mIndices[i]] = false;
}
// process vertex positions
// Process vertex positions
if(pMesh->mVertices && ProcessArray(pMesh->mVertices,pMesh->mNumVertices,"positions",dirtyMask))
{
DefaultLogger::get()->error("Deleting mesh: Unable to continue without vertex positions");
@ -333,11 +335,13 @@ int FindInvalidDataProcess::ProcessMesh (aiMesh* pMesh)
for (unsigned int m = 0; m < pMesh->mNumFaces;++m)
{
const aiFace& f = pMesh->mFaces[m];
if (2 == f.mNumIndices)
if (f.mNumIndices < 3)
{
dirtyMask[f.mIndices[0]] = dirtyMask[f.mIndices[1]] = true;
dirtyMask[f.mIndices[0]] = true;
if (f.mNumIndices == 2)
dirtyMask[f.mIndices[1]] = true;
}
else if (1 == f.mNumIndices)dirtyMask[f.mIndices[0]] = true;
}
}
// Normals, tangents and bitangents are undefined for
@ -354,7 +358,7 @@ int FindInvalidDataProcess::ProcessMesh (aiMesh* pMesh)
if (pMesh->mTangents && ProcessArray(pMesh->mTangents,pMesh->mNumVertices,
"tangents",dirtyMask))
{
delete[] pMesh->mTangents; pMesh->mTangents = NULL;
delete[] pMesh->mBitangents; pMesh->mBitangents = NULL;
ret = true;
}
@ -362,7 +366,7 @@ int FindInvalidDataProcess::ProcessMesh (aiMesh* pMesh)
if (pMesh->mBitangents && ProcessArray(pMesh->mBitangents,pMesh->mNumVertices,
"bitangents",dirtyMask))
{
delete[] pMesh->mBitangents; pMesh->mBitangents = NULL;
delete[] pMesh->mTangents; pMesh->mTangents = NULL;
ret = true;
}
}

View File

@ -123,11 +123,11 @@ bool GenVertexNormalsProcess::GenMeshVertexNormals (aiMesh* pMesh, unsigned int
return false;
}
// allocate an array to hold the output normals
// Allocate the array to hold the output normals
const float qnan = std::numeric_limits<float>::quiet_NaN();
pMesh->mNormals = new aiVector3D[pMesh->mNumVertices];
// compute per-face normals but store them per-vertex
// Compute per-face normals but store them per-vertex
for( unsigned int a = 0; a < pMesh->mNumFaces; a++)
{
const aiFace& face = pMesh->mFaces[a];
@ -148,7 +148,7 @@ bool GenVertexNormalsProcess::GenMeshVertexNormals (aiMesh* pMesh, unsigned int
pMesh->mNormals[face.mIndices[i]] = vNor;
}
// set up a SpatialSort to quickly find all vertices close to a given position
// Set up a SpatialSort to quickly find all vertices close to a given position
// check whether we can reuse the SpatialSort of a previous step.
SpatialSort* vertexFinder = NULL;
SpatialSort _vertexFinder;
@ -176,16 +176,15 @@ bool GenVertexNormalsProcess::GenMeshVertexNormals (aiMesh* pMesh, unsigned int
if (configMaxAngle >= AI_DEG_TO_RAD( 175.f ))
{
// there is no angle limit. Thus all vertices with positions close
// There is no angle limit. Thus all vertices with positions close
// to each other will receive the same vertex normal. This allows us
// to optimize the whole algorithm a little bit ...
std::vector<bool> abHad(pMesh->mNumVertices,false);
for (unsigned int i = 0; i < pMesh->mNumVertices;++i)
{
if (abHad[i])continue;
// get all vertices that share this one ...
// Get all vertices that share this one ...
vertexFinder->FindPositions( pMesh->mVertices[i], posEpsilon, verticesFound);
aiVector3D pcNor;
@ -194,10 +193,9 @@ bool GenVertexNormalsProcess::GenMeshVertexNormals (aiMesh* pMesh, unsigned int
const aiVector3D& v = pMesh->mNormals[verticesFound[a]];
if (is_not_qnan(v.x))pcNor += v;
}
pcNor.Normalize();
// write the smoothed normal back to all affected normals
// Write the smoothed normal back to all affected normals
for (unsigned int a = 0; a < verticesFound.size(); ++a)
{
register unsigned int vidx = verticesFound[a];
@ -211,7 +209,7 @@ bool GenVertexNormalsProcess::GenMeshVertexNormals (aiMesh* pMesh, unsigned int
const float fLimit = ::cos(configMaxAngle);
for (unsigned int i = 0; i < pMesh->mNumVertices;++i)
{
// get all vertices that share this one ...
// Get all vertices that share this one ...
vertexFinder->FindPositions( pMesh->mVertices[i] , posEpsilon, verticesFound);
aiVector3D pcNor;
@ -222,7 +220,7 @@ bool GenVertexNormalsProcess::GenMeshVertexNormals (aiMesh* pMesh, unsigned int
// check whether the angle between the two normals is not too large
// HACK: if v.x is qnan the dot product will become qnan, too
// therefore the comparison against fLimit should be false
// in every case. Contact me if you disagree with this assumption
// in every case.
if (v * pMesh->mNormals[i] < fLimit)
continue;

View File

@ -43,8 +43,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "AssimpPCH.h"
// internal headers
// =======================================================================================
// Internal headers
// =======================================================================================
#include "BaseImporter.h"
#include "BaseProcess.h"
#include "DefaultIOStream.h"
@ -53,7 +54,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "ProcessHelper.h"
#include "ScenePreprocessor.h"
// =======================================================================================
// Importers
// =======================================================================================
#ifndef AI_BUILD_NO_X_IMPORTER
# include "XFileImporter.h"
#endif
@ -133,7 +136,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# include "TerragenLoader.h"
#endif
// =======================================================================================
// PostProcess-Steps
// =======================================================================================
#ifndef AI_BUILD_NO_CALCTANGENTS_PROCESS
# include "CalcTangentsProcess.h"
#endif
@ -196,22 +201,50 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#endif
using namespace Assimp;
using namespace Assimp::Intern;
// =======================================================================================
// Intern::AllocateFromAssimpHeap serves as abstract base class. It overrides
// new and delete (and their array counterparts) of public API classes (e.g. Logger) to
// utilize our DLL heap
// =======================================================================================
void* AllocateFromAssimpHeap::operator new ( size_t num_bytes)
{
return ::operator new(num_bytes);
}
void AllocateFromAssimpHeap::operator delete ( void* data)
{
return ::operator delete(data);
}
void* AllocateFromAssimpHeap::operator new[] ( size_t num_bytes)
{
return ::operator new[](num_bytes);
}
void AllocateFromAssimpHeap::operator delete[] ( void* data)
{
return ::operator delete[](data);
}
// ------------------------------------------------------------------------------------------------
// Constructor.
Importer::Importer() :
mIOHandler(NULL),
mScene(NULL),
mErrorString("")
// Importer Constructor.
Importer::Importer()
: mIOHandler (NULL)
, mScene (NULL)
, mErrorString ("")
{
// Allocate a default IO handler
mIOHandler = new DefaultIOSystem;
mIsDefaultHandler = true;
bExtraVerbose = false; // disable extra verbose mode by default
// ======================================================================
// Add an instance of each worker class here
// the order doesn't really care, however file formats that are
// The order doesn't really care, however file formats that are
// used more frequently than others should be at the beginning.
// ======================================================================
mImporter.reserve(25);
#if (!defined AI_BUILD_NO_X_IMPORTER)
@ -293,9 +326,11 @@ Importer::Importer() :
mImporter.push_back( new TerragenImporter());
#endif
// ======================================================================
// Add an instance of each post processing step here in the order
// of sequence it is executed. steps that are added here are not validated -
// as RegisterPPStep() does - all dependencies must be there.
// of sequence it is executed. Steps that are added here are not
// validated - as RegisterPPStep() does - all dependencies must be there.
// ======================================================================
mPostProcessingSteps.reserve(25);
#if (!defined AI_BUILD_NO_VALIDATEDS_PROCESS)
@ -386,9 +421,7 @@ Importer::Importer() :
#endif
// allocate a SharedPostProcessInfo object and store pointers to it
// Allocate a SharedPostProcessInfo object and store pointers to it
// in all post-process steps in the list.
mPPShared = new SharedPostProcessInfo();
for (std::vector<BaseProcess*>::iterator it = mPostProcessingSteps.begin(),
@ -402,37 +435,47 @@ Importer::Importer() :
// Destructor.
Importer::~Importer()
{
// Delete all import plugins
for( unsigned int a = 0; a < mImporter.size(); a++)
delete mImporter[a];
// Delete all post-processing plug-ins
for( unsigned int a = 0; a < mPostProcessingSteps.size(); a++)
delete mPostProcessingSteps[a];
// delete the assigned IO handler
// Delete the assigned IO handler
delete mIOHandler;
// kill imported scene. Destructors should do that recursivly
// Kill imported scene. Destructors should do that recursivly
delete mScene;
// delete shared post-processing data
// Delete shared post-processing data
delete mPPShared;
}
// ------------------------------------------------------------------------------------------------
// Empty and private copy constructor
// Copy constructor - copies the config of another Importer, not the scene
Importer::Importer(const Importer &other)
{
// empty
// Call the default constructor
new(this) Importer();
// Copy the property table
mIntProperties = other.mIntProperties;
mFloatProperties = other.mFloatProperties;
mStringProperties = other.mStringProperties;
}
// ------------------------------------------------------------------------------------------------
// Register a custom loader plugin
aiReturn Importer::RegisterLoader(BaseImporter* pImp)
{
ai_assert(NULL != pImp);
// Check whether we would have two loaders for the same file extension now
// ======================================================================
// Check whether we would have two loaders for the same file extension
// This is absolutely OK, but we should warn the developer of the new
// loader that his code will propably never be called.
// ======================================================================
std::string st;
pImp->GetExtensionList(st);
@ -441,9 +484,8 @@ aiReturn Importer::RegisterLoader(BaseImporter* pImp)
while (sz)
{
if (IsExtensionSupported(std::string(sz)))
{
DefaultLogger::get()->warn(std::string( "The file extension " ) + sz + " is already in use");
}
sz = ::strtok(NULL,";");
}
#endif
@ -455,10 +497,10 @@ aiReturn Importer::RegisterLoader(BaseImporter* pImp)
}
// ------------------------------------------------------------------------------------------------
// Unregister a custom loader
aiReturn Importer::UnregisterLoader(BaseImporter* pImp)
{
ai_assert(NULL != pImp);
for (std::vector<BaseImporter*>::iterator
it = mImporter.begin(),end = mImporter.end();
it != end;++it)
@ -481,12 +523,14 @@ aiReturn Importer::UnregisterLoader(BaseImporter* pImp)
// Supplies a custom IO handler to the importer to open and access files.
void Importer::SetIOHandler( IOSystem* pIOHandler)
{
// If the new handler is zero, allocate a default IO implementation.
if (!pIOHandler)
{
delete mIOHandler;
mIOHandler = new DefaultIOSystem();
mIsDefaultHandler = true;
}
// Otherwise register the custom handler
else if (mIOHandler != pIOHandler)
{
delete mIOHandler;
@ -533,28 +577,37 @@ bool ValidateFlags(unsigned int pFlags)
}
#endif // ! DEBUG
// ------------------------------------------------------------------------------------------------
// Free the current scene
void Importer::FreeScene( )
{
delete mScene;
mScene = NULL;
}
// ------------------------------------------------------------------------------------------------
// Reads the given file and returns its contents if successful.
const aiScene* Importer::ReadFile( const std::string& pFile, unsigned int pFlags)
{
// validate the flags
// Validate the flags
ai_assert(ValidateFlags(pFlags));
// put a large try block around everything to catch all std::exception's
// ======================================================================
// Put a large try block around everything to catch all std::exception's
// that might be thrown by STL containers or by new().
// ImportErrorException's are throw by ourselves and caught elsewhere.
// ======================================================================
try
{
// check whether this Importer instance has already loaded
// Check whether this Importer instance has already loaded
// a scene. In this case we need to delete the old one
if (this->mScene)
if (mScene)
{
DefaultLogger::get()->debug("The previous scene has been deleted");
delete mScene;
this->mScene = NULL;
DefaultLogger::get()->debug("Deleting previous scene");
FreeScene();
}
// first check if the file is accessable at all
// First check if the file is accessable at all
if( !mIOHandler->Exists( pFile))
{
mErrorString = "Unable to open file \"" + pFile + "\".";
@ -562,7 +615,7 @@ const aiScene* Importer::ReadFile( const std::string& pFile, unsigned int pFlags
return NULL;
}
// find an worker class which can handle the file
// Find an worker class which can handle the file
BaseImporter* imp = NULL;
for( unsigned int a = 0; a < mImporter.size(); a++)
{
@ -573,7 +626,7 @@ const aiScene* Importer::ReadFile( const std::string& pFile, unsigned int pFlags
}
}
// put a proper error message if no suitable importer was found
// Put a proper error message if no suitable importer was found
if( !imp)
{
mErrorString = "No suitable reader found for the file format of file \"" + pFile + "\".";
@ -581,17 +634,17 @@ const aiScene* Importer::ReadFile( const std::string& pFile, unsigned int pFlags
return NULL;
}
// dispatch the reading to the worker class for this format
// Dispatch the reading to the worker class for this format
DefaultLogger::get()->info("Found a matching importer for this file format");
imp->SetupProperties( this );
mScene = imp->ReadFile( pFile, mIOHandler);
// if successful, apply all active post processing steps to the imported data
// If successful, apply all active post processing steps to the imported data
if( mScene)
{
// FIRST of all - preprocess the scene
ScenePreprocessor pre;
pre.ProcessScene(mScene);
ScenePreprocessor pre(mScene);
pre.ProcessScene();
DefaultLogger::get()->info("Import successful, entering postprocessing-steps");
#ifdef _DEBUG
@ -648,7 +701,6 @@ const aiScene* Importer::ReadFile( const std::string& pFile, unsigned int pFlags
catch (std::exception &e)
{
#if (defined _MSC_VER) && (defined _CPPRTTI)
// if we have RTTI get the full name of the exception that occured
mErrorString = std::string(typeid( e ).name()) + ": " + e.what();
#else
@ -710,6 +762,7 @@ void Importer::SetPropertyInteger(const char* szName, int iValue,
}
// ------------------------------------------------------------------------------------------------
// Set a configuration property
void Importer::SetPropertyFloat(const char* szName, float iValue,
bool* bWasExisting /*= NULL*/)
{
@ -717,6 +770,7 @@ void Importer::SetPropertyFloat(const char* szName, float iValue,
}
// ------------------------------------------------------------------------------------------------
// Set a configuration property
void Importer::SetPropertyString(const char* szName, const std::string& value,
bool* bWasExisting /*= NULL*/)
{
@ -732,6 +786,7 @@ int Importer::GetPropertyInteger(const char* szName,
}
// ------------------------------------------------------------------------------------------------
// Get a configuration property
float Importer::GetPropertyFloat(const char* szName,
float iErrorReturn /*= 10e10*/) const
{
@ -739,6 +794,7 @@ float Importer::GetPropertyFloat(const char* szName,
}
// ------------------------------------------------------------------------------------------------
// Get a configuration property
const std::string& Importer::GetPropertyString(const char* szName,
const std::string& iErrorReturn /*= ""*/) const
{
@ -746,6 +802,7 @@ const std::string& Importer::GetPropertyString(const char* szName,
}
// ------------------------------------------------------------------------------------------------
// Get the memory requirements of a single node
inline void AddNodeWeight(unsigned int& iScene,const aiNode* pcNode)
{
iScene += sizeof(aiNode);
@ -760,8 +817,9 @@ inline void AddNodeWeight(unsigned int& iScene,const aiNode* pcNode)
void Importer::GetMemoryRequirements(aiMemoryInfo& in) const
{
in = aiMemoryInfo();
if (!this->mScene)return;
// return if we have no scene loaded
if (!this->mScene)return;
in.total = sizeof(aiScene);
// add all meshes

View File

@ -44,6 +44,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using namespace Assimp;
// ------------------------------------------------------------------------------------------------
// Get a specific property from a material
aiReturn aiGetMaterialProperty(const aiMaterial* pMat,
const char* pKey,
unsigned int type,
@ -70,6 +71,7 @@ aiReturn aiGetMaterialProperty(const aiMaterial* pMat,
}
// ------------------------------------------------------------------------------------------------
// Get an array of floating-point values from the material.
aiReturn aiGetMaterialFloatArray(const aiMaterial* pMat,
const char* pKey,
unsigned int type,
@ -124,6 +126,7 @@ aiReturn aiGetMaterialFloatArray(const aiMaterial* pMat,
}
// ------------------------------------------------------------------------------------------------
// Get an array if integers from the material
aiReturn aiGetMaterialIntegerArray(const aiMaterial* pMat,
const char* pKey,
unsigned int type,
@ -177,6 +180,7 @@ aiReturn aiGetMaterialIntegerArray(const aiMaterial* pMat,
}
// ------------------------------------------------------------------------------------------------
// Get a color (3 or 4 floats) from the material
aiReturn aiGetMaterialColor(const aiMaterial* pMat,
const char* pKey,
unsigned int type,
@ -192,6 +196,7 @@ aiReturn aiGetMaterialColor(const aiMaterial* pMat,
}
// ------------------------------------------------------------------------------------------------
// Get a string from the material
aiReturn aiGetMaterialString(const aiMaterial* pMat,
const char* pKey,
unsigned int type,
@ -223,6 +228,7 @@ aiReturn aiGetMaterialString(const aiMaterial* pMat,
}
// ------------------------------------------------------------------------------------------------
// Construction. Actually the one and only way to get an aiMaterial instance
MaterialHelper::MaterialHelper()
{
// Allocate 5 entries by default
@ -234,7 +240,30 @@ MaterialHelper::MaterialHelper()
// ------------------------------------------------------------------------------------------------
MaterialHelper::~MaterialHelper()
{
_InternDestruct();
}
// ------------------------------------------------------------------------------------------------
aiMaterial::~aiMaterial()
{
// This is safe: aiMaterial has a private constructor,
// so instances must be created indirectly via MaterialHelper.
((MaterialHelper*)this)->_InternDestruct();
}
// ------------------------------------------------------------------------------------------------
// Manual destructor
void MaterialHelper::_InternDestruct()
{
// First clean up all properties
Clear();
// Then delete the array that stored them
delete[] mProperties;
AI_DEBUG_INVALIDATE_PTR(mProperties);
// Update members
mNumAllocated = 0;
}
// ------------------------------------------------------------------------------------------------
@ -244,36 +273,38 @@ void MaterialHelper::Clear()
{
// delete this entry
delete mProperties[i];
AI_DEBUG_INVALIDATE_PTR(mProperties[i]);
}
mNumProperties = 0;
// The array remains
// The array remains allocated, we just invalidated its contents
}
// ------------------------------------------------------------------------------------------------
uint32_t MaterialHelper::ComputeHash()
uint32_t MaterialHelper::ComputeHash(bool includeMatName /*= false*/)
{
uint32_t hash = 1503; // magic start value, choosen to be my birthday :-)
for (unsigned int i = 0; i < this->mNumProperties;++i)
{
aiMaterialProperty* prop;
// NOTE: We need to exclude the material name from the hash
if ((prop = this->mProperties[i]) && ::strcmp(prop->mKey.data,"$mat.name"))
// If specified, exclude the material name from the hash
if ((prop = mProperties[i]) && (includeMatName || ::strcmp(prop->mKey.data,"$mat.name")))
{
hash = SuperFastHash(prop->mKey.data,(unsigned int)prop->mKey.length,hash);
hash = SuperFastHash(prop->mData,prop->mDataLength,hash);
// Combine the semantic and the index with the hash
// We print them to a string to make sure the quality
// of the hash isn't decreased.
// of the hashing state isn't affected (our hashing
// procedure was originally intended for plaintest).
char buff[32];
unsigned int len;
len = itoa10(buff,prop->mSemantic);
len = ASSIMP_itoa10(buff,prop->mSemantic);
hash = SuperFastHash(buff,len-1,hash);
len = itoa10(buff,prop->mIndex);
len = ASSIMP_itoa10(buff,prop->mIndex);
hash = SuperFastHash(buff,len-1,hash);
}
}
@ -359,11 +390,11 @@ aiReturn MaterialHelper::AddBinaryProperty (const void* pInput,
return AI_SUCCESS;
}
// resize the array ... allocate storage for 5 other properties
// resize the array ... double the storage
if (mNumProperties == mNumAllocated)
{
unsigned int iOld = mNumAllocated;
mNumAllocated += 5;
mNumAllocated *= 2;
aiMaterialProperty** ppTemp = new aiMaterialProperty*[mNumAllocated];
if (NULL == ppTemp)return AI_OUTOFMEMORY;

View File

@ -43,13 +43,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define AI_MATERIALSYSTEM_H_INC
#include "../include/aiMaterial.h"
namespace Assimp
{
namespace Assimp {
// ---------------------------------------------------------------------------
/** Internal material helper class. Can be used to fill an aiMaterial
// ----------------------------------------------------------------------------------------
/** Internal material helper class. Intended to be used to fill an aiMaterial
structure easily. */
class ASSIMP_API MaterialHelper : public ::aiMaterial
{
@ -58,95 +56,102 @@ public:
MaterialHelper();
~MaterialHelper();
// -------------------------------------------------------------------
/** Add a property with a given key and type info to the material
// ------------------------------------------------------------------------------
/** @brief Add a property with a given key and type info to the material
* structure
*
* \param pInput Pointer to input data
* \param pSizeInBytes Size of input data
* \param pKey Key/Usage of the property (AI_MATKEY_XXX)
* \param type Set by the AI_MATKEY_XXX macro
* \param index Set by the AI_MATKEY_XXX macro
* \param pType Type information hint
* @param pInput Pointer to input data
* @param pSizeInBytes Size of input data
* @param pKey Key/Usage of the property (AI_MATKEY_XXX)
* @param type Set by the AI_MATKEY_XXX macro
* @param index Set by the AI_MATKEY_XXX macro
* @param pType Type information hint
*/
aiReturn AddBinaryProperty (const void* pInput,
unsigned int pSizeInBytes,
const char* pKey,
unsigned int type,
unsigned int index,
unsigned int type ,
unsigned int index ,
aiPropertyTypeInfo pType);
// -------------------------------------------------------------------
/** Add a string property with a given key and type info to the
// ------------------------------------------------------------------------------
/** @brief Add a string property with a given key and type info to the
* material structure
*
* \param pInput Input string
* \param pKey Key/Usage of the property (AI_MATKEY_XXX)
* \param type Set by the AI_MATKEY_XXX macro
* \param index Set by the AI_MATKEY_XXX macro
* @param pInput Input string
* @param pKey Key/Usage of the property (AI_MATKEY_XXX)
* @param type Set by the AI_MATKEY_XXX macro
* @param index Set by the AI_MATKEY_XXX macro
*/
aiReturn AddProperty (const aiString* pInput,
const char* pKey,
unsigned int type,
unsigned int index);
unsigned int type = 0,
unsigned int index = 0);
// -------------------------------------------------------------------
/** Add a property with a given key to the material structure
* \param pInput Pointer to the input data
* \param pNumValues Number of values in the array
* \param pKey Key/Usage of the property (AI_MATKEY_XXX)
* \param type Set by the AI_MATKEY_XXX macro
* \param index Set by the AI_MATKEY_XXX macro
// ------------------------------------------------------------------------------
/** @brief Add a property with a given key to the material structure
* @param pInput Pointer to the input data
* @param pNumValues Number of values in the array
* @param pKey Key/Usage of the property (AI_MATKEY_XXX)
* @param type Set by the AI_MATKEY_XXX macro
* @param index Set by the AI_MATKEY_XXX macro
*/
template<class TYPE>
aiReturn AddProperty (const TYPE* pInput,
unsigned int pNumValues,
const char* pKey,
unsigned int type,
unsigned int index);
unsigned int type = 0,
unsigned int index = 0);
// -------------------------------------------------------------------
/** Remove a given key from the list
* The function fails if the key isn't found
// ------------------------------------------------------------------------------
/** @brief Remove a given key from the list.
*
* \param pKey Key to be deleted
* The function fails if the key isn't found
* @param pKey Key to be deleted
*/
aiReturn RemoveProperty (const char* pKey,
unsigned int type,
unsigned int index);
unsigned int type = 0,
unsigned int index = 0);
// -------------------------------------------------------------------
/** Removes all properties from the material
// ------------------------------------------------------------------------------
/** @brief Removes all properties from the material.
*
* The array remains allocated, so adding new properties is quite fast.
*/
void Clear();
// -------------------------------------------------------------------
// ------------------------------------------------------------------------------
/** Computes a hash (hopefully unique) from all material properties
* The hash value must be updated after material properties have
* been changed.
* The hash value reflects the current property state, so if you add any
* proprty and call this method again, the resulting hash value will be
* different.
*
* \return Unique hash
* @param includeMatName Set to 'true' to take the #AI_MATKEY_NAME property
* into account. The default value is false.
* @return Unique hash
*/
uint32_t ComputeHash();
uint32_t ComputeHash(bool includeMatName = false);
// -------------------------------------------------------------------
// ------------------------------------------------------------------------------
/** Copy the property list of a material
* \param pcDest Destination material
* \param pcSrc Source material
*/
static void CopyPropertyList(MaterialHelper* pcDest,
const MaterialHelper* pcSrc);
// For internal use
void _InternDestruct();
};
// ---------------------------------------------------------------------------
// ---------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------
template<class TYPE>
aiReturn MaterialHelper::AddProperty (const TYPE* pInput,
const unsigned int pNumValues,
@ -154,14 +159,12 @@ aiReturn MaterialHelper::AddProperty (const TYPE* pInput,
unsigned int type,
unsigned int index)
{
return this->AddBinaryProperty((const void*)pInput,
return AddBinaryProperty((const void*)pInput,
pNumValues * sizeof(TYPE),
pKey,type,index,aiPTI_Buffer);
}
// ---------------------------------------------------------------------------
// ---------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------
template<>
inline aiReturn MaterialHelper::AddProperty<float> (const float* pInput,
const unsigned int pNumValues,
@ -169,14 +172,12 @@ inline aiReturn MaterialHelper::AddProperty<float> (const float* pInput,
unsigned int type,
unsigned int index)
{
return this->AddBinaryProperty((const void*)pInput,
return AddBinaryProperty((const void*)pInput,
pNumValues * sizeof(float),
pKey,type,index,aiPTI_Float);
}
// ---------------------------------------------------------------------------
// ---------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------
template<>
inline aiReturn MaterialHelper::AddProperty<aiColor4D> (const aiColor4D* pInput,
const unsigned int pNumValues,
@ -184,14 +185,12 @@ inline aiReturn MaterialHelper::AddProperty<aiColor4D> (const aiColor4D* pInput,
unsigned int type,
unsigned int index)
{
return this->AddBinaryProperty((const void*)pInput,
return AddBinaryProperty((const void*)pInput,
pNumValues * sizeof(aiColor4D),
pKey,type,index,aiPTI_Float);
}
// ---------------------------------------------------------------------------
// ---------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------
template<>
inline aiReturn MaterialHelper::AddProperty<aiColor3D> (const aiColor3D* pInput,
const unsigned int pNumValues,
@ -199,14 +198,12 @@ inline aiReturn MaterialHelper::AddProperty<aiColor3D> (const aiColor3D* pInput,
unsigned int type,
unsigned int index)
{
return this->AddBinaryProperty((const void*)pInput,
return AddBinaryProperty((const void*)pInput,
pNumValues * sizeof(aiColor3D),
pKey,type,index,aiPTI_Float);
}
// ---------------------------------------------------------------------------
// ---------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------
template<>
inline aiReturn MaterialHelper::AddProperty<int> (const int* pInput,
const unsigned int pNumValues,
@ -214,11 +211,10 @@ inline aiReturn MaterialHelper::AddProperty<int> (const int* pInput,
unsigned int type,
unsigned int index)
{
return this->AddBinaryProperty((const void*)pInput,
return AddBinaryProperty((const void*)pInput,
pNumValues * sizeof(int),
pKey,type,index,aiPTI_Integer);
}
}
} // ! namespace Assimp
#endif //!! AI_MATERIALSYSTEM_H_INC

View File

@ -612,7 +612,7 @@ void NFFImporter::InternReadFile( const std::string& pFile,
if (objectName.length())
{
::strcpy(mesh->name,objectName.c_str());
itoa10(&mesh->name[objectName.length()],30,subMeshIdx++);
ASSIMP_itoa10(&mesh->name[objectName.length()],30,subMeshIdx++);
}
// copy the shader to the mesh.

View File

@ -45,25 +45,25 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// ---------------------------------------------------------------------------------
template <class char_t>
inline bool IsSpace( const char_t in)
AI_FORCE_INLINE bool IsSpace( const char_t in)
{
return (in == (char_t)' ' || in == (char_t)'\t');
}
// ---------------------------------------------------------------------------------
template <class char_t>
inline bool IsLineEnd( const char_t in)
AI_FORCE_INLINE bool IsLineEnd( const char_t in)
{
return (in == (char_t)'\r' || in == (char_t)'\n' || in == (char_t)'\0');
}
// ---------------------------------------------------------------------------------
template <class char_t>
inline bool IsSpaceOrNewLine( const char_t in)
AI_FORCE_INLINE bool IsSpaceOrNewLine( const char_t in)
{
return IsSpace<char_t>(in) || IsLineEnd<char_t>(in);
}
// ---------------------------------------------------------------------------------
template <class char_t>
inline bool SkipSpaces( const char_t* in, const char_t** out)
AI_FORCE_INLINE bool SkipSpaces( const char_t* in, const char_t** out)
{
while (*in == (char_t)' ' || *in == (char_t)'\t')in++;
*out = in;
@ -71,7 +71,7 @@ inline bool SkipSpaces( const char_t* in, const char_t** out)
}
// ---------------------------------------------------------------------------------
template <class char_t>
inline bool SkipSpaces( const char_t** inout)
AI_FORCE_INLINE bool SkipSpaces( const char_t** inout)
{
return SkipSpaces<char_t>(*inout,inout);
}
@ -109,7 +109,7 @@ inline bool SkipSpacesAndLineEnd( const char_t** inout)
}
// ---------------------------------------------------------------------------------
template <class char_t>
bool GetNextLine(const char_t*& buffer, char_t out[4096])
inline bool GetNextLine(const char_t*& buffer, char_t out[4096])
{
if ((char_t)'\0' == *buffer)return false;
@ -124,7 +124,7 @@ bool GetNextLine(const char_t*& buffer, char_t out[4096])
}
// ---------------------------------------------------------------------------------
template <class char_t>
inline bool IsNumeric( char_t in)
AI_FORCE_INLINE bool IsNumeric( char_t in)
{
return in >= '0' && in <= '9' || '-' == in || '+' == in;
}

View File

@ -164,7 +164,6 @@ class ComputeSpatialSortProcess : public BaseProcess
aiMesh* mesh = pScene->mMeshes[i];
_Type& blubb = *it;
blubb.first.Fill(mesh->mVertices,mesh->mNumVertices,sizeof(aiVector3D));
blubb.second = ComputePositionEpsilon(mesh);
}

View File

@ -458,7 +458,7 @@ outer:
if (srcMat.texIdx < pScene->mNumTextures || real < pScene->mNumTextures)
{
srcMat.name.data[0] = '*';
srcMat.name.length = itoa10(&srcMat.name.data[1],1000,
srcMat.name.length = ASSIMP_itoa10(&srcMat.name.data[1],1000,
(srcMat.texIdx < pScene->mNumTextures ? srcMat.texIdx : real));
mat->AddProperty(&srcMat.name,AI_MATKEY_TEXTURE_DIFFUSE(0));
}

View File

@ -81,60 +81,62 @@ inline void ArrayDelete(T**& in, unsigned int& num)
num = 0;
}
//// ------------------------------------------------------------------------------------------------
//// Updates the node graph - removes all nodes which have the "remove" flag set and the
//// "don't remove" flag not set. Nodes with meshes are never deleted.
//bool UpdateNodeGraph(aiNode* node,std::list<aiNode*>& childsOfParent,bool root)
//{
// register bool b = false;
//
// std::list<aiNode*> mine;
// for (unsigned int i = 0; i < node->mNumChildren;++i)
// {
// if(UpdateNodeGraph(node->mChildren[i],mine,false))
// b = true;
// }
//
// // somewhat tricky ... mNumMeshes must be originally 0 and MSB2 may not be set,
// // so we can do a simple comparison against MSB here
// if (!root && AI_RC_UINT_MSB == node->mNumMeshes )
// {
// // this node needs to be removed
// if(node->mNumChildren)
// {
// childsOfParent.insert(childsOfParent.end(),mine.begin(),mine.end());
//
// // set all children to NULL to make sure they are not deleted when we delete ourself
// for (unsigned int i = 0; i < node->mNumChildren;++i)
// node->mChildren[i] = NULL;
// }
// b = true;
// delete node;
// }
// else
// {
// AI_RC_UNMASK(node->mNumMeshes);
// childsOfParent.push_back(node);
//
// if (b)
// {
// // reallocate the array of our children here
// node->mNumChildren = (unsigned int)mine.size();
// aiNode** const children = new aiNode*[mine.size()];
// aiNode** ptr = children;
//
// for (std::list<aiNode*>::iterator it = mine.begin(), end = mine.end();
// it != end; ++it)
// {
// *ptr++ = *it;
// }
// delete[] node->mChildren;
// node->mChildren = children;
// return false;
// }
// }
// return b;
//}
#if 0
// ------------------------------------------------------------------------------------------------
// Updates the node graph - removes all nodes which have the "remove" flag set and the
// "don't remove" flag not set. Nodes with meshes are never deleted.
bool UpdateNodeGraph(aiNode* node,std::list<aiNode*>& childsOfParent,bool root)
{
register bool b = false;
std::list<aiNode*> mine;
for (unsigned int i = 0; i < node->mNumChildren;++i)
{
if(UpdateNodeGraph(node->mChildren[i],mine,false))
b = true;
}
// somewhat tricky ... mNumMeshes must be originally 0 and MSB2 may not be set,
// so we can do a simple comparison against MSB here
if (!root && AI_RC_UINT_MSB == node->mNumMeshes )
{
// this node needs to be removed
if(node->mNumChildren)
{
childsOfParent.insert(childsOfParent.end(),mine.begin(),mine.end());
// set all children to NULL to make sure they are not deleted when we delete ourself
for (unsigned int i = 0; i < node->mNumChildren;++i)
node->mChildren[i] = NULL;
}
b = true;
delete node;
}
else
{
AI_RC_UNMASK(node->mNumMeshes);
childsOfParent.push_back(node);
if (b)
{
// reallocate the array of our children here
node->mNumChildren = (unsigned int)mine.size();
aiNode** const children = new aiNode*[mine.size()];
aiNode** ptr = children;
for (std::list<aiNode*>::iterator it = mine.begin(), end = mine.end();
it != end; ++it)
{
*ptr++ = *it;
}
delete[] node->mChildren;
node->mChildren = children;
return false;
}
}
return b;
}
#endif
// ------------------------------------------------------------------------------------------------
// Executes the post processing step on the given imported data.
@ -167,7 +169,9 @@ void RemoveVCProcess::Execute( aiScene* pScene)
for (unsigned int i = 1;i < pScene->mNumMaterials;++i)
delete pScene->mMaterials[i];
pScene->mNumMaterials = 1;
MaterialHelper* helper = (MaterialHelper*) pScene->mMaterials[0];
ai_assert(NULL != helper);
helper->Clear();
// gray
@ -218,6 +222,10 @@ void RemoveVCProcess::Execute( aiScene* pScene)
{
pScene->mFlags |= AI_SCENE_FLAGS_INCOMPLETE;
DefaultLogger::get()->debug("Setting AI_SCENE_FLAGS_INCOMPLETE flag");
// If we have no meshes anymore we should also clear another flag ...
if (!pScene->mNumMeshes)
pScene->mFlags &= ~AI_SCENE_FLAGS_NON_VERBOSE_FORMAT;
}
if (bHas)DefaultLogger::get()->info("RemoveVCProcess finished. Data structure cleanup has been done.");
@ -267,10 +275,10 @@ bool RemoveVCProcess::ProcessMesh(aiMesh* pMesh)
// handle texture coordinates
register bool b = (0 != (configDeleteFlags & aiComponent_TEXCOORDS));
for (unsigned int i = 0; i < AI_MAX_NUMBER_OF_TEXTURECOORDS; ++i)
for (unsigned int i = 0, real = 0; real < AI_MAX_NUMBER_OF_TEXTURECOORDS; ++real)
{
if (!pMesh->mTextureCoords[i])break;
if (configDeleteFlags & aiComponent_TEXCOORDSn(i) || b)
if (configDeleteFlags & aiComponent_TEXCOORDSn(real) || b)
{
delete pMesh->mTextureCoords[i];
pMesh->mTextureCoords[i] = NULL;
@ -279,19 +287,19 @@ bool RemoveVCProcess::ProcessMesh(aiMesh* pMesh)
if (!b)
{
// collapse the rest of the array
unsigned int a;
for (a = i+1; a < AI_MAX_NUMBER_OF_TEXTURECOORDS;++a)
{
for (unsigned int a = i+1; a < AI_MAX_NUMBER_OF_TEXTURECOORDS;++a)
pMesh->mTextureCoords[a-1] = pMesh->mTextureCoords[a];
}
pMesh->mTextureCoords[AI_MAX_NUMBER_OF_TEXTURECOORDS-1] = NULL;
continue;
}
}
++i;
}
// handle vertex colors
b = (0 != (configDeleteFlags & aiComponent_COLORS));
for (unsigned int i = 0; i < AI_MAX_NUMBER_OF_COLOR_SETS; ++i)
for (unsigned int i = 0, real = 0; real < AI_MAX_NUMBER_OF_COLOR_SETS; ++real)
{
if (!pMesh->mColors[i])break;
if (configDeleteFlags & aiComponent_COLORSn(i) || b)
@ -303,14 +311,14 @@ bool RemoveVCProcess::ProcessMesh(aiMesh* pMesh)
if (!b)
{
// collapse the rest of the array
unsigned int a;
for (a = i+1; a < AI_MAX_NUMBER_OF_COLOR_SETS;++a)
{
for (unsigned int a = i+1; a < AI_MAX_NUMBER_OF_COLOR_SETS;++a)
pMesh->mColors[a-1] = pMesh->mColors[a];
}
pMesh->mColors[AI_MAX_NUMBER_OF_COLOR_SETS-1] = NULL;
continue;
}
}
++i;
}
// handle bones

View File

@ -38,19 +38,19 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
----------------------------------------------------------------------
*/
/** @file Defines a post processing step to kill all loaded normals */
#ifndef AI_KILLNORMALPROCESS_H_INC
#define AI_KILLNORMALPROCESS_H_INC
/** @file Defines a post processing step to remove specific parts of the scene */
#ifndef AI_REMOVEVCPROCESS_H_INCLUDED
#define AI_REMOVEVCPROCESS_H_INCLUDED
#include "BaseProcess.h"
#include "../include/aiMesh.h"
class RemoveVCProcessTest;
namespace Assimp
{
namespace Assimp {
// ---------------------------------------------------------------------------
/** RemoveVCProcess: Class to kill all normals loaded
/** RemoveVCProcess: Class to exclude specific parts of the data structure
* from further processing by removing them,
*/
class ASSIMP_API RemoveVCProcess : public BaseProcess
{
@ -80,7 +80,6 @@ public:
*/
void Execute( aiScene* pScene);
// -------------------------------------------------------------------
/** Called prior to ExecuteOnScene().
* The function is a request to the process to update its configuration
@ -88,20 +87,37 @@ public:
*/
virtual void SetupProperties(const Importer* pImp);
// -------------------------------------------------------------------
/** Manually setup the configuration flags for the step
*
* @param Bitwise combintion of the #aiComponent enumerated values.
*/
void SetDeleteFlags(unsigned int f)
{
configDeleteFlags = f;
}
// -------------------------------------------------------------------
/** Query the current configuration.
*/
unsigned int GetDeleteFlags() const
{
return configDeleteFlags;
}
private:
bool ProcessMesh (aiMesh* pcMesh);
/** Configuration
/** Configuration flag
*/
unsigned int configDeleteFlags;
/** The scene the instance is currently operating on
/** The scene we're working with
*/
aiScene* mScene;
};
} // end of namespace Assimp
#endif // !!AI_KILLNORMALPROCESS_H_INC
#endif // !!AI_REMOVEVCPROCESS_H_INCLUDED

View File

@ -397,7 +397,7 @@ void SceneCombiner::MergeScenes(aiScene** _dest, aiScene* master,
{
// Offset the index and write it back ..
const unsigned int idx = strtol10(&s.data[1]) + offset[n];
itoa10(&s.data[1],sizeof(s.data)-1,idx);
ASSIMP_itoa10(&s.data[1],sizeof(s.data)-1,idx);
}
}

View File

@ -43,10 +43,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using namespace Assimp;
// ---------------------------------------------------------------------------
void ScenePreprocessor::ProcessScene (aiScene* _scene)
// ---------------------------------------------------------------------------------------------
void ScenePreprocessor::ProcessScene ()
{
scene = _scene;
ai_assert(scene != NULL);
// Process all meshes
for (unsigned int i = 0; i < scene->mNumMeshes;++i)
@ -87,7 +87,7 @@ void ScenePreprocessor::ProcessScene (aiScene* _scene)
}
}
// ---------------------------------------------------------------------------
// ---------------------------------------------------------------------------------------------
void ScenePreprocessor::ProcessMesh (aiMesh* mesh)
{
// If aiMesh::mNumUVComponents is *not* set assign the default value of 2
@ -129,7 +129,7 @@ void ScenePreprocessor::ProcessMesh (aiMesh* mesh)
}
}
// ---------------------------------------------------------------------------
// ---------------------------------------------------------------------------------------------
void ScenePreprocessor::ProcessAnimation (aiAnimation* anim)
{
double first = 10e10, last = -10e10;

View File

@ -43,27 +43,65 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef AI_SCENE_PREPROCESSOR_H_INC
#define AI_SCENE_PREPROCESSOR_H_INC
class ScenePreprocessorTest;
namespace Assimp {
// ---------------------------------------------------------------------------
// ----------------------------------------------------------------------------------
/** ScenePreprocessor: Preprocess a scene before any post-processing
* steps are executed.
*
* The step computes data that needn't necessarily be provided by the
* importer, such as aiMesh::mPrimitiveTypes.
*/
// ----------------------------------------------------------------------------------
class ASSIMP_API ScenePreprocessor
{
// Make ourselves a friend of the corresponding test unit.
friend class ::ScenePreprocessorTest;
public:
/** Preprocess a given scene.
*
* @param _scene Scene to be preprocessed
// ----------------------------------------------------------------
/** Default c'tpr. Use SetScene() to assign a scene to the object.
*/
void ProcessScene (aiScene* _scene);
ScenePreprocessor()
: scene (NULL)
{}
/** Constructs the object and assigns a specific scene to it
*/
ScenePreprocessor(aiScene* _scene)
: scene (_scene)
{}
// ----------------------------------------------------------------
/** Assign a (new) scene to the object.
*
* One 'SceneProcessor' can be used for multiple scenes.
* Call ProcessScene to have the scene preprocessed.
* @param sc Scene to be processed.
*/
void SetScene (aiScene* sc) {
scene = sc;
}
// ----------------------------------------------------------------
/** Preprocess the current scene
*/
void ProcessScene ();
protected:
// ----------------------------------------------------------------
/** Preprocess an animation in the scene
* @param anim Anim to be preprocessed.
*/
void ProcessAnimation (aiAnimation* anim);
// ----------------------------------------------------------------
/** Preprocess a mesh in the scene
* @param mesh Mesh to be preprocessed.
*/
void ProcessMesh (aiMesh* mesh);
protected:

View File

@ -70,9 +70,8 @@ void ComputeNormalsWithSmoothingsGroups(MeshWithSmoothingGroups<T>& sMesh)
aiVector3D pDelta2 = *pV3 - *pV1;
aiVector3D vNor = pDelta1 ^ pDelta2;
sMesh.mNormals[face.mIndices[0]] = vNor;
sMesh.mNormals[face.mIndices[1]] = vNor;
sMesh.mNormals[face.mIndices[2]] = vNor;
for (unsigned int c = 0; c < 3;++c)
sMesh.mNormals[face.mIndices[c]] = vNor;
}
// calculate the position bounds so we have a reliable epsilon to check position differences against
@ -95,9 +94,8 @@ void ComputeNormalsWithSmoothingsGroups(MeshWithSmoothingGroups<T>& sMesh)
for( typename std::vector<T>::iterator i = sMesh.mFaces.begin();
i != sMesh.mFaces.end();++i)
{
sSort.Add(sMesh.mPositions[(*i).mIndices[0]],(*i).mIndices[0],(*i).iSmoothGroup);
sSort.Add(sMesh.mPositions[(*i).mIndices[1]],(*i).mIndices[1],(*i).iSmoothGroup);
sSort.Add(sMesh.mPositions[(*i).mIndices[2]],(*i).mIndices[2],(*i).iSmoothGroup);
for (unsigned int c = 0; c < 3;++c)
sSort.Add(sMesh.mPositions[(*i).mIndices[c]],(*i).mIndices[c],(*i).iSmoothGroup);
}
sSort.Prepare();

View File

@ -57,7 +57,7 @@ using namespace Assimp;
// Constructor to be privately used by Importer
SortByPTypeProcess::SortByPTypeProcess()
{
// nothing to do here
configRemoveMeshes = 0;
}
// ------------------------------------------------------------------------------------------------

View File

@ -0,0 +1,52 @@
#ifndef AI_STROSTREAMLOGSTREAM_H_INC
#define AI_STROSTREAMLOGSTREAM_H_INC
#include "../include/LogStream.h"
#include <ostream>
namespace Assimp {
// ---------------------------------------------------------------------------
/** @class StdOStreamLogStream
* @brief Logs into a std::ostream
*/
class StdOStreamLogStream : public LogStream
{
public:
/** @brief Construction from an existing std::ostream
* @param _ostream Output stream to be used
*/
StdOStreamLogStream(std::ostream& _ostream);
/** @brief Destructor */
~StdOStreamLogStream();
/** @brief Writer */
void write(const std::string &messgae);
private:
std::ostream& ostream;
};
// ---------------------------------------------------------------------------
// Default constructor
inline StdOStreamLogStream::StdOStreamLogStream(std::ostream& _ostream)
: ostream (_ostream)
{}
// ---------------------------------------------------------------------------
// Default constructor
inline StdOStreamLogStream::~StdOStreamLogStream()
{}
// ---------------------------------------------------------------------------
// Write method
inline void StdOStreamLogStream::write(const std::string &message)
{
ostream << message.c_str();
ostream.flush();
}
// ---------------------------------------------------------------------------
} // Namespace Assimp
#endif // guard

View File

@ -68,7 +68,7 @@ public:
* The stream will be deleted afterwards.
* @param stream Input stream
*/
inline StreamReader(IOStream* stream)
StreamReader(IOStream* stream)
{
ai_assert(NULL != stream);
this->stream = stream;
@ -81,7 +81,7 @@ public:
end = limit = &buffer[s];
}
inline ~StreamReader()
~StreamReader()
{
delete[] buffer;
delete stream;
@ -90,28 +90,28 @@ public:
/** Read a float from the stream
*/
inline float GetF4()
float GetF4()
{
return Get<float>();
}
/** Read a double from the stream
*/
inline double GetF8()
double GetF8()
{
return Get<double>();
}
/** Read a short from the stream
*/
inline int16_t GetI2()
int16_t GetI2()
{
return Get<int16_t>();
}
/** Read a char from the stream
*/
inline int8_t GetI1()
int8_t GetI1()
{
if (current >= end)
throw new ImportErrorException("End of file was reached");
@ -121,21 +121,21 @@ public:
/** Read an int from the stream
*/
inline int32_t GetI4()
int32_t GetI4()
{
return Get<int32_t>();
}
/** Read a long from the stream
*/
inline int64_t GetI8()
int64_t GetI8()
{
return Get<int64_t>();
}
/** Get the remaining stream size (to the end of the srream)
*/
inline unsigned int GetRemainingSize()
unsigned int GetRemainingSize()
{
return (unsigned int)(end - current);
}
@ -143,7 +143,7 @@ public:
/** Get the remaining stream size (to the current read limit)
*/
inline unsigned int GetRemainingSizeToLimit()
unsigned int GetRemainingSizeToLimit()
{
return (unsigned int)(limit - current);
}
@ -151,7 +151,7 @@ public:
/** Increase the file pointer
*/
inline void IncPtr(unsigned int plus)
void IncPtr(unsigned int plus)
{
current += plus;
if (current > end)
@ -162,14 +162,14 @@ public:
/** Get the current file pointer
*/
inline int8_t* GetPtr() const
int8_t* GetPtr() const
{
return current;
}
/** Set current file pointer
*/
inline void SetPtr(int8_t* p)
void SetPtr(int8_t* p)
{
current = p;
if (current > end || current < buffer)
@ -180,7 +180,7 @@ public:
/** Get the current offset from the beginning of the file
*/
inline int GetCurrentPos() const
int GetCurrentPos() const
{
return (unsigned int)(current - buffer);
}
@ -191,7 +191,7 @@ public:
* the beginning of the file. Passing 0xffffffff
* resets the limit.
*/
inline void SetReadLimit(unsigned int _limit)
void SetReadLimit(unsigned int _limit)
{
if (0xffffffff == _limit)
{
@ -205,35 +205,35 @@ public:
/** Get the current read limit
*/
inline int GetReadLimit() const
int GetReadLimit() const
{
return (unsigned int)(limit - buffer);
}
/** Skip to the read limit
*/
inline void SkipToReadLimit()
void SkipToReadLimit()
{
current = limit;
}
// overload operator>> for those who prefer this way ...
inline void operator >> (float& f)
void operator >> (float& f)
{f = GetF4();}
inline void operator >> (double& f)
void operator >> (double& f)
{f = GetF8();}
inline void operator >> (int16_t& f)
void operator >> (int16_t& f)
{f = GetI2();}
inline void operator >> (int32_t& f)
void operator >> (int32_t& f)
{f = GetI4();}
inline void operator >> (int64_t& f)
void operator >> (int64_t& f)
{f = GetI8();}
inline void operator >> (int8_t& f)
void operator >> (int8_t& f)
{f = GetI1();}
private:
@ -241,7 +241,7 @@ private:
/** Generic read method. ByteSwap::Swap(T*) must exist.
*/
template <typename T>
inline T Get()
T Get()
{
if (current + sizeof(T) > limit)
throw new ImportErrorException("End of file or stream limit was reached");

View File

@ -38,23 +38,31 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
----------------------------------------------------------------------
*/
/** @file Definition of platform independent string comparison functions */
#ifndef AI_STRINGCOMPARISON_H_INC
#define AI_STRINGCOMPARISON_H_INC
/** @file Definition of platform independent string workers:
ASSIMP_itoa10
ASSIMP_stricmp
ASSIMP_strincmp
namespace Assimp
{
These functions are not consistently available on all platforms,
or the provided implementations behave too differently.
*/
#ifndef INCLUDED_AI_STRING_WORKERS_H
#define INCLUDED_AI_STRING_WORKERS_H
// ---------------------------------------------------------------------------
// itoa is not consistently available on all platforms so it is quite useful
// to have a small replacement function here. No need to use a full sprintf()
// if we just want to print a number ...
// @param out Output buffer
// @param max Maximum number of characters to be written, including '\0'
// @param number Number to be written
// @return Number of bytes written. Including '\0'.
inline unsigned int itoa10( char* out, unsigned int max, int32_t number)
namespace Assimp {
// -------------------------------------------------------------------------------
/** @brief itoa with a fixed base 10
* 'itoa' is not consistently available on all platforms so it is quite useful
* to have a small replacement function here. No need to use a full sprintf()
* if we just want to print a number ...
* @param out Output buffer
* @param max Maximum number of characters to be written, including '\0'
* @param number Number to be written
* @return Number of bytes written. Including the terminal zero.
*/
inline unsigned int ASSIMP_itoa10( char* out, unsigned int max, int32_t number)
{
ai_assert(NULL != out);
@ -91,28 +99,32 @@ inline unsigned int itoa10( char* out, unsigned int max, int32_t number)
return written;
}
// ---------------------------------------------------------------------------
// Secure template overload
// The compiler should choose this function if he is able to determine the
// size of the array automatically.
// -------------------------------------------------------------------------------
/** @brief itoa with a fixed base 10 (Secure template overload)
* The compiler should choose this function if he is able to determine the
* size of the array automatically.
*/
template <unsigned int length>
inline unsigned int itoa10( char(& out)[length], int32_t number)
inline unsigned int ASSIMP_itoa10( char(& out)[length], int32_t number)
{
return itoa10(out,length,number);
return ASSIMP_itoa10(out,length,number);
}
// ---------------------------------------------------------------------------
/** \brief Helper function to do platform independent string comparison.
// -------------------------------------------------------------------------------
/** @brief Helper function to do platform independent string comparison.
*
* This is required since stricmp() is not consistently available on
* all platforms. Some platforms use the '_' prefix, others don't even
* have such a function.
*
* \param s1 First input string
* \param s2 Second input string
* @param s1 First input string
* @param s2 Second input string
* @return 0 if the given strings are identical
*/
inline int ASSIMP_stricmp(const char *s1, const char *s2)
{
ai_assert(NULL != s1 && NULL != s2);
#if (defined _MSC_VER)
return ::_stricmp(s1,s2);
@ -134,8 +146,12 @@ inline int ASSIMP_stricmp(const char *s1, const char *s2)
#endif
}
// ---------------------------------------------------------------------------
/** \brief Case independent comparison of two std::strings
// -------------------------------------------------------------------------------
/** @brief Case independent comparison of two std::strings
*
* @param a First string
* @param b Second string
* @return 0 if a == b
*/
inline int ASSIMP_stricmp(const std::string& a, const std::string& b)
{
@ -143,19 +159,23 @@ inline int ASSIMP_stricmp(const std::string& a, const std::string& b)
return (i ? i : ASSIMP_stricmp(a.c_str(),b.c_str()));
}
// ---------------------------------------------------------------------------
/** \brief Helper function to do platform independent string comparison.
// -------------------------------------------------------------------------------
/** @brief Helper function to do platform independent string comparison.
*
* This is required since strincmp() is not consistently available on
* all platforms. Some platforms use the '_' prefix, others don't even
* have such a function.
*
* \param s1 First input string
* \param s2 Second input string
* \param n Macimum number of characters to compare
* @param s1 First input string
* @param s2 Second input string
* @param n Macimum number of characters to compare
* @return 0 if the given strings are identical
*/
inline int ASSIMP_strincmp(const char *s1, const char *s2, unsigned int n)
{
ai_assert(NULL != s1 && NULL != s2);
if (!n)return 0;
#if (defined _MSC_VER)
return ::_strnicmp(s1,s2,n);
@ -180,8 +200,11 @@ inline int ASSIMP_strincmp(const char *s1, const char *s2, unsigned int n)
}
// ---------------------------------------------------------------------------
// Evaluates an integer power.
// -------------------------------------------------------------------------------
/** @brief Evaluates an integer power
*
* todo: move somewhere where it fits better in than here
*/
inline unsigned int integer_pow (unsigned int base, unsigned int power)
{
unsigned int res = 1;

View File

@ -227,14 +227,18 @@ void TargetAnimationHelper::Process(std::vector<aiVectorKey>* distanceTrack)
float f = diff.Length();
// output distance vector
if (fill)
if (f)
{
fill->push_back(aiVectorKey());
aiVectorKey& v = fill->back();
v.mTime = iter.GetCurTime();
v.mValue = aiVector3D (0.f,0.f,f);
v.mValue = diff;
diff /= f;
}
else
{
}
diff /= f;
// diff is now the vector in which our camera is pointing
}

View File

@ -47,12 +47,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "../include/aiAssert.h"
struct aiMesh;
namespace Assimp
{
namespace Assimp {
// ---------------------------------------------------------------------------
/** The VertexTriangleAdjacency class computes a vertex-triangle
/** @brief The VertexTriangleAdjacency class computes a vertex-triangle
* adjacency map from a given index buffer.
*
* @note The input data is expected to be triangulated.
@ -62,30 +60,30 @@ class ASSIMP_API VertexTriangleAdjacency
public:
/** Construction from an existing index buffer
* @param pcFaces Index buffer
* @param iNumFaces Number of faces in the buffer
* @param iNumVertices Number of referenced vertices. This value
* is computed automatically if 0 is specified.
* @param bComputeNumTriangles If you want the class to compute
* a list which contains the number of referenced triangles
* per vertex - pass true.
/** @brief Construction from an existing index buffer
* @param pcFaces Index buffer
* @param iNumFaces Number of faces in the buffer
* @param iNumVertices Number of referenced vertices. This value
* is computed automatically if 0 is specified.
* @param bComputeNumTriangles If you want the class to compute
* a list which contains the number of referenced triangles
* per vertex - pass true.
*/
VertexTriangleAdjacency(aiFace* pcFaces,unsigned int iNumFaces,
unsigned int iNumVertices = 0,
bool bComputeNumTriangles = true);
/** Destructor
/** @brief Destructor
*/
~VertexTriangleAdjacency();
/** Get all triangles adjacent to a vertex
* @param iVertIndex Index of the vertex
* @return A pointer to the adjacency list
/** @brief Get all triangles adjacent to a vertex
* @param iVertIndex Index of the vertex
* @return A pointer to the adjacency list
*/
inline unsigned int* GetAdjacentTriangles(unsigned int iVertIndex) const
unsigned int* GetAdjacentTriangles(unsigned int iVertIndex) const
{
ai_assert(iVertIndex < iNumVertices);
@ -94,12 +92,12 @@ public:
}
/** Get the number of triangles that are referenced by
* a vertex. This function returns a reference that can be modified
* @param iVertIndex Index of the vertex
* @return Number of referenced triangles
/** @brief Get the number of triangles that are referenced by
* a vertex. This function returns a reference that can be modified
* @param iVertIndex Index of the vertex
* @return Number of referenced triangles
*/
inline unsigned int& GetNumTrianglesPtr(unsigned int iVertIndex)
unsigned int& GetNumTrianglesPtr(unsigned int iVertIndex)
{
ai_assert(iVertIndex < iNumVertices && NULL != mLiveTriangles);
return mLiveTriangles[iVertIndex];

View File

@ -1,17 +1,12 @@
#ifndef AI_WIN32DEBUGLOGSTREAM_H_INC
#define AI_WIN32DEBUGLOGSTREAM_H_INC
#ifdef WIN32
#include "../include/LogStream.h"
//#ifdef _MSC_VER
#ifdef WIN32
#include "Windows.h"
#endif
namespace Assimp
{
//#ifdef _MSC_VER
#ifdef WIN32
namespace Assimp {
// ---------------------------------------------------------------------------
/** @class Win32DebugLogStream
@ -34,16 +29,12 @@ public:
// ---------------------------------------------------------------------------
// Default constructor
inline Win32DebugLogStream::Win32DebugLogStream()
{
// empty
}
{}
// ---------------------------------------------------------------------------
// Default constructor
inline Win32DebugLogStream::~Win32DebugLogStream()
{
// empty
}
{}
// ---------------------------------------------------------------------------
// Write method
@ -53,9 +44,7 @@ inline void Win32DebugLogStream::write(const std::string &message)
}
// ---------------------------------------------------------------------------
#endif
} // Namespace Assimp
#endif
#endif // ! WIN32
#endif // guard

View File

@ -1,5 +1,5 @@
// A very small replacement for boost::tuple
// (c) Alexander Gessler, 2008
// (c) Alexander Gessler, 2008 [alexander.gessler@gmx.net]
#ifndef BOOST_TUPLE_INCLUDED
#define BOOST_TUPLE_INCLUDED
@ -24,9 +24,22 @@ namespace boost {
typedef const T t;
};
template <typename, unsigned, typename, bool, unsigned>
struct value_getter;
// Predeclare some stuff
template <typename, unsigned, typename, bool, unsigned> struct value_getter;
// Helper to obtain the type of a tuple element
template <typename T, unsigned NIDX, typename TNEXT, unsigned N /*= 0*/>
struct type_getter {
typedef type_getter<typename TNEXT::type,NIDX+1,typename TNEXT::next_type,N> next_elem_getter;
typedef typename next_elem_getter::type type;
};
template <typename T, unsigned NIDX, typename TNEXT >
struct type_getter <T,NIDX,TNEXT,NIDX> {
typedef T type;
};
// Base class for all explicit specializations of list_elem
template <typename T, unsigned NIDX, typename TNEXT >
struct list_elem_base {
@ -47,27 +60,28 @@ namespace boost {
// Get the value of a specific tuple element
template <unsigned N>
T& get () {
typename type_getter<T,NIDX,TNEXT,N>::type& get () {
value_getter <T,NIDX,TNEXT,false,N> s;
return s(*this);
}
// Get the value of a specific tuple element
template <unsigned N>
const T& get () const {
const typename type_getter<T,NIDX,TNEXT,N>::type& get () const {
value_getter <T,NIDX,TNEXT,true,N> s;
return s(*this);
}
// Assign a value to the tuple element
template <typename T2, typename TNEXT2> /* requires convertible(T2,T) */
list_elem& operator = (const list_elem<T2,NIDX,TNEXT2>& other) {
me = (T)other.me;
next = other.next;
return *this;
// Explicit cast
template <typename T2, typename TNEXT2 >
operator list_elem<T2,NIDX,TNEXT2> () const {
list_elem<T2,NIDX,TNEXT2> ret;
ret.me = (T2)me;
ret.next = next;
return ret;
}
// Recursively compare two elements
// Recursively compare two elements (last element returns always true)
bool operator == (const list_elem& s) const {
return (me == s.me && next == s.next);
}
@ -100,8 +114,8 @@ namespace boost {
typedef list_elem<nulltype,0,int> list_end;
// Helper obtain to query the value of a tuple element
// NOTE: Could be a nested class, but afaik it's non-standard and at least
// MSVC isn't able to evaluate the partial specialization correctly.
// NOTE: This can't be a nested class as the compiler won't accept a full or
// partial specialization of a nested class of a non-specialized template
template <typename T, unsigned NIDX, typename TNEXT, bool IS_CONST, unsigned N>
struct value_getter {
@ -112,7 +126,9 @@ namespace boost {
typedef value_getter<typename TNEXT::type,NIDX+1,typename TNEXT::next_type,
IS_CONST, N> next_value_getter;
typename ConstIf<IS_CONST,T>::t& operator () (typename ConstIf<IS_CONST,outer_elem >::t& me) {
typename ConstIf<IS_CONST,typename type_getter<T,NIDX,TNEXT,N>::type>::t&
operator () (typename ConstIf<IS_CONST,outer_elem >::t& me) {
next_value_getter s;
return s(me.next);
}
@ -126,18 +142,6 @@ namespace boost {
return me.me;
}
};
// Helper to obtain the type of a tuple element
template <typename T, unsigned NIDX, typename TNEXT, unsigned N /*= 0*/>
struct type_getter {
typedef type_getter<typename TNEXT::type,NIDX+1,typename TNEXT::next_type,N> next_elem_getter;
typedef typename next_elem_getter::type type;
};
template <typename T, unsigned NIDX, typename TNEXT >
struct type_getter <T,NIDX,TNEXT,NIDX> {
typedef T type;
};
};
// A very minimal implementation for up to 5 elements
@ -175,11 +179,6 @@ namespace boost {
return m.get<N>();
}
// assignment operator
tuple& operator= (const tuple& other) {
m = other.m;
return *this;
}
// comparison operators
bool operator== (const tuple& other) const {
@ -195,9 +194,9 @@ namespace boost {
template < typename T0, typename T1,typename T2,
typename T3, typename T4>
operator tuple <T0,T1,T2,T3,T4> () {
operator tuple <T0,T1,T2,T3,T4> () const {
tuple <T0,T1,T2,T3,T4> s;
s.m = m;
s.m = (tuple <T0,T1,T2,T3,T4>::very_long)m;
return s;
}
};
@ -278,4 +277,4 @@ namespace boost {
}
};
#endif
#endif // !! BOOST_TUPLE_INCLUDED

View File

@ -38,21 +38,20 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
----------------------------------------------------------------------
*/
#if (!defined AI_DEFAULTLOGGER_H_INCLUDED)
#define AI_DEFAULTLOGGER_H_INCLUDED
#ifndef INCLUDED_AI_DEFAULTLOGGER
#define INCLUDED_AI_DEFAULTLOGGER
#include "Logger.h"
#include "LogStream.h"
#include "NullLogger.h"
#include <vector>
namespace Assimp
{
// ---------------------------------------------------------------------------
namespace Assimp {
// ------------------------------------------------------------------------------------
class IOStream;
struct LogStreamInfo;
// ---------------------------------------------------------------------------
// ------------------------------------------------------------------------------------
/** @class DefaultLogger
* @brief Default logging implementation. The logger writes into a file.
* The name can be set by creating the logger. If no filename was specified
@ -62,13 +61,24 @@ class ASSIMP_API DefaultLogger :
public Logger
{
public:
/** @brief Creates a custom logging instance (DefaultLogger)
* @param name Name for logfile
/** @brief Creates a default logging instance (DefaultLogger)
* @param name Name for logfile. Only valid in combination
* with the DLS_FILE flag.
* @param severity Log severity, VERBOSE will activate debug messages
* @param defStreams Default log streams to be attached. Bitwise
* combination of the DefaultLogStreams enumerated
* values. If DLS_FILE is specified, but an empty
* string is passed for 'name' no logfile is created.
* @param io IOSystem to be used to open external files (such as the
* logfile). Pass NULL for the default implementation.
*
* This replaces the default NullLogger with a DefaultLogger instance.
*/
static Logger *create(const std::string &name, LogSeverity severity);
static Logger *create(const std::string &name = "AssimpLog.txt",
LogSeverity severity = NORMAL,
unsigned int defStreams = DLS_DEBUGGER | DLS_FILE,
IOSystem* io = NULL);
/** @brief Setup a custom implementation of the Logger interface as
* default logger.
@ -88,7 +98,7 @@ public:
static Logger *get();
/** @brief Return whether a default NullLogger is currently active
* @return true if the current logger id a NullLogger.
* @return true if the current logger is a NullLogger.
* Use create() or set() to setup a custom logger.
*/
static bool isNullLogger();
@ -97,6 +107,9 @@ public:
logger */
static void kill();
/** @brief Logs debug infos, only been written when severity level VERBOSE is set */
void debug(const std::string &message);
@ -112,23 +125,23 @@ public:
/** @drief Severity setter */
void setLogSeverity(LogSeverity log_severity);
/** @brief Detach a still attached stream from logger */
/** @brief Attach a stream to the logger. */
void attachStream(LogStream *pStream, unsigned int severity);
/** @brief Detach a still attached stream from logger */
void detatchStream(LogStream *pStream, unsigned int severity);
private:
/** @brief Constructor
* @param name Name for logfile, keep this empty to use std::cout and std::cerr
* @param severity Severity of logger
/** @brief Private construction for internal use by create().
* @param severity Logging granularity
*/
DefaultLogger(const std::string &name, LogSeverity severity);
DefaultLogger(LogSeverity severity);
/** @brief Destructor */
~DefaultLogger();
/** @brief Writes message into a file */
/** @brief Writes a message to all streams */
void writeToStreams(const std::string &message, ErrorSeverity ErrorSev );
/** @brief Returns the thread id.
@ -150,14 +163,12 @@ private:
LogSeverity m_Severity;
//! Attached streams
StreamArray m_StreamArray;
//! Array with default streams
std::vector<LogStream*> m_Streams;
bool noRepeatMsg;
std::string lastMsg;
};
// ---------------------------------------------------------------------------
// ------------------------------------------------------------------------------------
} // Namespace Assimp
#endif // !! AI_DEFAULTLOGGER_H_INCLUDED
#endif // !! INCLUDED_AI_DEFAULTLOGGER

View File

@ -1,32 +1,66 @@
/*
---------------------------------------------------------------------------
Open Asset Import Library (ASSIMP)
---------------------------------------------------------------------------
/** @file File I/O wrappers for C++. Use interfaces instead of function
* pointers to be sure even the silliest men on earth can work with this
Copyright (c) 2006-2008, ASSIMP Development 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 Development 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 File I/O wrappers for C++.
*/
#ifndef AI_IOSTREAM_H_INC
#define AI_IOSTREAM_H_INC
#include <string>
#include <stddef.h>
#include "aiTypes.h"
#include "aiFileIO.h"
#ifndef __cplusplus
#error This header requires C++ to be used.
# error This header requires C++ to be used. aiFileIO.h is the \
corresponding C interface.
#endif
namespace Assimp
{
namespace Assimp {
// ---------------------------------------------------------------------------
/** Class to handle file I/O for C++
*
* Derive an own implementation from this interface to provide custom IO handling
* to the Importer. If you implement this interface, be sure to also provide an
* implementation for IOSystem that creates instances of your custom IO class.
// ----------------------------------------------------------------------------------
/** @class IOStream
* @brief Class to handle file I/O for C++
*
* Derive an own implementation from this interface to provide custom IO handling
* to the Importer. If you implement this interface, be sure to also provide an
* implementation for IOSystem that creates instances of your custom IO class.
*/
// ---------------------------------------------------------------------------
class ASSIMP_API IOStream
{
protected:
@ -35,78 +69,73 @@ protected:
public:
// -------------------------------------------------------------------
/** Destructor. Deleting the object closes the underlying file,
/** @brief Destructor. Deleting the object closes the underlying file,
* alternatively you may use IOSystem::Close() to release the file.
*/
virtual ~IOStream(void);
virtual ~IOStream();
// -------------------------------------------------------------------
/** Read from the file
/** @brief Read from the file
*
* See fread() for more details
* This fails for write-only files
*/
// -------------------------------------------------------------------
virtual size_t Read(
void* pvBuffer,
virtual size_t Read(void* pvBuffer,
size_t pSize,
size_t pCount) = 0;
// -------------------------------------------------------------------
/** Write to the file
/** @brief Write to the file
*
* See fwrite() for more details
* This fails for read-only files
*/
// -------------------------------------------------------------------
virtual size_t Write(
const void* pvBuffer,
virtual size_t Write(const void* pvBuffer,
size_t pSize,
size_t pCount) = 0;
// -------------------------------------------------------------------
/** Set the read/write cursor of the file
/** @brief Set the read/write cursor of the file
*
* See fseek() for more details
*/
// -------------------------------------------------------------------
virtual aiReturn Seek(
size_t pOffset,
virtual aiReturn Seek(size_t pOffset,
aiOrigin pOrigin) = 0;
// -------------------------------------------------------------------
/** Get the current position of the read/write cursor
/** @brief Get the current position of the read/write cursor
*
* See ftell() for more details
*/
// -------------------------------------------------------------------
virtual size_t Tell(void) const = 0;
virtual size_t Tell() const = 0;
// -------------------------------------------------------------------
/** Returns filesize
/** @brief Returns filesize
*
* Returns the filesize
* Returns the filesize.
*/
virtual size_t FileSize() const = 0;
// -------------------------------------------------------------------
virtual size_t FileSize() const = 0;
};
// ----------------------------------------------------------------------------
/** @brief Flush the contents of the file buffer (for writers)
*
* See fflush() for more details.
*/
virtual void Flush() = 0;
}; //! class IOStream
// ----------------------------------------------------------------------------------
inline IOStream::IOStream()
{
// empty
}
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------------
inline IOStream::~IOStream()
{
// empty
}
// ----------------------------------------------------------------------------
} //!ns Assimp
// ----------------------------------------------------------------------------------
} //!namespace Assimp
#endif //!!AI_IOSTREAM_H_INC

View File

@ -1,25 +1,65 @@
/** @file Filesystem wrapper for C++. Inherit this class to supply custom file handling
* logic to the Import library.
/*
---------------------------------------------------------------------------
Open Asset Import Library (ASSIMP)
---------------------------------------------------------------------------
Copyright (c) 2006-2008, ASSIMP Development 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 Development 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 Filesystem wrapper for C++. Inherit this class to supply
* custom file handling logic to the Import library.
*/
#ifndef AI_IOSYSTEM_H_INC
#define AI_IOSYSTEM_H_INC
#ifndef __cplusplus
#error This header requires C++ to be used.
# error This header requires C++ to be used. aiFileIO.h is the \
corresponding C interface.
#endif
#include <string>
#include "aiDefines.h"
namespace Assimp
{
#include "aiTypes.h"
namespace Assimp {
class IOStream;
// ---------------------------------------------------------------------------
/** Interface to the file system.
/** @class IOSystem
* @brief Interface to the file system.
*
* Derive an own implementation from this interface to supply custom file handling
* to the importer library. If you implement this interface, you also want to
@ -28,8 +68,8 @@ class IOStream;
class ASSIMP_API IOSystem
{
public:
/** Constructor. Create an instance of your derived class and assign it to
* the #Importer instance by calling Importer::SetIOHandler().
/** @brief Constructor. Create an instance of your derived class and
* assign it to a #Importer instance by calling Importer::SetIOHandler().
*/
IOSystem();
@ -37,7 +77,7 @@ public:
virtual ~IOSystem();
// -------------------------------------------------------------------
/** Tests for the existence of a file at the given path.
/** @brief Tests for the existence of a file at the given path.
*
* @param pFile Path to the file
* @return true if there is a file with this path, else false.
@ -45,14 +85,16 @@ public:
virtual bool Exists( const std::string& pFile) const = 0;
// -------------------------------------------------------------------
/** Returns the system specific directory separator
/** @brief Returns the system specific directory separator
* @return System specific directory separator
*/
virtual std::string getOsSeparator() const = 0;
// -------------------------------------------------------------------
/** Open a new file with a given path. When the access to the file
* is finished, call Close() to release all associated resources.
/** @brief Open a new file with a given path.
*
* When the access to the file is finished, call Close() to release
* all associated resources.
*
* @param pFile Path to the file
* @param pMode Desired file I/O mode. Required are: "wb", "w", "wt",
@ -68,17 +110,20 @@ public:
const std::string& pMode = std::string("rb")) = 0;
// -------------------------------------------------------------------
/** Closes the given file and releases all resources associated with it.
* @param pFile The file instance previously created by Open().
/** @brief Closes the given file and releases all resources associated with it.
* @param pFile The file instance previously created by Open().
*/
virtual void Close( IOStream* pFile) = 0;
// -------------------------------------------------------------------
/** Compares two paths and check whether the point to identical files.
/** @brief Compares two paths and check whether the point to
* identical files.
*
* The dummy implementation of this virtual performs a
* case-insensitive comparison of the absolute path strings.
* case-insensitive comparison of the given strings. The default IO
* system implementation uses OS mechanisms to convert relative into
* absolute paths, so the result can be trusted.
* @param one First file
* @param second Second file
* @return true if the paths point to the same file. The file needn't

View File

@ -1,15 +1,83 @@
#ifndef AI_LOGSTREAM_H_INC
#define AI_LOGSTREAM_H_INC
/*
Open Asset Import Library (ASSIMP)
----------------------------------------------------------------------
#include <string>
Copyright (c) 2006-2008, ASSIMP Development Team
All rights reserved.
namespace Assimp
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 Development 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 Abstract base class 'LogStream', representing an output log stream.
*/
#ifndef INCLUDED_AI_LOGSTREAM_H
#define INCLUDED_AI_LOGSTREAM_H
#include "aiTypes.h"
namespace Assimp {
class IOSystem;
// ------------------------------------------------------------------------------------
/** @enum DefaultLogStreams
* @brief Enumerates default log streams supported by DefaultLogger
*
* These streams can be allocated using LogStream::createDefaultStream.
*/
enum DefaultLogStreams
{
// ---------------------------------------------------------------------------
// Stream the log to a file
DLS_FILE = 0x1,
// Stream the log to std::cout
DLS_COUT = 0x2,
// Stream the log to std::cerr
DLS_CERR = 0x4,
// MSVC only: Stream the log the the debugger
DLS_DEBUGGER = 0x8
};
// ------------------------------------------------------------------------------------
/** @class LogStream
* @brief Abstract interface for log stream implementations.
*
* Several default implementations are provided, see DefaultLogStreams for more
* details. In most cases it shouldn't be necessary to write a custom log stream.
*/
class ASSIMP_API LogStream
class ASSIMP_API LogStream : public Intern::AllocateFromAssimpHeap
{
protected:
/** @brief Default constructor */
@ -19,26 +87,38 @@ public:
/** @brief Virtual destructor */
virtual ~LogStream();
/** @brief Overwrite this for your own output methods */
/** @brief Overwrite this for your own output methods
* @param message Message to be written
*/
virtual void write(const std::string &message) = 0;
/** @brief Creates a default log stream
* @param streams Type of the default stream
* @param name For DLS_FILE: name of the output file
* @param io For DLS_FILE: IOSystem to be used to open the output file.
* Pass NULL for the default implementation.
* @return New LogStream instance - you're resposible for it's destruction!
*/
static LogStream* createDefaultStream(DefaultLogStreams streams,
const std::string& name = "AssimpLog.txt",
IOSystem* io = NULL);
};
// ---------------------------------------------------------------------------
// ------------------------------------------------------------------------------------
// Default constructor
inline LogStream::LogStream()
{
// empty
}
// ---------------------------------------------------------------------------
// ------------------------------------------------------------------------------------
// Virtual destructor
inline LogStream::~LogStream()
{
// empty
}
// ---------------------------------------------------------------------------
// ------------------------------------------------------------------------------------
} // Namespace Assimp
#endif

View File

@ -38,35 +38,43 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
----------------------------------------------------------------------
*/
#ifndef AI_LOGGER_H_INC
#define AI_LOGGER_H_INC
/** @file Abstract base class 'Logger', base of the logging system.
*/
#include <string>
#include "aiDefines.h"
#ifndef INCLUDED_AI_LOGGER_H
#define INCLUDED_AI_LOGGER_H
namespace Assimp
{
#include "aiTypes.h"
namespace Assimp {
class LogStream;
// ---------------------------------------------------------------------------
// ----------------------------------------------------------------------------------
/** @class Logger
* @brief Abstract interface for logger implementations.
* Assimp provides a default implementation ('DefaultLogger').
*/
class ASSIMP_API Logger
class ASSIMP_API Logger : public Intern::AllocateFromAssimpHeap
{
public:
/** @enum LogSeverity
* @brief Log severity to descripe granuality of logging.
* @brief Log severity to descripe the granularity of logging.
*
* This is a general property of a Logger instance, NORMAL means
* that debug messages are rejected immediately.
*/
enum LogSeverity
{
NORMAL, //!< Normal granlality of logging
NORMAL, //!< Normal granularity of logging
VERBOSE //!< Debug infos will be logged, too
};
/** @enum ErrorSeverity
* @brief Description for severity of a log message
* @brief Description for severity of a log message.
*
* Every LogStream has a bitwide combination of these flags.
* A LogStream doesn't receive any messages of a specific type
* if it doesn't specify the corresponding ErrorSeverity flag.
*/
enum ErrorSeverity
{
@ -106,34 +114,50 @@ public:
virtual void setLogSeverity(LogSeverity log_severity) = 0;
/** @brief Attach a new logstream
* @param pStream Logstream to attach
*
* The logger takes ownership of the stream and is resposible
* for its destruction (which is done when the logger itself
* is destroyed). Call detachStream to detach a stream and to
* gain ownership of it again.
* @param pStream Logstream to attach
* @param severity Message filter, specified which types of log
* messages are dispatched to the stream. Provide a bitwise
* combination of the ErrorSeverity flags.
*/
virtual void attachStream(LogStream *pStream, unsigned int severity) = 0;
virtual void attachStream(LogStream *pStream,
unsigned int severity = DEBUGGING | ERR | WARN | INFO) = 0;
/** @brief Detach a still attached stream from logger
* @param pStream Logstream instance for detatching
/** @brief Detach a still attached stream from the logger (or
* modifiy the filter flags bits)
* @param pStream Logstream instance for detatching
* @param severity Provide a bitwise combination of the ErrorSeverity
* flags. This value is &~ed with the current flags of the stream,
* if the result is 0 the stream is detached from the Logger and
* the caller retakes the possession of the stream.
*/
virtual void detatchStream(LogStream *pStream, unsigned int severity) = 0;
virtual void detatchStream(LogStream *pStream,
unsigned int severity = DEBUGGING | ERR | WARN | INFO) = 0;
protected:
/** @brief Default constructor */
Logger();
};
// ---------------------------------------------------------------------------
// ----------------------------------------------------------------------------------
// Default constructor
inline Logger::Logger()
{
// empty
}
// ---------------------------------------------------------------------------
// ----------------------------------------------------------------------------------
// Virtual destructor
inline Logger::~Logger()
{
// empty
}
// ---------------------------------------------------------------------------
// ----------------------------------------------------------------------------------
} // Namespace Assimp
#endif
#endif // !! INCLUDED_AI_LOGGER_H

View File

@ -124,7 +124,7 @@ enum aiAnimBehaviour
*/
aiAnimBehaviour_DEFAULT = 0x0,
/** The nearest key is used
/** The nearest key value is used without interpolation
*/
aiAnimBehaviour_CONSTANT = 0x1,
@ -208,17 +208,17 @@ struct aiNodeAnim
* key is encountered.
*
* The default value is aiAnimBehaviour_DEFAULT (the original
* transformation matrix of the affacted node is taken).
* transformation matrix of the affected node is used).
*/
aiAnimBehaviour mPreState;
C_ENUM aiAnimBehaviour mPreState;
/** Defines how the animation behaves after the last
* kway was encountered.
* kway was processed.
*
* The default value is aiAnimBehaviour_DEFAULT (the original
* transformation matrix of the affacted node is taken).
* transformation matrix of the affected node is taken).
*/
aiAnimBehaviour mPostState;
C_ENUM aiAnimBehaviour mPostState;
#ifdef __cplusplus
aiNodeAnim()

View File

@ -71,14 +71,14 @@ struct aiCamera
* This node specifies the position of the camera in the scene
* hierarchy and can be animated.
*/
aiString mName;
C_STRUCT aiString mName;
/** Position of the camera relative to the coordinate space
* defined by the corresponding node.
*
* The default value is 0|0|0.
*/
aiVector3D mPosition;
C_STRUCT aiVector3D mPosition;
/** 'Up' - vector of the camera coordinate system relative to
@ -89,7 +89,7 @@ struct aiCamera
* The default value is 0|1|0. The vector
* may be normalized, but it needn't.
*/
aiVector3D mUp;
C_STRUCT aiVector3D mUp;
/** 'LookAt' - vector of the camera coordinate system relative to
@ -99,7 +99,7 @@ struct aiCamera
* The default value is 0|0|1. The vector
* may be normalized, but it needn't.
*/
aiVector3D mLookAt;
C_STRUCT aiVector3D mLookAt;
/** Half horizontal field of view angle, in radians.
@ -146,8 +146,7 @@ struct aiCamera
, mClipPlaneNear (0.1f)
, mClipPlaneFar (1000.f)
, mAspect (0.f)
{
}
{}
#endif
};

View File

@ -39,28 +39,26 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
---------------------------------------------------------------------------
*/
/** Assimo build configuration setup. See the notes in the comment
* blocks to find out how you can customize the Assimp build
/** Assimp build configuration setup. See the notes in the comment
* blocks to find out how you can customize your Assimp build.
*/
#ifndef AI_DEFINES_H_INC
#define AI_DEFINES_H_INC
#ifndef INCLUDED_AI_DEFINES_H
#define INCLUDED_AI_DEFINES_H
// ************************************************************
// ================================================================
// Define ASSIMP_BUILD_NO_XX_IMPORTER to disable a specific
// file format loader. The loader is be excluded from the
// build in this case. 'XX' stands for the most common file
// extension of the file format. E.g.:
// ASSIMP_BUILD_NO_X_IMPORTER disables the X loader.
// ************************************************************
// ================================================================
// ************************************************************
// ================================================================
// Define ASSIMP_BUILD_NO_XX_PROCESS to disable a specific
// post-processing step. The spe will be excluded from the
// build in this case. 'XX' stands for the name of the loader.
// Name list:
//
// List of defines:
// CALCTANGENTS
// JOINVERTICES
// CONVERTTOLH
@ -80,59 +78,59 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// FINDINVALIDDATA
// TRANSFORMTEXCOORDS
// GENUVCOORDS
// ************************************************************
// ================================================================
// ************************************************************
// Define AI_C_THREADSAFE if you want a thread-safe C-API
// This feature requires boost.
// ************************************************************
// compiler specific includes and definitions
// Compiler specific includes and definitions
#if (defined _MSC_VER)
# undef ASSIMP_API
// ************************************************************
// Include our workaround stdint.h - VC doesn't have one
# include "./../include/Compiler/pstdint.h"
// If we have at least VC8 some C string manipulation functions
// are mapped to their safe _s counterparts (e.g. _itoa_s).
#if _MSC_VER >= 1400 && !(defined _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES) \
&& (defined ASSIMP_INTERNAL_BUILD)
# define _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES 1
#endif
// ================================================================
// Define ASSIMP_BUILD_DLL_EXPORT to build a DLL of the library
// ************************************************************
// ================================================================
# if (defined ASSIMP_BUILD_DLL_EXPORT)
# if (defined ASSIMP_API)
# error ASSIMP_API is defined, although it shouldn't
# endif
# define ASSIMP_API __declspec(dllexport)
# pragma warning (disable : 4251)
// ************************************************************
// ================================================================
// Define ASSIMP_DLL before including Assimp to use ASSIMP in
// an external DLL (otherwise a static library is used)
// ************************************************************
// ================================================================
# elif (defined ASSIMP_DLL)
# define ASSIMP_API __declspec(dllimport)
# else
# define ASSIMP_API
# endif
// Force the compiler to inline a function, if supported
# define AI_FORCE_INLINE __forceinline
#else
# define ASSIMP_API
# define AI_FORCE_INLINE inline
#endif // (defined _MSC_VER)
#ifdef __cplusplus
// No explicit 'struct' and 'enum' tags for C++, we don't want to
// confuse the AI of our IDE.
# define C_STRUCT
# define C_ENUM
#else
// ************************************************************
// ================================================================
// To build the documentation, make sure ASSIMP_DOXYGEN_BUILD
// is defined by Doxygen's preprocessor. The corresponding
// entries in the DoxyFile look like this:
// ************************************************************
// ================================================================
#if 0
ENABLE_PREPROCESSING = YES
MACRO_EXPANSION = YES
@ -141,59 +139,86 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
INCLUDE_PATH =
INCLUDE_FILE_PATTERNS =
PREDEFINED = ASSIMP_DOXYGEN_BUILD=1
EXPAND_AS_DEFINED = C_STRUCT
EXPAND_AS_DEFINED = C_STRUCT C_ENUM
SKIP_FUNCTION_MACROS = YES
#endif
// ************************************************************
// ================================================================
// Doxygen gets confused if we use c-struct typedefs to avoid
// the explicit 'struct' notation. This trick here has the same
// effect as the TYPEDEF_HIDES_STRUCT option, but we don't need
// to typedef all structs/enums.
// ================================================================
# if (defined ASSIMP_DOXYGEN_BUILD)
# define C_STRUCT
# define C_STRUCT
# define C_ENUM
# else
# define C_STRUCT struct
# define C_ENUM enum
# endif
#endif
#if (defined(__BORLANDC__) || defined (__BCPLUSPLUS__))
// "W8059 Packgröße der Struktur geändert"
// TODO: find a way to deactivate this warning automatically
// maybe there is a pragma to do exactly this?
#endif
// include our workaround stdint.h from the C98 standard to make
// sure the types it declares are consistently available
#include "./../include/Compiler/pstdint.h"
// ************************************************************
// ================================================================
// Define ASSIMP_BUILD_BOOST_WORKAROUND to compile assimp
// without boost. This is done by using a few workaround
// classes. However, some assimp features are not available
// in this case.
// ************************************************************
// in this case. This implies the ASSIMP_BUILD_SINGLETHREADED option.
// ================================================================
#ifdef ASSIMP_BUILD_BOOST_WORKAROUND
// threading support in the C-API requires boost
# ifdef AI_C_THREADSAFE
# error Unable to activate C-API threading support. Boost is required for this.
# endif
// threading support requires boost
#ifndef ASSIMP_BUILD_SINGLETHREADED
# define ASSIMP_BUILD_SINGLETHREADED
#endif
#endif
// helper macro that sets a pointer to NULL in debug builds
#if (!defined AI_DEBUG_INVALIDATE_PTR)
# if (defined _DEBUG)
# define AI_DEBUG_INVALIDATE_PTR(x) x = NULL;
# else
# define AI_DEBUG_INVALIDATE_PTR(x)
# endif
#endif
// ================================================================
// Define ASSIMP_BUILD_SINGLETHREADED to compile assimp
// without threading support. The library doesn't utilize
// threads then, and is itself not threadsafe.
// If this flag is specified, boost::threads is *not* required.
// ================================================================
// TODO
#ifndef ASSIMP_BUILD_SINGLETHREADED
# define ASSIMP_BUILD_SINGLETHREADED
#endif
#ifndef ASSIMP_BUILD_SINGLETHREADED
# define AI_C_THREADSAFE
#endif // !! ASSIMP_BUILD_SINGLETHREADED
// Make sure NULL is defined
#ifndef NULL
# define NULL 0
#endif
// Undefine the min/max macros defined by some platform headers
#undef min
#undef max
// Concatenate two tokens after evaluating them
#define AI_CONCAT(a,b) a ## b
// Helper macro that sets a pointer to NULL in debug builds
#if (defined _DEBUG)
# define AI_DEBUG_INVALIDATE_PTR(x) x = NULL;
#else
# define AI_DEBUG_INVALIDATE_PTR(x)
#endif
// Use our own definition of PI here
#define AI_MATH_PI (3.1415926538)
#define AI_MATH_TWO_PI (AI_MATH_PI * 2.0)
#define AI_MATH_HALF_PI (AI_MATH_PI * 0.5)
// macrod to convert from radians to degrees and the reverse
// Tiny macro to convert from radians to degrees and the reverse
#define AI_DEG_TO_RAD(x) (x*0.0174532925f)
#define AI_RAD_TO_DEG(x) (x*57.2957795f)

View File

@ -51,35 +51,31 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
extern "C" {
#endif
struct aiFileIO;
struct aiFile;
typedef aiFile* (*aiFileOpenProc)(C_STRUCT aiFileIO*, const char*, const char*);
typedef void (*aiFileCloseProc)(C_STRUCT aiFileIO*, C_STRUCT aiFile*);
typedef size_t (*aiFileWriteProc)(C_STRUCT aiFile*, const char*, size_t, size_t);
typedef size_t (*aiFileReadProc)(C_STRUCT aiFile*, char*, size_t,size_t);
typedef size_t (*aiFileTellProc)(C_STRUCT aiFile*);
// ---------------------------------------------------------------------------
/** Define seek origins in fseek()-style.
*/
// ---------------------------------------------------------------------------
enum aiOrigin
{
aiOrigin_SET = 0x0, //!< Set position
aiOrigin_CUR = 0x1, //!< Current position
aiOrigin_END = 0x2 //!< End of file
};
// aiFile callbacks
typedef size_t (*aiFileWriteProc) (C_STRUCT aiFile*, const char*, size_t, size_t);
typedef size_t (*aiFileReadProc) (C_STRUCT aiFile*, char*, size_t,size_t);
typedef size_t (*aiFileTellProc) (C_STRUCT aiFile*);
typedef void (*aiFileFlushProc) (C_STRUCT aiFile*);
typedef aiReturn (*aiFileSeek)(aiFile*, size_t, aiOrigin);
// aiFileIO callbackss
typedef aiFile* (*aiFileOpenProc) (C_STRUCT aiFileIO*, const char*, const char*);
typedef void (*aiFileCloseProc) (C_STRUCT aiFileIO*, C_STRUCT aiFile*);
// represents user-defined data
typedef char* aiUserData;
// ---------------------------------------------------------------------------
/** Defines how C-Assimp accesses files. Provided are functions to open
* and close files.
// ----------------------------------------------------------------------------------
/** @class aiFileIO
* @brief Defines Assimp's way of accessing files.
*
* Provided are functions to open and close files. Supply a custom structure to
* the import function. If you don't, a default implementation is used. Use this
* to enable reading from other sources, such as ZIPs or memory locations.
*/
// ---------------------------------------------------------------------------
struct aiFileIO
{
//! Function used to open a new file
@ -92,13 +88,18 @@ struct aiFileIO
aiUserData UserData;
};
// ---------------------------------------------------------------------------
/** Data structure to wrap a set of fXXXX (e.g fopen) replacement functions
*
* The functions behave the same way as their appropriate fXXXX
* counterparts in the CRT.
*/
// ---------------------------------------------------------------------------
// ----------------------------------------------------------------------------------
/** @class aiFile
* @brief Represents a read/write file
*
* Actually, it is a data structure to wrap a set of fXXXX (e.g fopen)
* replacement functions
*
* The default implementation of the functions utilizes the fXXX functions from
* the CRT. However, you can supply a custom implementation to Assimp by
* also supplying a custom aiFileIO. Use this to enable reading from other sources,
* such as ZIPs or memory locations.
*/
struct aiFile
{
//! Function used to read from a file
@ -118,6 +119,9 @@ struct aiFile
//! of the file cursor (fseek())
aiFileSeek SeekProc;
//! Function used to flush the file contents
aiFileFlushProc FlushProc;
//! User-defined data
aiUserData UserData;
};

View File

@ -102,20 +102,20 @@ struct aiLight
* This node specifies the position of the light in the scene
* hierarchy and can be animated.
*/
aiString mName;
C_STRUCT aiString mName;
/** The type of the light source.
*
* aiLightSource_UNDEFINED is nto a valid value for this member.
*/
aiLightSourceType mType;
C_ENUM aiLightSourceType mType;
/** Position of the light source in space. Relative to the
* transformation of the node corresponding to the light.
*
* The position is undefined for directional lights.
*/
aiVector3D mPosition;
C_STRUCT aiVector3D mPosition;
/** Direction of the light source in space. Relative to the
* transformation of the node corresponding to the light.
@ -123,7 +123,7 @@ struct aiLight
* The direction is undefined for point lights. The vector
* may be normalized, but it needn't.
*/
aiVector3D mDirection;
C_STRUCT aiVector3D mDirection;
/** Constant light attenuation factor.
*
@ -164,7 +164,7 @@ struct aiLight
* material color to obtain the final color that contributes
* to the diffuse shading term.
*/
aiColor3D mColorDiffuse;
C_STRUCT aiColor3D mColorDiffuse;
/** Specular color of the light source
*
@ -172,7 +172,7 @@ struct aiLight
* material color to obtain the final color that contributes
* to the specular shading term.
*/
aiColor3D mColorSpecular;
C_STRUCT aiColor3D mColorSpecular;
/** Ambient color of the light source
*
@ -182,7 +182,7 @@ struct aiLight
* this value it, is just a remaining of the fixed-function pipeline
* that is still supported by quite many file formats.
*/
aiColor3D mColorAmbient;
C_STRUCT aiColor3D mColorAmbient;
/** Inner angle of a spot light's light cone.
*

View File

@ -52,42 +52,68 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
extern "C" {
#endif
// Default material name
// Name for the default material
#define AI_DEFAULT_MATERIAL_NAME "aiDefaultMat"
// ---------------------------------------------------------------------------
/** Defines type identifiers for use within the material system.
*
*/
/** @brief A very primitive RTTI system to store the data type of a
* material property.
*/
enum aiPropertyTypeInfo
{
/** Array of single-precision floats
/** Array of single-precision (32 Bit) floats
*
* It is possibe to use aiGetMaterialInteger[Array]() (or the C++-API
* aiMaterial::Get()) to query properties stored in floating-point format.
* The material system performs the type conversion automatically.
*/
aiPTI_Float = 0x1,
aiPTI_Float = 0x1,
/** aiString data structure
/** The material property is an aiString.
*
* Arrays of strings aren't possible, aiGetMaterialString() (or the
* C++-API aiMaterial::Get()) *must* be used to query a string property.
*/
aiPTI_String = 0x3,
aiPTI_String = 0x3,
/** Array of Integers
/** Array of (32 Bit) integers
*
* It is possibe to use aiGetMaterialFloat[Array]() (or the C++-API
* aiMaterial::Get()) to query properties stored in integer format.
* The material system performs the type conversion automatically.
*/
aiPTI_Integer = 0x4,
/** Simple binary buffer
*/
aiPTI_Buffer = 0x5,
/** Simple binary buffer, content undefined. Not convertible to anything.
*/
aiPTI_Buffer = 0x5,
/** This value is not used. It is just there to force the
* compiler to map this enum to a 32 Bit integer.
*/
_aiPTI_Force32Bit = 0x9fffffff
};
}; //! enum aiPropertyTypeInfo
// ---------------------------------------------------------------------------
/** Defines how the Nth texture is combined with all previous textures.
*
*/
/** @brief Defines how the Nth texture is combined with the N-1th texture.
*
* Example (left: key, right: value): <br>
* @code
* DiffColor0 - gray
* DiffTextureOp0 - aiTextureOpMultiply
* DiffTexture0 - tex1.png
* DiffTextureOp0 - aiTextureOpAdd
* DiffTexture1 - tex2.png
* @endcode
* Written as equation, the final diffuse term for a specific pixel would be:
* @code
* diffFinal = DiffColor0 * sampleTex(DiffTexture0,UV0) +
* sampleTex(DiffTexture1,UV0) * diffContrib;
* @endcode
* where 'diffContrib' is the intensity of the incoming light for that pixel.
*/
enum aiTextureOp
{
/** T = T1 * T2
@ -119,11 +145,12 @@ enum aiTextureOp
* compiler to map this enum to a 32 Bit integer.
*/
_aiTextureOp_Force32Bit = 0x9fffffff
};
}; //! enum aiTextureOp
// ---------------------------------------------------------------------------
/** Defines how UV coordinates beyond the valid range are handled.
*/
/** @brief Defines how UV coordinates outside the [0...1] range are handled.
*
*/
enum aiTextureMapMode
{
/** A texture coordinate u|v is translated to u%1|v%1
@ -146,17 +173,21 @@ enum aiTextureMapMode
aiTextureMapMode_Mirror = 0x2,
/** This value is not used. It is just there to force the
/** This value is not used. It is just here to force the
* compiler to map this enum to a 32 Bit integer.
*/
_aiTextureMapMode_Force32Bit = 0x9fffffff
};
}; //! enum aiTextureMapMode
// ---------------------------------------------------------------------------
/** Defines how the mapping coords for a texture are generated.
*
* See the AI_MATKEY_MAPPING property for more details
*/
/** @brief Defines how the mapping coords for a texture are generated.
*
* Realtime applications typically require full UV coordinates, so the use of
* the aiProcess_GenUVCoords step is highly recommended. It generates proper
* UV channels for non-UV mapped objects, as long as an accurate description
* how the mapping should look like (e.g spherical) is given.
* See the AI_MATKEY_MAPPING property for more details.
*/
enum aiTextureMapping
{
/** The mapping coordinates are taken from an UV channel.
@ -187,14 +218,14 @@ enum aiTextureMapping
aiTextureMapping_OTHER = 0x5,
/** This value is not used. It is just there to force the
/** This value is not used. It is just here to force the
* compiler to map this enum to a 32 Bit integer.
*/
_aiTextureMapping_Force32Bit = 0x9fffffff
};
}; //! enum aiTextureMapping
// ---------------------------------------------------------------------------
/** Defines which mesh axes are used to construct the projection shape
/** @brief Defines which mesh axes are used to construct the projection shape
* for non-UV mappings around the model.
*
* This corresponds to the AI_MATKEY_TEXMAP_AXIS property.
@ -206,11 +237,11 @@ enum aiAxis
aiAxis_Z = 0x2,
/** This value is not used. It is just there to force the
/** This value is not used. It is just here to force the
* compiler to map this enum to a 32 Bit integer.
*/
_aiAxis_Force32Bit = 0x9fffffff
};
}; //! enum aiAxis
// ---------------------------------------------------------------------------
/** Defines the purpose of a texture
@ -267,21 +298,21 @@ enum aiTextureType
aiTextureType_OPACITY = 0x7,
/** This value is not used. It is just there to force the
/** This value is not used. It is just here to force the
* compiler to map this enum to a 32 Bit integer.
*/
_aiTextureType_Force32Bit = 0x9fffffff
};
}; //! enum aiTextureType
// ---------------------------------------------------------------------------
/** Defines all shading models supported by the library
*
* @note The list of shading modes has been taken from Blender3D.
* See Blender3D documentation for more information. The API does
* not distinguish between "specular" and "diffuse" shaders (thus the
* specular term for diffuse shading models like Oren-Nayar remains
* undefined)
*/
/** @brief Defines all shading models supported by the library
*
* @note The list of shading modes has been taken from Blender3D.
* See Blender3D documentation for more information. The API does
* not distinguish between "specular" and "diffuse" shaders (thus the
* specular term for diffuse shading models like Oren-Nayar remains
* undefined)
*/
enum aiShadingMode
{
/** Flat shading. Shading is done on per-face base,
@ -347,25 +378,29 @@ enum aiShadingMode
* compiler to map this enum to a 32 Bit integer.
*/
_aiShadingMode_Force32Bit = 0x9fffffff
};
}; //! enum aiShadingMode
#include "./Compiler/pushpack1.h"
// ---------------------------------------------------------------------------
/** Defines how an UV channel is transformed.
*
* This is just a helper structure for the AI_MATKEY_UVTRANSFORM key.
* See its documentation for more details.
*/
/** @brief Defines how an UV channel is transformed.
*
* This is just a helper structure for the AI_MATKEY_UVTRANSFORM key.
* See its documentation for more details.
*
* Typically you'll want to build a matrix of this information. However,
* we keep separate scaling/translation/rotation values to make it
* easier to process and optimize UV transformations internally.
*/
struct aiUVTransform
{
/** Translation on the u and v axes.
*/
aiVector2D mTranslation;
C_STRUCT aiVector2D mTranslation;
/** Scaling on the u and v axes.
*/
aiVector2D mScaling;
C_STRUCT aiVector2D mScaling;
/** Rotation - in counter-clockwise direction.
*
@ -376,25 +411,22 @@ struct aiUVTransform
#ifdef __cplusplus
aiUVTransform()
: mScaling (1.f,1.f)
, mRotation (0.f)
{
// nothing to be done here ...
}
#endif
} PACK_STRUCT;
} PACK_STRUCT; //! struct aiUVTransform
#include "./Compiler/poppack1.h"
// ---------------------------------------------------------------------------
/** Data structure for a single property inside a material
*
* @see aiMaterial
*/
/** @brief Data structure for a single material property
* @see aiMaterial
*/
struct aiMaterialProperty
{
/** Specifies the name of the property (key)
@ -424,7 +456,7 @@ struct aiMaterialProperty
* data buffer. This is used by the library
* internally to perform debug checks.
*/
aiPropertyTypeInfo mType;
C_ENUM aiPropertyTypeInfo mType;
/** Binary buffer to hold the property's value
*
@ -449,32 +481,35 @@ struct aiMaterialProperty
}
#endif
};
}; //! struct aiMaterialProperty
#ifdef __cplusplus
} // need to end extern C block to allow template member functions
} // We need to leave the "C" block here to allow template member functions
#endif
// ---------------------------------------------------------------------------
/** Data structure for a material
/** @brief Data structure for a material
*
* Material data is stored using a key-value structure, called property
* (to guarant that the system is maximally flexible).
* The library defines a set of standard keys (AI_MATKEY) which should be
* enough for nearly all purposes.
* Material data is stored using a key-value structure. A single key-value
* pair is called a 'material property'. C++ users should use the provided
* member functions of aiMaterial to process material properties, C users
* have to stick with the aiMaterialGetXXX family of unbound functions.
* The library defines a set of standard keys (AI_MATKEY_XXX).
*/
struct ASSIMP_API aiMaterial
{
#ifdef __cplusplus
protected:
aiMaterial() {}
// NOTE: no initialization, instance Assimp::MaterialHelper instead
aiMaterial() {}
public:
~aiMaterial();
// -------------------------------------------------------------------
/** Retrieve an array of Type values with a specific key
/** @brief Retrieve an array of Type values with a specific key
* from the material
*
* @param pKey Key to search for. One of the AI_MATKEY_XXX constants.
@ -484,68 +519,69 @@ public:
* NULL is a valid value for this parameter.
*/
template <typename Type>
inline aiReturn Get(const char* pKey,unsigned int type,
unsigned int idx, Type* pOut, unsigned int* pMax);
aiReturn Get(const char* pKey,unsigned int type,
unsigned int idx, Type* pOut, unsigned int* pMax) const;
// -------------------------------------------------------------------
/** Retrieve a Type value with a specific key
/** @brief Retrieve a Type value with a specific key
* from the material
*
* @param pKey Key to search for. One of the AI_MATKEY_XXX constants.
* @param pOut Reference to receive the output value
*/
template <typename Type>
inline aiReturn Get(const char* pKey,unsigned int type,
unsigned int idx,Type& pOut);
aiReturn Get(const char* pKey,unsigned int type,
unsigned int idx,Type& pOut) const;
// -------------------------------------------------------------------
/** Helper function to get a texture from a material structure.
/** @brief Helper function to get a texture from a material.
*
* This function is provided just for convinience.
* @param mat Pointer to the input material. May not be NULL
* @param index Index of the texture to retrieve. If the index is too
* large the function fails.
* @param type Specifies the type of the texture to retrieve (e.g. diffuse,
* specular, height map ...)
* @param path Receives the output path
* NULL is no allowed as value
* This function is provided just for convinience, you could also
* read the single material properties manually.
* @param type Specifies the type of the texture to be retrieved (
* e.g. diffuse, specular, height map ...)
* @param index Index of the texture to be retrieved. The function fails
* if there is no texture of that type with this index.
* @param path Receives the path to the texture.
* NULL is a valid value.
* @param uvindex Receives the UV index of the texture.
* NULL is allowed as value. The return value is
* NULL is a valid value.
* @param blend Receives the blend factor for the texture
* NULL is allowed as value.
* @param op Receives the texture operation to perform between
* this texture and the previous texture. NULL is allowed as value.
* NULL is a valid value.
* @param op Receives the texture operation to be performed between
* this texture and the previous texture. NULL is allowed as value.
* @param mapmode Receives the mapping modes to be used for the texture.
* The parameter may be NULL but if it is a valid pointer it MUST
* point to an array of 3 aiTextureMapMode variables (one for each
* axis: UVW order (=XYZ)).
* The parameter may be NULL but if it is a valid pointer it MUST
* point to an array of 3 aiTextureMapMode's (one for each
* axis: UVW order (=XYZ)).
*/
// -------------------------------------------------------------------
inline aiReturn GetTexture(aiTextureType type,
aiReturn GetTexture(aiTextureType type,
unsigned int index,
C_STRUCT aiString* path,
aiTextureMapping* mapping = NULL,
unsigned int* uvindex = NULL,
float* blend = NULL,
aiTextureOp* op = NULL,
aiTextureMapMode* mapmode = NULL);
aiTextureMapMode* mapmode = NULL) const;
#endif
/** List of all material properties loaded.
*/
/** List of all material properties loaded. */
C_STRUCT aiMaterialProperty** mProperties;
/** Number of properties loaded
*/
/** Number of properties in the data base */
unsigned int mNumProperties;
unsigned int mNumAllocated;
};
/** Storage allocated */
unsigned int mNumAllocated;
}; //! struct aiMaterial
// Go back to extern "C" again
#ifdef __cplusplus
extern "C" {
#endif
// ---------------------------------------------------------------------------
/** @def AI_MATKEY_NAME
* Defines the name of the material
@ -1041,7 +1077,7 @@ extern "C" {
// ---------------------------------------------------------------------------
/** Retrieve a material property with a specific key from the material
/** @brief Retrieve a material property with a specific key from the material
*
* @param pMat Pointer to the input material. May not be NULL
* @param pKey Key to search for. One of the AI_MATKEY_XXX constants.
@ -1049,15 +1085,16 @@ extern "C" {
* structure or NULL if the key has not been found.
*/
// ---------------------------------------------------------------------------
ASSIMP_API aiReturn aiGetMaterialProperty(const C_STRUCT aiMaterial* pMat,
ASSIMP_API C_ENUM aiReturn aiGetMaterialProperty(
const C_STRUCT aiMaterial* pMat,
const char* pKey,
aiTextureType type,
C_ENUM aiTextureType type,
unsigned int index,
const C_STRUCT aiMaterialProperty** pPropOut);
// ---------------------------------------------------------------------------
/** Retrieve an array of float values with a specific key
/** @brief Retrieve an array of float values with a specific key
* from the material
*
* Pass one of the AI_MATKEY_XXX constants for the last three parameters (the
@ -1084,7 +1121,8 @@ ASSIMP_API aiReturn aiGetMaterialProperty(const C_STRUCT aiMaterial* pMat,
* arrays remains unmodified and pMax is set to 0.
*/
// ---------------------------------------------------------------------------
ASSIMP_API aiReturn aiGetMaterialFloatArray(const C_STRUCT aiMaterial* pMat,
ASSIMP_API C_ENUM aiReturn aiGetMaterialFloatArray(
const C_STRUCT aiMaterial* pMat,
const char* pKey,
unsigned int type,
unsigned int index,
@ -1096,7 +1134,7 @@ ASSIMP_API aiReturn aiGetMaterialFloatArray(const C_STRUCT aiMaterial* pMat,
#ifdef __cplusplus
// ---------------------------------------------------------------------------
/** Retrieve a single float property with a specific key from the material.
/** @brief Retrieve a single float property with a specific key from the material.
*
* Pass one of the AI_MATKEY_XXX constants for the last three parameters (the
* example reads the AI_MATKEY_SPECULAR_STRENGTH property of the first diffuse texture)
@ -1116,7 +1154,7 @@ ASSIMP_API aiReturn aiGetMaterialFloatArray(const C_STRUCT aiMaterial* pMat,
* float remains unmodified.
*/
// ---------------------------------------------------------------------------
inline aiReturn aiGetMaterialFloat(const C_STRUCT aiMaterial* pMat,
inline aiReturn aiGetMaterialFloat(const aiMaterial* pMat,
const char* pKey,
unsigned int type,
unsigned int index,
@ -1135,13 +1173,13 @@ inline aiReturn aiGetMaterialFloat(const C_STRUCT aiMaterial* pMat,
// ---------------------------------------------------------------------------
/** Retrieve an array of integer values with a specific key
/** @brief Retrieve an array of integer values with a specific key
* from a material
*
* See the sample for aiGetMaterialFloatArray for more information.
*/
// ---------------------------------------------------------------------------
ASSIMP_API aiReturn aiGetMaterialIntegerArray(const C_STRUCT aiMaterial* pMat,
ASSIMP_API C_ENUM aiReturn aiGetMaterialIntegerArray(const C_STRUCT aiMaterial* pMat,
const char* pKey,
unsigned int type,
unsigned int index,
@ -1152,7 +1190,7 @@ ASSIMP_API aiReturn aiGetMaterialIntegerArray(const C_STRUCT aiMaterial* pMat,
#ifdef __cplusplus
// ---------------------------------------------------------------------------
/** Retrieve an integer property with a specific key from a material
/** @brief Retrieve an integer property with a specific key from a material
*
* See the sample for aiGetMaterialFloat for more information.
*/
@ -1177,33 +1215,33 @@ inline aiReturn aiGetMaterialInteger(const C_STRUCT aiMaterial* pMat,
// ---------------------------------------------------------------------------
/** Retrieve a color value from the material property table
/** @brief Retrieve a color value from the material property table
*
* See the sample for aiGetMaterialFloat for more information.
*/
// ---------------------------------------------------------------------------
ASSIMP_API aiReturn aiGetMaterialColor(const C_STRUCT aiMaterial* pMat,
ASSIMP_API C_ENUM aiReturn aiGetMaterialColor(const C_STRUCT aiMaterial* pMat,
const char* pKey,
unsigned int type,
unsigned int index,
aiColor4D* pOut);
C_STRUCT aiColor4D* pOut);
// ---------------------------------------------------------------------------
/** Retrieve a string from the material property table
/** @brief Retrieve a string from the material property table
*
* See the sample for aiGetMaterialFloat for more information.
*/
// ---------------------------------------------------------------------------
ASSIMP_API aiReturn aiGetMaterialString(const C_STRUCT aiMaterial* pMat,
ASSIMP_API C_ENUM aiReturn aiGetMaterialString(const C_STRUCT aiMaterial* pMat,
const char* pKey,
unsigned int type,
unsigned int index,
aiString* pOut);
C_STRUCT aiString* pOut);
// ---------------------------------------------------------------------------
/** Helper function to get a texture from a material structure.
/** @brief Helper function to get a texture from a material structure.
*
* This function is provided just for convinience.
* @param mat Pointer to the input material. May not be NULL
@ -1229,22 +1267,22 @@ ASSIMP_API aiReturn aiGetMaterialString(const C_STRUCT aiMaterial* pMat,
ASSIMP_API aiReturn aiGetMaterialTexture(const C_STRUCT aiMaterial* mat,
aiTextureType type,
unsigned int index,
C_STRUCT aiString* path,
aiString* path,
aiTextureMapping* mapping = NULL,
unsigned int* uvindex = NULL,
float* blend = NULL,
aiTextureOp* op = NULL,
aiTextureMapMode* mapmode = NULL);
#else
aiReturn aiGetMaterialTexture(const C_STRUCT aiMaterial* mat,
aiTextureType type,
C_ENUM aiReturn aiGetMaterialTexture(const C_STRUCT aiMaterial* mat,
C_ENUM aiTextureType type,
unsigned int index,
C_STRUCT aiString* path,
aiTextureMapping* mapping /*= NULL*/,
unsigned int* uvindex /*= NULL*/,
float* blend /*= NULL*/,
aiTextureOp* op /*= NULL*/,
aiTextureMapMode* mapmode /*= NULL*/);
C_ENUM aiTextureMapping* mapping /*= NULL*/,
unsigned int* uvindex /*= NULL*/,
float* blend /*= NULL*/,
C_ENUM aiTextureOp* op /*= NULL*/,
C_ENUM aiTextureMapMode* mapmode /*= NULL*/);
#endif // !#ifdef __cplusplus
#ifdef __cplusplus

View File

@ -54,16 +54,16 @@ inline aiReturn aiMaterial::GetTexture( aiTextureType type,
unsigned int* uvindex /*= NULL*/,
float* blend /*= NULL*/,
aiTextureOp* op /*= NULL*/,
aiTextureMapMode* mapmode /*= NULL*/)
aiTextureMapMode* mapmode /*= NULL*/) const
{
return aiGetMaterialTexture(this,type,idx,path,mapping,uvindex,blend,op,mapmode);
return ::aiGetMaterialTexture(this,type,idx,path,mapping,uvindex,blend,op,mapmode);
}
// ---------------------------------------------------------------------------
template <typename Type>
inline aiReturn aiMaterial::Get(const char* pKey,unsigned int type,
unsigned int idx, Type* pOut,
unsigned int* pMax)
unsigned int* pMax) const
{
unsigned int iNum = pMax ? *pMax : 1;
@ -71,8 +71,11 @@ inline aiReturn aiMaterial::Get(const char* pKey,unsigned int type,
aiReturn ret = aiGetMaterialProperty(this,pKey,type,idx,&prop);
if ( AI_SUCCESS == ret )
{
if (prop->mDataLength < sizeof(Type)*iNum)return AI_FAILURE;
if (strcmp(prop->mData,(char*)aiPTI_Buffer)!=0)return AI_FAILURE;
if (prop->mDataLength < sizeof(Type)*iNum)
return AI_FAILURE;
if (::strcmp(prop->mData,(char*)aiPTI_Buffer)!=0)
return AI_FAILURE;
iNum = std::min((size_t)iNum,prop->mDataLength / sizeof(Type));
::memcpy(pOut,prop->mData,iNum * sizeof(Type));
@ -84,14 +87,17 @@ inline aiReturn aiMaterial::Get(const char* pKey,unsigned int type,
// ---------------------------------------------------------------------------
template <typename Type>
inline aiReturn aiMaterial::Get(const char* pKey,unsigned int type,
unsigned int idx,Type& pOut)
unsigned int idx,Type& pOut) const
{
aiMaterialProperty* prop;
aiReturn ret = aiGetMaterialProperty(this,pKey,type,idx,&prop);
if ( AI_SUCCESS == ret )
{
if (prop->mDataLength < sizeof(Type))return AI_FAILURE;
if (strcmp(prop->mData,(char*)aiPTI_Buffer)!=0)return AI_FAILURE;
if (prop->mDataLength < sizeof(Type))
return AI_FAILURE;
if (::strcmp(prop->mData,(char*)aiPTI_Buffer)!=0)
return AI_FAILURE;
::memcpy(&pOut,prop->mData,sizeof(Type));
}
@ -102,43 +108,43 @@ inline aiReturn aiMaterial::Get(const char* pKey,unsigned int type,
template <>
inline aiReturn aiMaterial::Get<float>(const char* pKey,unsigned int type,
unsigned int idx,float* pOut,
unsigned int* pMax)
unsigned int* pMax) const
{
return aiGetMaterialFloatArray(this,pKey,type,idx,pOut,pMax);
return ::aiGetMaterialFloatArray(this,pKey,type,idx,pOut,pMax);
}
// ---------------------------------------------------------------------------
template <>
inline aiReturn aiMaterial::Get<int>(const char* pKey,unsigned int type,
unsigned int idx,int* pOut,
unsigned int* pMax)
unsigned int* pMax) const
{
return aiGetMaterialIntegerArray(this,pKey,type,idx,pOut,pMax);
return ::aiGetMaterialIntegerArray(this,pKey,type,idx,pOut,pMax);
}
// ---------------------------------------------------------------------------
template <>
inline aiReturn aiMaterial::Get<float>(const char* pKey,unsigned int type,
unsigned int idx,float& pOut)
unsigned int idx,float& pOut) const
{
return aiGetMaterialFloat(this,pKey,type,idx,&pOut);
}
// ---------------------------------------------------------------------------
template <>
inline aiReturn aiMaterial::Get<int>(const char* pKey,unsigned int type,
unsigned int idx,int& pOut)
unsigned int idx,int& pOut) const
{
return aiGetMaterialInteger(this,pKey,type,idx,&pOut);
}
// ---------------------------------------------------------------------------
template <>
inline aiReturn aiMaterial::Get<aiColor4D>(const char* pKey,unsigned int type,
unsigned int idx,aiColor4D& pOut)
unsigned int idx,aiColor4D& pOut) const
{
return aiGetMaterialColor(this,pKey,type,idx,&pOut);
}
// ---------------------------------------------------------------------------
template <>
inline aiReturn aiMaterial::Get<aiString>(const char* pKey,unsigned int type,
unsigned int idx,aiString& pOut)
unsigned int idx,aiString& pOut) const
{
return aiGetMaterialString(this,pKey,type,idx,&pOut);
}

View File

@ -41,8 +41,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
/** @file Declares the data structures in which the imported geometry is
returned by ASSIMP: aiMesh, aiFace and aiBone data structures. */
#ifndef __AI_MESH_H_INC__
#define __AI_MESH_H_INC__
#ifndef INCLUDED_AI_MESH_H
#define INCLUDED_AI_MESH_H
#include "aiTypes.h"
@ -51,13 +51,23 @@ extern "C" {
#endif
// ---------------------------------------------------------------------------
/** A single face in a mesh, referring to multiple vertices.
*
* If mNumIndices is 3, the face is a triangle,
* for mNumIndices > 3 it's a polygon.
* Point and line primitives are rarely used and are NOT supported. However,
* a load could pass them as degenerated triangles.
*/
/** @brief A single face in a mesh, referring to multiple vertices.
*
* If mNumIndices is 3, the face is called 'triangle', for mNumIndices > 3
* it's called 'polygon' (hey, that's just a definition!).
* <br>
* aiMesh::mPrimitiveTypes can be queried to quickly examine which types of
* primitive are present in a mesh. The aiProcess_SortByPType flag executes
* a special post-processing step which splits meshes with *different*
* primitive types mixed up (e.g. lines and triangles) in several, 'clean'
* submeshes. Furthermore there is a configuration option,
* AI_CONFIG_PP_SBP_REMOVE, to force SortByPType to remove specific primitive
* types from the scene - completely. In most cases you'll propably want to
* set this config to
* @code
* aiPrimitiveType_LINE|aiPrimitiveType_POINT
* @endcode
*/
struct aiFace
{
//! Number of indices defining this face. 3 for a triangle, >3 for polygon
@ -93,10 +103,10 @@ struct aiFace
if (&o == this)
return *this;
delete mIndices;
delete[] mIndices;
mNumIndices = o.mNumIndices;
mIndices = new unsigned int[mNumIndices];
memcpy( mIndices, o.mIndices, mNumIndices * sizeof( unsigned int));
::memcpy( mIndices, o.mIndices, mNumIndices * sizeof( unsigned int));
return *this;
}
@ -104,11 +114,11 @@ struct aiFace
//! of two faces is identical
bool operator== (const aiFace& o) const
{
if (this->mIndices == o.mIndices)return true;
else if (this->mIndices && this->mNumIndices == o.mNumIndices)
if (mIndices == o.mIndices)return true;
else if (mIndices && mNumIndices == o.mNumIndices)
{
for (unsigned int i = 0;i < this->mNumIndices;++i)
if (this->mIndices[i] != o.mIndices[i])return false;
if (mIndices[i] != o.mIndices[i])return false;
return true;
}
return false;
@ -120,13 +130,12 @@ struct aiFace
{
return !(*this == o);
}
#endif // __cplusplus
};
}; //! struct aiFace
// ---------------------------------------------------------------------------
/** A single influence of a bone on a vertex.
/** @brief A single influence of a bone on a vertex.
*/
struct aiVertexWeight
{
@ -150,14 +159,16 @@ struct aiVertexWeight
{ /* nothing to do here */ }
#endif // __cplusplus
};
}; //! struct aiVertexWeight
// ---------------------------------------------------------------------------
/** A single bone of a mesh. A bone has a name by which it can be found
* in the frame hierarchy and by which it can be addressed by animations.
* In addition it has a number of influences on vertices.
*/
/** @brief A single bone of a mesh.
*
* A bone has a name by which it can be found in the frame hierarchy and by
* which it can be addressed by animations. In addition it has a number of
* influences on vertices.
*/
struct aiBone
{
//! The name of the bone.
@ -200,52 +211,47 @@ struct aiBone
delete [] mWeights;
}
#endif // __cplusplus
};
#if (!defined AI_MAX_NUMBER_OF_COLOR_SETS)
}; //! struct aiBone
#ifndef AI_MAX_NUMBER_OF_COLOR_SETS
// ---------------------------------------------------------------------------
/** Maximum number of vertex color sets per mesh.
*
* Normally: Diffuse, specular, ambient and emissive
* However one could use the vertex color sets for any other purpose, too.
*
* \note Some internal structures expect (and assert) this value
* to be at 4
*/
/** @def AI_MAX_NUMBER_OF_COLOR_SETS
* Maximum number of vertex color sets per mesh.
*
* Normally: Diffuse, specular, ambient and emissive
* However one could use the vertex color sets for any other purpose, too.
*
* @note Some internal structures expect (and assert) this value
* to be at least 4. For the moment it is absolutely safe to assume that
* this will never change.
*/
# define AI_MAX_NUMBER_OF_COLOR_SETS 0x4
#endif // !! AI_MAX_NUMBER_OF_COLOR_SETS
#if (!defined AI_MAX_NUMBER_OF_TEXTURECOORDS)
#ifndef AI_MAX_NUMBER_OF_TEXTURECOORDS
// ---------------------------------------------------------------------------
/** Maximum number of texture coord sets (UV(W) channels) per mesh
*
* The material system uses the AI_MATKEY_UVWSRC_XXX keys to specify
* which UVW channel serves as data source for a texture,
*
* \note Some internal structures expect (and assert) this value
* to be 4
/** @def AI_MAX_NUMBER_OF_TEXTURECOORDS
* Maximum number of texture coord sets (UV(W) channels) per mesh
*
* The material system uses the AI_MATKEY_UVWSRC_XXX keys to specify
* which UVW channel serves as data source for a texture.
*
* @note Some internal structures expect (and assert) this value
* to be at least 4. For the moment it is absolutely safe to assume that
* this will never change.
*/
# define AI_MAX_NUMBER_OF_TEXTURECOORDS 0x4
// NOTE (Aramis): If you change these values, make sure that you also
// change the corresponding values in all Assimp ports.
// **********************************************************
// Java: Mesh.java,
// Mesh.MAX_NUMBER_OF_TEXTURECOORDS
// Mesh.MAX_NUMBER_OF_COLOR_SETS
// **********************************************************
#endif // !! AI_MAX_NUMBER_OF_TEXTURECOORDS
// ---------------------------------------------------------------------------
/** Enumerates the types of geometric primitives supported by Assimp.
*/
/** @brief Enumerates the types of geometric primitives supported by Assimp.
*
* @see aiFace Face data structure
* @see aiProcess_SortByPType Per-primitive sorting of meshes
* @see aiProcess_Triangulate Automatic triangulation
* @see AI_CONFIG_PP_SBP_REMOVE Removal of specific primitive types.
*/
enum aiPrimitiveType
{
/** A point primitive.
@ -278,15 +284,18 @@ enum aiPrimitiveType
aiPrimitiveType_POLYGON = 0x8,
/** This value is not used. It is just there to force the
/** This value is not used. It is just here to force the
* compiler to map this enum to a 32 Bit integer.
*/
_aiPrimitiveType_Force32Bit = 0x9fffffff
};
}; //! enum aiPrimitiveType
// Get the #aiPrimitiveType flag for a specific number of face indices
#define AI_PRIMITIVE_TYPE_FOR_N_INDICES(n) \
((n) > 3 ? aiPrimitiveType_POLYGON : (aiPrimitiveType)(1u << (n)-1))
// ---------------------------------------------------------------------------
/** A mesh represents a geometry or model with a single material.
/** @brief A mesh represents a geometry or model with a single material.
*
* It usually consists of a number of vertices and a series of primitives/faces
* referencing the vertices. In addition there might be a series of bones, each
@ -298,9 +307,11 @@ enum aiPrimitiveType
* test for the presence of various data streams.
*
* A Mesh uses only a single material which is referenced by a material ID.
* \note The mPositions member is not optional, although a Has()-Method is
* provided for it. However, positions *could* be missing if the
* AI_SCENE_FLAGS_INCOMPLETE flag is set in aiScene::mFlags.
* @note The mPositions member is usually not optional. However, vertex positions
* *could* be missing if the AI_SCENE_FLAGS_INCOMPLETE flag is set in
* @code
* aiScene::mFlags
* @endcode
*/
struct aiMesh
{
@ -463,30 +474,30 @@ struct aiMesh
}
//! Check whether the mesh contains positions. If no special scene flags
//! (such as AI_SCENE_FLAGS_ANIM_SKELETON_ONLY) are set this MUST
//! always return true
inline bool HasPositions() const
//! (such as AI_SCENE_FLAGS_ANIM_SKELETON_ONLY) are set this will
//! always return true
bool HasPositions() const
{ return mVertices != NULL && mNumVertices > 0; }
//! Check whether the mesh contains faces. If no special scene flags
//! are set this should always return true
inline bool HasFaces() const
bool HasFaces() const
{ return mFaces != NULL && mNumFaces > 0; }
//! Check whether the mesh contains normal vectors
inline bool HasNormals() const
bool HasNormals() const
{ return mNormals != NULL && mNumVertices > 0; }
//! Check whether the mesh contains tangent and bitangent vectors
//! It is not possible that it contains tangents and no bitangents
//! (or the other way round). The existence of one of them
//! implies that the second is there, too.
inline bool HasTangentsAndBitangents() const
bool HasTangentsAndBitangents() const
{ return mTangents != NULL && mBitangents != NULL && mNumVertices > 0; }
//! Check whether the mesh contains a vertex color set
//! \param pIndex Index of the vertex color set
inline bool HasVertexColors( unsigned int pIndex) const
bool HasVertexColors( unsigned int pIndex) const
{
if( pIndex >= AI_MAX_NUMBER_OF_COLOR_SETS)
return false;
@ -496,7 +507,7 @@ struct aiMesh
//! Check whether the mesh contains a texture coordinate set
//! \param pIndex Index of the texture coordinates set
inline bool HasTextureCoords( unsigned int pIndex) const
bool HasTextureCoords( unsigned int pIndex) const
{
if( pIndex >= AI_MAX_NUMBER_OF_TEXTURECOORDS)
return false;
@ -505,7 +516,7 @@ struct aiMesh
}
//! Get the number of UV channels the mesh contains
inline unsigned int GetNumUVChannels() const
unsigned int GetNumUVChannels() const
{
unsigned int n = 0;
while (n < AI_MAX_NUMBER_OF_TEXTURECOORDS && mTextureCoords[n])++n;
@ -513,7 +524,7 @@ struct aiMesh
}
//! Get the number of vertex color channels the mesh contains
inline unsigned int GetNumColorChannels() const
unsigned int GetNumColorChannels() const
{
unsigned int n = 0;
while (n < AI_MAX_NUMBER_OF_COLOR_SETS && mColors[n])++n;
@ -525,11 +536,10 @@ struct aiMesh
{ return mBones != NULL && mNumBones > 0; }
#endif // __cplusplus
};
}; //! struct aiMesh
#ifdef __cplusplus
}
#endif
#endif //! extern "C"
#endif // __AI_MESH_H_INC

View File

@ -75,7 +75,7 @@ struct aiNode
C_STRUCT aiString mName;
/** The transformation relative to the node's parent. */
aiMatrix4x4 mTransformation;
C_STRUCT aiMatrix4x4 mTransformation;
/** Parent node. NULL if this node is the root node. */
C_STRUCT aiNode* mParent;
@ -392,7 +392,7 @@ struct aiScene
};
#ifdef __cplusplus
}
} //! namespace Assimp
#endif
#endif // __AI_SCENE_H_INC__

View File

@ -57,14 +57,13 @@ extern "C" {
#endif
// ---------------------------------------------------------------------------
/** \def AI_MAKE_EMBEDDED_TEXNAME
// --------------------------------------------------------------------------------
/** @def AI_MAKE_EMBEDDED_TEXNAME
* Used to build the reserved path name used by the material system to
* reference textures that are embedded into their corresponding
* model files. The parameter specifies the index of the texture
* (zero-based, in the aiScene::mTextures array)
*/
// ---------------------------------------------------------------------------
#if (!defined AI_MAKE_EMBEDDED_TEXNAME)
# define AI_MAKE_EMBEDDED_TEXNAME(_n_) "*" # _n_
#endif
@ -72,12 +71,11 @@ extern "C" {
#include "./Compiler/pushpack1.h"
// ---------------------------------------------------------------------------
/** Helper structure to represent a texel in ARGB8888 format
// --------------------------------------------------------------------------------
/** @brief Helper structure to represent a texel in a ARGB8888 format
*
* Used by aiTexture
* Used by aiTexture.
*/
// ---------------------------------------------------------------------------
struct aiTexel
{
unsigned char b,g,r,a;
@ -87,28 +85,37 @@ struct aiTexel
bool operator== (const aiTexel& other) const
{
return b == other.b && r == other.r &&
g == other.g && a == other.a;
g == other.g && a == other.a;
}
//! Negative comparison operator
//! Inverse comparison operator
bool operator!= (const aiTexel& other) const
{
return b != other.b || r != other.r ||
g != other.g || a != other.a;
g != other.g || a != other.a;
}
//! Conversion to a floating-point 4d color
operator aiColor4D() const
{
return aiColor4D(r/255.f,g/255.f,b/255.f,a/255.f);
}
#endif // __cplusplus
} PACK_STRUCT;
} PACK_STRUCT; //! struct aiTexel
#include "./Compiler/poppack1.h"
// ---------------------------------------------------------------------------
// --------------------------------------------------------------------------------
/** Helper structure to describe an embedded texture
*
* Normally textures are contained in external files but some file formats
* do embedd them. Embedded
* embed them directly in the model file. There are two types of embedded
* textures: 1. Uncompressed textures. The color data is directly given.
* 2. Compressed textures stored in a file format like png or jpg. The raw
* file is given, the application must utilize an image decoder (e.g. DevIL)
* to get access to the color data.
*/
// ---------------------------------------------------------------------------
struct aiTexture
{
/** Width of the texture, in pixels
@ -122,7 +129,7 @@ struct aiTexture
/** Height of the texture, in pixels
*
* If this value is zero, pcData points to an compressed texture
* in an unknown format (e.g. JPEG).
* in any format (e.g. JPEG).
*/
unsigned int mHeight;
@ -130,10 +137,12 @@ struct aiTexture
* to determine the type of embedded compressed textures.
*
* If mHeight != 0 this member is undefined. Otherwise it
* will be set to '\0\0\0\0' if the loader has no additional
* is set set to '\0\0\0\0' if the loader has no additional
* information about the texture file format used OR the
* file extension of the format without a leading dot.
* E.g. 'dds\0', 'pcx\0'. All characters are lower-case.
* file extension of the format without a trailing dot. If there
* are multiple file extensions for a format, the shortest
* extension is choosen (JPEG maps to 'jpg', not to 'jpeg').
* E.g. 'dds\0', 'pcx\0', 'jpg'. All characters are lower-case.
*/
char achFormatHint[4];
@ -146,20 +155,29 @@ struct aiTexture
* buffer of size mWidth containing the compressed texture
* data. Good luck, have fun!
*/
aiTexel* pcData;
C_STRUCT aiTexel* pcData;
#ifdef __cplusplus
//! For compressed textures (mHeight == 0): compare the
//! format hint against a given string.
//! @param s Input string. 4 characters are maximally processed.
//! Example values: "jpg", "png"
//! @return true if the given string matches the fomat hint
bool CheckFormat(const char* s) const
{
ai_assert(s && !mHeight);
return (0 == ::strncmp(achFormatHint,s,4));
}
// Construction
aiTexture ()
: mWidth (0)
, mHeight (0)
, pcData (NULL)
{
achFormatHint[0] = 0;
achFormatHint[1] = 0;
achFormatHint[2] = 0;
achFormatHint[3] = 0;
achFormatHint[0] = achFormatHint[1] = 0;
achFormatHint[2] = achFormatHint[3] = 0;
}
// Destruction
@ -168,7 +186,7 @@ struct aiTexture
delete[] pcData;
}
#endif
};
}; //! struct aiTexture
#ifdef __cplusplus

View File

@ -42,23 +42,50 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef AI_TYPES_H_INC
#define AI_TYPES_H_INC
// Some CRT headers
#include <sys/types.h>
#include <memory.h>
#include <math.h>
#include <stddef.h>
// Our compile configuration
#include "aiDefines.h"
// include math helper classes
// Some types moved to separate header due to size of operators
#include "aiVector3D.h"
#include "aiVector2D.h"
#include "aiMatrix3x3.h"
#include "aiMatrix4x4.h"
#include "aiQuaternion.h"
#ifdef __cplusplus
# include <string>
# include <string> // for aiString::Set(const std::string&)
namespace Assimp {
namespace Intern {
// Internal helper class to utilize our internal new/delete routines
// for allocating object of this class. By doing this you can safely
// share class objects between Assimp and the application - it works
// even over DLL boundaries.
struct ASSIMP_API AllocateFromAssimpHeap {
// new/delete overload
void *operator new ( size_t num_bytes);
void operator delete ( void* data);
// array new/delete overload
void *operator new[] ( size_t num_bytes);
void operator delete[] ( void* data);
}; //! struct AllocateFromAssimpHeap
}; //! namespace Intern
}; //! namespace Assimp
extern "C" {
#endif
/** Maximum dimension for strings, ASSIMP strings are zero terminated */
/** Maximum dimension for strings, ASSIMP strings are zero terminated. */
#ifdef __cplusplus
const size_t MAXLEN = 1024;
#else
@ -67,8 +94,7 @@ const size_t MAXLEN = 1024;
#include "./Compiler/pushpack1.h"
// ---------------------------------------------------------------------------
// ----------------------------------------------------------------------------------
/** Represents a plane in a three-dimensional, euclidean space
*/
struct aiPlane
@ -84,10 +110,10 @@ struct aiPlane
//! Plane equation
float a,b,c,d;
} PACK_STRUCT;
} PACK_STRUCT; // !struct aiPlane
// ---------------------------------------------------------------------------
// ----------------------------------------------------------------------------------
/** Represents a ray
*/
struct aiRay
@ -102,14 +128,12 @@ struct aiRay
#endif // !__cplusplus
//! Position and direction of the ray
aiVector3D pos, dir;
} PACK_STRUCT;
C_STRUCT aiVector3D pos, dir;
} PACK_STRUCT; // !struct aiRay
// aiVector3D type moved to separate header due to size of operators
// aiQuaternion type moved to separate header due to size of operators
// aiMatrix4x4 type moved to separate header due to size of operators
// ---------------------------------------------------------------------------
// ----------------------------------------------------------------------------------
/** Represents a color in Red-Green-Blue space.
*/
struct aiColor3D
@ -119,26 +143,43 @@ struct aiColor3D
aiColor3D (float _r, float _g, float _b) : r(_r), g(_g), b(_b) {}
aiColor3D (const aiColor3D& o) : r(o.r), g(o.g), b(o.b) {}
// Component-wise comparison
// TODO: add epsilon?
bool operator == (const aiColor3D& other) const
{return r == other.r && g == other.g && b == other.b;}
// Component-wise inverse comparison
// TODO: add epsilon?
bool operator != (const aiColor3D& other) const
{return r != other.r || g != other.g || b != other.b;}
aiColor3D operator+(const aiColor3D& c) const
{return aiColor3D(r+c.r,g+c.g,b+c.b);}
aiColor3D operator-(const aiColor3D& c) const
{return aiColor3D(r+c.r,g+c.g,b+c.b);}
aiColor3D operator*(const aiColor3D& c) const
{return aiColor3D(r*c.r,g*c.g,b*c.b);}
// Component-wise addition
aiColor3D operator+(const aiColor3D& c) const {
return aiColor3D(r+c.r,g+c.g,b+c.b);
}
// Component-wise subtraction
aiColor3D operator-(const aiColor3D& c) const {
return aiColor3D(r+c.r,g+c.g,b+c.b);
}
// Component-wise multiplication
aiColor3D operator*(const aiColor3D& c) const {
return aiColor3D(r*c.r,g*c.g,b*c.b);
}
aiColor3D operator*(float f) const
{return aiColor3D(r*f,g*f,b*f);}
// Multiply with a scalar
aiColor3D operator*(float f) const {
return aiColor3D(r*f,g*f,b*f);
}
inline float operator[](unsigned int i) const {return *(&r + i);}
inline float& operator[](unsigned int i) {return *(&r + i);}
// Access a specific color component
float operator[](unsigned int i) const {return *(&r + i);}
float& operator[](unsigned int i) {return *(&r + i);}
inline bool IsBlack() const
// Check whether a color is black
// TODO: add epsilon?
bool IsBlack() const
{
return !r && !g && !b;
}
@ -147,10 +188,10 @@ struct aiColor3D
//! Red, green and blue color values
float r, g, b;
} PACK_STRUCT;
} PACK_STRUCT; // !struct aiColor3D
// ---------------------------------------------------------------------------
// ----------------------------------------------------------------------------------
/** Represents a color in Red-Green-Blue space including an
* alpha component.
*/
@ -163,15 +204,24 @@ struct aiColor4D
aiColor4D (const aiColor4D& o)
: r(o.r), g(o.g), b(o.b), a(o.a) {}
bool operator == (const aiColor4D& other) const
{return r == other.r && g == other.g && b == other.b && a == other.a;}
// Component-wise comparison
// TODO: add epsilon?
bool operator == (const aiColor4D& other) const {
return r == other.r && g == other.g && b == other.b && a == other.a;
}
bool operator != (const aiColor4D& other) const
{return r != other.r || g != other.g || b != other.b || a != other.a;}
// Component-wise inverse comparison
// TODO: add epsilon?
bool operator != (const aiColor4D& other) const {
return r != other.r || g != other.g || b != other.b || a != other.a;
}
// Access a specific color component
inline float operator[](unsigned int i) const {return *(&r + i);}
inline float& operator[](unsigned int i) {return *(&r + i);}
// Check whether a color is black
// TODO: add epsilon?
inline bool IsBlack() const
{
// The alpha component doesn't care here. black is black.
@ -182,25 +232,35 @@ struct aiColor4D
//! Red, green, blue and alpha color values
float r, g, b, a;
} PACK_STRUCT;
} PACK_STRUCT; // !struct aiColor4D
#include "./Compiler/poppack1.h"
// ---------------------------------------------------------------------------
/** Represents a string, zero byte terminated
// ----------------------------------------------------------------------------------
/** Represents a string, zero byte terminated.
*
* We use this representation to be C-compatible. The length of such a string is
* limited to MAXLEN characters (excluding the terminal zero).
*/
struct aiString
{
#ifdef __cplusplus
inline aiString() :
//! Default constructor, the string is set to have zero length
aiString() :
length(0)
{
data[0] = '\0';
#ifdef _DEBUG
// Debug build: overwrite the string on its full length with ESC (27)
::memset(data+1,27,MAXLEN-1);
#endif
}
//! Copy constructor
inline aiString(const aiString& rOther) :
aiString(const aiString& rOther) :
length(rOther.length)
{
::memcpy( data, rOther.data, rOther.length);
@ -208,14 +268,14 @@ struct aiString
}
//! Constructor from std::string
inline aiString(const std::string& pString) :
aiString(const std::string& pString) :
length(pString.length())
{
memcpy( data, pString.c_str(), length);
data[length] = '\0';
}
//! copy a std::string to the aiString
//! Copy a std::string to the aiString
void Set( const std::string& pString)
{
if( pString.length() > MAXLEN - 1)
@ -225,22 +285,45 @@ struct aiString
data[length] = 0;
}
//! comparison operator
bool operator==(const aiString& other) const
//! Copy a const char* to the aiString
void Set( const char* sz)
{
return (length == other.length &&
0 == strcmp(this->data,other.data));
const size_t len = ::strlen(sz);
if( len > MAXLEN - 1)
return;
length = len;
::memcpy( data, sz, len);
data[len] = 0;
}
//! inverse comparison operator
// Assign a const char* to the string
aiString& operator = (const char* sz)
{
Set(sz);
return *this;
}
// Assign a cstd::string to the string
aiString& operator = ( const std::string& pString)
{
Set(pString);
return *this;
}
//! Comparison operator
bool operator==(const aiString& other) const
{
return (length == other.length && 0 == strcmp(this->data,other.data));
}
//! Inverse comparison operator
bool operator!=(const aiString& other) const
{
return (length != other.length ||
0 != ::strcmp(this->data,other.data));
return (length != other.length || 0 != ::strcmp(this->data,other.data));
}
//! Append a string to the string
inline void Append (const char* app)
void Append (const char* app)
{
const size_t len = ::strlen(app);
if (!len)return;
@ -252,11 +335,16 @@ struct aiString
length += len;
}
//! Clear the string
inline void Clear ()
//! Clear the string - reset its length to zero
void Clear ()
{
length = 0;
data[0] = '\0';
#ifdef _DEBUG
// Debug build: overwrite the string on its full length with ESC (27)
::memset(data+1,27,MAXLEN-1);
#endif
}
#endif // !__cplusplus
@ -266,10 +354,10 @@ struct aiString
//! String buffer. Size limit is MAXLEN
char data[MAXLEN];
} ;
} ; // !struct aiString
// ---------------------------------------------------------------------------
// ----------------------------------------------------------------------------------
/** Standard return type for all library functions.
*
* To check whether or not a function failed check against
@ -293,11 +381,33 @@ enum aiReturn
//! Indicates that an illegal argument has been
//! passed to a function. This is rarely used,
//! most functions assert in this case.
AI_INVALIDARG = -0x4
};
AI_INVALIDARG = -0x4,
//! Force 32-bit size enum
_AI_ENFORCE_ENUM_SIZE = 0x7fffffff
}; // !enum aiReturn
// ---------------------------------------------------------------------------
// ----------------------------------------------------------------------------------
/** Seek origins (for the virtual file system API)
*/
enum aiOrigin
{
//! Beginning of the file
aiOrigin_SET = 0x0,
//! Current position of the file pointer
aiOrigin_CUR = 0x1,
//! End of the file, offsets must be negative
aiOrigin_END = 0x2,
//! Force 32-bit size enum
_AI_ORIGIN_ENFORCE_ENUM_SIZE = 0x7fffffff
}; // !enum aiOrigin
// ----------------------------------------------------------------------------------
/** Stores the memory requirements for different parts (e.g. meshes, materials,
* animations) of an import.
* @see Importer::GetMemoryRequirements()
@ -307,7 +417,7 @@ struct aiMemoryInfo
#ifdef __cplusplus
//! Default constructor
inline aiMemoryInfo()
aiMemoryInfo()
: textures (0)
, materials (0)
, meshes (0)
@ -341,9 +451,9 @@ struct aiMemoryInfo
//! Storage allocated for light data, in bytes
unsigned int lights;
//! Storage allocated for the import, in bytes
//! Storage allocated for the full import, in bytes
unsigned int total;
};
}; // !struct aiMemoryInfo
#ifdef __cplusplus

View File

@ -50,8 +50,9 @@ extern "C" {
#include "./Compiler/pushpack1.h"
// ---------------------------------------------------------------------------
/** Represents a two-dimensional vector. */
// ----------------------------------------------------------------------------------
/** Represents a two-dimensional vector.
*/
struct aiVector2D
{
#ifdef __cplusplus
@ -60,29 +61,58 @@ struct aiVector2D
aiVector2D (float _xyz) : x(_xyz), y(_xyz) {}
aiVector2D (const aiVector2D& o) : x(o.x), y(o.y) {}
void Set( float pX, float pY) { x = pX; y = pY;}
float SquareLength() const { return x*x + y*y; }
float Length() const { return sqrt( SquareLength()); }
aiVector2D& Normalize() { *this /= Length(); return *this; }
const aiVector2D& operator += (const aiVector2D& o) { x += o.x; y += o.y; return *this; }
const aiVector2D& operator -= (const aiVector2D& o) { x -= o.x; y -= o.y; return *this; }
const aiVector2D& operator *= (float f) { x *= f; y *= f; return *this; }
const aiVector2D& operator /= (float f) { x /= f; y /= f; return *this; }
void Set( float pX, float pY) {
x = pX; y = pY;
}
float SquareLength() const {
return x*x + y*y;
}
float Length() const {
return ::sqrt( SquareLength());
}
inline float operator[](unsigned int i) const {return *(&x + i);}
inline float& operator[](unsigned int i) {return *(&x + i);}
aiVector2D& Normalize() {
*this /= Length(); return *this;
}
inline bool operator== (const aiVector2D& other) const
{return x == other.x && y == other.y;}
const aiVector2D& operator += (const aiVector2D& o) {
x += o.x; y += o.y; return *this;
}
const aiVector2D& operator -= (const aiVector2D& o) {
x -= o.x; y -= o.y; return *this;
}
const aiVector2D& operator *= (float f) {
x *= f; y *= f; return *this;
}
const aiVector2D& operator /= (float f) {
x /= f; y /= f; return *this;
}
inline bool operator!= (const aiVector2D& other) const
{return x != other.x || y != other.y;}
float operator[](unsigned int i) const {
return *(&x + i);
}
inline aiVector2D& operator= (float f)
{x = y = f;return *this;}
float& operator[](unsigned int i) {
return *(&x + i);
}
const aiVector2D SymMul(const aiVector2D& o)
{return aiVector2D(x*o.x,y*o.y);}
bool operator== (const aiVector2D& other) const {
return x == other.x && y == other.y;
}
bool operator!= (const aiVector2D& other) const {
return x != other.x || y != other.y;
}
aiVector2D& operator= (float f) {
x = y = f;return *this;
}
const aiVector2D SymMul(const aiVector2D& o) {
return aiVector2D(x*o.x,y*o.y);
}
#endif // __cplusplus
@ -94,36 +124,42 @@ struct aiVector2D
#ifdef __cplusplus
} // end extern "C"
// ----------------------------------------------------------------------------------
// symmetric addition
inline aiVector2D operator + (const aiVector2D& v1, const aiVector2D& v2)
{
return aiVector2D( v1.x + v2.x, v1.y + v2.y);
}
// ----------------------------------------------------------------------------------
// symmetric subtraction
inline aiVector2D operator - (const aiVector2D& v1, const aiVector2D& v2)
{
return aiVector2D( v1.x - v2.x, v1.y - v2.y);
}
// ----------------------------------------------------------------------------------
// scalar product
inline float operator * (const aiVector2D& v1, const aiVector2D& v2)
{
return v1.x*v2.x + v1.y*v2.y;
}
// ----------------------------------------------------------------------------------
// scalar multiplication
inline aiVector2D operator * ( float f, const aiVector2D& v)
{
return aiVector2D( f*v.x, f*v.y);
}
// ----------------------------------------------------------------------------------
// and the other way around
inline aiVector2D operator * ( const aiVector2D& v, float f)
{
return aiVector2D( f*v.x, f*v.y);
}
// ----------------------------------------------------------------------------------
// scalar division
inline aiVector2D operator / ( const aiVector2D& v, float f)
{
@ -131,12 +167,14 @@ inline aiVector2D operator / ( const aiVector2D& v, float f)
return v * (1/f);
}
// ----------------------------------------------------------------------------------
// vector division
inline aiVector2D operator / ( const aiVector2D& v, const aiVector2D& v2)
{
return aiVector2D(v.x / v2.x,v.y / v2.y);
}
// ----------------------------------------------------------------------------------
// vector inversion
inline aiVector2D operator - ( const aiVector2D& v)
{
@ -144,5 +182,4 @@ inline aiVector2D operator - ( const aiVector2D& v)
}
#endif // __cplusplus
#endif // AI_VECTOR2D_H_INC

View File

@ -40,8 +40,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/** @file Defines the C++-API to the Open Asset Import Library. */
#ifndef __AI_ASSIMP_HPP_INC__
#define __AI_ASSIMP_HPP_INC__
#ifndef INCLUDED_AI_ASSIMP_HPP
#define INCLUDED_AI_ASSIMP_HPP
#ifndef __cplusplus
# error This header requires C++ to be used. Use Assimp's C-API (assimp.h) \
@ -51,24 +51,31 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <map>
#include <vector>
// Public ASSIMP headers
// Public ASSIMP data structure headers
#include "aiTypes.h"
#include "aiConfig.h"
#include "aiAssert.h"
namespace Assimp
{
// Public interface
namespace Assimp {
// =======================================================================
// Public interface to Assimp
// =======================================================================
class Importer;
class IOStream;
class IOSystem;
// =======================================================================
// Plugin development
// Include the following headers for the definitions:
// =======================================================================
// BaseImporter.h
// BaseProcess.h
class BaseImporter;
class BaseProcess;
class SharedPostProcessInfo;
class BatchLoader;
}
} //! namespace Assimp
#define AI_PROPERTY_WAS_NOT_EXISTING 0xffffffff
@ -76,20 +83,22 @@ struct aiScene;
struct aiFileIO;
extern "C" ASSIMP_API const aiScene* aiImportFileEx( const char*, unsigned int, aiFileIO*);
namespace Assimp
{
namespace Assimp {
// ---------------------------------------------------------------------------
// ----------------------------------------------------------------------------------
/** The Importer class forms an C++ interface to the functionality of the
* Asset Import library.
* Open Asset Import Library.
*
* Create an object of this class and call ReadFile() to import a file.
* If the import succeeds, the function returns a pointer to the imported data.
* The data remains property of the object, it is intended to be accessed
* read-only. The imported data will be destroyed along with the Importer
* object. If the import failes, ReadFile() returns a NULL pointer. In this
* object. If the import fails, ReadFile() returns a NULL pointer. In this
* case you can retrieve a human-readable error description be calling
* GetErrorString().
* GetErrorString(). You can call ReadFile() multiple times with a single Importer
* instance. Actually, constructing Importer objects involves quite many
* allocations and may take some time, so it's better to reuse them as often as
* possible.
*
* If you need the Importer to do custom file handling to access the files,
* implement IOSystem and IOStream and supply an instance of your custom
@ -98,7 +107,7 @@ namespace Assimp
* standard C++ IO logic will be used.
*
* @note One Importer instance is not thread-safe. If you use multiple
* threads for loading each thread should manage its own Importer instance.
* threads for loading each thread should maintain its own Importer instance.
*/
class ASSIMP_API Importer
{
@ -123,6 +132,17 @@ public:
*/
Importer();
// -------------------------------------------------------------------
/** Copy constructor.
*
* This copies the configuration properties of another Importer.
* If this Importer owns a scene it won't be copied.
* Call ReadFile() to start the import process.
*/
Importer(const Importer& other);
// -------------------------------------------------------------------
/** Destructor. The object kept ownership of the imported data,
* which now will be destroyed along with the object.
@ -298,6 +318,16 @@ public:
const aiScene* ReadFile( const std::string& pFile, unsigned int pFlags);
// -------------------------------------------------------------------
/** Frees the current scene.
*
* The function does nothing if no scene has previously been
* read via ReadFile(). FreeScene() is called automatically by the
* destructor and ReadFile() itself.
*/
void FreeScene( );
// -------------------------------------------------------------------
/** Returns an error description of an error that occured in ReadFile().
*
@ -305,7 +335,7 @@ public:
* @return A description of the last error, an empty string if no
* error occured.
*/
inline const std::string& GetErrorString() const;
const std::string& GetErrorString() const;
// -------------------------------------------------------------------
@ -324,7 +354,8 @@ public:
*
* If a file extension is contained in the list this does, of course, not
* mean that ASSIMP is able to load all files with this extension.
* @param szOut String to receive the extension list.
* @param szOut String to receive the extension list. It just means there
* is a loader which handles such files.
* Format of the list: "*.3ds;*.obj;*.dae".
*/
void GetExtensionList(std::string& szOut);
@ -347,7 +378,7 @@ public:
*
* @return Current scene or NULL if there is currently no scene loaded
*/
inline const aiScene* GetScene();
const aiScene* GetScene() const;
// -------------------------------------------------------------------
@ -359,7 +390,7 @@ public:
*
* @return Current scene or NULL if there is currently no scene loaded
*/
inline const aiScene* GetOrphanedScene();
aiScene* GetOrphanedScene();
// -------------------------------------------------------------------
@ -376,12 +407,7 @@ public:
* all steps behave consequently in the same manner when modifying
* data structures.
*/
inline void SetExtraVerbose(bool bDo);
private:
/** Empty copy constructor. */
Importer(const Importer &other);
void SetExtraVerbose(bool bDo);
protected:
@ -419,33 +445,30 @@ protected:
/** Used by post-process steps to share data */
SharedPostProcessInfo* mPPShared;
};
}; //! class Importer
// ---------------------------------------------------------------------------
// inline methods for Importer
// ----------------------------------------------------------------------------------
inline const std::string& Importer::GetErrorString() const
{
return mErrorString;
}
// ----------------------------------------------------------------------------------
inline void Importer::SetExtraVerbose(bool bDo)
{
bExtraVerbose = bDo;
}
inline const aiScene* Importer::GetOrphanedScene()
{
aiScene* scene = mScene;
mScene = NULL;
return scene;
}
inline const aiScene* Importer::GetScene()
// ----------------------------------------------------------------------------------
inline const aiScene* Importer::GetScene() const
{
return mScene;
}
// ----------------------------------------------------------------------------------
inline aiScene* Importer::GetOrphanedScene()
{
aiScene* s = mScene;
mScene = NULL;
return s;
}
} // End of namespace Assimp
#endif // __AI_ASSIMP_HPP_INC
} // !namespace Assimp
#endif // INCLUDED_AI_ASSIMP_HPP

View File

@ -1,24 +1,35 @@
rem Alexander Gessler, 12:30:08
rem ------------------------------------------------------------------------------
rem Tiny script to execute a single unit test suite.
rem
rem Usage:
rem SET OUTDIR=<directory_for_test_results>
rem SET BINDIR=<directory_where_binaries_are_stored>
rem
rem CALL RunSingleUnitTestSuite <name_of_test> <output_file>
rem
rem Post:
rem FIRSTUTNA - if the test wasn't found, receives the test name
rem FIRSTUTFAILUR - if the test failed, receives the test name
rem
rem ------------------------------------------------------------------------------
if exist %BINDIR%\%1\UnitTest.exe goto test1
rem Check whether the
IF NOT EXIST %BINDIR%\%1\unit.exe (
echo NOT AVAILABLE. Please rebuild this configuration
echo Unable to find %BINDIR%\%1\UnitTest.exe > %OUTDIR%%2
SET FIRSTUTNA=%2
goto end:
echo NOT AVAILABLE. Please rebuild this configuration
echo Unable to find %BINDIR%\%1\unit.exe > %OUTDIR%%2
SET FIRSTUTNA=%2
) ELSE (
:test1
%BINDIR%\%1\UnitTest.exe > %OUTDIR%%2
if errorlevel == 0 goto succ
%BINDIR%\%1\unit.exe > %OUTDIR%%2
IF errorlevel == 0 (
echo SUCCESS
) ELSE (
echo FAILURE, check output file: %2
SET FIRSTUTFAILURE=%2
)
)
echo FAILURE, check output file: %2
SET FIRSTUTFAILURE=%2
goto end
:succ
echo SUCCESS
:end
echo.
echo.

View File

@ -1,16 +1,23 @@
rem Alexander Gessler, 12:30:08
rem ------------------------------------------------------------------------------
rem Tiny script to execute Assimp's fully unit test suite for all configurations
rem
rem Usage: call RunUnitTestSuite
rem ------------------------------------------------------------------------------
rem Setup the console environment
set errorlevel=0
color 4e
cls
@echo off
rem
rem Setup target architecture
SET ARCHEXT=x64
IF %PROCESSOR_ARCHITECTURE% == x86 SET ARCHEXT=win32
IF %PROCESSOR_ARCHITECTURE% == x86 (
SET ARCHEXT=win32
)
rem Setup standard paths from here
SET OUTDIR=results\
SET BINDIR=..\bin\
SET FIRSTUTFAILURE=none
@ -39,50 +46,50 @@ echo.
echo ======================================================================
echo Config: Release (Multi-threaded, using boost)
echo ======================================================================
call RunSingleUnitTestSuite unittest_release_%ARCHEXT% release.txt
call RunSingleUnitTestSuite unit_release_%ARCHEXT% release.txt
echo ======================================================================
echo Config: Release -st (Single-threaded, using boost)
echo ======================================================================
call RunSingleUnitTestSuite unittest_release-st_%ARCHEXT% release-st.txt
call RunSingleUnitTestSuite unit_release-st_%ARCHEXT% release-st.txt
echo ======================================================================
echo Config: Release -noboost (NoBoost workaround, implicit -st)
echo ======================================================================
call RunSingleUnitTestSuite unittest_release-noboost_%ARCHEXT% release-st-noboost.txt
call RunSingleUnitTestSuite unit_release-noboost-st_%ARCHEXT% release-st-noboost.txt
echo ======================================================================
echo Config: Release -DLL (Multi-threaded DLL, using boost)
echo ======================================================================
call RunSingleUnitTestSuite unittest_release-dll_%ARCHEXT% release-dll.txt
call RunSingleUnitTestSuite unit_release-dll_%ARCHEXT% release-dll.txt
echo ======================================================================
echo Config: Debug (Multi-threaded, using boost)
echo ======================================================================
call RunSingleUnitTestSuite unittest_debug_%ARCHEXT% debug.txt
call RunSingleUnitTestSuite unit_debug_%ARCHEXT% debug.txt
echo ======================================================================
echo Config: Debug -st (Single-threaded, using boost)
echo ======================================================================
call RunSingleUnitTestSuite unittest_debug_st_%ARCHEXT% debug-st.txt
call RunSingleUnitTestSuite unit_debug-st_%ARCHEXT% debug-st.txt
echo ======================================================================
echo Config: Debug -noboost (NoBoost workaround, implicit -st)
echo ======================================================================
call RunSingleUnitTestSuite unittest_debug-noboost_%ARCHEXT% debug-st-noboost.txt
call RunSingleUnitTestSuite unit_debug-noboost-st_%ARCHEXT% debug-st-noboost.txt
echo ======================================================================
echo Config: Debug -DLL (Multi-threaded, using boost)
echo ======================================================================
call RunSingleUnitTestSuite unittest_debug-dll_%ARCHEXT% debug-dll.txt
call RunSingleUnitTestSuite unit_debug-dll_%ARCHEXT% debug-dll.txt
@ -90,15 +97,15 @@ call RunSingleUnitTestSuite unittest_debug-dll_%ARCHEXT% debug-dll.txt
echo.
echo ----------------------------------------------------------------------
IF FIRSTUTNA==none goto end2
echo One or more test configs are not available.
IF NOT FIRSTUTNA==none (
echo One or more test configs are not available.
)
:end2
IF FIRSTUTFAILURE==none goto end
echo One or more tests failed.
IF NOT FIRSTUTFAILURE==none (
echo One or more tests failed.
)
echo ----------------------------------------------------------------------
echo.
:end
pause

View File

@ -0,0 +1,35 @@
#include "../../../include/BoostWorkaround/boost/tuple/tuple.hpp"
struct another
{int dummy;};
boost::tuple<unsigned,unsigned,unsigned> first;
boost::tuple<int,float,double,bool,another> second;
boost::tuple<> third;
boost::tuple<float,float,float> last;
void test () {
// Implicit conversion
first = boost::make_tuple(4,4,4);
// FIXME: Explicit conversion not really required yet
last = (boost::tuple<float,float,float>)boost::make_tuple(4.,4.,4.);
// Non-const access
first.get<0>() = 1;
first.get<1>() = 2;
first.get<2>() = 3;
float f = last.get<2>();
bool b = second.get<3>();
// Const cases
const boost::tuple<unsigned,unsigned,unsigned> constant = boost::make_tuple(4,4,4);
first.get<0>() = constant.get<0>();
// Direct assignment w. explicit conversion
last = first;
}

View File

@ -0,0 +1,7 @@
// This is just a small test to check whether Assimp's API compiles from C
#include <aiTypes.h>
#include <aiPostProcess.h>
#include <aiScene.h>
#include <assimp.h>

View File

@ -1,28 +0,0 @@
cd ..
cd ..
cd bin
cd unittest_release_win32
color 4e
cls
@echo off
echo ----------------------------------------------------------------------
echo _
echo Open Asset Import Library - Unittests
echo _
echo ----------------------------------------------------------------------
echo _
echo _
UnitTest.exe
echo _
echo ----------------------------------------------------------------------
pause

View File

@ -1,28 +0,0 @@
cd ..
cd ..
cd bin
cd unittest_release_x64
color 4e
cls
@echo off
echo ----------------------------------------------------------------------
echo _
echo Open Asset Import Library - Unittests
echo _
echo ----------------------------------------------------------------------
echo _
echo _
UnitTest.exe
echo _
echo ----------------------------------------------------------------------
pause

View File

@ -1,5 +1,7 @@
#include "UnitTestPCH.h"
//#include <cppunit/XMLOutputter.h>
#include <cppunit/CompilerOutputter.h>
#include <cppunit/extensions/TestFactoryRegistry.h>
#include <cppunit/TestResult.h>
@ -16,6 +18,10 @@ int main (int argc, char* argv[])
time_t t;time(&t);
srand((unsigned int)t);
// create a logger
Assimp::DefaultLogger::create("AssimpLog.txt",Assimp::Logger::VERBOSE,
Assimp::DLS_DEBUGGER | Assimp::DLS_FILE);
// Informiert Test-Listener ueber Testresultate
CPPUNIT_NS :: TestResult testresult;
@ -36,6 +42,16 @@ int main (int argc, char* argv[])
CPPUNIT_NS :: CompilerOutputter compileroutputter (&collectedresults, std::cerr);
compileroutputter.write ();
#if 0
// Resultate im XML-Format ausgeben
std::ofstream of("output.xml");
CPPUNIT_NS :: XmlOutputter xml (&collectedresults, of);
xml.write ();
#endif
// kill the logger again
Assimp::DefaultLogger::kill();
// Rueckmeldung, ob Tests erfolgreich waren
return collectedresults.wasSuccessful () ? 0 : 1;
}

View File

@ -0,0 +1,3 @@
// Unit used to build the precompiled header
#include "UnitTestPCH.h"

View File

@ -0,0 +1,21 @@
#ifndef ASSIMP_BUILD_SINGLETHREADED
# include <boost/thread.hpp>
#endif
// Assimp public API
#include <aiPostProcess.h>
#include <aiScene.h>
#include <assimp.hpp>
#include <DefaultLogger.h>
// CPPUNIT
#include <cppunit/TestFixture.h>
#include <cppunit/extensions/HelperMacros.h>
#include <math.h>
#undef min
#undef max

View File

@ -1,10 +1,11 @@
#include "UnitTestPCH.h"
#include "utFindInvalidData.h"
CPPUNIT_TEST_SUITE_REGISTRATION (FindInvalidDataProcessTest);
// ------------------------------------------------------------------------------------------------
void FindInvalidDataProcessTest :: setUp (void)
{
CPPUNIT_ASSERT( AI_MAX_NUMBER_OF_TEXTURECOORDS >= 3);
@ -19,7 +20,7 @@ void FindInvalidDataProcessTest :: setUp (void)
pcMesh->mNormals = new aiVector3D[1000];
for (unsigned int i = 0; i < 1000;++i)
pcMesh->mNormals[i] = aiVector3D((float)i);
pcMesh->mNormals[i] = aiVector3D((float)i+1);
pcMesh->mTangents = new aiVector3D[1000];
for (unsigned int i = 0; i < 1000;++i)
@ -37,12 +38,14 @@ void FindInvalidDataProcessTest :: setUp (void)
}
}
// ------------------------------------------------------------------------------------------------
void FindInvalidDataProcessTest :: tearDown (void)
{
delete piProcess;
delete pcMesh;
}
// ------------------------------------------------------------------------------------------------
void FindInvalidDataProcessTest :: testStepNegativeResult (void)
{
::memset(pcMesh->mNormals,0,pcMesh->mNumVertices*sizeof(aiVector3D));
@ -53,22 +56,19 @@ void FindInvalidDataProcessTest :: testStepNegativeResult (void)
piProcess->ProcessMesh(pcMesh);
CPPUNIT_ASSERT(NULL != pcMesh->mVertices);
CPPUNIT_ASSERT(NULL == pcMesh->mNormals);
CPPUNIT_ASSERT(NULL == pcMesh->mTangents);
CPPUNIT_ASSERT(NULL == pcMesh->mBitangents);
for (unsigned int i = 0; i < 2;++i)
{
CPPUNIT_ASSERT(NULL != pcMesh->mTextureCoords[i]);
}
for (unsigned int i = 2; i < AI_MAX_NUMBER_OF_TEXTURECOORDS;++i)
{
CPPUNIT_ASSERT(NULL == pcMesh->mTextureCoords[i]);
}
}
// ------------------------------------------------------------------------------------------------
void FindInvalidDataProcessTest :: testStepPositiveResult (void)
{
piProcess->ProcessMesh(pcMesh);
@ -80,7 +80,5 @@ void FindInvalidDataProcessTest :: testStepPositiveResult (void)
CPPUNIT_ASSERT(NULL != pcMesh->mBitangents);
for (unsigned int i = 0; i < AI_MAX_NUMBER_OF_TEXTURECOORDS;++i)
{
CPPUNIT_ASSERT(NULL != pcMesh->mTextureCoords[i]);
}
}

View File

@ -1,14 +1,9 @@
#ifndef TESTNORMALS_H
#define TESTNORMALS_H
#include <cppunit/TestFixture.h>
#include <cppunit/extensions/HelperMacros.h>
#include <aiTypes.h>
#include <aiScene.h>
#include <FindInvalidDataProcess.h>
using namespace std;
using namespace Assimp;

View File

@ -0,0 +1,2 @@
#include "UnitTestPCH.h"

View File

@ -1,4 +1,5 @@
#include "UnitTestPCH.h"
#include "utGenNormals.h"
@ -6,8 +7,9 @@ CPPUNIT_TEST_SUITE_REGISTRATION (GenNormalsTest);
void GenNormalsTest :: setUp (void)
{
this->piProcess = new GenVertexNormalsProcess();
this->pcMesh = new aiMesh();
piProcess = new GenVertexNormalsProcess();
pcMesh = new aiMesh();
pcMesh->mPrimitiveTypes = aiPrimitiveType_TRIANGLE;
pcMesh->mNumFaces = 1;
pcMesh->mFaces = new aiFace[1];
pcMesh->mFaces[0].mIndices = new unsigned int[pcMesh->mFaces[0].mNumIndices = 3];
@ -29,6 +31,6 @@ void GenNormalsTest :: tearDown (void)
void GenNormalsTest :: testSimpleTriangle (void)
{
this->piProcess->GenMeshVertexNormals(pcMesh,0);
piProcess->GenMeshVertexNormals(pcMesh,0);
CPPUNIT_ASSERT(0 != pcMesh->mNormals);
}

View File

@ -1,3 +1,5 @@
#include "UnitTestPCH.h"
#include "utImporter.h"

View File

@ -5,7 +5,7 @@
#include <cppunit/extensions/HelperMacros.h>
#include <assimp.hpp>
#include <BaseImporter.h>
using namespace std;
using namespace Assimp;

View File

@ -0,0 +1,2 @@
#include "UnitTestPCH.h"

View File

@ -1,17 +1,19 @@
#include "UnitTestPCH.h"
#include "utJoinVertices.h"
CPPUNIT_TEST_SUITE_REGISTRATION (JoinVerticesTest);
// ------------------------------------------------------------------------------------------------
void JoinVerticesTest :: setUp (void)
{
// construct the process
this->piProcess = new JoinVerticesProcess();
piProcess = new JoinVerticesProcess();
// create a quite small mesh for testing purposes -
// the mesh itself is *something* but it has redundant vertices
this->pcMesh = new aiMesh();
pcMesh = new aiMesh();
pcMesh->mNumVertices = 900;
aiVector3D*& pv = pcMesh->mVertices = new aiVector3D[900];
@ -49,16 +51,18 @@ void JoinVerticesTest :: setUp (void)
for (unsigned int i = 0; i < 900;++i)pcMesh->mBitangents[i] = 0.f;
}
// ------------------------------------------------------------------------------------------------
void JoinVerticesTest :: tearDown (void)
{
delete this->pcMesh;
delete this->piProcess;
}
// ------------------------------------------------------------------------------------------------
void JoinVerticesTest :: testProcess(void)
{
// execute the step on the given data
this->piProcess->ProcessMesh(this->pcMesh,0);
piProcess->ProcessMesh(pcMesh,0);
// the number of faces shouldn't change
CPPUNIT_ASSERT(pcMesh->mNumFaces == 300);

View File

@ -1,9 +1,11 @@
#include "UnitTestPCH.h"
#include "utLimitBoneWeights.h"
CPPUNIT_TEST_SUITE_REGISTRATION (LimitBoneWeightsTest);
// ------------------------------------------------------------------------------------------------
void LimitBoneWeightsTest :: setUp (void)
{
// construct the process
@ -32,12 +34,14 @@ void LimitBoneWeightsTest :: setUp (void)
}
}
// ------------------------------------------------------------------------------------------------
void LimitBoneWeightsTest :: tearDown (void)
{
delete this->pcMesh;
delete this->piProcess;
}
// ------------------------------------------------------------------------------------------------
void LimitBoneWeightsTest :: testProcess(void)
{
// execute the step on the given data

View File

@ -1,30 +1,34 @@
#include "UnitTestPCH.h"
#include "utMaterialSystem.h"
CPPUNIT_TEST_SUITE_REGISTRATION (MaterialSystemTest);
// ------------------------------------------------------------------------------------------------
void MaterialSystemTest :: setUp (void)
{
this->pcMat = new MaterialHelper();
}
// ------------------------------------------------------------------------------------------------
void MaterialSystemTest :: tearDown (void)
{
delete this->pcMat;
}
// ------------------------------------------------------------------------------------------------
void MaterialSystemTest :: testFloatProperty (void)
{
float pf = 150392.63f;
this->pcMat->AddProperty(&pf,1,"testKey1");
pf = 0.0f;
CPPUNIT_ASSERT(AI_SUCCESS == pcMat->Get("testKey1",pf));
CPPUNIT_ASSERT(AI_SUCCESS == pcMat->Get("testKey1",0,0,pf));
CPPUNIT_ASSERT(pf == 150392.63f);
}
// ------------------------------------------------------------------------------------------------
void MaterialSystemTest :: testFloatArrayProperty (void)
{
float pf[] = {0.0f,1.0f,2.0f,3.0f};
@ -32,21 +36,23 @@ void MaterialSystemTest :: testFloatArrayProperty (void)
this->pcMat->AddProperty(&pf,pMax,"testKey2");
pf[0] = pf[1] = pf[2] = pf[3] = 12.0f;
CPPUNIT_ASSERT(AI_SUCCESS == pcMat->Get("testKey2",pf,&pMax));
CPPUNIT_ASSERT(AI_SUCCESS == pcMat->Get("testKey2",0,0,pf,&pMax));
CPPUNIT_ASSERT(pMax == sizeof(pf) / sizeof(float));
CPPUNIT_ASSERT(!pf[0] && 1.0f == pf[1] && 2.0f == pf[2] && 3.0f == pf[3] );
}
// ------------------------------------------------------------------------------------------------
void MaterialSystemTest :: testIntProperty (void)
{
int pf = 15039263;
this->pcMat->AddProperty(&pf,1,"testKey3");
pf = 12;
CPPUNIT_ASSERT(AI_SUCCESS == pcMat->Get("testKey3",pf));
CPPUNIT_ASSERT(AI_SUCCESS == pcMat->Get("testKey3",0,0,pf));
CPPUNIT_ASSERT(pf == 15039263);
}
// ------------------------------------------------------------------------------------------------
void MaterialSystemTest :: testIntArrayProperty (void)
{
int pf[] = {0,1,2,3};
@ -54,11 +60,12 @@ void MaterialSystemTest :: testIntArrayProperty (void)
this->pcMat->AddProperty(&pf,pMax,"testKey4");
pf[0] = pf[1] = pf[2] = pf[3] = 12;
CPPUNIT_ASSERT(AI_SUCCESS == pcMat->Get("testKey4",pf,&pMax));
CPPUNIT_ASSERT(AI_SUCCESS == pcMat->Get("testKey4",0,0,pf,&pMax));
CPPUNIT_ASSERT(pMax == sizeof(pf) / sizeof(int));
CPPUNIT_ASSERT(!pf[0] && 1 == pf[1] && 2 == pf[2] && 3 == pf[3] );
}
// ------------------------------------------------------------------------------------------------
void MaterialSystemTest :: testColorProperty (void)
{
aiColor4D clr;
@ -67,16 +74,17 @@ void MaterialSystemTest :: testColorProperty (void)
clr.b = 1.0f;
clr.a = clr.g = clr.r = 0.0f;
CPPUNIT_ASSERT(AI_SUCCESS == pcMat->Get("testKey5",clr));
CPPUNIT_ASSERT(AI_SUCCESS == pcMat->Get("testKey5",0,0,clr));
CPPUNIT_ASSERT(clr.r == 2.0f && clr.g == 3.0f && clr.b == 4.0f && clr.a == 5.0f);
}
// ------------------------------------------------------------------------------------------------
void MaterialSystemTest :: testStringProperty (void)
{
aiString s;
s.Set("Hello, this is a small test");
this->pcMat->AddProperty(&s,"testKey6");
s.Set("358358");
CPPUNIT_ASSERT(AI_SUCCESS == pcMat->Get("testKey6",s));
CPPUNIT_ASSERT(AI_SUCCESS == pcMat->Get("testKey6",0,0,s));
CPPUNIT_ASSERT(!::strcmp(s.data,"Hello, this is a small test"));
}

View File

@ -0,0 +1,2 @@
#include "UnitTestPCH.h"

View File

@ -0,0 +1,2 @@
#include "UnitTestPCH.h"

View File

@ -1,20 +1,23 @@
#include "UnitTestPCH.h"
#include "utRemoveComments.h"
CPPUNIT_TEST_SUITE_REGISTRATION (RemoveCommentsTest);
// ------------------------------------------------------------------------------------------------
void RemoveCommentsTest :: setUp (void)
{
// nothing to do here
}
// ------------------------------------------------------------------------------------------------
void RemoveCommentsTest :: tearDown (void)
{
// nothing to do here
}
// ------------------------------------------------------------------------------------------------
void RemoveCommentsTest :: testSingleLineComments (void)
{
const char* szTest = "int i = 0; \n"
@ -37,6 +40,7 @@ void RemoveCommentsTest :: testSingleLineComments (void)
delete[] szTest2;
}
// ------------------------------------------------------------------------------------------------
void RemoveCommentsTest :: testMultiLineComments (void)
{
char* szTest =

View File

@ -1,3 +1,5 @@
#include "UnitTestPCH.h"
#include "utRemoveComponent.h"
@ -8,6 +10,46 @@ void RemoveVCProcessTest :: setUp (void)
// construct the process
piProcess = new RemoveVCProcess();
pScene = new aiScene();
// fill the scene ..
pScene->mMeshes = new aiMesh*[pScene->mNumMeshes = 2];
pScene->mMeshes[0] = new aiMesh();
pScene->mMeshes[1] = new aiMesh();
pScene->mMeshes[0]->mNumVertices = 120;
pScene->mMeshes[0]->mVertices = new aiVector3D[120];
pScene->mMeshes[0]->mNormals = new aiVector3D[120];
pScene->mMeshes[0]->mTextureCoords[0] = new aiVector3D[120];
pScene->mMeshes[0]->mTextureCoords[1] = new aiVector3D[120];
pScene->mMeshes[0]->mTextureCoords[2] = new aiVector3D[120];
pScene->mMeshes[0]->mTextureCoords[3] = new aiVector3D[120];
pScene->mMeshes[1]->mNumVertices = 120;
pScene->mMeshes[1]->mVertices = new aiVector3D[120];
pScene->mAnimations = new aiAnimation*[pScene->mNumAnimations = 2];
pScene->mAnimations[0] = new aiAnimation();
pScene->mAnimations[1] = new aiAnimation();
pScene->mTextures = new aiTexture*[pScene->mNumTextures = 2];
pScene->mTextures[0] = new aiTexture();
pScene->mTextures[1] = new aiTexture();
pScene->mMaterials = new aiMaterial*[pScene->mNumMaterials = 2];
pScene->mMaterials[0] = new MaterialHelper();
pScene->mMaterials[1] = new MaterialHelper();
pScene->mLights = new aiLight*[pScene->mNumLights = 2];
pScene->mLights[0] = new aiLight();
pScene->mLights[1] = new aiLight();
pScene->mCameras = new aiCamera*[pScene->mNumCameras = 2];
pScene->mCameras[0] = new aiCamera();
pScene->mCameras[1] = new aiCamera();
// COMPILE TEST: MaterialHelper may no add any extra members,
// so we don't need a virtual destructor
char check[sizeof(MaterialHelper) == sizeof(aiMaterial) ? 10 : -1];
}
void RemoveVCProcessTest :: tearDown (void)
@ -18,36 +60,89 @@ void RemoveVCProcessTest :: tearDown (void)
void RemoveVCProcessTest::testMeshRemove (void)
{
piProcess->SetDeleteFlags(aiComponent_MESHES);
piProcess->Execute(pScene);
CPPUNIT_ASSERT(NULL == pScene->mMeshes && 0 == pScene->mNumMeshes);
CPPUNIT_ASSERT(pScene->mFlags == AI_SCENE_FLAGS_INCOMPLETE);
}
void RemoveVCProcessTest::testAnimRemove (void)
{
piProcess->SetDeleteFlags(aiComponent_ANIMATIONS);
piProcess->Execute(pScene);
CPPUNIT_ASSERT(NULL == pScene->mAnimations && 0 == pScene->mNumAnimations);
CPPUNIT_ASSERT(pScene->mFlags == 0);
}
void RemoveVCProcessTest::testMaterialRemove (void)
{
piProcess->SetDeleteFlags(aiComponent_MATERIALS);
piProcess->Execute(pScene);
// there should be one default material now ...
CPPUNIT_ASSERT(1 == pScene->mNumMaterials &&
pScene->mMeshes[0]->mMaterialIndex == 0 &&
pScene->mMeshes[1]->mMaterialIndex == 0);
CPPUNIT_ASSERT(pScene->mFlags == 0);
}
void RemoveVCProcessTest::testTextureRemove (void)
{
piProcess->SetDeleteFlags(aiComponent_TEXTURES);
piProcess->Execute(pScene);
CPPUNIT_ASSERT(NULL == pScene->mTextures && 0 == pScene->mNumTextures);
CPPUNIT_ASSERT(pScene->mFlags == 0);
}
void RemoveVCProcessTest::testCameraRemove (void)
{
piProcess->SetDeleteFlags(aiComponent_CAMERAS);
piProcess->Execute(pScene);
CPPUNIT_ASSERT(NULL == pScene->mCameras && 0 == pScene->mNumCameras);
CPPUNIT_ASSERT(pScene->mFlags == 0);
}
void RemoveVCProcessTest::testLightRemove (void)
{
piProcess->SetDeleteFlags(aiComponent_LIGHTS);
piProcess->Execute(pScene);
CPPUNIT_ASSERT(NULL == pScene->mLights && 0 == pScene->mNumLights);
CPPUNIT_ASSERT(pScene->mFlags == 0);
}
void RemoveVCProcessTest::testMeshComponentsRemoveA (void)
{
piProcess->SetDeleteFlags(aiComponent_TEXCOORDSn(1) | aiComponent_TEXCOORDSn(2) | aiComponent_TEXCOORDSn(3));
piProcess->Execute(pScene);
CPPUNIT_ASSERT(pScene->mMeshes[0]->mTextureCoords[0] &&
!pScene->mMeshes[0]->mTextureCoords[1] &&
!pScene->mMeshes[0]->mTextureCoords[2] &&
!pScene->mMeshes[0]->mTextureCoords[3]);
CPPUNIT_ASSERT(pScene->mFlags == 0);
}
void RemoveVCProcessTest::testMeshComponentsRemoveB (void)
{
piProcess->SetDeleteFlags(aiComponent_TEXCOORDSn(1) | aiComponent_NORMALS);
piProcess->Execute(pScene);
CPPUNIT_ASSERT(pScene->mMeshes[0]->mTextureCoords[0] &&
pScene->mMeshes[0]->mTextureCoords[1] &&
pScene->mMeshes[0]->mTextureCoords[2] && // shift forward ...
!pScene->mMeshes[0]->mTextureCoords[3] &&
!pScene->mMeshes[0]->mNormals);
CPPUNIT_ASSERT(pScene->mFlags == 0);
}
void RemoveVCProcessTest::testRemoveEverything (void)
{
piProcess->SetDeleteFlags(aiComponent_LIGHTS | aiComponent_ANIMATIONS |
aiComponent_MATERIALS | aiComponent_MESHES | aiComponent_CAMERAS | aiComponent_TEXTURES);
piProcess->Execute(pScene);
}

View File

@ -6,7 +6,7 @@
#include <aiScene.h>
#include <RemoveVCProcess.h>
#include <MaterialSystem.h>
using namespace std;
using namespace Assimp;

View File

@ -1,11 +1,11 @@
#include "UnitTestPCH.h"
#include "utRemoveRedundantMaterials.h"
#include "aiPostProcess.h"
#include <math.h>
CPPUNIT_TEST_SUITE_REGISTRATION (RemoveRedundantMatsTest);
// ------------------------------------------------------------------------------------------------
aiMaterial* getUniqueMaterial1()
{
// setup an unique name for each material - this shouldn't care
@ -20,6 +20,7 @@ aiMaterial* getUniqueMaterial1()
return pcMat;
}
// ------------------------------------------------------------------------------------------------
aiMaterial* getUniqueMaterial2()
{
// setup an unique name for each material - this shouldn't care
@ -34,6 +35,7 @@ aiMaterial* getUniqueMaterial2()
return pcMat;
}
// ------------------------------------------------------------------------------------------------
aiMaterial* getUniqueMaterial3()
{
// setup an unique name for each material - this shouldn't care
@ -45,6 +47,7 @@ aiMaterial* getUniqueMaterial3()
return pcMat;
}
// ------------------------------------------------------------------------------------------------
void RemoveRedundantMatsTest :: setUp (void)
{
// construct the process
@ -86,12 +89,14 @@ void RemoveRedundantMatsTest :: setUp (void)
mTemp.data[0]++;
}
// ------------------------------------------------------------------------------------------------
void RemoveRedundantMatsTest :: tearDown (void)
{
delete this->piProcess;
delete this->pcScene1;
}
// ------------------------------------------------------------------------------------------------
void RemoveRedundantMatsTest :: testRedundantMaterials (void)
{
this->piProcess->Execute(this->pcScene1);

View File

@ -0,0 +1,137 @@
#include "UnitTestPCH.h"
#include "utScenePreprocessor.h"
CPPUNIT_TEST_SUITE_REGISTRATION (ScenePreprocessorTest);
// ------------------------------------------------------------------------------------------------
void ScenePreprocessorTest::setUp (void)
{
// setup a dummy scene with a single node
scene = new aiScene();
scene->mRootNode = new aiNode();
scene->mRootNode->mName.Set("<test>");
// add some translation
scene->mRootNode->mTransformation.a4 = 1.f;
scene->mRootNode->mTransformation.b4 = 2.f;
scene->mRootNode->mTransformation.c4 = 3.f;
// and allocate a ScenePreprocessor to operate on the scene
pp = new ScenePreprocessor(scene);
}
// ------------------------------------------------------------------------------------------------
void ScenePreprocessorTest::tearDown (void)
{
delete pp;
delete scene;
}
// ------------------------------------------------------------------------------------------------
// Check whether ProcessMesh() returns flag for a mesh that consist of primitives with num indices
void ScenePreprocessorTest::CheckIfOnly(aiMesh* p,unsigned int num, unsigned int flag)
{
// Triangles only
for (unsigned i = 0; i < p->mNumFaces;++i) {
p->mFaces[i].mNumIndices = num;
}
pp->ProcessMesh(p);
CPPUNIT_ASSERT(p->mPrimitiveTypes == flag);
p->mPrimitiveTypes = 0;
}
// ------------------------------------------------------------------------------------------------
// Check whether a mesh is preprocessed correctly. Case 1: The mesh needs preprocessing
void ScenePreprocessorTest::testMeshPreprocessingPos (void)
{
aiMesh* p = new aiMesh();
p->mNumFaces = 100;
p->mFaces = new aiFace[p->mNumFaces];
p->mTextureCoords[0] = new aiVector3D[10];
p->mNumUVComponents[0] = 0;
p->mNumUVComponents[1] = 0;
CheckIfOnly(p,1,aiPrimitiveType_POINT);
CheckIfOnly(p,2,aiPrimitiveType_LINE);
CheckIfOnly(p,3,aiPrimitiveType_TRIANGLE);
CheckIfOnly(p,4,aiPrimitiveType_POLYGON);
CheckIfOnly(p,1249,aiPrimitiveType_POLYGON);
// Polygons and triangles mixed
unsigned i;
for (i = 0; i < p->mNumFaces/2;++i) {
p->mFaces[i].mNumIndices = 3;
}
for (; i < p->mNumFaces-p->mNumFaces/4;++i) {
p->mFaces[i].mNumIndices = 4;
}
for (; i < p->mNumFaces;++i) {
p->mFaces[i].mNumIndices = 10;
}
pp->ProcessMesh(p);
CPPUNIT_ASSERT(p->mPrimitiveTypes == (aiPrimitiveType_TRIANGLE|aiPrimitiveType_POLYGON));
CPPUNIT_ASSERT(p->mNumUVComponents[0] == 2);
CPPUNIT_ASSERT(p->mNumUVComponents[1] == 0);
delete p;
}
// ------------------------------------------------------------------------------------------------
// Check whether a mesh is preprocessed correctly. Case 1: The mesh doesn't need preprocessing
void ScenePreprocessorTest::testMeshPreprocessingNeg (void)
{
aiMesh* p = new aiMesh();
p->mPrimitiveTypes = aiPrimitiveType_TRIANGLE|aiPrimitiveType_POLYGON;
pp->ProcessMesh(p);
// should be unmodified
CPPUNIT_ASSERT(p->mPrimitiveTypes == (aiPrimitiveType_TRIANGLE|aiPrimitiveType_POLYGON));
delete p;
}
// ------------------------------------------------------------------------------------------------
// Make a dummy animation with a single channel, '<test>'
aiAnimation* MakeDummyAnimation()
{
aiAnimation* p = new aiAnimation();
p->mNumChannels = 1;
p->mChannels = new aiNodeAnim*[1];
aiNodeAnim* anim = p->mChannels[0] = new aiNodeAnim();
anim->mNodeName.Set("<test>");
return p;
}
// ------------------------------------------------------------------------------------------------
// Check whether an anim is preprocessed correctly. Case 1: The anim needs preprocessing
void ScenePreprocessorTest::testAnimationPreprocessingPos (void)
{
aiAnimation* p = MakeDummyAnimation();
aiNodeAnim* anim = p->mChannels[0];
// we don't set the animation duration, but generate scaling channels
anim->mNumScalingKeys = 10;
anim->mScalingKeys = new aiVectorKey[10];
for (unsigned int i = 0; i < 10;++i) {
anim->mScalingKeys[i].mTime = i;
anim->mScalingKeys[i].mValue = aiVector3D((float)i);
}
pp->ProcessAnimation(p);
// we should now have a proper duration
CPPUNIT_ASSERT_DOUBLES_EQUAL(p->mDuration,9.,0.005);
// ... one scaling key
CPPUNIT_ASSERT(anim->mNumPositionKeys == 1 &&
anim->mPositionKeys &&
anim->mPositionKeys[0].mTime == 0.0 &&
anim->mPositionKeys[0].mValue == aiVector3D(1.f,2.f,3.f));
// ... and one rotation key
CPPUNIT_ASSERT(anim->mNumRotationKeys == 1 && anim->mRotationKeys &&
anim->mRotationKeys[0].mTime == 0.0);
delete p;
}

View File

@ -0,0 +1,44 @@
#ifndef TESTSCENEPREPROCESSOR_H
#define TESTSCENEPREPROCESSOR_H
#include <cppunit/TestFixture.h>
#include <cppunit/extensions/HelperMacros.h>
#include <aiMesh.h>
#include <aiScene.h>
#include <assimp.hpp>
#include <ScenePreprocessor.h>
using namespace std;
using namespace Assimp;
class ScenePreprocessorTest : public CPPUNIT_NS :: TestFixture
{
CPPUNIT_TEST_SUITE (ScenePreprocessorTest);
CPPUNIT_TEST (testMeshPreprocessingPos);
CPPUNIT_TEST (testMeshPreprocessingNeg);
CPPUNIT_TEST (testAnimationPreprocessingPos);
CPPUNIT_TEST_SUITE_END ();
public:
void setUp (void);
void tearDown (void);
protected:
void testMeshPreprocessingPos (void);
void testMeshPreprocessingNeg (void);
void testAnimationPreprocessingPos (void);
private:
void CheckIfOnly(aiMesh* p,unsigned int num, unsigned flag);
ScenePreprocessor* pp;
aiScene* scene;
};
#endif

View File

@ -1,4 +1,5 @@
#include "UnitTestPCH.h"
#include "utSharedPPData.h"
@ -14,17 +15,21 @@ struct TestType
}
};
// ------------------------------------------------------------------------------------------------
void SharedPPDataTest :: setUp (void)
{
shared = new SharedPostProcessInfo();
destructed = false;
}
// ------------------------------------------------------------------------------------------------
void SharedPPDataTest :: tearDown (void)
{
}
// ------------------------------------------------------------------------------------------------
void SharedPPDataTest :: testPODProperty (void)
{
int i = 5;
@ -38,6 +43,7 @@ void SharedPPDataTest :: testPODProperty (void)
CPPUNIT_ASSERT(shared->GetProperty("test",m) && 12.f == m);
}
// ------------------------------------------------------------------------------------------------
void SharedPPDataTest :: testPropertyPointer (void)
{
int *i = new int[35];
@ -48,6 +54,7 @@ void SharedPPDataTest :: testPropertyPointer (void)
CPPUNIT_ASSERT(!shared->GetProperty("test16",o));
}
// ------------------------------------------------------------------------------------------------
void SharedPPDataTest :: testPropertyDeallocation (void)
{
TestType *out, * pip = new TestType();

View File

@ -1,9 +1,12 @@
#include "UnitTestPCH.h"
#include "utSortByPType.h"
#include "utScenePreprocessor.h"
CPPUNIT_TEST_SUITE_REGISTRATION (SortByPTypeProcessTest);
// ------------------------------------------------------------------------------------------------
static unsigned int num[10][4] =
{
{0,0,0,1000},
@ -18,6 +21,7 @@ static unsigned int num[10][4] =
{0,100,0,900},
};
// ------------------------------------------------------------------------------------------------
static unsigned int result[10] =
{
aiPrimitiveType_POLYGON,
@ -32,10 +36,10 @@ static unsigned int result[10] =
aiPrimitiveType_LINE | aiPrimitiveType_POLYGON,
};
// ------------------------------------------------------------------------------------------------
void SortByPTypeProcessTest :: setUp (void)
{
process0 = new DeterminePTypeHelperProcess();
// process0 = new DeterminePTypeHelperProcess();
process1 = new SortByPTypeProcess();
scene = new aiScene();
@ -108,27 +112,37 @@ void SortByPTypeProcessTest :: setUp (void)
}
}
// ------------------------------------------------------------------------------------------------
void SortByPTypeProcessTest :: tearDown (void)
{
delete process0;
//delete process0;
delete process1;
delete scene;
}
void SortByPTypeProcessTest :: testDeterminePTypeStep (void)
{
process0->Execute(scene);
for (unsigned int i = 0; i < 10; ++i)
{
aiMesh* mesh = scene->mMeshes[i];
CPPUNIT_ASSERT(mesh->mPrimitiveTypes == result[i]);
}
}
// ------------------------------------------------------------------------------------------------
//void SortByPTypeProcessTest :: testDeterminePTypeStep (void)
//{
// process0->Execute(scene);
//
// for (unsigned int i = 0; i < 10; ++i)
// {
// aiMesh* mesh = scene->mMeshes[i];
// CPPUNIT_ASSERT(mesh->mPrimitiveTypes == result[i]);
// }
//}
// ------------------------------------------------------------------------------------------------
void SortByPTypeProcessTest :: testSortByPTypeStep (void)
{
process0->Execute(scene);
// process0->Execute(scene);
// and another small test for ScenePreprocessor
ScenePreprocessor s(scene);
s.ProcessScene();
for (unsigned int m = 0; m< 10;++m)
CPPUNIT_ASSERT(scene->mMeshes[m]->mPrimitiveTypes == result[m]);
process1->Execute(scene);
unsigned int idx = 0;
@ -143,7 +157,7 @@ void SortByPTypeProcessTest :: testSortByPTypeStep (void)
aiMesh* mesh = scene->mMeshes[real];
CPPUNIT_ASSERT(NULL != mesh);
CPPUNIT_ASSERT(mesh->mPrimitiveTypes == 1u<<n);
CPPUNIT_ASSERT(mesh->mPrimitiveTypes == AI_PRIMITIVE_TYPE_FOR_N_INDICES(n+1));
CPPUNIT_ASSERT(NULL != mesh->mVertices);
CPPUNIT_ASSERT(NULL != mesh->mNormals);
CPPUNIT_ASSERT(NULL != mesh->mTangents);

View File

@ -15,7 +15,6 @@ using namespace Assimp;
class SortByPTypeProcessTest : public CPPUNIT_NS :: TestFixture
{
CPPUNIT_TEST_SUITE (SortByPTypeProcessTest);
CPPUNIT_TEST (testDeterminePTypeStep);
CPPUNIT_TEST (testSortByPTypeStep);
CPPUNIT_TEST_SUITE_END ();
@ -30,7 +29,6 @@ class SortByPTypeProcessTest : public CPPUNIT_NS :: TestFixture
private:
DeterminePTypeHelperProcess* process0;
SortByPTypeProcess* process1;
aiScene* scene;
};

View File

@ -1,9 +1,11 @@
#include "UnitTestPCH.h"
#include "utSplitLargeMeshes.h"
#include "aiPostProcess.h"
#include <math.h>
CPPUNIT_TEST_SUITE_REGISTRATION (SplitLargeMeshesTest);
// ------------------------------------------------------------------------------------------------
void SplitLargeMeshesTest :: setUp (void)
{
// construct the processes
@ -53,12 +55,14 @@ void SplitLargeMeshesTest :: setUp (void)
}
}
// ------------------------------------------------------------------------------------------------
void SplitLargeMeshesTest :: tearDown (void)
{
delete this->piProcessTriangle;
delete this->piProcessVertex;
}
// ------------------------------------------------------------------------------------------------
void SplitLargeMeshesTest :: testVertexSplit()
{
std::vector< std::pair<aiMesh*, unsigned int> > avOut;
@ -80,6 +84,7 @@ void SplitLargeMeshesTest :: testVertexSplit()
CPPUNIT_ASSERT(0 == iOldFaceNum);
}
// ------------------------------------------------------------------------------------------------
void SplitLargeMeshesTest :: testTriangleSplit()
{
std::vector< std::pair<aiMesh*, unsigned int> > avOut;

View File

@ -0,0 +1,4 @@
#include "UnitTestPCH.h"
// TODO

View File

View File

@ -0,0 +1,2 @@
#include "UnitTestPCH.h"

View File

@ -1,4 +1,5 @@
#include "UnitTestPCH.h"
#include "utTriangulate.h"

View File

@ -1,11 +1,11 @@
#include "UnitTestPCH.h"
#include "utVertexTriangleAdjacency.h"
CPPUNIT_TEST_SUITE_REGISTRATION (VTAdjacency);
// ------------------------------------------------------------------------------------------------
void VTAdjacency :: setUp (void)
{
// build a test mesh with randomized input data
@ -90,6 +90,7 @@ void VTAdjacency :: setUp (void)
}
}
// ------------------------------------------------------------------------------------------------
void VTAdjacency :: tearDown (void)
{
delete pMesh;
@ -102,21 +103,25 @@ void VTAdjacency :: tearDown (void)
pMesh3 = 0;
}
// ------------------------------------------------------------------------------------------------
void VTAdjacency :: largeRandomDataSet (void)
{
checkMesh(pMesh);
}
// ------------------------------------------------------------------------------------------------
void VTAdjacency :: smallDataSet (void)
{
checkMesh(pMesh2);
}
// ------------------------------------------------------------------------------------------------
void VTAdjacency :: unreferencedVerticesSet (void)
{
checkMesh(pMesh3);
}
// ------------------------------------------------------------------------------------------------
void VTAdjacency :: checkMesh (aiMesh* pMesh)
{
pAdj = new VertexTriangleAdjacency(pMesh->mFaces,pMesh->mNumFaces,pMesh->mNumVertices,true);

View File

@ -43,7 +43,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef AV_ANIMEVALUATOR_H_INCLUDED
#define AV_ANIMEVALUATOR_H_INCLUDED
#include <boost/tuple/tuple.hpp>
#ifdef ASSIMP_BUILD_BOOST_WORKAROUND
# include "BoostWorkaround/boost/tuple/tuple.hpp"
#else
# include <boost/tuple/tuple.hpp>
#endif
namespace AssimpView
{

View File

@ -2072,6 +2072,9 @@ int APIENTRY _tWinMain(HINSTANCE hInstance,
HWND hDlg = CreateDialog(hInstance,MAKEINTRESOURCE(IDD_DIALOGMAIN),
NULL,&MessageProc);
// ensure we get high priority
::SetPriorityClass(GetCurrentProcess(),HIGH_PRIORITY_CLASS);
// initialise the default logger if neccessary
Assimp::DefaultLogger::create("",Assimp::Logger::VERBOSE);
Assimp::DefaultLogger::get()->attachStream((Assimp::LogStream*)&CLogWindow::Instance().pcStream,

File diff suppressed because it is too large Load Diff

View File

@ -33,92 +33,136 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jAssimp_NOT_WORKING", "jAss
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug -noBoost|Win32 = Debug -noBoost|Win32
Debug -noBoost|x64 = Debug -noBoost|x64
Debug_DLL|Win32 = Debug_DLL|Win32
Debug_DLL|x64 = Debug_DLL|x64
Debug|Win32 = Debug|Win32
Debug|x64 = Debug|x64
Release -noBoost|Win32 = Release -noBoost|Win32
Release -noBoost|x64 = Release -noBoost|x64
Release_DLL|Win32 = Release_DLL|Win32
Release_DLL|x64 = Release_DLL|x64
Release|Win32 = Release|Win32
Release|x64 = Release|x64
debug|Win32 = debug|Win32
debug|x64 = debug|x64
debug-dll|Win32 = debug-dll|Win32
debug-dll|x64 = debug-dll|x64
debug-noboost-st|Win32 = debug-noboost-st|Win32
debug-noboost-st|x64 = debug-noboost-st|x64
debug-st|Win32 = debug-st|Win32
debug-st|x64 = debug-st|x64
release|Win32 = release|Win32
release|x64 = release|x64
release-dll|Win32 = release-dll|Win32
release-dll|x64 = release-dll|x64
release-noboost|Win32 = release-noboost|Win32
release-noboost|x64 = release-noboost|x64
release-st|Win32 = release-st|Win32
release-st|x64 = release-st|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.Debug -noBoost|Win32.ActiveCfg = Debug -noBoost|Win32
{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.Debug -noBoost|Win32.Build.0 = Debug -noBoost|Win32
{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.Debug -noBoost|x64.ActiveCfg = Debug -noBoost|x64
{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.Debug -noBoost|x64.Build.0 = Debug -noBoost|x64
{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.Debug_DLL|Win32.ActiveCfg = Debug_DLL|Win32
{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.Debug_DLL|Win32.Build.0 = Debug_DLL|Win32
{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.Debug_DLL|x64.ActiveCfg = Debug_DLL|x64
{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.Debug_DLL|x64.Build.0 = Debug_DLL|x64
{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.Debug|Win32.ActiveCfg = Debug|Win32
{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.Debug|Win32.Build.0 = Debug|Win32
{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.Debug|x64.ActiveCfg = Debug|x64
{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.Debug|x64.Build.0 = Debug|x64
{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.Release -noBoost|Win32.ActiveCfg = Release -noBoost|Win32
{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.Release -noBoost|Win32.Build.0 = Release -noBoost|Win32
{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.Release -noBoost|x64.ActiveCfg = Release -noBoost|x64
{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.Release -noBoost|x64.Build.0 = Release -noBoost|x64
{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.Release_DLL|Win32.ActiveCfg = Release_DLL|Win32
{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.Release_DLL|Win32.Build.0 = Release_DLL|Win32
{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.Release_DLL|x64.ActiveCfg = Release_DLL|x64
{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.Release_DLL|x64.Build.0 = Release_DLL|x64
{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.Release|Win32.ActiveCfg = Release|Win32
{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.Release|Win32.Build.0 = Release|Win32
{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.Release|x64.ActiveCfg = Release|x64
{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.Release|x64.Build.0 = Release|x64
{5691E159-2D9B-407F-971F-EA5C592DC524}.Debug -noBoost|Win32.ActiveCfg = Debug -noBoost|Win32
{5691E159-2D9B-407F-971F-EA5C592DC524}.Debug -noBoost|Win32.Build.0 = Debug -noBoost|Win32
{5691E159-2D9B-407F-971F-EA5C592DC524}.Debug -noBoost|x64.ActiveCfg = Debug -noBoost|x64
{5691E159-2D9B-407F-971F-EA5C592DC524}.Debug -noBoost|x64.Build.0 = Debug -noBoost|x64
{5691E159-2D9B-407F-971F-EA5C592DC524}.Debug_DLL|Win32.ActiveCfg = Debug_DLL|Win32
{5691E159-2D9B-407F-971F-EA5C592DC524}.Debug_DLL|Win32.Build.0 = Debug_DLL|Win32
{5691E159-2D9B-407F-971F-EA5C592DC524}.Debug_DLL|x64.ActiveCfg = Debug_DLL|x64
{5691E159-2D9B-407F-971F-EA5C592DC524}.Debug_DLL|x64.Build.0 = Debug_DLL|x64
{5691E159-2D9B-407F-971F-EA5C592DC524}.Debug|Win32.ActiveCfg = Debug|Win32
{5691E159-2D9B-407F-971F-EA5C592DC524}.Debug|Win32.Build.0 = Debug|Win32
{5691E159-2D9B-407F-971F-EA5C592DC524}.Debug|x64.ActiveCfg = Debug|x64
{5691E159-2D9B-407F-971F-EA5C592DC524}.Debug|x64.Build.0 = Debug|x64
{5691E159-2D9B-407F-971F-EA5C592DC524}.Release -noBoost|Win32.ActiveCfg = Release -noBoost|Win32
{5691E159-2D9B-407F-971F-EA5C592DC524}.Release -noBoost|Win32.Build.0 = Release -noBoost|Win32
{5691E159-2D9B-407F-971F-EA5C592DC524}.Release -noBoost|x64.ActiveCfg = Release -noBoost|x64
{5691E159-2D9B-407F-971F-EA5C592DC524}.Release -noBoost|x64.Build.0 = Release -noBoost|x64
{5691E159-2D9B-407F-971F-EA5C592DC524}.Release_DLL|Win32.ActiveCfg = Release_DLL|Win32
{5691E159-2D9B-407F-971F-EA5C592DC524}.Release_DLL|Win32.Build.0 = Release_DLL|Win32
{5691E159-2D9B-407F-971F-EA5C592DC524}.Release_DLL|x64.ActiveCfg = Release_DLL|x64
{5691E159-2D9B-407F-971F-EA5C592DC524}.Release_DLL|x64.Build.0 = Release_DLL|x64
{5691E159-2D9B-407F-971F-EA5C592DC524}.Release|Win32.ActiveCfg = Release|Win32
{5691E159-2D9B-407F-971F-EA5C592DC524}.Release|Win32.Build.0 = Release|Win32
{5691E159-2D9B-407F-971F-EA5C592DC524}.Release|x64.ActiveCfg = Release|x64
{5691E159-2D9B-407F-971F-EA5C592DC524}.Release|x64.Build.0 = Release|x64
{9B9D1C90-8A03-409A-B547-AE7B48B90F1A}.Debug -noBoost|Win32.ActiveCfg = Debug -noBoost|Win32
{9B9D1C90-8A03-409A-B547-AE7B48B90F1A}.Debug -noBoost|x64.ActiveCfg = Debug -noBoost|x64
{9B9D1C90-8A03-409A-B547-AE7B48B90F1A}.Debug_DLL|Win32.ActiveCfg = Debug_DLL|Win32
{9B9D1C90-8A03-409A-B547-AE7B48B90F1A}.Debug_DLL|x64.ActiveCfg = Debug_DLL|x64
{9B9D1C90-8A03-409A-B547-AE7B48B90F1A}.Debug|Win32.ActiveCfg = Debug|Win32
{9B9D1C90-8A03-409A-B547-AE7B48B90F1A}.Debug|x64.ActiveCfg = Debug|x64
{9B9D1C90-8A03-409A-B547-AE7B48B90F1A}.Release -noBoost|Win32.ActiveCfg = Release -noBoost|Win32
{9B9D1C90-8A03-409A-B547-AE7B48B90F1A}.Release -noBoost|x64.ActiveCfg = Release -noBoost|x64
{9B9D1C90-8A03-409A-B547-AE7B48B90F1A}.Release_DLL|Win32.ActiveCfg = Release_DLL|Win32
{9B9D1C90-8A03-409A-B547-AE7B48B90F1A}.Release_DLL|x64.ActiveCfg = Release_DLL|x64
{9B9D1C90-8A03-409A-B547-AE7B48B90F1A}.Release|Win32.ActiveCfg = Release|Win32
{9B9D1C90-8A03-409A-B547-AE7B48B90F1A}.Release|x64.ActiveCfg = Release|x64
{FE78BFBA-4BA5-457D-8602-B800D498102D}.Debug -noBoost|Win32.ActiveCfg = Debug -noBoost|Win32
{FE78BFBA-4BA5-457D-8602-B800D498102D}.Debug -noBoost|x64.ActiveCfg = Debug -noBoost|x64
{FE78BFBA-4BA5-457D-8602-B800D498102D}.Debug_DLL|Win32.ActiveCfg = Debug|Win32
{FE78BFBA-4BA5-457D-8602-B800D498102D}.Debug_DLL|x64.ActiveCfg = Debug|x64
{FE78BFBA-4BA5-457D-8602-B800D498102D}.Debug|Win32.ActiveCfg = Debug|Win32
{FE78BFBA-4BA5-457D-8602-B800D498102D}.Debug|x64.ActiveCfg = Debug|x64
{FE78BFBA-4BA5-457D-8602-B800D498102D}.Release -noBoost|Win32.ActiveCfg = Release -noBoost|Win32
{FE78BFBA-4BA5-457D-8602-B800D498102D}.Release -noBoost|x64.ActiveCfg = Release -noBoost|x64
{FE78BFBA-4BA5-457D-8602-B800D498102D}.Release_DLL|Win32.ActiveCfg = Release|Win32
{FE78BFBA-4BA5-457D-8602-B800D498102D}.Release_DLL|x64.ActiveCfg = Release|x64
{FE78BFBA-4BA5-457D-8602-B800D498102D}.Release|Win32.ActiveCfg = Release|Win32
{FE78BFBA-4BA5-457D-8602-B800D498102D}.Release|x64.ActiveCfg = Release|x64
{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.debug|Win32.ActiveCfg = debug|Win32
{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.debug|Win32.Build.0 = debug|Win32
{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.debug|x64.ActiveCfg = debug|x64
{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.debug|x64.Build.0 = debug|x64
{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.debug-dll|Win32.ActiveCfg = debug-dll|Win32
{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.debug-dll|Win32.Build.0 = debug-dll|Win32
{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.debug-dll|x64.ActiveCfg = debug-dll|x64
{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.debug-dll|x64.Build.0 = debug-dll|x64
{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.debug-noboost-st|Win32.ActiveCfg = debug-noboost-st|Win32
{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.debug-noboost-st|Win32.Build.0 = debug-noboost-st|Win32
{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.debug-noboost-st|x64.ActiveCfg = debug-noboost-st|x64
{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.debug-noboost-st|x64.Build.0 = debug-noboost-st|x64
{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.debug-st|Win32.ActiveCfg = debug-st|Win32
{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.debug-st|Win32.Build.0 = debug-st|Win32
{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.debug-st|x64.ActiveCfg = debug-st|x64
{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.debug-st|x64.Build.0 = debug-st|x64
{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.release|Win32.ActiveCfg = release|Win32
{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.release|Win32.Build.0 = release|Win32
{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.release|x64.ActiveCfg = release|x64
{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.release|x64.Build.0 = release|x64
{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.release-dll|Win32.ActiveCfg = release-dll|Win32
{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.release-dll|Win32.Build.0 = release-dll|Win32
{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.release-dll|x64.ActiveCfg = release-dll|x64
{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.release-dll|x64.Build.0 = release-dll|x64
{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.release-noboost|Win32.ActiveCfg = release-noboost-st|Win32
{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.release-noboost|Win32.Build.0 = release-noboost-st|Win32
{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.release-noboost|x64.ActiveCfg = release-noboost-st|x64
{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.release-noboost|x64.Build.0 = release-noboost-st|x64
{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.release-st|Win32.ActiveCfg = release-st|Win32
{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.release-st|Win32.Build.0 = release-st|Win32
{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.release-st|x64.ActiveCfg = release-st|x64
{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}.release-st|x64.Build.0 = release-st|x64
{5691E159-2D9B-407F-971F-EA5C592DC524}.debug|Win32.ActiveCfg = debug|Win32
{5691E159-2D9B-407F-971F-EA5C592DC524}.debug|Win32.Build.0 = debug|Win32
{5691E159-2D9B-407F-971F-EA5C592DC524}.debug|x64.ActiveCfg = debug|x64
{5691E159-2D9B-407F-971F-EA5C592DC524}.debug|x64.Build.0 = debug|x64
{5691E159-2D9B-407F-971F-EA5C592DC524}.debug-dll|Win32.ActiveCfg = debug-dll|Win32
{5691E159-2D9B-407F-971F-EA5C592DC524}.debug-dll|Win32.Build.0 = debug-dll|Win32
{5691E159-2D9B-407F-971F-EA5C592DC524}.debug-dll|x64.ActiveCfg = debug-dll|x64
{5691E159-2D9B-407F-971F-EA5C592DC524}.debug-dll|x64.Build.0 = debug-dll|x64
{5691E159-2D9B-407F-971F-EA5C592DC524}.debug-noboost-st|Win32.ActiveCfg = debug-noboost-st|Win32
{5691E159-2D9B-407F-971F-EA5C592DC524}.debug-noboost-st|Win32.Build.0 = debug-noboost-st|Win32
{5691E159-2D9B-407F-971F-EA5C592DC524}.debug-noboost-st|x64.ActiveCfg = debug-noboost-st|x64
{5691E159-2D9B-407F-971F-EA5C592DC524}.debug-noboost-st|x64.Build.0 = debug-noboost-st|x64
{5691E159-2D9B-407F-971F-EA5C592DC524}.debug-st|Win32.ActiveCfg = debug-st|Win32
{5691E159-2D9B-407F-971F-EA5C592DC524}.debug-st|Win32.Build.0 = debug-st|Win32
{5691E159-2D9B-407F-971F-EA5C592DC524}.debug-st|x64.ActiveCfg = debug-st|x64
{5691E159-2D9B-407F-971F-EA5C592DC524}.debug-st|x64.Build.0 = debug-st|x64
{5691E159-2D9B-407F-971F-EA5C592DC524}.release|Win32.ActiveCfg = release|Win32
{5691E159-2D9B-407F-971F-EA5C592DC524}.release|Win32.Build.0 = release|Win32
{5691E159-2D9B-407F-971F-EA5C592DC524}.release|x64.ActiveCfg = release|x64
{5691E159-2D9B-407F-971F-EA5C592DC524}.release|x64.Build.0 = release|x64
{5691E159-2D9B-407F-971F-EA5C592DC524}.release-dll|Win32.ActiveCfg = release-dll|Win32
{5691E159-2D9B-407F-971F-EA5C592DC524}.release-dll|Win32.Build.0 = release-dll|Win32
{5691E159-2D9B-407F-971F-EA5C592DC524}.release-dll|x64.ActiveCfg = release-dll|x64
{5691E159-2D9B-407F-971F-EA5C592DC524}.release-dll|x64.Build.0 = release-dll|x64
{5691E159-2D9B-407F-971F-EA5C592DC524}.release-noboost|Win32.ActiveCfg = release-noboost-st|Win32
{5691E159-2D9B-407F-971F-EA5C592DC524}.release-noboost|Win32.Build.0 = release-noboost-st|Win32
{5691E159-2D9B-407F-971F-EA5C592DC524}.release-noboost|x64.ActiveCfg = release-noboost-st|x64
{5691E159-2D9B-407F-971F-EA5C592DC524}.release-noboost|x64.Build.0 = release-noboost-st|x64
{5691E159-2D9B-407F-971F-EA5C592DC524}.release-st|Win32.ActiveCfg = release-st|Win32
{5691E159-2D9B-407F-971F-EA5C592DC524}.release-st|Win32.Build.0 = release-st|Win32
{5691E159-2D9B-407F-971F-EA5C592DC524}.release-st|x64.ActiveCfg = release-st|x64
{5691E159-2D9B-407F-971F-EA5C592DC524}.release-st|x64.Build.0 = release-st|x64
{9B9D1C90-8A03-409A-B547-AE7B48B90F1A}.debug|Win32.ActiveCfg = debug|Win32
{9B9D1C90-8A03-409A-B547-AE7B48B90F1A}.debug|Win32.Build.0 = debug|Win32
{9B9D1C90-8A03-409A-B547-AE7B48B90F1A}.debug|x64.ActiveCfg = debug|x64
{9B9D1C90-8A03-409A-B547-AE7B48B90F1A}.debug|x64.Build.0 = debug|x64
{9B9D1C90-8A03-409A-B547-AE7B48B90F1A}.debug-dll|Win32.ActiveCfg = debug-dll|Win32
{9B9D1C90-8A03-409A-B547-AE7B48B90F1A}.debug-dll|Win32.Build.0 = debug-dll|Win32
{9B9D1C90-8A03-409A-B547-AE7B48B90F1A}.debug-dll|x64.ActiveCfg = debug-dll|x64
{9B9D1C90-8A03-409A-B547-AE7B48B90F1A}.debug-dll|x64.Build.0 = debug-dll|x64
{9B9D1C90-8A03-409A-B547-AE7B48B90F1A}.debug-noboost-st|Win32.ActiveCfg = debug-noboost-st|Win32
{9B9D1C90-8A03-409A-B547-AE7B48B90F1A}.debug-noboost-st|Win32.Build.0 = debug-noboost-st|Win32
{9B9D1C90-8A03-409A-B547-AE7B48B90F1A}.debug-noboost-st|x64.ActiveCfg = debug-noboost-st|x64
{9B9D1C90-8A03-409A-B547-AE7B48B90F1A}.debug-noboost-st|x64.Build.0 = debug-noboost-st|x64
{9B9D1C90-8A03-409A-B547-AE7B48B90F1A}.debug-st|Win32.ActiveCfg = debug-st|Win32
{9B9D1C90-8A03-409A-B547-AE7B48B90F1A}.debug-st|Win32.Build.0 = debug-st|Win32
{9B9D1C90-8A03-409A-B547-AE7B48B90F1A}.debug-st|x64.ActiveCfg = debug-st|x64
{9B9D1C90-8A03-409A-B547-AE7B48B90F1A}.debug-st|x64.Build.0 = debug-st|x64
{9B9D1C90-8A03-409A-B547-AE7B48B90F1A}.release|Win32.ActiveCfg = release|Win32
{9B9D1C90-8A03-409A-B547-AE7B48B90F1A}.release|Win32.Build.0 = release|Win32
{9B9D1C90-8A03-409A-B547-AE7B48B90F1A}.release|x64.ActiveCfg = release|x64
{9B9D1C90-8A03-409A-B547-AE7B48B90F1A}.release|x64.Build.0 = release|x64
{9B9D1C90-8A03-409A-B547-AE7B48B90F1A}.release-dll|Win32.ActiveCfg = release-dll|Win32
{9B9D1C90-8A03-409A-B547-AE7B48B90F1A}.release-dll|Win32.Build.0 = release-dll|Win32
{9B9D1C90-8A03-409A-B547-AE7B48B90F1A}.release-dll|x64.ActiveCfg = release-dll|x64
{9B9D1C90-8A03-409A-B547-AE7B48B90F1A}.release-dll|x64.Build.0 = release-dll|x64
{9B9D1C90-8A03-409A-B547-AE7B48B90F1A}.release-noboost|Win32.ActiveCfg = release-noboost-st|Win32
{9B9D1C90-8A03-409A-B547-AE7B48B90F1A}.release-noboost|Win32.Build.0 = release-noboost-st|Win32
{9B9D1C90-8A03-409A-B547-AE7B48B90F1A}.release-noboost|x64.ActiveCfg = release-noboost-st|x64
{9B9D1C90-8A03-409A-B547-AE7B48B90F1A}.release-noboost|x64.Build.0 = release-noboost-st|x64
{9B9D1C90-8A03-409A-B547-AE7B48B90F1A}.release-st|Win32.ActiveCfg = release-st|Win32
{9B9D1C90-8A03-409A-B547-AE7B48B90F1A}.release-st|Win32.Build.0 = release-st|Win32
{9B9D1C90-8A03-409A-B547-AE7B48B90F1A}.release-st|x64.ActiveCfg = release-st|x64
{9B9D1C90-8A03-409A-B547-AE7B48B90F1A}.release-st|x64.Build.0 = release-st|x64
{FE78BFBA-4BA5-457D-8602-B800D498102D}.debug|Win32.ActiveCfg = debug|Win32
{FE78BFBA-4BA5-457D-8602-B800D498102D}.debug|x64.ActiveCfg = debug|x64
{FE78BFBA-4BA5-457D-8602-B800D498102D}.debug-dll|Win32.ActiveCfg = debug|Win32
{FE78BFBA-4BA5-457D-8602-B800D498102D}.debug-dll|x64.ActiveCfg = debug|x64
{FE78BFBA-4BA5-457D-8602-B800D498102D}.debug-noboost-st|Win32.ActiveCfg = debug -noboost|Win32
{FE78BFBA-4BA5-457D-8602-B800D498102D}.debug-noboost-st|x64.ActiveCfg = debug -noboost|x64
{FE78BFBA-4BA5-457D-8602-B800D498102D}.debug-st|Win32.ActiveCfg = debug-st|Win32
{FE78BFBA-4BA5-457D-8602-B800D498102D}.debug-st|x64.ActiveCfg = debug-st|x64
{FE78BFBA-4BA5-457D-8602-B800D498102D}.release|Win32.ActiveCfg = release|Win32
{FE78BFBA-4BA5-457D-8602-B800D498102D}.release|x64.ActiveCfg = release|x64
{FE78BFBA-4BA5-457D-8602-B800D498102D}.release-dll|Win32.ActiveCfg = release|Win32
{FE78BFBA-4BA5-457D-8602-B800D498102D}.release-dll|x64.ActiveCfg = release|x64
{FE78BFBA-4BA5-457D-8602-B800D498102D}.release-noboost|Win32.ActiveCfg = release -noboost|Win32
{FE78BFBA-4BA5-457D-8602-B800D498102D}.release-noboost|x64.ActiveCfg = release -noboost|x64
{FE78BFBA-4BA5-457D-8602-B800D498102D}.release-st|Win32.ActiveCfg = release-st|Win32
{FE78BFBA-4BA5-457D-8602-B800D498102D}.release-st|x64.ActiveCfg = release-st|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View File

@ -2,7 +2,7 @@
<VisualStudioProject
ProjectType="Visual C++"
Version="8,00"
Name="Assimp"
Name="assimp"
ProjectGUID="{5691E159-2D9B-407F-971F-EA5C592DC524}"
RootNamespace="assimp"
>
@ -18,10 +18,9 @@
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="./../../lib/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
Name="debug|Win32"
ConfigurationType="4"
InheritedPropertySheets=".\shared\LibShared.vsprops"
>
<Tool
Name="VCPreBuildEventTool"
@ -82,9 +81,9 @@
/>
</Configuration>
<Configuration
Name="Debug|x64"
OutputDirectory="./../../lib/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
Name="debug|x64"
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="4"
>
<Tool
@ -144,10 +143,9 @@
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="./../../lib/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
Name="release|Win32"
ConfigurationType="4"
InheritedPropertySheets=".\shared\LibShared.vsprops"
WholeProgramOptimization="0"
>
<Tool
@ -170,6 +168,7 @@
InlineFunctionExpansion="2"
EnableIntrinsicFunctions="true"
FavorSizeOrSpeed="1"
WholeProgramOptimization="false"
AdditionalIncludeDirectories=""
PreprocessorDefinitions="NDEBUG;_SCL_SECURE_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;WIN32"
StringPooling="true"
@ -209,10 +208,9 @@
/>
</Configuration>
<Configuration
Name="Release|x64"
OutputDirectory="./../../lib/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
Name="release|x64"
ConfigurationType="4"
InheritedPropertySheets=".\shared\LibShared.vsprops"
WholeProgramOptimization="0"
>
<Tool
@ -275,10 +273,9 @@
/>
</Configuration>
<Configuration
Name="Release_DLL|Win32"
OutputDirectory="./../../bin/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
Name="release-dll|Win32"
ConfigurationType="2"
InheritedPropertySheets=".\shared\DllShared.vsprops"
WholeProgramOptimization="0"
>
<Tool
@ -304,7 +301,7 @@
AdditionalIncludeDirectories=""
PreprocessorDefinitions="NDEBUG;_SCL_SECURE_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;WIN32;ASSIMP_BUILD_DLL_EXPORT"
StringPooling="true"
RuntimeLibrary="2"
RuntimeLibrary="0"
BufferSecurityCheck="false"
EnableEnhancedInstructionSet="2"
UsePrecompiledHeader="2"
@ -349,14 +346,13 @@
/>
<Tool
Name="VCPostBuildEventTool"
CommandLine="copy &quot;$(OutDir)\$(TargetFileName)&quot; &quot;$(SolutionDir)..\..\bin\unittest_$(ConfigurationName)_$(PlatformName)\&quot;"
CommandLine="mkdir $(SolutionDir)..\..\bin\unit_$(ConfigurationName)_$(PlatformName)&#x0D;&#x0A;mkdir $(SolutionDir)..\..\bin\assimpview_$(ConfigurationName)_$(PlatformName)&#x0D;&#x0A;&#x0D;&#x0A;copy &quot;$(OutDir)\$(TargetFileName)&quot; &quot;$(SolutionDir)..\..\bin\unit_$(ConfigurationName)_$(PlatformName)\&quot;&#x0D;&#x0A;copy &quot;$(OutDir)\$(TargetFileName)&quot; &quot;$(SolutionDir)..\..\bin\assimpview_$(ConfigurationName)_$(PlatformName)\&quot;&#x0D;&#x0A;"
/>
</Configuration>
<Configuration
Name="Release_DLL|x64"
OutputDirectory="./../../bin/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
Name="release-dll|x64"
ConfigurationType="2"
InheritedPropertySheets=".\shared\DllShared.vsprops"
WholeProgramOptimization="0"
>
<Tool
@ -426,14 +422,13 @@
/>
<Tool
Name="VCPostBuildEventTool"
CommandLine="copy &quot;$(OutDir)\$(TargetFileName)&quot; &quot;$(SolutionDir)..\..\bin\unittest_$(ConfigurationName)_$(PlatformName)&quot;"
CommandLine="mkdir $(SolutionDir)..\..\bin\unit_$(ConfigurationName)_$(PlatformName)&#x0D;&#x0A;mkdir $(SolutionDir)..\..\bin\assimpview_$(ConfigurationName)_$(PlatformName)&#x0D;&#x0A;&#x0D;&#x0A;copy &quot;$(OutDir)\$(TargetFileName)&quot; &quot;$(SolutionDir)..\..\bin\unit_$(ConfigurationName)_$(PlatformName)\&quot;&#x0D;&#x0A;copy &quot;$(OutDir)\$(TargetFileName)&quot; &quot;$(SolutionDir)..\..\bin\assimpview_$(ConfigurationName)_$(PlatformName)\&quot;&#x0D;&#x0A;"
/>
</Configuration>
<Configuration
Name="Debug_DLL|Win32"
OutputDirectory="./../../bin/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
Name="debug-dll|Win32"
ConfigurationType="2"
InheritedPropertySheets=".\shared\DllShared.vsprops"
>
<Tool
Name="VCPreBuildEventTool"
@ -502,14 +497,13 @@
/>
<Tool
Name="VCPostBuildEventTool"
CommandLine="copy &quot;$(OutDir)\$(TargetFileName)&quot; &quot;$(SolutionDir)..\..\bin\unittest_$(ConfigurationName)_$(PlatformName)&quot;"
CommandLine="mkdir $(SolutionDir)..\..\bin\unit_$(ConfigurationName)_$(PlatformName)&#x0D;&#x0A;mkdir $(SolutionDir)..\..\bin\assimpview_$(ConfigurationName)_$(PlatformName)&#x0D;&#x0A;&#x0D;&#x0A;copy &quot;$(OutDir)\$(TargetFileName)&quot; &quot;$(SolutionDir)..\..\bin\unit_$(ConfigurationName)_$(PlatformName)\&quot;&#x0D;&#x0A;copy &quot;$(OutDir)\$(TargetFileName)&quot; &quot;$(SolutionDir)..\..\bin\assimpview_$(ConfigurationName)_$(PlatformName)\&quot;&#x0D;&#x0A;"
/>
</Configuration>
<Configuration
Name="Debug_DLL|x64"
OutputDirectory="./../../bin/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
Name="debug-dll|x64"
ConfigurationType="2"
InheritedPropertySheets=".\shared\DllShared.vsprops"
>
<Tool
Name="VCPreBuildEventTool"
@ -577,14 +571,13 @@
/>
<Tool
Name="VCPostBuildEventTool"
CommandLine="copy &quot;$(OutDir)\$(TargetFileName)&quot; &quot;$(SolutionDir)..\..\bin\unittest_$(ConfigurationName)_$(PlatformName)&quot;"
CommandLine="mkdir $(SolutionDir)..\..\bin\unit_$(ConfigurationName)_$(PlatformName)&#x0D;&#x0A;mkdir $(SolutionDir)..\..\bin\assimpview_$(ConfigurationName)_$(PlatformName)&#x0D;&#x0A;&#x0D;&#x0A;copy &quot;$(OutDir)\$(TargetFileName)&quot; &quot;$(SolutionDir)..\..\bin\unit_$(ConfigurationName)_$(PlatformName)\&quot;&#x0D;&#x0A;copy &quot;$(OutDir)\$(TargetFileName)&quot; &quot;$(SolutionDir)..\..\bin\assimpview_$(ConfigurationName)_$(PlatformName)\&quot;&#x0D;&#x0A;"
/>
</Configuration>
<Configuration
Name="Release -noBoost|Win32"
OutputDirectory="./../../lib/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
Name="release-noboost-st|Win32"
ConfigurationType="4"
InheritedPropertySheets=".\shared\LibShared.vsprops;.\shared\NoBoostShared.vsprops"
WholeProgramOptimization="0"
>
<Tool
@ -646,10 +639,9 @@
/>
</Configuration>
<Configuration
Name="Release -noBoost|x64"
OutputDirectory="./../../lib/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
Name="release-noboost-st|x64"
ConfigurationType="4"
InheritedPropertySheets=".\shared\LibShared.vsprops;.\shared\NoBoostShared.vsprops"
WholeProgramOptimization="0"
>
<Tool
@ -712,10 +704,9 @@
/>
</Configuration>
<Configuration
Name="Debug -noBoost|Win32"
OutputDirectory="./../../lib/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
Name="debug-noboost-st|Win32"
ConfigurationType="4"
InheritedPropertySheets=".\shared\LibShared.vsprops;.\shared\NoBoostShared.vsprops"
>
<Tool
Name="VCPreBuildEventTool"
@ -776,10 +767,9 @@
/>
</Configuration>
<Configuration
Name="Debug -noBoost|x64"
OutputDirectory="./../../lib/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
Name="debug-noboost-st|x64"
ConfigurationType="4"
InheritedPropertySheets=".\shared\LibShared.vsprops;.\shared\NoBoostShared.vsprops"
>
<Tool
Name="VCPreBuildEventTool"
@ -837,6 +827,259 @@
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="debug-st|Win32"
ConfigurationType="4"
InheritedPropertySheets=".\shared\LibShared.vsprops;.\shared\SingleThreadedShared.vsprops"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=""
PreprocessorDefinitions="DEBUG;_SCL_SECURE_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;WIN32"
BasicRuntimeChecks="3"
SmallerTypeCheck="true"
RuntimeLibrary="1"
EnableFunctionLevelLinking="true"
UsePrecompiledHeader="2"
PrecompiledHeaderThrough="AssimpPCH.h"
WarningLevel="3"
Detect64BitPortabilityProblems="false"
DebugInformationFormat="4"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="debug-st|x64"
ConfigurationType="4"
InheritedPropertySheets=".\shared\LibShared.vsprops;.\shared\SingleThreadedShared.vsprops"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=""
PreprocessorDefinitions="DEBUG, _SCL_SECURE_NO_WARNINGS, _CRT_SECURE_NO_WARNINGS,WIN32"
BasicRuntimeChecks="3"
SmallerTypeCheck="true"
RuntimeLibrary="1"
EnableFunctionLevelLinking="true"
WarningLevel="3"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="release-st|Win32"
ConfigurationType="4"
InheritedPropertySheets=".\shared\LibShared.vsprops;.\shared\SingleThreadedShared.vsprops"
WholeProgramOptimization="0"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
InlineFunctionExpansion="2"
EnableIntrinsicFunctions="true"
FavorSizeOrSpeed="1"
AdditionalIncludeDirectories=""
PreprocessorDefinitions="NDEBUG;_SCL_SECURE_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;WIN32"
StringPooling="true"
BufferSecurityCheck="false"
EnableEnhancedInstructionSet="2"
UsePrecompiledHeader="2"
PrecompiledHeaderThrough="AssimpPCH.h"
WarningLevel="3"
Detect64BitPortabilityProblems="false"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="release-st|x64"
ConfigurationType="4"
InheritedPropertySheets=".\shared\LibShared.vsprops;.\shared\SingleThreadedShared.vsprops"
WholeProgramOptimization="0"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
InlineFunctionExpansion="2"
EnableIntrinsicFunctions="true"
FavorSizeOrSpeed="1"
AdditionalIncludeDirectories=""
PreprocessorDefinitions="NDEBUG, _SCL_SECURE_NO_WARNINGS, _CRT_SECURE_NO_WARNINGS,WIN32"
StringPooling="true"
RuntimeLibrary="0"
BufferSecurityCheck="false"
EnableEnhancedInstructionSet="0"
UsePrecompiledHeader="2"
PrecompiledHeaderThrough="AssimpPCH.h"
WarningLevel="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
@ -1019,6 +1262,14 @@
>
</File>
</Filter>
<Filter
Name="tuple"
>
<File
RelativePath="..\..\include\BoostWorkaround\boost\tuple\tuple.hpp"
>
</File>
</Filter>
</Filter>
</Filter>
<Filter
@ -1048,46 +1299,6 @@
RelativePath="..\..\code\BaseProcess.h"
>
</File>
<File
RelativePath="..\..\code\ByteSwap.h"
>
</File>
<File
RelativePath="..\..\code\DefaultIOStream.cpp"
>
</File>
<File
RelativePath="..\..\code\DefaultIOStream.h"
>
</File>
<File
RelativePath="..\..\code\DefaultIOSystem.cpp"
>
</File>
<File
RelativePath="..\..\code\DefaultIOSystem.h"
>
</File>
<File
RelativePath="..\..\code\DefaultLogger.cpp"
>
</File>
<File
RelativePath="..\..\code\fast_atof.h"
>
</File>
<File
RelativePath="..\..\code\FileLogStream.h"
>
</File>
<File
RelativePath="..\..\code\GenericProperty.h"
>
</File>
<File
RelativePath="..\..\code\Hash.h"
>
</File>
<File
RelativePath="..\..\code\IFF.h"
>
@ -1104,14 +1315,6 @@
RelativePath="..\..\code\MaterialSystem.h"
>
</File>
<File
RelativePath="..\..\code\ParsingUtils.h"
>
</File>
<File
RelativePath="..\..\code\qnan.h"
>
</File>
<File
RelativePath="..\..\code\RemoveComments.cpp"
>
@ -1176,14 +1379,6 @@
RelativePath="..\..\code\StandardShapes.h"
>
</File>
<File
RelativePath="..\..\code\StreamReader.h"
>
</File>
<File
RelativePath="..\..\code\StringComparison.h"
>
</File>
<File
RelativePath="..\..\code\TargetAnimation.cpp"
>
@ -1200,10 +1395,6 @@
RelativePath="..\..\code\VertexTriangleAdjacency.h"
>
</File>
<File
RelativePath="..\..\code\Win32DebugLogStream.h"
>
</File>
<Filter
Name="extra"
>
@ -1211,7 +1402,7 @@
RelativePath="..\..\code\extra\MakeVerboseFormat.cpp"
>
<FileConfiguration
Name="Debug|Win32"
Name="debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@ -1219,7 +1410,7 @@
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
Name="release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@ -1227,7 +1418,7 @@
/>
</FileConfiguration>
<FileConfiguration
Name="Release|x64"
Name="release|x64"
>
<Tool
Name="VCCLCompilerTool"
@ -1235,7 +1426,7 @@
/>
</FileConfiguration>
<FileConfiguration
Name="Release_DLL|Win32"
Name="release-dll|Win32"
>
<Tool
Name="VCCLCompilerTool"
@ -1243,7 +1434,7 @@
/>
</FileConfiguration>
<FileConfiguration
Name="Debug_DLL|Win32"
Name="debug-dll|Win32"
>
<Tool
Name="VCCLCompilerTool"
@ -1251,7 +1442,7 @@
/>
</FileConfiguration>
<FileConfiguration
Name="Release -noBoost|Win32"
Name="release-noboost-st|Win32"
>
<Tool
Name="VCCLCompilerTool"
@ -1259,7 +1450,7 @@
/>
</FileConfiguration>
<FileConfiguration
Name="Release -noBoost|x64"
Name="release-noboost-st|x64"
>
<Tool
Name="VCCLCompilerTool"
@ -1267,7 +1458,31 @@
/>
</FileConfiguration>
<FileConfiguration
Name="Debug -noBoost|Win32"
Name="debug-noboost-st|Win32"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="0"
/>
</FileConfiguration>
<FileConfiguration
Name="debug-st|Win32"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="0"
/>
</FileConfiguration>
<FileConfiguration
Name="release-st|Win32"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="0"
/>
</FileConfiguration>
<FileConfiguration
Name="release-st|x64"
>
<Tool
Name="VCCLCompilerTool"
@ -1634,7 +1849,7 @@
RelativePath="..\..\code\ACLoader.cpp"
>
<FileConfiguration
Name="Debug|Win32"
Name="debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@ -1642,7 +1857,15 @@
/>
</FileConfiguration>
<FileConfiguration
Name="Debug -noBoost|Win32"
Name="debug-noboost-st|Win32"
>
<Tool
Name="VCCLCompilerTool"
GeneratePreprocessedFile="0"
/>
</FileConfiguration>
<FileConfiguration
Name="debug-st|Win32"
>
<Tool
Name="VCCLCompilerTool"
@ -1771,6 +1994,10 @@
<Filter
Name="PostProcess"
>
<File
RelativePath="..\..\code\AssimpPCH.h"
>
</File>
<File
RelativePath="..\..\code\CalcTangentsProcess.cpp"
>
@ -1947,7 +2174,7 @@
RelativePath="..\..\code\AssimpPCH.cpp"
>
<FileConfiguration
Name="Debug|Win32"
Name="debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@ -1956,7 +2183,7 @@
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
Name="release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@ -1965,7 +2192,7 @@
/>
</FileConfiguration>
<FileConfiguration
Name="Release|x64"
Name="release|x64"
>
<Tool
Name="VCCLCompilerTool"
@ -1973,7 +2200,7 @@
/>
</FileConfiguration>
<FileConfiguration
Name="Release_DLL|Win32"
Name="release-dll|Win32"
>
<Tool
Name="VCCLCompilerTool"
@ -1982,7 +2209,7 @@
/>
</FileConfiguration>
<FileConfiguration
Name="Debug_DLL|Win32"
Name="debug-dll|Win32"
>
<Tool
Name="VCCLCompilerTool"
@ -1991,7 +2218,7 @@
/>
</FileConfiguration>
<FileConfiguration
Name="Release -noBoost|Win32"
Name="release-noboost-st|Win32"
>
<Tool
Name="VCCLCompilerTool"
@ -2000,7 +2227,7 @@
/>
</FileConfiguration>
<FileConfiguration
Name="Release -noBoost|x64"
Name="release-noboost-st|x64"
>
<Tool
Name="VCCLCompilerTool"
@ -2008,7 +2235,7 @@
/>
</FileConfiguration>
<FileConfiguration
Name="Debug -noBoost|Win32"
Name="debug-noboost-st|Win32"
>
<Tool
Name="VCCLCompilerTool"
@ -2016,10 +2243,32 @@
PrecompiledHeaderThrough="AssimpPCH.h"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\..\code\AssimpPCH.h"
>
<FileConfiguration
Name="debug-st|Win32"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="1"
PrecompiledHeaderThrough="AssimpPCH.h"
/>
</FileConfiguration>
<FileConfiguration
Name="release-st|Win32"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="1"
PrecompiledHeaderThrough="AssimpPCH.h"
/>
</FileConfiguration>
<FileConfiguration
Name="release-st|x64"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="1"
/>
</FileConfiguration>
</File>
</Filter>
<Filter
@ -2049,7 +2298,7 @@
RelativePath="..\..\code\irrXML\irrXML.cpp"
>
<FileConfiguration
Name="Debug|Win32"
Name="debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@ -2059,7 +2308,7 @@
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|x64"
Name="debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@ -2067,7 +2316,7 @@
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
Name="release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@ -2077,7 +2326,7 @@
/>
</FileConfiguration>
<FileConfiguration
Name="Release|x64"
Name="release|x64"
>
<Tool
Name="VCCLCompilerTool"
@ -2085,7 +2334,7 @@
/>
</FileConfiguration>
<FileConfiguration
Name="Release_DLL|Win32"
Name="release-dll|Win32"
>
<Tool
Name="VCCLCompilerTool"
@ -2095,7 +2344,7 @@
/>
</FileConfiguration>
<FileConfiguration
Name="Release_DLL|x64"
Name="release-dll|x64"
>
<Tool
Name="VCCLCompilerTool"
@ -2103,7 +2352,7 @@
/>
</FileConfiguration>
<FileConfiguration
Name="Debug_DLL|Win32"
Name="debug-dll|Win32"
>
<Tool
Name="VCCLCompilerTool"
@ -2113,7 +2362,7 @@
/>
</FileConfiguration>
<FileConfiguration
Name="Debug_DLL|x64"
Name="debug-dll|x64"
>
<Tool
Name="VCCLCompilerTool"
@ -2121,7 +2370,7 @@
/>
</FileConfiguration>
<FileConfiguration
Name="Release -noBoost|Win32"
Name="release-noboost-st|Win32"
>
<Tool
Name="VCCLCompilerTool"
@ -2131,7 +2380,7 @@
/>
</FileConfiguration>
<FileConfiguration
Name="Release -noBoost|x64"
Name="release-noboost-st|x64"
>
<Tool
Name="VCCLCompilerTool"
@ -2139,7 +2388,7 @@
/>
</FileConfiguration>
<FileConfiguration
Name="Debug -noBoost|Win32"
Name="debug-noboost-st|Win32"
>
<Tool
Name="VCCLCompilerTool"
@ -2149,7 +2398,43 @@
/>
</FileConfiguration>
<FileConfiguration
Name="Debug -noBoost|x64"
Name="debug-noboost-st|x64"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="0"
/>
</FileConfiguration>
<FileConfiguration
Name="debug-st|Win32"
>
<Tool
Name="VCCLCompilerTool"
BasicRuntimeChecks="0"
SmallerTypeCheck="true"
UsePrecompiledHeader="0"
/>
</FileConfiguration>
<FileConfiguration
Name="debug-st|x64"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="0"
/>
</FileConfiguration>
<FileConfiguration
Name="release-st|Win32"
>
<Tool
Name="VCCLCompilerTool"
BasicRuntimeChecks="0"
SmallerTypeCheck="false"
UsePrecompiledHeader="0"
/>
</FileConfiguration>
<FileConfiguration
Name="release-st|x64"
>
<Tool
Name="VCCLCompilerTool"
@ -2166,6 +2451,82 @@
>
</File>
</Filter>
<Filter
Name="Logging"
>
<File
RelativePath="..\..\code\DefaultLogger.cpp"
>
</File>
<File
RelativePath="..\..\code\FileLogStream.h"
>
</File>
<File
RelativePath="..\..\code\StdOStreamLogStream.h"
>
</File>
<File
RelativePath="..\..\code\Win32DebugLogStream.h"
>
</File>
</Filter>
<Filter
Name="FileSystem"
>
<File
RelativePath="..\..\code\DefaultIOStream.cpp"
>
</File>
<File
RelativePath="..\..\code\DefaultIOStream.h"
>
</File>
<File
RelativePath="..\..\code\DefaultIOSystem.cpp"
>
</File>
<File
RelativePath="..\..\code\DefaultIOSystem.h"
>
</File>
<File
RelativePath="..\..\code\StreamReader.h"
>
</File>
</Filter>
<Filter
Name="Util"
>
<File
RelativePath="..\..\code\ByteSwap.h"
>
</File>
<File
RelativePath="..\..\code\fast_atof.h"
>
</File>
<File
RelativePath="..\..\code\GenericProperty.h"
>
</File>
<File
RelativePath="..\..\code\Hash.h"
>
</File>
<File
RelativePath="..\..\code\ParsingUtils.h"
>
</File>
<File
RelativePath="..\..\code\qnan.h"
>
</File>
<File
RelativePath="..\..\code\StringComparison.h"
>
</File>
</Filter>
</Filter>
<Filter
Name="doc"

View File

@ -2,7 +2,7 @@
<VisualStudioProject
ProjectType="Visual C++"
Version="8,00"
Name="AssimpView"
Name="assimpview"
ProjectGUID="{B17B959B-BB8A-4596-AF0F-A8C8DBBC3C5E}"
RootNamespace="assimp_view"
Keyword="Win32Proj"
@ -19,9 +19,9 @@
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="$(SolutionDir)..\..\tools\build\$(ConfigurationName)_$(PlatformName)"
IntermediateDirectory="$(SolutionDir)..\..\tools\build\$(ConfigurationName)_$(PlatformName)\obj"
Name="debug|Win32"
OutputDirectory="./../../bin/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
ConfigurationType="1"
CharacterSet="2"
>
@ -67,7 +67,7 @@
<Tool
Name="VCLinkerTool"
AdditionalDependencies="d3d9.lib d3dx9.lib comdlg32.lib assimp.lib winmm.lib comctl32.lib user32.lib advapi32.lib shell32.lib Gdi32.lib"
OutputFile="$(OutDir)\assimpview32d.exe"
OutputFile="$(OutDir)\assimp_view_debug.exe"
LinkIncremental="2"
AdditionalLibraryDirectories="&quot;..\..\lib\assimp_$(ConfigurationName)_$(PlatformName)&quot;;&quot;$(DXSDK_DIR)lib\x86&quot;"
GenerateDebugInformation="true"
@ -100,7 +100,7 @@
/>
</Configuration>
<Configuration
Name="Debug|x64"
Name="debug|x64"
OutputDirectory="$(SolutionDir)..\..\tools\build\$(ConfigurationName)_$(PlatformName)"
IntermediateDirectory="$(SolutionDir)..\..\tools\build\$(ConfigurationName)_$(PlatformName)\obj"
ConfigurationType="1"
@ -149,7 +149,7 @@
<Tool
Name="VCLinkerTool"
AdditionalDependencies="d3d9.lib d3dx9.lib comdlg32.lib assimp.lib winmm.lib comctl32.lib user32.lib advapi32.lib shell32.lib Gdi32.lib"
OutputFile="$(OutDir)\assimpview64d.exe"
OutputFile="$(OutDir)\assimp_view_debug.exe"
LinkIncremental="2"
AdditionalLibraryDirectories="..\..\lib\assimp_$(ConfigurationName)_$(PlatformName);&quot;$(DXSDK_DIR)lib\x64&quot;"
GenerateDebugInformation="true"
@ -182,9 +182,9 @@
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="$(SolutionDir)..\..\tools\build\$(ConfigurationName)_$(PlatformName)"
IntermediateDirectory="$(SolutionDir)..\..\tools\build\$(ConfigurationName)_$(PlatformName)\obj"
Name="release|Win32"
OutputDirectory="./../../bin/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
ConfigurationType="1"
CharacterSet="2"
WholeProgramOptimization="1"
@ -226,7 +226,7 @@
<Tool
Name="VCLinkerTool"
AdditionalDependencies="d3d9.lib d3dx9.lib comdlg32.lib assimp.lib winmm.lib comctl32.lib user32.lib advapi32.lib shell32.lib Gdi32.lib"
OutputFile="$(OutDir)\assimpview32.exe"
OutputFile="$(OutDir)\assimp_view.exe"
LinkIncremental="1"
AdditionalLibraryDirectories="&quot;..\..\lib\assimp_$(ConfigurationName)_$(PlatformName)&quot;;&quot;$(DXSDK_DIR)lib\x86&quot;"
IgnoreAllDefaultLibraries="false"
@ -263,7 +263,7 @@
/>
</Configuration>
<Configuration
Name="Release|x64"
Name="release|x64"
OutputDirectory="$(SolutionDir)..\..\tools\build\$(ConfigurationName)_$(PlatformName)"
IntermediateDirectory="$(SolutionDir)..\..\tools\build\$(ConfigurationName)_$(PlatformName)\obj"
ConfigurationType="1"
@ -308,7 +308,7 @@
<Tool
Name="VCLinkerTool"
AdditionalDependencies="d3d9.lib d3dx9.lib comdlg32.lib assimp.lib winmm.lib comctl32.lib user32.lib advapi32.lib shell32.lib Gdi32.lib"
OutputFile="$(OutDir)\assimpview64.exe"
OutputFile="$(OutDir)\assimp_view.exe"
LinkIncremental="1"
AdditionalLibraryDirectories="..\..\lib\assimp_$(ConfigurationName)_$(PlatformName);&quot;$(DXSDK_DIR)lib\x64&quot;"
IgnoreAllDefaultLibraries="false"
@ -345,9 +345,9 @@
/>
</Configuration>
<Configuration
Name="Release_DLL|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
Name="release-dll|Win32"
OutputDirectory="./../../bin/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
ConfigurationType="1"
CharacterSet="2"
WholeProgramOptimization="1"
@ -389,9 +389,9 @@
<Tool
Name="VCLinkerTool"
AdditionalDependencies="d3d9.lib d3dx9.lib comdlg32.lib assimp.lib winmm.lib comctl32.lib user32.lib advapi32.lib shell32.lib Gdi32.lib"
OutputFile="$(OutDir)\assimpview32.exe"
OutputFile="$(OutDir)\assimp_view.exe"
LinkIncremental="1"
AdditionalLibraryDirectories="..\..\lib\assimp_$(ConfigurationName)_$(PlatformName);&quot;$(DXSDK_DIR)lib\x86&quot;"
AdditionalLibraryDirectories="&quot;..\..\lib\assimp_$(ConfigurationName)_$(PlatformName)&quot;;&quot;$(DXSDK_DIR)lib\x86&quot;"
IgnoreAllDefaultLibraries="false"
IgnoreDefaultLibraryNames=""
GenerateDebugInformation="true"
@ -426,7 +426,7 @@
/>
</Configuration>
<Configuration
Name="Release_DLL|x64"
Name="release-dll|x64"
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="1"
@ -471,7 +471,7 @@
<Tool
Name="VCLinkerTool"
AdditionalDependencies="d3d9.lib d3dx9.lib comdlg32.lib assimp.lib winmm.lib comctl32.lib user32.lib advapi32.lib shell32.lib Gdi32.lib"
OutputFile="$(OutDir)\assimpview64.exe"
OutputFile="$(OutDir)\assimp_view.exe"
LinkIncremental="1"
AdditionalLibraryDirectories="..\..\lib\assimp_$(ConfigurationName)_$(PlatformName);&quot;$(DXSDK_DIR)lib\x64&quot;"
IgnoreAllDefaultLibraries="false"
@ -508,9 +508,9 @@
/>
</Configuration>
<Configuration
Name="Debug_DLL|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
Name="debug-dll|Win32"
OutputDirectory="./../../bin/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
ConfigurationType="1"
CharacterSet="2"
>
@ -556,9 +556,9 @@
<Tool
Name="VCLinkerTool"
AdditionalDependencies="d3d9.lib d3dx9.lib comdlg32.lib assimp.lib winmm.lib comctl32.lib user32.lib advapi32.lib shell32.lib Gdi32.lib"
OutputFile="$(OutDir)\assimpview32d.exe"
OutputFile="$(OutDir)\assimp_view_debug.exe"
LinkIncremental="2"
AdditionalLibraryDirectories="..\..\lib\assimp_$(ConfigurationName)_$(PlatformName);&quot;$(DXSDK_DIR)lib\x86&quot;"
AdditionalLibraryDirectories="&quot;..\..\lib\assimp_$(ConfigurationName)_$(PlatformName)&quot;;&quot;$(DXSDK_DIR)lib\x86&quot;"
GenerateDebugInformation="true"
SubSystem="2"
TargetMachine="1"
@ -589,7 +589,7 @@
/>
</Configuration>
<Configuration
Name="Debug_DLL|x64"
Name="debug-dll|x64"
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="1"
@ -638,7 +638,7 @@
<Tool
Name="VCLinkerTool"
AdditionalDependencies="d3d9.lib d3dx9.lib comdlg32.lib assimp.lib winmm.lib comctl32.lib user32.lib advapi32.lib shell32.lib Gdi32.lib"
OutputFile="$(OutDir)\assimpview64d.exe"
OutputFile="$(OutDir)\assimp_view_debug.exe"
LinkIncremental="2"
AdditionalLibraryDirectories="..\..\lib\assimp_debug_dll_x64;&quot;$(DXSDK_DIR)lib\x64&quot;"
GenerateDebugInformation="true"
@ -671,10 +671,11 @@
/>
</Configuration>
<Configuration
Name="Release -noBoost|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
Name="release-noboost-st|Win32"
OutputDirectory="./../../bin/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
ConfigurationType="1"
InheritedPropertySheets=".\shared\NoBoostShared.vsprops"
CharacterSet="2"
WholeProgramOptimization="1"
>
@ -715,7 +716,7 @@
<Tool
Name="VCLinkerTool"
AdditionalDependencies="d3d9.lib d3dx9.lib comdlg32.lib assimp.lib winmm.lib comctl32.lib user32.lib advapi32.lib shell32.lib Gdi32.lib"
OutputFile="$(OutDir)\assimpview32.exe"
OutputFile="$(OutDir)\assimp_view.exe"
LinkIncremental="1"
AdditionalLibraryDirectories="&quot;..\..\lib\assimp_$(ConfigurationName)_$(PlatformName)&quot;;&quot;$(DXSDK_DIR)lib\x86&quot;"
IgnoreAllDefaultLibraries="false"
@ -752,10 +753,11 @@
/>
</Configuration>
<Configuration
Name="Release -noBoost|x64"
Name="release-noboost-st|x64"
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="1"
InheritedPropertySheets=".\shared\NoBoostShared.vsprops"
CharacterSet="2"
WholeProgramOptimization="1"
>
@ -797,7 +799,7 @@
<Tool
Name="VCLinkerTool"
AdditionalDependencies="d3d9.lib d3dx9.lib comdlg32.lib assimp.lib winmm.lib comctl32.lib user32.lib advapi32.lib shell32.lib Gdi32.lib"
OutputFile="$(OutDir)\assimpview64.exe"
OutputFile="$(OutDir)\assimp_view.exe"
LinkIncremental="1"
AdditionalLibraryDirectories="..\..\lib\assimp_$(ConfigurationName)_$(PlatformName);&quot;$(DXSDK_DIR)lib\x64&quot;"
IgnoreAllDefaultLibraries="false"
@ -834,9 +836,174 @@
/>
</Configuration>
<Configuration
Name="Debug -noBoost|Win32"
OutputDirectory="$(SolutionDir)..\..\tools\build\$(ConfigurationName)_$(PlatformName)"
IntermediateDirectory="$(ConfigurationName)"
Name="debug-noboost-st|Win32"
OutputDirectory="./../../bin/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
ConfigurationType="1"
InheritedPropertySheets=".\shared\NoBoostShared.vsprops"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="&quot;$(DXSDK_DIR)include&quot;;..\..\include;..\..\code"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_SCL_SECURE_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS"
MinimalRebuild="true"
BasicRuntimeChecks="3"
SmallerTypeCheck="true"
RuntimeLibrary="1"
EnableFunctionLevelLinking="true"
UsePrecompiledHeader="2"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="4"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="d3d9.lib d3dx9.lib comdlg32.lib assimp.lib winmm.lib comctl32.lib user32.lib advapi32.lib shell32.lib Gdi32.lib"
OutputFile="$(OutDir)\assimp_view_debug.exe"
LinkIncremental="2"
AdditionalLibraryDirectories="&quot;..\..\lib\assimp_$(ConfigurationName)_$(PlatformName)&quot;;&quot;$(DXSDK_DIR)lib\x86&quot;"
GenerateDebugInformation="true"
SubSystem="2"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="debug-noboost-st|x64"
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="1"
InheritedPropertySheets=".\shared\NoBoostShared.vsprops"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="&quot;$(DXSDK_DIR)include&quot;;..\..\include;..\..\code"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_SCL_SECURE_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS"
MinimalRebuild="true"
BasicRuntimeChecks="3"
SmallerTypeCheck="true"
RuntimeLibrary="1"
EnableFunctionLevelLinking="true"
UsePrecompiledHeader="2"
WarningLevel="3"
Detect64BitPortabilityProblems="false"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="d3d9.lib d3dx9.lib comdlg32.lib assimp.lib winmm.lib comctl32.lib user32.lib advapi32.lib shell32.lib Gdi32.lib"
OutputFile="$(OutDir)\assimp_view_debug.exe"
LinkIncremental="2"
AdditionalLibraryDirectories="..\..\lib\assimp_$(ConfigurationName)_$(PlatformName);&quot;$(DXSDK_DIR)lib\x64&quot;"
GenerateDebugInformation="true"
SubSystem="2"
TargetMachine="17"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="debug-st|Win32"
OutputDirectory="./../../bin/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
ConfigurationType="1"
CharacterSet="2"
>
@ -882,7 +1049,7 @@
<Tool
Name="VCLinkerTool"
AdditionalDependencies="d3d9.lib d3dx9.lib comdlg32.lib assimp.lib winmm.lib comctl32.lib user32.lib advapi32.lib shell32.lib Gdi32.lib"
OutputFile="$(OutDir)\assimpview32d.exe"
OutputFile="$(OutDir)\assimp_view_debug.exe"
LinkIncremental="2"
AdditionalLibraryDirectories="&quot;..\..\lib\assimp_$(ConfigurationName)_$(PlatformName)&quot;;&quot;$(DXSDK_DIR)lib\x86&quot;"
GenerateDebugInformation="true"
@ -915,7 +1082,7 @@
/>
</Configuration>
<Configuration
Name="Debug -noBoost|x64"
Name="debug-st|x64"
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="1"
@ -964,7 +1131,7 @@
<Tool
Name="VCLinkerTool"
AdditionalDependencies="d3d9.lib d3dx9.lib comdlg32.lib assimp.lib winmm.lib comctl32.lib user32.lib advapi32.lib shell32.lib Gdi32.lib"
OutputFile="$(OutDir)\assimpview64d.exe"
OutputFile="$(OutDir)\assimp_view_debug.exe"
LinkIncremental="2"
AdditionalLibraryDirectories="..\..\lib\assimp_$(ConfigurationName)_$(PlatformName);&quot;$(DXSDK_DIR)lib\x64&quot;"
GenerateDebugInformation="true"
@ -996,6 +1163,169 @@
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="release-st|Win32"
OutputDirectory="./../../bin/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
ConfigurationType="1"
CharacterSet="2"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="&quot;$(DXSDK_DIR)include&quot;;..\..\include;..\..\code"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_SCL_SECURE_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS"
RuntimeLibrary="0"
UsePrecompiledHeader="2"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="d3d9.lib d3dx9.lib comdlg32.lib assimp.lib winmm.lib comctl32.lib user32.lib advapi32.lib shell32.lib Gdi32.lib"
OutputFile="$(OutDir)\assimp_view.exe"
LinkIncremental="1"
AdditionalLibraryDirectories="&quot;..\..\lib\assimp_$(ConfigurationName)_$(PlatformName)&quot;;&quot;$(DXSDK_DIR)lib\x86&quot;"
IgnoreAllDefaultLibraries="false"
IgnoreDefaultLibraryNames=""
GenerateDebugInformation="true"
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="release-st|x64"
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="1"
CharacterSet="2"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="&quot;$(DXSDK_DIR)include&quot;;..\..\include;..\..\code"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_SCL_SECURE_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS"
RuntimeLibrary="0"
UsePrecompiledHeader="2"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="d3d9.lib d3dx9.lib comdlg32.lib assimp.lib winmm.lib comctl32.lib user32.lib advapi32.lib shell32.lib Gdi32.lib"
OutputFile="$(OutDir)\assimp_view.exe"
LinkIncremental="1"
AdditionalLibraryDirectories="..\..\lib\assimp_$(ConfigurationName)_$(PlatformName);&quot;$(DXSDK_DIR)lib\x64&quot;"
IgnoreAllDefaultLibraries="false"
IgnoreDefaultLibraryNames=""
GenerateDebugInformation="true"
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="17"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
@ -1121,7 +1451,7 @@
RelativePath="..\..\tools\assimp_view\stdafx.cpp"
>
<FileConfiguration
Name="Debug|Win32"
Name="debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
@ -1129,7 +1459,7 @@
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|x64"
Name="debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@ -1137,7 +1467,7 @@
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
Name="release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@ -1145,7 +1475,7 @@
/>
</FileConfiguration>
<FileConfiguration
Name="Release|x64"
Name="release|x64"
>
<Tool
Name="VCCLCompilerTool"
@ -1153,7 +1483,7 @@
/>
</FileConfiguration>
<FileConfiguration
Name="Release_DLL|Win32"
Name="release-dll|Win32"
>
<Tool
Name="VCCLCompilerTool"
@ -1161,7 +1491,7 @@
/>
</FileConfiguration>
<FileConfiguration
Name="Release_DLL|x64"
Name="release-dll|x64"
>
<Tool
Name="VCCLCompilerTool"
@ -1169,7 +1499,7 @@
/>
</FileConfiguration>
<FileConfiguration
Name="Debug_DLL|Win32"
Name="debug-dll|Win32"
>
<Tool
Name="VCCLCompilerTool"
@ -1177,7 +1507,7 @@
/>
</FileConfiguration>
<FileConfiguration
Name="Debug_DLL|x64"
Name="debug-dll|x64"
>
<Tool
Name="VCCLCompilerTool"
@ -1185,7 +1515,7 @@
/>
</FileConfiguration>
<FileConfiguration
Name="Release -noBoost|Win32"
Name="release-noboost-st|Win32"
>
<Tool
Name="VCCLCompilerTool"
@ -1193,7 +1523,7 @@
/>
</FileConfiguration>
<FileConfiguration
Name="Release -noBoost|x64"
Name="release-noboost-st|x64"
>
<Tool
Name="VCCLCompilerTool"
@ -1201,7 +1531,7 @@
/>
</FileConfiguration>
<FileConfiguration
Name="Debug -noBoost|Win32"
Name="debug-noboost-st|Win32"
>
<Tool
Name="VCCLCompilerTool"
@ -1209,7 +1539,39 @@
/>
</FileConfiguration>
<FileConfiguration
Name="Debug -noBoost|x64"
Name="debug-noboost-st|x64"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="1"
/>
</FileConfiguration>
<FileConfiguration
Name="debug-st|Win32"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="1"
/>
</FileConfiguration>
<FileConfiguration
Name="debug-st|x64"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="1"
/>
</FileConfiguration>
<FileConfiguration
Name="release-st|Win32"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="1"
/>
</FileConfiguration>
<FileConfiguration
Name="release-st|x64"
>
<Tool
Name="VCCLCompilerTool"

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioPropertySheet
ProjectType="Visual C++"
Version="8.00"
Name="DllShared"
OutputDirectory="./../../bin/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
>
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions="ASSIMP_BUILD_DLL_EXPORT"
/>
<Tool
Name="VCPostBuildEventTool"
CommandLine=""
/>
</VisualStudioPropertySheet>

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioPropertySheet
ProjectType="Visual C++"
Version="8.00"
Name="LibShared"
OutputDirectory="./../../lib/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
>
</VisualStudioPropertySheet>

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioPropertySheet
ProjectType="Visual C++"
Version="8.00"
Name="NoBoostShared"
>
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions="ASSIMP_BUILD_BOOST_WORKAROUND;ASSIMP_BUILD_SINGLETHREADED"
/>
</VisualStudioPropertySheet>

Some files were not shown because too many files have changed in this diff Show More